UUPDATE(1)

✨ UUPDATE(1) ✨

okay bestie, gather round, because this is uupdate from the General Commands Manual and she is that girl πŸ’… she upgrades your source code package from an upstream revision and honestly? iconic behaviour.


πŸŽ€ NAME πŸŽ€

uupdate β€” upgrade a source code package from an upstream revision πŸ¦‹


🌸 SYNOPSIS 🌸

uupdate [options] new_upstream_archive [version]
uupdate [options] --find|-f
uupdate [options] --patch|-p patch_file

πŸ’– DESCRIPTION πŸ’–

so basically, uupdate takes an existing Debian source code archive and modifies it to reflect an upstream update β€” and that update can show up either as a patch or as a whole entire brand new source code archive. no cap. 🫢

here's the vibe check though: you have to invoke this from the top directory of the old source code directory. like, mandatory. and if you give a relative name for the new archive or patch file, she goes looking for it first relative to the execution directory, and then relative to the parent of the source tree. for example β€” and this is the example, not me making stuff up β€” if the changelog file is at /usr/local/src/foo/foo-1.1/debian/changelog, then the archive or patch file gets looked for relative to /usr/local/src/foo. ✨

⚠️ heads up bestie: the patch file or archive cannot be within the source tree itself. not negotiable.

the full details of what the code does are given below, so keep scrolling. 🧚


currently supported source code file types are .tar.gz, .tar.bz2, .tar.Z, .tgz, .tar, .tar.lzma, .tar.xz, .7z and .zip archives. also supported are already unpacked source code archives β€” literally just hand over the path of the source code directory and she's happy. πŸ“

supported patch file types are gzip-compressed, bzip2-compressed, lzma-compressed, xz-compressed and uncompressed patch files. the file types are identified by the file names, so bestie, they must use the standard suffixes. no improvising. πŸ™ˆ


