Skip to contentSkip to conversation

pax-utils: update buildsystem; libcap: update version (branch yem/fixes)

PATCH New Yann E. MORIN 2 participants 4 messages Mar 11, 2016 – Mar 20, 2016

lore
Share & tools
lore
#0 lore raw

v2 cover pax-utils: update buildsystem; libcap: update version (branch yem/fixes)

Hello All!

This short series updates pax-utils to use autotools rather than generic package, since it is now a real autotools package (even if the akefile is already provided, which is an error in upstream packaging).

It also bumps libcap to the latest version, which allows to drop the dependency on the attr package. This will not, however, fix our current autobuild issues on gcc-10.

Changes v1 -> v2:
- drop attr dependency in libcap (Gustavo)

Regards,
Yann E. MORIN.

The following changes since commit 0b7b84310c3781c346eea4c114c8cb4e97bbd8ea:

olimex_imx233_olinuxino_defconfig: genimage support (2016-03-11 13:14:54 +0100)

are available in the git repository at:

git://git.busybox.net/~ymorin/git/buildroot yem/fixes

for you to fetch changes up to 1d03ae088a9b2990e6355f69ef3de103166b2db3:

package/libcap: bump version (2016-03-11 18:11:40 +0100)

----------------------------------------------------------------
Yann E. MORIN (2):
package/pax-utils: switch to autotools
package/libcap: bump version

 ...-build-system-fixes-for-cross-compilation.patch | 26 ++++--------
 ...t-install-into-install-shared-install-sta.patch | 32 +++++++--------
 ...nge-the-location-we-include-linux-xattr.h.patch | 46 ----------------------
 package/libcap/libcap.hash                         |  2 +-
 package/libcap/libcap.mk                           | 18 +++------
 package/pax-utils/pax-utils.mk                     | 35 +++++++---------
 6 files changed, 44 insertions(+), 115 deletions(-)
 delete mode 100644 package/libcap/0003-Change-the-location-we-include-linux-xattr.h.patch
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH v2 1/2 package/pax-utils: switch to autotools

[yann.morin.1998 at free.fr: independently done a patch similar to the one
by Thomas]
Cc: Thomas Petazzoni <[email protected]>

---
 package/pax-utils/pax-utils.mk | 35 +++++++++++++++--------------------
 1 file changed, 15 insertions(+), 20 deletions(-)
package/pax-utils/pax-utils.mk +15 -20
index fc2e0ca..747c2bb 100644
@@ -10,9 +10,21 @@ PAX_UTILS_SOURCE = pax-utils-$(PAX_UTILS_VERSION).tar.xz
 PAX_UTILS_LICENSE = GPLv2
 PAX_UTILS_LICENSE_FILES = COPYING
 
+PAX_UTILS_DEPENDENCIES = host-pkgconf
+PAX_UTILS_CONF_OPTS = --without-python
+
 ifeq ($(BR2_PACKAGE_LIBCAP),y)
 PAX_UTILS_DEPENDENCIES += libcap
-PAX_UTILS_USE_CAP = USE_CAP=yes
+PAX_UTILS_CONF_OPTS += --with-caps
+else
+PAX_UTILS_CONF_OPTS += --without-caps
+endif
+
+ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
+PAX_UTILS_DEPENDENCIES += libseccomp
+PAX_UTILS_CONF_OPTS += --with-seccomp
+else
+PAX_UTILS_CONF_OPTS += --without-seccomp
 endif
 
 # libcap is only useful for pspax (a running system)
@@ -26,22 +38,5 @@ endef
 endif
 PAX_UTILS_POST_INSTALL_TARGET_HOOKS += PAX_UTILS_REMOVE_BASH_TOOLS
 
