summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Iooss2014-05-30 11:29:17 +0200
committerNicolas Iooss2015-06-27 11:44:56 +0800
commit27fea911741a0240056b866c57aa287844b6284a (patch)
tree7d099ca09921b7759b0d0b005b4a806256be1f04
parent7730817ab25d87856acbd8b882a6630a6b29a4eb (diff)
downloadaur-27fea911741a0240056b866c57aa287844b6284a.tar.gz
util-linux-selinux 2.24.2-1 update
-rw-r--r--.SRCINFO22
-rw-r--r--0001-libmount-FS-id-and-parent-ID-could-be-zero.patch98
-rw-r--r--0001-switch_root-verify-initramfs-by-f_type-not-devno.patch59
-rw-r--r--PKGBUILD24
-rw-r--r--move_is_mountinfo.patch46
5 files changed, 13 insertions, 236 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 21db85498d38..89d8f897ed0d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = util-linux-selinux
pkgdesc = SELinux aware miscellaneous system utilities for Linux
- pkgver = 2.24.1
- pkgrel = 4
+ pkgver = 2.24.2
+ pkgrel = 1
url = http://www.kernel.org/pub/linux/utils/util-linux/
arch = i686
arch = x86_64
@@ -11,22 +11,16 @@ pkgbase = util-linux-selinux
makedepends = python
options = strip
options = debug
- source = ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.24/util-linux-2.24.1.tar.xz
+ source = ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.24/util-linux-2.24.2.tar.xz
source = uuidd.tmpfiles
source = pam-login
source = pam-common
source = pam-su
- source = move_is_mountinfo.patch
- source = 0001-switch_root-verify-initramfs-by-f_type-not-devno.patch
- source = 0001-libmount-FS-id-and-parent-ID-could-be-zero.patch
- md5sums = 88d46ae23ca599ac5af9cf96b531590f
+ md5sums = 3f191727a0d28f7204b755cf1b6ea0aa
md5sums = a39554bfd65cccfd8254bb46922f4a67
md5sums = 4368b3f98abd8a32662e094c54e7f9b1
md5sums = a31374fef2cba0ca34dfc7078e2969e4
md5sums = fa85e5cce5d723275b14365ba71a8aad
- md5sums = 4cdc5f9a6e51b032274761a82937d438
- md5sums = b7ca79a0d5318b7cd813bb2573a3f9a9
- md5sums = 2f4bc305bd11d6bfaa81e6c1eb0c6f1b
pkgname = util-linux-selinux
install = util-linux.install
@@ -36,10 +30,10 @@ pkgname = util-linux-selinux
depends = libsystemd-selinux
depends = libutil-linux-selinux
optdepends = python: python bindings to libmount
- provides = util-linux-ng=2.24.1
+ provides = util-linux-ng=2.24.2
provides = eject
- provides = util-linux=2.24.1-
- provides = selinux-util-linux=2.24.1-
+ provides = util-linux=2.24.2-
+ provides = selinux-util-linux=2.24.2-
conflicts = util-linux-ng
conflicts = eject
conflicts = util-linux
@@ -55,6 +49,6 @@ pkgname = libutil-linux-selinux
provides = libblkid.so
provides = libmount.so
provides = libuuid.so
- provides = libutil-linux=2.24.1-
+ provides = libutil-linux=2.24.2-
conflicts = libutil-linux
diff --git a/0001-libmount-FS-id-and-parent-ID-could-be-zero.patch b/0001-libmount-FS-id-and-parent-ID-could-be-zero.patch
deleted file mode 100644
index 01a8d441bb04..000000000000
--- a/0001-libmount-FS-id-and-parent-ID-could-be-zero.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From 6c373810f5b1d32824371e9dff6ee5a006388f98 Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Thu, 20 Feb 2014 16:59:11 +0100
-Subject: [PATCH] libmount: FS id and parent ID could be zero
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-It seems that linux 3.14 is able to produce things like:
-
- 19 0 8:3 / / rw,relatime - ext4 /dev/sda3 rw,data=ordered
- ^
-
-Reported-by: Mantas Mikulėnas <grawity@gmail.com>
-Signed-off-by: Karel Zak <kzak@redhat.com>
----
- libmount/src/tab.c | 12 ++++--------
- misc-utils/findmnt.c | 5 +++--
- 2 files changed, 7 insertions(+), 10 deletions(-)
-
-diff --git a/libmount/src/tab.c b/libmount/src/tab.c
-index 4c2f8a4..332312b 100644
---- a/libmount/src/tab.c
-+++ b/libmount/src/tab.c
-@@ -505,7 +505,7 @@ int mnt_table_get_root_fs(struct libmnt_table *tb, struct libmnt_fs **root)
- assert(tb);
- assert(root);
-
-- if (!tb || !root)
-+ if (!tb || !root || !is_mountinfo(tb))
- return -EINVAL;
-
- DBG(TAB, mnt_debug_h(tb, "lookup root fs"));
-@@ -515,8 +515,6 @@ int mnt_table_get_root_fs(struct libmnt_table *tb, struct libmnt_fs **root)
- mnt_reset_iter(&itr, MNT_ITER_FORWARD);
- while(mnt_table_next_fs(tb, &itr, &fs) == 0) {
- int id = mnt_fs_get_parent_id(fs);
-- if (!id)
-- break; /* @tab is not a mountinfo file? */
-
- if (!*root || id < root_id) {
- *root = fs;
-@@ -524,7 +522,7 @@ int mnt_table_get_root_fs(struct libmnt_table *tb, struct libmnt_fs **root)
- }
- }
-
-- return root_id ? 0 : -EINVAL;
-+ return *root ? 0 : -EINVAL;
- }
-
- /**
-@@ -545,15 +543,13 @@ int mnt_table_next_child_fs(struct libmnt_table *tb, struct libmnt_iter *itr,
- struct libmnt_fs *fs;
- int parent_id, lastchld_id = 0, chld_id = 0;
-
-- if (!tb || !itr || !parent)
-+ if (!tb || !itr || !parent || !is_mountinfo(tb))
- return -EINVAL;
-
- DBG(TAB, mnt_debug_h(tb, "lookup next child of '%s'",
- mnt_fs_get_target(parent)));
-
- parent_id = mnt_fs_get_id(parent);
-- if (!parent_id)
-- return -EINVAL;
-
- /* get ID of the previously returned child */
- if (itr->head && itr->p != itr->head) {
-@@ -584,7 +580,7 @@ int mnt_table_next_child_fs(struct libmnt_table *tb, struct libmnt_iter *itr,
- }
- }
-
-- if (!chld_id)
-+ if (!*chld)
- return 1; /* end of iterator */
-
- /* set the iterator to the @chld for the next call */
-diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c
-index fb21174..988cd73 100644
---- a/misc-utils/findmnt.c
-+++ b/misc-utils/findmnt.c
-@@ -822,8 +822,9 @@ static int tab_is_tree(struct libmnt_table *tb)
- if (!itr)
- return 0;
-
-- if (mnt_table_next_fs(tb, itr, &fs) == 0)
-- rc = mnt_fs_get_id(fs) > 0 && mnt_fs_get_parent_id(fs) > 0;
-+ rc = (mnt_table_next_fs(tb, itr, &fs) == 0 &&
-+ mnt_fs_is_kernel(fs) &&
-+ mnt_fs_get_root(fs));
-
- mnt_free_iter(itr);
- return rc;
---
-1.9.1
-
diff --git a/0001-switch_root-verify-initramfs-by-f_type-not-devno.patch b/0001-switch_root-verify-initramfs-by-f_type-not-devno.patch
deleted file mode 100644
index 56191a30e760..000000000000
--- a/0001-switch_root-verify-initramfs-by-f_type-not-devno.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 751c39383adaf5ff5a860516238d524b0e20f835 Mon Sep 17 00:00:00 2001
-From: Dave Reisner <dreisner@archlinux.org>
-Date: Wed, 2 Apr 2014 10:41:30 -0400
-Subject: [PATCH] switch_root: verify initramfs by f_type, not devno
-
-As of linux 3.14, the initramfs device will have both major and
-minor 0, causing our paranoia check to fail. Make this version agnostic
-by checking the filesystem type, rather than a device number.
-
-[adopted from master for backport into 2.24.x branch]
-
-Signed-off-by: Dave Reisner <dreisner@archlinux.org>
----
- sys-utils/switch_root.c | 15 +++++++++------
- 1 file changed, 9 insertions(+), 6 deletions(-)
-
-diff --git a/sys-utils/switch_root.c b/sys-utils/switch_root.c
-index f26f7da..40e222d 100644
---- a/sys-utils/switch_root.c
-+++ b/sys-utils/switch_root.c
-@@ -23,6 +23,7 @@
- #include <sys/mount.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-+#include <sys/statfs.h>
- #include <sys/param.h>
- #include <fcntl.h>
- #include <stdio.h>
-@@ -33,6 +34,8 @@
- #include <ctype.h>
- #include <dirent.h>
-
-+#include <linux/magic.h>
-+
- #include "c.h"
- #include "nls.h"
- #include "closestream.h"
-@@ -174,12 +177,12 @@ static int switchroot(const char *newroot)
- if (cfd >= 0) {
- pid = fork();
- if (pid <= 0) {
-- if (fstat(cfd, &sb) == 0) {
-- if (sb.st_dev == makedev(0, 1))
-- recursiveRemove(cfd);
-- else
-- warn(_("old root filesystem is not an initramfs"));
-- }
-+ struct statfs stfs;
-+ if (fstatfs(cfd, &stfs) == 0 &&
-+ (stfs.f_type == RAMFS_MAGIC || stfs.f_type == TMPFS_MAGIC))
-+ recursiveRemove(cfd);
-+ else
-+ warn(_("old root filesystem is not an initramfs"));
-
- if (pid == 0)
- exit(EXIT_SUCCESS);
---
-1.9.1
-
diff --git a/PKGBUILD b/PKGBUILD
index 9ea2c0fddd4f..ebb05100c858 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,8 +8,8 @@
pkgbase=util-linux-selinux
pkgname=(util-linux-selinux libutil-linux-selinux)
-pkgver=2.24.1
-pkgrel=4
+pkgver=2.24.2
+pkgrel=1
pkgdesc="SELinux aware miscellaneous system utilities for Linux"
url="http://www.kernel.org/pub/linux/utils/util-linux/"
arch=('i686' 'x86_64')
@@ -27,26 +27,12 @@ source=("ftp://ftp.kernel.org/pub/linux/utils/${pkgname/-selinux}/v2.24/${pkgnam
uuidd.tmpfiles
pam-login
pam-common
- pam-su
- move_is_mountinfo.patch
- 0001-switch_root-verify-initramfs-by-f_type-not-devno.patch
- 0001-libmount-FS-id-and-parent-ID-could-be-zero.patch)
-md5sums=('88d46ae23ca599ac5af9cf96b531590f'
+ pam-su)
+md5sums=('3f191727a0d28f7204b755cf1b6ea0aa'
'a39554bfd65cccfd8254bb46922f4a67'
'4368b3f98abd8a32662e094c54e7f9b1'
'a31374fef2cba0ca34dfc7078e2969e4'
- 'fa85e5cce5d723275b14365ba71a8aad'
- '4cdc5f9a6e51b032274761a82937d438'
- 'b7ca79a0d5318b7cd813bb2573a3f9a9'
- '2f4bc305bd11d6bfaa81e6c1eb0c6f1b')
-
-prepare() {
- cd "${pkgname/-selinux}-$pkgver"
-
- patch -p1 -i "${srcdir}/move_is_mountinfo.patch"
- patch -p1 -i "${srcdir}/0001-libmount-FS-id-and-parent-ID-could-be-zero.patch"
- patch -p1 -i "${srcdir}/0001-switch_root-verify-initramfs-by-f_type-not-devno.patch"
-}
+ 'fa85e5cce5d723275b14365ba71a8aad')
build() {
cd "${pkgname/-selinux}-$pkgver"
diff --git a/move_is_mountinfo.patch b/move_is_mountinfo.patch
deleted file mode 100644
index ad9387efc3a3..000000000000
--- a/move_is_mountinfo.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-diff --git a/libmount/src/tab.c b/libmount/src/tab.c
-index 3633b6a..8ae49c8 100644
---- a/libmount/src/tab.c
-+++ b/libmount/src/tab.c
-@@ -47,6 +47,20 @@
- #include "strutils.h"
- #include "loopdev.h"
-
-+static int is_mountinfo(struct libmnt_table *tb)
-+{
-+ struct libmnt_fs *fs;
-+
-+ if (!tb)
-+ return 0;
-+
-+ fs = list_first_entry(&tb->ents, struct libmnt_fs, ents);
-+ if (fs && mnt_fs_is_kernel(fs) && mnt_fs_get_root(fs))
-+ return 1;
-+
-+ return 0;
-+}
-+
- /**
- * mnt_new_table:
- *
-@@ -1229,20 +1335,6 @@ err:
- return NULL;
- }
-
--static int is_mountinfo(struct libmnt_table *tb)
--{
-- struct libmnt_fs *fs;
--
-- if (!tb)
-- return 0;
--
-- fs = list_first_entry(&tb->ents, struct libmnt_fs, ents);
-- if (fs && mnt_fs_is_kernel(fs) && mnt_fs_get_root(fs))
-- return 1;
--
-- return 0;
--}
--
- /**
- * mnt_table_is_fs__mounted:
- * @tb: /proc/self/mountinfo file