summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/util-linux/APKBUILD18
-rw-r--r--main/util-linux/gentoo-no-scanf.patch108
-rw-r--r--main/util-linux/rpmatch.patch51
3 files changed, 173 insertions, 4 deletions
diff --git a/main/util-linux/APKBUILD b/main/util-linux/APKBUILD
index a285feae8..4a375669d 100644
--- a/main/util-linux/APKBUILD
+++ b/main/util-linux/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=util-linux
-pkgver=2.21.2
+pkgver=2.22.1
case $pkgver in
*.*.*) _v=${pkgver%.*};;
@@ -15,10 +15,12 @@ arch="all"
license="GPL-2 GPL Public Domain"
depends=
# use GNU sed til bb sed is fixed. Also GNU tar is needed
-makedepends="zlib-dev sed ncurses-dev tar"
+makedepends="zlib-dev sed ncurses-dev tar autoconf automake libtool"
install=
source="http://www.kernel.org/pub/linux/utils/util-linux/v${_v}/util-linux-$pkgver.tar.xz
program-invocation.patch
+ gentoo-no-scanf.patch
+ rpmatch.patch
"
subpackages="$pkgname-doc $pkgname-dev libuuid libblkid sfdisk cfdisk mcookie blkid"
replaces="e2fsprogs util-linux-ng"
@@ -32,6 +34,7 @@ prepare() {
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
+ autoreconf
}
build() {
@@ -40,6 +43,7 @@ build() {
# -e 's/strverscmp.h/dirent.h/g' \
# -i mount/lomount.c
+ # login utils are provided by shadow (with PAM) or busybox (no PAM) --nenolod
./configure --prefix=/usr \
--enable-raw \
--disable-uuidd \
@@ -47,6 +51,10 @@ build() {
--disable-tls \
--disable-kill \
--with-ncurses \
+ --disable-login \
+ --disable-last \
+ --disable-sulogin \
+ --disable-su \
|| return 1
make || return 1
}
@@ -107,5 +115,7 @@ mcookie() {
mv "$pkgdir"/usr/bin/mcookie "$subpkgdir"/usr/bin/
}
-md5sums="54ba880f1d66782c2287ee2c898520e9 util-linux-2.21.2.tar.xz
-9682a6ddd5abe65434a145ebe512c123 program-invocation.patch"
+md5sums="730cf9932531ed09b53a04ca30fcb4c9 util-linux-2.22.1.tar.xz
+9682a6ddd5abe65434a145ebe512c123 program-invocation.patch
+85125e2cc7d54dc2733bedc603886f81 gentoo-no-scanf.patch
+2e6d6835adc6e962249d1c11792649fa rpmatch.patch"
diff --git a/main/util-linux/gentoo-no-scanf.patch b/main/util-linux/gentoo-no-scanf.patch
new file mode 100644
index 000000000..6818224c9
--- /dev/null
+++ b/main/util-linux/gentoo-no-scanf.patch
@@ -0,0 +1,108 @@
+for systems that don't support latest POSIX standard: %as
+
+https://bugs.gentoo.org/406303
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -688,7 +688,6 @@ AC_ARG_ENABLE([libmount],
+ UL_BUILD_INIT([libmount])
+ UL_REQUIRES_LINUX([libmount])
+ UL_REQUIRES_BUILD([libmount], [libblkid])
+-UL_REQUIRES_HAVE([libmount], [scanf_alloc_modifier], [scanf string alloc modifier])
+ AM_CONDITIONAL(BUILD_LIBMOUNT, test "x$build_libmount" = xyes)
+
+ AC_SUBST([LIBMOUNT_VERSION])
+--- a/libmount/src/tab_parse.c
++++ b/libmount/src/tab_parse.c
+@@ -22,6 +22,10 @@
+ #include "pathnames.h"
+ #include "strutils.h"
+
++#ifndef HAVE_SCANF_MS_MODIFIER
++# define UL_SCNsA "%s"
++#endif
++
+ static inline char *skip_spaces(char *s)
+ {
+ assert(s);
+@@ -61,16 +65,31 @@ static int mnt_parse_table_line(struct libmnt_fs *fs, char *s)
+ int rc, n = 0, xrc;
+ char *src = NULL, *fstype = NULL, *optstr = NULL;
+
++#ifndef HAVE_SCANF_MS_MODIFIER
++ size_t len = strlen(s) + 1;
++ src = malloc(len);
++ fstype = malloc(len);
++ fs->target = malloc(len);
++ optstr = malloc(len);
++#endif
++
+ rc = sscanf(s, UL_SCNsA" " /* (1) source */
+ UL_SCNsA" " /* (2) target */
+ UL_SCNsA" " /* (3) FS type */
+ UL_SCNsA" " /* (4) options */
+ "%n", /* byte count */
+
++#ifdef HAVE_SCANF_MS_MODIFIER
+ &src,
+ &fs->target,
+ &fstype,
+ &optstr,
++#else
++ src,
++ fs->target,
++ fstype,
++ optstr,
++#endif
+ &n);
+ xrc = rc;
+
+@@ -136,6 +155,16 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, char *s)
+ unsigned int maj, min;
+ char *fstype = NULL, *src = NULL, *p;
+
++#ifndef HAVE_SCANF_MS_MODIFIER
++ size_t len = strlen(s) + 1;
++ fs->root = malloc(len);
++ fs->target = malloc(len);
++ fs->vfs_optstr = malloc(len);
++ fs->fs_optstr = malloc(len);
++ fstype = malloc(len);
++ src = malloc(len);
++#endif
++
+ rc = sscanf(s, "%u " /* (1) id */
+ "%u " /* (2) parent */
+ "%u:%u " /* (3) maj:min */
+@@ -147,9 +175,15 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, char *s)
+ &fs->id,
+ &fs->parent,
+ &maj, &min,
++#ifdef HAVE_SCANF_MS_MODIFIER
+ &fs->root,
+ &fs->target,
+ &fs->vfs_optstr,
++#else
++ fs->root,
++ fs->target,
++ fs->vfs_optstr,
++#endif
+ &end);
+
+ if (rc >= 7 && end > 0)
+@@ -167,9 +201,15 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, char *s)
+ UL_SCNsA" " /* (9) source */
+ UL_SCNsA, /* (10) fs options (fs specific) */
+
++#ifdef HAVE_SCANF_MS_MODIFIER
+ &fstype,
+ &src,
+ &fs->fs_optstr);
++#else
++ fstype,
++ src,
++ fs->fs_optstr);
++#endif
+
+ if (rc >= 10) {
+ fs->flags |= MNT_FS_KERNEL;
diff --git a/main/util-linux/rpmatch.patch b/main/util-linux/rpmatch.patch
new file mode 100644
index 000000000..27dea20e5
--- /dev/null
+++ b/main/util-linux/rpmatch.patch
@@ -0,0 +1,51 @@
+From d338f1a3125d1c069713a53967b65a9f18ad0bf7 Mon Sep 17 00:00:00 2001
+From: William Pitcock <nenolod@dereferenced.org>
+Date: Thu, 25 Oct 2012 04:06:49 +0000
+Subject: [PATCH] Add missing rpmatch.h everywhere it needs to be.
+
+Signed-off-by: William Pitcock <nenolod@dereferenced.org>
+---
+ disk-utils/fsck.minix.c | 1 +
+ login-utils/vipw.c | 1 +
+ term-utils/mesg.c | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/disk-utils/fsck.minix.c b/disk-utils/fsck.minix.c
+index f24a9f2..6b7a0b2 100644
+--- a/disk-utils/fsck.minix.c
++++ b/disk-utils/fsck.minix.c
+@@ -111,6 +111,7 @@
+ #include "ismounted.h"
+ #include "all-io.h"
+ #include "closestream.h"
++#include "rpmatch.h"
+
+ #define ROOT_INO 1
+ #define YESNO_LENGTH 64
+diff --git a/login-utils/vipw.c b/login-utils/vipw.c
+index 1eeeb0d..4a1cf02 100644
+--- a/login-utils/vipw.c
++++ b/login-utils/vipw.c
+@@ -78,6 +78,7 @@
+ #include "setpwnam.h"
+ #include "strutils.h"
+ #include "xalloc.h"
++#include "rpmatch.h"
+
+ #ifdef HAVE_LIBSELINUX
+ # include <selinux/selinux.h>
+diff --git a/term-utils/mesg.c b/term-utils/mesg.c
+index b24e783..78a4118 100644
+--- a/term-utils/mesg.c
++++ b/term-utils/mesg.c
+@@ -58,6 +58,7 @@
+ #include "closestream.h"
+ #include "nls.h"
+ #include "c.h"
++#include "rpmatch.h"
+
+ /* exit codes */
+
+--
+1.7.12.3
+