Package Details: libselinux 2.6-1

Git Clone URL: https://aur.archlinux.org/libselinux.git (read-only)
Package Base: libselinux
Description: SELinux library and simple utilities
Upstream URL: http://userspace.selinuxproject.org
Licenses: GPL
Groups: selinux
Conflicts: selinux-usr-libselinux
Provides: selinux-usr-libselinux=2.6-1
Submitter: Siosm
Maintainer: IooNag
Last Packager: IooNag
Votes: 48
Popularity: 3.676732
First Submitted: 2013-11-03 20:05
Last Updated: 2016-11-20 20:41

Latest Comments

IooNag commented on 2016-10-20 07:16

chrisbdaemon: pkg-config is in base-devel, which has to be installed before building any AUR package (cf. https://wiki.archlinux.org/index.php/Arch_User_Repository#Getting_started). Hence I won't add it to makedepends.

chrisbdaemon commented on 2016-10-19 19:24

Can pkg-config be added to the list of makedepends as well?

v1rous commented on 2016-02-07 17:50

Not sure if this is helpful or not, but I was able to build and install this package and its dependency libsepol on armv7h (RPi 2).

IooNag commented on 2015-07-23 12:02

Thanks for your comment, but actually it is not libselinux which requires flex to be built but libsepol and libsemanage. I've just added "flex" to their makedepends.

nebulon commented on 2015-07-20 12:02

The package dependencies are missing 'flex' currently.

grondinm commented on 2015-01-01 19:14

works now thank you

IooNag commented on 2014-12-31 13:39

I updated the PKGBUILD to use /usr/bin instead of /usr/sbin and while at it cleaned up a few things (https://github.com/archlinuxhardened/selinux/commit/7a68af5d847389935aa784d8f43c69ac41d0a3a9 ). Does it work better?

grondinm commented on 2014-12-31 01:55

Wont install for me

error: failed to commit transaction (conflicting files)
libselinux: /usr/sbin exists in filesystem
Errors occurred, no packages were upgraded.

IooNag commented on 2014-09-16 06:10

Upstream moved to GitHub a few weeks ago (http://marc.info/?l=selinux&m=140379660506494&w=2 and https://github.com/SELinuxProject/selinux link "Wiki"->"Release").

I've patched SELinux PKGBUILDs in GitHub:
https://github.com/archlinuxhardened/selinux/commit/63e6c3ddbc159775d5d1bfeaa81166e9d429d424
Waiting for maintainer to update AUR packages.

Thanks!

s4ncho commented on 2014-09-15 18:47

source url doesn't exist.

correct path:
http://archive.ubuntu.com/ubuntu/pool/main/libs/libselinux/libselinux_2.3.orig.tar.gz

please correct pkgbuild.

IooNag commented on 2014-05-23 12:50

As following Fedora patch changes is quite painful, I'd like to drop this patch from the package. Moreover, it contains some changes which have explicitly been rejected by upstream (http://marc.info/?l=selinux&m=138842015508829&w=2). If people are interested in the Go port, please report it upstream.

For users who are interested in testing libselinux 2.3 (without the Fedora patch) before the package is updated, the new PKGBUILD is waiting for testers on https://github.com/Siosm/siosm-selinux/pull/17.

Chocobozzz commented on 2014-05-23 09:30

Thank's Alda but sha256sum changed (line 27) :

2c7f13a1fea5c6e7068e43acf628d54cda12afd5e66112958d0ca4a44e7ecbc8

Alda commented on 2014-02-20 07:38

PKGBUILD is currently broken, here is the patch to make it work again:

27c27
< 'd60265f59b7fca51724e401f0ff4d1bbb9ad790ba9595ed4534942b286a7a1e4'
---
> '4078b4a8fd94f529cd64bf465bacf0acd2c108edc28a5d73a619857c00104a32'
35c35
< sed -i 's|pkg-config --cflags ruby|pkg-config --cflags ruby-2.0|' src/Makefile
---
> sed -i 's|pkg-config --cflags ruby|pkg-config --cflags ruby-2.1|' src/Makefile

errier commented on 2014-01-13 19:50

I second RobertGasteins comment! Please add armv6h arch to PKGBUILD.

Siosm commented on 2014-01-02 21:47

Renamed to libselinux

Anonymous comment on 2013-08-11 11:22

I have installed it on my Raspberry by adding armv6h to PKGBUILD,
because i need this package for the seafile-server!
Is it possible to add armv6h to the install script for this package!?

Nicky726 commented on 2013-07-20 17:22

Thank you, added the patch you mentioned.

hi117 commented on 2013-06-10 20:01

Package is broken due to known issue involving a Fedora specific patch being sent upstream, Gentoo has a patch to fix it, here is a diff to apply their patch if licencing permits.
--- a/PKGBUILD 2013-06-10 16:00:39.701454119 -0400
+++ b/PKGBUILD 2013-06-10 16:00:44.051506513 -0400
@@ -16,14 +16,19 @@
makedepends=('swig')
conflicts=('selinux-usr-libselinux-python')
options=(!emptydirs)
-source=(http://userspace.selinuxproject.org/releases/${_release}/${_origname}-${pkgver}.tar.gz)
-sha256sums=('57aad47c06b7ec18a76e8d9870539277a84cb40109cfdcf70ed3260bdb04447a')
+source=(http://userspace.selinuxproject.org/releases/${_release}/${_origname}-${pkgver}.tar.gz
+ http://dev.gentoo.org/~swift/patches/${_origname}/patchbundle-${_origname}-${pkgver}-r2.tar.gz)
+sha256sums=('57aad47c06b7ec18a76e8d9870539277a84cb40109cfdcf70ed3260bdb04447a'
+ 'd71f0923c7bd7cce8d3d305865736aa56d4038de319a1d016582f1470108cb07')

build() {
cd "${srcdir}/${_origname}-${pkgver}"

CFLAGS="${CFLAGS} -lpcre -pthread"

+ # Add gentoo patches for fedora specific functions
+ patch -p1 < "${srcdir}/gentoo-patches/0006-introduce-selinux_current_policy_path-from-fedora-needed-by-policycoreutils.patch"
+
# Set python version
sed -i -e "s/ python/ python2/" src/Makefile
sed -i -e "s/PYLIBDIR ?= \$(LIBDIR)\/\$(PYLIBVER)/PYLIBDIR ?=\$(LIBDIR)\/python2.7/g" "src/Makefile"

Nicky726 commented on 2013-02-25 10:29

Thanx, added.

xangelux commented on 2013-02-24 10:13

audit2allow and practically every python utility doesn't work, I found a workaround for it, add this sed in the build process:

sed -i -e "s/PYLIBDIR ?= \$(LIBDIR)\/\$(PYLIBVER)/PYLIBDIR ?= \$(LIBDIR)\/python2.7/g" "src/Makefile"

Nicky726 commented on 2013-02-20 20:51

So I added a feature request: https://bugs.archlinux.org/task/33954

Nicky726 commented on 2013-02-20 20:33

Oh, I see. It's that python issue. Quick workaround is:
# cd /usr/lib/pkgconfig/
# ln -s python-2.7.pc python2.pc
I think I did requested python2 maintainers to add the link, but apparently I did not... Will do now.

Nicky726 commented on 2013-02-20 20:21

Strange, I built it on 64bit system like 10 days ago. I'll look into it later, if I can reproduce it.

dejavu commented on 2013-02-20 19:05

Doesn't build on 64 bit:

cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -lpcre -I../include -D_GNU_SOURCE -Wl,-O1,--sort-common,--as-needed,-z,relro avcstat.c -L../src -lselinux -L/usr/lib -o avcstat
make[1]: Leaving directory `/tmp/yaourt-tmp-root/aur-selinux-usr-libselinux/src/libselinux-2.1.12/utils'
make[1]: Entering directory `/tmp/yaourt-tmp-root/aur-selinux-usr-libselinux/src/libselinux-2.1.12/man'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/yaourt-tmp-root/aur-selinux-usr-libselinux/src/libselinux-2.1.12/man'
make -C src pywrap pywrap
make[1]: Entering directory `/tmp/yaourt-tmp-root/aur-selinux-usr-libselinux/src/libselinux-2.1.12/src'
bash exception.sh > selinuxswig_python_exception.i
Package python2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `python2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'python2' found
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -lpcre -I../include -I/usr/include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DSHARED -c -o python2audit2why.lo audit2why.c
audit2why.c:6:20: fatal error: Python.h: No such file or directory
compilation terminated.
make[1]: *** [python2audit2why.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/tmp/yaourt-tmp-root/aur-selinux-usr-libselinux/src/libselinux-2.1.12/src'
make: *** [pywrap] Error 2
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Makepkg was unable to build selinux-usr-libselinux.
==> Restart building selinux-usr-libselinux ? [y/N]

xangelux commented on 2013-02-17 18:20

Yeah, that was fine, I forgot to delete that part when I was testing what the issue was

Nicky726 commented on 2013-02-17 12:50

So it's the -lpcre in CFLAGS... OK, addopted. I'm not sure though whats the use of buildflags in options, since I think that is default and of the -L/usr/local/lib in CFLAGS, since I have that directory empty and manage to build the package fine.

So from now SELinux userspace is updated to the release of 2012-09-24.

Nicky726 commented on 2013-02-17 10:55

I updated whole SELinux userspace to the release of 2012-02-16 which should build fine, so the dependency for selinux-systemd is satisfied. There is a newer release of 2012-09-24, but I'm still failing to build that for some of the SELinux userspace packages. Now I am stuck with selinux-usr-libselinux, which fail to build due to pcre, though it is installed. Don't quite get it... The trouble with SELinux userspace of 2012-02-16 is that it fails to load the policy for me...

xangelux commented on 2013-02-12 20:58

Updated it, hope it's fine: http://pastie.org/6140536

xangelux commented on 2013-02-12 20:57

Updated it, hope it's fine: http://pastie.org/6140536