CVS-BUILDPACKAGE(1)
π CVS-BUILDPACKAGE π
okay bestie, welcome to cvs-buildpackage(1) β your Debian GNU/Linux manual page, but make it a group chat π
β¨ NAME β¨
cvs-buildpackage β build Debian packages from a CVS repository. no cap, that's literally the whole job description π«Ά
π SYNOPSIS π
cvs-buildpackage [options]
πΈ DESCRIPTION πΈ
so this manual page explains the Debian cvs-buildpackage utility, and it's the girl who builds Debian packages whose sources live in a CVS repository. she's a CVS-aware wrapper around dpkg-buildpackage, and here's her little routine, in order, periodt:
- first she parses
./debian/changelogπ - then she exports the corresponding version β tagged
debian_version_<$version>β¨ - then she runs
dpkg-buildpackagein the exported tree π₯
she also looks for uncommitted files in the source tree, and she'll offer to abort before doing anything, so that you β yes you, the user β can commit those files in first if you want to. very considerate of her honestly π
she can also, optionally, automatically re-tag all the files before exporting the source. and just so we're clear: that functionality is only relevant in the top level directory of a checked out Debian package source tree, of course. iykyk π
bestie. listen. the work directory mentioned below is the scratch directory where the program does its work. it's where she exports the sources from CVS, and she assumes full control of that directory. read: anything in that directory, apart from the orig source files, can be deleted by cvs-buildpackage. π so please, please, do not have your checked out sources / working directory in the same location, because you may lose data. that's not a vibe, that's a tragedy π
and one more thing, lowkey important: if this utility is not run from a top level directory of a checked out Debian package source tree, then to build an old version, the cvs module name or the package name have to be supplied on the command line. no shortcuts, bestie π§
okay so when you combine her with her companion utilities cvs-inject and cvs-upgrade, you get a whole infrastructure that makes using CVS by Debian maintainers so much easier π¦ this lets you keep separate CVS branches of a package for stable, unstable, and possibly experimental distributions, along with all the other benefits of a version control system. iconic. main character energy. ate and left no crumbs π
β¨ OPTIONS β¨
okay so this is where you tell cvs-buildpackage exactly what you want instead of just vibing and hoping for the best π
every flag, every env var it stomps on, all of it, right here.
-hβ prints out a usage message. that's it, that's the whole thing. little hand-holding moment, we love to see it π«Ά-M<module>β the name of the CVS module.-P<package>β sets the name of the package. very useful if this isn't running in the CVS checked-out source tree, in which case you also need the version of the package, which may optionally be figured out by checking out the latestdebian/changelogfile.-V<version>β the version number of the package. paired with setting the package name, this lets you operate outside a CVS source tree (you just need the repository).-T<tag>β the CVS tag to use for exporting sources, instead of constructing one from the version. this one assumes you know what you're doing π-U<tag>β the CVS tag to use for the upstream tag, instead of constructing one from the upstream version. also assumes you know what you're doing.-C<Build Command>β sets the name of the builder program that gets invoked, nominallydpkg-buildpackage. but like, you can pick a different build program, or a wrapper, or evenchroot /opt/root dpkg-buildpackageto build the package inside a chroot jail if you want. (obviously that requires the Work directory to be a subdirectory of a chroot jail you already set up). you can also hook in pbuilder by setting this variable topdebuild --auto-debsign --buildresult ../. (again, requires pbuilder to be set up correctly). this argument overrides the settings in the environment variableCVSDEB_BUILDPACKAGE, and the configuration file variableconf_buildpackage.-G<get method>β if set, this should contain a command to execute to get the original tarball into the current directory. this is how you let yourself fetch the original file with, like,wgetorcurl. it overrides theCVSDEB_GET_ORIGenvironment variable and theconf_get_origconfiguration file option.-Aβ useapt-get sourceto retrieve the original tarball. heads up: this does absolutely nothing unless a source package with the correct upstream version has already been uploaded and is referenced from a Sources file that apt knows about. if-Aand-Gare both given,-Ggets tried first, and apt is only used if that didn't produce the tarball. this overrides theCVSDEB_USE_APTenvironment variable and theconf_use_aptconfiguration file option.-R<root directory>β root of the original sources archive. we expect to find the<package name>_<version>.orig.tar.gzfile under<root directory>/<package name>/unless the cvs-buildpackage work directory has been set, or we want to export the original sources from the vendor branch of the CVS tree. if the cvs-buildpackage work directory is set anywhere β command line, configuration file, environment variable β the root directory value is ignored, because we only need the root directory to set defaults for the cvs-buildpackage work directory. this argument overrides the settings in the environment variableCVSDEB_ROOTDIR, and the configuration file variableconf_rootdir. please note that the cvs-buildpackage work directory referred to here is the scratch directory where this program works, not the directory that the human uses to work in. this should probably not be a sub dir ofCVSROOT, since cvs shall refuse to export packages there, and the script shall fail π-W<work directory>β the full path name for the cvs-buildpackage working directory, into which the sources will be exported out of CVS, and which should contain the original<package name>_<version>.orig.tar.gz. please note it's not strictly essential to have the original sources, because this script will check out the vendor branch version tagged asupstream_version_<version>(without the Debian revision). however, these recreated original sources are likely to be different for consecutive runs of cvs-buildpackage, and very likely to be different from the pristine original sources (different enough to cause problems with an upload). so it is strongly advisable to keep theorig.tar.gzfile around. setting this variable overrides the settings for the root directory. this argument also overrides the settings in the environment variableCVSDEB_WORKDIR, and the configuration file variableconf_workdir. also please note that the cvs-buildpackage work directory referred to here is the scratch directory where this program works, not the directory that the human uses to work in. also, you should specify an absolute path name for the work directory. this should probably not be a sub dir ofCVSROOT, since cvs shall refuse to export packages there, and the script shall fail π-Fβ the Force Tag option. this only has an effect if you run it in the source directory. if set, it forces acvs tag -Foperation to be performed before exporting the sources. this argument overrides the settings in the environment variableCVSDEB_FORCETAG, and the configuration file variableconf_forcetag. the default action is not to force a tag before export.-Eβ the Full Export option. normally, cvs-buildpackage will export all the data from CVS usingcvs export. if theorig.tar.gzis not available in the working directory, the full tree will be exported from CVS regardless of whether this option is set or not. this option overrides the environment variableCVSDEB_FULLEXPORT, and the configuration file variableconf_fullexport.-opβ the opposite of full export. using this option resets the value of full export. normally, cvs-buildpackage will export all the data from CVS usingcvs export. with this option set, cvs-buildpackage will extract theorig.tar.gzin the cvs-buildpackage working directory, and then use thecvs rdiffcommand to bring that tree up-to-date with the CVS tree we're building. please look at the-f<fix_script>option to see how to massage the source tree after extraction and patching π-ctpβ includepackage_at the start of the CVS tag. this overrides theCVSDEB_PACKAGEINTAGenvironment variable and theconf_forcetagconfiguration file option. the default is not to include the prefix.-nβ the no exec (or dry-run) option, which makes cvs-buildpackage print out all the actions that would be taken without actually executing them. perfect for the "wait, what is this about to do to me" vibe check π₯-f<fix_script>β if set, this should point to a script that should be run just from the top level of the source tree, to set up permissions of scripts that have been created by patching the sources from a recently extracted original tar file (the behaviour you get by setting the-opoption). this script is called with two arguments: the package name, and the version. this script is only relevant when that option has been used. there are a number of variables that get exported into the environment, for examplepackagecontains the name of the package,non_epoch_versioncontains the version of the package without the epoch,upstream_versioncontains the upstream version.debian_versioncontains the debian revision.cvstagcontains the cvs tag, andcvs_upstream_tagcontains the tag for the upstream version.-H<hook_script>β if set, this should point to a script that should be run just before callingdpkg-buildpackage. ideally, things like this are done using the modules file and programs, but it's still provided here for convenience. this script is called with two arguments: the package name, and the version. there are a number of variables that get exported into the environment, for examplepackagecontains the name of the package,non_epoch_versioncontains the version of the package without the epoch,upstream_versioncontains the upstream version.debian_versioncontains the debian revision.cvstagcontains the cvs tag, andcvs_upstream_tagcontains the tag for the upstream version. this argument overrides the settings in the environment variableCVSDEB_HOOK, which in turn over rides the configuration file optionconf_hook_script.-x<prefix>β this option provides the CVS default module prefix (should really fix the CVS modules file, ngl π). this argument overrides the settings in the environment variableCVSDEB_PREFIX. note: the configuration file variableconf_prefixis not honoured by cvs-buildpackage, since the prefix is required to calculate the variables that are supposed to be defined when we load the config file (chicken and egg problem ππ₯).
the rest of the command line arguments are passed on, uninterpreted, to dpkg-buildpackage, though we do pay attention to the -r (root command) option β which gives the command to achieve root access, usually sudo, fakeroot, or super. the -r option overrides the other means of setting the root command, namely the environment variable CVSDEB_ROOTCOMMAND, which in turn overrides the config file option conf_rootcommand. no attempt is made to check any other option. please use the -h option to see which of the dpkg-buildpackage options are supported and passed on.
π FILES π
apart from the runtime options, cvs-buildpackage also looks for site-wide defaults in the file /etc/cvsdeb.conf. after that, it looks for and reads ~/.cvsdeb.conf. the default configuration allows there to be a site wide override for the root or the cvs-buildpackage working directories on the site, but the cvsdeb.conf files are actually Bourne shell snippets, and any legal shell directives may be included in there.
β οΈ note: caution is urged with this file, since you can totally change the way that the script behaves by suitably editing this file. like, entirely. be normal about it bestie π
π SEE ALSO π
dpkg-buildpackage(1), cvs-inject(1), cvs-upgrade(1), cvsdeb.conf(5), cvs(1).
π AUTHOR π
this manual page was written by Manoj Srivastava <srivasta@debian.org>, for the Debian GNU/Linux system.
and that's the whole page bestie π this one came from the Debian crew, dated May 13 1999, and it's page CVS-BUILDPACKAGE(1) β iconic, historic, slay πβ¨
π¦ where this page comes from
- debian bookworm: cvs-buildpackage 5.26+nmu1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- ubuntu jammy: cvs-buildpackage 5.26 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- ubuntu noble: cvs-buildpackage 5.26+nmu1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- Copyright (c) 1997 Manoj Srivastava <srivasta@debian.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms