Subject: [alpine-devel] [PATCH] main/alpine-base: split keys into alpine-apk-keys

From: Pierre Carrier <[email-masked]>
Date: Thu, 18 Apr 2013 02:10:50 +0200

This will make bootstraping minimal chroots, where configuration systems and
init systems might not be desired, easier.

An example of bootstrap process where keys require special handling:
https://gist.github.com/pcarrier/5407853
---
 main/alpine-apk-keys/APKBUILD                      | 35 ++++++++++++++++++++++
 [email-masked] |  9 ++++++
 main/alpine-apk-keys/buildozer-50d1ba71.rsa.pub    |  9 ++++++
 main/alpine-base/APKBUILD                          | 19 ++----------
 [email-masked] |  9 ------
 main/alpine-base/buildozer-50d1ba71.rsa.pub        |  9 ------
 6 files changed, 55 insertions(+), 35 deletions(-)
 create mode 100644 main/alpine-apk-keys/APKBUILD
 create mode 100644 main/alpine-apk-keys/[email-masked]
 create mode 100644 main/alpine-apk-keys/buildozer-50d1ba71.rsa.pub
 delete mode 100644 main/alpine-base/[email-masked]
 delete mode 100644 main/alpine-base/buildozer-50d1ba71.rsa.pub

diff --git a/main/alpine-apk-keys/APKBUILD b/main/alpine-apk-keys/APKBUILD
new file mode 100644
index 0000000..ab5d45f
--- /dev/null
+++ b/main/alpine-apk-keys/APKBUILD
@@ -0,0 +1,35 @@
+# Contributor: Pierre Carrier <[email-masked]>
+# Maintainer: Natanael Copa <[email-masked]>
+pkgname=alpine-apk-keys
+pkgver=20130418
+pkgrel=0
+pkgdesc="APK keys for the Alpine project"
+url="http://alpinelinux.org"
+arch="noarch"
+license="GPL"
+depends=
+makedepends=
+install=
+subpackages=
+source="http://dev.alpinelinux.org/~ncopa/alpine/[email-masked]
+	[email-masked]
+	buildozer-50d1ba71.rsa.pub"
+
+build() {
+	return 0
+}
+
+package() {
+	# copy keys for repos
+	mkdir -p "$pkgdir"/etc/apk/keys
+	install -m644 "$srcdir"/alpine-devel*.pub \
+		"$pkgdir"/etc/apk/keys/ || return 1
+	if [ "$ALPINE_LIBC" = "eglibc" ]; then
+		install -m644 "$srcdir"/buildozer-50d1ba71.rsa.pub \
+			"$pkgdir"/etc/apk/keys/ || return 1
+	fi
+}
+
+md5sums="75ee19ea2b03c12bc171647edc677f6f  [email-masked]
+ca7d06006181b625cf1ff4aefd51bd08  [email-masked]
+056daa8bf61a95a42971bf6c13bf300f  buildozer-50d1ba71.rsa.pub"
diff --git a/main/alpine-apk-keys/[email-masked] b/main/alpine-apk-keys/[email-masked]
new file mode 100644
index 0000000..6b5b860
--- /dev/null
+++ b/main/alpine-apk-keys/[email-masked]
@@ -0,0 +1,9 @@
+-----BEGIN PUBLIC KEY-----
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqy4H+5jKkBM+3pELVDBF
+VclECAxk9dy23mNhbfxH6GfBUtVaJVpYOF943JR2LNfD88DJR5EXnKPxQYZN1PWZ
+MDoJbUil7GPOMHAm5AHtXYJhYeOF+rSyv4y6H1lgYQVDzA9z+4GATMBhqJ8oRrCy
+lAJ/vksY9PFkuK8oyygTxpc7ICpUMMLwIMwLMdVR4API2kaLfg9TlMpVGmQhOCRZ
+VygfN4H89n9ekPpSA0DHLSkKkRLzBlhtfw+Ho2fcw9BCU0Uj10pK6q0V+m2+r8aE
+07LZKH9NnddMaEJ+I58FwmxJRzt4+gKpiPhV4OHXLoJsXMLYhjV8kM/qbgASfW71
+jQIDAQAB
+-----END PUBLIC KEY-----
diff --git a/main/alpine-apk-keys/buildozer-50d1ba71.rsa.pub b/main/alpine-apk-keys/buildozer-50d1ba71.rsa.pub
new file mode 100644
index 0000000..0a225b5
--- /dev/null
+++ b/main/alpine-apk-keys/buildozer-50d1ba71.rsa.pub
@@ -0,0 +1,9 @@
+-----BEGIN PUBLIC KEY-----
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1fQ6oN0Q78rKw/sv5c1B
+41LLWkdUG4nYa+6c8v45FcMYcVnSObtXGTG12ABjTfZwquEd9ubx1X/afKMwxeaQ
+2x0zI5HtFueXZBPmV5XpfkrxjY23ubVY93LT+eqNf1En/inPZM4Bn9UGNXxceBU7
+nVkDmmWuA/D2RTSjdF4JksuhAewT95yLqtNZLq5qNQ5ImKnlkao24415/2p3rHCl
+8kH9YEBR1bQAh5HnCVX8k1D5ULuET2vEymA6H7byd60j0UcycgsJpHNNUueBPbSI
+BtNvSDNSm/vV5AaWU/cIGmpBFxTlGUtEfH/0jWIVpWaI9ngYV78mU1N9df0vZ657
+hQIDAQAB
+-----END PUBLIC KEY-----
diff --git a/main/alpine-base/APKBUILD b/main/alpine-base/APKBUILD
index f7a5ded..84afb0a 100644
--- a/main/alpine-base/APKBUILD
+++ b/main/alpine-base/APKBUILD
@@ -7,29 +7,18 @@ pkgdesc="Meta package for minimal alpine base"
 url="http://alpinelinux.org"
 arch="noarch"
 license="GPL"
