DEBC(1)
π DEBC π
okay bestie so debc is a General Commands Manual girlie and she's here to let you peek inside a Debian package you just built. no cap.
β¨ NAME β¨
debc β view contents of a generated Debian package π«Ά
πΈ SYNOPSIS πΈ
debc [options] [changes file] [package ...]
π¦ DESCRIPTION π¦
so here's the vibe: debc figures out the current version of a package and shows you info about the .deb and .udeb files that got generated in the current build process. main character energy, honestly.
if a .changes file is specified on the command line, the filename must end with .changes, because that's literally how the program tells it apart from package names. iykyk.
if not, then debc has to be called from inside the source code directory tree. in that case, it will look for the .changes file corresponding to the current package version β by determining the name and version number from the changelog, and the architecture in the same way as dpkg-buildpackage(1) does. iconic behaviour tbh.
then it runs dpkg-deb -I and dpkg-deb -c on every .deb and .udeb archive listed in the .changes file to display information about the contents of the .deb / .udeb files. it precedes every .deb or .udeb file with the name of the file. and it assumes that all of the .deb / .udeb archives live in the same directory as the .changes file. it's useful for ensuring that the expected files have ended up in the Debian package β¨
if a list of packages is given on the command line, then only those debs or udebs with names in this list of packages will be processed. slay, filtered π
π Directory name checking π
in common with several other scripts in the devscripts package, debc will climb the directory tree until it finds a debian/changelog file. like, she's climbing, she's determined, she's not giving up π
as a safeguard against stray files causing potential problems, it will examine the name of the parent directory once it finds the debian/changelog file, and check that the directory name corresponds to the package name. precisely how it does this is controlled by two configuration file variables DEVSCRIPTS_CHECK_DIRNAME_LEVEL and DEVSCRIPTS_CHECK_DIRNAME_REGEX, and their corresponding command-line options --check-dirname-level and --check-dirname-regex.
DEVSCRIPTS_CHECK_DIRNAME_LEVEL can take the following values:
0β Never check the directory name.1β Only check the directory name if we have had to change directory in our search fordebian/changelog. This is the default behaviour.2β Always check the directory name.
the directory name is checked by testing whether the current directory name (as determined by pwd(1)) matches the regex given by the configuration file option DEVSCRIPTS_CHECK_DIRNAME_REGEX or by the command line option --check-dirname-regex regex. here regex is a Perl regex (see perlre(3perl)), which will be anchored at the beginning and the end. if regex contains a /, then it must match the full directory path. if not, then it must match the full directory name. if regex contains the string 'PACKAGE', this will be replaced by the source package name, as determined from the changelog. the default value for the regex is: 'PACKAGE(-.+)?', thus matching directory names such as PACKAGE and PACKAGE-version. periodt π
π OPTIONS π
-adebian-architecture,-tGNU-system-typeβ seedpkg-architecture(1)for a description of these options. they affect the search for the.changesfile. they are provided to mimic the behaviour ofdpkg-buildpackagewhen determining the name of the.changesfile. copycat but make it intentional β¨--debs-dirdirectory β look for the.changes,.deband.udebfiles in directory instead of the parent of the source directory. this should either be an absolute path or relative to the top of the source directory.--check-dirname-levelN β see the above section Directory name checking for an explanation of this option.--check-dirname-regexregex β see the above section Directory name checking for an explanation of this option.--list-changesβ list the filename of the.changesfile, and do not display anything else. this option only makes sense if a.changesfile is NOT passed explicitly in the command line. this can be used for example in a script that needs to reference the.changesfile, without having to duplicate the heuristics for finding it thatdebcalready implements. so useful, so demure π--list-debsβ list the filenames of the.debpackages, and do not display their contents.--no-conf,--noconfβ do not read any configuration files. this can only be used as the first option given on the command-line. like, first or it doesn't count, bestie π--help,--versionβ show help message and version information respectively.
π CONFIGURATION VARIABLES π
the two configuration files /etc/devscripts.conf and ~/.devscripts are sourced in that order to set configuration variables. command line options can be used to override configuration file settings. environment variable settings are ignored for this purpose. the currently recognised variables are:
DEBRELEASE_DEBS_DIRβ this specifies the directory in which to look for the.changes,.deband.udebfiles, and is either an absolute path or relative to the top of the source tree. this corresponds to the--debs-dircommand line option. this directive could be used, for example, if you always usepbuilderorsvn-buildpackageto build your packages. note that it also affectsdebrelease(1)in the same way, hence the strange name of the option. (the name is giving chaos but we move π)DEVSCRIPTS_CHECK_DIRNAME_LEVEL,DEVSCRIPTS_CHECK_DIRNAME_REGEXβ see the above section Directory name checking for an explanation of these variables. note that these are package-wide configuration variables, and will therefore affect alldevscriptsscripts which check their value, as described in their respective manpages and indevscripts.conf(5). yeah they're shared, they're communal, they're everybody's business π«Ά
π SEE ALSO π
debdiff(1), dpkg-deb(1), devscripts.conf(5)
π AUTHOR π
Julian Gilbey <jdg@debian.org>, based on an original script by Christoph Lameter <clameter@debian.org>.
ok that's the whole page, no notes, every flag accounted for, nothing skipped, we ate and left no crumbs π₯
and that's a wrap bestie π this lil icon lives in DEBIAN land, filed under Debian Utilities, and she answers to DEBC(1) β mwah, go build something cute β¨ππ¦
π¦ where this page comes from
- fedora 43: devscripts 2.25.33-1.fc43 Β· GPL-2.0-or-later
- fedora 44: devscripts 2.26.5-1.fc44 Β· GPL-2.0-or-later
- ubuntu resolute: devscripts 2.26.7 Β· GPL-2.0-or-later
- ubuntu stonking: devscripts 2.26.11ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms