Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/utils/embedded PR/49596: mkimage: incorrect permissi...
details: https://anonhg.NetBSD.org/src/rev/6fd1b50f453c
branches: trunk
changeset: 335781:6fd1b50f453c
user: skrll <skrll%NetBSD.org@localhost>
date: Fri Jan 23 15:17:58 2015 +0000
description:
PR/49596: mkimage: incorrect permissions on evbarm images
Use NetBSD.dist in our mtree specification to populate the top level
directories, etc.
For each generated file hand craft an mtree entry.
Remove specialdirs as NetBSD.dist creates /proc and /kern.
diffstat:
distrib/utils/embedded/conf/evbarm.conf | 10 ++++++----
distrib/utils/embedded/conf/rpi_inst.conf | 4 +---
distrib/utils/embedded/conf/usermode.conf | 3 +--
distrib/utils/embedded/conf/x86.conf | 11 ++++++++---
distrib/utils/embedded/mkimage | 8 ++------
5 files changed, 18 insertions(+), 18 deletions(-)
diffs (135 lines):
diff -r e77fecc51397 -r 6fd1b50f453c distrib/utils/embedded/conf/evbarm.conf
--- a/distrib/utils/embedded/conf/evbarm.conf Fri Jan 23 12:37:54 2015 +0000
+++ b/distrib/utils/embedded/conf/evbarm.conf Fri Jan 23 15:17:58 2015 +0000
@@ -1,9 +1,8 @@
-# $NetBSD: evbarm.conf,v 1.17 2014/11/25 13:42:31 jmcneill Exp $
+# $NetBSD: evbarm.conf,v 1.18 2015/01/23 15:17:58 skrll Exp $
# evbarm shared config
#
image=$HOME/${board}.img
-specialdirs="/kern /proc"
MACHINE=evbarm
swap=256
@@ -107,6 +106,8 @@
else
make_fstab_evbarm_normal
fi
+ echo "./etc/fstab type=file uname=root gname=wheel mode=0644" \
+ >> "$tmp/selected_sets"
}
customize_evbarm() {
@@ -133,6 +134,7 @@
${HOST_SH} ${release}/dev/MAKEDEV -s all | sed -e 's:^\./:\./dev/:' \
>> "$tmp/selected_sets"
- echo "${bar} creating directories ${bar}"
- mkdir ${mnt}/proc ${mnt}/kern
+ echo "${bar} fixing up permissions"
+ echo "./boot type=dir uname=root gname=wheel mode=0755" \
+ >> "$tmp/selected_sets"
}
diff -r e77fecc51397 -r 6fd1b50f453c distrib/utils/embedded/conf/rpi_inst.conf
--- a/distrib/utils/embedded/conf/rpi_inst.conf Fri Jan 23 12:37:54 2015 +0000
+++ b/distrib/utils/embedded/conf/rpi_inst.conf Fri Jan 23 15:17:58 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: rpi_inst.conf,v 1.5 2014/04/03 01:36:20 ozaki-r Exp $
+# $NetBSD: rpi_inst.conf,v 1.6 2015/01/23 15:17:58 skrll Exp $
# Raspberry Pi customization script used by mkimage
#
@@ -9,8 +9,6 @@
image=$HOME/${board}.img
-specialdirs="/kern /proc"
-
swap=8
extra=8 # spare space
boot=112
diff -r e77fecc51397 -r 6fd1b50f453c distrib/utils/embedded/conf/usermode.conf
--- a/distrib/utils/embedded/conf/usermode.conf Fri Jan 23 12:37:54 2015 +0000
+++ b/distrib/utils/embedded/conf/usermode.conf Fri Jan 23 15:17:58 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: usermode.conf,v 1.3 2013/02/03 09:16:25 christos Exp $
+# $NetBSD: usermode.conf,v 1.4 2015/01/23 15:17:58 skrll Exp $
# NetBSD/usermode customization script used by mkimage
# XXX: BROKEN, needs to be converted to makefs
@@ -8,7 +8,6 @@
sets="base etc modules"
setsdir=/usr/build/release/$(uname -m)/binary/sets
size=0 # in MB
-specialdirs="/kern /proc"
usermodedirs="/var.cow /etc.cow /root.cow /pkgs"
make_filesystems() {
diff -r e77fecc51397 -r 6fd1b50f453c distrib/utils/embedded/conf/x86.conf
--- a/distrib/utils/embedded/conf/x86.conf Fri Jan 23 12:37:54 2015 +0000
+++ b/distrib/utils/embedded/conf/x86.conf Fri Jan 23 15:17:58 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: x86.conf,v 1.5 2014/12/14 00:28:46 christos Exp $
+# $NetBSD: x86.conf,v 1.6 2015/01/23 15:17:58 skrll Exp $
# x86 shared config
#
@@ -7,8 +7,6 @@
kernel=$src/sys/arch/${board}/compile/GENERIC/netbsd
bootfile=$release/usr/mdec/boot
-specialdirs="/kern /proc"
-
extra=8 # spare space
size=0 # autocompute
netbsdid=169
@@ -93,6 +91,8 @@
else
make_fstab_normal
fi
+ echo "./etc/fstab type=file uname=root gname=wheel mode=0755" \
+ >> "$tmp/selected_sets"
}
customize() {
@@ -136,4 +136,9 @@
exit 1
fi
cp ${bootfile} ${mnt}/boot
+
+ echo "./netbsd type=file uname=root gname=wheel mode=0755" \
+ >> "$tmp/selected_sets"
+ echo "./boot type=file uname=root gname=wheel mode=0444" \
+ >> "$tmp/selected_sets"
}
diff -r e77fecc51397 -r 6fd1b50f453c distrib/utils/embedded/mkimage
--- a/distrib/utils/embedded/mkimage Fri Jan 23 12:37:54 2015 +0000
+++ b/distrib/utils/embedded/mkimage Fri Jan 23 15:17:58 2015 +0000
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: mkimage,v 1.50 2015/01/18 17:37:54 skrll Exp $
+# $NetBSD: mkimage,v 1.51 2015/01/23 15:17:58 skrll Exp $
#
# Copyright (c) 2013, 2014 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -154,7 +154,7 @@
if [ -z "${bootonly}" ]; then
echo ${bar} configuring sets ${bar}
- (echo '/set type=dir uname=root gname=wheel mode=0755'
+ (cat "${release}/etc/mtree/NetBSD.dist"
for i in $selected_sets; do
s="${release}/etc/mtree/set.$i"
if [ -f "$s" ]; then
@@ -167,10 +167,6 @@
customize
populate
-if [ -z "${bootonly}" ]; then
- (cd ${mnt}; ${MTREE} -N ${release}/etc -c -k all |
- ${MTREE} -N ${release}/etc -C -k all) >> "$tmp/selected_sets"
-fi
if [ -n "${msdosid}" ]; then
echo ${bar} Populating msdos filesystem ${bar}
${MAKEFS} -N ${release}/etc -t msdos \
Home |
Main Index |
Thread Index |
Old Index