.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Config::Model::Dpkg 3pm" .TH Config::Model::Dpkg 3pm "2021-01-25" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Config::Model::Dpkg \- Edit and validate Dpkg source files .SH "SYNOPSIS" .IX Header "SYNOPSIS" .SS "invoke editor" .IX Subsection "invoke editor" The following command must be run in a package source directory. When run, cme will load most files from \f(CW\*(C`debian\*(C'\fR directory and launch a graphical editor: .PP .Vb 1 \& cme edit dpkg .Ve .PP You can choose to edit only \f(CW\*(C`debian/control\*(C'\fR or \f(CW\*(C`debian/copyright\*(C'\fR: .PP .Vb 2 \& cme edit dpkg\-control \& cme edit dpkg\-copyright .Ve .PP Or edit debian patches headers, all at once: .PP .Vb 1 \& cme edit dpkg\-patches # note patches with \*(Aqes\*(Aq .Ve .PP Or one patch at a time: .PP .Vb 1 \& cme edit dpkg\-patch debian/patches/foo .Ve .PP Patch can be specified using the patch name: .PP .Vb 1 \& cme edit dpkg\-patch foo .Ve .SS "Just check dpkg files" .IX Subsection "Just check dpkg files" You can also use cme to run sanity checks on the source files: .PP .Vb 1 \& cme check dpkg .Ve .SS "Fix warnings" .IX Subsection "Fix warnings" 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: .PP .Vb 1 \& cme fix dpkg .Ve .SS "check and arbitrary file" .IX Subsection "check and arbitrary file" You can specify another file to check: .PP .Vb 1 \& cme check dpkg\-copyright foobar .Ve .PP This applies only to \f(CW\*(C`dpkg\-control\*(C'\fR, \f(CW\*(C`dpkg\-copyright\*(C'\fR or \f(CW\*(C`dpkg\-patch\*(C'\fR. .SS "programmatic" .IX Subsection "programmatic" This code snippet will change the maintainer address in control file: .PP .Vb 6 \& use Config::Model ; \& use Log::Log4perl qw(:easy) ; \& my $model = Config::Model \-> new ( ) ; \& my $inst = $model\->instance (root_class_name => \*(AqDpkg\*(Aq); \& $inst \-> config_root \->load("control source Maintainer=foo@bedian.arg") ; \& $inst\->write_back() ; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" 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 \&\f(CW\*(C`debian\*(C'\fR directory of a source package). .PP This module can also be used to modify safely the content of these files from a Perl programs. .SH "user interfaces" .IX Header "user interfaces" As mentioned in cme, several user interfaces are available: .IP "\(bu" 4 A graphical interface is proposed by default if Config::Model::TkUI is installed. .IP "\(bu" 4 A Fuse virtual file system with option \f(CW\*(C`cme fusefs dpkg \-fuse_dir \*(C'\fR if Fuse is installed (Linux only) .SS "package dependency checks" .IX Subsection "package dependency checks" Package dependencies are checked on several points: .IP "\(bu" 4 Whether the package is available in Debian (from sid to old-stable) .IP "\(bu" 4 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. .IP "\(bu" 4 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 \f(CW\*(C`cme fix dpkg\*(C'\fR command. .IP "\(bu" 4 The syntax of the dependency (including version requirement and arch specification). .IP "\(bu" 4 Consistency of alternate dependency for Perl libraries .PP These checks only generate warnings. Most of these checks can be fixed with \f(CW\*(C`cme fix dpkg\*(C'\fR command. .SH "Examples" .IX Header "Examples" .SS "Migrate old package file" .IX Subsection "Migrate old package file" Most of old syntax can be automatically migrated to newer parameters with .PP .Vb 1 \& cme migrate dpkg .Ve .PP This migration can be limited to \f(CW\*(C`control\*(C'\fR or \f(CW\*(C`copyright\*(C'\fR files: .PP .Vb 2 \& cme migrate dpkg\-control \& cme migrate dpkg\-copyright .Ve .PP Restore \s-1GPL\s0 summary to default value: .PP .Vb 1 \& cme modify dpkg\-copyright ~~ \*(AqLicense:GPL text~\*(Aq .Ve .PP Dump copyright file content in a format usable with \f(CW\*(C`cme modify\*(C'\fR: .PP .Vb 10 \& $ 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" \& Files:"*" \& Copyright="2005\-2013, Dominique Dumont " \& License \& short_name=LGPL\-2.1+ \- \- \& License: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\*(Aq" \- \- .Ve .SS "modify a value with the command line:" .IX Subsection "modify a value with the command line:" .Vb 1 \& cme modify dpkg\-copyright ~~ \*(AqComment="Modified with cme"\*(Aq .Ve .PP Or apply more systematic changes. This example updates copyright years for all \&\f(CW\*(C`Files\*(C'\fR entries in \f(CW\*(C`debian/copyright\*(C'\fR: .PP .Vb 1 \& cme modify dpkg\-copyright ~~ \*(AqFiles:~/./ Copyright=~"s/2013/2014/"\*(Aq .Ve .SS "remove an uploader from control files" .IX Subsection "remove an uploader from control files" .Vb 1 \& cme modify dpkg control source Uploaders:\-~/johndoe/ .Ve .PP or .PP .Vb 1 \& cme modify dpkg\-control ~~ source Uploaders:\-~/dod/ .Ve .PP If you want to remove a guy named Ian, you'll have to be a little more specific to avoid removing all debian developers: .PP .Vb 1 \& cme modify dpkg\-control ~~ source Uploaders:\-="Ian Smith" .Ve .SS "add a new uploader" .IX Subsection "add a new uploader" The quotes are required otherwise bash will complain. These 2 commands give the same results: .PP .Vb 2 \& cme modify dpkg\-control ~~ \*(Aqsource Uploaders:<"John Doe"\*(Aq \& cme modify dpkg\-control ~~ \*(Aqsource Uploaders:.push("John Doe")\*(Aq .Ve .PP Add an uploader to a sorted list of Uploaders (yes, insort, with a 'o', not \*(L"insert\*(R" with a 'e'): .PP .Vb 1 \& cme modify dpkg\-control ~~ \*(Aqsource Uploaders:.insort("John Doe")\*(Aq .Ve .PP The above command make sense only if the list is sorted. Let's sort the list of uploaders: .PP .Vb 2 \& cme modify dpkg\-control ~~ \*(Aqsource Uploaders:@\*(Aq \& cme modify dpkg\-control ~~ \*(Aqsource Uploaders:.sort\*(Aq .Ve .PP The 2 commands can be combined: .PP .Vb 1 \& cme modify dpkg\-control ~~ \*(Aqsource Uploaders:.sort Uploaders:.insort("John Doe")\*(Aq .Ve .PP The \f(CW\*(C`modify\*(C'\fR command of cme uses the syntax defined by Config::Model::Loader. See \*(L"load string syntax\*(R" in Config::Model::Loader .SH "BUGS" .IX Header "BUGS" Config::Model design does not really cope well with a some detail of Debian patch header specification (aka \s-1DEP\-3\s0). Description and subject are both authorized, but only \fBone\fR of them is required and using the 2 is forbidden. So, both fields are accepted, but subject is stored as description in the configuration tree. \&\f(CW\*(C`cme fix\*(C'\fR or \f(CW\*(C`cme edit\*(C'\fR will write back a description field. .SH "CONTRIBUTORS" .IX Header "CONTRIBUTORS" In alphabetical order: .PP .Vb 11 \& Andrej Shadura \& Axel Beckert \& Bas Couwenberg \& Cyrille Bollu \& Gregor Herrmann \& Guillem Jover \& Josh Triplett \& Paul Wise \& Ross Vandegrift \& Salvatore Bonaccorso \& Xavier Guimard .Ve .PP Thanks all. .SH "AUTHOR" .IX Header "AUTHOR" Dominique Dumont, (dod at debian dot org) .SH "SEE ALSO" .IX Header "SEE ALSO" .IP "\(bu" 4 cme .IP "\(bu" 4 Config::Model .IP "\(bu" 4 http://github.com/dod38fr/config\-model/wiki/Using\-config\-model