diff options
author | tmpfile <tmpfile@users.noreply.github.com> | 2017-09-06 09:38:00 -0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2017-09-06 12:50:07 +0000 |
commit | a72805452ffd9ed84330299917f098ea69e70ef0 (patch) | |
tree | 1fa8b37ff40563498cf4c1bb6af6c1c9cf53275d /main | |
parent | f9398bb0531c18b2bce1922fa17157528fd820ee (diff) | |
download | aports-a72805452ffd9ed84330299917f098ea69e70ef0.tar.bz2 aports-a72805452ffd9ed84330299917f098ea69e70ef0.tar.xz |
main/util-linux: upgrade to 2.30.1
Diffstat (limited to 'main')
-rw-r--r-- | main/util-linux/APKBUILD | 51 | ||||
-rw-r--r-- | main/util-linux/libblkid-reduce-probing-area-for-crazy-CDROMs.patch | 85 |
2 files changed, 19 insertions, 117 deletions
diff --git a/main/util-linux/APKBUILD b/main/util-linux/APKBUILD index e7ccd89762..a4d01547b6 100644 --- a/main/util-linux/APKBUILD +++ b/main/util-linux/APKBUILD @@ -2,26 +2,23 @@ # Contributor: Leonardo Arena <rnalrd@alpinelinux.org> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=util-linux -pkgver=2.28.2 +pkgver=2.30.1 case $pkgver in *.*.*) _v=${pkgver%.*};; *.*) _v=$pkgver;; esac -pkgrel=2 +pkgrel=0 pkgdesc="Random collection of Linux utilities" url="http://git.kernel.org/cgit/utils/util-linux/util-linux.git" arch="all" license="GPL2 GPL2+ LGPL2+ BSD Public Domain" depends="findmnt" -# use GNU sed til bb sed is fixed. Also GNU tar is needed -makedepends_build="sed tar autoconf automake libtool" +makedepends_build="autoconf automake libtool" makedepends_host="zlib-dev ncurses-dev linux-headers libcap-ng-dev" -install= options="suid" source="http://www.kernel.org/pub/linux/utils/$pkgname/v${_v}/$pkgname-$pkgver.tar.xz - libblkid-reduce-probing-area-for-crazy-CDROMs.patch ttydefaults.h " subpackages="$pkgname-doc $pkgname-dev $pkgname-bash-completion:bashcomp:noarch @@ -38,7 +35,7 @@ replaces="e2fsprogs util-linux-ng" builddir="$srcdir/$pkgname-$pkgver" prepare() { - default_prepare || return 1 + default_prepare cd "$builddir" cp "$srcdir"/ttydefaults.h include/ @@ -56,7 +53,6 @@ build() { --with-sysroot=$CBUILDROOT \ --prefix=/usr \ --enable-raw \ - --with-ncurses \ --disable-uuidd \ --disable-nls \ --disable-tls \ @@ -65,14 +61,12 @@ build() { --disable-last \ --disable-sulogin \ --disable-su \ - $_bootstrap_config \ - || return 1 - make || return 1 + $_bootstrap_config + make } package() { - make -j1 DESTDIR="$pkgdir" \ - -C "$builddir" install || return 1 + make -j1 DESTDIR="$pkgdir" -C "$builddir" install # use pkg-config } @@ -82,68 +76,68 @@ dev() { } bashcomp() { - depends="" pkgdesc="Bash completions for $pkgname" + depends="" install_if="$pkgname=$pkgver-r$pkgrel bash-completion" mkdir -p "$subpkgdir"/usr/share/ mv "$pkgdir"/usr/share/bash-completion \ - "$subpkgdir"/usr/share/ || return 1 + "$subpkgdir"/usr/share/ } blkid() { pkgdesc="block device identification tool" + depends="" replaces="util-linux-ng" - depends= mkdir -p "$subpkgdir"/sbin mv "$pkgdir"/sbin/blkid "$subpkgdir"/sbin/ } libuuid() { pkgdesc="DCE compatible Universally Unique Identifier library" - depends= + depends="" mkdir -p "$subpkgdir"/lib mv "$pkgdir"/lib/libuuid* "$subpkgdir"/lib/ } libblkid() { pkgdesc="Block device identification library from util-linux" - depends= + depends="" mkdir -p "$subpkgdir"/lib mv "$pkgdir"/lib/libblkid* "$subpkgdir"/lib/ } libmount() { pkgdesc="Block device identification library from util-linux" - depends= + depends="" mkdir -p "$subpkgdir"/lib mv "$pkgdir"/lib/libmount.so.* "$subpkgdir"/lib/ } libsmartcols() { pkgdesc="Formatting library for ls-like programs." - depends= + depends="" mkdir -p "$subpkgdir"/lib mv "$pkgdir"/lib/libsmartcols.so.* "$subpkgdir"/lib/ } libfdisk() { pkgdesc="Partitioning library for fdisk-like programs" - depends= + depends="" mkdir -p "$subpkgdir"/lib mv "$pkgdir"/lib/libfdisk.so.* "$subpkgdir"/lib/ } sfdisk() { pkgdesc="Partition table manipulator from util-linux" - depends= + depends="" mkdir -p "$subpkgdir"/sbin mv "$pkgdir"/sbin/sfdisk "$subpkgdir"/sbin/ } cfdisk() { pkgdesc="Curses based partition table manipulator from util-linux" - depends= + depends="" mkdir -p "$subpkgdir"/sbin mv "$pkgdir"/sbin/cfdisk "$subpkgdir"/sbin/ } @@ -164,8 +158,8 @@ setpriv() { _findmnt() { pkgdesc="findmnt from util-linux" - replaces="" depends="" + replaces="" mkdir -p "$subpkgdir"/bin mv "$pkgdir"/bin/findmnt "$subpkgdir"/bin } @@ -176,12 +170,5 @@ _py() { mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/ } -md5sums="46a232a37bce45371a86d19300edc47a util-linux-2.28.2.tar.xz -ee12cce6423e6f7ea4c9c438989e77d7 libblkid-reduce-probing-area-for-crazy-CDROMs.patch -6196f1ce853dfaf717569c1e35555d6d ttydefaults.h" -sha256sums="b89d37146f20bede93a42c847bce881a17e6dbd8066ff2db2bee733fa409f0cd util-linux-2.28.2.tar.xz -12b6434a229d08c81f45735cac50e9003908f3ad974c59cec93ddf57700077f3 libblkid-reduce-probing-area-for-crazy-CDROMs.patch -46faf1198bd884d12c5d45019a5fec8dfdefeae6721d8c9f3da89921acdb2a6d ttydefaults.h" -sha512sums="ac1c2d4c92bbc4eabed464cb0334c1d9b21e58df0f07f0b26e7adcfa188879de8632d195b65a4358c5e11e14ac6e09a1c6206265bbf1fab4ce122414bee7e940 util-linux-2.28.2.tar.xz -ec27d4227f7e0f08198ecf00f4c7da379ed588eb05835c318322bec26841868e51337c5710706237a7a3358aa0db6d4514c8f2444d02b2bd800f1c7f9e9570c2 libblkid-reduce-probing-area-for-crazy-CDROMs.patch +sha512sums="bcf1807198660c133c380e13d6ba5dcdb7470c47bcaeea03ccc5a78a0d834e3df3d13ae5ffc35fd7f8fff7ba062629d4b1f5cde78452b846c9315c51c9e108f5 util-linux-2.30.1.tar.xz 876bb9041eca1b2cca1e9aac898f282db576f7860aba690a95c0ac629d7c5b2cdeccba504dda87ff55c2a10b67165985ce16ca41a0694a267507e1e0cafd46d9 ttydefaults.h" diff --git a/main/util-linux/libblkid-reduce-probing-area-for-crazy-CDROMs.patch b/main/util-linux/libblkid-reduce-probing-area-for-crazy-CDROMs.patch deleted file mode 100644 index 66d50082c0..0000000000 --- a/main/util-linux/libblkid-reduce-probing-area-for-crazy-CDROMs.patch +++ /dev/null @@ -1,85 +0,0 @@ -From bfebe74e3babe8c188a51269acc2673f1aea283f Mon Sep 17 00:00:00 2001 -From: Karel Zak <kzak@redhat.com> -Date: Tue, 19 Apr 2016 12:39:05 +0200 -Subject: [PATCH] libblkid: reduce probing area for crazy CDROMs - -Linux kernel reports devices greater than area readable by read(2). -The readable area is usually 2-3 CD blocks smaller (CD block is -2048-bytes) than size returned by BLKGETSIZE. This patch checks for -this issues to avoid I/O errors in probing functions. - -Reported-by: Thomas Schmitt <scdbackup@gmx.net> -Signed-off-by: Karel Zak <kzak@redhat.com> ---- - libblkid/src/probe.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 49 insertions(+), 1 deletion(-) - -diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c -index 0c8625c..0455c37 100644 ---- a/libblkid/src/probe.c -+++ b/libblkid/src/probe.c -@@ -752,6 +752,51 @@ int blkid_probe_is_cdrom(blkid_probe pr) - return pr && (pr->flags & BLKID_FL_CDROM_DEV); - } - -+static int is_sector_readable(int fd, uint64_t sector) -+{ -+ char buf[512]; -+ ssize_t sz; -+ -+ if (blkid_llseek(fd, sector * 512, SEEK_SET) < 0) -+ goto failed; -+ -+ sz = read(fd, buf, sizeof(buf)); -+ if (sz != (ssize_t) sizeof(buf)) -+ goto failed; -+ -+ return 1; -+failed: -+ DBG(LOWPROBE, ul_debug("CDROM: read sector %ju failed %m", sector)); -+ errno = 0; -+ return 0; -+} -+ -+/* -+ * Linux kernel reports (BLKGETSIZE) cdrom device size greater than area -+ * readable by read(2). We have to reduce the probing area to avoid unwanted -+ * I/O errors in probing functions. It seems that unreadable are always last 2 -+ * or 3 CD blocks (CD block size is 2048 bytes, it means 12 in 512-byte -+ * sectors). -+ */ -+static void cdrom_size_correction(blkid_probe pr) -+{ -+ uint64_t n, nsectors = pr->size >> 9; -+ -+ for (n = nsectors - 12; n < nsectors; n++) { -+ if (!is_sector_readable(pr->fd, n)) -+ goto failed; -+ } -+ -+ DBG(LOWPROBE, ul_debug("CDROM: full size available")); -+ return; -+failed: -+ /* 'n' is the failed sector, reduce device size to n-1; */ -+ DBG(LOWPROBE, ul_debug("CDROM: reduce size from %ju to %ju.", -+ (uintmax_t) pr->size, -+ (uintmax_t) (n - 1) << 9)); -+ pr->size = n << 9; -+} -+ - /** - * blkid_probe_set_device: - * @pr: probe -@@ -844,8 +889,11 @@ int blkid_probe_set_device(blkid_probe pr, int fd, - else if (S_ISBLK(sb.st_mode) && - !blkid_probe_is_tiny(pr) && - blkid_probe_is_wholedisk(pr) && -- ioctl(fd, CDROM_GET_CAPABILITY, NULL) >= 0) -+ ioctl(fd, CDROM_GET_CAPABILITY, NULL) >= 0) { -+ - pr->flags |= BLKID_FL_CDROM_DEV; -+ cdrom_size_correction(pr); -+ } - #endif - - DBG(LOWPROBE, ul_debug("ready for low-probing, offset=%"PRIu64", size=%"PRIu64"", |