summaryrefslogtreecommitdiffstats
path: root/main/mkinitfs
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-09-03 09:09:04 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-09-03 11:59:54 +0000
commit3465665270a03821fe7f7088fe4bb27086f8ab34 (patch)
treec478037bdd2a96b862e1e25db3bda92f3fe66025 /main/mkinitfs
parent3bb9b2ed2ad6caaf6a5fa85db040b9449f94f242 (diff)
downloadaports-3465665270a03821fe7f7088fe4bb27086f8ab34.tar.bz2
aports-3465665270a03821fe7f7088fe4bb27086f8ab34.tar.xz
main/mkinitfs: fix -b option
Diffstat (limited to 'main/mkinitfs')
-rw-r--r--main/mkinitfs/0001-mkinitfs-fix-b-option.patch43
-rw-r--r--main/mkinitfs/0001-mkinitfs-support-for-q.-echo-to-stdout-rather-than-s.patch52
-rw-r--r--main/mkinitfs/0002-init-fixes-for-new-apk-behaviour.patch65
-rw-r--r--main/mkinitfs/APKBUILD9
4 files changed, 49 insertions, 120 deletions
diff --git a/main/mkinitfs/0001-mkinitfs-fix-b-option.patch b/main/mkinitfs/0001-mkinitfs-fix-b-option.patch
new file mode 100644
index 000000000..c1c5b65b7
--- /dev/null
+++ b/main/mkinitfs/0001-mkinitfs-fix-b-option.patch
@@ -0,0 +1,43 @@
+From d64e5baefc7e1ca75e6f1ca50f28e96b30991c6a Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Thu, 3 Sep 2009 09:06:54 +0000
+Subject: [PATCH] mkinitfs: fix -b option
+
+---
+ mkinitfs.in | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/mkinitfs.in b/mkinitfs.in
+index e18b59c..0332151 100755
+--- a/mkinitfs.in
++++ b/mkinitfs.in
+@@ -16,7 +16,7 @@ _cp() {
+ local i
+ if [ -n "$list_sources" ]; then
+ for i in "$@"; do
+- echo $i
++ echo "$basedir"/$i
+ done
+ return
+ fi
+@@ -24,7 +24,7 @@ _cp() {
+ for i in "$@"; do
+ local dest="$tmpdir"/${i%/*}
+ mkdir -p "$dest"
+- cp -flLpR "$i" "$dest" 2>/dev/null || cp -pR "$i" "$dest"
++ cp -flLpR "$basedir"/"$i" "$dest" 2>/dev/null || cp -pR "$i" "$dest"
+ done
+ }
+
+@@ -121,7 +121,7 @@ initfs_kmods() {
+ [ -z "$list_sources" ] && rm -rf "$tmpdir"/lib/modules
+ files=$(find_kmods)
+ for file in $files; do
+- _cp "$basedir"/$file
++ _cp $file
+ done
+ [ -z "$list_sources" ] && depmod $kernel -b "$tmpdir"
+ }
+--
+1.6.4.2
+
diff --git a/main/mkinitfs/0001-mkinitfs-support-for-q.-echo-to-stdout-rather-than-s.patch b/main/mkinitfs/0001-mkinitfs-support-for-q.-echo-to-stdout-rather-than-s.patch
deleted file mode 100644
index 5b27ef09b..000000000
--- a/main/mkinitfs/0001-mkinitfs-support-for-q.-echo-to-stdout-rather-than-s.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 745fe99e8be2f889ff79a544dd6a314b69437258 Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Thu, 6 Aug 2009 09:24:24 +0000
-Subject: [PATCH 1/2] mkinitfs: support for -q. echo to stdout rather than stderr
-
----
- mkinitfs.in | 8 +++++---
- 1 files changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/mkinitfs.in b/mkinitfs.in
-index 5b7bfbd..c0746fe 100755
---- a/mkinitfs.in
-+++ b/mkinitfs.in
-@@ -152,6 +152,7 @@ options:
- -l only list files that would have been used
- -L list available features
- -o set another outfile
-+ -q Quiet mode
- -t use tempdir when creating initramfs image
-
- EOF
-@@ -161,7 +162,7 @@ EOF
- # main
-
-
--while getopts "b:c:f:F:hi:kLlo:t:" opt; do
-+while getopts "b:c:f:F:hi:kLlo:qt:" opt; do
- case "$opt" in
- b) basedir="$OPTARG";;
- c) config="$OPTARG";;
-@@ -173,6 +174,7 @@ while getopts "b:c:f:F:hi:kLlo:t:" opt; do
- L) list_features=1;;
- l) list_sources=1;;
- o) outfile="$OPTARG";;
-+ q) quiet=1;;
- t) tmpdir="$OPTARG";;
- *) usage;;
- esac
-@@ -218,8 +220,8 @@ if [ -z "$keeptmp" ]; then
- [ -d "$tmpdir" ] && rm -rf "$tmpdir"/*
- fi
-
--if [ -z "$list_sources" ]; then
-- echo "==> initramfs: creating $outfile" >&2
-+if [ -z "$list_sources" ] && [ -z "$quiet" ]; then
-+ echo "==> initramfs: creating $outfile"
- fi
- initfs_base || exit 1
- initfs_kmods || exit 1
---
-1.6.4
-
diff --git a/main/mkinitfs/0002-init-fixes-for-new-apk-behaviour.patch b/main/mkinitfs/0002-init-fixes-for-new-apk-behaviour.patch
deleted file mode 100644
index 422bcd932..000000000
--- a/main/mkinitfs/0002-init-fixes-for-new-apk-behaviour.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From a012d00b55499a918f32a0ca8bd4ae2421178dfd Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Thu, 6 Aug 2009 10:52:23 +0000
-Subject: [PATCH 2/2] init: fixes for new apk behaviour
-
----
- initramfs-init.in | 28 ++++++++++++++++------------
- 1 files changed, 16 insertions(+), 12 deletions(-)
-
-diff --git a/initramfs-init.in b/initramfs-init.in
-index 0b295f8..0ea081c 100755
---- a/initramfs-init.in
-+++ b/initramfs-init.in
-@@ -6,7 +6,7 @@ SINGLEMODE=no
- sysroot=/sysroot
-
- /bin/busybox mkdir -p /usr/bin /usr/sbin /proc /sys /dev $sysroot \
-- /media/cdrom /media/floppy /media/usb
-+ /media/cdrom /media/floppy /media/usb /tmp
- /bin/busybox --install -s
-
- # basic environment
-@@ -313,10 +313,6 @@ else
- rc_add savecache shutdown
- fi
-
--# copy the apk keys to sysroot
--mkdir -p "$sysroot"/etc/apk/keys
--cp -r /etc/apk/keys/* "$sysroot"/etc/apk/keys/ 2>/dev/null
--
- # let user override tmpfs size in fstab in apkovl
- if [ -f $sysroot/etc/fstab ]; then
- mountopts=$(awk '$2 == "/" && $3 == "tmpfs" { print $4 }' $sysroot/etc/fstab)
-@@ -342,13 +338,21 @@ if [ -n "$new_mnt" ] && [ "$new_mnt" != "$ALPINE_MNT" ]; then
- ALPINE_MNT="$new_mnt"
- fi
-
--# generate apk repositories file
--mkdir -p /etc/apk
--repo_opt=
--for i in $(find $ALPINE_MNT -name 'APK*.gz' -type f -maxdepth 3 \
-- | sed 's:/APK.*\.gz$::'); do
-- repo_opt="$repo_opt --repo $i"
--done
-+# copy keys so apk finds them. apk looks for stuff relative --root
-+mkdir -p $sysroot/etc/apk/keys/
-+cp -a /etc/apk/keys $sysroot/etc/apk
-+
-+# generate apk repositories file and --repo opt
-+echo "$(find $ALPINE_MNT -name .boot_repository -type f -maxdepth 3 \
-+ | sed 's:/.boot_repository$::')" > /tmp/repositories
-+
-+if [ ! -f $sysroot/etc/apk/repositories ]; then
-+ mv /tmp/repositories $sysroot/etc/apk/
-+else
-+ for i in $(cat /tmp/repositories); do
-+ repo_opt="$repo_opt --repo $i"
-+ done
-+fi
-
- # install new root
- ebegin "Installing packages to root filesystem"
---
-1.6.4
-
diff --git a/main/mkinitfs/APKBUILD b/main/mkinitfs/APKBUILD
index 685c151aa..6a2252964 100644
--- a/main/mkinitfs/APKBUILD
+++ b/main/mkinitfs/APKBUILD
@@ -1,18 +1,21 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mkinitfs
pkgver=2.0_rc3
-pkgrel=0
+pkgrel=1
pkgdesc="Tool to generate initramfs images for Alpine"
url=http://git.alpinelinux.org/cgit/mkinitfs
depends="busybox"
source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2
+ 0001-mkinitfs-fix-b-option.patch
"
license="GPL-2"
build() {
cd "$srcdir"/$pkgname-$pkgver
+ patch -p1 -i ../0001-mkinitfs-fix-b-option.patch || return 1
- make
+ make || return 1
make install DESTDIR="$pkgdir" || return 1
}
-md5sums="7f0e2ec039d10a01f46a7a049d6cbea0 mkinitfs-2.0_rc3.tar.bz2"
+md5sums="7f0e2ec039d10a01f46a7a049d6cbea0 mkinitfs-2.0_rc3.tar.bz2
+49292145e7f94c047e705e329d2c3708 0001-mkinitfs-fix-b-option.patch"