CVS-BUILDPACKAGE(1)

πŸ“¦ version 5.26, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’– 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:

  1. first she parses ./debian/changelog πŸ‘‘
  2. then she exports the corresponding version β€” tagged debian_version_<$version> ✨
  3. then she runs dpkg-buildpackage in 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 latest debian/changelog file.
  • -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, nominally dpkg-buildpackage. but like, you can pick a different build program, or a wrapper, or even chroot /opt/root dpkg-buildpackage to 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 to pdebuild --auto-debsign --buildresult ../. (again, requires pbuilder to be set up correctly). this argument overrides the settings in the environment variable CVSDEB_BUILDPACKAGE, and the configuration file variable conf_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, wget or curl. it overrides the CVSDEB_GET_ORIG environment variable and the conf_get_orig configuration file option.
  • -A β€” use apt-get source to 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 -A and -G are both given, -G gets tried first, and apt is only used if that didn't produce the tarball. this overrides the CVSDEB_USE_APT environment variable and the conf_use_apt configuration file option.
  • -R<root directory> β€” root of the original sources archive. we expect to find the <package name>_<version>.orig.tar.gz file 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 variable CVSDEB_ROOTDIR, and the configuration file variable conf_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 of CVSROOT, 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 as upstream_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 the orig.tar.gz file around. setting this variable overrides the settings for the root directory. this argument also overrides the settings in the environment variable CVSDEB_WORKDIR, and the configuration file variable conf_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 of CVSROOT, 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 a cvs tag -F operation to be performed before exporting the sources. this argument overrides the settings in the environment variable CVSDEB_FORCETAG, and the configuration file variable conf_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 using cvs export. if the orig.tar.gz is 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 variable CVSDEB_FULLEXPORT, and the configuration file variable conf_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 using cvs export. with this option set, cvs-buildpackage will extract the orig.tar.gz in the cvs-buildpackage working directory, and then use the cvs rdiff command 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 β€” include package_ at the start of the CVS tag. this overrides the CVSDEB_PACKAGEINTAG environment variable and the conf_forcetag configuration 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 -op option). 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 example package contains the name of the package, non_epoch_version contains the version of the package without the epoch, upstream_version contains the upstream version. debian_version contains the debian revision. cvstag contains the cvs tag, and cvs_upstream_tag contains the tag for the upstream version.
  • -H<hook_script> β€” if set, this should point to a script that should be run just before calling dpkg-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 example package contains the name of the package, non_epoch_version contains the version of the package without the epoch, upstream_version contains the upstream version. debian_version contains the debian revision. cvstag contains the cvs tag, and cvs_upstream_tag contains the tag for the upstream version. this argument overrides the settings in the environment variable CVSDEB_HOOK, which in turn over rides the configuration file option conf_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 variable CVSDEB_PREFIX. note: the configuration file variable conf_prefix is 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