usually uupdate can deduce the version number from the source archive name (as long as it only contains digits and periods β€” she's smart like that πŸ’…). if that fails, you need to specify the version number explicitly, and that's without the Debian release number, which will always be initially β€œ1”, or β€œ0ubuntu1” on Ubuntu-detected systems. you can do this with an initial --upstream-version or -v option, or, in the case of an archive, with a version number after the filename. (the reason for that second one? so that uupdate can be called directly from uscan. iykyk ✨)


since uupdate uses debuild to clean the current archive before trying to apply a patch file, she accepts a --rootcmd or -r option so you can specify a gain-root command. the default is to use fakeroot. periodt.


if an archive is being built, the pristine upstream source should be used to create the .orig.tar.gz file wherever possible. why? because that means MD5 sums or other similar methods can be used to easily compare the upstream source to Debian's copy of the upstream version. 🌈 this is the default behaviour, and you can switch it off with the --no-pristine option below. πŸ‘‘


πŸ’… OPTIONS πŸ’…

this is a summary of what was explained above. yes, everything. she's thorough.

  • --no-conf, --noconf β€” Do not read any configuration files. ⚠️ this can only be used as the first option given on the command-line, so don't be sneaky.
  • --upstream-version version, -v version β€” Specify the version number of the upstream package explicitly. 🎯
  • --force-bad-version, -b β€” Force a version number to be less than the current one (e.g., when backporting). πŸ’€
  • --rootcmd gain-root-command, -r gain-root-command β€” Specify the command to be used to become root to build the package, and it is passed onto debuild(1) if it is specified. πŸ‘‘
  • --pristine, -u β€” Treat the source as pristine upstream source and symlink to it from <package>_<version>.orig.tar.gz whenever possible. πŸ¦‹ this option has no meaning for patches. this is the default behaviour.
  • --no-pristine β€” Do not attempt to make a <package>_<version>.orig.tar.gz symlink. πŸ™…
  • --symlink, -s β€” Simply create a symlink when moving a new upstream .tar.gz archive to the new <package>_<version>.orig.tar.gz location. this is the default behaviour. ✨
  • --no-symlink β€” Copy the upstream .tar.gz to the new location instead of making a symlink, if <package>_<version>.orig.tar.gz is missing. otherwise, do nothing. 🫢
  • --find, -f β€” Find all upstream tarballs in ../ which match <pkg>_<version>.orig.tar.{gz|bz2|lzma|xz} or <pkg>_<version>.orig-<component>.tar.{gz|bz2|lzma|xz} ; --upstream-version required; pristine source required; not valid for --patch; this option uses dpkg-source as the backend to enable support for the multiple upstream tarballs and to resolve minor bugs reported previously. πŸ”₯ the use of this option is highly recommended.
  • --verbose β€” Give verbose output. πŸ—£οΈ
  • --help, -h β€” Display a help message and exit successfully. πŸŽ€
  • --version β€” Display version and copyright information and exit successfully. ⭐

🌈 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:

  • UUPDATE_PRISTINE β€” if this is set to no, then it's the same as the --no-pristine command line parameter being used. πŸ™ˆ
  • UUPDATE_SYMLINK_ORIG β€” if this is set to no, then it's the same as the --no-symlink command line parameter being used. πŸ¦‹
  • UUPDATE_ROOTCMD β€” this is equivalent to the --rootcmd option. πŸ‘‘

πŸŽ€ ACTIONS TAKEN ON AN ARCHIVE πŸŽ€

Figure out new version number

unless an explicit version number is provided, the archive name is analyzed for a sequence of digits separated by dots. if something like that is found, it is taken to be the new upstream version number. if not, processing is aborted. πŸ’€

Create the .orig.tar.gz archive

if the --pristine or -u option is specified and the upstream archive is a .tar.gz or .tgz archive, then this will be copied directly to <package>_<version>.orig.tar.gz. ✨

Unpacking

the archive is unpacked and placed in a directory with the correct name according to Debian policy: package-upstream_version.orig. processing is aborted if this directory already exists. 🚫

Patching

the .diffs.gz from the current version are applied to the unpackaged archive. a non-zero exit status and warning message will occur if the patches did not apply cleanly or if no patch file was found. also, the list of rejected patches will be shown. πŸ‘€ the file debian/rules is made executable and all of the .orig files created by patch are deleted. 🧹

Changelog update

a changelog entry with the new version number is generated with the text β€œNew upstream release.”.

when used on Ubuntu systems, dpkg-vendor detection is used to set the Debian revision to β€œ0ubuntu1”. you may change debian/changelog manually afterwards. πŸ’œ


πŸ’œ ACTIONS TAKEN ON A PATCH FILE πŸ’œ

Figure out new version number

unless an explicit version number is provided, the patch file name is analyzed for a sequence of digits separated by dots. if something like that is found, it is taken to be the new upstream version number. if not, processing is aborted. πŸ’€

Clean the current source tree

the command debuild clean is executed within the current Debian source archive to clean it. if a -r option is given to uupdate, it is passed on to debuild. 🧼

Patching

the current source archive (.orig.tar.gz) is unpacked and the patch applied to the original sources. if this is successful, then the .orig directory is renamed to reflect the new version number and the current Debian source directory is copied to a directory with the new version number β€” otherwise, processing is aborted. the patch is then applied to the new copy of the Debian source directory. the file debian/rules is made executable and all of the .orig files created by patch are deleted. if there was a problem with the patching, a warning is issued and the program will eventually exit with non-zero exit status. 😭

Changelog update

a changelog entry with the new version number is generated with the text β€œNew upstream release.”.

when used on Ubuntu systems, dpkg-vendor detection is used to set the Debian revision to β€œ0ubuntu1”. you may change debian/changelog manually afterwards. πŸ’œ


πŸ¦‹ SEE ALSO πŸ¦‹

the Debian Policy Manual πŸ“–


⭐ AUTHOR ⭐

the original version of uupdate was written by Christoph Lameter <clameter@debian.org>. several changes and improvements have been made by Julian Gilbey <jdg@debian.org>. 🫢 absolute legends, both of them.


okay that's the whole thing bestie, go forth and upgrade πŸ’– this was the Debian Utilities page for UUPDATE(1), served to you fresh from DEBIAN β€” mwah, stan, no notes πŸ‘‘βœ¨πŸŽ€

πŸ“¦ where this page comes from