Revert "opkg: disable the use of vfork for the host build"
authorJo-Philipp Wich <jo@mein.io>
Sun, 28 Aug 2016 20:56:16 +0000 (22:56 +0200)
committerJo-Philipp Wich <jo@mein.io>
Sun, 28 Aug 2016 21:03:13 +0000 (23:03 +0200)
This reverts commit 02e3c718e9ad0c14aa3cf359ba2a4763e81df805.

Currently the vfork() code path in opkg is broken and relies on unsupported
ftello() / fseeko() operations on pipes - we need to restructure the code
before we can reconsider this approach.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
package/system/opkg/Makefile
package/system/opkg/patches/280-use-vfork.patch

index 446463ec85c1f53c6488141164281cfb80a3800e..67ceb7cafc23616bd95d08c92cf7e26b606d8132 100644 (file)
@@ -109,7 +109,7 @@ endef
 
 Package/opkg-smime/conffiles = $(Package/opkg/conffiles)
 
 
 Package/opkg-smime/conffiles = $(Package/opkg/conffiles)
 
-TARGET_CFLAGS += -ffunction-sections -fdata-sections -DOPKG_USE_VFORK=1
+TARGET_CFLAGS += -ffunction-sections -fdata-sections
 EXTRA_CFLAGS += $(TARGET_CPPFLAGS)
 
 CONFIGURE_ARGS += \
 EXTRA_CFLAGS += $(TARGET_CPPFLAGS)
 
 CONFIGURE_ARGS += \
index fc6058a701f7b459c41fbc7ef68cb18ae0e194ac..1c46f52b020c675734d9d7947c89ad37febef63d 100644 (file)
@@ -1,25 +1,20 @@
 --- a/libbb/gz_open.c
 +++ b/libbb/gz_open.c
 --- a/libbb/gz_open.c
 +++ b/libbb/gz_open.c
-@@ -29,7 +29,12 @@
+@@ -29,7 +29,7 @@
  #include <unistd.h>
  #include "libbb.h"
  
  #include <unistd.h>
  #include "libbb.h"
  
-+#ifdef OPKG_USE_VFORK
-+static const int gz_use_vfork = OPKG_USE_VFORK;
-+#else
- static int gz_use_vfork;
-+#endif
-+
+-static int gz_use_vfork;
++static const int gz_use_vfork = 1;
  
  FILE *
  gz_open(FILE *compressed_file, int *pid)
  
  FILE *
  gz_open(FILE *compressed_file, int *pid)
-@@ -38,7 +43,9 @@ gz_open(FILE *compressed_file, int *pid)
+@@ -38,8 +38,6 @@ gz_open(FILE *compressed_file, int *pid)
        off_t floc;
        int cfile = -1;
  
        off_t floc;
        int cfile = -1;
  
-+#ifndef OPKG_USE_VFORK
-       gz_use_vfork = (getenv("OPKG_USE_VFORK") != NULL);
-+#endif
+-      gz_use_vfork = (getenv("OPKG_USE_VFORK") != NULL);
+-
        if (gz_use_vfork) {
                /* Create a new file descriptor for the input stream
        if (gz_use_vfork) {
                /* Create a new file descriptor for the input stream
+                * (it *must* be associated with a file), and lseek()