diff options
-rw-r--r-- | sys-libs/libcap/ChangeLog | 8 | ||||
-rw-r--r-- | sys-libs/libcap/files/libcap-2.16-drop-linux-workarounds.patch | 43 | ||||
-rw-r--r-- | sys-libs/libcap/libcap-2.16-r1.ebuild | 49 | ||||
-rw-r--r-- | sys-libs/libcap/libcap-2.16.ebuild | 3 |
4 files changed, 101 insertions, 2 deletions
diff --git a/sys-libs/libcap/ChangeLog b/sys-libs/libcap/ChangeLog index 22812cfe18eb..430de8a2124f 100644 --- a/sys-libs/libcap/ChangeLog +++ b/sys-libs/libcap/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-libs/libcap # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcap/ChangeLog,v 1.92 2009/04/26 19:09:10 ranger Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcap/ChangeLog,v 1.93 2009/05/16 16:17:06 vapier Exp $ + +*libcap-2.16-r1 (16 May 2009) + + 16 May 2009; Mike Frysinger <vapier@gentoo.org> libcap-2.16.ebuild, + +libcap-2.16-r1.ebuild, +files/libcap-2.16-drop-linux-workarounds.patch: + Drop linux header workarounds #265304 by Johan Hovold. 26 Apr 2009; Brent Baude <ranger@gentoo.org> libcap-2.16.ebuild: stable ppc, bug 265791 diff --git a/sys-libs/libcap/files/libcap-2.16-drop-linux-workarounds.patch b/sys-libs/libcap/files/libcap-2.16-drop-linux-workarounds.patch new file mode 100644 index 000000000000..bbd6db8357db --- /dev/null +++ b/sys-libs/libcap/files/libcap-2.16-drop-linux-workarounds.patch @@ -0,0 +1,43 @@ +dont need these compat hacks anymore + +http://bugs.gentoo.org/265304 + +--- libcap/include/sys/capability.h ++++ libcap/include/sys/capability.h +@@ -22,18 +22,6 @@ + #include <sys/types.h> + #include <stdint.h> + +-/* +- * 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 <linux/capability.h> + + /* +--- libcap/include/linux/capability.h ++++ libcap/include/linux/capability.h +@@ -40,13 +40,13 @@ + typedef struct __user_cap_header_struct { + __u32 version; + int pid; +-} __user *cap_user_header_t; ++} *cap_user_header_t; + + typedef struct __user_cap_data_struct { + __u32 effective; + __u32 permitted; + __u32 inheritable; +-} __user *cap_user_data_t; ++} *cap_user_data_t; + + + #define XATTR_CAPS_SUFFIX "capability" diff --git a/sys-libs/libcap/libcap-2.16-r1.ebuild b/sys-libs/libcap/libcap-2.16-r1.ebuild new file mode 100644 index 000000000000..e09468a738d2 --- /dev/null +++ b/sys-libs/libcap/libcap-2.16-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcap/libcap-2.16-r1.ebuild,v 1.1 2009/05/16 16:17:06 vapier Exp $ + +inherit eutils multilib toolchain-funcs pam + +DESCRIPTION="POSIX 1003.1e capabilities" +HOMEPAGE="http://www.friedhoff.org/posixfilecaps.html" +SRC_URI="mirror://kernel/linux/libs/security/linux-privs/libcap${PV:0:1}/${P}.tar.bz2" + +LICENSE="GPL-2 BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="pam" + +RDEPEND="sys-apps/attr + pam? ( virtual/pam )" +DEPEND="${RDEPEND} + sys-kernel/linux-headers" + +src_unpack() { + unpack ${P}.tar.bz2 + cd "${S}" + epatch "${FILESDIR}"/${PV}/*.patch + epatch "${FILESDIR}"/${PN}-2.16-drop-linux-workarounds.patch #265304 + sed -i -e '/cap_setfcap.*morgan/s:^:#:' pam_cap/capability.conf + sed -i \ + -e "/^PAM_CAP/s:=.*:=$(use pam && echo yes || echo no):" \ + -e '/^DYNAMIC/s:=.*:=yes:' \ + -e "/^lib=/s:=.*:=$(get_libdir):" \ + Make.Rules +} + +src_compile() { + tc-export BUILD_CC CC AR RANLIB + emake || die +} + +src_install() { + emake install DESTDIR="${D}" || die + + gen_usr_ldscript libcap.so + mv "${D}"/$(get_libdir)/libcap.a "${D}"/usr/$(get_libdir)/ || die + + dopammod pam_cap/pam_cap.so + dopamsecurity '' pam_cap/capability.conf + + dodoc CHANGELOG README doc/capability.notes +} diff --git a/sys-libs/libcap/libcap-2.16.ebuild b/sys-libs/libcap/libcap-2.16.ebuild index 57edd07415f4..10ffc0eaa2ef 100644 --- a/sys-libs/libcap/libcap-2.16.ebuild +++ b/sys-libs/libcap/libcap-2.16.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcap/libcap-2.16.ebuild,v 1.8 2009/04/26 19:09:10 ranger Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcap/libcap-2.16.ebuild,v 1.9 2009/05/16 16:17:06 vapier Exp $ inherit eutils multilib toolchain-funcs pam @@ -22,6 +22,7 @@ src_unpack() { unpack ${P}.tar.bz2 cd "${S}" epatch "${FILESDIR}"/${PV}/*.patch + epatch "${FILESDIR}"/${PN}-2.16-drop-linux-workarounds.patch #265304 sed -i -e '/cap_setfcap.*morgan/s:^:#:' pam_cap/capability.conf sed -i \ -e "/^PAM_CAP/s:=.*:=$(use pam && echo yes || echo no):" \ |