summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Iooss2015-02-05 15:57:35 +0800
committerNicolas Iooss2015-02-22 16:03:11 +0800
commitd242238c8af3bc97a6cdebd1f236a3dfcba8f306 (patch)
tree2255e0d9127fbb12d72f38d901fb6f49f51d4b8b
parenta23dc882f0c07a2d7b9e07822e6551c39ef6a080 (diff)
downloadaur-d242238c8af3bc97a6cdebd1f236a3dfcba8f306.tar.gz
libsemanage 2.4-1 update
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD24
-rw-r--r--libsemanage.install6
-rw-r--r--semanage.conf44
4 files changed, 75 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c6a6bac671c1..e2d0b550c4b3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,25 @@
pkgbase = libsemanage
pkgdesc = SELinux binary policy manipulation library
- pkgver = 2.3
- pkgrel = 2
+ pkgver = 2.4
+ pkgrel = 1
url = http://userspace.selinuxproject.org
+ install = libsemanage.install
arch = i686
arch = x86_64
groups = selinux
license = GPL
depends = ustr
- depends = libselinux>=2.1.0
+ depends = libselinux>=2.4
depends = audit
optdepends = python2: python2 bindings
optdepends = python: python bindings
- provides = selinux-usr-libsemanage=2.3-2
+ provides = selinux-usr-libsemanage=2.4-1
conflicts = selinux-usr-libsemanage
options = !emptydirs
- source = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20140506/libsemanage-2.3.tar.gz
- sha256sums = 03e09e35e611c286e446bef92b6023ef2623815996f5a53394bb02e49a312e4b
+ source = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20150202/libsemanage-2.4.tar.gz
+ source = semanage.conf
+ sha256sums = 1a4cace4ef16786531ec075c0e7b2f961e2fee5dc86c5f983a689058899a6484
+ sha256sums = 5b0e6929428e095b561701ccdfa9c8b0c3d70dad3fc46e667eb46a85b246a4a0
pkgname = libsemanage
diff --git a/PKGBUILD b/PKGBUILD
index f403c37f853e..e66390e9934a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,21 +4,24 @@
# Contributor: Sergej Pupykin (pupykin <dot> s+arch <at> gmail <dot> com)
pkgname=libsemanage
-pkgver=2.3
-pkgrel=2
+pkgver=2.4
+pkgrel=1
pkgdesc="SELinux binary policy manipulation library"
arch=('i686' 'x86_64')
url='http://userspace.selinuxproject.org'
license=('GPL')
groups=('selinux')
-depends=('ustr' 'libselinux>=2.1.0' 'audit')
+depends=('ustr' 'libselinux>=2.4' 'audit')
optdepends=('python2: python2 bindings'
'python: python bindings')
options=(!emptydirs)
+install=libsemanage.install
conflicts=("selinux-usr-${pkgname}")
provides=("selinux-usr-${pkgname}=${pkgver}-${pkgrel}")
-source=("https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20140506/${pkgname}-${pkgver}.tar.gz")
-sha256sums=('03e09e35e611c286e446bef92b6023ef2623815996f5a53394bb02e49a312e4b')
+source=("https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20150202/${pkgname}-${pkgver}.tar.gz"
+ "semanage.conf")
+sha256sums=('1a4cace4ef16786531ec075c0e7b2f961e2fee5dc86c5f983a689058899a6484'
+ '5b0e6929428e095b561701ccdfa9c8b0c3d70dad3fc46e667eb46a85b246a4a0')
build() {
cd "${pkgname}-${pkgver}"
@@ -30,7 +33,12 @@ build() {
package(){
cd "${pkgname}-${pkgver}"
- make DESTDIR="${pkgdir}" LIBDIR="${pkgdir}/usr/lib" SHLIBDIR="${pkgdir}/usr/lib" install
- make DESTDIR="${pkgdir}" LIBDIR="${pkgdir}/usr/lib" SHLIBDIR="${pkgdir}/usr/lib" PYTHON=python2 install-pywrap
- make DESTDIR="${pkgdir}" LIBDIR="${pkgdir}/usr/lib" SHLIBDIR="${pkgdir}/usr/lib" PYTHON=python3 install-pywrap
+ make DESTDIR="${pkgdir}" LIBDIR="${pkgdir}/usr/lib" LIBEXECDIR="${pkgdir}/usr/lib" SHLIBDIR="${pkgdir}/usr/lib" install
+ make DESTDIR="${pkgdir}" LIBDIR="${pkgdir}/usr/lib" LIBEXECDIR="${pkgdir}/usr/lib" SHLIBDIR="${pkgdir}/usr/lib" PYTHON=python2 install-pywrap
+ make DESTDIR="${pkgdir}" LIBDIR="${pkgdir}/usr/lib" LIBEXECDIR="${pkgdir}/usr/lib" SHLIBDIR="${pkgdir}/usr/lib" PYTHON=python3 install-pywrap
+
+ install -D -m0644 "${srcdir}/semanage.conf" "${pkgdir}/etc/selinux/semanage.conf"
+
+ # Create /var/lib/selinux for the policy store
+ mkdir -p "${pkgdir}/var/lib/selinux"
}
diff --git a/libsemanage.install b/libsemanage.install
new file mode 100644
index 000000000000..bf21bb20378c
--- /dev/null
+++ b/libsemanage.install
@@ -0,0 +1,6 @@
+post_upgrade() {
+ if [ "$(vercmp 2.4 "$2")" -eq 1 ]; then
+ echo "The policy storage location changed in SELinux Userspace Project 2.4 from /etc/selinux to /var/lib/selinux."
+ echo "Run /usr/lib/selinux/semanage_migrate_store to migrate your policy files to the new location."
+ fi
+}
diff --git a/semanage.conf b/semanage.conf
new file mode 100644
index 000000000000..3a7b36933ba5
--- /dev/null
+++ b/semanage.conf
@@ -0,0 +1,44 @@
+# Authors: Jason Tang <jtang@tresys.com>
+#
+# Copyright (C) 2004-2005 Tresys Technology, LLC
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Specify how libsemanage will interact with a SELinux policy manager.
+# The four options are:
+#
+# "source" - libsemanage manipulates a source SELinux policy
+# "direct" - libsemanage will write directly to a module store.
+# /foo/bar - Write by way of a policy management server, whose
+# named socket is at /foo/bar. The path must begin
+# with a '/'.
+# foo.com:4242 - Establish a TCP connection to a remote policy
+# management server at foo.com. If there is a colon
+# then the remainder is interpreted as a port number;
+# otherwise default to port 4242.
+module-store = direct
+
+# When generating the final linked and expanded policy, by default
+# semanage will set the policy version to POLICYDB_VERSION_MAX, as
+# given in <sepol/policydb.h>. Change this setting if a different
+# version is necessary.
+#policy-version = 19
+
+# By default, semanage will generate policies for the SELinux target.
+# To build policies for Xen, uncomment the following line.
+#target-platform = xen
+
+# Arch Linux path to policy compilers
+compiler-directory = /usr/lib/selinux/hll