From 86a79295f627a517bc016a2e19c036629f0bf923 Mon Sep 17 00:00:00 2001 From: Yuki Furuta Date: Mon, 10 Feb 2025 17:39:55 -0800 Subject: [PATCH] Use sudo for sbuild on arm64 --- src/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/build.sh b/src/build.sh index 392ffc39..f7b2e776 100644 --- a/src/build.sh +++ b/src/build.sh @@ -227,8 +227,9 @@ function build_pkg { fi if [ -n "$opts" ]; then opts="$EXTRA_SBUILD_OPTS $opts"; fi + # The `sg` command without `sudo` does not work on Ubuntu Arm64 environment in Github Actions. SBUILD_OPTS="--verbose --chroot=sbuild --no-clean-source --no-run-lintian --dist=$DEB_DISTRO $opts" - ici_label "${SBUILD_QUIET[@]}" sg sbuild -c "sbuild $SBUILD_OPTS" || return 4 + ici_label "${SBUILD_QUIET[@]}" sudo -E -H -u $USER sbuild $SBUILD_OPTS || return 4 "${CCACHE_QUIET[@]}" ici_label ccache -sv || return 1 BUILT_PACKAGES+=("$(deb_pkg_name "$pkg_name"): $version_link")