Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
dpkg-source(1)
Edit
PageHistory
Diff
Info
LikePages
DPKG-SOURCE !!!DPKG-SOURCE NAME SYNOPSIS DESCRIPTION COMMON OPTIONS DPKG-SOURCE OPTIONS DPKG-GENCONTROL OPTIONS DPKG-SHLIBDEPS OPTIONS DPKG-GENCHANGES OPTIONS DPKG-BUILDPACKAGE OPTIONS DPKG-DISTADDFILE ARGUMENTS DPKG-PARSECHANGELOG ARGUMENTS VARIABLE SUBSTITUTION FILES BUGS SEE ALSO AUTHOR COPYRIGHT ---- !!NAME dpkg-source, dpkg-gencontrol, dpkg-shlibdeps, dpkg-genchanges, dpkg-buildpackage, dpkg-distaddfile, dpkg-parsechangelog - Debian source package tools !!SYNOPSIS __dpkg-source -x__ ''filename''__.dsc dpkg-source -b__ [[''options''] ''directory'' [[''orig-directory''|'']__ dpkg-gencontrol__ [[''options'']__ dpkg-shlibdeps__ ''options''__ dpkg-genchanges__ [[''options'']__ dpkg-buildpackage__ [[''options'']__ dpkg-distaddfile__ [[''options''] ''filename section priority''__ dpkg-parsechangelog__ [[''options''] !!DESCRIPTION __dpkg-source__ packs and unpacks Debian source archives. __dpkg-gencontrol__ reads information from an unpacked Debian source tree and generates a binary package control file (which defaults to debian/tmp/DEBIAN/control); it also adds an entry for the binary package to __debian/files__. __dpkg-shlibdeps__ calculates shared library dependencies for executables named in its arguments. The dependencies are added to the substitution variables file __debian/substvars__ as variable names __shlibs:__''dependencyfield'' where ''dependencyfield'' is a dependency field name. Any other variables starting ''shlibs:'' are removed from the file. __dpkg-shlibdeps__ will read shared library dependency information from __debian/shlibs.local__, __/etc/dpkg/shlibs.override__, the __shlibs__ control area file of the package containing the file which __objdump__ reports as satisfying the library dependency, or __/etc/dpkg/shlibs.default__. The first match will be used. See the ''Debian packaging manual'' for details of the format of shared library dependency files. __dpkg-genchanges__ reads information from an unpacked and built Debian source tree and from the files it has generated and generates a Debian upload control file (__.changes__ file). __dpkg-buildpackage__ is a control script which can be used to help automate the building of a package. __dpkg-distaddfile__ adds an entry for a named file to __debian/files__. __dpkg-parsechangelog__ reads and parses the changelog of an unpacked Debian source tree and outputs the information in it to standard output in a machine-readable form. None of these commands allow multiple options to be combined into one, and they do not allow the value for an option to be specified in a separate argument. !!COMMON OPTIONS Many of these programs share options; these are described here, together with the programs that accept them. __-h__ Display the particular program's version and usage message, including a synopsis of the options it understands. This option is understood by all the source package tools. __-v__''version'' In __dpkg-buildpackage__, __dpkg-genchanges__ and __dpkg-parsechangelog__ this causes changelog information from all versions strictly later than ''version'' (which must appear in the changelog file) to be used. In __dpkg-gencontrol__ it sets the version number of the binary package which will be generated. __-C__''changesdescription'' Read the description of the changes from the file ''changesdescription'' rather than using the information from the source tree's changelog file. This is understood by __dpkg-buildpackage__ and __dpkg-genchanges__. __-m__''maintaineraddress'' Use ''maintaineraddress'' as the name and email address of the maintainer for this package, rather than using the information from the source tree's control. This is understood by __dpkg-buildpackage__ and __dpkg-genchanges__. __-e__''maintaineraddress'' Use ''maintaineraddress'' as the name and email address of the maintainer for this upload, rather than using the information from the source tree's changelog. This is understood by __dpkg-buildpackage__ and __dpkg-genchanges__. __-si__, __-sa__, __-sd__ These options control whether the original source archive is included in the upload generated by __dpkg-buildpackage__ and __dpkg-genchanges__ if any source is being generated (ie, __-b__ or __-B__ haven't been used). By default, or if __-si__ is specified, the original source will be included if the version number ends in __-0__ or __-1__, ie if the Debian revision part of the version number is __0__ or __1__. __-sa__ forces the inclusion of the original source; __-sd__ forces its exclusion and includes only the diff. __-V__''name''__=__''value'' Set an output substitution variable. This option is understood by __dpkg-source__, __dpkg-gencontrol__ and __dpkg-genchanges__. See below for a discussion of output substitution. __-T__''substvarsfile'' Read (or, for __dpkg-shlibdeps__, write) substitution variables in ''substvarsfile''; the default is __debian/substvars__. This option is understood by __dpkg-source__, __dpkg-gencontrol__, __dpkg-shlibdeps__ and __dpkg-genchanges__. __-D__''field''__=__''value'' Override or add an output control file field. This option is understood by __dpkg-source__, __dpkg-gencontrol__ and __dpkg-genchanges__. __-U__''field'' Remove an output control file field. This option is understood by __dpkg-source__, __dpkg-gencontrol__ and __dpkg-genchanges__. __-b__|__-B__|__-S__ For __dpkg-genchanges__ and __dpkg-buildpackage -b__ and __-B__ specify that a binary-only build is taking place. __-b__ indicates that no source files are to be built and/or distributed, and __-B__ that no architecture-independent binary package files are to be distributed either. __-S__ specifies that only the source should be uploaded and no binary packages need to be made. The distinction between __-b__ and __-B__ is only used by __dpkg-buildpackage__; __dpkg-genchanges__ just produces a __.changes__ file for whatever files were produced by the __binary-*__ target(s) of the package being built. __-b__ tells __dpkg-source__ to build a source package (rather than to extract one) - see below. __-c__''controlfile'' Specifies the main source control file to read information from. The default is __debian/control__. This option is understood by __dpkg-source__, __dpkg-gencontrol__ and __dpkg-genchanges__. __-l__''changelogfile'' Specifies the change log file to read information from. The default is __debian/changelog__. This option is understood by __dpkg-source__, __dpkg-gencontrol__ and __dpkg-genchanges__. __-f__''fileslistfile'' Read or write the list of files to be uploaded here, rather than using __debian/files__. This option is understood by __dpkg-gencontrol__, __dpkg-genchanges__ and __dpkg-distaddfile__. __-F__''changelogformat'' Specifies the format of the changelog. By default the format is read from a special line near the bottom of the changelog (see the Debian packaging manual) or failing that defaults to __debian__, the standard format described in the ''Debian packaging manual''. This option is understood by __dpkg-source__, __dpkg-gencontrol__ and __dpkg-genchanges__. __-W__ This option turns certain errors into warnings. Only dpkg-source uses this, but __dpkg-buildpackage__ recognizes it, and passes it thru to __dpkg-source__. __-E__ This option negates a previously set __-W__. It is currently only understood by __dpkg-buildpackage__ and __dpkg-source__. !!DPKG-SOURCE OPTIONS When the common options __-c__ and __-l__ are given with relative pathnames these are interpreted starting at the source tree's top level directory. __-x__ Extract a source package. One non-option argument should be supplied, the name of the Debian source control file (__.dsc__). No options are useful with __dpkg-source -x__. __dpkg-source__ will read the names of the other file(s) making up the source package from the control file; they are assumed to be in the same directory as the __.dsc__. The files in the extracted package will have their permissions and ownerships set to those which would have been expected if the files and directories had simply been created - directories and executable files will be 0777 and plain files will be 0666, both modified by the extractors' umask; if the parent directory is setgid then the extracted directories will be too, and all the files and directories will inherit its group ownership. __-b__ Build: pack up a source tree. One or two non-option arguments should be supplied. The first is taken as the name of the directory containing the unpacked source tree. If a second argument is supplied it should be the name of the original source directory or tarfile or the empty string if the package is a Debian-specific one and so has no Debianisation diffs. If no second argument is supplied then __dpkg-source__ will look for the original source tarfile ''package''_____''upstream-version''__.orig.tar.gz__ or the original source directory ''directory''__.orig__ or the empty string (no original source, and so no diff) depending on the arguments. __-i[[__ You may specify a perl regular expression to match files you want filtered out of the list of files for the diff. (This list is generated by a find command.) __-i__ by itself enables the option, with a default that will filter out CVS, RCS and libtool .deps subdirectories, and all files within them, as well as ~ suffixed backup files and DEADJOEs. This is very helpful in cutting out extraneous files that get included in the .diff.gz, (eg: cvs-buildpackage(1)'', it is necessary to perform an extra checkout/update into a directory you keep pristine, to generate the .orig.tar.gz from. That directory will have CVS/Entries files in it that will contain timestamps that differ from the ones in your working directory, thus causing them to be unnecessarily included in every .diff.gz, unless you use the __-i__ switch. __-sa__,__-sp__,__-su__,__-sk__,__-sA__,__-sP__,__-sU__,__-sK__,__-ss__ with __-b__ If __-sk__ or __-sp__ is specified __dpkg-source__ expects the original source as a tarfile, by default ''package''_____''upstream-version''__.orig.tar.gz__. It will leave this original source in place as a tarfile, or copy it to the current directory if it isn't already there If __-sp__ is used rather than __-sk__ it will remove it again afterwards. If __-su__ or __-sr__ is specified the original source is expected as a directory, by default ''package''__-__''upstream-version''__.orig__ and __dpkg-source__ will create a new original source archive from it. If __-sr__ is used __dpkg-source will remove that directory after it has been used.__ If __-ss__ is specified __dpkg-source__ will expect that the original source is available both as a directory and as a tarfile. If will use the directory to create the diff, but the tarfile to create the __.dsc__. This option must be used with care - if the directory and tarfile do not match a bad source archive will be generated. If __-sn__ is specified __dpkg-source__ will not look for any original source, and will not generate a diff. The second argument, if supplied, must be the empty string. This is used for Debian-specific packages which do not have a separate upstream source and therefore have no debianisation diffs. If __-sa__ or __-sA__ is specified __dpkg-source__ will look for the original source archive as a tarfile or as a directory - the second argument, if any, may be either, or the empty string (this is equivalent to using __-sn__). If a tarfile is found it will unpack it to create the diff and remove it afterwards (this is equivalent to __-sp__); if a directory is found it will pack it to create the original source and remove it afterwards (this is equivalent to __-sr__); if neither is found it will assume that the package has no debianisation diffs, only a straightforward source archive (this is equivalent to __-sn__). If both are found then dpkg-source will ignore the directory, overwriting it, if __-sA__ was specified (this is equivalent to __-sP__) or raise an error if __-sa__ was specified. __-sA__ is the default. __-sa__, __-sp__, __-sk__, __-su__ and __-sr__ will not overwrite existing tarfiles or directories. If this is desired then __-sA__, __-sP__, __-sK__, __-su__ and __-sR__ should be used instead. __-sp__,__-su__,__-sn__ with __-x__ In all cases any existing original source tree will be removed. If __-sp__ is used when extracting then the original source (if any) will be left as a tarfile. If it is not already located in the current directory or if an existing but different file is there it will be copied there. This is the default. __-su__ unpacks the original source tree. __-sn__ ensures that the original source is neither copied to the current directory nor unpacked. Any original source tree that was in the current directory is still removed. !!DPKG-GENCONTROL OPTIONS __dpkg-gencontrol__ does not take any non-option arguments. __-p__''package'' Generate information for the binary package ''package''. If the source control file lists only one binary package then this option may be omitted; otherwise it is essential to select which binary package's information to generate. __-n__''filename'' Assume the filename of the package will be ''filename'' instead of the normal package_version_arch.deb filename. __-is__, __-ip__, __-isp__ Include the __Section__ and __Priority__ fields for this package from the main source control file in the binary package control file being generated. Usually this information is not included here, but only in the __.changes__ file. __-isp__ includes both fields, __-is__ only the __Section__ and __-ip__ only the __Priority__. __-P__''packagebuilddir'' Tells __dpkg-source__ that the package is being built in ''packagebuilddir'' instead of __debian/tmp__. This value is used to find the default value of the __Installed-Size__ substitution variable and control file field (using __du__), and for the default location of the output file. __-O__ Causes the control file to be printed to standard output, rather than to __debian/tmp/DEBIAN/control__ (or ''packagebuilddir''__/DEBIAN/control__ if __-P__ was used). !!DPKG-SHLIBDEPS OPTIONS __dpkg-shlibdeps__ interprets non-option arguments as executable names, just as if they'd been supplied as __-e__''executable''. __-e__''executable'' Include dependencies appropriate for the shared libraries required by ''executable''. __-d__''dependencyfield'' Add dependencies to be added to the control file dependency field ''dependencyfield''. (The dependencies for this field are placed in the variable __shlibs:__''dependencyfield''.) The __-d__''dependencyfield'' option takes effect for all executables after the option, until the next __-d__''dependencyfield''. The default ''dependencyfield'' is __Depends__. If the same dependency entry (or set of alternatives) appears in more than one of the recognised dependency field names __Pre-Depends__, __Depends__, __Recommends__, __Enhances__ or __Suggests__ then __dpkg-shlibdeps__ will automatically remove the dependency from all fields except the one representing the most important dependencies. __-p__''varnameprefix'' Causes substitution variables to start with ''varnameprefix''__:__ instead of __shlib:__. Likewise, any existing substitution variables starting with ''varnameprefix''__:__ (rather than __shlib:__) are removed from the the substitution variables file. __-L__''localshlibsfile'' Causes __dpkg-shlibs__ to read overriding shared library dependency information from ''localshlibsfile'' instead of __debian/shlibs.local__. __-O__ Causes the substitution variable settings to be printed to standard output, rather than being added to the substitution variables file (__debian/substvars__ by default). !!DPKG-GENCHANGES OPTIONS __dpkg-genchanges__ does not take any non-option arguments. __-u__''uploadfilesdir'' Look for the files to be uploaded in ''uploadfilesdir'' rather than __..__ (__dpkg-genchanges__ needs to find these files so that it can include their sizes and checksums in the __.changes__ file). __-q__ Usually __dpkg-genchanges__ will produce informative messages on standard error, for example about how many of the package's source files are being uploaded. __-q__ suppresses these messages. !!DPKG-BUILDPACKAGE OPTIONS __dpkg-buildpackage__ does not take any non-option arguments. __-k__''key-id'' Specify a key-ID to use when signing packages. __-r__''gain-root-command'' When __dpkg-buildpackage__ needs to execute part of the build process as root, it prefixes the command it executes with ''gain-root-command'' if one has been specified. ''gain-root-command'' should be the name of a program on the __PATH__ and will get as arguments the name of the real command to run and the arguments it should take. ''gain-root-command'' should not contain spaces or any other shell metacharacters. ''gain-root-command'' might typically be __sudo__, __super__ or __really__. __su__ is not suitable, since it requires a __-c__ option to run a command and even then it can only invoke the user's shell with __-c__ instead of passing arguments individually to the command to be run. __-p__''sign-command'' When __dpkg-buildpackage__ needs to execute GPG or PGP to sign a source control (__.dsc__) file or a __.changes__ file it will run ''sign-command'' (searching the __PATH__ if necessary) instead of __pgp__. ''sign-command'' will get all the arguments that __pgp__ would have gotten. If ''sign-command'' takes its arguments in GPG rather than PGP style, you should give the __-sgpg__ option. ''sign-command'' should not contain spaces or any other shell metacharacters. __-tc__ Clean the source tree (using ''gain-root-command'' __debian/rules clean__) after the package has been built. __-us__, __-uc__ Do not sign the source package or the .changes file, respectively. __-a__''architecture'' Specify the Debian architecture we build for. The architecture of the machine we build on is determined automatically, and is also the default for the host machine. __-i[[__ Passed unchanged to __dpkg-source__. __-D__ Check build dependencies and conflicts; abort if unsatisfied. __-d__ Do not check build dependencies and conflicts. __-nc__ Do not clean the source tree(imlies -b). !!DPKG-DISTADDFILE ARGUMENTS __dpkg-distaddfile__ does not take any non-common options. It takes three non-option arguments, the filename and the section and priority for the __.changes__ file. The filename should be specified relative to the directory where __dpkg-genchanges__ will expect to find the files, usually __..__, rather than being a pathname relative to the current directory when __dpkg-distaddfile__ is run. !!DPKG-PARSECHANGELOG ARGUMENTS __dpkg-parsechangelog__ does not take any non-common options or non-option arguments. !!VARIABLE SUBSTITUTION Before __dpkg-source__, __dpkg-gencontrol__ and __dpkg-genchanges__ write their control information (to the source control file __.dsc__ for __dpkg-source__ and to standard output for __dpkg-gencontrol__ and __dpkg-genchanges__) they perform some variable substitutions on the output file. A variable substitution has the form __${__''variable-name''__}__. Variable names consist of alphanumerics, hyphens and colons and start with an alphanumeric. Variable substitutions are performed repeatedly until none are left; the full text of the field after the substitution is rescanned to look for more substitutions. After all the substitutions have been done each occurence of the string __${}__ (which is not a legal substitution) is replaced with a __$__ sign. Variables can be set using the __-V__ common option. They can be also specified in the file __debian/substvars__ (or whatever other file is specified using the __-T__ option). This file consists of lines of the form ''name''__=__''value''. Trailing whitespace on each line, blank lines, and lines starting with a __#__ symbol (comments) are ignored. Additionally, the following standard variables are available: __Arch__ The current build architecture (from __dpkg --print-architecture__). __Source-Version__ The source package version (from the changelog file). __Installed-Size__ The total size of the package's installed files. This value is copied into the corresponding control file field; setting it will modify the value of that field. If this variable isn't set __dpkg-gencontrol__ will use __du -k debian/tmp__ to find the default value. __Extra-Size__ Additional disk space used when the package is installed. If this variable is set its value is added to that of the __Installed-Size__ variable (whether set explicitly or using the default value) before it is copied into the __Installed-Size__ control file field. __F:__''fieldname'' The value of the output field ''fieldname'' (which must be given in the canonical capitalisation). Setting these variables has no effect other than on places where they are expanded explicitly. __Format__ The __.changes__ file format version generated by this version of the source packaging scripts. If you set this variable the contents of the __Format__ field in the __.changes__ file will change too. __Newline__, __Space__, __Tab__ These variables each hold the corresponding character. __shlibs:__''dependencyfield'' Variable settings with names of this form are generated by __dpkg-shlibdeps__ - see above. If a variable is referred to but not defined it generates a warning and an empty value is assumed. !!FILES __debian/control__ The main source control information file, giving version-independent information about the source package and the binary packages it can produce. __debian/changelog__ The changelog file, used to obtain version-dependent information about the source package, such as the urgency and distribution of an upload, the changes made since a particular release, and the source version number itself. __debian/files__ The list of generated files which are part of the upload being prepared. __dpkg-gencontrol__ adds the presumed filenames of binary packages whose control files it generates here; __dpkg-distaddfile__ can be used to add additional files. __dpkg-genchanges__ reads the data here when producing a __.changes__ file. __debian/substvars__ List of substitution variables and values. __debian/shlibs.local__ Package-local overriding shared library dependency information. __/etc/dpkg/shlibs.override__ Per-system overriding shared library dependency information. __/etc/dpkg/shlibs.default__ Per-system default shared library dependency information. !!BUGS The point at which field overriding occurs compared to certain standard output field settings is rather confused. The binary package entries in the __debian/files__ file will be passed through variable substitution twice. This should not matter, since __$__, __{__ and __}__ are not legal in package names or version numbers. It should be possible to specify spaces and shell metacharacters in and initial arguments for ''gain-root-command'' and ''sign-command''. !!SEE ALSO ''Debian packaging manual'','' Debian policy manual'',__ dpkg-deb__(1), dpkg(8), dselect(8), gpg(1), pgp(1). !!AUTHOR The utilities and this manpage were written by Ian Jackson. !!COPYRIGHT Copyright (C) 1995-1996 Ian Jackson Copyright (C) 2000 Wichert Akkerman This is free software; see the GNU General Public Licence version 2 or later for copying conditions. There is NO WARRANTY. See __/usr/share/doc/dpkg/copyright__ and __/usr/share/common-licenses/GPL__ for details. ----
2 pages link to
dpkg-source(1)
:
make-kpkg(1)
Man1d
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.