forked from pikhq/sabotage
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libcap2: bump to 2.25, remove perl dep, fix build with gperf installed
- Loading branch information
Showing
2 changed files
with
66 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* DO NOT EDIT: this file is generated automatically from | ||
* | ||
* <linux/capability.h> | ||
*/ | ||
#define __CAP_BITS 38 | ||
|
||
#ifdef LIBCAP_PLEASE_INCLUDE_ARRAY | ||
char const *_cap_names[__CAP_BITS] = { | ||
/* 0 */ "cap_chown", | ||
/* 1 */ "cap_dac_override", | ||
/* 2 */ "cap_dac_read_search", | ||
/* 3 */ "cap_fowner", | ||
/* 4 */ "cap_fsetid", | ||
/* 5 */ "cap_kill", | ||
/* 6 */ "cap_setgid", | ||
/* 7 */ "cap_setuid", | ||
/* 8 */ "cap_setpcap", | ||
/* 9 */ "cap_linux_immutable", | ||
/* 10 */ "cap_net_bind_service", | ||
/* 11 */ "cap_net_broadcast", | ||
/* 12 */ "cap_net_admin", | ||
/* 13 */ "cap_net_raw", | ||
/* 14 */ "cap_ipc_lock", | ||
/* 15 */ "cap_ipc_owner", | ||
/* 16 */ "cap_sys_module", | ||
/* 17 */ "cap_sys_rawio", | ||
/* 18 */ "cap_sys_chroot", | ||
/* 19 */ "cap_sys_ptrace", | ||
/* 20 */ "cap_sys_pacct", | ||
/* 21 */ "cap_sys_admin", | ||
/* 22 */ "cap_sys_boot", | ||
/* 23 */ "cap_sys_nice", | ||
/* 24 */ "cap_sys_resource", | ||
/* 25 */ "cap_sys_time", | ||
/* 26 */ "cap_sys_tty_config", | ||
/* 27 */ "cap_mknod", | ||
/* 28 */ "cap_lease", | ||
/* 29 */ "cap_audit_write", | ||
/* 30 */ "cap_audit_control", | ||
/* 31 */ "cap_setfcap", | ||
/* 32 */ "cap_mac_override", | ||
/* 33 */ "cap_mac_admin", | ||
/* 34 */ "cap_syslog", | ||
/* 35 */ "cap_wake_alarm", | ||
/* 36 */ "cap_block_suspend", | ||
/* 37 */ "cap_audit_read", | ||
}; | ||
#endif /* LIBCAP_PLEASE_INCLUDE_ARRAY */ | ||
|
||
/* END OF FILE */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,31 @@ | ||
[mirrors] | ||
http://ftp.de.debian.org/debian/pool/main/libc/libcap2/libcap2_2.22.orig.tar.gz | ||
https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.25.tar.xz | ||
|
||
[vars] | ||
filesize=67432 | ||
sha512=b66cd3e233cab9c35334c3ed824f2b6207a46b7320be0a29f5290a32cbf4ea7c4fbf22125541cfa25fdd7466d9c14373ff5f68b53fe44036af6763d3ff1cb398 | ||
tardir=libcap-2.22 | ||
filesize=63672 | ||
sha512=c3ab491885292adc171cde542b96f1295e84132febb50112a46575c3bde3a3eb6fcf733f7a756b4b656e013c0abb5ed6571db24799f8c0b23d8f759f992864f9 | ||
pkgver=2 | ||
|
||
[deps] | ||
attr | ||
|
||
[deps.host] | ||
perl | ||
|
||
[build] | ||
sed -i 's,BUILD_GPERF := ,BUILD_GPERF := no #,' Make.Rules | ||
sed -i 's@/bin/bash@/bin/sh@g' progs/capsh.c | ||
|
||
cp "$K"/libcap2-cap_names.h libcap/cap_names.h | ||
touch libcap/cap_names.list.h libcap/_makenames libcap/cap_names.h | ||
|
||
make -j$MAKE_THREADS prefix="$butch_prefix" lib=lib \ | ||
CFLAGS="-D_GNU_SOURCE $optcflags" LDFLAGS="$optldflags" \ | ||
BUILD_CC="$HOSTCC" CC="$CC" | ||
|
||
make RAISE_SETFCAP=no FAKEROOT="$butch_install_dir" prefix="$butch_prefix" lib=lib install | ||
LIBDIR=$butch_install_dir$butch_prefix/lib | ||
SBINDIR=$butch_install_dir$butch_prefix/sbin | ||
make RAISE_SETFCAP=no FAKEROOT="$butch_install_dir" prefix="$butch_prefix" \ | ||
SBINDIR="$butch_prefix"/bin lib=lib install | ||
|
||
dest="$butch_install_dir""$butch_prefix" | ||
LIBDIR="$dest"/lib | ||
SBINDIR="$dest"/bin | ||
|
||
LD_LIBRARY_PATH=${LIBDIR} ${SBINDIR}/setcap cap_setfcap=i ${SBINDIR}/setcap || echo \ | ||
"there was an error setting caps, you may want to investigate this" |