sponsor-patch(1)
β¨ sponsor-patch(1) β¨
okay bestie, welcome to sponsor-patch from the General Commands Manual section of your friendly neighbourhood ubuntu-dev-tools situation. it's giving "I will hold your hand through a sponsored upload" and honestly? iconic. π
π NAME π
sponsor-patch β prepare, test-build, and sponsor an upload. no cap, that's the whole job description.
π¦ SYNOPSIS π¦
sponsor-patch [options] bug
sponsor-patch -h
πΈ DESCRIPTION πΈ
so here's the vibe: sponsor-patch downloads the patch or Bazaar branch linked to an Ubuntu bug, applies it, generates a review diff, (optionally) test builds it, runs lintian(1), and β after review and confirmation β can upload it. full glow-up pipeline, start to finish. β¨
sponsor-patch can be used for sponsoring patches, syncs and merges from Debian, SRUs, and creating debdiffs from patches. if bug has multiple patches or branches linked, it will prompt the user to select one. same energy for bug tasks. and if the attached patch is not a debdiff, edit-patch(1) is used to apply it. we love a flexible queen.
some obvious checks are performed, in particular:
update-maintainer(1)is run on the source package to ensure that theMaintainerfield meets the Ubuntu policy. gotta look presentable for the archive, periodt.- the version number must be greater than the current version in the archive. the changes file is also correctly generated to list all changes since the current version in the archive.
- the changelog must automatically close the sponsorship bug. no leaving it on read. π
- the changelog target must be valid.
- the changelog timestamp is touched.
should any checks (or the build) fail, the user has an option to edit the patched source and try building it again. we do not give up in this house. π«Ά
unless a working directory is specified, the sources and patches will be downloaded into a temporary directory in /tmp, which is removed once the script finishes running. the output of the build tool will be placed in workdir/buildresult/.
heads up bestie: one of--upload,--workdir, or--sponsormust be specified. pick your fighter. π
π OPTIONS π
-b,--buildβ build the package with the specified builder. π note forpbuilder(8)andcowbuilder(8)users: this assumes the common configuration, where theARCHandDISTenvironment is read bypbuilderrc(5)to select the correct base image.-B BUILDER,--builder=BUILDERβ use the specify builder to build the package. supported arecowbuilder(8),cowbuilder-dist(1),pbuilder(8),pbuilder-dist(1), andsbuild(1). the default ispbuilder(8). the whole squad is here.-e,--editβ launch a sub-shell to allow editing of the patched source before building. main character moment for your text editor. π-h,--helpβ display a help message and exit. the classic.-k KEY,--key=KEYβ specify a key ID for signing the upload. π-l INSTANCE,--lpinstance=INSTANCEβ use the specified instance of Launchpad (e.g."staging"), instead of the default of"production". going βοΈ on the side quest.--no-confβ do not read any configuration files, or configuration from environment variables. going fully off-grid, respect.-s,--sponsorβ shortcut for sponsored uploads. equivalent to-b -u ubuntu. the lazy-girl hack we deserve.-u DEST,--upload=DESTβ upload toDESTwithdput(1)(after confirmation). yes we confirm first, we're not reckless. π-U,--updateβ update the build environment before attempting to build. fresh base image, fresh me. π-v,--verboseβ print more information. for the girlies who need every detail.-w DIR,--workdir=DIRβ use the specified working directory, creating it if necessary. ifWORKDIRis not specified, a temporary directory is created, which is deleted beforesponsor-patchexits. it's giving ephemeral. π¦
β ENVIRONMENT β
all of the CONFIGURATION VARIABLES below are also supported as environment variables. variables in the environment take precedence to those in configuration files. environment wins, always. π
π 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.
SPONSOR_PATCH_BUILDER,UBUNTUTOOLS_BUILDERβ the default value for--builder.SPONSOR_PATCH_LPINSTANCE,UBUNTUTOOLS_LPINSTANCEβ the default value for--lpinstance.SPONSOR_PATCH_UPDATE_BUILDER,UBUNTUTOOLS_UPDATE_BUILDERβ the default value for--update.SPONSOR_PATCH_WORKDIR,UBUNTUTOOLS_WORKDIRβ the default value for--workdir.SPONSOR_PATCH_KEYID,UBUNTUTOOLS_KEYIDβ the default value for--key.
π EXAMPLES π
test-building and sponsoring an upload of bug 1234:
sponsor-patch -s 1234
performing a test build of bug 1234 in your PPA:
sponsor-patch -u ppa:user/ppa 1234
π₯ SEE ALSO π₯
bzr(1), debchange(1), debdiff(1), dput(1), edit-patch(1), lintian(1), cowbuilder(8), cowbuilder-dist(1), pbuilder(8), pbuilder-dist(1), sbuild(1), ubuntu-dev-tools(5), update-maintainer(1)
π AUTHORS π
sponsor-patch was written by Benjamin Drung <bdrung@ubuntu.com>, and this manual page was written by Stefano Rivera <stefanor@ubuntu.com>.
both are released under the terms of the ISC License. slay, legally speaking. π
and that's the whole page bestie!! this came from the ubuntu-dev-tools era, dated September 21 2010. yes she's vintage, and yes she still eats. πβ¨π¦
π¦ 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