aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-10-29 09:19:15 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-10-29 09:19:15 +0000
commitd308a146c40c5bf201b0a57f26c1b979117e3f2a (patch)
treecdfd4272f9135bdf0ff98f36293d46d71ebaa788 /main
parent1ed30341134e878b0655da1805a6d85ae0d03bdb (diff)
downloadaports-d308a146c40c5bf201b0a57f26c1b979117e3f2a.tar.bz2
aports-d308a146c40c5bf201b0a57f26c1b979117e3f2a.tar.xz
main/util-linux: upgrade to 2.25.2
Diffstat (limited to 'main')
-rw-r--r--main/util-linux/0001-hexdump-use-ll-format-modifier-instead-of-the-non-st.patch60
-rw-r--r--main/util-linux/0001-sfdisk-suppress-warning-about-missing-boot-partition.patch31
-rw-r--r--main/util-linux/0001-switch_root-use-typeof-instead-of-__SWORD_TYPE-for-s.patch67
-rw-r--r--main/util-linux/APKBUILD27
-rw-r--r--main/util-linux/hexdump.patch39
5 files changed, 141 insertions, 83 deletions
diff --git a/main/util-linux/0001-hexdump-use-ll-format-modifier-instead-of-the-non-st.patch b/main/util-linux/0001-hexdump-use-ll-format-modifier-instead-of-the-non-st.patch
new file mode 100644
index 0000000000..8a0c24c126
--- /dev/null
+++ b/main/util-linux/0001-hexdump-use-ll-format-modifier-instead-of-the-non-st.patch
@@ -0,0 +1,60 @@
+From ef1ba1cd2af353f81afb57222ed26a30b116aa29 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Thu, 8 May 2014 13:22:00 +0000
+Subject: [PATCH] hexdump: use 'll' format modifier instead of the non-standard
+ 'q'.
+
+The printf(3) man page says about 'q':
+("quad". 4.4BSD and Linux libc5 only. Don't use.) This is a synonym for ll.
+
+This fixes hexdump with musl libc.
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ text-utils/hexdump-parse.c | 16 +++++++++-------
+ 1 file changed, 9 insertions(+), 7 deletions(-)
+
+diff --git a/text-utils/hexdump-parse.c b/text-utils/hexdump-parse.c
+index 8d14c5b..9eb016d 100644
+--- a/text-utils/hexdump-parse.c
++++ b/text-utils/hexdump-parse.c
+@@ -226,7 +226,7 @@ void rewrite_rules(struct hexdump_fs *fs, struct hexdump *hex)
+ struct hexdump_fu *fu;
+ struct list_head *p, *q;
+ char *p1, *p2, *fmtp;
+- char savech, cs[3];
++ char savech, cs[4];
+ int nconv, prec = 0;
+
+ list_for_each (p, &fs->fulist) {
+@@ -301,9 +301,10 @@ void rewrite_rules(struct hexdump_fs *fs, struct hexdump *hex)
+ goto isint;
+ } else if (first_letter(cs, "ouxX")) {
+ pr->flags = F_UINT;
+-isint: cs[2] = '\0';
+- cs[1] = cs[0];
+- cs[0] = 'q';
++isint: cs[3] = '\0';
++ cs[2] = cs[0];
++ cs[1] = 'l';
++ cs[0] = 'l';
+ switch(fu->bcnt) {
+ case 0:
+ pr->bcnt = 4;
+@@ -355,9 +356,10 @@ isint: cs[2] = '\0';
+ pr->flags = F_ADDRESS;
+ ++p2;
+ if (first_letter(p1 + 2, "dox")) {
+- cs[0] = 'q';
+- cs[1] = p1[2];
+- cs[2] = '\0';
++ cs[0] = 'l';
++ cs[1] = 'l';
++ cs[2] = p1[2];
++ cs[3] = '\0';
+ } else {
+ p1[3] = '\0';
+ badconv(p1);
+--
+2.1.2
+
diff --git a/main/util-linux/0001-sfdisk-suppress-warning-about-missing-boot-partition.patch b/main/util-linux/0001-sfdisk-suppress-warning-about-missing-boot-partition.patch
deleted file mode 100644
index 643c063496..0000000000
--- a/main/util-linux/0001-sfdisk-suppress-warning-about-missing-boot-partition.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 7f7379b7628f5572e752069276f35e4d32ad884d Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Thu, 17 Jul 2014 13:37:33 +0000
-Subject: [PATCH] sfdisk: suppress warning about missing boot partition with
- --quiet
-
-Many use grub or lilo which does not care about boot partition. It
-might also be that sfdisk is used to partition a data disk from a
-script, so we hid the warning with --quiet.
-
-Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
----
- disk-utils/sfdisk.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c
-index b462705..95dbb45 100644
---- a/fdisks/sfdisk.c
-+++ b/fdisks/sfdisk.c
-@@ -1324,7 +1324,7 @@ partitions_ok(int fd, struct disk_desc *z) {
- break;
- }
- }
-- if (pno == -1 || pno >= 4)
-+ if (!quiet && (pno == -1 || pno >= 4))
- warnx(_("Warning: no primary partition is marked bootable (active)\n"
- "This does not matter for LILO, but the DOS MBR will "
- "not boot this disk."));
---
-2.0.1
-
diff --git a/main/util-linux/0001-switch_root-use-typeof-instead-of-__SWORD_TYPE-for-s.patch b/main/util-linux/0001-switch_root-use-typeof-instead-of-__SWORD_TYPE-for-s.patch
new file mode 100644
index 0000000000..db76b7a5bb
--- /dev/null
+++ b/main/util-linux/0001-switch_root-use-typeof-instead-of-__SWORD_TYPE-for-s.patch
@@ -0,0 +1,67 @@
+From d8aa7c8b2b1a5233ce8f3dde19490899bb50e4a2 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 29 Oct 2014 08:42:09 +0000
+Subject: [PATCH] switch_root: use typeof() instead of __SWORD_TYPE for statfs
+ compare
+
+Identifiers prefixed with __ are normally for internal use and should
+normally not be used outside libc.
+
+This fixes the following compile error with musl libc:
+sys-utils/switch_root.c:184:25: error: '__SWORD_TYPE' undeclared (first use in this function)
+ (stfs.f_type == (__SWORD_TYPE)STATFS_RAMFS_MAGIC ||
+ ^
+
+Also, statfs(2) man page is also wrong on some systems, because f_type
+is not __SWORD_TYPE on some architecures.
+
+The following program:
+
+int main(int argc, char**argv)
+{
+ struct statfs s;
+ statfs(argv[1], &s);
+
+ printf("sizeof(f_type) = %d\n", sizeof(s.f_type));
+ printf("sizeof(__SWORD_TYPE) = %d\n", sizeof(__SWORD_TYPE));
+ printf("sizeof(long) = %d\n", sizeof(long));
+ printf("sizeof(int) = %d\n", sizeof(int));
+ if (sizeof(s.f_type) == sizeof(int)) {
+ printf("f_type = 0x%x\n", s.f_type);
+ } else {
+ printf("f_type = 0x%lx\n", s.f_type);
+ }
+ return 0;
+}
+
+executed on s390x gives for a btrfs:
+
+sizeof(f_type) = 4
+sizeof(__SWORD_TYPE) = 8
+sizeof(long) = 8
+sizeof(int) = 4
+f_type = 0x9123683e
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ sys-utils/switch_root.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/sys-utils/switch_root.c b/sys-utils/switch_root.c
+index 6822a5d..3fbecdd 100644
+--- a/sys-utils/switch_root.c
++++ b/sys-utils/switch_root.c
+@@ -181,8 +181,8 @@ static int switchroot(const char *newroot)
+ if (pid <= 0) {
+ struct statfs stfs;
+ if (fstatfs(cfd, &stfs) == 0 &&
+- (stfs.f_type == (__SWORD_TYPE)STATFS_RAMFS_MAGIC ||
+- stfs.f_type == (__SWORD_TYPE)STATFS_TMPFS_MAGIC))
++ (stfs.f_type == (typeof(stfs.f_type))STATFS_RAMFS_MAGIC ||
++ stfs.f_type == (typeof(stfs.f_type))STATFS_TMPFS_MAGIC))
+ recursiveRemove(cfd);
+ else
+ warn(_("old root filesystem is not an initramfs"));
+--
+2.1.2
+
diff --git a/main/util-linux/APKBUILD b/main/util-linux/APKBUILD
index f3771b5240..5669a2c8d0 100644
--- a/main/util-linux/APKBUILD
+++ b/main/util-linux/APKBUILD
@@ -1,14 +1,14 @@
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=util-linux
-pkgver=2.24.2
+pkgver=2.25.2
case $pkgver in
*.*.*) _v=${pkgver%.*};;
*.*) _v=$pkgver;;
esac
-pkgrel=4
+pkgrel=0
pkgdesc="Random collection of Linux utilities"
url="http://kernel.org/~kzak/util-linux/"
arch="all"
@@ -17,11 +17,12 @@ depends=
# use GNU sed til bb sed is fixed. Also GNU tar is needed
makedepends="zlib-dev sed ncurses-dev tar autoconf automake libtool"
install=
+options="suid"
source="http://www.kernel.org/pub/linux/utils/util-linux/v${_v}/util-linux-$pkgver.tar.xz
fix-setenv-usage.patch
ttydefaults.h
- hexdump.patch
- 0001-sfdisk-suppress-warning-about-missing-boot-partition.patch
+ 0001-hexdump-use-ll-format-modifier-instead-of-the-non-st.patch
+ 0001-switch_root-use-typeof-instead-of-__SWORD_TYPE-for-s.patch
"
subpackages="$pkgname-doc $pkgname-dev libuuid libblkid libmount sfdisk cfdisk
mcookie blkid"
@@ -127,18 +128,18 @@ mcookie() {
mv "$pkgdir"/usr/bin/mcookie "$subpkgdir"/usr/bin/
}
-md5sums="3f191727a0d28f7204b755cf1b6ea0aa util-linux-2.24.2.tar.xz
+md5sums="cab3d7be354000f629bc601238b629b3 util-linux-2.25.2.tar.xz
7033d8ec10f6ff52c8120afbe9522490 fix-setenv-usage.patch
6196f1ce853dfaf717569c1e35555d6d ttydefaults.h
-38df779dea96dcbad8cf6c47eda19fd5 hexdump.patch
-d3cc2a2b7e3cc0d2a67efda266edad0b 0001-sfdisk-suppress-warning-about-missing-boot-partition.patch"
-sha256sums="1243d6c07f1c5b38aa4c3814c81a71c24cba7dafe08942916bf216a90a460ff0 util-linux-2.24.2.tar.xz
+0543fc61b54f8c5235d123d53c1f450b 0001-hexdump-use-ll-format-modifier-instead-of-the-non-st.patch
+d9004b0a3ebd37054ec872d71bff0bbb 0001-switch_root-use-typeof-instead-of-__SWORD_TYPE-for-s.patch"
+sha256sums="e0457f715b73f4a349e1acb08cb410bf0edc9a74a3f75c357070f31f70e33cd6 util-linux-2.25.2.tar.xz
ff1625c8d479511b263c1beb86bf6c30c2e13142183647f4fa8c62ff1bc68910 fix-setenv-usage.patch
46faf1198bd884d12c5d45019a5fec8dfdefeae6721d8c9f3da89921acdb2a6d ttydefaults.h
-c0b563541241ea68693c5b84e2cd83df7084bea3d01f4fcb33fc2e766474e404 hexdump.patch
-580247343f34919d080cf469e8f797c29d14c041948e212222f6d9ce6cd42495 0001-sfdisk-suppress-warning-about-missing-boot-partition.patch"
-sha512sums="a0c03876ef19fa09e434e3e5362fb3f3e0a254b3b39a623ac7a9a207d06afce00366792244ed0fac86931f8340c046620660f33c3444a07a12037182fc191240 util-linux-2.24.2.tar.xz
+751a9657d7b59325cb807f2190afa1109de121152aaad0f079139d582cb4d637 0001-hexdump-use-ll-format-modifier-instead-of-the-non-st.patch
+d63752f24ad4b98d7a98b653d8ffd2b8146be0bf598c61e979fcc3c2ec613116 0001-switch_root-use-typeof-instead-of-__SWORD_TYPE-for-s.patch"
+sha512sums="cf8c5bde78f844425150c2a81bdecb87aa57bcd5cebd177a78160835627f58037fa2cfe4db26fd8f35eedb3beb499a91492a297a27d065465e2ea0c6218dc387 util-linux-2.25.2.tar.xz
310acfe2f171010014d25b1788ea64bffc5a315f4fef8d3b8fc9b003bda8810111b12987052eb2d5856500bd6b742792c977608fe9459ce2efe7545ef0054588 fix-setenv-usage.patch
876bb9041eca1b2cca1e9aac898f282db576f7860aba690a95c0ac629d7c5b2cdeccba504dda87ff55c2a10b67165985ce16ca41a0694a267507e1e0cafd46d9 ttydefaults.h
-ddb9ca291644c1fcc00960f4963dfe3a646859895b1bc10f3b892f34c387fe73881ca5076c6ad4009ffb876bca3ff658760a864f83b5c467f6023000dcb304fc hexdump.patch
-a744ffa53e8a92c996adcabd9ac63aebda1ec1b6776addc7f29ff2262f066e7e20cc7b0ea67d42b52f0207fdaad0195b3b9901fb407f942b92b263a35ec47949 0001-sfdisk-suppress-warning-about-missing-boot-partition.patch"
+4124453ae30efd5d886de9b51ae1854715e77525e0bbff427eec2cb3569dbd9c702b76dd8af532f83f8ba6990056993873c4489b7438391f649ab63f29f32ef0 0001-hexdump-use-ll-format-modifier-instead-of-the-non-st.patch
+9cde5650e2dad4161f86101179297b9177f588368e453c83b874694ce18e9eb23973053171db61ff7abf550008e5021febbfdb8a47091a23520ade84d5eef59a 0001-switch_root-use-typeof-instead-of-__SWORD_TYPE-for-s.patch"
diff --git a/main/util-linux/hexdump.patch b/main/util-linux/hexdump.patch
deleted file mode 100644
index 72966e627e..0000000000
--- a/main/util-linux/hexdump.patch
+++ /dev/null
@@ -1,39 +0,0 @@
---- ./text-utils/parse.c.orig
-+++ ./text-utils/parse.c
-@@ -208,7 +208,7 @@
- PR *pr, **nextpr;
- FU *fu;
- char *p1, *p2;
-- char savech, *fmtp, cs[3];
-+ char savech, *fmtp, cs[4];
- int nconv, prec;
-
- nextpr = NULL;
-@@ -282,9 +282,10 @@
- goto isint;
- case 'o': case 'u': case 'x': case 'X':
- pr->flags = F_UINT;
--isint: cs[2] = '\0';
-- cs[1] = cs[0];
-- cs[0] = 'q';
-+isint: cs[3] = '\0';
-+ cs[2] = cs[0];
-+ cs[1] = 'l';
-+ cs[0] = 'l';
- switch(fu->bcnt) {
- case 0: case 4:
- pr->bcnt = 4;
-@@ -342,9 +343,10 @@
- ++p2;
- switch(p1[2]) {
- case 'd': case 'o': case'x':
-- cs[0] = 'q';
-- cs[1] = p1[2];
-- cs[2] = '\0';
-+ cs[0] = 'l';
-+ cs[1] = 'l';
-+ cs[2] = p1[2];
-+ cs[3] = '\0';
- break;
- default:
- p1[3] = '\0';