summaryrefslogtreecommitdiff
path: root/core/util-linux
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-05-28 02:44:47 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-05-28 02:44:47 -0300
commitc3b94090a6330f678ade2f767e76ab7802d3463e (patch)
treee3d2321dce46bfdbc070fcee19e2852566510fe8 /core/util-linux
parent652c41cc5fd8dc5f23ef6a6c93f488911e1054c7 (diff)
parent33feb015eb09eee76827f359e685fce981d88111 (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/chmsee/PKGBUILD community/flumotion/PKGBUILD community/gnash/PKGBUILD community/kadu/PKGBUILD community/mythplugins/PKGBUILD community/performous/PKGBUILD community/sleuthkit/PKGBUILD community/virtualbox/PKGBUILD community/wbar/PKGBUILD core/attr/PKGBUILD core/binutils/PKGBUILD core/heimdal/PKGBUILD core/sqlite3/PKGBUILD extra/acpid/PKGBUILD extra/apache-ant/PKGBUILD extra/aria2/PKGBUILD extra/boost/PKGBUILD extra/bs/PKGBUILD extra/bzr/PKGBUILD extra/cvsps/PKGBUILD extra/dosbox/PKGBUILD extra/ettercap-gtk/PKGBUILD extra/fetchmail/PKGBUILD extra/gnome-desktop-sharp/PKGBUILD extra/gnome-panel/PKGBUILD extra/gptfdisk/PKGBUILD extra/gqmpeg/PKGBUILD extra/gstreamer0.10-base/PKGBUILD extra/gstreamer0.10-ugly/PKGBUILD extra/gtk-theme-switch2/PKGBUILD extra/icecast/PKGBUILD extra/kdeedu/PKGBUILD extra/kmldonkey/PKGBUILD extra/kmplayer/PKGBUILD extra/libbtctl/PKGBUILD extra/libftdi/PKGBUILD extra/liborigin2/PKGBUILD extra/libpst/PKGBUILD extra/libx86/PKGBUILD extra/lsdvd/PKGBUILD extra/mc/PKGBUILD extra/monotone/PKGBUILD extra/multitail/PKGBUILD extra/nbsmtp/PKGBUILD extra/nickle/PKGBUILD extra/nppangband/PKGBUILD extra/numlockx/PKGBUILD extra/pidgin/PKGBUILD extra/poppler/PKGBUILD extra/python-gtkglext/PKGBUILD extra/scim/PKGBUILD extra/socat/PKGBUILD extra/speedcrunch/PKGBUILD extra/transmission/PKGBUILD extra/vbetool/PKGBUILD extra/vlc/PKGBUILD extra/xchat-gnome/xchat-gnome.install libre/kernel26-libre/PKGBUILD libre/pacman/PKGBUILD libre/xchat-gnome-libre/PKGBUILD libre/xchat-gnome-libre/gtk2-2.20.patch libre/xchat-gnome-libre/xchat-gnome-0.26.1-deprecated-symbol.patch libre/xchat-gnome-libre/xchat-gnome.install multilib/nspluginwrapper/PKGBUILD testing/libgweather/libgweather.install testing/mesa/PKGBUILD
Diffstat (limited to 'core/util-linux')
-rw-r--r--core/util-linux/PKGBUILD12
-rw-r--r--core/util-linux/mount-segfault-2.19.1.patch84
2 files changed, 92 insertions, 4 deletions
diff --git a/core/util-linux/PKGBUILD b/core/util-linux/PKGBUILD
index 6c94c8c5b..5828eafd3 100644
--- a/core/util-linux/PKGBUILD
+++ b/core/util-linux/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 123152 2011-05-09 00:21:36Z allan $
+# $Id: PKGBUILD 123897 2011-05-14 09:14:06Z tpowa $
# Maintainer:
# Contributor: judd <jvinet@zeroflux.org>
pkgname=util-linux
pkgver=2.19.1
-pkgrel=1
+pkgrel=2
pkgdesc="Miscellaneous system utilities for Linux"
url="http://userweb.kernel.org/~kzak/util-linux-ng/"
arch=('i686' 'x86_64' 'mips64el')
@@ -15,12 +15,16 @@ 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)
+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')
+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
diff --git a/core/util-linux/mount-segfault-2.19.1.patch b/core/util-linux/mount-segfault-2.19.1.patch
new file mode 100644
index 000000000..7bcb3bc05
--- /dev/null
+++ b/core/util-linux/mount-segfault-2.19.1.patch
@@ -0,0 +1,84 @@
+From f53edda83ebcfd7015c3f35196d6cbd7bc2d8369 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak@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@gentoo.org>
+Signed-off-by: Karel Zak <kzak@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
+