Browse Source

libcap: update to 2.33

Added a compatibility fix for musl.

Refreshed patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
lilik-openwrt-22.03
Rosen Penev 5 years ago
parent
commit
2f957ddc30
No known key found for this signature in database GPG Key ID: 36D31CFA845F0E3B
3 changed files with 8 additions and 6 deletions
  1. +4
    -2
      libs/libcap/Makefile
  2. +2
    -2
      libs/libcap/patches/200-change-hardcoded-shell-to-sh.patch
  3. +2
    -2
      libs/libcap/patches/300-uclibc-ng.patch

+ 4
- 2
libs/libcap/Makefile View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=libcap PKG_NAME:=libcap
PKG_VERSION:=2.32
PKG_VERSION:=2.33
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/libs/security/linux-privs/libcap2 PKG_SOURCE_URL:=@KERNEL/linux/libs/security/linux-privs/libcap2
PKG_HASH:=1005e3d227f2340ad1e3360ef8b69d15e3c72a29c09f4894d7aac038bd26e2be
PKG_HASH:=08edeaba2757021aeec45c4eeec52566675e0e0f5d4f057284d729e04f2643d6
PKG_MAINTAINER:=Paul Wassi <p.wassi@gmx.at> PKG_MAINTAINER:=Paul Wassi <p.wassi@gmx.at>
PKG_LICENSE:=GPL-2.0-only PKG_LICENSE:=GPL-2.0-only
@ -80,6 +80,8 @@ ifneq ($(CONFIG_PACKAGE_libcap-bin-capsh-shell),)
TARGET_CFLAGS += -DSHELL='\"$(CONFIG_PACKAGE_libcap-bin-capsh-shell)\"' TARGET_CFLAGS += -DSHELL='\"$(CONFIG_PACKAGE_libcap-bin-capsh-shell)\"'
endif endif
TARGET_CFLAGS += $(if $(CONFIG_USE_MUSL),-Dpthread_yield=sched_yield)
define Build/InstallDev define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/sys $(INSTALL_DIR) $(1)/usr/include/sys
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/


+ 2
- 2
libs/libcap/patches/200-change-hardcoded-shell-to-sh.patch View File

@ -10,7 +10,7 @@
#define MAX_GROUPS 100 /* max number of supplementary groups for user */ #define MAX_GROUPS 100 /* max number of supplementary groups for user */
static char *binary(unsigned long value) static char *binary(unsigned long value)
@@ -768,10 +771,10 @@ int main(int argc, char *argv[], char *envp[])
@@ -775,10 +778,10 @@ int main(int argc, char *argv[], char *envp[])
} else if (!strcmp("--print", argv[i])) { } else if (!strcmp("--print", argv[i])) {
arg_print(); arg_print();
} else if ((!strcmp("--", argv[i])) || (!strcmp("==", argv[i]))) { } else if ((!strcmp("--", argv[i])) || (!strcmp("==", argv[i]))) {
@ -23,7 +23,7 @@
exit(1); exit(1);
} else if (!strncmp("--has-p=", argv[i], 8)) { } else if (!strncmp("--has-p=", argv[i], 8)) {
cap_value_t cap; cap_value_t cap;
@@ -869,7 +872,7 @@ int main(int argc, char *argv[], char *envp[])
@@ -888,7 +891,7 @@ int main(int argc, char *argv[], char *envp[])
" --killit=<n> send signal(n) to child\n" " --killit=<n> send signal(n) to child\n"
" --forkfor=<n> fork and make child sleep for <n> sec\n" " --forkfor=<n> fork and make child sleep for <n> sec\n"
" == re-exec(capsh) with args as for --\n" " == re-exec(capsh) with args as for --\n"


+ 2
- 2
libs/libcap/patches/300-uclibc-ng.patch View File

@ -7,5 +7,5 @@
- $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create --static - $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create --static
+ $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create + $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create
clean:
rm -f psx_test psx_test_wrap libcap_psx_test
run_libcap_launch_test: libcap_launch_test libcap_psx_launch_test noop
sudo ./libcap_launch_test

Loading…
Cancel
Save