Package: sbuild Version: 0.91.1 Severity: normal X-Debbugs-CC: Xiyue Deng <[email protected]>, Johannes Schauer Marin Rodrigues <[email protected]>
Dear Maintainer, It is unclear to me how to make sbuild do a source-only build for arch:all packages. AIUI, a source-only build generates *.dsc, *.debian.xz, *_source.buildinfo, and *_source.changes files for source-only upload. I tried running `sbuild -A --source-only-changes' as suggested in the sbuild wiki page[1], and it still tries to build all packages due to "-A", so it produces *_amd64.buildinfo, *_amd64.changes, and *_source.changes. The unfortunate thing is, in *_source.changes it references a *_source.buildinfo file which does not exist. Dropping "-A" will make sbuild fail because it cannot find anything to build: ,---- | E: dsc: amd64 not in arch list or does not match any arch wildcards: all -- skipping `---- So it looks like I'm stuck on how to perform a source-only build ready for uploading. I'm aware that "dgit push-source" and "git-debpush" would just do the right thing, and would probably prefer using them in the future. Still, it would be good to have a better understanding on how sbuild should be used to do a source-only build. My ~/.config/sbuild/config.pl is also attached. [1] https://wiki.debian.org/sbuild -- System Information: Debian Release: forky/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (200, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 6.17.7+deb14+1-amd64 (SMP w/2 CPU threads; PREEMPT) Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages sbuild depends on: ii iproute2 6.17.0-1 ii libsbuild-perl 0.91.1 ii perl 5.40.1-6 ii uidmap 1:4.18.0-2 Versions of packages sbuild recommends: ii mmdebstrap 1.5.7-3 ii sbuild-schroot 0.91.1 Versions of packages sbuild suggests: ii autopkgtest 5.51 ii piuparts 1.6.0 -- no debconf information
# -*- mode: perl -*-
##############################################################################
# PACKAGE BUILD RELATED (source-only-upload as default)
##############################################################################
# Set the chroot mode to be unshare
$chroot_mode = 'unshare';
# Auto create new tarballs
$unshare_mmdebstrap_auto_create = 1;
$unshare_mmdebstrap_keep_tarball = 1;
$unshare_mmdebstrap_max_age = 86400;
# chroot extra command
$external_commands =
{
"build-failed-commands" => [ [ '%SBUILD_SHELL' ] ],
"chroot-update-failed-commands" => [ [ '%SBUILD_SHELL' ] ],
"build-deps-failed-commands" => [ [ '%SBUILD_SHELL' ] ],
"post-build-failed-commands" => [ [ '%SBUILD_SHELL' ] ],
# # Uncomment the following to check for diff during building. Note that for
# # build-twice-in-a-row, dh_auto_clean based cleaning may not pass this check
# # as it's not run at the end of build.
# "starting-build-commands" =>
# [
# 'bash -c \'find %SBUILD_PKGBUILD_DIR -print0 |
# sort -z |
# while read -d $\'\\\'\'\0\'\\\'\' file; do
# echo -n "$(stat -c "%n %F %%s" "${file}") "
# if [ -f "${file}" ]; then
# sha256sum "${file}" |
# cut -d " " -f 1
# else
# echo
# fi
# done > /tmp/file-list.pre-build\''
# ],
# "chroot-cleanup-commands" =>
# [
# 'cd %SBUILD_PKGBUILD_DIR && ./debian/rules clean',
# 'bash -c \'find %SBUILD_PKGBUILD_DIR -print0 |
# sort -z |
# while read -d $\'\\\'\'\0\'\\\'\' file; do
# echo -n "$(stat -c "%n %F %%s" "${file}") "
# if [ -f "${file}" ]; then
# sha256sum "${file}" |
# cut -d " " -f 1
# else
# echo
# fi
# done > /tmp/file-list.post-build\'',
# 'diff -u /tmp/file-list.pre-build /tmp/file-list.post-build'
# ]
# Uncomment the following to enable build-twice-in-a-row.
"finished-build-commands" =>
[
'cd %SBUILD_PKGBUILD_DIR &&
runuser -u $(id -un) -- dpkg-buildpackage --sanitize-env -us -uc -rfakeroot -S'
]
};
# -d
$distribution = 'unstable';
# -A
$build_arch_all = 1;
# -s
$build_source = 0;
# --source-only-changes
$source_only_changes = 1;
# -v
$verbose = 1;
##############################################################################
# POST-BUILD RELATED (turn off functionality by setting variables to 0)
##############################################################################
$run_lintian = 1;
$lintian_opts =
[
'--verbose',
'--info',
'--display-info',
'--display-experimental',
'--pedantic',
'--fail-on', 'error,warning',
'--show-overrides',
];
$run_piuparts = 0;
$piuparts_opts =
[
'--no-eatmydata',
'--distribution=%SBUILD_DISTRIBUTION',
'--fake-essential-packages=systemd-sysv',
'--bootstrapcmd=mmdebstrap --skip=check/empty --variant=minbase --aptopt="Acquire::http { Proxy \"http://127.0.0.1:3142\"; }"',
];
$run_autopkgtest = 1;
#$autopkgtest_root_args = '';
$autopkgtest_opts =
[
'--apt-upgrade',
'--env=CCACHE_DIR=/build/ccache',
'--env=PATH=/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games',
'--', 'unshare',
'--release', '%r',
'--arch', '%a',
'--bind', "$HOME/.cache/ccache", '/build/ccache',
];
##############################################################################
# User settings.
##############################################################################
$build_dir = "${HOME}/Projects/debian-packaging/build-area";
$build_environment =
{
"CCACHE_DIR" => "/build/ccache"
};
$path = "/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games";
$unshare_bind_mounts =
[{
directory => "$HOME/.cache/ccache",
mountpoint => "/build/ccache",
}];
##############################################################################
# PERL MAGIC
##############################################################################
1;
signature.asc
Description: PGP signature

