# ChangeLog for sys-apps/util-linux
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.106 2005/09/03 02:24:24 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.107 2005/09/05 04:48:10 vapier Exp $
+
+ 05 Sep 2005; Mike Frysinger <vapier@gentoo.org>
+ +files/util-linux-2.12q-update-mtab-when-moving.patch,
+ util-linux-2.12q-r1.ebuild:
+ Fix `mount --move` mtab updating #104697 by Jakub Jozwicki.
03 Sep 2005; Mike Frysinger <vapier@gentoo.org>
+files/util-linux-2.12q-more-fake-checks.patch,
MD5 40353e338343ed2b6a8f23259c881e49 util-linux-2.12q.ebuild 4785
MD5 3539732064102ec9896b7ae3b90e8e99 util-linux-2.12p-r1.ebuild 4396
-MD5 1281e5b67b05e64bf029a780be510073 util-linux-2.12q-r1.ebuild 5011
+MD5 615dd5dc24cb67c6ff5d7f4f8fd64b50 util-linux-2.12q-r1.ebuild 5124
MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
MD5 af4d9067188d2b9be9ff65f0a2482a1f util-linux-2.12i-r1.ebuild 3846
-MD5 c63170dca767a50edd38e3d9db1fe9d9 ChangeLog 18148
+MD5 6c5bc8e71db0b375818df454ba43eeb3 ChangeLog 18348
MD5 519d6757067c4ee7c634c8b60f9abeb3 files/util-linux-2.12p-swapon-check-symlinks.patch 864
MD5 e3697bc8fd6a344e8cba1c7d32e34790 files/util-linux-2.11z-parallel-make.patch 369
MD5 28b1a8ed38823851eafadacef8ce11ec files/util-linux-2.12q-no-m68k-fdisk.patch 239
MD5 8d4f1146f0699deb1e6872e1c81293e3 files/util-linux-2.12-selinux.diff.bz2 2558
MD5 a33ff00c09f558d4273360a581880c23 files/digest-util-linux-2.12q-r1 292
MD5 6eba0a390d20cd25c0d23e3155755f31 files/util-linux-2.12q-more-fake-checks.patch 612
+MD5 e8c2796a3427138ca8a09a69db357a1f files/util-linux-2.12q-update-mtab-when-moving.patch 1031
MD5 d448f3b1b3ea21db4c2c4f303b48c1c8 files/digest-util-linux-2.12p-r1 294
MD5 65f42fbf981464410f7d5d84a429e920 files/util-linux-no-kill.patch 642
MD5 a43d2b8c70c5f40a195721dc536abace files/util-linux-2.12-swapon-unistd.patch 289
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
-iD8DBQFDGQl9gIKl8Uu19MoRAs3JAJ9evpJU3+bm0legJBzigLj/zk6bAwCdGyWQ
-dZ7lDDFwOOGzS7Dw00LkMO4=
-=ZtDK
+iD4DBQFDG845gIKl8Uu19MoRAtE5AJ0Ri+tY5B+aDnXgmYIxzQZuiJFP1gCXb9ub
+0o8h/wGrtqrm/J4u8WLUzQ==
+=yX/B
-----END PGP SIGNATURE-----
--- /dev/null
+Running `mount --move /foo /bar` would leave the old /foo entry in /etc/mtab
+and create a new /bar entry with wrong info.
+
+http://bugs.gentoo.org/104697
+
+--- mount/mount.c
++++ mount/mount.c
+@@ -665,6 +665,25 @@
+ else {
+ mntFILE *mfp;
+
++ /* when moving a mount point, we have to make sure the mtab
++ * gets updated properly. We get info about the old mount
++ * point, copy it to the new mount point, and then delete
++ * the old mount point. */
++ if (flags & MS_MOVE) {
++ const char *olddir = mnt.mnt_fsname;
++ struct mntentchn *oldmc = oldmc = getmntfile(olddir);
++ if (oldmc != NULL) {
++ mnt.mnt_fsname = strdup(oldmc->m.mnt_fsname);
++ mnt.mnt_type = oldmc->m.mnt_type;
++ mnt.mnt_opts = oldmc->m.mnt_opts;
++ mnt.mnt_freq = oldmc->m.mnt_freq;
++ mnt.mnt_passno = oldmc->m.mnt_passno;
++ }
++ update_mtab(olddir, NULL);
++ if (oldmc != NULL)
++ my_free(olddir);
++ }
++
+ lock_mtab();
+ mfp = my_setmntent(MOUNTED, "a+");
+ if (mfp == NULL || mfp->mntent_fp == NULL) {
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.12q-r1.ebuild,v 1.5 2005/09/03 02:24:24 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.12q-r1.ebuild,v 1.6 2005/09/05 04:48:10 vapier Exp $
inherit eutils flag-o-matic toolchain-funcs
# Fix -f usage with -a and in general
epatch ${FILESDIR}/${PN}-2.12q-more-fake-checks.patch
+ # Fix mtab updates with `mount --move /foo /bar`
+ epatch ${FILESDIR}/${PN}-2.12q-update-mtab-when-moving.patch
+
# Fix unreadable df output when using devfs ... this check is kind of
# a hack, but whatever, the output isnt critical at all :P
[[ -e /dev/.devfsd ]] && epatch ${FILESDIR}/no-symlink-resolve.patch