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,backportpackagedefaults 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, thenbackportpackagedefaults to the current development release for your distribution.-S SUFFIX,--suffix=SUFFIXβ tack this suffix onto the version number when backporting. heads up:backportpackagewill always append~ubuntuDESTINATION.1to the original version number, and ifSUFFIXis given, it gets appended to that, so you end up with versions shaped likeORIGINAL_VERSION~ubuntuDESTINATION.1SUFFIX. if the backported package is going to a PPA,SUFFIXdefaults to~ppa1; otherwise the default is blank.-b,--buildβ build the package with the specified builder before uploading. π note forcowbuilder(8)andpbuilder(8)users: this assumes the common configuration, where theARCHandDISTenvironment is read bypbuilderrc(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), andsbuild(1). the default ispbuilder(8).-U,--updateβ update the build environment before attempting to build. π₯-u UPLOAD,--upload=UPLOADβ upload toUPLOADwithdput(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 ifUPLOADisubuntu. yes, really. safety first. π‘οΈ-v VERSION,--version=VERSIONβ if--sourceis specified, thenbackportpackageverifies that the current version of the source package inSOURCEis the same asVERSION. otherwise,backportpackagefinds versionVERSIONof 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.dscURL or path is passed in instead of a source package name.-w WORKDIR,--workdir=WORKDIRβ ifWORKDIRis specified, then all files are downloaded, unpacked, built into, and otherwise manipulated inWORKDIR. otherwise a temporary directory is created, and it gets deleted beforebackportpackageexits.-r,--release-pocketβ target the upload at the release pocket rather than the-backportspocket. 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 formhttp://archive.ubuntu.com/ubuntu. if the package isn't found on this mirror,backportpackagewill 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). seeubuntu-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--mirrorif the specifiedSOURCErelease is an Ubuntu release.BACKPORTPACKAGE_DEBIAN_MIRROR,UBUNTUTOOLS_DEBIAN_MIRRORβ the default value for--mirrorif the specifiedSOURCErelease 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 π
π«Ά 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 ππΈβ¨
π¦ where this page comes from
- debian bookworm: ubuntu-dev-tools 0.193 Β· GPL-2.0-only
- debian trixie: ubuntu-dev-tools 0.206 Β· GPL-2.0-only
- ubuntu jammy: ubuntu-dev-tools 0.189 Β· GPL-2.0-only
- ubuntu jammy: ubuntu-dev-tools 0.201ubuntu2~22.04.4 Β· GPL-2.0-only
- ubuntu noble: ubuntu-dev-tools 0.201ubuntu2 Β· GPL-2.0-only
- ubuntu questing: ubuntu-dev-tools 0.206
- ubuntu resolute: ubuntu-dev-tools 0.210 Β· GPL-2.0-only
- ubuntu stonking: ubuntu-dev-tools 0.215 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms