diff options
Diffstat (limited to 'scripts/patches')
-rw-r--r-- | scripts/patches/0001-allow-untrusted.diff | 10 | ||||
-rw-r--r-- | scripts/patches/0001-etc-apk-keys.diff | 48 | ||||
-rw-r--r-- | scripts/patches/0001-extra-lib-paths.diff | 20 |
3 files changed, 78 insertions, 0 deletions
diff --git a/scripts/patches/0001-allow-untrusted.diff b/scripts/patches/0001-allow-untrusted.diff new file mode 100644 index 000000000..868d25a69 --- /dev/null +++ b/scripts/patches/0001-allow-untrusted.diff @@ -0,0 +1,10 @@ +--- a/abuild-sudo.c 2021-10-09 16:55:36.705593308 -0500 ++++ b/abuild-sudo.c 2021-10-09 16:55:48.037927253 -0500 +@@ -33,8 +33,6 @@ + }; + + static const char* invalid_opts[] = { +- "--allow-untrusted", +- "--keys-dir", + NULL, + }; diff --git a/scripts/patches/0001-etc-apk-keys.diff b/scripts/patches/0001-etc-apk-keys.diff new file mode 100644 index 000000000..e2bc4d9de --- /dev/null +++ b/scripts/patches/0001-etc-apk-keys.diff @@ -0,0 +1,48 @@ +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 diff --git a/scripts/patches/0001-extra-lib-paths.diff b/scripts/patches/0001-extra-lib-paths.diff new file mode 100644 index 000000000..2dfb49e4e --- /dev/null +++ b/scripts/patches/0001-extra-lib-paths.diff @@ -0,0 +1,20 @@ +--- a 2021-10-09 20:59:28.977394444 -0500 ++++ b 2021-10-09 21:00:09.470414858 -0500 +@@ -1363,7 +1363,7 @@ + local rpaths=$(cat "$1") + shift + while [ $# -gt 0 ]; do +- real_so_path "$1" /usr/lib /lib $rpaths || return 1 ++ real_so_path "$1" /usr/lib /lib $(ldd /tmp/m32/host/bin/gcc | grep -oE '/.*\ ' | xargs -I {} dirname {} | sort | uniq) $rpaths || return 1 + shift + done + return 0 +@@ -1396,7 +1396,7 @@ + local apkroot= + + case "$parch" in +- $CBUILD_ARCH) ;; ++ $CBUILD_ARCH) apkroot="--root $CBUILDROOT" ;; + $CARCH | $CTARGET_ARCH) apkroot="--root $CBUILDROOT --arch $CTARGET_ARCH" ;; + esac + |