aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-01-07 15:04:08 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-01-07 15:04:08 +0000
commit013340a79cc4988a750470808d834f3549d9fd98 (patch)
treee1c19adfdb38f22a42b67ac3209a96ae031ad60e
parent562d57023d07eae5f3a97e1df7862a6bf505a99a (diff)
downloadalpine_aports-013340a79cc4988a750470808d834f3549d9fd98.tar.bz2
alpine_aports-013340a79cc4988a750470808d834f3549d9fd98.tar.xz
alpine_aports-013340a79cc4988a750470808d834f3549d9fd98.zip
main/mkinitfs: make root readonly for world
backported patch
-rw-r--r--main/mkinitfs/0001-init-make-readonly-for-world-when-tmpfs.patch28
-rw-r--r--main/mkinitfs/APKBUILD4
2 files changed, 31 insertions, 1 deletions
diff --git a/main/mkinitfs/0001-init-make-readonly-for-world-when-tmpfs.patch b/main/mkinitfs/0001-init-make-readonly-for-world-when-tmpfs.patch
new file mode 100644
index 0000000000..b777432b33
--- /dev/null
+++ b/main/mkinitfs/0001-init-make-readonly-for-world-when-tmpfs.patch
@@ -0,0 +1,28 @@
1From 666c4d431cd585ce45df93bef58ada648bf88b55 Mon Sep 17 00:00:00 2001
2From: Natanael Copa <ncopa@alpinelinux.org>
3Date: Fri, 7 Jan 2011 12:48:39 +0000
4Subject: [PATCH 1/3] init: make / readonly for world when tmpfs
5
6---
7 initramfs-init.in | 4 ++--
8 1 files changed, 2 insertions(+), 2 deletions(-)
9
10diff --git a/initramfs-init.in b/initramfs-init.in
11index d140d75..8604c12 100755
12--- a/initramfs-init.in
13+++ b/initramfs-init.in
14@@ -328,9 +328,9 @@ if [ "$SINGLEMODE" = "yes" ]; then
15 fi
16
17 # mount tmpfs sysroot
18-root_opts=
19+root_opts="-o mode=0755"
20 if [ -n "$KOPT_root_size" ]; then
21- root_opts="-o size=$KOPT_root_size"
22+ root_opts="$root_opts,size=$KOPT_root_size"
23 fi
24 mount -t tmpfs $root_opts tmpfs $sysroot
25
26--
271.7.3.5
28
diff --git a/main/mkinitfs/APKBUILD b/main/mkinitfs/APKBUILD
index a970586612..38a2821bf7 100644
--- a/main/mkinitfs/APKBUILD
+++ b/main/mkinitfs/APKBUILD
@@ -1,12 +1,13 @@
1# Maintainer: Natanael Copa <ncopa@alpinelinux.org> 1# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
2pkgname=mkinitfs 2pkgname=mkinitfs
3pkgver=2.1.2 3pkgver=2.1.2
4pkgrel=0 4pkgrel=1
5pkgdesc="Tool to generate initramfs images for Alpine" 5pkgdesc="Tool to generate initramfs images for Alpine"
6url=http://git.alpinelinux.org/cgit/mkinitfs 6url=http://git.alpinelinux.org/cgit/mkinitfs
7depends="busybox apk-tools>=2.0" 7depends="busybox apk-tools>=2.0"
8triggers="$pkgname.trigger:/usr/share/kernel/*" 8triggers="$pkgname.trigger:/usr/share/kernel/*"
9source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2 9source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2
10 0001-init-make-readonly-for-world-when-tmpfs.patch
10 eglibc.patch 11 eglibc.patch
11 " 12 "
12license="GPL-2" 13license="GPL-2"
@@ -31,4 +32,5 @@ package() {
31 make install DESTDIR="$pkgdir" || return 1 32 make install DESTDIR="$pkgdir" || return 1
32} 33}
33md5sums="e35426eb23b379a648500a353031e719 mkinitfs-2.1.2.tar.bz2 34md5sums="e35426eb23b379a648500a353031e719 mkinitfs-2.1.2.tar.bz2
35e38e2f5c2b22b2789b5bc03aacba4d2d 0001-init-make-readonly-for-world-when-tmpfs.patch
34e59c2f7de496fe430b07e32fd812ebe0 eglibc.patch" 36e59c2f7de496fe430b07e32fd812ebe0 eglibc.patch"