diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-09-30 06:23:01 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-09-30 06:23:09 +0000 |
commit | 0b0c58933b02cee6eeb807c0367c01923cf3ce72 (patch) | |
tree | 82b5a52935fb3ecf8a7b4f4d001030399ecb6ae7 | |
parent | 7ce6b74947517cc097bfb427bef26e54f8da4149 (diff) | |
download | alpine_aports-0b0c58933b02cee6eeb807c0367c01923cf3ce72.tar.bz2 alpine_aports-0b0c58933b02cee6eeb807c0367c01923cf3ce72.tar.xz alpine_aports-0b0c58933b02cee6eeb807c0367c01923cf3ce72.zip |
main/alpine-conf: upgrade to 2.0_rc7
-rw-r--r-- | main/alpine-conf/0001-setup-disk-fix-find_disks.patch | 76 | ||||
-rw-r--r-- | main/alpine-conf/APKBUILD | 9 |
2 files changed, 3 insertions, 82 deletions
diff --git a/main/alpine-conf/0001-setup-disk-fix-find_disks.patch b/main/alpine-conf/0001-setup-disk-fix-find_disks.patch deleted file mode 100644 index 2b5453d6bf..0000000000 --- a/main/alpine-conf/0001-setup-disk-fix-find_disks.patch +++ /dev/null | |||
@@ -1,76 +0,0 @@ | |||
1 | From 5572e8a3db95f179b3433e5ea5f8c6fa2c8c65ab Mon Sep 17 00:00:00 2001 | ||
2 | From: Natanael Copa <ncopa@alpinelinux.org> | ||
3 | Date: Tue, 29 Sep 2009 09:40:53 +0000 | ||
4 | Subject: [PATCH] setup-disk: fix find_disks | ||
5 | |||
6 | The old way did not detect ida/c0d0. The new should detect it. | ||
7 | We also filter out md devices. | ||
8 | --- | ||
9 | setup-disk.in | 42 ++++++++++++++++++++++++++++++++---------- | ||
10 | 1 files changed, 32 insertions(+), 10 deletions(-) | ||
11 | |||
12 | diff --git a/setup-disk.in b/setup-disk.in | ||
13 | index d53fba1..33cc868 100644 | ||
14 | --- a/setup-disk.in | ||
15 | +++ b/setup-disk.in | ||
16 | @@ -146,25 +146,47 @@ find_swap_size() { | ||
17 | |||
18 | has_mounted_part() { | ||
19 | local p | ||
20 | - # parse /proc/mounts for moutned devices | ||
21 | + # parse /proc/mounts for mounted devices | ||
22 | for p in $(awk '$1 ~ /^\/dev\// {gsub("/dev/", "", $1); print $1}' \ | ||
23 | /proc/mounts); do | ||
24 | - if [ -e /sys/block/$1/$p ]; then | ||
25 | - return 0 | ||
26 | - fi | ||
27 | + [ -e /sys/block/$1/$p ] && return 0 | ||
28 | done | ||
29 | return 1 | ||
30 | } | ||
31 | |||
32 | +has_holders() { | ||
33 | + local i | ||
34 | + # check if device is used by any md devices | ||
35 | + for i in $1/holders/* $1/*/holders/*; do | ||
36 | + [ -e "$i" ] && return 0 | ||
37 | + done | ||
38 | + return 1 | ||
39 | +} | ||
40 | + | ||
41 | +is_available_disk() { | ||
42 | + local dev=$1 | ||
43 | + local b=$(echo $p | sed 's:/:!:g') | ||
44 | + | ||
45 | + # check if its a "root" block device and not a partition | ||
46 | + [ -e /sys/block/$b ] || return 1 | ||
47 | + | ||
48 | + # check so it does not have mounted partitions | ||
49 | + has_mounted_part $dev && return 1 | ||
50 | + | ||
51 | + # check so its not part of an md setup | ||
52 | + has_holders /sys/block/$b && return 1 | ||
53 | + | ||
54 | + # check so its not an md device | ||
55 | + [ -e /sys/block/$b/md ] && return 1 | ||
56 | + | ||
57 | + return 0 | ||
58 | +} | ||
59 | + | ||
60 | find_disks() { | ||
61 | - local p= disks= | ||
62 | + local p= | ||
63 | for p in $(awk '$1 ~ /[0-9]+/ {print $4}' /proc/partitions); do | ||
64 | - b=$(echo $p | sed 's:/:!:g') | ||
65 | - if [ -e /sys/block/$b/device ] && ! has_mounted_part $p; then | ||
66 | - disks="$disks $p" | ||
67 | - fi | ||
68 | + is_available_disk $p && echo -n " $p" | ||
69 | done | ||
70 | - echo $disks | ||
71 | } | ||
72 | |||
73 | useall() { | ||
74 | -- | ||
75 | 1.6.4.4 | ||
76 | |||
diff --git a/main/alpine-conf/APKBUILD b/main/alpine-conf/APKBUILD index 0ffcb1ff10..18aa74a5b6 100644 --- a/main/alpine-conf/APKBUILD +++ b/main/alpine-conf/APKBUILD | |||
@@ -1,18 +1,16 @@ | |||
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_rc6 | 3 | pkgver=2.0_rc7 |
4 | pkgrel=1 | 4 | pkgrel=0 |
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-setup-disk-fix-find_disks.patch | ||
10 | " | 9 | " |
11 | license="GPL-2" | 10 | license="GPL-2" |
12 | 11 | ||
13 | build() { | 12 | build() { |
14 | cd "$srcdir/$pkgname-$pkgver" | 13 | cd "$srcdir/$pkgname-$pkgver" |
15 | patch -p1 -i ../0001-setup-disk-fix-find_disks.patch || return 1 | ||
16 | 14 | ||
17 | make || return 1 | 15 | make || return 1 |
18 | make install PREFIX= DESTDIR="$pkgdir" | 16 | make install PREFIX= DESTDIR="$pkgdir" |
@@ -20,5 +18,4 @@ build() { | |||
20 | ln -s lbu "$pkgdir"/sbin/lbu_$i | 18 | ln -s lbu "$pkgdir"/sbin/lbu_$i |
21 | done | 19 | done |
22 | } | 20 | } |
23 | md5sums="52d08eaff7ad57581106418deed94d7d alpine-conf-2.0_rc6.tar.bz2 | 21 | md5sums="8b44c02500d646dd64368904762d236e alpine-conf-2.0_rc7.tar.bz2" |
24 | cb6b8b50e4098174ce20245faeeb84ea 0001-setup-disk-fix-find_disks.patch" | ||