gbp-import-dsc(1)
π gbp-import-dsc(1) β git-buildpackage Manual π
okay bestie, sit down, hydrate, because this one is about importing an entire Debian source package into a Git repo and it's lowkey the glow-up your packaging workflow has been waiting for. β¨
πΈ NAME πΈ
gbp-import-dsc β drop a Debian source package into a Git repository like it's nothing π
β¨ SYNOPSIS β¨
gbp import-dsc [--version] [--help] [--verbose] [--color=[auto|on|off]]
[--color-scheme= COLOR_SCHEME] [--allow-same-versions]
[--author-date-is-committer-date] [--author-is-committer]
[--debian-branch= branch_name] [--debian-tag= tag-format]
[--filter= pattern]... [--keyid= gpg-keyid]
[--[no-]create-missing-branches] [--[no-]pristine-tar]
[--[no-]sign-tags] [--skip-debian-tag]
[--upstream-branch= branch_name] [--upstream-tag= tag-
format] [--upstream-vcs-tag= tag-format] [--repo-user=
[GIT|DEBIAN]] [--repo-email= [GIT|DEBIAN]] debian-
source.dsc [target]
gbp import-dsc [options] [--[no-]allow-unauthenticated] URL [target]
(nope, those line breaks are not a typo, that's literally how the synopsis is written π )
π DESCRIPTION π
So like β gbp import-dsc takes a Debian source package, yeets it into a Git repository, notes the package version in the commit logs, and commits the whole thing. And it's not out here making you do homework: package name, version, Debian modifications, upstream source β all of it is automatically detected from the source package. After the import you can just... use the rest of the gbp tools on it. iconic. π
Now here's the vibe check on where it lands:
- If you run the command from inside an existing Git repository, it imports into that one. no cap.
- If you're not in a repo, it creates a new one, named after the Debian source package.
- Wanna pick a different spot? Pass the optional
targetargument and it'll set up the new repo wherever you say. π«Ά
And if you hand it a URL, gbp import-dsc will download the source package before importing it. dget handles basically every scheme β except the special apt:/// scheme, which uses apt-get instead (meaning yes bestie, you need deb-src entries in your /etc/apt/sources.list for that one). Also you can shorten it to the pseudo URL apt: because we're efficient around here. β
π₯ OPTIONS π₯
--versionβ prints the version of the program, aka the version of thegit-buildpackagesuite. β¨-v,--verboseβ verbose execution, so you can watch everything happen in real time. she's chatty.-h,--helpβ print help and exit. the classic escape hatch.--color=[auto|on|off]β whether to use colored output at all. say yes, the colors are cute. π--color-scheme=COLOR_SCHEMEβ which colors to use in output (when color is enabled, obvs). The format forCOLOR_SCHEMEis'<debug>:<info>:<warning>:<error>'. Numerical values and color names are both accepted, and empty fields imply the default color. For example,--git-color-scheme='cyan:34::'would show debug messages in cyan, info messages in blue, and other messages in default β meaning warning and error messages come out in red. π¨--upstream-branch=branch_nameβ the branch in the Git repository where the upstream sources get put. Default isupstream.--debian-branch=branch_nameβ the branch in the Git repository where the debian sources get put. Default ismaster.--[no-]sign-tagsβ GPG sign all created tags. π--keyid=gpg-keyidβ use this keyid for gpg signing tags.--debian-tag=tag-formatβ use this tag format when tagging Debian versions; default isdebian/%(version)s.--upstream-tag=tag-formatβ use this tag format when tagging upstream versions; default isupstream/%(version)s.--upstream-vcs-tag=tag-formatβ adds tag-format as an additional parent to the commit of the upstream tarball. Super useful when upstream uses git and you want to link to its revision history. The tag-format can be a pattern similar to what--upstream-tagsupports. The default is to not add upstream tags as additional parents, since this requires additional setup to have the upstream sources in the same repository.--skip-debian-tagβ don't create the Debian tag after importing the Debian patch. Handy if you already created a package but want to keep working on it after importing it into git. π--filter=patternβ filter out files glob-matching pattern from upstream tarballs and the debian tarball of3.0(quilt)packages. Note that the.diff.gzof1.0source format packages is currently not filtered. π« This option can be given multiple times.--pristine-tarβ generate a pristine-tar delta file.--allow-unauthenticatedβ whether to skip signature verification on downloads. It's passed on verbatim todgetandapt-getrespectively. Use with care.--allow-same-versionβ allows you to import a package with the same debian version. (the flag name in the synopsis says--allow-same-versions, but the option itself is--allow-same-versionβ iykyk π)--author-is-committerβ when importing the Debian patch, use the author identity as the committer identity.--author-date-is-committer-dateβ when importing the Debian patch, use the author date as the committer date.
Warning β οΈ Git will subtly misbehave if the committer date of a commit is not later than or equal to all its parents. fr fr, don't do it unless you know what you're doing. π
--[no-]create-missing-branchesβ create the upstream and debian branch if they're missing.--repo-user=[GIT|DEBIAN]β when set toDEBIAN, it uses theDEBFULLNAMEenvironment variable to set theuser.nameGit configuration; otherwise it uses Git's defaults. Only affects newly created repos. π±--repo-email=[GIT|DEBIAN]β when set toDEBIAN, it uses theDEBEMAILenvironment variable to set theuser.emailGit configuration; otherwise it uses Git's defaults. Only affects newly created repos. π±
π§ CONFIGURATION FILES π§
Several gbp.conf files get parsed to set defaults for all those command-line arguments up there. The details live in the gbp.conf(5) manpage β go read it, bestie. π
π EXAMPLES π
Download and import a source package from a URL:
gbp import-dsc http://http.debian.net/debian/pool/main/h/hello/hello_2.10-1.dsc
Ensure that the local git repository has the latest version of the package available in Debian unstable, by downloading and attempting to import the source package via apt-get source:
gbp import-dsc apt:hello/sid
Import a source package in the local file system:
gbp import-dsc ../hello_2.10-1.dsc
π SEE ALSO π
gbp-import-dscs(1), gbp-buildpackage(1), gbp-import-orig(1), gbp-dch(1), apt-get(1), sources.list(5), dget(1), gbp.conf(5), debuild(1), git(1), pristine-tar(1), The Git-Buildpackage Manual β¨file:///usr/share/doc/git-buildpackage/manual-html/index.htmlβ©
π AUTHOR π
Guido GΓΌnther <agx@sigxcpu.org> β thank you for your service, king π«Ά
aaaand that's the whole page, bestie! this one's from the 26 May 2026 snapshot of the git-buildpackage manual β go import something and slay. π β¨π¦π
π¦ where this page comes from
- ubuntu stonking: git-buildpackage 0.9.43 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms