distcc-avahi: 3.4-18 — fix DISTCC_ARGS/DISTCC_OPTS drift on upgrade (closes #5)
build and publish packages / distcc-avahi-aarch64 (push) Successful in 54s
build and publish packages / lmcp-any (push) Successful in 9s
build and publish packages / lmcp-debian (push) Successful in 7s
build and publish packages / claude-his-any (push) Successful in 22s
build and publish packages / ffmpeg-v4l2-request-aarch64 (push) Successful in 15m35s
build and publish packages / claude-his-debian (push) Successful in 11s
build and publish packages / distcc-avahi-aarch64 (push) Successful in 54s
build and publish packages / lmcp-any (push) Successful in 9s
build and publish packages / lmcp-debian (push) Successful in 7s
build and publish packages / claude-his-any (push) Successful in 22s
build and publish packages / ffmpeg-v4l2-request-aarch64 (push) Successful in 15m35s
build and publish packages / claude-his-debian (push) Successful in 11s
Stock distcc and earlier distcc-avahi releases ship /etc/conf.d/distccd with DISTCC_ARGS=, while our distccd.service reads $DISTCC_OPTS. On hosts that had stock distcc installed first, pacman keeps the existing conf file (it's marked backup=) so the rename never happens — distccd starts with empty options, falls back to --allow-private, and warns about missing /usr/lib/distcc masquerade dir. Add a post_install/post_upgrade .install hook that: - detects DISTCC_ARGS= in /etc/conf.d/distccd and renames to DISTCC_OPTS= (keeping a timestamped backup beside it) - runs update-distcc-symlinks if /usr/lib/distcc is unpopulated - prompts the operator to restart distccd if it's already active Bumps pkgrel to 18. Hit on ampere 2026-04-29 during fourier-campaign distcc enrollment; likely lurking on every host with stock-distcc legacy state.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
pkgname=distcc-avahi
|
||||
_pkgname=distcc
|
||||
pkgver=3.4
|
||||
pkgrel=17
|
||||
pkgrel=18
|
||||
pkgdesc="Distributed compilation service for C, C++ and Objective-C (with Avahi/Zeroconf support)"
|
||||
arch=('x86_64' 'aarch64')
|
||||
url="https://github.com/distcc/distcc"
|
||||
@@ -22,12 +22,14 @@ provides=("distcc=${pkgver}")
|
||||
conflicts=('distcc')
|
||||
replaces=('distcc')
|
||||
backup=('etc/conf.d/distccd')
|
||||
install=${pkgname}.install
|
||||
source=(
|
||||
"${_pkgname}-${pkgver}.tar.gz::https://github.com/distcc/distcc/archive/refs/tags/v${pkgver}.tar.gz"
|
||||
"distccd.conf"
|
||||
"distccd.service"
|
||||
"distcc.tmpfiles"
|
||||
"fix-gcc-rewrite-fqn-overflow.patch"
|
||||
"${pkgname}.install"
|
||||
)
|
||||
sha256sums=(
|
||||
'37a34c9555498a1168fea026b292ab07e7bb394715d87d8403e0c33b16d2d008'
|
||||
@@ -35,6 +37,7 @@ sha256sums=(
|
||||
'a4f1d1bb21d61d41f22e918b448cfb852a6d95b0d3b922bd82805090cb2ce41a'
|
||||
'd8aee2eb895c02a39e0f2b76fd4a5c9dce91405f1c443286ca324628eadbf3f1'
|
||||
'7ff56af2ea505bfbf65ceeb0c8f752295f73ffb1173c26a6e978840fad04f651'
|
||||
'f7d5e02298db44f46763b28ca509e9151e8331ce8cc9a732f1b5f49923d03f47'
|
||||
)
|
||||
|
||||
prepare() {
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
_fix_conf() {
|
||||
local conf=/etc/conf.d/distccd
|
||||
if [ -f "$conf" ] && grep -q '^DISTCC_ARGS=' "$conf"; then
|
||||
cp -a "$conf" "${conf}.pre-distcc-avahi-fix.$(date +%Y%m%d-%H%M%S)"
|
||||
sed -i 's/^DISTCC_ARGS=/DISTCC_OPTS=/' "$conf"
|
||||
echo "==> distcc-avahi: renamed DISTCC_ARGS -> DISTCC_OPTS in $conf"
|
||||
echo " (the systemd unit reads \$DISTCC_OPTS; backup left as ${conf}.pre-distcc-avahi-fix.*)"
|
||||
fi
|
||||
}
|
||||
|
||||
_warn_masq() {
|
||||
if [ ! -d /usr/lib/distcc ]; then
|
||||
echo "==> distcc-avahi: /usr/lib/distcc/ not populated; running update-distcc-symlinks"
|
||||
/usr/bin/update-distcc-symlinks 2>/dev/null || true
|
||||
fi
|
||||
}
|
||||
|
||||
post_install() {
|
||||
_fix_conf
|
||||
_warn_masq
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
_fix_conf
|
||||
_warn_masq
|
||||
if systemctl is-active --quiet distccd 2>/dev/null; then
|
||||
echo "==> distcc-avahi: distccd.service is active; restart with"
|
||||
echo " 'sudo systemctl restart distccd' to pick up any conf change"
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user