summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile2012-03-03 01:32:38 (GMT)
committerAnthony G. Basile2012-03-03 01:32:38 (GMT)
commit91879751dc938038f9a0677f62d738c64c306cc8 (patch)
tree5f796a00d863260674ea342175a21877663a4619
parent893a6ee235448baab007e2432bc5f0d3e4e8131d (diff)
sys-apps/util-linux: replace my hacky patch with upstream fix
-rw-r--r--sys-apps/util-linux/Manifest4
-rw-r--r--sys-apps/util-linux/files/util-linux-2.20.1-scanf-as.patch12
-rw-r--r--sys-apps/util-linux/files/util-linux-2.20.1-sscanf-no-ms-as.patch80
-rw-r--r--sys-apps/util-linux/util-linux-2.20.1-r99.ebuild2
4 files changed, 83 insertions, 15 deletions
diff --git a/sys-apps/util-linux/Manifest b/sys-apps/util-linux/Manifest
index 96201ad..ede76d3 100644
--- a/sys-apps/util-linux/Manifest
+++ b/sys-apps/util-linux/Manifest
@@ -1,8 +1,8 @@
AUX util-linux-2.19.1-mount-a-segv.patch 2610 RMD160 67beca8dda0e48a80246c0904329944b978d445a SHA1 8eb682296c0b948a8931d71f0780f446bdd79027 SHA256 c24dc0ed811e6c0ebc69f15c818cf89aeb1dc12b5f2f62163402ad4479d7aec9
AUX util-linux-2.19.1-umount-l-nfs.patch 2721 RMD160 60e0ccf77633bec6b7a1576810aadd937e464b46 SHA1 ec611d245d42a4ec721fdcc0301f433577d4a45c SHA256 f889de8dba4cb412ec0afcd2605c4f97e0870c6325dd0200e8c8c06794b4bf64
-AUX util-linux-2.20.1-scanf-as.patch 383 RMD160 9d6ce6df7d1c29310509b12ef908078c417d1f79 SHA1 56684d41d457a09f6377682efce9b356eaa6f4c7 SHA256 86ae6f69477f3dd64b53aafe2a3bb1030c82a030d3c5031a22af5c46a1b476ed
+AUX util-linux-2.20.1-sscanf-no-ms-as.patch 2358 RMD160 394c060c1d895f0b4e3f235afe3a52dad15ce160 SHA1 fa94842df12340059e9055edf014406596a44bbd SHA256 54feda39822e7d1d47ce9bb87e03b66fb429938af57b109a29b18d2783add5ba
DIST util-linux-2.19.1.tar.bz2 4396543 RMD160 e4763d21a3a32029ccc525a0222e271f0946a4fd SHA1 96af5d4a37c42296dae5365ba533316216a6b347 SHA256 d3eac4afcc687b3ae1ffedcab2dc12df84c7ba7045cce31386d2b7040a011c7d
DIST util-linux-2.20.1.tar.bz2 4614302 RMD160 4ab3435dbd8b83a0c353301b6e0f89a91aa3ca2c SHA1 b5a9468b933743d2f15d41062c19830a5f804f15 SHA256 d16ebcda3e64ab88ed363d9c1242cdb7ccfd5e1f56c83d0c3b0638c23793bbe0
EBUILD util-linux-2.19.1-r99.ebuild 2771 RMD160 39e673cbaa7ead79c1b85fa2456fdd8066bea83c SHA1 2c584f8101ff56cc5893e62f0c7bbb2398e456b4 SHA256 5e35af88fb4f1df502f45720be7c92f6447fe745f4e3b777deb1ad9dda1caa21
-EBUILD util-linux-2.20.1-r99.ebuild 2961 RMD160 22031cbf80816563f08b85cad26064a7c968aad7 SHA1 a8b96355624f62c8958d49b8516e8c16624f8941 SHA256 838a9f32e5cdcd20c3186f3842aa270e0e86f9e9df2677f59014ef53479822a6
+EBUILD util-linux-2.20.1-r99.ebuild 2968 RMD160 33f77b1bb72ed315599ffa70edc4219a73f5974b SHA1 ab984a94cfdbbe4fd1b4d0df2cb4433cda6d3968 SHA256 8e2416c50ed88b24ea26a2c916a03b2765b0e116e3289ed948ea61c94f72daa6
MISC metadata.xml 380 RMD160 421c977bed8d8802c870ac63fcbb243fdcac05b3 SHA1 09fd2f7ed97c7652a4afa9a9c882f7469d16e34e SHA256 0116abc0e5a31375754681d965dfcc07ed2a7bd622935b2c5538c8392be5b42d
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
deleted file mode 100644
index 32f20bf..0000000
--- a/sys-apps/util-linux/files/util-linux-2.20.1-scanf-as.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-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
new file mode 100644
index 0000000..ea0743e
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.20.1-sscanf-no-ms-as.patch
@@ -0,0 +1,80 @@
+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 a831577..522875c 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}-scanf-as.patch
+ epatch "${FILESDIR}"/${P}-sscanf-no-ms-as.patch
use uclibc && sed -i -e s/versionsort/alphasort/g -e s/strverscmp.h/dirent.h/g mount/lomount.c
elibtoolize
}