* [gentoo-commits] proj/hardened-dev:uclibc commit in: sys-apps/util-linux/, sys-apps/util-linux/files/
@ 2012-03-03 1:32 Anthony G. Basile
0 siblings, 0 replies; 4+ messages in thread
From: Anthony G. Basile @ 2012-03-03 1:32 UTC (permalink / raw
To: gentoo-commits
commit: 91879751dc938038f9a0677f62d738c64c306cc8
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 3 01:32:38 2012 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Mar 3 01:32:38 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=91879751
sys-apps/util-linux: replace my hacky patch with upstream fix
---
.../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, 81 insertions(+), 13 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
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
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/hardened-dev:uclibc commit in: sys-apps/util-linux/, sys-apps/util-linux/files/
@ 2012-04-22 3:33 Anthony G. Basile
0 siblings, 0 replies; 4+ messages in thread
From: Anthony G. Basile @ 2012-04-22 3:33 UTC (permalink / raw
To: gentoo-commits
commit: abcb25f6f302dde463feafb94d4dd6056eb88ef3
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 22 03:32:50 2012 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun Apr 22 03:32:50 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=abcb25f6
sys-apps/util-linux: bug 406303 fixed
---
.../files/util-linux-2.19.1-mount-a-segv.patch | 86 ----------------
.../files/util-linux-2.19.1-umount-l-nfs.patch | 92 -----------------
.../files/util-linux-2.20.1-scanf-as.patch | 12 ---
sys-apps/util-linux/metadata.xml | 10 --
sys-apps/util-linux/util-linux-2.19.1-r99.ebuild | 97 ------------------
sys-apps/util-linux/util-linux-2.20.1-r99.ebuild | 103 --------------------
6 files changed, 0 insertions(+), 400 deletions(-)
diff --git a/sys-apps/util-linux/files/util-linux-2.19.1-mount-a-segv.patch b/sys-apps/util-linux/files/util-linux-2.19.1-mount-a-segv.patch
deleted file mode 100644
index 1f358ba..0000000
--- a/sys-apps/util-linux/files/util-linux-2.19.1-mount-a-segv.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-https://bugs.gentoo.org/366213
-
-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.6
-
diff --git a/sys-apps/util-linux/files/util-linux-2.19.1-umount-l-nfs.patch b/sys-apps/util-linux/files/util-linux-2.19.1-umount-l-nfs.patch
deleted file mode 100644
index 72ec3aa..0000000
--- a/sys-apps/util-linux/files/util-linux-2.19.1-umount-l-nfs.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-https://bugs.gentoo.org/370051
-
-From b3b0c657818aa6191e6494f88d671601dd9d837d Mon Sep 17 00:00:00 2001
-From: Petr Uzel <petr.uzel@suse.cz>
-Date: Wed, 29 Jun 2011 10:24:09 +0200
-Subject: [PATCH] umount: do not hang with disconnected NFS mounts
-
-Since util-linux commit f4612577c942a3683b97632ad0b49671897c2070,
-umount stat(2)s its argument to check whether it can be associated
-with some loop device. This could hang with broken NFS mounts.
-
-Fix by first checking mtab if umount's argument is mounted and only if
-we fail, check if there is a loop device associated.
-
-http://marc.info/?l=util-linux-ng&m=130924963804836&w=2
-
-Reported-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
-Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
----
- mount/umount.c | 42 ++++++++++++++++++++++--------------------
- 1 files changed, 22 insertions(+), 20 deletions(-)
-
-diff --git a/mount/umount.c b/mount/umount.c
-index 0349cb3..96c940e 100644
---- a/mount/umount.c
-+++ b/mount/umount.c
-@@ -600,6 +600,7 @@ umount_file (char *arg) {
- int fstab_has_user, fstab_has_users, fstab_has_owner, fstab_has_group;
- int ok, status = 0;
- struct stat statbuf;
-+ char *loopdev = NULL;
-
- if (!*arg) { /* "" would be expanded to `pwd` */
- die(2, _("Cannot unmount \"\"\n"));
-@@ -608,26 +609,7 @@ umount_file (char *arg) {
-
- file = canonicalize(arg); /* mtab paths are canonicalized */
-
-- /* if file is a regular file, check if it is associated
-- * with some loop device
-- */
-- if (!stat(file, &statbuf) && S_ISREG(statbuf.st_mode)) {
-- char *loopdev = NULL;
-- switch (find_loopdev_by_backing_file(file, &loopdev)) {
-- case 0:
-- if (verbose)
-- printf(_("%s is associated with %s, trying to unmount it\n"),
-- arg, loopdev);
-- file = loopdev;
-- break;
-- case 2:
-- if (verbose)
-- printf(_("%s is associated with more than one loop device: not unmounting\n"),
-- arg);
-- break;
-- }
-- }
--
-+try_loopdev:
- if (verbose > 1)
- printf(_("Trying to unmount %s\n"), file);
-
-@@ -659,6 +641,26 @@ umount_file (char *arg) {
- if (!mc && verbose)
- printf(_("Could not find %s in mtab\n"), file);
-
-+ /* not found in mtab - check if it is associated with some loop device
-+ * (only if it is a regular file)
-+ */
-+ if (!mc && !loopdev && !stat(file, &statbuf) && S_ISREG(statbuf.st_mode)) {
-+ switch (find_loopdev_by_backing_file(file, &loopdev)) {
-+ case 0:
-+ if (verbose)
-+ printf(_("%s is associated with %s\n"),
-+ arg, loopdev);
-+ file = loopdev;
-+ goto try_loopdev;
-+ break;
-+ case 2:
-+ if (verbose)
-+ printf(_("%s is associated with more than one loop device: not unmounting\n"),
-+ arg);
-+ break;
-+ }
-+ }
-+
- if (restricted) {
- char *mtab_user = NULL;
-
---
-1.7.6
-
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/metadata.xml b/sys-apps/util-linux/metadata.xml
deleted file mode 100644
index 2072514..0000000
--- a/sys-apps/util-linux/metadata.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <herd>base-system</herd>
-<use>
- <flag name='cramfs'>build mkfs/fsck helpers for cramfs filesystems</flag>
- <flag name='ddate'>build ddate helper (Discordian dates)</flag>
- <flag name='perl'>install the chkdupexe helper script</flag>
-</use>
-</pkgmetadata>
diff --git a/sys-apps/util-linux/util-linux-2.19.1-r99.ebuild b/sys-apps/util-linux/util-linux-2.19.1-r99.ebuild
deleted file mode 100644
index 14cecaf..0000000
--- a/sys-apps/util-linux/util-linux-2.19.1-r99.ebuild
+++ /dev/null
@@ -1,97 +0,0 @@
-# Copyright 1999-2012 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.19.1-r1.ebuild,v 1.12 2012/01/07 20:54:37 vapier Exp $
-
-EAPI="3"
-
-EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
-inherit eutils toolchain-funcs libtool flag-o-matic
-
-MY_PV=${PV/_/-}
-MY_P=${PN}-${MY_PV}
-S=${WORKDIR}/${MY_P}
-
-DESCRIPTION="Various useful Linux utilities"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux/"
-SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.bz2"
-KEYWORDS="amd64 x86"
-
-LICENSE="GPL-2 GPL-3 LGPL-2.1 BSD-4 MIT public-domain"
-SLOT="0"
-IUSE="+cramfs crypt ncurses nls old-linux perl selinux slang uclibc unicode"
-
-RDEPEND="
- !<sys-libs/e2fsprogs-libs-1.41.8
- !<sys-fs/e2fsprogs-1.41.8
- cramfs? ( sys-libs/zlib )
- ncurses? ( >=sys-libs/ncurses-5.2-r2 )
- perl? ( dev-lang/perl )
- selinux? ( sys-libs/libselinux )
- slang? ( sys-libs/slang )"
-DEPEND="${RDEPEND}
- nls? ( sys-devel/gettext )
- virtual/os-headers"
-
-src_prepare() {
- epatch "${FILESDIR}"/${P}-mount-a-segv.patch #366213
- epatch "${FILESDIR}"/${P}-umount-l-nfs.patch #370051
- use uclibc && sed -i -e s/versionsort/alphasort/g -e s/strverscmp.h/dirent.h/g mount/lomount.c
- elibtoolize
-}
-
-lfs_fallocate_test() {
- # Make sure we can use fallocate with LFS #300307
- cat <<-EOF > "${T}"/fallocate.c
- #define _GNU_SOURCE
- #include <fcntl.h>
- main() { return fallocate(0, 0, 0, 0); }
- EOF
- append-lfs-flags
- $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.c -o /dev/null >/dev/null 2>&1 \
- || export ac_cv_func_fallocate=no
- rm -f "${T}"/fallocate.c
-}
-
-usex() { use $1 && echo ${2:-yes} || echo ${3:-no} ; }
-src_configure() {
- lfs_fallocate_test
- append-flags -DHAVE_PROGRAM_INVOCATION_SHORT_NAME
- econf \
- --enable-fs-paths-extra=/usr/sbin \
- $(use_enable nls) \
- --enable-agetty \
- $(use_enable cramfs) \
- $(use_enable old-linux elvtune) \
- --with-ncurses=$(usex ncurses $(usex unicode auto yes) no) \
- --disable-init \
- --disable-kill \
- --disable-last \
- --disable-mesg \
- --enable-partx \
- --enable-raw \
- --enable-rename \
- --disable-reset \
- --disable-login-utils \
- --enable-schedutils \
- --disable-wall \
- --enable-write \
- --without-pam \
- $(use_with selinux) \
- $(use_with slang) \
- $(tc-has-tls || echo --disable-tls)
-}
-
-src_install() {
- emake install DESTDIR="${D}" || die "install failed"
- dodoc AUTHORS NEWS README* TODO docs/*
-
- if ! use perl ; then #284093
- rm "${ED}"/usr/bin/chkdupexe || die
- rm "${ED}"/usr/share/man/man1/chkdupexe.1 || die
- fi
-
- # need the libs in /
- gen_usr_ldscript -a blkid uuid
- # e2fsprogs-libs didnt install .la files, and .pc work fine
- rm -f "${ED}"/usr/$(get_libdir)/*.la
-}
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
deleted file mode 100644
index a831577..0000000
--- a/sys-apps/util-linux/util-linux-2.20.1-r99.ebuild
+++ /dev/null
@@ -1,103 +0,0 @@
-# Copyright 1999-2012 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.20.1-r1.ebuild,v 1.1 2012/01/07 21:33:35 vapier Exp $
-
-EAPI="3"
-
-EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
-inherit eutils toolchain-funcs libtool flag-o-matic
-
-MY_PV=${PV/_/-}
-MY_P=${PN}-${MY_PV}
-S=${WORKDIR}/${MY_P}
-
-DESCRIPTION="Various useful Linux utilities"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux/"
-SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.bz2"
-KEYWORDS="amd64 mips x86"
-
-LICENSE="GPL-2 GPL-3 LGPL-2.1 BSD-4 MIT public-domain"
-SLOT="0"
-IUSE="+cramfs ddate ncurses nls old-linux perl selinux slang static-libs uclibc unicode"
-
-RDEPEND="
- <sys-apps/sysvinit-2.88-r3
- !<sys-libs/e2fsprogs-libs-1.41.8
- !<sys-fs/e2fsprogs-1.41.8
- cramfs? ( sys-libs/zlib )
- ncurses? ( >=sys-libs/ncurses-5.2-r2 )
- perl? ( dev-lang/perl )
- selinux? ( sys-libs/libselinux )
- slang? ( sys-libs/slang )"
-DEPEND="${RDEPEND}
- nls? ( sys-devel/gettext )
- virtual/os-headers"
-
-src_prepare() {
- 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
-}
-
-lfs_fallocate_test() {
- # Make sure we can use fallocate with LFS #300307
- cat <<-EOF > "${T}"/fallocate.c
- #define _GNU_SOURCE
- #include <fcntl.h>
- main() { return fallocate(0, 0, 0, 0); }
- EOF
- append-lfs-flags
- $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.c -o /dev/null >/dev/null 2>&1 \
- || export ac_cv_func_fallocate=no
- rm -f "${T}"/fallocate.c
-}
-
-usex() { use $1 && echo ${2:-yes} || echo ${3:-no} ; }
-src_configure() {
- lfs_fallocate_test
- econf \
- --enable-fs-paths-extra=/usr/sbin \
- $(use_enable nls) \
- --enable-agetty \
- $(use_enable cramfs) \
- $(use_enable ddate) \
- $(use_enable old-linux elvtune) \
- --with-ncurses=$(usex ncurses $(usex unicode auto yes) no) \
- --disable-kill \
- --disable-last \
- --disable-mesg \
- --enable-partx \
- --enable-raw \
- --enable-rename \
- --disable-reset \
- --disable-login-utils \
- --enable-schedutils \
- --disable-wall \
- --enable-write \
- --without-pam \
- $(use_with selinux) \
- $(use_with slang) \
- $(use_enable static-libs static) \
- $(tc-has-tls || echo --disable-tls)
-}
-
-src_install() {
- emake install DESTDIR="${D}" || die "install failed"
- dodoc AUTHORS NEWS README* TODO docs/*
- use ddate || find "${ED}"/usr/share/man -name 'ddate.1*' -delete
-
- if ! use perl ; then #284093
- rm "${ED}"/usr/bin/chkdupexe || die
- rm "${ED}"/usr/share/man/man1/chkdupexe.1 || die
- fi
-
- # need the libs in /
- gen_usr_ldscript -a blkid mount uuid
- # e2fsprogs-libs didnt install .la files, and .pc work fine
- rm -f "${ED}"/usr/$(get_libdir)/*.la
-}
-
-pkg_postinst() {
- elog "The agetty util now clears the terminal by default. You"
- elog "might want to add --noclear to your /etc/inittab lines."
-}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/hardened-dev:uclibc commit in: sys-apps/util-linux/, sys-apps/util-linux/files/
@ 2012-03-03 1:45 Anthony G. Basile
0 siblings, 0 replies; 4+ messages in thread
From: Anthony G. Basile @ 2012-03-03 1:45 UTC (permalink / raw
To: gentoo-commits
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
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/hardened-dev:uclibc commit in: sys-apps/util-linux/, sys-apps/util-linux/files/
@ 2012-02-16 20:31 Anthony G. Basile
0 siblings, 0 replies; 4+ messages in thread
From: Anthony G. Basile @ 2012-02-16 20:31 UTC (permalink / raw
To: gentoo-commits
commit: 6ef99ef06bf2652116811f16a54c7b5f76d506db
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 16 20:31:38 2012 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Thu Feb 16 20:31:38 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=6ef99ef0
sys-apps/util-linux: add scanf-as.patch for mips
(Portage version: 2.1.10.44/git/Linux x86_64, signed Manifest commit with key 0xD0455535)
---
.../files/util-linux-2.20.1-scanf-as.patch | 12 ++++++++++
sys-apps/util-linux/metadata.xml | 5 +---
sys-apps/util-linux/util-linux-2.19.1-r99.ebuild | 2 +-
...9.1-r99.ebuild => util-linux-2.20.1-r99.ebuild} | 22 ++++++++++++-------
4 files changed, 28 insertions(+), 13 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/metadata.xml b/sys-apps/util-linux/metadata.xml
index 8a9b6a7..2072514 100644
--- a/sys-apps/util-linux/metadata.xml
+++ b/sys-apps/util-linux/metadata.xml
@@ -2,12 +2,9 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>base-system</herd>
- <maintainer restrict="sys-apps/util-linux[loop-aes]">
- <email>c1pher@gentoo.org</email>
- <name>Dane Smith</name>
- </maintainer>
<use>
<flag name='cramfs'>build mkfs/fsck helpers for cramfs filesystems</flag>
+ <flag name='ddate'>build ddate helper (Discordian dates)</flag>
<flag name='perl'>install the chkdupexe helper script</flag>
</use>
</pkgmetadata>
diff --git a/sys-apps/util-linux/util-linux-2.19.1-r99.ebuild b/sys-apps/util-linux/util-linux-2.19.1-r99.ebuild
index 95e961c..14cecaf 100644
--- a/sys-apps/util-linux/util-linux-2.19.1-r99.ebuild
+++ b/sys-apps/util-linux/util-linux-2.19.1-r99.ebuild
@@ -14,7 +14,7 @@ S=${WORKDIR}/${MY_P}
DESCRIPTION="Various useful Linux utilities"
HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux/"
SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.bz2"
-KEYWORDS="amd64 mips x86"
+KEYWORDS="amd64 x86"
LICENSE="GPL-2 GPL-3 LGPL-2.1 BSD-4 MIT public-domain"
SLOT="0"
diff --git a/sys-apps/util-linux/util-linux-2.19.1-r99.ebuild b/sys-apps/util-linux/util-linux-2.20.1-r99.ebuild
similarity index 81%
copy from sys-apps/util-linux/util-linux-2.19.1-r99.ebuild
copy to sys-apps/util-linux/util-linux-2.20.1-r99.ebuild
index 95e961c..7554c37 100644
--- a/sys-apps/util-linux/util-linux-2.19.1-r99.ebuild
+++ b/sys-apps/util-linux/util-linux-2.20.1-r99.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 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.19.1-r1.ebuild,v 1.12 2012/01/07 20:54:37 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.20.1-r1.ebuild,v 1.1 2012/01/07 21:33:35 vapier Exp $
EAPI="3"
@@ -14,13 +14,14 @@ S=${WORKDIR}/${MY_P}
DESCRIPTION="Various useful Linux utilities"
HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux/"
SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.bz2"
-KEYWORDS="amd64 mips x86"
+KEYWORDS="~mips"
LICENSE="GPL-2 GPL-3 LGPL-2.1 BSD-4 MIT public-domain"
SLOT="0"
-IUSE="+cramfs crypt ncurses nls old-linux perl selinux slang uclibc unicode"
+IUSE="+cramfs ddate ncurses nls old-linux perl selinux slang static-libs uclibc unicode"
RDEPEND="
+ <sys-apps/sysvinit-2.88-r3
!<sys-libs/e2fsprogs-libs-1.41.8
!<sys-fs/e2fsprogs-1.41.8
cramfs? ( sys-libs/zlib )
@@ -33,8 +34,7 @@ DEPEND="${RDEPEND}
virtual/os-headers"
src_prepare() {
- epatch "${FILESDIR}"/${P}-mount-a-segv.patch #366213
- epatch "${FILESDIR}"/${P}-umount-l-nfs.patch #370051
+ 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
}
@@ -55,15 +55,14 @@ lfs_fallocate_test() {
usex() { use $1 && echo ${2:-yes} || echo ${3:-no} ; }
src_configure() {
lfs_fallocate_test
- append-flags -DHAVE_PROGRAM_INVOCATION_SHORT_NAME
econf \
--enable-fs-paths-extra=/usr/sbin \
$(use_enable nls) \
--enable-agetty \
$(use_enable cramfs) \
+ $(use_enable ddate) \
$(use_enable old-linux elvtune) \
--with-ncurses=$(usex ncurses $(usex unicode auto yes) no) \
- --disable-init \
--disable-kill \
--disable-last \
--disable-mesg \
@@ -78,12 +77,14 @@ src_configure() {
--without-pam \
$(use_with selinux) \
$(use_with slang) \
+ $(use_enable static-libs static) \
$(tc-has-tls || echo --disable-tls)
}
src_install() {
emake install DESTDIR="${D}" || die "install failed"
dodoc AUTHORS NEWS README* TODO docs/*
+ use ddate || find "${ED}"/usr/share/man -name 'ddate.1*' -delete
if ! use perl ; then #284093
rm "${ED}"/usr/bin/chkdupexe || die
@@ -91,7 +92,12 @@ src_install() {
fi
# need the libs in /
- gen_usr_ldscript -a blkid uuid
+ gen_usr_ldscript -a blkid mount uuid
# e2fsprogs-libs didnt install .la files, and .pc work fine
rm -f "${ED}"/usr/$(get_libdir)/*.la
}
+
+pkg_postinst() {
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-22 3:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-03 1:32 [gentoo-commits] proj/hardened-dev:uclibc commit in: sys-apps/util-linux/, sys-apps/util-linux/files/ Anthony G. Basile
-- strict thread matches above, loose matches on Subject: below --
2012-04-22 3:33 Anthony G. Basile
2012-03-03 1:45 Anthony G. Basile
2012-02-16 20:31 Anthony G. Basile
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox