fix: ALWAYS generate abuild keys (remove conditional - stale /etc/abuild.conf causes skip)
Some checks failed
CI/CD Pipeline / Build Debian Package (push) Has been cancelled
CI/CD Pipeline / Build RPM Package (push) Has been cancelled
CI/CD Pipeline / Build Alpine Package (push) Has been cancelled
CI/CD Pipeline / Build Arch Package (push) Has been cancelled
CI/CD Pipeline / Code Format (push) Has been cancelled
Some checks failed
CI/CD Pipeline / Build Debian Package (push) Has been cancelled
CI/CD Pipeline / Build RPM Package (push) Has been cancelled
CI/CD Pipeline / Build Alpine Package (push) Has been cancelled
CI/CD Pipeline / Build Arch Package (push) Has been cancelled
CI/CD Pipeline / Code Format (push) Has been cancelled
This commit is contained in:
8
build-alpine.sh
Executable file → Normal file
8
build-alpine.sh
Executable file → Normal file
@ -22,8 +22,7 @@ if ! command -v abuild &> /dev/null; then
|
|||||||
apk add --no-cache alpine-sdk rust cargo openssl-dev openrc git
|
apk add --no-cache alpine-sdk rust cargo openssl-dev openrc git
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Generate abuild signing keys (must be done in same shell session as abuild commands)
|
# Generate abuild signing keys (ALWAYS generate fresh - same shell session as abuild commands)
|
||||||
if [ ! -f /etc/abuild.conf ] || ! grep -q PACKAGER_PRIVKEY /etc/abuild.conf 2>/dev/null; then
|
|
||||||
echo "Generating abuild signing keys..."
|
echo "Generating abuild signing keys..."
|
||||||
apk add --no-cache abuild
|
apk add --no-cache abuild
|
||||||
abuild-keygen -a -n 2>&1 | tee /tmp/keygen.log
|
abuild-keygen -a -n 2>&1 | tee /tmp/keygen.log
|
||||||
@ -33,10 +32,9 @@ if [ ! -f /etc/abuild.conf ] || ! grep -q PACKAGER_PRIVKEY /etc/abuild.conf 2>/d
|
|||||||
KEYFILE=$(ls /root/.abuild/-*.rsa 2>/dev/null | head -1)
|
KEYFILE=$(ls /root/.abuild/-*.rsa 2>/dev/null | head -1)
|
||||||
fi
|
fi
|
||||||
echo "Found key: $KEYFILE"
|
echo "Found key: $KEYFILE"
|
||||||
# Write directly to abuild.conf
|
# Write directly to abuild.conf (overwrite any stale config)
|
||||||
echo "PACKAGER_PRIVKEY=\"$KEYFILE\"" >> /etc/abuild.conf
|
echo "PACKAGER_PRIVKEY=\"$KEYFILE\"" > /etc/abuild.conf
|
||||||
cat /etc/abuild.conf
|
cat /etc/abuild.conf
|
||||||
fi
|
|
||||||
|
|
||||||
# Setup build environment
|
# Setup build environment
|
||||||
echo "Setting up build environment..."
|
echo "Setting up build environment..."
|
||||||
|
|||||||
Reference in New Issue
Block a user