[arch-commits] Commit in util-linux/trunk (3 files)

Dave Reisner dreisner at archlinux.org
Tue Sep 29 00:16:38 UTC 2015


    Date: Tuesday, September 29, 2015 @ 02:16:38
  Author: dreisner
Revision: 247860

upgpkg: util-linux 2.27-4

- use RuntimeDirectory instead of tmpfiles.d snippet for uuidd.socket
- backport fix for overly strict mtab checking by libmount

Added:
  util-linux/trunk/0001-libmount-monitor-don-t-check-for-regular-mtab.patch
Modified:
  util-linux/trunk/PKGBUILD
Deleted:
  util-linux/trunk/uuidd.tmpfiles

----------------------------------------------------------+
 0001-libmount-monitor-don-t-check-for-regular-mtab.patch |   45 +++++++++++++
 PKGBUILD                                                 |   15 ++--
 uuidd.tmpfiles                                           |    1 
 3 files changed, 55 insertions(+), 6 deletions(-)

Added: 0001-libmount-monitor-don-t-check-for-regular-mtab.patch
===================================================================
--- 0001-libmount-monitor-don-t-check-for-regular-mtab.patch	                        (rev 0)
+++ 0001-libmount-monitor-don-t-check-for-regular-mtab.patch	2015-09-29 00:16:38 UTC (rev 247860)
@@ -0,0 +1,45 @@
+From 02501746545ef729cefed28b5feb0b4e59c3d34f Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak at 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 at 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
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-09-29 00:12:49 UTC (rev 247859)
+++ PKGBUILD	2015-09-29 00:16:38 UTC (rev 247860)
@@ -6,7 +6,7 @@
 pkgbase=util-linux
 pkgname=(util-linux libutil-linux)
 pkgver=2.27
-pkgrel=3
+pkgrel=4
 pkgdesc="Miscellaneous system utilities for Linux"
 url="https://www.kernel.org/pub/linux/utils/util-linux/"
 arch=('i686' 'x86_64')
@@ -15,15 +15,21 @@
 options=('strip' 'debug')
 validpgpkeys=('B0C64D14301CC6EFAEDF60E4E4B71D5EEC39C284')  # Karel Zak
 source=("https://www.kernel.org/pub/linux/utils/util-linux/v2.27/$pkgbase-$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-$pkgver"
+
+  patch -Np1 <../0001-libmount-monitor-don-t-check-for-regular-mtab.patch
+}
+
 build() {
   cd "$pkgbase-$pkgver"
 
@@ -72,9 +78,8 @@
   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"
 
   # adjust for usrmove
   # TODO(dreisner): fix configure.ac upstream so that this isn't needed

Deleted: uuidd.tmpfiles
===================================================================
--- uuidd.tmpfiles	2015-09-29 00:12:49 UTC (rev 247859)
+++ uuidd.tmpfiles	2015-09-29 00:16:38 UTC (rev 247860)
@@ -1 +0,0 @@
-d /run/uuidd 0755 uuidd uuidd



More information about the arch-commits mailing list