-define HOST_PAX_UTILS_BUILD_CMDS
-	$(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D)
-endef
-
-define PAX_UTILS_BUILD_CMDS
-	$(MAKE) $(TARGET_CONFIGURE_OPTS) $(PAX_UTILS_USE_CAP) -C $(@D)
-endef
-
-define HOST_PAX_UTILS_INSTALL_CMDS
-	$(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) DESTDIR="$(HOST_DIR)" install
-endef
-
-define PAX_UTILS_INSTALL_TARGET_CMDS
-	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \
-		DESTDIR="$(TARGET_DIR)" install
-endef
-
-$(eval $(generic-package))
-$(eval $(host-generic-package))
+$(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
1.9.1
#2 lore raw

PATCH v2 1/2 package/pax-utils: switch to autotools

Hello,

Quoted 7 lines · Yann E. MORIN

[yann.morin.1998 at free.fr: independently done a patch similar to the one
by Thomas]
Cc: Thomas Petazzoni <[email protected]>

---
 package/pax-utils/pax-utils.mk | 35 +++++++++++++++--------------------
 1 file changed, 15 insertions(+), 20 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH v2 2/2 package/libcap: bump version

In reply to Yann E. MORIN

attr is no longer a dependency, not even optional.

Refresh our patches, and drop the backport from upstream.

Cc Gustavo Zacarias <[email protected]>

---
Changes v1 -> v2:
- drop the attr dependency, it's no longer needed (Gustavo)

---
 ...-build-system-fixes-for-cross-compilation.patch | 26 ++++--------
 ...t-install-into-install-shared-install-sta.patch | 32 +++++++--------
 ...nge-the-location-we-include-linux-xattr.h.patch | 46 ----------------------
 package/libcap/libcap.hash                         |  2 +-
 package/libcap/libcap.mk                           | 18 +++------
 5 files changed, 29 insertions(+), 95 deletions(-)
 delete mode 100644 package/libcap/0003-Change-the-location-we-include-linux-xattr.h.patch
package/libcap/0001-build-system-fixes-for-cross-compilation.patch +7 -19
index 705bbc7..de24090 100644
@@ -1,19 +1,19 @@
-From 7f48413ef1688df0d7fc25e477f4e6c0c55edfac Mon Sep 17 00:00:00 2001
+From d8d70559a279706c206761dfaf665d2197934123 Mon Sep 17 00:00:00 2001
 From: Gustavo Zacarias <[email protected]>
 Date: Sun, 6 Mar 2016 22:52:02 +0100
 Subject: [PATCH] build-system: fixes for cross-compilation
 
 Avoid the libcap buildsys forcing CC/CFLAGS/LDFLAGS/AR/RANLIB
-Also install the shared lib +x
 
 Signed-off-by: Gustavo Zacarias <[email protected]>
+[yann.morin.1998 at free.fr: dont chmod +x the shared lib]
 Signed-off-by: "Yann E. MORIN" <[email protected]>
 
 diff --git a/Make.Rules b/Make.Rules
-index ec1c474..8a8fc50 100644
+index 8347b26..8a07a3f 100644
 --- a/Make.Rules
 +++ b/Make.Rules
-@@ -48,25 +48,25 @@ MINOR=24
+@@ -48,26 +48,26 @@ MINOR=25
  KERNEL_HEADERS := $(topdir)/libcap/include/uapi
  IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include
  
@@ -37,6 +37,7 @@ index ec1c474..8a8fc50 100644
  LD=$(CC) -Wl,-x -shared
 -LDFLAGS := #-g
 +LDFLAGS ?= #-g
+ BUILD_GPERF := $(shell which gperf >/dev/null 2>/dev/null && echo yes)
  
  SYSTEM_HEADERS = /usr/include
  INCS=$(topdir)/libcap/include/sys/capability.h
@@ -44,22 +45,9 @@ index ec1c474..8a8fc50 100644
  CFLAGS += -Dlinux $(WARNINGS) $(DEBUG)
 -PAM_CAP := $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi)
 +PAM_CAP = no
