summaryrefslogtreecommitdiff
path: root/package/busybox
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-06-29 20:06:41 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2010-06-29 20:06:41 +0200
commit234eaea016830cf260fdae9160d72bbf1be6c47b (patch)
tree9245d91b58a9d0dcc70bfe36a43a4c1db6231679 /package/busybox
parent1952ce4d7974bba0873adb3e21404def125ae45e (diff)
just mount rootfs read-write for needed subcommands
Diffstat (limited to 'package/busybox')
-rw-r--r--package/busybox/Makefile2
-rw-r--r--package/busybox/patches/001-ipkg.patch34
2 files changed, 27 insertions, 9 deletions
diff --git a/package/busybox/Makefile b/package/busybox/Makefile
index 7cd8ced63..30895d442 100644
--- a/package/busybox/Makefile
+++ b/package/busybox/Makefile
@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:= busybox
PKG_VERSION:= 1.16.1
-PKG_RELEASE:= 2
+PKG_RELEASE:= 3
PKG_MD5SUM:= 319486ec65078d07fde26eb620fecde7
PKG_DESCR:= Core utilities for embedded Linux systems
PKG_SECTION:= base
diff --git a/package/busybox/patches/001-ipkg.patch b/package/busybox/patches/001-ipkg.patch
index 4e9d451a5..fb740df91 100644
--- a/package/busybox/patches/001-ipkg.patch
+++ b/package/busybox/patches/001-ipkg.patch
@@ -6628,8 +6628,8 @@ diff -Nur busybox-1.16.1.orig/archival/libipkg/Kbuild busybox-1.16.1/archival/li
+CFLAGS += -DIPKGLIBDIR="\"/usr/lib\"" -DHOST_CPU_STR="\"$(IPKG_ARCH)\""
diff -Nur busybox-1.16.1.orig/archival/libipkg/libipkg.c busybox-1.16.1/archival/libipkg/libipkg.c
--- busybox-1.16.1.orig/archival/libipkg/libipkg.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.16.1/archival/libipkg/libipkg.c 2010-06-29 17:35:49.219617937 +0200
-@@ -0,0 +1,532 @@
++++ busybox-1.16.1/archival/libipkg/libipkg.c 2010-06-29 19:58:50.069617923 +0200
+@@ -0,0 +1,550 @@
+/* ipkglib.c - the itsy package management system
+
+ Florina Boor
@@ -7083,9 +7083,6 @@ diff -Nur busybox-1.16.1.orig/archival/libipkg/libipkg.c busybox-1.16.1/archival
+ ipkg_conf_t ipkg_conf;
+ const char *message = "ipkg must have one sub-command argument";
+
-+ /* mount rootfs read-write */
-+ if (mount("","/",0,MS_REMOUNT,0)<0)
-+ fprintf (stderr, "Mounting rootfs read-write failed\n");
+
+ args_init (&args);
+
@@ -7121,6 +7118,18 @@ diff -Nur busybox-1.16.1.orig/archival/libipkg/libipkg.c busybox-1.16.1/archival
+ args.noreadfeedsfile = 1;
+
+
++ if ( !strcmp(cmd_name,"install") ||
++ !strcmp(cmd_name,"update") ||
++ !strcmp(cmd_name,"upgrade") ||
++ !strcmp(cmd_name,"flag") ||
++ !strcmp(cmd_name,"configure") ||
++ !strcmp(cmd_name,"remove") ) {
++ /* mount rootfs read-write */
++ if (mount("","/",0,MS_REMOUNT,0)<0)
++ fprintf (stderr, "Mounting rootfs read-write failed\n");
++ }
++
++
+ err = ipkg_conf_init (&ipkg_conf, &args);
+ if (err)
+ {
@@ -7156,9 +7165,18 @@ diff -Nur busybox-1.16.1.orig/archival/libipkg/libipkg.c busybox-1.16.1/archival
+ err = ipkg_cmd_exec (cmd, &ipkg_conf, argc - optind_, (const char **) (argv + optind_), NULL);
+
+ ipkg_conf_deinit (&ipkg_conf);
-+ /* mount rootfs read-only */
-+ if (mount("","/",0,MS_REMOUNT|MS_RDONLY,0)<0)
-+ fprintf (stderr, "Mounting rootfs read-only failed\n");
++
++ if ( !strcmp(cmd_name,"install") ||
++ !strcmp(cmd_name,"update") ||
++ !strcmp(cmd_name,"upgrade") ||
++ !strcmp(cmd_name,"flag") ||
++ !strcmp(cmd_name,"configure") ||
++ !strcmp(cmd_name,"remove") ) {
++ sync();
++ /* mount rootfs read-only */
++ if (mount("","/",0,MS_REMOUNT|MS_RDONLY,0)<0)
++ fprintf (stderr, "Mounting rootfs read-only failed\n");
++ }
+
+ return err;
+}