Skip to contentSkip to conversation

libcap: disable progs altogether

PATCH New Gustavo Zacarias 2 participants 2 messages Oct 29, 2012 – Oct 30, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libcap: disable progs altogether

Disable progs in the Makefile directly instead of building and then removing them.
This is because they use fork() and can cause build failures on nommu.

---
 package/libcap/libcap.mk |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
package/libcap/libcap.mk +2 -1
index b922e5a..ac73dcf 100644
@@ -12,7 +12,9 @@ LIBCAP_SOURCE = libcap2_$(LIBCAP_VERSION).orig.tar.gz
 LIBCAP_DEPENDENCIES = host-libcap
 LIBCAP_INSTALL_STAGING = YES
 
+# progs use fork()
 define LIBCAP_BUILD_CMDS
+	$(SED) '/-C progs/d' $(@D)/Makefile
 	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
 		LIBATTR=no BUILD_CC="$(HOSTCC)" BUILD_CFLAGS="$(HOST_CFLAGS)"
 endef
@@ -25,7 +27,6 @@ endef
 define LIBCAP_INSTALL_TARGET_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=no DESTDIR=$(TARGET_DIR) \
 		prefix=/usr lib=lib install
-	rm -f $(addprefix $(TARGET_DIR)/usr/sbin/,capsh getpcaps)
 endef
 
 define HOST_LIBCAP_BUILD_CMDS
Signature · 1 line
1.7.8.6
#1 lore raw

PATCH 1/1 libcap: disable progs altogether

package/libcap/libcap.mk LIBCAP_SOURCE = libcap2_$(LIBCAP_VERSION).orig.tar.gz · line 18

Quoted 4 lines · Gustavo Zacarias
package/libcap/libcap.mk +2 -0
+# progs use fork()
  define LIBCAP_BUILD_CMDS
+	$(SED) '/-C progs/d' $(@D)/Makefile
  	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \

Could you do this in a post-patch hook instead? It's more verbose, but
more appropriate I think.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F