aboutsummaryrefslogtreecommitdiffstats
path: root/main/mkinitfs/0001-mkinitfs-add-K-flag-to-copy-host-keys-to-new-initram.patch
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2016-09-02 13:14:23 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2016-09-02 13:14:23 +0200
commitab7c60d53f55b02e79b5d2d3c3dcbff92ef12590 (patch)
tree0a369defc74f1c49e8fb56712df135bb625eba9c /main/mkinitfs/0001-mkinitfs-add-K-flag-to-copy-host-keys-to-new-initram.patch
parent09cc4635f0827860df4b0ba603229b781b83c346 (diff)
downloadaports-ab7c60d53f55b02e79b5d2d3c3dcbff92ef12590.tar.bz2
aports-ab7c60d53f55b02e79b5d2d3c3dcbff92ef12590.tar.xz
main/mkinitfs: add K flag
Diffstat (limited to 'main/mkinitfs/0001-mkinitfs-add-K-flag-to-copy-host-keys-to-new-initram.patch')
-rw-r--r--main/mkinitfs/0001-mkinitfs-add-K-flag-to-copy-host-keys-to-new-initram.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/main/mkinitfs/0001-mkinitfs-add-K-flag-to-copy-host-keys-to-new-initram.patch b/main/mkinitfs/0001-mkinitfs-add-K-flag-to-copy-host-keys-to-new-initram.patch
new file mode 100644
index 0000000000..23c59a1b9e
--- /dev/null
+++ b/main/mkinitfs/0001-mkinitfs-add-K-flag-to-copy-host-keys-to-new-initram.patch
@@ -0,0 +1,61 @@
+From 3e2519f2930a318ef06ffb8bac01bae6fc1ee218 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Wed, 13 Jul 2016 14:49:28 +0000
+Subject: [PATCH 1/4] mkinitfs: add -K flag to copy host keys to new initramfs
+
+this is mainly to copy the developer keys present on build system
+to the target initramfs. simplifies creating your own initramfs
+and when your key is not packaged.
+---
+ mkinitfs.in | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/mkinitfs.in b/mkinitfs.in
+index 555bea8..d69ccc5 100755
+--- a/mkinitfs.in
++++ b/mkinitfs.in
+@@ -133,6 +133,7 @@ initfs_firmware() {
+
+ initfs_apk_keys() {
+ mkdir -p "$tmpdir"/etc/apk/keys
++ [ "$hostkeys" ] && cp "/etc/apk/keys/"* "$tmpdir"/etc/apk/keys/
+ cp "${basedir}etc/apk/keys/"* "$tmpdir"/etc/apk/keys/
+ }
+
+@@ -148,7 +149,7 @@ initfs_cpio() {
+
+ usage() {
+ cat <<EOF
+-usage: mkinitfs [-hkLl] [-b basedir] [-c configfile] [-F features] [-f fstab]
++usage: mkinitfs [-hkKLl] [-b basedir] [-c configfile] [-F features] [-f fstab]
+ [-i initfile ] [-o outfile] [-t tempdir] [kernelversion]"
+ options:
+ -b prefix files and kernel modules with basedir
+@@ -158,6 +159,7 @@ options:
+ -h print this help
+ -i use initfile as init instead of $init
+ -k keep tempdir
++ -K copy also host keys to initramfs
+ -l only list files that would have been used
+ -L list available features
+ -o set another outfile
+@@ -171,7 +173,7 @@ EOF
+ # main
+
+
+-while getopts "b:c:f:F:hi:kLlo:qt:" opt; do
++while getopts "b:c:f:F:hi:kKLlo:qt:" opt; do
+ case "$opt" in
+ b) basedir="$OPTARG";;
+ c) config="$OPTARG";;
+@@ -180,6 +182,7 @@ while getopts "b:c:f:F:hi:kLlo:qt:" opt; do
+ h) usage;;
+ i) init=$OPTARG;;
+ k) keeptmp=1;;
++ K) hostkeys=1;;
+ L) list_features=1;;
+ l) list_sources=1;;
+ o) outfile="$OPTARG";;
+--
+2.9.3
+