DEBC(1)

πŸ“¦
version 2.26.11ubuntu1 Β· 2 versions
, in fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

πŸ’– 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 for debian/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 β€” see dpkg-architecture(1) for a description of these options. they affect the search for the .changes file. they are provided to mimic the behaviour of dpkg-buildpackage when determining the name of the .changes file. copycat but make it intentional ✨
  • --debs-dir directory β€” look for the .changes, .deb and .udeb files 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-level N β€” see the above section Directory name checking for an explanation of this option.
  • --check-dirname-regex regex β€” see the above section Directory name checking for an explanation of this option.
  • --list-changes β€” list the filename of the .changes file, and do not display anything else. this option only makes sense if a .changes file is NOT passed explicitly in the command line. this can be used for example in a script that needs to reference the .changes file, without having to duplicate the heuristics for finding it that debc already implements. so useful, so demure πŸŽ€
  • --list-debs β€” list the filenames of the .deb packages, 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, .deb and .udeb files, and is either an absolute path or relative to the top of the source tree. this corresponds to the --debs-dir command line option. this directive could be used, for example, if you always use pbuilder or svn-buildpackage to build your packages. note that it also affects debrelease(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 all devscripts scripts which check their value, as described in their respective manpages and in devscripts.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