1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 21:50:55 +00:00

Merge pull request #1297 from wkennington/sysworking2

Update lots of Linux Utilities 2
This commit is contained in:
Michael Raskin 2013-12-01 05:33:54 -08:00
commit c00898c7a7
19 changed files with 136 additions and 73 deletions

View file

@ -0,0 +1,28 @@
{ stdenv, fetchurl, openldap
, enablePython ? false, python ? null
}:
assert enablePython -> python != null;
stdenv.mkDerivation rec {
name = "audit-2.3.2";
src = fetchurl {
url = "http://people.redhat.com/sgrubb/audit/${name}.tar.gz";
sha256 = "0a8x10wz0xfj0iq1wgjl6hdhxvq58cb3906vc687i21876sy0wl8";
};
buildInputs = [ openldap ]
++ stdenv.lib.optional enablePython python;
configureFlags = ''
${if enablePython then "--with-python" else "--without-python"}
'';
meta = {
description = "Audit Library";
homepage = "http://people.redhat.com/sgrubb/audit/";
license = "GPLv2";
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -2,12 +2,12 @@
stdenv.mkDerivation rec {
name = "checkpolicy-${version}";
version = "2.1.11";
version = "2.2";
inherit (libsepol) se_release se_url;
src = fetchurl {
url = "${se_url}/${se_release}/checkpolicy-${version}.tar.gz";
sha256 = "1wahs32l4jjlg0s3lyihdhvwmsy7yyvq5pk96q9lsiilc5vvrb06";
sha256 = "1y5dx4s5k404fgpm7hlhgw8a9b9ksn3q2d3fj6f9rdac9n7nkxlz";
};
buildInputs = [ libsepol libselinux bison flex ];

View file

@ -1,13 +1,13 @@
{ stdenv, fetchurl, utillinux }:
stdenv.mkDerivation rec {
name = "fuse-2.9.2";
name = "fuse-2.9.3";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://sourceforge/fuse/${name}.tar.gz";
sha256 = "1z6fg593hy1j7mynhckx43gqkkg2nwpmwwv860337nl77zxji9w1";
sha256 = "071r6xjgssy8vwdn6m28qq1bqxsd2bphcd2mzhq0grf5ybm87sqb";
};
configureFlags = "--disable-kernel-module";

View file

@ -1,11 +1,11 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "hdparm-9.39";
name = "hdparm-9.43";
src = fetchurl {
url = "mirror://sourceforge/hdparm/${name}.tar.gz";
sha256 = "1siw9c2hrsck47jr9wpip9n677g31qd34y8whkq9dai68npm1mbj";
sha256 = "0amm2s67vzfgs0jv59jgj9pqkr6j9glj1chsj292263i94kr5gib";
};
preBuild = ''

View file

@ -1,5 +0,0 @@
source $stdenv/setup
export DESTDIR=$out
genericBuild

View file

@ -1,10 +1,21 @@
{stdenv, fetchurl}:
stdenv.mkDerivation {
name = "hwdata-0.172";
builder = ./builder.sh;
name = "hwdata-0.249";
src = fetchurl {
url = ftp://ftp.nluug.nl/pub/os/Linux/distr/debian/pool/main/h/hwdata/hwdata_0.172.orig.tar.gz;
md5 = "1c6b7f4dfe489f881702176c5f8e5a2e";
url = "https://git.fedorahosted.org/cgit/hwdata.git/snapshot/hwdata-0.249-1.tar.bz2";
sha256 = "1ak3h3psg3wk9yk0dqnzdzik3jadzja3ah22vjfmf71p3b5xc8ai";
};
preConfigure = "patchShebangs ./configure";
configureFlags = "--datadir=$(prefix)/data";
meta = {
homepage = "https://fedorahosted.org/hwdata/";
description = "Hardware Database, including Monitors, pci.ids, usb.ids, and video cards";
license = "GPLv2";
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -1,14 +1,14 @@
{ fetchurl, stdenv, flex, bison, db4, iptables, pkgconfig }:
stdenv.mkDerivation rec {
name = "iproute2-3.8.0";
name = "iproute2-3.12.0";
src = fetchurl {
url = "mirror://kernel/linux/utils/net/iproute2/${name}.tar.xz";
sha256 = "0kqy30wz2krbg4y7750hjq5218hgy2vj9pm5qzkn1bqskxs4b4ap";
sha256 = "04gi11gh087bg2nlxhj0lxrk8l9qxkpr88nsiil23917bm3h1xj4";
};
patches = [ ./vpnc.patch ./no-werror.patch ];
patch = [ "vpnc.patch" ];
preConfigure =
''
@ -16,8 +16,6 @@ stdenv.mkDerivation rec {
sed -e '/ARPDDIR/d' -i Makefile
'';
postConfigure = "cat Config";
makeFlags = "DESTDIR= LIBDIR=$(out)/lib SBINDIR=$(out)/sbin"
+ " CONFDIR=$(out)/etc DOCDIR=$(out)/share/doc/${name}"
+ " MANDIR=$(out)/share/man";

View file

@ -1,12 +0,0 @@
diff -ubr iproute2-3.8.0-orig/Makefile iproute2-3.8.0/Makefile
--- iproute2-3.8.0-orig/Makefile 2013-04-06 00:03:21.072827860 +0200
+++ iproute2-3.8.0/Makefile 2013-04-06 00:03:25.353837862 +0200
@@ -30,7 +30,7 @@
HOSTCC = gcc
DEFINES += -D_GNU_SOURCE
CCOPTS = -O2
-WFLAGS := -Wall -Wstrict-prototypes -Werror -Wmissing-prototypes
+WFLAGS := -Wall -Wstrict-prototypes -Wmissing-prototypes
WFLAGS += -Wmissing-declarations -Wold-style-definition
CFLAGS = $(WFLAGS) $(CCOPTS) -I../include $(DEFINES)

View file

@ -1,18 +1,22 @@
{stdenv, fetchurl}:
{ stdenv, fetchurl, gnumake, file }:
stdenv.mkDerivation rec {
name = "keyutils-1.2";
name = "keyutils-1.5.8";
src = fetchurl {
url = http://people.redhat.com/dhowells/keyutils/keyutils-1.2.tar.bz2;
sha256 = "0gcv47crbaw6crgn02j1w75mknhnwgkhmfcmwq2qi9iwiwprnv9h";
url = "http://people.redhat.com/dhowells/keyutils/${name}.tar.bz2";
sha256 = "17419fr7mph8wlhxpqb1bdrghz0db15bmjdgxg1anfgbf9ra6zbc";
};
buildInputs = [ file ];
patchPhase = ''
sed -i -e "s, /etc, $out/etc," \
sed -i -e "s,/usr/bin/make,${gnumake}/bin/make," \
-e "s, /etc, $out/etc," \
-e "s, /bin, $out/bin," \
-e "s, /sbin, $out/sbin," \
-e "s, /lib, $out/lib," \
-e "s, /lib64, $out/lib64," \
-e "s,/usr,$out," \
Makefile
'';

View file

@ -1,11 +1,11 @@
{ stdenv, fetchurl, xz, zlib, pkgconfig, libxslt }:
stdenv.mkDerivation rec {
name = "kmod-12";
name = "kmod-15";
src = fetchurl {
url = "mirror://kernel/linux/utils/kernel/kmod/${name}.tar.xz";
sha256 = "c6189dd8c5a1e8d9224e8506bd188c0cd5dfa119fd6b7e5869b3640cbe8bf92f";
sha256 = "17nasn7kpbmbcgyfn9lh50k00bg6qmccxrhzd2m4d6wjw6khxvz8";
};
# Disable xz/zlib support to prevent needing them in the initrd.

View file

@ -1,11 +1,11 @@
{ stdenv, fetchurl, pkgconfig, udev }:
stdenv.mkDerivation rec {
name = "libatasmart-0.17";
name = "libatasmart-0.19";
src = fetchurl {
url = "http://0pointer.de/public/${name}.tar.gz";
sha256 = "1zazxnqsirlv9gkzij6z31b21gv2nv7gkpja0wpxwb7kfh9a2qid";
url = "http://0pointer.de/public/${name}.tar.xz";
sha256 = "138gvgdwk6h4ljrjsr09pxk1nrki4b155hqdzyr8mlk3bwsfmw31";
};
buildInputs = [ pkgconfig udev ];

View file

@ -1,11 +1,11 @@
{stdenv, fetchurl, bison, flex}:
stdenv.mkDerivation rec {
name = "libnl-3.2.13";
name = "libnl-3.2.23";
src = fetchurl {
url = "${meta.homepage}files/${name}.tar.gz";
sha256 = "1ydw42lsd572qwrfgws97n76hyvjdpanwrxm03lysnhfxkna1ssd";
sha256 = "1czj2bpb799bih6ighqwbvv9pvbpcw7vmccv9cwavfwcmalwvhlc";
};
buildInputs = [ bison flex ];

View file

@ -8,7 +8,7 @@ with stdenv.lib;
stdenv.mkDerivation rec {
name = "libselinux-${version}";
version = "2.1.12";
version = "2.2.1";
inherit (libsepol) se_release se_url;
src = fetchurl {
@ -16,30 +16,22 @@ stdenv.mkDerivation rec {
sha256 = "17navgvljgq35bljzcdwjdj3khajc27s15binr51xkp0h29qgbcd";
};
patch_src = fetchurl {
url = "http://dev.gentoo.org/~swift/patches/libselinux/patchbundle-${name}-r2.tar.gz";
sha256 = "08zaas8iwyf4w9ll1ylyv4gril1nfarckd5h1l53563sxzyf7dqh";
};
patches = [ ./fPIC.patch ]; # libsemanage seems to need -fPIC everywhere
buildInputs = [ pkgconfig libsepol pcre ]
++ optionals enablePython [ swig python ];
prePatch = ''
tar xvf ${patch_src}
for p in gentoo-patches/*.patch; do
patch -p1 < "$p"
done
'';
postPatch = optionalString enablePython ''
sed -i -e 's|\$(LIBDIR)/libsepol.a|${libsepol}/lib/libsepol.a|' src/Makefile
'';
installFlags = [ "PREFIX=$(out)" "DESTDIR=$(out)" "LIBSEPOLDIR=${libsepol}" ];
installFlags = [ "PREFIX=$(out)" "DESTDIR=$(out)" ];
installTargets = [ "install" ] ++ optional enablePython "install-pywrap";
# TODO: Figure out why the build incorrectly links libselinux.so
postInstall = ''
rm $out/lib/libselinux.so
ln -s libselinux.so.1 $out/lib/libselinux.so
'';
meta = {
inherit (libsepol.meta) homepage platforms maintainers;
};

View file

@ -1,13 +1,13 @@
{ stdenv, fetchurl, libsepol, libselinux, ustr, bzip2, bison, flex }:
{ stdenv, fetchurl, libsepol, libselinux, ustr, bzip2, bison, flex, audit }:
stdenv.mkDerivation rec {
name = "libsemanage-${version}";
version = "2.1.9";
version = "2.2";
inherit (libsepol) se_release se_url;
src = fetchurl {
url = "${se_url}/${se_release}/libsemanage-${version}.tar.gz";
sha256 = "1k1my3n1pj30c5887spykcdk1brgxfpxmrz6frxjyhaijxzx20bg";
sha256 = "0xdx0dwcsyw4kv9l6xwdkfg6v7fc9b5y176rkg6n6q0w1zx0pxhi";
};
makeFlags = "PREFIX=$(out) DESTDIR=$(out)";
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = "-fstack-protector-all";
NIX_CFLAGS_LINK = "-lsepol";
buildInputs = [ libsepol libselinux ustr bzip2 bison flex ];
buildInputs = [ libsepol libselinux ustr bzip2 bison flex audit ];
meta = with stdenv.lib; {
inherit (libsepol.meta) homepage platforms maintainers;

View file

@ -2,17 +2,23 @@
stdenv.mkDerivation rec {
name = "libsepol-${version}";
version = "2.1.8";
se_release = "20120924";
version = "2.2";
se_release = "20131030";
se_url = "${meta.homepage}/releases";
src = fetchurl {
url = "${se_url}/${se_release}/libsepol-${version}.tar.gz";
sha256 = "1w38q3lmha5m9aps9w844i51yw4b8q1vhpng2kdywn2n8cpdvvk3";
sha256 = "03zw6clp00cmi49x8iq8svhrp91jrcw0093zpnyhan190rqb593p";
};
preBuild = '' makeFlags="$makeFlags PREFIX=$out DESTDIR=$out" '';
# TODO: Figure out why the build incorrectly links libsepol.so
postInstall = ''
rm $out/lib/libsepol.so
ln -s libsepol.so.1 $out/lib/libsepol.so
'';
passthru = { inherit se_release se_url meta; };
meta = with stdenv.lib; {

View file

@ -1,23 +1,24 @@
{ stdenv, fetchurl, intltool, pcre, libcap_ng, libcgroup
, libsepol, libselinux, libsemanage
, libsepol, libselinux, libsemanage, setools
, python, sepolgen }:
stdenv.mkDerivation rec {
name = "policycoreutils-${version}";
version = "2.1.13";
version = "2.2.4";
inherit (libsepol) se_release se_url;
src = fetchurl {
url = "${se_url}/${se_release}/policycoreutils-${version}.tar.gz";
sha256 = "1145nbpwndmhma08vvj1j75bjd8xhjal0vjpazlrw78iyc30y11l";
sha256 = "08zpd2a2j45j1qkmq9sz084r2xr0fky1cnld45sn8w5xgdw8k81n";
};
patchPhase = ''
substituteInPlace po/Makefile --replace /usr/bin/install install
find . -type f -exec sed -i 's,/usr/bin/python,${python}/bin/python,' {} \;
'';
buildInputs = [ intltool pcre libcap_ng libcgroup
libsepol libselinux libsemanage
libsepol libselinux libsemanage setools
python sepolgen # ToDo? these are optional
];
@ -25,6 +26,11 @@ stdenv.mkDerivation rec {
mkdir -p "$out/lib" && cp -s "${libsepol}/lib/libsepol.a" "$out/lib"
'';
# Creation of the system-config-selinux directory is broken
preInstall = ''
mkdir -p $out/share/system-config-selinux
'';
NIX_CFLAGS_COMPILE = "-fstack-protector-all";
NIX_LDFLAGS = "-lsepol -lpcre";

View file

@ -2,12 +2,12 @@
stdenv.mkDerivation rec {
name = "sepolgen-${version}";
version = "1.1.8";
version = "1.2.1";
inherit (libsepol) se_release se_url;
src = fetchurl {
url = "${se_url}/${se_release}/sepolgen-${version}.tar.gz";
sha256 = "1sssc9d4wz7l23yczlzplsmdr891sqr9w34ccn1bfwlnc4q63xdm";
sha256 = "1c41hz4a64mjvbfhgc7c7plydahsc161z0qn46qz2g3bvimj9323";
};
makeFlags = "PREFIX=$(out) DESTDIR=$(out) PYTHONLIBDIR=lib/${python.libPrefix}/site-packages";

View file

@ -0,0 +1,31 @@
{ stdenv, fetchurl, autoreconfHook, pkgconfig, bison, flex
, python, swig2, tcl, libsepol, libselinux, libxml2, sqlite, bzip2 }:
stdenv.mkDerivation rec {
name = "setools-3.3.8";
src = fetchurl {
url = "http://oss.tresys.com/projects/setools/chrome/site/dists/${name}/${name}.tar.bz2";
sha256 = "16g987ijaxabc30zyjzia4nafq49rm038y1pm4vca7i3kb67wf24";
};
# SWIG-TCL is broken in 3.3.8
configureFlags = ''
--with-tcl=${tcl}/lib
--with-sepol-devel=${libsepol}
--with-selinux-devel=${libselinux}
--disable-gui
--disable-swig-tcl
'';
buildInputs = [ autoreconfHook pkgconfig bison flex python swig2 ];
nativeBuildInputs = [ tcl libsepol libselinux libxml2 sqlite bzip2 ];
meta = {
description = "SELinux Tools";
homepage = "http://oss.tresys.com/projects/setools/";
license = "GPLv2";
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -6496,6 +6496,8 @@ let
atop = callPackage ../os-specific/linux/atop { };
audit = callPackage ../os-specific/linux/audit { };
b43Firmware_5_1_138 = callPackage ../os-specific/linux/firmware/b43-firmware/5.1.138.nix { };
b43FirmwareCutter = callPackage ../os-specific/linux/firmware/b43-firmware-cutter { };
@ -7060,6 +7062,8 @@ let
sepolgen = callPackage ../os-specific/linux/sepolgen { };
setools = callPackage ../os-specific/linux/setools { };
shadow = callPackage ../os-specific/linux/shadow { };
statifier = builderDefsPackage (import ../os-specific/linux/statifier) { };