-depends="alpine-baselayout alpine-conf apk-tools busybox busybox-initscripts
-	openrc libc-utils"
+depends="alpine-baselayout alpine-conf apk-tools alpine-apk-keys
+         busybox busybox-initscripts openrc libc-utils"
 makedepends=
 install=
 subpackages=
 replaces="alpine-baselayout"
-source="http://dev.alpinelinux.org/~ncopa/alpine/[email-masked]
-	[email-masked]
-	buildozer-50d1ba71.rsa.pub"
 
 build() {
 	return 0
 }
 
 package() {
-	# copy keys for repos
-	mkdir -p "$pkgdir"/etc/apk/keys
-	install -m644 "$srcdir"/alpine-devel*.pub \
-		"$pkgdir"/etc/apk/keys/ || return 1
-	if [ "$ALPINE_LIBC" = "eglibc" ]; then
-		install -m644 "$srcdir"/buildozer-50d1ba71.rsa.pub \
-			"$pkgdir"/etc/apk/keys/ || return 1
-	fi
 	# create /etc/alpine-release
 	echo $pkgver > "$pkgdir"/etc/alpine-release
 
@@ -40,7 +29,3 @@ Kernel \\r on an \\m (\\l)
 
 EOF
 }
-
-md5sums="75ee19ea2b03c12bc171647edc677f6f  [email-masked]
-ca7d06006181b625cf1ff4aefd51bd08  [email-masked]
-056daa8bf61a95a42971bf6c13bf300f  buildozer-50d1ba71.rsa.pub"
diff --git a/main/alpine-base/[email-masked] b/main/alpine-base/[email-masked]
deleted file mode 100644
index 6b5b860..0000000
--- a/main/alpine-base/[email-masked]
+++ /dev/null
@@ -1,9 +0,0 @@
------BEGIN PUBLIC KEY-----
-MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqy4H+5jKkBM+3pELVDBF
-VclECAxk9dy23mNhbfxH6GfBUtVaJVpYOF943JR2LNfD88DJR5EXnKPxQYZN1PWZ
-MDoJbUil7GPOMHAm5AHtXYJhYeOF+rSyv4y6H1lgYQVDzA9z+4GATMBhqJ8oRrCy
-lAJ/vksY9PFkuK8oyygTxpc7ICpUMMLwIMwLMdVR4API2kaLfg9TlMpVGmQhOCRZ
-VygfN4H89n9ekPpSA0DHLSkKkRLzBlhtfw+Ho2fcw9BCU0Uj10pK6q0V+m2+r8aE
-07LZKH9NnddMaEJ+I58FwmxJRzt4+gKpiPhV4OHXLoJsXMLYhjV8kM/qbgASfW71
-jQIDAQAB
------END PUBLIC KEY-----
diff --git a/main/alpine-base/buildozer-50d1ba71.rsa.pub b/main/alpine-base/buildozer-50d1ba71.rsa.pub
deleted file mode 100644
index 0a225b5..0000000
--- a/main/alpine-base/buildozer-50d1ba71.rsa.pub
+++ /dev/null
@@ -1,9 +0,0 @@
------BEGIN PUBLIC KEY-----
-MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1fQ6oN0Q78rKw/sv5c1B
-41LLWkdUG4nYa+6c8v45FcMYcVnSObtXGTG12ABjTfZwquEd9ubx1X/afKMwxeaQ
-2x0zI5HtFueXZBPmV5XpfkrxjY23ubVY93LT+eqNf1En/inPZM4Bn9UGNXxceBU7
-nVkDmmWuA/D2RTSjdF4JksuhAewT95yLqtNZLq5qNQ5ImKnlkao24415/2p3rHCl
-8kH9YEBR1bQAh5HnCVX8k1D5ULuET2vEymA6H7byd60j0UcycgsJpHNNUueBPbSI
-BtNvSDNSm/vV5AaWU/cIGmpBFxTlGUtEfH/0jWIVpWaI9ngYV78mU1N9df0vZ657
-hQIDAQAB
------END PUBLIC KEY-----
-- 
1.8.2.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Natanael Copa <[email-masked]>
Date: Thu, 18 Apr 2013 08:18:04 +0200

On Thu, 18 Apr 2013 02:10:50 +0200

> init systems might not be desired, easier.

I saw you message on IRC before I opened my email, so I have pushed a similar change. I think they only difference I did was call the package alpine-keys.

Thanks!

-nc

---