From ca2b2462ed182f3d857e3ada01374f478f6a4161 Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Sat, 17 Aug 2019 17:48:37 +0000 Subject: [PATCH 1/8] libsepol: 2.7 -> 2.9 --- pkgs/os-specific/linux/libsepol/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/linux/libsepol/default.nix b/pkgs/os-specific/linux/libsepol/default.nix index e96ea01cce42..03bd0252c5ca 100644 --- a/pkgs/os-specific/linux/libsepol/default.nix +++ b/pkgs/os-specific/linux/libsepol/default.nix @@ -2,15 +2,15 @@ stdenv.mkDerivation rec { pname = "libsepol"; - version = "2.7"; - se_release = "20170804"; - se_url = "https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases"; + version = "2.9"; + se_release = "20190315"; + se_url = "https://github.com/SELinuxProject/selinux/releases/download"; outputs = [ "bin" "out" "dev" "man" ]; src = fetchurl { url = "${se_url}/${se_release}/libsepol-${version}.tar.gz"; - sha256 = "1rzr90d3f1g5wy1b8sh6fgnqb9migys2zgpjmpakn6lhxkc3p7fn"; + sha256 = "0p8x7w73jn1nysx1d7416wqrhbi0r6isrjxib7jf68fi72q14jx3"; }; nativeBuildInputs = [ flex ]; From 0278e8387e7530c955dc95a0cb78aec7c69fb921 Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Sat, 17 Aug 2019 17:49:04 +0000 Subject: [PATCH 2/8] libselinux: 2.7 -> 2.9 --- pkgs/os-specific/linux/libselinux/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/linux/libselinux/default.nix b/pkgs/os-specific/linux/libselinux/default.nix index 028c008eccf6..d8a2298f3d3f 100644 --- a/pkgs/os-specific/linux/libselinux/default.nix +++ b/pkgs/os-specific/linux/libselinux/default.nix @@ -9,14 +9,14 @@ with stdenv.lib; stdenv.mkDerivation rec { pname = "libselinux"; - version = "2.7"; + version = "2.9"; inherit (libsepol) se_release se_url; - outputs = [ "bin" "out" "dev" "man" "py" ]; + outputs = [ "bin" "out" "dev" "man" ] ++ optional enablePython "py"; src = fetchurl { url = "${se_url}/${se_release}/libselinux-${version}.tar.gz"; - sha256 = "0mwcq78v6ngbq06xmb9dvilpg0jnl2vs9fgrpakhmmiskdvc1znh"; + sha256 = "14r69mgmz7najf9wbizvp68q56mqx4yjbkxjlbcqg5a47s3wik0v"; }; nativeBuildInputs = [ pkgconfig ] ++ optionals enablePython [ swig python ]; @@ -35,7 +35,8 @@ stdenv.mkDerivation rec { "MAN3DIR=$(man)/share/man/man3" "MAN5DIR=$(man)/share/man/man5" "MAN8DIR=$(man)/share/man/man8" - "PYSITEDIR=$(py)/${python.sitePackages}" + "PYTHON=python" + "PYTHONLIBDIR=$(py)/${python.sitePackages}" "SBINDIR=$(bin)/sbin" "SHLIBDIR=$(out)/lib" From d09152cb28dd868c1026126694a1c722ac66fe2d Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Sat, 17 Aug 2019 17:49:50 +0000 Subject: [PATCH 3/8] selinux-sandbox: 2.7 -> 2.9 --- .../linux/selinux-sandbox/default.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/os-specific/linux/selinux-sandbox/default.nix b/pkgs/os-specific/linux/selinux-sandbox/default.nix index 99bbfbe7287a..5343c5fae1a9 100644 --- a/pkgs/os-specific/linux/selinux-sandbox/default.nix +++ b/pkgs/os-specific/linux/selinux-sandbox/default.nix @@ -9,12 +9,12 @@ with python3.pkgs; stdenv.mkDerivation rec { pname = "selinux-sandbox"; - version = "2.7"; - se_release = "20170804"; + version = "2.9"; + inherit (policycoreutils) se_release se_url; src = fetchurl { - url = "https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${se_release}/selinux-sandbox-${version}.tar.gz"; - sha256 = "0hf5chm90iapb42njaps6p5460ys3ajh5446ja544vdbh01n544l"; + url = "${se_url}/${se_release}/selinux-sandbox-${version}.tar.gz"; + sha256 = "0qj20jyi8v1653xdqj5yak3wwbvg5bw8f2jmx8fpahl6y1bmz481"; }; nativeBuildInputs = [ wrapPython ]; @@ -42,10 +42,10 @@ stdenv.mkDerivation rec { --replace "/usr/bin/test" "${coreutils}/bin/test" \ ''; - preBuild = '' - makeFlagsArray+=("PREFIX=$out") - makeFlagsArray+=("DESTDIR=$out") - ''; + makeFlags = [ + "PREFIX=$(out)" + "SYSCONFDIR=$(out)/etc/sysconfig" + ]; postFixup = '' wrapPythonPrograms From 5620d987e24ed46d8fa685ff1f10f577df4dbf6e Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Sat, 17 Aug 2019 16:13:30 +0000 Subject: [PATCH 4/8] selinux-python: 2.7 -> 2.9 --- .../linux/selinux-python/default.nix | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/pkgs/os-specific/linux/selinux-python/default.nix b/pkgs/os-specific/linux/selinux-python/default.nix index b8f80a0124c2..2ca88c32f13f 100644 --- a/pkgs/os-specific/linux/selinux-python/default.nix +++ b/pkgs/os-specific/linux/selinux-python/default.nix @@ -8,13 +8,13 @@ with python3.pkgs; stdenv.mkDerivation rec { pname = "selinux-python"; - version = "2.7"; - se_release = "20170804"; - se_url = "https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases"; + version = "2.9"; + + inherit (libsepol) se_release se_url; src = fetchurl { url = "${se_url}/${se_release}/selinux-python-${version}.tar.gz"; - sha256 = "1va0y4b7cah7rprh04b3ylmwqgnivpkw5z2zw68nrafdbsbcn5s2"; + sha256 = "1pjzsyay5535cxcjag7y7k193ajry0s0xc3dqv5905qd7cwval1n"; }; nativeBuildInputs = [ wrapPython ]; @@ -23,17 +23,19 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace sepolicy/Makefile --replace "echo --root" "echo --prefix" + substituteInPlace sepolgen/src/share/Makefile --replace "/var/lib/sepolgen" \ + "\$PREFIX/var/lib/sepolgen" ''; - preBuild = '' - makeFlagsArray+=("PREFIX=$out") - makeFlagsArray+=("DESTDIR=$out") - makeFlagsArray+=("LOCALEDIR=$out/share/locale") - makeFlagsArray+=("LIBSEPOLA=${stdenv.lib.getLib libsepol}/lib/libsepol.a") - makeFlagsArray+=("BASHCOMPLETIONDIR=$out/share/bash-completion/completions") - makeFlagsArray+=("PYTHON=${python3}/bin/python") - makeFlagsArray+=("PYTHONLIBDIR=lib/${python3.libPrefix}/site-packages") - ''; + makeFlags = [ + "PREFIX=$(out)" + "LOCALEDIR=$(out)/share/locale" + "BASHCOMPLETIONDIR=$(out)/share/bash-completion/completions" + "PYTHON=python" + "PYTHONLIBDIR=$(out)/${python.sitePackages}" + "LIBSEPOLA=${stdenv.lib.getLib libsepol}/lib/libsepol.a" + ]; + postFixup = '' wrapPythonPrograms From 5c1db35ea24a50d4ccd5426b665ba938ed1ccbdc Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Sat, 17 Aug 2019 16:13:48 +0000 Subject: [PATCH 5/8] semodule-utils: 2.7 -> 2.9 --- pkgs/os-specific/linux/semodule-utils/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/semodule-utils/default.nix b/pkgs/os-specific/linux/semodule-utils/default.nix index 178d102381e0..bf1f36835b47 100644 --- a/pkgs/os-specific/linux/semodule-utils/default.nix +++ b/pkgs/os-specific/linux/semodule-utils/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "semodule-utils"; - version = "2.7"; + version = "2.9"; inherit (libsepol) se_release se_url; src = fetchurl { url = "${se_url}/${se_release}/${pname}-${version}.tar.gz"; - sha256 = "1fl60x4w8rn5bcwy68sy48aydwsn1a17d48slni4sfx4c8rqpjch"; + sha256 = "01yrwnd3calmw6r8kdh8ld7i7fb250n2yqqqk9p0ymrlwsg6g0w0"; }; buildInputs = [ libsepol ]; From 41b4342decae3deae0429cb2db23ce7197deeac0 Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Sat, 17 Aug 2019 17:08:49 +0000 Subject: [PATCH 6/8] libsemanage: 2.7 -> 2.9 --- .../os-specific/linux/libsemanage/default.nix | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/pkgs/os-specific/linux/libsemanage/default.nix b/pkgs/os-specific/linux/libsemanage/default.nix index 4fe323ee23de..70b2508451bb 100644 --- a/pkgs/os-specific/linux/libsemanage/default.nix +++ b/pkgs/os-specific/linux/libsemanage/default.nix @@ -6,25 +6,29 @@ with stdenv.lib; stdenv.mkDerivation rec { pname = "libsemanage"; - version = "2.7"; + version = "2.9"; inherit (libsepol) se_release se_url; src = fetchurl { url = "${se_url}/${se_release}/libsemanage-${version}.tar.gz"; - sha256 = "0xnlp1yg8b1aqc6kq3pss1i1nl06rfj4x4pyl5blasnf2ivlgs87"; - }; + sha256 = "075w6y3l9hiy5hicgwrmijyxmhfyd1r7cnc08qxyg4j46jfk8xi5"; + }; + + outputs = [ "out" "dev" "man" ] ++ optional enablePython "py"; nativeBuildInputs = [ bison flex pkgconfig ]; buildInputs = [ libsepol libselinux bzip2 audit ] ++ optionals enablePython [ swig python ]; - preBuild = '' - makeFlagsArray+=("PREFIX=$out") - makeFlagsArray+=("DESTDIR=$out") - makeFlagsArray+=("MAN3DIR=$out/share/man/man3") - makeFlagsArray+=("MAN5DIR=$out/share/man/man5") - makeFlagsArray+=("PYSITEDIR=$out/lib/${python.libPrefix}/site-packages") - ''; + makeFlags = [ + "PREFIX=$(out)" + "INCLUDEDIR=$(dev)/include" + "MAN3DIR=$(man)/share/man/man3" + "MAN5DIR=$(man)/share/man/man5" + "PYTHON=python" + "PYTHONLIBDIR=$(py)/${python.sitePackages}" + "DEFAULT_SEMANAGE_CONF_LOCATION=$(out)/etc/selinux/semanage.conf" + ]; installTargets = [ "install" ] ++ optionals enablePython [ "install-pywrap" ]; From 563bb469f79d5dc1c01a75c1d4870427a68d5177 Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Sat, 17 Aug 2019 17:09:12 +0000 Subject: [PATCH 7/8] policycoreutils: 2.7 -> 2.9 --- .../linux/policycoreutils/default.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pkgs/os-specific/linux/policycoreutils/default.nix b/pkgs/os-specific/linux/policycoreutils/default.nix index fb507d4da485..9d229c50000e 100644 --- a/pkgs/os-specific/linux/policycoreutils/default.nix +++ b/pkgs/os-specific/linux/policycoreutils/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation rec { pname = "policycoreutils"; - version = "2.7"; + version = "2.9"; inherit (libsepol) se_release se_url; src = fetchurl { url = "${se_url}/${se_release}/policycoreutils-${version}.tar.gz"; - sha256 = "1x742c7lkw30namhkw87yg7z384qzqjz0pvmqs0lk19v6958l6qa"; + sha256 = "0yqg5ws5gbl1cbn8msxdk1c3ilmmx58qg5dx883kqyq0517k8g65"; }; postPatch = '' @@ -20,13 +20,14 @@ stdenv.mkDerivation rec { 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") - ''; + makeFlags = [ + "PREFIX=$(out)" + "SBINDIR=$(out)/sbin" + "ETCDIR=$(out)/etc" + "BASHCOMPLETIONDIR=$out/share/bash-completion/completions" + "LOCALEDIR=$(out)/share/locale" + "MAN5DIR=$(out)/share/man/man5" + ]; meta = with stdenv.lib; { description = "SELinux policy core utilities"; From 6cb99b1f5a7cbcba898b4f62517136b5d22f71aa Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Sat, 17 Aug 2019 17:12:14 +0000 Subject: [PATCH 8/8] checkpolicy: 2.7 -> 2.9 --- pkgs/os-specific/linux/checkpolicy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/checkpolicy/default.nix b/pkgs/os-specific/linux/checkpolicy/default.nix index b724112af886..fc2faa5b8f57 100644 --- a/pkgs/os-specific/linux/checkpolicy/default.nix +++ b/pkgs/os-specific/linux/checkpolicy/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation rec { pname = "checkpolicy"; - version = "2.7"; + version = "2.9"; inherit (libsepol) se_release se_url; src = fetchurl { url = "${se_url}/${se_release}/checkpolicy-${version}.tar.gz"; - sha256 = "009j9jc0hi4l7k8f21hn8fm25n0mqgzdpd4nk30nds6d3nglf4sl"; + sha256 = "13jz6f8zdrijvn5w1j102b36fs41z0q8ii74axw48cj550mw6im9"; }; nativeBuildInputs = [ bison flex ];