diff options
-rw-r--r-- | main/alpine-conf/0002-setup-disk-copy-apk-config-to-new-root.patch | 38 | ||||
-rw-r--r-- | main/alpine-conf/APKBUILD | 8 |
2 files changed, 43 insertions, 3 deletions
diff --git a/main/alpine-conf/0002-setup-disk-copy-apk-config-to-new-root.patch b/main/alpine-conf/0002-setup-disk-copy-apk-config-to-new-root.patch new file mode 100644 index 0000000000..066c8a02e3 --- /dev/null +++ b/main/alpine-conf/0002-setup-disk-copy-apk-config-to-new-root.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 2e3bdc6d581b3efc5446d3b765272f7125bc0cba Mon Sep 17 00:00:00 2001 | ||
2 | From: Natanael Copa <ncopa@alpinelinux.org> | ||
3 | Date: Thu, 6 Aug 2009 12:08:06 +0000 | ||
4 | Subject: [PATCH 2/2] setup-disk: copy apk config to new root | ||
5 | |||
6 | --- | ||
7 | setup-disk.in | 7 +++++-- | ||
8 | 1 files changed, 5 insertions(+), 2 deletions(-) | ||
9 | |||
10 | diff --git a/setup-disk.in b/setup-disk.in | ||
11 | index 6a90d3a..e1a2c6d 100644 | ||
12 | --- a/setup-disk.in | ||
13 | +++ b/setup-disk.in | ||
14 | @@ -42,8 +42,12 @@ install_mounted_root() { | ||
15 | |||
16 | echon "Installing system on $rootdev: " | ||
17 | lbu package - | tar -C "$mnt" -zx | ||
18 | + # apk reads config from target root so we need to copy the config | ||
19 | + mkdir -p "$mnt"/etc/apk/keys/ | ||
20 | + cp /etc/apk/keys/* "$mnt"/etc/apk/keys/ | ||
21 | + | ||
22 | apk add -q --progress --root "$mnt" $(cat "$mnt"/var/lib/apk/world) \ | ||
23 | - linux-grsec acct mkinitfs | ||
24 | + acct linux-grsec alpine-base >/dev/null || return 1 | ||
25 | echo "" | ||
26 | # make things bootable | ||
27 | kernel=$(ls "$mnt"/lib/modules) | ||
28 | @@ -61,7 +65,6 @@ install_mounted_root() { | ||
29 | rootdisk="$rootdisk /dev/${i}" | ||
30 | done | ||
31 | fi | ||
32 | - chroot "$mnt" /sbin/mkinitfs -F "$features" $kernel | ||
33 | |||
34 | # create an extlinux.conf | ||
35 | sed '/append initrd/d' /media/*/syslinux.cfg > "$mnt"/boot/extlinux.conf | ||
36 | -- | ||
37 | 1.6.4 | ||
38 | |||
diff --git a/main/alpine-conf/APKBUILD b/main/alpine-conf/APKBUILD index 46d5b9824c..e520e1e746 100644 --- a/main/alpine-conf/APKBUILD +++ b/main/alpine-conf/APKBUILD | |||
@@ -1,19 +1,20 @@ | |||
1 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> | 1 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> |
2 | pkgname=alpine-conf | 2 | pkgname=alpine-conf |
3 | pkgver=2.0_beta3 | 3 | pkgver=2.0_beta3 |
4 | pkgrel=1 | 4 | pkgrel=2 |
5 | pkgdesc="Alpine configuration management scripts" | 5 | pkgdesc="Alpine configuration management scripts" |
6 | url=http://git.alpinelinux.org/cgit/$pkgname | 6 | url=http://git.alpinelinux.org/cgit/$pkgname |
7 | depends="openrc" | 7 | depends="openrc" |
8 | source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2 | 8 | source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2 |
9 | 0001-lbu-remove-packages.list-if-exist.patch | 9 | 0001-lbu-remove-packages.list-if-exist.patch |
10 | 0002-setup-disk-copy-apk-config-to-new-root.patch | ||
10 | " | 11 | " |
11 | license="GPL-2" | 12 | license="GPL-2" |
12 | 13 | ||
13 | build() { | 14 | build() { |
14 | cd "$srcdir/$pkgname-$pkgver" | 15 | cd "$srcdir/$pkgname-$pkgver" |
15 | patch -p1 -i ../0001-lbu-remove-packages.list-if-exist.patch || return 1 | 16 | patch -p1 -i ../0001-lbu-remove-packages.list-if-exist.patch || return 1 |
16 | 17 | patch -p1 -i ../0002-setup-disk-copy-apk-config-to-new-root.patch || return 1 | |
17 | make || return 1 | 18 | make || return 1 |
18 | make install PREFIX= DESTDIR="$pkgdir" | 19 | make install PREFIX= DESTDIR="$pkgdir" |
19 | for i in commit exclude include status update; do | 20 | for i in commit exclude include status update; do |
@@ -21,4 +22,5 @@ build() { | |||
21 | done | 22 | done |
22 | } | 23 | } |
23 | md5sums="7786d6d526e96a3fdf51b9284d063caa alpine-conf-2.0_beta3.tar.bz2 | 24 | md5sums="7786d6d526e96a3fdf51b9284d063caa alpine-conf-2.0_beta3.tar.bz2 |
24 | b09f9702fc6599fcb7d9bfbc855c8b5c 0001-lbu-remove-packages.list-if-exist.patch" | 25 | b09f9702fc6599fcb7d9bfbc855c8b5c 0001-lbu-remove-packages.list-if-exist.patch |
26 | 6b32656c7d90567084753471fe9df972 0002-setup-disk-copy-apk-config-to-new-root.patch" | ||