summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLars Müller2007-01-04 21:10:05 +0100
committerLars Müller2007-01-04 21:10:05 +0100
commitbab5ace84def71f4ecc3d2183ac11407bdcfaa37 (patch)
tree97cf23dd09442ea729c6fbbc1b3d8c071f90de11 /tools
parentAdd missing parantheses. (diff)
downloadcore-bab5ace84def71f4ecc3d2183ac11407bdcfaa37.tar.gz
core-bab5ace84def71f4ecc3d2183ac11407bdcfaa37.tar.xz
core-bab5ace84def71f4ecc3d2183ac11407bdcfaa37.zip
Update busybox config file to add tools required by the stage1
installer. Add busybox-patches directory: - bzip2-payload.diff allow rpm2cpio to unpack bzip2 RPM payload - unionfs-run-init.diff separat bb part from unionfs-run-init - series file is optional for quilt users git-svn-id: http://svn.openslx.org/svn/openslx/trunk@583 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'tools')
-rw-r--r--tools/busybox-1.2.2-config41
-rw-r--r--tools/busybox-patches/bzip2-payload.diff73
-rw-r--r--tools/busybox-patches/series3
-rw-r--r--tools/busybox-patches/unionfs-run-init.diff20
-rw-r--r--tools/unionfs-run-init15
5 files changed, 119 insertions, 33 deletions
diff --git a/tools/busybox-1.2.2-config b/tools/busybox-1.2.2-config
index 6bfa6e3d..4e427824 100644
--- a/tools/busybox-1.2.2-config
+++ b/tools/busybox-1.2.2-config
@@ -71,17 +71,18 @@ CONFIG_MD5_SIZE_VS_SPEED=2
#
# Archival Utilities
#
-# CONFIG_AR is not set
+CONFIG_AR=y
# CONFIG_FEATURE_AR_LONG_FILENAMES is not set
CONFIG_BUNZIP2=y
-# CONFIG_CPIO is not set
+CONFIG_CPIO=y
# CONFIG_DPKG is not set
# CONFIG_DPKG_DEB is not set
# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
CONFIG_GUNZIP=y
CONFIG_FEATURE_GUNZIP_UNCOMPRESS=y
-# CONFIG_GZIP is not set
-# CONFIG_RPM2CPIO is not set
+CONFIG_GZIP=y
+CONFIG_RPM2CPIO=y
+CONFIG_FEATURE_RPM2CPIO_BZIP2=y
# CONFIG_RPM is not set
CONFIG_TAR=y
CONFIG_FEATURE_TAR_CREATE=y
@@ -145,10 +146,10 @@ CONFIG_EXPR=y
# CONFIG_EXPR_MATH_SUPPORT_64 is not set
CONFIG_FALSE=y
# CONFIG_FOLD is not set
-# CONFIG_HEAD is not set
+CONFIG_HEAD=y
# CONFIG_FEATURE_FANCY_HEAD is not set
CONFIG_HOSTID=y
-# CONFIG_ID is not set
+CONFIG_ID=y
# CONFIG_INSTALL is not set
# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
# CONFIG_LENGTH is not set
@@ -163,7 +164,7 @@ CONFIG_FEATURE_LS_TIMESTAMPS=y
CONFIG_FEATURE_LS_USERNAME=y
# CONFIG_FEATURE_LS_COLOR is not set
# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set
-# CONFIG_MD5SUM is not set
+CONFIG_MD5SUM=y
CONFIG_MKDIR=y
# CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set
# CONFIG_MKFIFO is not set
@@ -174,7 +175,7 @@ CONFIG_NICE=y
# CONFIG_NOHUP is not set
# CONFIG_OD is not set
# CONFIG_PRINTENV is not set
-# CONFIG_PRINTF is not set
+CONFIG_PRINTF=y
# CONFIG_PWD is not set
# CONFIG_REALPATH is not set
CONFIG_RM=y
@@ -196,19 +197,19 @@ CONFIG_FEATURE_SORT_BIG=y
# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set
CONFIG_TEST=y
# CONFIG_FEATURE_TEST_64 is not set
-# CONFIG_TOUCH is not set
-# CONFIG_TR is not set
+CONFIG_TOUCH=y
+CONFIG_TR=y
# CONFIG_FEATURE_TR_CLASSES is not set
# CONFIG_FEATURE_TR_EQUIV is not set
CONFIG_TRUE=y
# CONFIG_TTY is not set
-# CONFIG_UNAME is not set
-# CONFIG_UNIQ is not set
+CONFIG_UNAME=y
+CONFIG_UNIQ=y
CONFIG_USLEEP=y
# CONFIG_UUDECODE is not set
# CONFIG_UUENCODE is not set
# CONFIG_WATCH is not set
-# CONFIG_WC is not set
+CONFIG_WC=y
# CONFIG_WHO is not set
# CONFIG_WHOAMI is not set
# CONFIG_YES is not set
@@ -227,6 +228,10 @@ CONFIG_FEATURE_PRESERVE_HARDLINKS=y
# Common options for df, du, ls
#
CONFIG_FEATURE_HUMAN_READABLE=y
+
+#
+# Common options for md5sum, sha1sum
+#
# CONFIG_FEATURE_MD5_SHA1_SUM_CHECK is not set
#
@@ -262,7 +267,7 @@ CONFIG_FEATURE_HUMAN_READABLE=y
#
# Editors
#
-# CONFIG_AWK is not set
+CONFIG_AWK=y
# CONFIG_FEATURE_AWK_MATH is not set
# CONFIG_ED is not set
# CONFIG_PATCH is not set
@@ -292,7 +297,7 @@ CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
# CONFIG_FEATURE_FIND_NEWER is not set
# CONFIG_FEATURE_FIND_INUM is not set
# CONFIG_FEATURE_FIND_EXEC is not set
-# CONFIG_GREP is not set
+CONFIG_GREP=y
# CONFIG_FEATURE_GREP_EGREP_ALIAS is not set
# CONFIG_FEATURE_GREP_FGREP_ALIAS is not set
# CONFIG_FEATURE_GREP_CONTEXT is not set
@@ -478,8 +483,8 @@ CONFIG_ARPING=y
# CONFIG_FTPPUT is not set
# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
# CONFIG_HOSTNAME is not set
-# CONFIG_HTTPD is not set
-# CONFIG_FEATURE_HTTPD_WITHOUT_INETD is not set
+CONFIG_HTTPD=y
+CONFIG_FEATURE_HTTPD_WITHOUT_INETD=y
# CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP is not set
# CONFIG_FEATURE_HTTPD_SETUID is not set
# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set
@@ -528,7 +533,7 @@ CONFIG_FEATURE_IP_TUNNEL=y
# CONFIG_NETSTAT is not set
# CONFIG_NSLOOKUP is not set
CONFIG_PING=y
-# CONFIG_FEATURE_FANCY_PING is not set
+CONFIG_FEATURE_FANCY_PING=y
# CONFIG_PING6 is not set
# CONFIG_FEATURE_FANCY_PING6 is not set
# CONFIG_ROUTE is not set
diff --git a/tools/busybox-patches/bzip2-payload.diff b/tools/busybox-patches/bzip2-payload.diff
new file mode 100644
index 00000000..3ab07298
--- /dev/null
+++ b/tools/busybox-patches/bzip2-payload.diff
@@ -0,0 +1,73 @@
+Author: Adam Slattery slattery at students.missouri.edu
+Subject: [BusyBox] rpm2cpio bzip2 decompression (patch included)
+URL: http://www.busybox.net/lists/busybox/2004-May/011669.html
+CVS: http://www.busybox.net/cgi-bin/viewcvs.cgi/trunk/busybox/patches/rpm2cpio_bzip2.patch?rev=9001
+
+Index: busybox-1.2.2/archival/Config.in
+===================================================================
+--- busybox-1.2.2.orig/archival/Config.in
++++ busybox-1.2.2/archival/Config.in
+@@ -127,6 +127,14 @@ config CONFIG_RPM2CPIO
+ help
+ Converts an RPM file into a CPIO archive.
+
++config CONFIG_FEATURE_RPM2CPIO_BZIP2
++ bool " Support bzip2 decompression"
++ default n
++ depends on CONFIG_RPM2CPIO
++ help
++ If you enable this option you'll be able to extract
++ rpms compressed with bzip2.
++
+ config CONFIG_RPM
+ bool "rpm"
+ default n
+Index: busybox-1.2.2/archival/libunarchive/Makefile.in
+===================================================================
+--- busybox-1.2.2.orig/archival/libunarchive/Makefile.in
++++ busybox-1.2.2/archival/libunarchive/Makefile.in
+@@ -59,6 +59,7 @@ LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_LZ
+ LIBUNARCHIVE-$(CONFIG_GUNZIP) += $(GUNZIP_FILES)
+ LIBUNARCHIVE-$(CONFIG_FEATURE_GUNZIP_UNCOMPRESS) += decompress_uncompress.o
+ LIBUNARCHIVE-$(CONFIG_RPM2CPIO) += $(GUNZIP_FILES) get_header_cpio.o
++LIBUNARCHIVE-$(CONFIG_FEATURE_RPM2CPIO_BZIP2) += decompress_bunzip2.o
+ LIBUNARCHIVE-$(CONFIG_RPM) += $(GUNZIP_FILES) get_header_cpio.o
+ LIBUNARCHIVE-$(CONFIG_TAR) += get_header_tar.o
+ LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_BZIP2) += decompress_bunzip2.o get_header_tar_bz2.o
+Index: busybox-1.2.2/archival/rpm2cpio.c
+===================================================================
+--- busybox-1.2.2.orig/archival/rpm2cpio.c
++++ busybox-1.2.2/archival/rpm2cpio.c
+@@ -91,15 +91,27 @@ int rpm2cpio_main(int argc, char **argv)
+ skip_header(rpm_fd);
+
+ bb_xread_all(rpm_fd, &magic, 2);
+- if ((magic[0] != 0x1f) || (magic[1] != 0x8b)) {
+- bb_error_msg_and_die("Invalid gzip magic");
++ if ((magic[0] == 0x1f) || (magic[1] == 0x8b)) {
++ check_header_gzip(rpm_fd);
++ if (inflate_gunzip(rpm_fd, fileno(stdout)) != 0)
++ bb_error_msg("Error inflating (gzip)");
+ }
+
+- check_header_gzip(rpm_fd);
+- if (inflate_gunzip(rpm_fd, STDOUT_FILENO) != 0) {
+- bb_error_msg("Error inflating");
++ if ((magic[0] == 'B') && (magic[1] == 'Z')) {
++#ifdef CONFIG_FEATURE_RPM2CPIO_BZIP2
++ /* return to position before magic (eek..!) */
++ lseek(rpm_fd, -2, SEEK_CUR);
++ if(uncompressStream(rpm_fd, fileno(stdout)) != 0)
++ bb_error_msg("Error inflating (bzip2)");
++#else
++ bb_error_msg_and_die("bzip2 not supported");
++#endif
+ }
+
++ else
++ bb_error_msg_and_die("not gzip or bzip2 compressed");
++
++
+ close(rpm_fd);
+
+ return 0;
diff --git a/tools/busybox-patches/series b/tools/busybox-patches/series
new file mode 100644
index 00000000..87dc1896
--- /dev/null
+++ b/tools/busybox-patches/series
@@ -0,0 +1,3 @@
+# series file useable by quilt
+bzip2-payload.diff
+unionfs-run-init.diff
diff --git a/tools/busybox-patches/unionfs-run-init.diff b/tools/busybox-patches/unionfs-run-init.diff
new file mode 100644
index 00000000..2163fa98
--- /dev/null
+++ b/tools/busybox-patches/unionfs-run-init.diff
@@ -0,0 +1,20 @@
+If we find the special directory, /rorootfs move the mount point of the later
+root fs on top. We check if we have unionfs available to make the ro fs rw.
+Unfortunately the unionfs code is incomplete (mmap issue). Thus the original
+mount point of the ro fs part is not moved accordingly.
+
+Index: busybox-1.2.2/util-linux/switch_root.c
+===================================================================
+--- busybox-1.2.2.orig/util-linux/switch_root.c
++++ busybox-1.2.2/util-linux/switch_root.c
+@@ -106,6 +106,10 @@ int switch_root_main(int argc, char *arg
+ // Overmount / with newdir and chroot into it. The chdir is needed to
+ // recalculate "." and ".." links.
+
++ if ( !lstat("/rorootfs", &st1 ) )
++ if ( mount("/rorootfs", "/", NULL, MS_MOVE, NULL) )
++ bb_error_msg_and_die("moving rorootfs");
++
+ if (mount(".", "/", NULL, MS_MOVE, NULL) || chroot(".") || chdir("/"))
+ bb_error_msg_and_die("moving root");
+
diff --git a/tools/unionfs-run-init b/tools/unionfs-run-init
index 01d71b74..af09bf00 100644
--- a/tools/unionfs-run-init
+++ b/tools/unionfs-run-init
@@ -22,18 +22,3 @@ drunterliegende Rootfs ... Laengeres Rumprobieren und nun scheint es
erstmal zu klappen. Zur Zeit checkt der einfach nur (bis ich das raus
hatte :-)) ob ein "/rorootfs" da ist und verschiebt das dann. Wenn nicht,
bleibts so wie vorher.
-
-Gilt auch fuer busybox:
-
- // Overmount / with newdir and chroot into it. The chdir is needed to
- // recalculate "." and ".." links. And check for UnionFS specific
-dir.
-
- if ( !lstat("/rorootfs", &st1 ) )
- if ( mount("/rorootfs", "/", NULL, MS_MOVE, NULL) )
- bb_error_msg_and_die("moving rorootfs");
-
-
- if (mount(".", "/", NULL, MS_MOVE, NULL) || chroot(".") ||
-chdir("/"))
- bb_error_msg_and_die("moving root");