# HG changeset patch # User Matthew Sheets # Date 1247054004 0 # Node ID 759a344ac7abd1319d400064b4a7e000677f788b # Parent 442f111e41ae49dc5ffb8de04510d986c79ddcf8 Upgrade: libcap (2.10 to 2.16) diff -r 442f111e41ae -r 759a344ac7ab libcap-dev/receipt --- a/libcap-dev/receipt Wed Jul 08 11:13:20 2009 +0000 +++ b/libcap-dev/receipt Wed Jul 08 11:53:24 2009 +0000 @@ -1,7 +1,7 @@ # SliTaz package receipt. PACKAGE="libcap-dev" -VERSION="2.10" +VERSION="2.16" CATEGORY="development" SHORT_DESC="Support for getting/setting POSIX.1e capabilities." MAINTAINER="pankso@slitaz.org" @@ -14,5 +14,5 @@ { mkdir -p $fs/usr $fs/lib cp -a $_pkg/usr/include $fs/usr - cp -a $src/libcap/libcap.a $fs/lib + cp -a $src/libcap/*.*a $fs/lib } diff -r 442f111e41ae -r 759a344ac7ab libcap-pam/receipt --- a/libcap-pam/receipt Wed Jul 08 11:13:20 2009 +0000 +++ b/libcap-pam/receipt Wed Jul 08 11:53:24 2009 +0000 @@ -1,7 +1,7 @@ # SliTaz package receipt. PACKAGE="libcap-pam" -VERSION="2.10" +VERSION="2.16" CATEGORY="system-tools" SHORT_DESC="Support for getting/setting POSIX.1e capabilities, pam module." MAINTAINER="pascal.bellard@slitaz.org" diff -r 442f111e41ae -r 759a344ac7ab libcap/receipt --- a/libcap/receipt Wed Jul 08 11:13:20 2009 +0000 +++ b/libcap/receipt Wed Jul 08 11:53:24 2009 +0000 @@ -1,35 +1,63 @@ # SliTaz package receipt. PACKAGE="libcap" -VERSION="2.10" +VERSION="2.16" CATEGORY="system-tools" SHORT_DESC="Support for getting/setting POSIX.1e capabilities." MAINTAINER="pankso@slitaz.org" -DEPENDS="linux" -BUILD_DEPENDS="gperf pam-dev" -TARBALL="$PACKAGE-$VERSION.tar.gz" +DEPENDS="linux glibc-base" +BUILD_DEPENDS="slitaz-toolchain gperf pam pam-dev attr-dev" +TARBALL="$PACKAGE-$VERSION.tar.bz2" WEB_SITE="http://www.kernel.org/pub/linux/libs/security/linux-privs/" WGET_URL="${WEB_SITE}libcap2/$TARBALL" # Rules to configure and make the package. compile_rules() { - if [ ! -d $WOK/linux/taz ]; then - tazwok cook linux - fi +# if [ ! -d $WOK/linux/taz ]; then +# tazwok cook linux +# fi cd $src - sed -i -e s/'\\n'/"' -e '1i"/g -e 's/| indent -kr//' libcap/Makefile - mkdir libcap/include/attr - ln -s $WOK/linux/$(ls $WOK/linux/taz)/include/linux/xattr.h \ - libcap/include/attr/ - make && - make FAKEROOT=$PWD/_pkg install +# sed -i -e s/'\\n'/"' -e '1i"/g -e 's/| indent -kr//' libcap/Makefile +# mkdir -p libcap/include/attr +# ln -s $WOK/linux/$(ls $WOK/linux/taz)/include/linux/xattr.h \ +# libcap/include/attr/ + + # Linux headers are now sanitized properly for userspace, so patch libcap + # Based on http://bugs.gentoo.org/265304 and http://www.mail-archive.com/pld-cvs-commit@lists.pld-linux.org/msg183775.html + [ $(grep -c "#define __user" < libcap/include/sys/capability.h) -eq 0 ] || patch -p1 << EOP +--- libcap-2.16/libcap/include/sys/capability.h.orig 2009-03-05 11:19:00.000000000 -0300 ++++ libcap-2.16/libcap/include/sys/capability.h 2009-03-05 11:19:38.000000000 -0300 +@@ -22,18 +22,6 @@ extern "C" { + #include + #include + +-/* +- * Make sure we can be included from userland by preventing +- * capability.h from including other kernel headers +- */ +-#define _LINUX_TYPES_H +-#define _LINUX_FS_H +-#define __LINUX_COMPILER_H +-#define __user +- +-typedef unsigned int __u32; +-typedef __u32 __le32; +- + #include + + /* +EOP + + sed -i -e 's/\} __user \*cap_user_/\} \*cap_user_/g' libcap/include/linux/capability.h + make DYNAMIC=yes && + make DESTDIR=$src/_pkg install } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p $fs/lib - cp -a $_pkg/lib/lib* $fs/lib + cp -a $_pkg/lib/*.so* $fs/lib cp -a $_pkg/sbin $fs }