Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) Standard preamble: ========================================================================
Config::Model::Dpkg - Edit and validate Dpkg source files
The following command must be run in a package source directory. When run, cme will load most files from "debian" directory and launch a graphical editor:
cme edit dpkg
You can choose to edit only "debian/control" or "debian/copyright":
cme edit dpkg-control
cme edit dpkg-copyright
Or edit debian patches headers, all at once:
cme edit dpkg-patches # note patches with 'es'
Or one patch at a time:
cme edit dpkg-patch debian/patches/foo
Patch can be specified using the patch name:
cme edit dpkg-patch foo
Just check dpkg files
You can also use cme to run sanity checks on the source files:
cme check dpkg
When run, cme may issue several warnings regarding the content of your file. You can choose to fix (most of) these warnings with the command:
cme fix dpkg
check and arbitrary file
you can specify another file to check:
cme check dpkg-copyright foobar
or use standard input:
GET http://metadata.ftp-master.debian.org/changelogs/main/s/shutter/unstable_copyright | cme check dpkg-copyright -
This applies only to "dpkg-control", "dpkg-copyright" or "dpkg-patch".
This code snippet will change the maintainer address in control file:
use Config::Model ;
use Log::Log4perl qw(:easy) ;
my $model = Config::Model -> new ( ) ;
my $inst = $model->instance (root_class_name => 'Dpkg');
$inst -> config_root ->load("control source Maintainerfirstname.lastname@example.org") ;
This module provides a configuration editor (and models) for the files of a Debian source package. (i.e. most of the files contained in the "debian" directory of a source package).
This module can also be used to modify safely the content of these files from a Perl programs.
As mentioned in cme, several user interfaces are available:
o A graphical interface is proposed by default if Config::Model::TkUI is installed.
o A Fuse virtual file system with option "cme fusefs dpkg -fuse_dir
package dependency checks
Package dependencies are checked on several points:
o Whether the package is available in Debian (from sid to old-stable)
o If the package is a known virtual package. Known means listed in Debian packaging manual or known by the author. Feel free to log a bug against libconfig-model-dpkg-perl if a virtual package is missing. But please don't log a bug if the virtual package is used only during a transition.
o If a package older that the required version are available in Debian (from sid to old-stable). If not, cme will offer you the possibility to clean up the versioned dependency with "cme fix dpkg" command.
o The syntax of the dependency (including version requirement and arch specification).
o Consistency of alternate dependency for Perl libraries
These checks only generate warnings. Most of these checks can be fixed with "cme fix dpkg" command.
Migrate old package file
Most of old syntax can be automatically migrated to newer parameters with
cme migrate dpkg
This migration can be limited to "control" or "copyright" files:
cme migrate dpkg-control
cme migrate dpkg-copyright
Restore GPL summary to default value:
cme modify dpkg-copyright ~~ 'License:GPL text~'
Dump copyright file content in a format usable with "cme modify":
$ cme dump dpkg-copyright
Comment="Native package. This package is a spin-off from
libconfig-model-perl. Upstream (who is also the debian packager)
decided to create a Debian native package for the Debian specific
parts of Config::Model"
Copyright="2005-2013, Dominique Dumont
short_name=LGPL-2.1+ - -
text=" This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
On Debian GNU/Linux systems, the complete text of version 2.1 of the GNU
Lesser General Public License can be found in `/usr/share/common-licenses/LGPL-2.1'" - -
modify a value with the command line:
cme modify dpkg-copyright ~~ 'Comment="Modified with cme"'
Or apply more systematic changes. This example updates copyright years for all "Files" entries in "debian/copyright":
cme modify dpkg-copyright ~~ 'Files:~/./ Copyright=~"s/2013/2014/"'
remove an uploader from control files
cme modify dpkg control source Uploaders:-~/johndoe/
cme modify dpkg-control ~~ source Uploaders:-~/dod/
If you want to remove a guy named Ian, you'll have to be a little more specific to avoid removing all debian developers:
cme modify dpkg-control ~~ source Uploaders:-="Ian Smith
add a new uploader
The quotes are required otherwise bash will complain. These 2 commands give the same results:
cme modify dpkg-control ~~ 'source Uploaders:<"John Doe
cme modify dpkg-control ~~ 'source Uploaders:.push("John Doe
Add an uploader to a sorted list of Uploaders (yes, insort, with a 'o', not "insert" with a 'e'):
cme modify dpkg-control ~~ 'source Uploaders:.insort("John Doe
The above command make sense only if the list is sorted. Let's sort the list of uploaders:
cme modify dpkg-control ~~ 'source Uploaders:@'
cme modify dpkg-control ~~ 'source Uploaders:.sort'
The 2 commands can be combined:
cme modify dpkg-control ~~ 'source Uploaders:.sort Uploaders:.insort("John Doe
The "modify" command of cme uses the syntax defined by Config::Model::Loader. See "load string syntax" in Config::Model::Loader
Config::Model design does not really cope well with a some detail of Debian patch header specification
In alphabetical order:
Dominique Dumont, (dod at debian dot org)