- INDENT := $(shell if [ -n "$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
+ INDENT := $(shell if [ -n "$$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
  DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi)
- LIBATTR := yes
-diff --git a/libcap/Makefile b/libcap/Makefile
-index 20ab00f..97fea3f 100644
---- a/libcap/Makefile
-+++ b/libcap/Makefile
-@@ -75,7 +75,7 @@ install: all
- 	install -m 0644 include/sys/capability.h $(INCDIR)/sys
- 	mkdir -p -m 0755 $(LIBDIR)
- 	install -m 0644 $(STALIBNAME) $(LIBDIR)/$(STALIBNAME)
--	install -m 0644 $(MINLIBNAME) $(LIBDIR)/$(MINLIBNAME)
-+	install -m 0755 $(MINLIBNAME) $(LIBDIR)/$(MINLIBNAME)
- 	ln -sf $(MINLIBNAME) $(LIBDIR)/$(MAJLIBNAME)
- 	ln -sf $(MAJLIBNAME) $(LIBDIR)/$(LIBNAME)
- ifeq ($(FAKEROOT),)
+ 
 -- 
 1.9.1
 
package/libcap/0002-libcap-split-install-into-install-shared-install-sta.patch +16 -16
index a7a9d13..a8579b7 100644
@@ -1,4 +1,4 @@
-From 8d7339169b9a5df2082731fe5468923be4be39af Mon Sep 17 00:00:00 2001
+From af21635665ab568f3333ff9fe8b474f4950e5acb Mon Sep 17 00:00:00 2001
 From: Thomas Petazzoni <[email protected]>
 Date: Sun, 6 Mar 2016 22:53:24 +0100
 Subject: [PATCH] libcap: split install into install-shared/install-static
@@ -11,10 +11,10 @@ Signed-off-by: Thomas Petazzoni <[email protected]>
 Signed-off-by: "Yann E. MORIN" <[email protected]>
 
 diff --git a/libcap/Makefile b/libcap/Makefile
-index 97fea3f..7ac45dd 100644
+index d189777..44ddb27 100644
 --- a/libcap/Makefile
 +++ b/libcap/Makefile
-@@ -70,19 +70,25 @@ $(MINLIBNAME): $(OBJS)
+@@ -62,19 +62,25 @@ $(MINLIBNAME): $(OBJS)
  cap_text.o: cap_text.c $(USE_GPERF_OUTPUT) $(INCLS)
  	$(CC) $(CFLAGS) $(IPATH) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@
  
@@ -22,24 +22,24 @@ index 97fea3f..7ac45dd 100644
 +install: install-shared install-static
 +
 +install-common:
- 	mkdir -p -m 0755 $(INCDIR)/sys
- 	install -m 0644 include/sys/capability.h $(INCDIR)/sys
-+	mkdir -p -m 0755 $(PKGCONFIGDIR)
-+	install -m 0644 libcap.pc $(PKGCONFIGDIR)/libcap.pc
- 	mkdir -p -m 0755 $(LIBDIR)
+ 	mkdir -p -m 0755 $(FAKEROOT)$(INCDIR)/sys
+ 	install -m 0644 include/sys/capability.h $(FAKEROOT)$(INCDIR)/sys
++	mkdir -p -m 0755 $(FAKEROOT)$(PKGCONFIGDIR)
++	install -m 0644 libcap.pc $(FAKEROOT)$(PKGCONFIGDIR)/libcap.pc
 +
-+install-static: install-common
- 	install -m 0644 $(STALIBNAME) $(LIBDIR)/$(STALIBNAME)
++install-static: $(STALIBNAME) install-common
+ 	mkdir -p -m 0755 $(FAKEROOT)$(LIBDIR)
+ 	install -m 0644 $(STALIBNAME) $(FAKEROOT)$(LIBDIR)/$(STALIBNAME)
 +
-+install-shared: install-common
- 	install -m 0755 $(MINLIBNAME) $(LIBDIR)/$(MINLIBNAME)
- 	ln -sf $(MINLIBNAME) $(LIBDIR)/$(MAJLIBNAME)
- 	ln -sf $(MAJLIBNAME) $(LIBDIR)/$(LIBNAME)
++install-shared: $(MINLIBNAME) install-common
+ 	install -m 0644 $(MINLIBNAME) $(FAKEROOT)$(LIBDIR)/$(MINLIBNAME)
+ 	ln -sf $(MINLIBNAME) $(FAKEROOT)$(LIBDIR)/$(MAJLIBNAME)
+ 	ln -sf $(MAJLIBNAME) $(FAKEROOT)$(LIBDIR)/$(LIBNAME)
  ifeq ($(FAKEROOT),)
  	-/sbin/ldconfig
  endif
--	mkdir -p -m 0755 $(PKGCONFIGDIR)
--	install -m 0644 libcap.pc $(PKGCONFIGDIR)/libcap.pc
+-	mkdir -p -m 0755 $(FAKEROOT)$(PKGCONFIGDIR)
+-	install -m 0644 libcap.pc $(FAKEROOT)$(PKGCONFIGDIR)/libcap.pc
  
  clean:
  	$(LOCALCLEAN)
package/libcap/0003-Change-the-location-we-include-linux-xattr.h.patch deleted +0 -46

46 lines not on this page · raw message

package/libcap/libcap.hash +1 -1
index 75822e5..a1dcd62 100644
@@ -1,2 +1,2 @@
 # https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/sha256sums.asc
-sha256	cee4568f78dc851d726fc93f25f4ed91cc223b1fe8259daa4a77158d174e6c65	libcap-2.24.tar.xz
+sha256	693c8ac51e983ee678205571ef272439d83afe62dd8e424ea14ad9790bc35162  libcap-2.25.tar.xz
package/libcap/libcap.mk +5 -13
index 8625139..bcb5d8c 100644
@@ -4,23 +4,16 @@
 #
 ################################################################################
 
-LIBCAP_VERSION = 2.24
+LIBCAP_VERSION = 2.25
 LIBCAP_SITE = https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2
 LIBCAP_SOURCE = libcap-$(LIBCAP_VERSION).tar.xz
 LIBCAP_LICENSE = GPLv2 or BSD-3c
 LIBCAP_LICENSE_FILES = License
 
-LIBCAP_DEPENDENCIES = host-libcap
+LIBCAP_DEPENDENCIES = host-libcap host-gperf
 LIBCAP_INSTALL_STAGING = YES
 
-ifeq ($(BR2_PACKAGE_ATTR),y)
-LIBCAP_DEPENDENCIES += attr
-LIBCAP_HAVE_LIBATTR = yes
-else
-LIBCAP_HAVE_LIBATTR = no
-endif
-
-HOST_LIBCAP_DEPENDENCIES = host-attr
+HOST_LIBCAP_DEPENDENCIES = host-gperf
 
 ifeq ($(BR2_STATIC_LIBS),y)
 LIBCAP_MAKE_TARGET = libcap.a libcap.pc
@@ -31,7 +24,6 @@ LIBCAP_MAKE_INSTALL_TARGET = install
 endif
 
 LIBCAP_MAKE_FLAGS = \
-	LIBATTR=$(LIBCAP_HAVE_LIBATTR) \
 	BUILD_CC="$(HOSTCC)" \
 	BUILD_CFLAGS="$(HOST_CFLAGS)"
 
@@ -67,12 +59,12 @@ endef
 
 define HOST_LIBCAP_BUILD_CMDS
 	$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D)\
-		LIBATTR=yes RAISE_SETFCAP=no
+		RAISE_SETFCAP=no
 endef
 
 define HOST_LIBCAP_INSTALL_CMDS
 	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(HOST_DIR) \
-		LIBATTR=yes RAISE_SETFCAP=no prefix=/usr lib=lib install
+		RAISE_SETFCAP=no prefix=/usr lib=lib install
 endef
 
 $(eval $(generic-package))
Signature · 1 line
1.9.1