summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Iooss2015-10-05 21:20:56 +0200
committerNicolas Iooss2015-10-05 21:20:56 +0200
commit9821b61ff9ec62e2e87f1d67d8044552558c178e (patch)
tree10398bacb3148d400ad121fd4dca569936c525d8
parentc9b9543b736de5336985d1cc7fb866f7707ba83e (diff)
downloadaur-9821b61ff9ec62e2e87f1d67d8044552558c178e.tar.gz
util-linux-selinux 2.27-5 update
-rw-r--r--.SRCINFO6
-rw-r--r--0001-libmount-monitor-don-t-check-for-regular-mtab.patch45
-rw-r--r--PKGBUILD31
3 files changed, 65 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5803525a7bc2..d5de6df43424 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = util-linux-selinux
pkgdesc = SELinux aware miscellaneous system utilities for Linux
pkgver = 2.27
- pkgrel = 2
+ pkgrel = 5
url = https://www.kernel.org/pub/linux/utils/util-linux/
arch = i686
arch = x86_64
@@ -14,13 +14,13 @@ pkgbase = util-linux-selinux
options = debug
source = https://www.kernel.org/pub/linux/utils/util-linux/v2.27/util-linux-2.27.tar.xz
source = https://www.kernel.org/pub/linux/utils/util-linux/v2.27/util-linux-2.27.tar.sign
- source = uuidd.tmpfiles
+ source = 0001-libmount-monitor-don-t-check-for-regular-mtab.patch
source = pam-login
source = pam-common
source = pam-su
md5sums = 5b06bbda9309624ee7add15bc8d8ca22
md5sums = SKIP
- md5sums = a39554bfd65cccfd8254bb46922f4a67
+ md5sums = f9e06605db9107b9c4bb1c48059fe18e
md5sums = 4368b3f98abd8a32662e094c54e7f9b1
md5sums = a31374fef2cba0ca34dfc7078e2969e4
md5sums = fa85e5cce5d723275b14365ba71a8aad
diff --git a/0001-libmount-monitor-don-t-check-for-regular-mtab.patch b/0001-libmount-monitor-don-t-check-for-regular-mtab.patch
new file mode 100644
index 000000000000..5a6372d7882d
--- /dev/null
+++ b/0001-libmount-monitor-don-t-check-for-regular-mtab.patch
@@ -0,0 +1,45 @@
+From 02501746545ef729cefed28b5feb0b4e59c3d34f Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak@redhat.com>
+Date: Fri, 11 Sep 2015 11:19:30 +0200
+Subject: [PATCH] libmount: (monitor) don't check for regular mtab
+
+The monitor supports utab only (as documented). It's application
+responsibility to use libmount in the right way. It's overkill to
+check for valid environment during monitor initialization.
+
+For example systemd checks for regular mtab during boot, it's better
+than try to be smart later in libmount monitor when system is already
+running.
+
+Signed-off-by: Karel Zak <kzak@redhat.com>
+---
+ libmount/src/monitor.c | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/libmount/src/monitor.c b/libmount/src/monitor.c
+index cc3854e..ca9e02c 100644
+--- a/libmount/src/monitor.c
++++ b/libmount/src/monitor.c
+@@ -220,7 +220,7 @@ static int userspace_add_watch(struct monitor_entry *me, int *final, int *fd)
+ assert(me->path);
+
+ /*
+- * libmount uses rename(2) to atomically update utab/mtab, monitor
++ * libmount uses rename(2) to atomically update utab, monitor
+ * rename changes is too tricky. It seems better to monitor utab
+ * lockfile close.
+ */
+@@ -399,10 +399,6 @@ int mnt_monitor_enable_userspace(struct libmnt_monitor *mn, int enable, const ch
+
+ DBG(MONITOR, ul_debugobj(mn, "allocate new userspace monitor"));
+
+- /* create a new entry */
+- if (mnt_has_regular_mtab(NULL, NULL))
+- return -ENOSYS;
+-
+ if (!filename)
+ filename = mnt_get_utab_path(); /* /run/mount/utab */
+ if (!filename) {
+--
+2.5.3
+
diff --git a/PKGBUILD b/PKGBUILD
index 32c7da6d546b..48c043090724 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,7 +9,7 @@
pkgbase=util-linux-selinux
pkgname=(util-linux-selinux libutil-linux-selinux)
pkgver=2.27
-pkgrel=2
+pkgrel=5
pkgdesc="SELinux aware miscellaneous system utilities for Linux"
url="https://www.kernel.org/pub/linux/utils/util-linux/"
arch=('i686' 'x86_64')
@@ -24,17 +24,23 @@ license=('GPL2')
options=('strip' 'debug')
validpgpkeys=('B0C64D14301CC6EFAEDF60E4E4B71D5EEC39C284') # Karel Zak
source=("https://www.kernel.org/pub/linux/utils/util-linux/v2.27/${pkgname/-selinux}-$pkgver.tar."{xz,sign}
- uuidd.tmpfiles
+ "0001-libmount-monitor-don-t-check-for-regular-mtab.patch"
pam-{login,common,su})
md5sums=('5b06bbda9309624ee7add15bc8d8ca22'
'SKIP'
- 'a39554bfd65cccfd8254bb46922f4a67'
+ 'f9e06605db9107b9c4bb1c48059fe18e'
'4368b3f98abd8a32662e094c54e7f9b1'
'a31374fef2cba0ca34dfc7078e2969e4'
'fa85e5cce5d723275b14365ba71a8aad')
+prepare() {
+ cd "${pkgbase/-selinux}-$pkgver"
+
+ patch -Np1 <../0001-libmount-monitor-don-t-check-for-regular-mtab.patch
+}
+
build() {
- cd "${pkgname/-selinux}-$pkgver"
+ cd "${pkgbase/-selinux}-$pkgver"
./configure --prefix=/usr \
--libdir=/usr/lib \
@@ -71,7 +77,7 @@ package_util-linux-selinux() {
etc/pam.d/su
etc/pam.d/su-l)
- cd "${pkgname/-selinux}-$pkgver"
+ cd "${pkgbase/-selinux}-$pkgver"
make DESTDIR="$pkgdir" install
@@ -85,20 +91,17 @@ package_util-linux-selinux() {
install -m644 "$srcdir/pam-su" "$pkgdir/etc/pam.d/su"
install -m644 "$srcdir/pam-su" "$pkgdir/etc/pam.d/su-l"
- # include tmpfiles fragment for uuidd
# TODO(dreisner): offer this upstream?
- install -Dm644 "$srcdir/uuidd.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/uuidd.conf"
+ sed -i '/ListenStream/ aRuntimeDirectory=uuidd' "$pkgdir/usr/lib/systemd/system/uuidd.socket"
- # usrmove
+ # adjust for usrmove
+ # TODO(dreisner): fix configure.ac upstream so that this isn't needed
cd "$pkgdir"
mv {,usr/}sbin/* usr/bin
rmdir sbin usr/sbin
- ### create libutil-linux split
- rm -rf "$srcdir/_libutil-linux"
- install -dm755 "$srcdir"/_libutil-linux/usr/lib
- cd "$srcdir"/_libutil-linux
- mv "$pkgdir"/usr/lib/lib*.{a,so}* usr/lib
+ ### runtime libs are shipped as part of libutil-linux
+ rm "$pkgdir"/usr/lib/lib*.{a,so}*
}
package_libutil-linux-selinux() {
@@ -108,5 +111,5 @@ package_libutil-linux-selinux() {
depends=('libselinux')
conflicts=("${pkgname/-selinux}")
- mv "$srcdir/_libutil-linux"/* "$pkgdir"
+ make -C "${pkgbase/-selinux}-$pkgver" DESTDIR="$pkgdir" install-usrlib_execLTLIBRARIES
}