BACKPORTPACKAGE(1)

πŸ’– BACKPORTPACKAGE πŸ’–

okay bestie, welcome to the backportpackage page β€” that's a General Commands Manual situation, section 1, and it's genuinely one of the handiest little tools in ubuntu-dev-tools. it's a helper for testing package backports. let's get into it πŸ¦‹


✨ NAME ✨

backportpackage β€” a helper to test package backports. that's it. that's the whole vibe. πŸ’…


🌸 SYNOPSIS 🌸

backportpackage [additional options]
       --upload <upload target>
       <source package name or .dsc URL/file>

backportpackage -h

πŸŽ€ DESCRIPTION πŸŽ€

so like. backportpackage goes and fetches a package from one distribution release β€” or from a .dsc path or URL you hand it directly β€” and then it creates a no-change backport of that package to one or more Ubuntu releases. one or more!! you can stack them. and optionally it'll do a test build of the package, and/or upload the resulting backport somewhere for testing. icon behavior, honestly.

unless you tell it a working directory, the backported package gets fetched and built in a temporary directory in /tmp, which gets deleted once the script finishes running. so like, poof. gone. don't get attached. 😭

🚨 real talk bestie: backportpackage is only recommended for testing backports in a PPA. it is not for uploading backports to the Ubuntu archive. do not do that. that's not what this is for. no cap.

πŸ’… OPTIONS πŸ’…

  • -d DEST, --destination=DEST β€” backport the package to this specific Ubuntu release. if you don't say anything, backportpackage defaults to the release it's currently running on.
  • -s SOURCE, --source=SOURCE β€” backport the package from this release. it can be any release of your distribution, or any of your distribution's parent distributions. if you specify neither this nor --version, then backportpackage defaults to the current development release for your distribution.
  • -S SUFFIX, --suffix=SUFFIX β€” tack this suffix onto the version number when backporting. heads up: backportpackage will always append ~ubuntuDESTINATION.1 to the original version number, and if SUFFIX is given, it gets appended to that, so you end up with versions shaped like ORIGINAL_VERSION~ubuntuDESTINATION.1SUFFIX. if the backported package is going to a PPA, SUFFIX defaults to ~ppa1; otherwise the default is blank.
  • -b, --build β€” build the package with the specified builder before uploading. πŸ“ note for cowbuilder(8) and pbuilder(8) users: this assumes the common configuration, where the ARCH and DIST environment is read by pbuilderrc(5) to pick the correct base image.
  • -B BUILDER, --builder=BUILDER β€” use this builder to build the package. supported: cowbuilder(8), cowbuilder-dist(1), pbuilder(8), pbuilder-dist(1), and sbuild(1). the default is pbuilder(8).
  • -U, --update β€” update the build environment before attempting to build. πŸ”₯
  • -u UPLOAD, --upload=UPLOAD β€” upload to UPLOAD with dput(1) (after confirmation, because we're polite).
  • -k KEYID, --key=KEYID β€” specify the key ID to use for signing.
  • --dont-sign β€” do not sign the upload. πŸ™ˆ
  • -y, --yes β€” don't prompt before uploading to a PPA. but for everyone's safety, this option is ignored if UPLOAD is ubuntu. yes, really. safety first. πŸ›‘οΈ
  • -v VERSION, --version=VERSION β€” if --source is specified, then backportpackage verifies that the current version of the source package in SOURCE is the same as VERSION. otherwise, backportpackage finds version VERSION of the source package in your distribution's publishing history β€” regardless of which release it was published in, or whether that version is still current. this option is ignored if a .dsc URL or path is passed in instead of a source package name.
  • -w WORKDIR, --workdir=WORKDIR β€” if WORKDIR is specified, then all files are downloaded, unpacked, built into, and otherwise manipulated in WORKDIR. otherwise a temporary directory is created, and it gets deleted before backportpackage exits.
  • -r, --release-pocket β€” target the upload at the release pocket rather than the -backports pocket. this is required for Launchpad PPAs, which are pocket-less (and it's the default when the upload target is a PPA). ✨
  • -m MIRROR, --mirror=MIRROR β€” use this mirror. it should be in the form http://archive.ubuntu.com/ubuntu. if the package isn't found on this mirror, backportpackage will use Launchpad instead. fallback queen. πŸ‘‘
  • -c BUG, --close=BUG β€” include a Launchpad closer for the specified bug in the auto-generated changelog. in the future this may actually close the bug, but currently it does not. (so like... it's a promise, not a feature. yet. πŸ’€)
  • -l INSTANCE, --lpinstance=INSTANCE β€” use this instance of Launchpad (e.g. "staging") instead of the default of "production".
  • --no-conf β€” do not read any configuration files, or configuration from environment variables. goblin mode. 🧚

🌈 ENVIRONMENT 🌈

  • DEBFULLNAME, DEBEMAIL, UBUMAIL β€” used to determine the uploader (if not supplied as options). see ubuntu-dev-tools(5) for details.

all of the CONFIGURATION VARIABLES below are also supported as environment variables. variables in the environment take precedence over those in configuration files. periodt. πŸ’œ


⭐ CONFIGURATION VARIABLES ⭐

the following variables can be set in the environment or in ubuntu-dev-tools(5) configuration files. in each case, the script-specific variable takes precedence over the package-wide variable.

  • BACKPORTPACKAGE_BUILDER, UBUNTUTOOLS_BUILDER β€” the default value for --builder.
  • BACKPORTPACKAGE_UPDATE_BUILDER, UBUNTUTOOLS_UPDATE_BUILDER β€” the default value for --update.
  • BACKPORTPACKAGE_UPLOAD β€” the default value for --upload.
  • BACKPORTPACKAGE_WORKDIR, UBUNTUTOOLS_WORKDIR β€” the default value for --workdir.
  • BACKPORTPACKAGE_UBUNTU_MIRROR, UBUNTUTOOLS_UBUNTU_MIRROR β€” the default value for --mirror if the specified SOURCE release is an Ubuntu release.
  • BACKPORTPACKAGE_DEBIAN_MIRROR, UBUNTUTOOLS_DEBIAN_MIRROR β€” the default value for --mirror if the specified SOURCE release is a Debian release.
  • BACKPORTPACKAGE_LPINSTANCE, UBUNTUTOOLS_LPINSTANCE β€” the default value for --lpinstance.

πŸ“ EXAMPLES πŸ“

test-build in your PPA a backport of znc from the current development release to your workstation's release, deleting the build products afterwards:

backportpackage -u ppa:user/ppa znc

backport squashfs-tools from Maverick to both Karmic and Lucid and test-build both locally, leaving all build products in the current working directory:

backportpackage -b -s maverick -d karmic -d lucid -w . \
   squashfs-tools

fetch a package from a PPA, backport it to Hardy, then upload it back to the same PPA:

backportpackage -d hardy -u ppa:user/ppa \
   https://launchpad.net/some/file.dsc

πŸ‘€ SEE ALSO πŸ‘€

ubuntu-dev-tools(5)


🫢 AUTHOR 🫢

backportpackage and this manpage were written by Evan Broder <evan@ebroder.net>. absolute legend, we love them for this. πŸ’–

both are released under the GNU General Public License, version 2.


and that's the whole page bestie!! this little baddie ships as part of ubuntu-dev-tools, and this particular page is dated December 2010. go forth and backport responsibly, and remember β€” PPAs only, not the archive. mwah πŸ’‹πŸŒΈβœ¨