Skip to content
Snippets Groups Projects
Commit 8d2f3587 authored by Natanael Copa's avatar Natanael Copa
Browse files

main/alpine-conf: upgrade to 3.3.0_rc1

parent 16d6aa2a
No related branches found
No related tags found
No related merge requests found
From 2a97a54f983f16aaea7d9ef77023d32ddcf8b6c7 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Tue, 16 Jun 2015 10:31:14 +0200
Subject: [PATCH] setup-apkrepos: fix speed test of mirrors
Some mirrors error on double / in path.
ref #4365
---
setup-apkrepos.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup-apkrepos.in b/setup-apkrepos.in
index 1956b19..1bbccca 100644
--- a/setup-apkrepos.in
+++ b/setup-apkrepos.in
@@ -48,7 +48,7 @@ find_fastest_mirror() {
local url=
for url in $MIRRORS; do
local time=$(time_cmd apk update --quiet $apk_root_opt \
- --repository $url/edge/main \
+ --repository ${url%/}/edge/main \
--repositories-file /dev/null)
if [ -n "$time" ]; then
echo "$time $url"
--
2.4.5
From 0cc00b53d8e918699413dbe1ddd1989bb4ddec4a Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Wed, 15 Jul 2015 15:10:42 +0200
Subject: [PATCH] setup-bootable: warn and fix kernel name change
---
setup-bootable.in | 103 +++++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 94 insertions(+), 9 deletions(-)
diff --git a/setup-bootable.in b/setup-bootable.in
index 116f776..35a5f73 100644
--- a/setup-bootable.in
+++ b/setup-bootable.in
@@ -84,10 +84,87 @@ find_disk_dev() {
return 1
}
+find_syslinux_cfg() {
+ # find where new syslinux.cfg is
+ for i in boot/syslinux/syslinux.cfg syslinux.cfg; do
+ if [ -e "$1"/$i ]; then
+ syslinux_cfg=$i
+ vecho "Found $syslinux_cfg"
+ break
+ fi
+ done
+}
+
+fix_syslinux_kernel() {
+ echo "Fixing $syslinux_cfg: kernel $1 -> $2"
+ sed -i -e "/^\s*[Kk][Ee][Rr][Nn][Ee][Ll]\s/s|$1|$2|" \
+ "$destdir/$syslinux_cfg"
+}
+
+fix_syslinux_initrd() {
+ echo "Fixing $syslinux_cfg: initrd $1 -> $2"
+ sed -i -e "/^\s*[Ii][Nn][Ii][Tt][Rr][Dd]\s/s|$1|$2|" \
+ -e "/^\s*[Aa][Pp][Pp][Ee][Nn][Dd]\s/s|initrd=$1|initrd=$2|" \
+ "$destdir/$syslinux_cfg"
+}
+
+check_syslinux() {
+ if [ -z "$syslinux_cfg" ]; then
+ find_syslinux_cfg "$destdir"
+ fi
+ if [ -z "$syslinux_cfg" ]; then
+ die "Could not find any syslinux.cfg. Aborting"
+ fi
+
+ # kernels
+ for i in $(awk 'tolower($1) == "kernel" {print $2}' "$destdir"/$syslinux_cfg); do
+ k="${destdir%/}/${i#/}"
+ f=${k##*/}
+
+ if [ -e "$k" ] && [ "${f#vmlinuz}" != "$f" ]; then
+ continue
+ fi
+
+ if [ -e "${k%/*}"/vmlinuz-$f ] && [ -n "$fix_syslinux_cfg" ]; then
+ fix_syslinux_kernel "$i" "${i%/*}"/vmlinuz-$f
+ elif ! [ -e "$k" ]; then
+ echo "Warning: $syslinux_cfg: kernel $k was not found"
+ echo " Run $0 -c -f "$destdir" to fix"
+ fi
+ done
+
+ #initramfs
+ initrds=$(awk 'tolower($1) == "initrd" {print $2}' \
+ "$destdir"/$syslinux_cfg)
+ for i in $(awk 'tolower($1) == "append" {print $0}' \
+ "$destdir"/$syslinux_cfg); do
+ case $i in
+ initrd=*) initrds=${i#initrd=};;
+ esac
+ done
+
+ for i in $initrds; do
+ if [ -e "$destdir"/$i ]; then
+ continue
+ fi
+ fname=${i##*/}
+ flavor=${fname%.gz}
+
+ new=${i%/*}/initramfs-$flavor
+ if [ -e "$destdir"/$new ] && [ -n "$fix_syslinux_cfg" ]; then
+ fix_syslinux_initrd "$i" "$new"
+ else
+ echo "Warning: initrd $i was not found. System will likely not boot"
+ echo " Run $0 -f -c "$destdir" to fix"
+ fi
+ done
+}
+
usage() {
cat <<__EOF__
$prog $version
usage: $prog [-fhUusv] SOURCE [DEST]
+ $prog -c DIR
Copy the contents of SOURCE to DEST and make DEST bootable.
@@ -97,19 +174,24 @@ or a device. If DEST is ommitted /media/usb will be used.
Options:
-f Force overwrite existing files. Will overwrite syslinux.cfg if upgrade.
-h Show this help.
+ -k fix kernel and initrd name in syslinux.cfg if needed.
-U Replace current alpine_dev in syslinux.cfg with UUID if UUID found.
-u Upgrade mode. Keep existing syslinux.cfg and don't run syslinux.
-s Force run syslinux, even if upgrade mode.
-v Verbose mode. Display whats going on.
+ -c Check syslinux.cfg in destination DIR. Use with -f to fix.
+
__EOF__
exit 1
}
-while getopts "fhUusv" opt; do
+while getopts "c:fhkUusv" opt; do
case "$opt" in
- f) force=1;;
+ c) check_syslinux="$OPTARG";;
+ f) force=1; fix_syslinux_cfg=1;;
h) usage;;
+ k) fix_syslinux_cfg=1;;
U) replace_alpine_dev=1;;
u) upgrade=1;;
s) syslinux=1;;
@@ -122,6 +204,11 @@ shift $(($OPTIND - 1))
src=${1}
dest=${2:-/media/usb}
+if [ -n "$check_syslinux" ]; then
+ destdir="$check_syslinux"
+ check_syslinux
+ exit 0
+fi
[ -z "$src" ] && usage
@@ -235,13 +322,8 @@ elif [ -n "$srcurl" ]; then
fi
# find where new syslinux.cfg is
-for i in boot/syslinux/syslinux.cfg syslinux.cfg; do
- if [ -e "$destdir"/.new/$i ]; then
- syslinux_cfg=$i
- vecho "Found $syslinux_cfg"
- break
- fi
-done
+find_syslinux_cfg "$destdir"/.new
+
# abort early in case unexpected trouble
if [ -z "$syslinux_cfg" ]; then
die "Could not find any syslinux.cfg on new iso?"
@@ -288,6 +370,9 @@ if [ -n "$replace_alpine_dev" -o -z "$upgrade" ] && [ -n "$UUID" ]; then
"$destdir"/$syslinux_cfg
fi
+# verify syslinux.cfg
+check_syslinux
+
# cleanup
[ -z "$keep_old" ] && rm -rf "$destdir"/.old "$destdir"/.new
--
2.4.5
From bf182e3346ef7aa42b7db5c9d7fbc431e78269e3 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Wed, 1 Jul 2015 14:17:07 +0000
Subject: [PATCH] setup-disk: add raid to initfs if root is on lvm
ref #4421
---
setup-disk.in | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/setup-disk.in b/setup-disk.in
index 9444b7e..e2798f9 100644
--- a/setup-disk.in
+++ b/setup-disk.in
@@ -234,6 +234,14 @@ install_mounted_root() {
# check if our root is on raid so we can feed mkinitfs and
# update-exlinux.conf with the proper kernel module params
for dev in $rootdev $pvs; do
+
+ # check if we need hardware raid drivers
+ case $dev in
+ /dev/cciss/*)
+ initfs_features="${initfs_features% raid} raid"
+ ;;
+ esac
+
[ -e "/sys/block/${dev#/dev/}/md" ] || continue
local md=${dev#/dev/}
@@ -245,12 +253,6 @@ install_mounted_root() {
esac
done
- # check if we need hardware raid drivers
- case $rootdev in
- /dev/cciss/*)
- initfs_features="${initfs_features% raid} raid"
- ;;
- esac
if [ -n "$VERBOSE" ]; then
echo "Root device: $rootdev"
--
2.4.5
From dffde463b05beb124816357fd6ff24423b0e79f0 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Tue, 14 Jul 2015 07:21:07 +0000
Subject: [PATCH] setup-disk: fix btrfs root
fix typo in btrfs-progs. add kernel module eary so /dev/btrfs-control is
created.
ref #4445
---
setup-disk.in | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/setup-disk.in b/setup-disk.in
index e2798f9..55b6dcb 100644
--- a/setup-disk.in
+++ b/setup-disk.in
@@ -441,7 +441,9 @@ init_progs() {
case $ROOTFS in
ext*) fstools=e2fsprogs; mkfs_args="-q";;
xfs) fstools=xfsprogs; mkfs_args="-q";;
- btrfs) fstools=btrs-progs; mkfs_args="";;
+ # we need load btrfs module early to avoid the error message:
+ # 'failed to open /dev/btrfs-control'
+ btrfs) fstools=btrfs-progs; mkfs_args=""; modprobe btrfs;;
esac
apk add --quiet sfdisk e2fsprogs lvm2 $raidpkg syslinux $fstools $@
}
--
2.4.5
From bf5cbd06213b6fdd6dd24fb0c5dd2fe4ca3950f0 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Tue, 22 Sep 2015 14:55:54 +0200
Subject: [PATCH] setup-disk: fix detection of volume group
when we have a device like /dev/mapper/vg0-lv_root, then will the LV
name not match with lvs' first column.
---
setup-disk.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup-disk.in b/setup-disk.in
index 55b6dcb..6d021f7 100644
--- a/setup-disk.in
+++ b/setup-disk.in
@@ -152,7 +152,7 @@ supported_boot_fs() {
find_volume_group() {
local lv=${1##*/}
- lvs --noheadings "$1" | awk "\$1 == \"$lv\" {print \$2}"
+ lvs --noheadings "$1" | awk '{print $2}'
}
find_pvs_in_vg() {
--
2.5.3
From 21a2a17a6365f1d0c6ab2ba5826896e9b1491e99 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Mon, 10 Aug 2015 10:37:05 +0200
Subject: [PATCH] setup-timezone: fix use of -z option
ref #4518
---
setup-timezone.in | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/setup-timezone.in b/setup-timezone.in
index 6964f69..514f9ca 100644
--- a/setup-timezone.in
+++ b/setup-timezone.in
@@ -8,7 +8,7 @@ zroot=/usr/share/zoneinfo
usage() {
cat <<__EOF__
-usage: setup-timezone [-h] [-k|-i] [-z subdir of $zroot]
+usage: setup-timezone [-h] [-k|-i] [-z TIMEZONE]
Sets the timezone for the system.
@@ -16,7 +16,7 @@ options:
-h Show this help
-i Install tzdata and symlink instead of making a copy
-k Keep previous copies of tzdata
- -z Specify the timezone as a subdirectory of $zroot
+ -z Set given timezone. (relative $zroot)
__EOF__
exit 1
}
@@ -64,7 +64,7 @@ while getopts "hikz:" opt; do
h) usage;;
i) INSTALL_TZDATA=true;;
k) KEEP_TZDATA=true;;
- z) ZONEINFODIR="$OPTARG";;
+ z) ZONE="$OPTARG";;
esac
done
@@ -87,8 +87,8 @@ fi
while true; do
- if [ -n "$ZONEINFODIR" ]; then
- setup_tz "$ZONEINFODIR"
+ if [ -n "$ZONE" ]; then
+ setup_tz "$zroot"/"$ZONE"
break
fi
--
2.5.0
--- old/Makefile
+++ new/Makefile
@@ -76,7 +76,7 @@
install -m 755 -d $(DESTDIR)/$(PREFIX)/lib
install -m 755 $(LIB_FILES) $(DESTDIR)/$(PREFIX)/lib
install -m 755 -d $(DESTDIR)/$(sysconfdir)
- install -m 755 $(ETC_LBU_FILES) $(DESTDIR)/$(sysconfdir)
+ install -m 644 $(ETC_LBU_FILES) $(DESTDIR)/$(sysconfdir)
uninstall:
for i in $(SBIN_FILES); do \
--- old/setup-disk.in
+++ new/setup-disk.in
@@ -436,16 +436,17 @@
# install needed programs
init_progs() {
- local raidpkg=
+ local raidpkg= fs= fstools="e2fsprogs"
[ -n "$USE_RAID" ] && raidpkg="mdadm"
- case $ROOTFS in
- ext*) fstools=e2fsprogs; mkfs_args="-q";;
- xfs) fstools=xfsprogs; mkfs_args="-q";;
- # we need load btrfs module early to avoid the error message:
- # 'failed to open /dev/btrfs-control'
- btrfs) fstools=btrfs-progs; mkfs_args=""; modprobe btrfs;;
- esac
- apk add --quiet sfdisk e2fsprogs lvm2 $raidpkg syslinux $fstools $@
+ for fs in $BOOTFS $ROOTFS $VARFS; do
+ case $fs in
+ xfs) fstools="$fstools xfsprogs"; modprobe xfs;;
+ # we need load btrfs module early to avoid the error message:
+ # 'failed to open /dev/btrfs-control'
+ btrfs) fstools="$fstools btrfs-progs"; modprobe btrfs;;
+ esac
+ done
+ apk add --quiet sfdisk lvm2 $raidpkg syslinux $fstools $@
}
show_disk_info() {
@@ -522,7 +523,7 @@
# set up optional raid and create filesystem on boot device.
setup_boot_dev() {
- local disk= bootdev=
+ local disk= bootdev= mkfs_args="-q"
local part=$(for disk in $@; do find_boot_partition $disk; done)
set -- $part
bootdev=$1
@@ -540,7 +541,8 @@
--metadata=0.90 --quiet --run $@ $missing || return 1
bootdev=/dev/md0
fi
- mkfs.$BOOTFS -q $bootdev
+ [ "$BOOTFS" == "btrfs" ] && mkfs_args=""
+ mkfs.$BOOTFS $mkfs_args $bootdev
BOOT_DEV="$bootdev"
}
@@ -730,7 +732,8 @@
# setup
setup_root() {
- local root_dev="$1" boot_dev="$2"
+ local root_dev="$1" boot_dev="$2" mkfs_args="-q"
+ [ "$ROOTFS" == "btrfs" ] && mkfs_args=""
mkfs.$ROOTFS $mkfs_args "$root_dev"
mkdir -p "$SYSROOT"
mount -t $ROOTFS $root_dev "$SYSROOT" || return 1
@@ -917,6 +920,12 @@
-s Use SWAPSIZE MB instead of autodetecting swap size (Use 0 to disable swap)
-v Be more verbose about what is happening
+If BOOTFS, ROOTFS, VARFS are specified, then format a partition with specified
+filesystem. If not specified, the default filesystem is ext4.
+Supported filesystems for
+ boot: ext2, ext3, ext4, btrfs
+ root: ext2, ext3, ext4, btrfs, xfs
+ var: ext2, ext3, ext4, btrfs, xfs
__EOF__
exit 1
}
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=alpine-conf
pkgver=3.2.1
pkgrel=8
pkgver=3.3.0_rc1
pkgrel=0
pkgdesc="Alpine configuration management scripts"
url=http://git.alpinelinux.org/cgit/$pkgname
arch="all"
license="GPL2"
license="MIT"
depends="openrc>0.13"
source="http://dev.alpinelinux.org/archive/alpine-conf/alpine-conf-$pkgver.tar.xz
0001-setup-apkrepos-fix-speed-test-of-mirrors.patch
0001-setup-disk-add-raid-to-initfs-if-root-is-on-lvm.patch
0001-setup-disk-fix-btrfs-root.patch
0001-setup-bootable-warn-and-fix-kernel-name-change.patch
0001-setup-timezone-fix-use-of-z-option.patch
0001-setup-disk-fix-detection-of-volume-group.patch
0002-makefile_fix_lbu_conf_perms.patch
0002-setup-disk-fix-fs.patch
"
_builddir="$srcdir"/$pkgname-$pkgver
......@@ -42,30 +34,6 @@ package() {
done
}
md5sums="d8863487539eb41de219303addf71aa1 alpine-conf-3.2.1.tar.xz
f1439adcfc377c56b987b379b725f0af 0001-setup-apkrepos-fix-speed-test-of-mirrors.patch
f2da5b6cf6e4f1c1d24b59210b172bd8 0001-setup-disk-add-raid-to-initfs-if-root-is-on-lvm.patch
bb1acd69593e19a9ab686cf6b790bbdb 0001-setup-disk-fix-btrfs-root.patch
f73ccf7115d83a7230fd124c507e3c5c 0001-setup-bootable-warn-and-fix-kernel-name-change.patch
8a67f0ac0826102dc9dceab34c6e036e 0001-setup-timezone-fix-use-of-z-option.patch
6d8735a89245a5828760b0db80c19edd 0001-setup-disk-fix-detection-of-volume-group.patch
afb885ce5e0851a052a5678fa7072039 0002-makefile_fix_lbu_conf_perms.patch
4588eb258315445c6a537e5856f5eff8 0002-setup-disk-fix-fs.patch"
sha256sums="f0e7954bb1a5144f551694acfde818bbad4e42a575e7a8e3a06a777ade7a5d9d alpine-conf-3.2.1.tar.xz
e30d5fc4c1ae6af9673c543427561d027792c1bb26e3901ce954d15689dc66e9 0001-setup-apkrepos-fix-speed-test-of-mirrors.patch
6e532930bc263d004975fe1feac115f17452e9f80b5efb22f538e7ebcbb6636d 0001-setup-disk-add-raid-to-initfs-if-root-is-on-lvm.patch
1ec287f5ec4ca94af1b02067eb3a785e527a7658ed737b28e5f39c437db66625 0001-setup-disk-fix-btrfs-root.patch
8fdde27235e14dc1f0f8ed7edb1f086b792f6be060e329e8c2c59d9064b1ee3f 0001-setup-bootable-warn-and-fix-kernel-name-change.patch
c917e5e1e4f7cf7cb5a0cd9922d7e92654d761fb301977c02866a03f374fd184 0001-setup-timezone-fix-use-of-z-option.patch
cafb433dc1bef88a645b4c4504b207fb09392d112294219d706ac04984725c8c 0001-setup-disk-fix-detection-of-volume-group.patch
ebcddce2df3bbaf8f807eb9d4a46811c01c4f254e8577fd3b34fc22575e3439f 0002-makefile_fix_lbu_conf_perms.patch
59e88d552282291c9326f3d0b42761837464e5a6c5d288fb8eea76612df6a1a0 0002-setup-disk-fix-fs.patch"
sha512sums="20c11b134234708d86fe4cc093c4073df3496a43d13994d0df369066afed39a9a3c97cebacdbb6518f212e414c9456c31ee41bd600b3fc29e892448118a7b5e8 alpine-conf-3.2.1.tar.xz
135bd0a0638f14a90d896c31de09eb3aa08cd7b2b1452fa20fdf12d128282c5c9eee5c1d76f7d8b62714f15395f225bf61c9968ad04ff164e64e8924c89abbd6 0001-setup-apkrepos-fix-speed-test-of-mirrors.patch
cd2c1f3adef443edf4473719f1cf4f277336fb59527ba70ed30f1f2c87d3cc63afe55a009b5bb5666ff79784ea8a79730dfb67a37d8e3fd8fe8fd7eb88a564fc 0001-setup-disk-add-raid-to-initfs-if-root-is-on-lvm.patch
0d7e6ce26798ab42bf1e2cbda6421e811e949d427e1ff69210abd950686f5ff0a5d61404db9de160268ae976e768aba74f51814b8a9b6e318c32563f924a3965 0001-setup-disk-fix-btrfs-root.patch
df9c2cec67054390d8e8c81b797cfbf0f1b142faabe389f2adf99094b15642285ad683a875728cfff0f13ebb91b3d16eb1ded2ee889b0f9d29a6d05a2a584b83 0001-setup-bootable-warn-and-fix-kernel-name-change.patch
13062f853d30126d77c5201516d978bf30e154a8efd66b0869c7732550694a49e7ad45d29014242cb51a3917c8e7da6af99e51319792a2e89cb8ff9dd69ea08e 0001-setup-timezone-fix-use-of-z-option.patch
0aee56acd398d22af0dbee887a15c7bf1529c7c6b23618643078be1bd9db300f1fb1f4a2549cf09f21c29aa19d6510221399442582b8a6525f24a3c2f10c174e 0001-setup-disk-fix-detection-of-volume-group.patch
f24d781f75f1e6fcb7ce5d2351a6fb158eaee11b06fc1d1e73ccb01a22c889b07a0703453259a8e69c8281230527f33b60a3eb217cafff4b15261fb1b4f91044 0002-makefile_fix_lbu_conf_perms.patch
12f95213dd6ce50089e8428b4cdf72f2e4de1137bd5f85d34a7a52fa0116fb3dfb0abb8989d66db32600cf387fffe7ffb96f6f94dc87b8ae12159ecaa883ae6e 0002-setup-disk-fix-fs.patch"
md5sums="dc90de8e1c0971c125fe45f072d243e6 alpine-conf-3.3.0_rc1.tar.xz"
sha256sums="ddfa912d089bf9ee39b9a35a723dc84ed758eb57edd5b5bc19cd5b4cf00a4635 alpine-conf-3.3.0_rc1.tar.xz"
sha512sums="0a410f951b58af91d734aa2b56460565fad3c430c0602bea70aa722b0c6b9a2dc88f46cc526216891bc9f70f54acc22e9be0519fa6bebd8dc460f71829c513e4 alpine-conf-3.3.0_rc1.tar.xz"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment