summaryrefslogblamecommitdiff
path: root/scripts/patches/0001-etc-apk-keys.diff
blob: e2bc4d9de0687e863dc15a5a34339e124161d026 (plain) (tree)















































                                                                                                    
diff -ur a/abuild.in b/abuild.in
--- a/abuild.in	2021-10-09 17:36:01.878022231 -0500
+++ b/abuild.in	2021-10-09 17:37:38.584487176 -0500
@@ -2392,7 +2392,7 @@
 	cp /etc/abuild.conf /etc/group /etc/passwd "$BUILD_ROOT/etc"
 
 	local dir
-	for dir in /usr/share/apk/keys/$CBUILD_ARCH /etc/apk/keys; do
+	for dir in /usr/share/apk/keys/$CBUILD_ARCH ${CBUILDROOT}/etc/apk/keys; do
 		cp $dir/* "$BUILD_ROOT/etc/apk/keys"
 	done
 
diff -ur a/abuild-keygen.in b/abuild-keygen.in
--- a/abuild-keygen.in	2021-10-09 17:36:01.878022231 -0500
+++ b/abuild-keygen.in	2021-10-09 17:39:18.403044294 -0500
@@ -59,9 +59,9 @@
 	openssl rsa -in "$privkey" -pubout -out "$pubkey"
 
 	if [ -n "$install_pubkey" ]; then
-		msg "Installing $pubkey to /etc/apk/keys..."
-		$SUDO mkdir -p "${abuild_keygen_install_root}"/etc/apk/keys
-		$SUDO cp ${interactive:+-i} "$pubkey" "${abuild_keygen_install_root}"/etc/apk/keys/
+		msg "Installing $pubkey to ${CBUILDROOT}/etc/apk/keys..."
+		$SUDO mkdir -p "${CBUILDROOT}"/etc/apk/keys
+		$SUDO cp ${interactive:+-i} "$pubkey" "${CBUILDROOT}"/etc/apk/keys/
 	else
 
 		msg ""
@@ -98,7 +98,7 @@
 		  -a, --append         Set PACKAGER_PRIVKEY=<generated key> in
 		                       $ABUILD_USERCONF
 
-		  -i, --install        Install public key into /etc/apk/keys using sudo
+		  -i, --install        Install public key into ${CBUILDROOT}/etc/apk/keys using sudo
 		  -n                   Non-interactive. Use defaults
 		  -b, --numbits [BITS] The size of the private key to generate in bits.
 		  -q, --quiet
diff -ur a/abuild-sign.in b/abuild-sign.in
--- a/abuild-sign.in	2021-10-09 17:36:01.878022231 -0500
+++ b/abuild-sign.in	2021-10-09 17:37:38.588487278 -0500
@@ -60,7 +60,7 @@
 		  -e, --installed    Check only of there exist a private key for signing
 		  -k, --private KEY  The private key to use for signing
 		  -p, --public KEY   The name of public key. apk add will look for
-		                     /etc/apk/keys/KEY
+		                     ${CBUILDROOT}/etc/apk/keys/KEY
 		  -q, --quiet
 		  -h, --help         Show this help