Upgrade selinux from 20100904 -> 20131030
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user