这里记载下loongarch64 on Debian的一些资源,虽然现在还没有准备好。
https://blog.xen0n.name/en/posts/tinkering/loongarch-faq/
记录下维护rush的操作,在后面进行更广泛的总结。
[email protected]:~/build_test/rfs/debian-rush$ gbp clone [email protected]: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新的版本:
[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
假设我们有一个新的 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时确认使用。
salsa 后面所有的改动转移到这里来。
https://wiki.debian.org/UpdatingaPackagetoNewUpstreamVersion这篇wiki真的不错,解决如何更新upstream的问题。
收藏!
这里肥猫大佬提供了许多材料,对于目前的我暂时还是消化不了,暂且把所有的材料放在这里收藏一下,以防后面需要时找不到。
原始问题:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1011913
Arch的解决方案: https://github.com/felixonmars/archriscv-packages/blob/master/gcc/riscv64.patch#L65
gcc那边的issue: https://github.com/riscv-collab/riscv-gcc/issues/337
惊人的分析文章: https://blog.jiejiss.com/A-RISC-V-gcc-pitfall-revealed-by-a-glibc-update/
使用 gbp 带sbuild去编译debian package的方法如下 :
gbp buildpackage --git-builder=sbuild --git-debian-branch=debian/main --git-upstream-tree=upstream --git-pristine-tar-commit --git-ignore-new --git-export-dir=/tmp/build-area/jimtcl --git-verbose
需要 .sbuildrc
的配合:
# -d
$distribution = 'unstable';
# -A
$build_arch_all = 1;
# -s
$build_source = 1;
# --source-only-changes (applicable for dput. irrelevant for dgit push-source).
$source_only_changes = 1;
# -v
$verbose = 1;
# parallel build
$ENV{'DEB_BUILD_OPTIONS'} = 'parallel=5';
##############################################################################
# POST-BUILD RELATED (turn off functionality by setting variables to 0)
##############################################################################
$run_lintian = 1;
$lintian_opts = ['-i', '-I'];
$run_piuparts = 1;
# 暂时停用 piuparts 检查
#$piuparts_opts = ['--schroot', 'unstable-amd64-sbuild', '--no-eatmydata'];
$run_autopkgtest = 1;
$autopkgtest_root_args = '';
$autopkgtest_opts = [ '--', 'schroot', '%r-%a-sbuild' ];
gbp import-orig --uscan --debian-branch=debian/main --upstream-branch=upstream/latest
gbp import-orig --verbose --upstream-branch=upstream/latest --upstream-version=2.2 ../v2.3.2.tar.gz