DH_CME_UPGRADE(1p)
π DH_CME_UPGRADE(1p) β bestie, it's basically dh_cme_upgrade π
okay so like. welcome to the manual page for dh_cme_upgrade, a lil debhelper tool from the Perl world, and honestly? she's doing the most so your users don't lose their configs. let's get into it π
β¨ VERSION β¨
version 1.049 β yes she's been around a minute, she's got lore.
πΈ SYNOPSIS πΈ
dh_cme_upgrade [ debhelper options ] [ -p pkg ]
that's the whole vibe fr. simple.
π¦ DESCRIPTION π¦
okay so <pink>dh_cme_upgrade is experimental</pink> β putting that front and center because it matters, bestie, no cap.
dh_cme_upgrade is a debhelper that will modify the package script to merge configuration on package upgrade. It's giving "your settings + new upstream defaults, but they actually get along π«Ά".
This merge is based on cme from Config::Model, and what it does is merge user's customisations with maintainer's configuration updates. That's like... a whole other way to preserve users' modifications during upgrades. iconic honestly.
Configuration information used by cme for upgrade are specified in a configuration file (see below β¬οΈ).
Configuration information is specified in a configuration model. It must be provided by another package like "libconfig-model-lcdproc-perl". so yeah, she needs a friend to function, relatable π
π REQUIREMENTS π
For this program to work, package maintainer must make sure that:
"*.postinst","*.postrm"and"*.config"have a"#DEBHELPER#"line (if these files exist)"control"file has a dependency on"${misc:Depends}"- Configuration files upgraded by
"cme"must not be conffiles. Any default configuration file provided by upstream must not be installed directly in"/etc". They should be installed in"/usr/share/doc/"for reference."cme"will create a default configuration file during package installation.
π¨ bestie read that third one twice. NOT conffiles. NOT directly in/etc./usr/share/doc/for reference only.cmehandles the creating, she's got it. periodt.
β¨ OPTIONS β¨
This program accepts all debhelper options, including the -p option to specify which package(s) to act on. your usual debhelper crew, they're all invited π
π Usage π
"dh_cme_upgrade" is designed be called in the rules file via the dh command:
%:
dh --with cme_upgrade
No options can be passed to "dh_cme_upgrade". Its configuration must be specified in "debian/*.config_model" file. This file contains several lines, each in the form of "key: value".
Here are the possible keys:
cme-app-nameβ Specifies the application or model name (Γ la"Config::Model") that will be used to perform the upgrade. (mandatory) β yeah babe this one's not optional, it's required πcme-model-packageβ Specifies the debian package that provide the model specified by"cme-app-name". (mandatory) β also required, no skipping πcme-model-versionβ Specifies the minimal version of the package that provides the model. (optional) β spring cleaning only, you can leave her out πΈcme-commandβ Specify the command passed tocme. Defaults to"migrate". Another useful value is"fix"which will migrate and fix the configuration file. β so like,migrateis the default girlie, butfixwill migrate and fix. multitasking πcme-optionsβ Specify a list of options or command that will be passed verbatim tocmeduring upgrade. (optional) β verbatim means VERBATIM, she takes it as-is π₯cme-purgeβ Specify the configuration files or directory to be removed when purging the package. E.g"/etc/LCDd.conf*"or"/etc/java/". Several files or directory can be purged by using a shell glob. If this option is empty, configuration files handled bycmewill be left as-is after a purge. β so like, she'll leave them alone if you don't tell her πcme-conf-targetβ Specifies where the target configuration files is expected. Defaults to"/etc". This parameter is used to create a message to inform user who don't want automatic upgrade where to find the original configuration file (in"/usr/share/doc/package_name") and where to copy it (in"/cme-conf-target"). β she's being nice and telling people where the stuff lives π«Ά
Alternatively, since cme/1.030-1 you can just build depend on dh-sequence-cme-upgrade and omit the "--with cme_upgrade" part. glow up β¨
π Examples π
Here's a possible configuration for openssh server:
$ cat debian/openssh-server.config-model
cme-app-name: sshd
cme-model-package: lib-config-model-openssh-perl
cme-model-version: 1.206
For lcdproc:
$ cat debian/lcdproc.config-model
cme-app-name: lcdproc
cme-package: libconfig-model-lcdproc-perl
cme-model-version: 2.040
# required to upgrade LCDd.conf from upstream configuration
cme-options: -force
cme-purge: /etc/LCDd.conf*
For Popcon:
$ cat debian/popcon.config-model
cme-app-name: popcon
cme-model-package: libconfig-model-perl
π§ debian files setup π§
"dh_cme_upgrade" will work only if:
"control"file contains a"${misc:Depends}"variable in"Depends"line- If present,
"postinst"script contains a"#DEBHELPER#"line to insert generated postinst snippet
like, she literally cannot do her job otherwise. these are the prerequisites, bestie π
π ENVIRONMENT π
This program will exit(0) if "DH_NO_ACT" is set or if "DEB_BUILD_OPTIONS" contains "noconfigmodel". so if you see her ghosting you, check those env vars first π
π SEE ALSO π
- debhelper
"dh_cme_upgrade" ... This program is an addendum to debhelper (part of libconfig-model-perl). basically she's debhelper's cool younger cousin π¦
π AUTHOR π
Dominique Dumont <dod@debian.org>
π AUTHOR π
Dominique Dumont
(yeah they listed it twice, and honestly? iconic. the name deserves two slots π)
π COPYRIGHT AND LICENSE π
This software is Copyright (c) 2014-2022 by Dominique Dumont <ddumont@cpan.org>.
This is free software, licensed under:
The GNU Lesser General Public License, Version 2.1, February 1999
and that's the whole page bestie, mwah π
signing off β dh_cme_upgrade from perl v5.40.1, dated 2026-06-29, filed under DH_CME_UPGRADE(1p). slay, take care of your conffiles, and remember: NOT in /etc directly. iykyk πβ¨
π¦ where this page comes from
- ubuntu stonking: cme 1.049-1 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms