aboutsummaryrefslogtreecommitdiffstats
path: root/main/apk-tools
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2017-10-10 10:41:21 +0000
committerTimo Teräs <timo.teras@iki.fi>2017-10-10 10:41:21 +0000
commit0e504ac58e35f837c468884de7bd4d5d005acd66 (patch)
treeeb2caae3e20e38ec105b8ffd15814e3125346054 /main/apk-tools
parent7ced4e7ce4d24dc07f62e593e09762c2f77cd778 (diff)
downloadaports-0e504ac58e35f837c468884de7bd4d5d005acd66.tar.bz2
aports-0e504ac58e35f837c468884de7bd4d5d005acd66.tar.xz
main/apk-tools: fix mounting proc (fixes #7162)
Diffstat (limited to 'main/apk-tools')
-rw-r--r--main/apk-tools/0001-db-handle-default-root-correctly-for-proc.patch28
-rw-r--r--main/apk-tools/APKBUILD6
2 files changed, 32 insertions, 2 deletions
diff --git a/main/apk-tools/0001-db-handle-default-root-correctly-for-proc.patch b/main/apk-tools/0001-db-handle-default-root-correctly-for-proc.patch
new file mode 100644
index 0000000000..44ebd8df8f
--- /dev/null
+++ b/main/apk-tools/0001-db-handle-default-root-correctly-for-proc.patch
@@ -0,0 +1,28 @@
+From 97e4d0531f2633b54996fc08447bb46449f4a45a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Tue, 10 Oct 2017 11:38:07 +0300
+Subject: [PATCH] db: handle default root correctly for /proc
+
+dbopts->root may be null; use db->root instead
+
+fixes #7162
+---
+ src/database.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/database.c b/src/database.c
+index 12f1d16..a35bab2 100644
+--- a/src/database.c
++++ b/src/database.c
+@@ -1581,7 +1581,7 @@ int apk_db_open(struct apk_database *db, struct apk_db_options *dbopts)
+ apk_blob_to_file(db->root_fd, apk_arch_file, *db->arch, APK_BTF_ADD_EOL);
+
+ /* mount /proc */
+- if (asprintf(&db->root_proc_dir, "%s/proc", dbopts->root) == -1)
++ if (asprintf(&db->root_proc_dir, "%s/proc", db->root) == -1)
+ goto ret_errno;
+ if (statfs(db->root_proc_dir, &stfs) != 0) {
+ if (errno == ENOENT) mkdir(db->root_proc_dir, 0555);
+--
+2.14.2
+
diff --git a/main/apk-tools/APKBUILD b/main/apk-tools/APKBUILD
index 90f5bb1aa5..862aab4119 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.8.0
-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-db-handle-default-root-correctly-for-proc.patch
"
url="http://git.alpinelinux.org/cgit/apk-tools/"
@@ -82,4 +83,5 @@ luaapk() {
mv "$pkgdir"/usr/lib "$subpkgdir"/usr/lib/
}
-sha512sums="dc23d83bf8faeacb17426792b1c25c9540dd8379015f2be729dc03c4b65e6ed4463eb879e0f0e72fc36a1185d56fdd3c4fbb13476fe8d7cb415f1730362ac718 apk-tools-2.8.0.tar.xz"
+sha512sums="dc23d83bf8faeacb17426792b1c25c9540dd8379015f2be729dc03c4b65e6ed4463eb879e0f0e72fc36a1185d56fdd3c4fbb13476fe8d7cb415f1730362ac718 apk-tools-2.8.0.tar.xz
+48e4b95fc11df29e721f4cc51f14802bf5acfd54cd5b6754b544a0e6846e6d7272719ef028c9e4ba54eeb70f9b7e846cd4db936595392d35e9c5fde2d837ad36 0001-db-handle-default-root-correctly-for-proc.patch"