[arch-commits] Commit in util-linux/repos (6 files)
Tom Gundersen
tomegun at archlinux.org
Tue Aug 16 14:10:53 UTC 2011
Date: Tuesday, August 16, 2011 @ 10:10:52
Author: tomegun
Revision: 135594
db-move: moved util-linux from [testing] to [core] (i686)
Added:
util-linux/repos/core-i686/PKGBUILD
(from rev 135593, util-linux/repos/testing-i686/PKGBUILD)
util-linux/repos/core-i686/mount-segfault-2.19.1.patch
(from rev 135593, util-linux/repos/testing-i686/mount-segfault-2.19.1.patch)
util-linux/repos/core-i686/two-component-linux.patch
(from rev 135593, util-linux/repos/testing-i686/two-component-linux.patch)
Deleted:
util-linux/repos/core-i686/PKGBUILD
util-linux/repos/core-i686/mount-segfault-2.19.1.patch
util-linux/repos/testing-i686/
-----------------------------+
PKGBUILD | 80 ++++++++++----------
mount-segfault-2.19.1.patch | 168 +++++++++++++++++++++---------------------
two-component-linux.patch | 32 ++++++++
3 files changed, 158 insertions(+), 122 deletions(-)
Deleted: core-i686/PKGBUILD
===================================================================
--- core-i686/PKGBUILD 2011-08-16 09:12:51 UTC (rev 135593)
+++ core-i686/PKGBUILD 2011-08-16 14:10:52 UTC (rev 135594)
@@ -1,38 +0,0 @@
-# $Id$
-# Maintainer:
-# Contributor: judd <jvinet at zeroflux.org>
-
-pkgname=util-linux
-pkgver=2.19.1
-pkgrel=2
-pkgdesc="Miscellaneous system utilities for Linux"
-url="http://userweb.kernel.org/~kzak/util-linux-ng/"
-arch=('i686' 'x86_64')
-groups=('base')
-depends=('bash' 'ncurses>=5.7' 'zlib' 'filesystem')
-replaces=('linux32' 'util-linux-ng')
-conflicts=('linux32' 'util-linux-ng' 'e2fsprogs<1.41.8-2')
-provides=('linux32' "util-linux-ng=${pkgver}")
-license=('GPL2')
-options=('!libtool')
-source=(ftp://ftp.kernel.org/pub/linux/utils/${pkgname}/v2.19/${pkgname}-${pkgver}.tar.bz2
- mount-segfault-2.19.1.patch)
-optdepends=('perl: for chkdupexe support')
-md5sums=('3eab06f05163dfa65479c44e5231932c'
- '3247b52f0e4b8044f23f2f7218e2fdea')
-
-build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- # fix https://bugs.archlinux.org/task/24261
- patch -Np1 -i ../mount-segfault-2.19.1.patch
- # hardware clock
- sed -e 's%etc/adjtime%var/lib/hwclock/adjtime%' -i hwclock/hwclock.c
- ./configure --enable-arch --enable-write --enable-raw --disable-wall --enable-partx
- make
-}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- install -dm755 "${pkgdir}/var/lib/hwclock"
- make DESTDIR="${pkgdir}" install
-}
Copied: util-linux/repos/core-i686/PKGBUILD (from rev 135593, util-linux/repos/testing-i686/PKGBUILD)
===================================================================
--- core-i686/PKGBUILD (rev 0)
+++ core-i686/PKGBUILD 2011-08-16 14:10:52 UTC (rev 135594)
@@ -0,0 +1,42 @@
+# $Id$
+# Maintainer: Tom Gundersen <teg at jklm.no>
+# Contributor: judd <jvinet at zeroflux.org>
+
+pkgname=util-linux
+pkgver=2.19.1
+pkgrel=3
+pkgdesc="Miscellaneous system utilities for Linux"
+url="http://userweb.kernel.org/~kzak/util-linux-ng/"
+arch=('i686' 'x86_64')
+groups=('base')
+depends=('bash' 'ncurses>=5.7' 'zlib' 'filesystem')
+replaces=('linux32' 'util-linux-ng')
+conflicts=('linux32' 'util-linux-ng' 'e2fsprogs<1.41.8-2')
+provides=('linux32' "util-linux-ng=${pkgver}")
+license=('GPL2')
+options=('!libtool')
+source=(ftp://ftp.kernel.org/pub/linux/utils/${pkgname}/v2.19/${pkgname}-${pkgver}.tar.bz2
+ mount-segfault-2.19.1.patch
+ two-component-linux.patch)
+optdepends=('perl: for chkdupexe support')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ # add support for linux 3.0, which is needed mkswap
+ patch -Np1 -i ../two-component-linux.patch
+ # fix https://bugs.archlinux.org/task/24261
+ patch -Np1 -i ../mount-segfault-2.19.1.patch
+ # hardware clock
+ sed -e 's%etc/adjtime%var/lib/hwclock/adjtime%' -i hwclock/hwclock.c
+ ./configure --enable-arch --enable-write --enable-raw --disable-wall --enable-partx
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ install -dm755 "${pkgdir}/var/lib/hwclock"
+ make DESTDIR="${pkgdir}" install
+}
+md5sums=('3eab06f05163dfa65479c44e5231932c'
+ '3247b52f0e4b8044f23f2f7218e2fdea'
+ '6eb23edb484adf7192e107d1c6d94bd3')
Deleted: core-i686/mount-segfault-2.19.1.patch
===================================================================
--- core-i686/mount-segfault-2.19.1.patch 2011-08-16 09:12:51 UTC (rev 135593)
+++ core-i686/mount-segfault-2.19.1.patch 2011-08-16 14:10:52 UTC (rev 135594)
@@ -1,84 +0,0 @@
-From f53edda83ebcfd7015c3f35196d6cbd7bc2d8369 Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak at redhat.com>
-Date: Wed, 11 May 2011 16:57:27 +0200
-Subject: [PATCH] mount: -a segfaults when 4th field is omitted (mount
- options)
-
- # echo 'tmpd /tmp/x tmpfs' >> /etc/fstab
- # mkdir /tmp/x
- # mount -a
- segfault
-
-Reported-by: Mike Frysinger <vapier at gentoo.org>
-Signed-off-by: Karel Zak <kzak at redhat.com>
----
- mount/mount.c | 8 +++++---
- mount/mount_mntent.c | 5 +++--
- mount/sundries.c | 2 ++
- 3 files changed, 10 insertions(+), 5 deletions(-)
-
-diff --git a/mount/mount.c b/mount/mount.c
-index ba71149..29963c2 100644
---- a/mount/mount.c
-+++ b/mount/mount.c
-@@ -1163,7 +1163,9 @@ is_mounted_same_loopfile(const char *node0, const char *loopfile, unsigned long
- res = loopfile_used_with((char *) mnt->m.mnt_fsname,
- loopfile, offset);
-
-- else if ((p = strstr(mnt->m.mnt_opts, "loop="))) {
-+ else if (mnt->m.mnt_opts &&
-+ (p = strstr(mnt->m.mnt_opts, "loop=")))
-+ {
- char *dev = xstrdup(p+5);
- if ((p = strchr(dev, ',')))
- *p = '\0';
-@@ -2052,8 +2054,8 @@ is_fstab_entry_mounted(struct mntentchn *mc, int verbose)
- goto yes;
-
- /* extra care for loop devices */
-- if ((strstr(mc->m.mnt_opts, "loop=") ||
-- (stat(mc->m.mnt_fsname, &st) == 0 && S_ISREG(st.st_mode)))) {
-+ if ((mc->m.mnt_opts && strstr(mc->m.mnt_opts, "loop=")) ||
-+ (stat(mc->m.mnt_fsname, &st) == 0 && S_ISREG(st.st_mode))) {
-
- char *p = get_option_value(mc->m.mnt_opts, "offset=");
- uintmax_t offset = 0;
-diff --git a/mount/mount_mntent.c b/mount/mount_mntent.c
-index d90def3..f42c0ad 100644
---- a/mount/mount_mntent.c
-+++ b/mount/mount_mntent.c
-@@ -70,7 +70,7 @@ my_addmntent (mntFILE *mfp, struct my_mntent *mnt) {
- m1 = mangle(mnt->mnt_fsname);
- m2 = mangle(mnt->mnt_dir);
- m3 = mangle(mnt->mnt_type);
-- m4 = mangle(mnt->mnt_opts);
-+ m4 = mnt->mnt_opts ? mangle(mnt->mnt_opts) : "rw";
-
- res = fprintf (mfp->mntent_fp, "%s %s %s %s %d %d\n",
- m1, m2, m3, m4, mnt->mnt_freq, mnt->mnt_passno);
-@@ -78,7 +78,8 @@ my_addmntent (mntFILE *mfp, struct my_mntent *mnt) {
- free(m1);
- free(m2);
- free(m3);
-- free(m4);
-+ if (mnt->mnt_opts)
-+ free(m4);
- return (res < 0) ? 1 : 0;
- }
-
-diff --git a/mount/sundries.c b/mount/sundries.c
-index ae4501a..2dec37f 100644
---- a/mount/sundries.c
-+++ b/mount/sundries.c
-@@ -217,6 +217,8 @@ matching_opts (const char *options, const char *test_opts) {
-
- if (test_opts == NULL)
- return 1;
-+ if (options == NULL)
-+ options = "";
-
- len = strlen(test_opts);
- q = alloca(len+1);
---
-1.7.5.1
-
Copied: util-linux/repos/core-i686/mount-segfault-2.19.1.patch (from rev 135593, util-linux/repos/testing-i686/mount-segfault-2.19.1.patch)
===================================================================
--- core-i686/mount-segfault-2.19.1.patch (rev 0)
+++ core-i686/mount-segfault-2.19.1.patch 2011-08-16 14:10:52 UTC (rev 135594)
@@ -0,0 +1,84 @@
+From f53edda83ebcfd7015c3f35196d6cbd7bc2d8369 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak at redhat.com>
+Date: Wed, 11 May 2011 16:57:27 +0200
+Subject: [PATCH] mount: -a segfaults when 4th field is omitted (mount
+ options)
+
+ # echo 'tmpd /tmp/x tmpfs' >> /etc/fstab
+ # mkdir /tmp/x
+ # mount -a
+ segfault
+
+Reported-by: Mike Frysinger <vapier at gentoo.org>
+Signed-off-by: Karel Zak <kzak at redhat.com>
+---
+ mount/mount.c | 8 +++++---
+ mount/mount_mntent.c | 5 +++--
+ mount/sundries.c | 2 ++
+ 3 files changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/mount/mount.c b/mount/mount.c
+index ba71149..29963c2 100644
+--- a/mount/mount.c
++++ b/mount/mount.c
+@@ -1163,7 +1163,9 @@ is_mounted_same_loopfile(const char *node0, const char *loopfile, unsigned long
+ res = loopfile_used_with((char *) mnt->m.mnt_fsname,
+ loopfile, offset);
+
+- else if ((p = strstr(mnt->m.mnt_opts, "loop="))) {
++ else if (mnt->m.mnt_opts &&
++ (p = strstr(mnt->m.mnt_opts, "loop=")))
++ {
+ char *dev = xstrdup(p+5);
+ if ((p = strchr(dev, ',')))
+ *p = '\0';
+@@ -2052,8 +2054,8 @@ is_fstab_entry_mounted(struct mntentchn *mc, int verbose)
+ goto yes;
+
+ /* extra care for loop devices */
+- if ((strstr(mc->m.mnt_opts, "loop=") ||
+- (stat(mc->m.mnt_fsname, &st) == 0 && S_ISREG(st.st_mode)))) {
++ if ((mc->m.mnt_opts && strstr(mc->m.mnt_opts, "loop=")) ||
++ (stat(mc->m.mnt_fsname, &st) == 0 && S_ISREG(st.st_mode))) {
+
+ char *p = get_option_value(mc->m.mnt_opts, "offset=");
+ uintmax_t offset = 0;
+diff --git a/mount/mount_mntent.c b/mount/mount_mntent.c
+index d90def3..f42c0ad 100644
+--- a/mount/mount_mntent.c
++++ b/mount/mount_mntent.c
+@@ -70,7 +70,7 @@ my_addmntent (mntFILE *mfp, struct my_mntent *mnt) {
+ m1 = mangle(mnt->mnt_fsname);
+ m2 = mangle(mnt->mnt_dir);
+ m3 = mangle(mnt->mnt_type);
+- m4 = mangle(mnt->mnt_opts);
++ m4 = mnt->mnt_opts ? mangle(mnt->mnt_opts) : "rw";
+
+ res = fprintf (mfp->mntent_fp, "%s %s %s %s %d %d\n",
+ m1, m2, m3, m4, mnt->mnt_freq, mnt->mnt_passno);
+@@ -78,7 +78,8 @@ my_addmntent (mntFILE *mfp, struct my_mntent *mnt) {
+ free(m1);
+ free(m2);
+ free(m3);
+- free(m4);
++ if (mnt->mnt_opts)
++ free(m4);
+ return (res < 0) ? 1 : 0;
+ }
+
+diff --git a/mount/sundries.c b/mount/sundries.c
+index ae4501a..2dec37f 100644
+--- a/mount/sundries.c
++++ b/mount/sundries.c
+@@ -217,6 +217,8 @@ matching_opts (const char *options, const char *test_opts) {
+
+ if (test_opts == NULL)
+ return 1;
++ if (options == NULL)
++ options = "";
+
+ len = strlen(test_opts);
+ q = alloca(len+1);
+--
+1.7.5.1
+
Copied: util-linux/repos/core-i686/two-component-linux.patch (from rev 135593, util-linux/repos/testing-i686/two-component-linux.patch)
===================================================================
--- core-i686/two-component-linux.patch (rev 0)
+++ core-i686/two-component-linux.patch 2011-08-16 14:10:52 UTC (rev 135594)
@@ -0,0 +1,32 @@
+From fa7e0d6d442de9f5940f99fd93f4522602439131 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak at redhat.com>
+Date: Mon, 6 Jun 2011 12:35:26 +0200
+Subject: [PATCH] lib: [linux_version.c] accommodate two-component linux
+ version (e.g. 3.0)
+
+Signed-off-by: Karel Zak <kzak at redhat.com>
+---
+ lib/linux_version.c | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lib/linux_version.c b/lib/linux_version.c
+index f9fbd8d..ada566a 100644
+--- a/lib/linux_version.c
++++ b/lib/linux_version.c
+@@ -16,10 +16,10 @@ get_linux_version (void)
+ return kver;
+ if (uname (&uts))
+ kver = 0;
+- else if (sscanf (uts.release, "%d.%d.%d", &major, &minor, &teeny) != 3)
+- kver = 0;
+- else
++ else if (sscanf (uts.release, "%d.%d.%d", &major, &minor, &teeny) == 3)
+ kver = KERNEL_VERSION (major, minor, teeny);
++ else if (sscanf (uts.release, "%d.%d", &major, &minor) == 2)
++ kver = KERNEL_VERSION (major, minor, 0);
+
+ return kver;
+ }
+--
+1.7.6
+
More information about the arch-commits
mailing list