mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-29 16:24:10 +00:00
* Use kernel 2.6 libcap.
svn path=/nixpkgs/trunk/; revision=10895
This commit is contained in:
parent
374509f104
commit
afe69eecbe
@ -1,21 +1,18 @@
|
||||
{stdenv, fetchurl}:
|
||||
{stdenv, fetchurl, attr}:
|
||||
|
||||
assert stdenv.isLinux;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "libcap-1.10";
|
||||
name = "libcap-2.07";
|
||||
|
||||
src = fetchurl {
|
||||
url = mirror://kernel/linux/libs/security/linux-privs/kernel-2.4/libcap-1.10.tar.bz2;
|
||||
md5 = "4426a413128142cab89eb2e6f13d8571";
|
||||
url = mirror://kernel/linux/libs/security/linux-privs/kernel-2.6/libcap-2.07.tar.gz;
|
||||
sha256 = "1zz8nyqzb15lf31akwyzzfdhyhf9xvl9rqih90m9kypmcmc4yz5q";
|
||||
};
|
||||
|
||||
preBuild = "
|
||||
substituteInPlace libcap/Makefile --replace /usr/include ${stdenv.glibc}/include
|
||||
makeFlags=\"LIBDIR=$out/lib INCDIR=$out/include SBINDIR=$out/sbin MANDIR=$out/man\"
|
||||
";
|
||||
buildInputs = [attr];
|
||||
|
||||
patches = [
|
||||
# Borrowed from http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/libcap/files/libcap-1.10-syscall.patch?rev=1.2&view=log.
|
||||
./syscall.patch
|
||||
];
|
||||
preBuild = ''
|
||||
makeFlagsArray=(LIBDIR=$out/lib INCDIR=$out/include SBINDIR=$out/sbin MANDIR=$out/man)
|
||||
'';
|
||||
}
|
||||
|
@ -1,40 +0,0 @@
|
||||
--- libcap-1.10/libcap/cap_sys.c.jj 2003-08-24 19:03:35.524759616 -0700
|
||||
+++ libcap-1.10/libcap/cap_sys.c 2003-08-24 19:03:48.406801248 -0700
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "libcap.h"
|
||||
#define __LIBRARY__
|
||||
#include <linux/unistd.h>
|
||||
-
|
||||
+/*
|
||||
_syscall2(int, capget,
|
||||
cap_user_header_t, header,
|
||||
cap_user_data_t, data)
|
||||
@@ -18,7 +18,7 @@
|
||||
_syscall2(int, capset,
|
||||
cap_user_header_t, header,
|
||||
const cap_user_data_t, data)
|
||||
-
|
||||
+*/
|
||||
/*
|
||||
* $Log: libcap-1.10-syscall.patch,v $
|
||||
* Revision 1.1.1.1 2005/11/30 09:39:11 chriswhite
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.2 2003/08/29 06:28:38 cretin
|
||||
* Only add -fPIC for libcap.so objects
|
||||
*
|
||||
* Revision 1.1 2003/08/27 06:10:53 cretin
|
||||
* Added -fPIC for prelink to work, and fixed compile error
|
||||
*
|
||||
* Revision 1.1.1.1 1999/04/17 22:16:31 morgan
|
||||
--- libcap-1.10/libcap/Makefile.jj 2003-08-29 07:19:21.863907872 +0100
|
||||
+++ libcap-1.10/libcap/Makefile 2003-08-29 07:20:21.562832256 +0100
|
||||
@@ -61,7 +61,7 @@
|
||||
ln -sf $(MAJLIBNAME) $(LIBNAME)
|
||||
|
||||
%.o: %.c $(INCLS)
|
||||
- $(CC) $(CFLAGS) -c $< -o $@
|
||||
+ $(CC) $(CFLAGS) -fPIC -c $< -o $@
|
||||
|
||||
install: all
|
||||
mkdir -p -m 0755 $(INCDIR)/sys
|
@ -4131,7 +4131,7 @@ rec {
|
||||
};
|
||||
|
||||
libcap = import ../os-specific/linux/libcap {
|
||||
inherit fetchurl stdenv;
|
||||
inherit fetchurl stdenv attr;
|
||||
};
|
||||
|
||||
libnscd = import ../os-specific/linux/libnscd {
|
||||
|
Loading…
Reference in New Issue
Block a user