diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-09-11 16:22:26 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-09-11 16:22:26 +0200 |
commit | 30580398fe06702e40d33e6bd83d1892a4259d2d (patch) | |
tree | f9451ab79cae0c7f902626b26435a6511a313fcb /main | |
parent | bad83d46aa352cdc3c2b584b6f4d48e9d602ba83 (diff) | |
download | aports-30580398fe06702e40d33e6bd83d1892a4259d2d.tar.bz2 aports-30580398fe06702e40d33e6bd83d1892a4259d2d.tar.xz |
main/apk-tools: fix apk fetch --stdout
Diffstat (limited to 'main')
-rw-r--r-- | main/apk-tools/0001-io-fix-posix_fallocate-failure-handling.patch | 27 | ||||
-rw-r--r-- | main/apk-tools/APKBUILD | 12 |
2 files changed, 35 insertions, 4 deletions
diff --git a/main/apk-tools/0001-io-fix-posix_fallocate-failure-handling.patch b/main/apk-tools/0001-io-fix-posix_fallocate-failure-handling.patch new file mode 100644 index 0000000000..662d40b1ca --- /dev/null +++ b/main/apk-tools/0001-io-fix-posix_fallocate-failure-handling.patch @@ -0,0 +1,27 @@ +From 19356dfbd6b3e7d4880d29b1f4b5c0cb665eb467 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Fri, 11 Sep 2015 16:16:26 +0200 +Subject: [PATCH] io: fix posix_fallocate failure handling + +We need fall back to a splice buffer if posix_fallocate call fails due +to file being a device (eg tty) or a pipe. This fixes apk fetch --stdout. +--- + src/io.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/io.c b/src/io.c +index a321c0c..65851be 100644 +--- a/src/io.c ++++ b/src/io.c +@@ -149,7 +149,7 @@ size_t apk_istream_splice(void *stream, int fd, size_t size, + if (r == 0) + mmapbase = mmap(NULL, size, PROT_READ | PROT_WRITE, + MAP_SHARED, fd, 0); +- else if (r != ENOSYS) ++ else if (r == EBADF || r == EFBIG || r == ENOSPC || r == EIO) + return -r; + } + if (bufsz > 2*1024*1024) +-- +2.5.1 + diff --git a/main/apk-tools/APKBUILD b/main/apk-tools/APKBUILD index 1f4ce1324a..2d3c43a15f 100644 --- a/main/apk-tools/APKBUILD +++ b/main/apk-tools/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=apk-tools pkgver=2.6.4 -pkgrel=0 +pkgrel=1 pkgdesc="Alpine Package Keeper - package manager for alpine" subpackages="$pkgname-static" depends= @@ -13,6 +13,7 @@ if [ "$CBUILD" = "$CHOST" ]; then makedepends="$makedepends lua5.2-dev" fi source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.xz + 0001-io-fix-posix_fallocate-failure-handling.patch " url="http://git.alpinelinux.org/cgit/apk-tools/" @@ -82,6 +83,9 @@ luaapk() { mv "$pkgdir"/usr/lib "$subpkgdir"/usr/lib/ } -md5sums="14585ea5607a755beb57512261afd318 apk-tools-2.6.4.tar.xz" -sha256sums="0c0f7e87d8241953ba06ab84d1dc82ad119bfb17b365c6a44cdd51bac3ab429c apk-tools-2.6.4.tar.xz" -sha512sums="cf7327d283af8c1ac00632cccc8f607cad8cf4a5118c07b2d258214c55d64126c8c336b7c3619c4fd7e5bb06841c33c92b4a298e51c86459eef6919663de3cf4 apk-tools-2.6.4.tar.xz" +md5sums="14585ea5607a755beb57512261afd318 apk-tools-2.6.4.tar.xz +0616bb34e33a101637669d14086077ca 0001-io-fix-posix_fallocate-failure-handling.patch" +sha256sums="0c0f7e87d8241953ba06ab84d1dc82ad119bfb17b365c6a44cdd51bac3ab429c apk-tools-2.6.4.tar.xz +863e9af2d8f14c63e06c76d11dfaf3e4fa941d22d471b35c5901dafef21721e5 0001-io-fix-posix_fallocate-failure-handling.patch" +sha512sums="cf7327d283af8c1ac00632cccc8f607cad8cf4a5118c07b2d258214c55d64126c8c336b7c3619c4fd7e5bb06841c33c92b4a298e51c86459eef6919663de3cf4 apk-tools-2.6.4.tar.xz +9aaf5f3f83ed4012a49ff458cdc040318a734992d2754eac034f2bbeaccc5c2f9797240675346581248b1ce0bdf3b2a8c59deb19bf770eb4d6537864e6c6ced1 0001-io-fix-posix_fallocate-failure-handling.patch" |