* Build ntpd with capabilities support.
svn path=/nixpkgs/trunk/; revision=7462
This commit is contained in:
parent
000b1f4cd6
commit
33db7f3dd3
|
@ -0,0 +1,21 @@
|
||||||
|
{stdenv, fetchurl}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "libcap-1.10";
|
||||||
|
src = fetchurl {
|
||||||
|
url = http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.4/libcap-1.10.tar.bz2;
|
||||||
|
md5 = "4426a413128142cab89eb2e6f13d8571";
|
||||||
|
};
|
||||||
|
|
||||||
|
preBuild = "
|
||||||
|
sed 's|/usr/include|${stdenv.glibc}/include|' < libcap/Makefile > libcap/Makefile.tmp
|
||||||
|
mv libcap/Makefile.tmp libcap/Makefile
|
||||||
|
|
||||||
|
installFlags=\"LIBDIR=$out/lib INCDIR=$out/include SBINDIR=$out/sbin MANDIR=$out/man\"
|
||||||
|
";
|
||||||
|
|
||||||
|
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
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
--- 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
|
|
@ -1,4 +1,6 @@
|
||||||
{stdenv, fetchurl}:
|
{stdenv, fetchurl, libcap}:
|
||||||
|
|
||||||
|
assert stdenv.isLinux -> libcap != null;
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "ntp-4.2.2p4";
|
name = "ntp-4.2.2p4";
|
||||||
|
@ -6,4 +8,8 @@ stdenv.mkDerivation {
|
||||||
url = http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2.2p4.tar.gz;
|
url = http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2.2p4.tar.gz;
|
||||||
md5 = "916fe57525f8327f340b203f129088fa";
|
md5 = "916fe57525f8327f340b203f129088fa";
|
||||||
};
|
};
|
||||||
|
configureFlags = "
|
||||||
|
${if stdenv.isLinux then "--enable-linuxcaps" else ""}
|
||||||
|
";
|
||||||
|
buildInputs = if stdenv.isLinux then [libcap] else [];
|
||||||
}
|
}
|
||||||
|
|
|
@ -435,7 +435,7 @@ rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
ntp = import ../tools/networking/ntp {
|
ntp = import ../tools/networking/ntp {
|
||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv libcap;
|
||||||
};
|
};
|
||||||
|
|
||||||
openssh = import ../tools/networking/openssh {
|
openssh = import ../tools/networking/openssh {
|
||||||
|
@ -2207,6 +2207,10 @@ rec {
|
||||||
inherit fetchurl stdenv perl bison mktemp kernel;
|
inherit fetchurl stdenv perl bison mktemp kernel;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
libcap = import ../os-specific/linux/libcap {
|
||||||
|
inherit fetchurl stdenv;
|
||||||
|
};
|
||||||
|
|
||||||
mingetty = import ../os-specific/linux/mingetty {
|
mingetty = import ../os-specific/linux/mingetty {
|
||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue