From: "Anthony G. Basile" <blueness@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/hardened-dev:uclibc commit in: sys-apps/util-linux/, sys-apps/util-linux/files/
Date: Sat, 3 Mar 2012 01:45:50 +0000 (UTC) [thread overview]
Message-ID: <1330739111.3a964f5b33f453b37a022bc91c835aba00ece876.blueness@gentoo> (raw)
commit: 3a964f5b33f453b37a022bc91c835aba00ece876
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 3 01:45:11 2012 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Mar 3 01:45:11 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=3a964f5b
Revert "sys-apps/util-linux: replace my hacky patch with upstream fix"
My hacky patch is actually better!
This reverts commit 91879751dc938038f9a0677f62d738c64c306cc8.
---
.../files/util-linux-2.20.1-scanf-as.patch | 12 +++
.../files/util-linux-2.20.1-sscanf-no-ms-as.patch | 80 --------------------
sys-apps/util-linux/util-linux-2.20.1-r99.ebuild | 2 +-
3 files changed, 13 insertions(+), 81 deletions(-)
diff --git a/sys-apps/util-linux/files/util-linux-2.20.1-scanf-as.patch b/sys-apps/util-linux/files/util-linux-2.20.1-scanf-as.patch
new file mode 100644
index 0000000..32f20bf
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.20.1-scanf-as.patch
@@ -0,0 +1,12 @@
+diff -Naur util-linux-2.20.1.orig//include/c.h util-linux-2.20.1/include/c.h
+--- util-linux-2.20.1.orig//include/c.h 2011-10-18 08:22:27.000000000 -0400
++++ util-linux-2.20.1/include/c.h 2012-02-16 15:23:55.000000000 -0500
+@@ -216,7 +216,7 @@
+ */
+ #ifdef HAVE_SCANF_MS_MODIFIER
+ #define UL_SCNsA "%ms"
+-#elif defined(HAVE_SCANF_AS_MODIFIER)
++#else
+ #define UL_SCNsA "%as"
+ #endif
+
diff --git a/sys-apps/util-linux/files/util-linux-2.20.1-sscanf-no-ms-as.patch b/sys-apps/util-linux/files/util-linux-2.20.1-sscanf-no-ms-as.patch
deleted file mode 100644
index ea0743e..0000000
--- a/sys-apps/util-linux/files/util-linux-2.20.1-sscanf-no-ms-as.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-See https://bugs.gentoo.org/show_bug.cgi?id=406303
-diff -Naur util-linux-2.20.1.orig/libmount/src/tab_parse.c util-linux-2.20.1/libmount/src/tab_parse.c
---- util-linux-2.20.1.orig/libmount/src/tab_parse.c 2011-12-12 20:51:06.646614964 -0500
-+++ util-linux-2.20.1/libmount/src/tab_parse.c 2011-12-12 21:02:03.587865010 -0500
-@@ -51,19 +51,21 @@
- */
- static int mnt_parse_table_line(struct libmnt_fs *fs, char *s)
- {
-- int rc, n = 0;
-- char *src, *fstype, *optstr;
--
-- rc = sscanf(s, UL_SCNsA" " /* (1) source */
-- UL_SCNsA" " /* (2) target */
-- UL_SCNsA" " /* (3) FS type */
-- UL_SCNsA" " /* (4) options */
-+ int rc, n = 0, len = strlen (s) + 1;
-+ char *src = malloc (sizeof *src * len);
-+ char *fstype = malloc (sizeof *fstype * len);
-+ char *optstr = malloc (sizeof *optstr * len);
-+
-+ rc = sscanf(s, "%s"" " /* (1) source */
-+ "%s"" " /* (2) target */
-+ "%s"" " /* (3) FS type */
-+ "%s"" " /* (4) options */
- "%n", /* byte count */
-
-- &src,
-- &fs->target,
-- &fstype,
-- &optstr,
-+ src,
-+ fs->target,
-+ fstype,
-+ optstr,
- &n);
-
- if (rc == 4) {
-@@ -108,16 +110,20 @@
- */
- static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, char *s)
- {
-- int rc, end = 0;
-+ int rc, end = 0, len = strlen (s) + 1;
- unsigned int maj, min;
- char *fstype, *src, *p;
-
-+ fs->root = malloc (sizeof *fs->root * len);
-+ fs->target = malloc (sizeof *fs->target * len);
-+ fs->vfs_optstr = malloc (sizeof *fs->vfs_optstr * len);
-+
- rc = sscanf(s, "%u " /* (1) id */
- "%u " /* (2) parent */
- "%u:%u " /* (3) maj:min */
-- UL_SCNsA" " /* (4) mountroot */
-- UL_SCNsA" " /* (5) target */
-- UL_SCNsA /* (6) vfs options (fs-independent) */
-+ "%s"" " /* (4) mountroot */
-+ "%s"" " /* (5) target */
-+ "%s" /* (6) vfs options (fs-independent) */
- "%n", /* number of read bytes */
-
- &fs->id,
-@@ -139,9 +145,14 @@
- }
- s = p + 3;
-
-- rc += sscanf(s, UL_SCNsA" " /* (8) FS type */
-- UL_SCNsA" " /* (9) source */
-- UL_SCNsA, /* (10) fs options (fs specific) */
-+ len = strlen (s) + 1;
-+ fstype = malloc (sizeof *fstype * len);
-+ src = malloc (sizeof *src * len);
-+ fs->fs_optstr = malloc (sizeof *fs->fs_optstr * len);
-+
-+ rc += sscanf(s, "%s"" " /* (8) FS type */
-+ "%s"" " /* (9) source */
-+ "%s", /* (10) fs options (fs specific) */
-
- &fstype,
- &src,
diff --git a/sys-apps/util-linux/util-linux-2.20.1-r99.ebuild b/sys-apps/util-linux/util-linux-2.20.1-r99.ebuild
index 522875c..a831577 100644
--- a/sys-apps/util-linux/util-linux-2.20.1-r99.ebuild
+++ b/sys-apps/util-linux/util-linux-2.20.1-r99.ebuild
@@ -34,7 +34,7 @@ DEPEND="${RDEPEND}
virtual/os-headers"
src_prepare() {
- epatch "${FILESDIR}"/${P}-sscanf-no-ms-as.patch
+ epatch "${FILESDIR}"/${P}-scanf-as.patch
use uclibc && sed -i -e s/versionsort/alphasort/g -e s/strverscmp.h/dirent.h/g mount/lomount.c
elibtoolize
}
next reply other threads:[~2012-03-03 1:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-03 1:45 Anthony G. Basile [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-04-22 3:33 [gentoo-commits] proj/hardened-dev:uclibc commit in: sys-apps/util-linux/, sys-apps/util-linux/files/ Anthony G. Basile
2012-03-03 1:32 Anthony G. Basile
2012-02-16 20:31 Anthony G. Basile
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1330739111.3a964f5b33f453b37a022bc91c835aba00ece876.blueness@gentoo \
--to=blueness@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox