-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
SELinux libs and tools: 2.4 -> 2.7 #36978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
880d8c1
libsepol: 2.4 -> 2.7
xeji ea7507b
libselinux: 2.4 -> 2.7
xeji 232c39e
libsemanage: 2.4 -> 2.7
xeji 70044c8
policycoreutils: 2.4 -> 2.7
xeji ac90dff
checkpolicy: 2.4 -> 2.7
xeji 07fe297
setools: 2015-02-12 -> 2017-11-10
xeji 7ff1590
libsemanage: fix python lib path
xeji cc8bf58
libselinux: fix python lib path
xeji 905f472
selinux-python: init at 2.7
xeji f7fe3f5
selinux-sandbox: init at 2.7
xeji eb828c6
systemd: add withSelinux option
xeji File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
pkgs/os-specific/linux/policycoreutils/fix-printf-type.patch
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| { stdenv, fetchurl, python3 | ||
| , libselinux, libsemanage, libsepol, setools }: | ||
|
|
||
| # this is python3 only because setools only supports python3 | ||
|
|
||
| with stdenv.lib; | ||
| with python3.pkgs; | ||
|
|
||
| stdenv.mkDerivation rec { | ||
| name = "selinux-python-${version}"; | ||
| version = "2.7"; | ||
| se_release = "20170804"; | ||
| se_url = "https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases"; | ||
|
|
||
| src = fetchurl { | ||
| url = "${se_url}/${se_release}/selinux-python-${version}.tar.gz"; | ||
| sha256 = "1va0y4b7cah7rprh04b3ylmwqgnivpkw5z2zw68nrafdbsbcn5s2"; | ||
| }; | ||
|
|
||
| nativeBuildInputs = [ wrapPython ]; | ||
| buildInputs = [ libsepol python3 ]; | ||
| propagatedBuildInputs = [ libselinux libsemanage setools ipy ]; | ||
|
|
||
| postPatch = '' | ||
| substituteInPlace sepolicy/Makefile --replace "echo --root" "echo --prefix" | ||
| ''; | ||
|
|
||
| preBuild = '' | ||
| makeFlagsArray+=("PREFIX=$out") | ||
| makeFlagsArray+=("DESTDIR=$out") | ||
| makeFlagsArray+=("LOCALEDIR=$out/share/locale") | ||
| makeFlagsArray+=("LIBSEPOLA=${libsepol}/lib/libsepol.a") | ||
| makeFlagsArray+=("BASHCOMPLETIONDIR=$out/share/bash-completion/completions") | ||
| makeFlagsArray+=("PYTHON=${python3}/bin/python") | ||
| makeFlagsArray+=("PYTHONLIBDIR=lib/${python3.libPrefix}/site-packages") | ||
| ''; | ||
|
|
||
| postFixup = '' | ||
| wrapPythonPrograms | ||
| ''; | ||
|
|
||
| meta = { | ||
| description = "SELinux policy core utilities written in Python"; | ||
| license = licenses.gpl2; | ||
| homepage = https://selinuxproject.org; | ||
| platforms = platforms.linux; | ||
| }; | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| { stdenv, fetchurl, bash, coreutils, python3 | ||
| , libcap_ng, policycoreutils, selinux-python, dbus | ||
| , xorgserver, openbox, xmodmap }: | ||
|
|
||
| # this is python3 only as it depends on selinux-python | ||
|
|
||
| with stdenv.lib; | ||
| with python3.pkgs; | ||
|
|
||
| stdenv.mkDerivation rec { | ||
| name = "selinux-sandbox-${version}"; | ||
| version = "2.7"; | ||
| se_release = "20170804"; | ||
|
|
||
| src = fetchurl { | ||
| url = "https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${se_release}/selinux-sandbox-${version}.tar.gz"; | ||
| sha256 = "0hf5chm90iapb42njaps6p5460ys3ajh5446ja544vdbh01n544l"; | ||
| }; | ||
|
|
||
| nativeBuildInputs = [ wrapPython ]; | ||
| buildInputs = [ bash coreutils libcap_ng policycoreutils python3 xorgserver openbox xmodmap dbus ]; | ||
| propagatedBuildInputs = [ pygobject3 selinux-python ]; | ||
|
|
||
| postPatch = '' | ||
| # Fix setuid install | ||
| substituteInPlace Makefile --replace "-m 4755" "-m 755" | ||
| substituteInPlace sandboxX.sh \ | ||
| --replace "#!/bin/sh" "#!${bash}/bin/sh" \ | ||
| --replace "/usr/share/sandbox/start" "${placeholder "out"}/share/sandbox/start" \ | ||
| --replace "/usr/bin/cut" "${coreutils}/bin/cut" \ | ||
| --replace "/usr/bin/Xephyr" "${xorgserver}/bin/Xepyhr" \ | ||
| --replace "secon" "${policycoreutils}/bin/secon" | ||
| substituteInPlace sandbox \ | ||
| --replace "/usr/sbin/seunshare" "$out/bin/seunshare" \ | ||
| --replace "/usr/share/sandbox" "$out/share/sandbox" \ | ||
| --replace "/usr/share/locale" "${policycoreutils}/share/locale" \ | ||
| --replace "/usr/bin/openbox" "${openbox}/bin/openbox" \ | ||
| --replace "#!/bin/sh" "#!${bash}/bin/sh" \ | ||
| --replace "dbus-" "${dbus}/bin/dbus-" \ | ||
| --replace "/usr/bin/xmodmap" "${xmodmap}/bin/xmodmap" \ | ||
| --replace "/usr/bin/shred" "${coreutils}/bin/shred" \ | ||
| --replace "/usr/bin/test" "${coreutils}/bin/test" \ | ||
| ''; | ||
|
|
||
| preBuild = '' | ||
| makeFlagsArray+=("PREFIX=$out") | ||
| makeFlagsArray+=("DESTDIR=$out") | ||
| ''; | ||
|
|
||
| postFixup = '' | ||
| wrapPythonPrograms | ||
| ''; | ||
|
|
||
| meta = { | ||
| description = "SELinux sandbox utility"; | ||
| license = licenses.gpl2; | ||
| homepage = https://selinuxproject.org; | ||
| platforms = platforms.linux; | ||
| }; | ||
| } | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work for Nix 1.11 users, please correct this as seen in #37860