diff options
author | xeji <xeji@cat3.de> | 2018-03-14 20:06:58 +0100 |
---|---|---|
committer | xeji <xeji@cat3.de> | 2018-03-23 14:30:01 +0100 |
commit | 70044c899ebda11f24ccacfe397084c4ea12a2c3 (patch) | |
tree | 62d306759bb2abc3cbc4fa2e51de9cf3cd4c7c83 /pkgs/os-specific/linux/policycoreutils/default.nix | |
parent | 232c39e7abdb86c3533c258dc0bcacd380c34369 (diff) | |
download | nixlib-70044c899ebda11f24ccacfe397084c4ea12a2c3.tar nixlib-70044c899ebda11f24ccacfe397084c4ea12a2c3.tar.gz nixlib-70044c899ebda11f24ccacfe397084c4ea12a2c3.tar.bz2 nixlib-70044c899ebda11f24ccacfe397084c4ea12a2c3.tar.lz nixlib-70044c899ebda11f24ccacfe397084c4ea12a2c3.tar.xz nixlib-70044c899ebda11f24ccacfe397084c4ea12a2c3.tar.zst nixlib-70044c899ebda11f24ccacfe397084c4ea12a2c3.zip |
policycoreutils: 2.4 -> 2.7
Diffstat (limited to 'pkgs/os-specific/linux/policycoreutils/default.nix')
-rw-r--r-- | pkgs/os-specific/linux/policycoreutils/default.nix | 53 |
1 files changed, 11 insertions, 42 deletions
diff --git a/pkgs/os-specific/linux/policycoreutils/default.nix b/pkgs/os-specific/linux/policycoreutils/default.nix index 536c69ff5573..d2f6371225fb 100644 --- a/pkgs/os-specific/linux/policycoreutils/default.nix +++ b/pkgs/os-specific/linux/policycoreutils/default.nix @@ -1,64 +1,33 @@ -{ stdenv, fetchurl, pythonPackages, gettext -, setools, libsepol, libselinux, libcap_ng, libsemanage, sepolgen -}: +{ stdenv, fetchurl, gettext, libsepol, libselinux, libsemanage }: stdenv.mkDerivation rec { name = "policycoreutils-${version}"; - version = "2.4"; + version = "2.7"; inherit (libsepol) se_release se_url; src = fetchurl { url = "${se_url}/${se_release}/policycoreutils-${version}.tar.gz"; - sha256 = "0y9l9k60iy21hj0lcvfdfxs1fxydg6d3pxp9rhy7hwr4y5vgh6dq"; + sha256 = "1x742c7lkw30namhkw87yg7z384qzqjz0pvmqs0lk19v6958l6qa"; }; - patches = [ ./fix-printf-type.patch ]; - postPatch = '' - # Fix references to libsepol.a - find . -name Makefile -exec sed -i 's,[^ ]*/libsepol.a,${libsepol}/lib/libsepol.a,g' {} \; - # Fix install references - substituteInPlace po/Makefile --replace /usr/bin/install install - - # Fix references to /usr/share - grep -r '/usr/share' | awk -F: '{print $1}' | xargs sed -i "s,\(\$(DESTDIR)\)*/usr/share,$out/share,g" - - # Fix sepolicy install - sed -i "s,\(setup.py install\).*,\1 --prefix=$out,g" sepolicy/Makefile - - # Fix setuid install - sed -i 's|-m 4755|-m 755|' sandbox/Makefile + substituteInPlace po/Makefile \ + --replace /usr/bin/install install --replace /usr/share /share + substituteInPlace newrole/Makefile --replace /usr/share /share ''; - nativeBuildInputs = [ pythonPackages.python gettext ]; - buildInputs = [ setools libsepol libselinux libcap_ng libsemanage ]; - pythonPath = [ libselinux sepolgen ]; + nativeBuildInputs = [ gettext ]; + buildInputs = [ libsepol libselinux libsemanage ]; preBuild = '' makeFlagsArray+=("PREFIX=$out") makeFlagsArray+=("DESTDIR=$out") + makeFlagsArray+=("BASHCOMPLETIONDIR=$out/share/bash-completion/completions") + makeFlagsArray+=("LOCALEDIR=$out/share/locale") + makeFlagsArray+=("MAN5DIR=$out/share/man/man5") ''; - # Creation of the system-config-selinux directory is broken - preInstall = '' - mkdir -p $out/share/system-config-selinux - ''; - - # Fix the python scripts to include paths to libraries - # NOTE: We are not using wrapPythonPrograms or makeWrapper as these scripts - # purge the environment as a security measure - postInstall = '' - grep -r '#!.*python' $out/bin | awk -F: '{print $1}' | xargs sed -i "1a \ - import sys; \ - sys.path.append('$(toPythonPath "$out")'); \ - ${stdenv.lib.flip stdenv.lib.concatMapStrings pythonPath (lib: '' - sys.path.append('$(toPythonPath "${lib}")'); \ - '')}" - ''; - - NIX_CFLAGS_COMPILE = "-fstack-protector-all"; - meta = with stdenv.lib; { description = "SELinux policy core utilities"; license = licenses.gpl2; |