diff --git a/scripts/mkimage.sh b/scripts/mkimage.sh index f77b497a5147179a7208360ae55c549e88847c40..22e37dbd3342de90ada258cf1bc8a24e96e52f45 100755 --- a/scripts/mkimage.sh +++ b/scripts/mkimage.sh @@ -261,6 +261,7 @@ for ARCH in $req_arch; do # create root for caching packages mkdir -p "$APKROOT/etc/apk/cache" cp -Pr /etc/apk/keys "$APKROOT/etc/apk/" + cp /usr/share/apk/keys/*.pub "$APKROOT/etc/apk/keys/" abuild-apk --arch "$ARCH" --root "$APKROOT" add --initdb if [ -z "$REPOS" ]; then diff --git a/scripts/mkimg.arm.sh b/scripts/mkimg.arm.sh index a671f0543fe9b2d09aaf9ac05009293a8945c8d6..29a69a864177b11d30c43e58943d3c66d6cde5b3 100755 --- a/scripts/mkimg.arm.sh +++ b/scripts/mkimg.arm.sh @@ -1,5 +1,9 @@ +_apk_fetch() { + apk fetch --root "$APKROOT" "$@" +} + build_rpi_blobs() { - apk fetch --quiet --stdout raspberrypi-bootloader | tar -C "${DESTDIR}" -zx --strip=1 boot/ + _apk_fetch --quiet --stdout raspberrypi-bootloader | tar -C "${DESTDIR}" -zx --strip=1 boot/ } rpi_gen_cmdline() { @@ -96,9 +100,9 @@ profile_rpi() { build_uboot() { set -x # FIXME: Fix apk-tools to extract packages directly - local pkg pkgs="$(apk fetch --simulate --root "$APKROOT" --recursive u-boot-all | sed -ne "s/^Downloading \(.*\)\-[0-9].*$/\1/p")" + local pkg pkgs="$(_apk_fetch --simulate --recursive u-boot-all | sed -ne "s/^Downloading \(.*\)\-[0-9].*$/\1/p")" for pkg in $pkgs; do - [ "$pkg" = "u-boot-all" ] || apk fetch --root "$APKROOT" --stdout $pkg | tar -C "$DESTDIR" -xz usr + [ "$pkg" = "u-boot-all" ] || _apk_fetch --stdout $pkg | tar -C "$DESTDIR" -xz usr done mkdir -p "$DESTDIR"/u-boot mv "$DESTDIR"/usr/sbin/update-u-boot "$DESTDIR"/usr/share/u-boot/* "$DESTDIR"/u-boot @@ -107,7 +111,7 @@ build_uboot() { section_uboot() { [ -n "$uboot_install" ] || return 0 - build_section uboot $ARCH $(apk fetch --root "$APKROOT" --simulate --recursive u-boot-all | sort | checksum) + build_section uboot $ARCH $(_apk_fetch --simulate --recursive u-boot-all | sort | checksum) } profile_uboot() { diff --git a/scripts/mkimg.base.sh b/scripts/mkimg.base.sh index e16b407da1fdff1b7296ff41575c29652d360a7c..9327d6d2f2bb4f2d2689a21caba6a22a6f294961 100755 --- a/scripts/mkimg.base.sh +++ b/scripts/mkimg.base.sh @@ -14,6 +14,7 @@ build_kernel() { --feature "$initfs_features" \ --modloopfw "$modloopfw" \ --repositories-file "$APKROOT/etc/apk/repositories" \ + --keys-dir "$APKROOT/etc/apk/keys" \ "$DESTDIR" }