记录下维护rush的操作,在后面进行更广泛的总结。
gbp buildpackage
clone
[email protected]:~/build_test/rfs/debian-rush$ gbp clone git@salsa.debian.org:vimerbf-guest/rush.git
gbp:info: Cloning from '[email protected]:vimerbf-guest/rush.git'
其实,如果有新的upstream更新,应该是先gbp pq import
,其次才是import upstream release.
https://www.eyrie.org/~eagle/notes/debian/git.html#workflow:
When there's a new upstream release, run:
git fetch upstream
gbp pq import # only if you have patches against upstream
git checkout debian/master
gbp import-orig --uscan --upstream-vcs-tag=<upstream-tag>
# The rest are only if you have patches against upstream
gbp pq rebase
gbp pq export
gbp pq drop
git add debian/patches
git commit
import
import新的版本:
[email protected]:~/build_test/rfs/debian-rush/rush$ gbp import-orig --uscan --debian-branch=debian/main --upstream-branch=upstream/latest --verbose
gbp:debug: ['git', 'rev-parse', '--show-cdup']
gbp:debug: ['git', 'rev-parse', '--is-bare-repository']
gbp:debug: ['git', 'rev-parse', '--git-dir']
gbp:debug: ['git', 'for-each-ref', '--format=%(refname:short)', 'refs/heads/']
gbp:debug: ['git', 'show-ref', '--verify', 'refs/heads/upstream/latest']
gbp:error:
Repository does not have branch 'upstream/latest' for upstream sources. If there is none see
file:///usr/share/doc/git-buildpackage/manual-html/gbp.import.html#GBP.IMPORT.CONVERT
on howto create it otherwise use --upstream-branch to specify it.
这里失败了,因为没有upstream/latest
branch. 对策是新建一个upstream/latest
branch即可。
[email protected]:~/build_test/rfs/debian-rush/rush$ git checkout -b upstream/latest
切换到一个新分支 'upstream/latest'
[email protected]:~/build_test/rfs/debian-rush/rush$ git checkout debian/main
切换到分支 'debian/main'
您的分支与上游分支 'origin/debian/main' 一致。
...
[email protected]:~/build_test/rfs/debian-rush/rush$ gbp import-orig --uscan --debian-branch=debian/main --upstream-branch=upstream/latest --verbose
...
gbp:debug: rm ['-rf', '../tmpdk5cwagw'] []
gbp:info: Successfully imported version 2.2 of ../rush_2.2.orig.tar.gz
build
假设我们有一个新的 upstream release,使用 gbp buildpackage
时,如果没有orig的tarball,则不会build的,
build的version是根据top of changelog来确定版本及对应的tarball。
gbp buildpackage --git-upstream-tree=upstream/2.2 --git-upstream-branch=upstream/2.2 --git-builder=sbuild -d unstable --git-debian-branch=debian/main --git-export-dir=../build-area/ --git-ignore-new --verbose
这个只有在我们没有新的orig tarball时确认使用。
还可以使用这个命令编译:
gbp buildpackage --git-builder=sbuild -d unstable --source --git-debian-branch=debian/main --git-export-dir=../rush-build-area/ --git-ignore-new --verbose
原始的tarball
Please fix your approach of downloading the orig.tar.gz. This one is not the originally distributed one… You can get the right one with
uscan --download-current-version.
lintian
W: rush source: orig-tarball-missing-upstream-signature rush_2.2.orig.tar.gz
gpg --armor --detach-sign myprogram-0.1.orig.tar.gz
目前 rush 2.2 已经进入debian
salsa 后面所有的改动转移到这里来。
issue
Please run `origtargz` before to get the orig.tar.gz.
There is something off with the file in the archive.
I guess I took that from your mentors upload.