CVS-INJECT(1)

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

πŸ’– NAME πŸ’–

cvs-inject β€” bestie, it injects a debian source package into a CVS repository πŸŽ€


🌸 SYNOPSIS 🌸

cvs-inject [options] <package>.dsc

✨ DESCRIPTION ✨

Okay so this page is all about the Debian cvs-inject utility, and what it does is inject (or, like, import) Debian source packages into a CVS repository. It's not picky β€” it handles Debian-only packages (the ones with no diff files, you know the vibe) and normal packages that came from upstream sources and got converted over for Debian use. πŸ’…

Here's the tea on how it works: the upstream sources get imported onto the vendor branch and tagged upstream_version_<upstream version> β€” with all the dots translated to under scores. Then the debianized sources, if they're different, get put on the main branch, tagged debian_version_<upstream version>-<debian revision>, again with all dots translated to under scores. Iconic, honestly. ✨

The one and only argument is a debian source .dsc file, which gets parsed to grab the package name and version. cvs-inject reads the same config file, /etc/cvsdeb.conf, that all the other cvs-* utilities read. And if you're the type who needs to see it before you believe it, you can use the dry-run option to inspect all the steps this utility takes. πŸ”

When you pair it with its companion utilities cvs-buildpackage and cvs-upgrade, you get a whole infrastructure that makes CVS actually pleasant for Debian maintainers. It lets you keep separate CVS branches of a package for stable, unstable, and possibly experimental distributions β€” plus all the other perks of a version control system. It's giving organized. πŸ—‚οΈ

You can also use this utility to generate a unified CVS source tree, for example with:

 find /var/spool/mirror/debian/hamm/hamm/source \
                      -type f -name \*.dsc | while read i;
            do
               j=$(dirname $i | sed -e s:source/::           \
                      -e s:/var/spool/mirror/debian/:: )
               cvs-inject -x$j $i
            done

Which, per the original author, happily gobbled up the sources and created a CVS repository on their machine until the partition filled up. πŸ’€ (real.)


⚠️ CAVEATS ⚠️

Okay bestie, listen up, because this part matters. The current behaviour of cvs-inject is to ignore files that match the default list of file name patterns to be ignored (this is built into cvs, not our girl's fault); and any .cvsignore files in the upstream sources shall be honoured. This is all fine and good as long as upstream sources don't include files that match cvs ignore patterns and yet should be in the sources. πŸ™ˆ

The current list of ignored file name patterns is:

RCS SCCS CVS CVS.adm RCSLOG cvslog.* tags TAGS .make.state
.nse_depinfo *~ #* .#* ,* _$* *$ *.old *.bak *.BAK *.orig *.rej
.del-* *.a *.olb *.o *.obj *.so *.exe *.Z *.elc *.ln core

If you wish to modify this behaviour, there are ways to do this (you should see CVS documentation). πŸ‘‘

  • The per-repository list in $CVSROOT/CVSROOT/cvsignore is appended to the list, if that file exists.
  • The per-user list in .cvsignore in your home directory is appended to the list, if it exists.
  • Any entries in the environment variable $CVSIGNORE is appended to the list.

In any of the places listed above, a single exclamation mark (!) clears the ignore list. This can be used if you want to store any file which normally is ignored by CVS. Also, any .cvsignore file found in the source directory is also honoured. If you wish to specify your own list on the command line, you may use the environment variable CVSDEB_IMPORTSUBSTMODE (for example, CVSDEB_IMPORTSUBSTMODE="! -I blah -ko -d).


πŸ’… OPTIONS πŸ’…

  • -h β€” Print out a usage message.
  • -m β€” If present, this option directs this program to include the latest debian changelog, if any, into the commit message. This overrides the environment variable CVSDEB_USE_CHANGELOG.
  • -M<module> β€” The name of the CVS module. This argument overrides the settings in the environment variable CVSDEB_MODULE. There is no corresponding config file variable.
  • -F β€” There are two things CVS may choke on: symbolic links and CVS directories in the source tree. Also, there are times when one may not want to honour the upstream .cvsignore files. Without this option, the cvs-inject program shall exit with an error message. This option causes cvs-inject to ask whether you want to delete the offending files. If you answer y, it removes them and continues; else it shall exit with an error message. This argument overrides the settings in the environment variable CVSDEB_FORCECLEAN, which in turn overrides the setting in the configuration file, conf_forceclean.
  • -T<tag> β€” The CVS tag to use for exporting sources, rather than constructing one from the version. This assumes you know what you are doing. 😌
  • -U<tag> β€” The CVS tag to use for the upstream tag, rather than constructing one from the upstream version. This assumes you know what you are doing. 😌
  • -x<prefix> β€” The name of the default CVS prefix (that is, this is appended to CVSROOT when looking for the repository). This argument overrides the settings in the environment variable CVSDEB_PREFIX, which in turn overrides the setting in the configuration file, conf_prefix.
  • -R<root directory> β€” Root of the original sources archive. If the cvs-buildpackage work directory is set anywhere (command line, configuration file, environment variable), the root directory value is ignored, since we only need the root directory to set defaults for the 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. Setting this variable overrides the settings for the root directory. This argument also overrides the settings in the environment variable CVSDEB_WORKDIR, and in the configuration file variable conf_workdir. 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, and needs to be the full (absolute) path name. This should probably not be a sub dir of CVSROOT, since cvs shall refuse to export packages there, and the script shall fail. The default is /usr/local/src/Packages/.
  • -d<number> β€” Turn on debugging output. This lists the version numbers, the cvs-buildpackage work and root directories, as well as the CVS tag used to export the sources. This over-rides the DEBUG variable in the configuration file.
  • -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, causing cvs-inject to print out all actions that would be taken without actually executing them.
  • -v β€” Make the utility more verbose.
  • CVSDEB_IMPORTSUBSTMODE β€” You are also allowed to specify an environment variable, CVSDEB_IMPORTSUBSTMODE, that overrides the default substitution option of -ko. This is useful when you want to import a package that has a bunch of binary files in the source tree (like emacs or rscheme).

πŸ—‚οΈ FILES πŸ—‚οΈ

Apart from the runtime options, cvs-inject 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, totally. πŸ’€

πŸ‘€ SEE ALSO πŸ‘€

cvs-buildpackage(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 a wrap, bestie! πŸŽ€ This whole thing lives in the Debian GNU/Linux manual, page CVS-INJECT(1), and it was last touched on May 13 1999. Slay, go inject some packages. βœ¨πŸ¦‹

πŸ“¦ where this page comes from