aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDermot Bradley <dermot_bradley@yahoo.com>2020-11-12 17:55:41 +0000
committerLeo <thinkabit.ukim@gmail.com>2020-11-12 23:35:27 +0000
commit4880c9b99dbc45d4ff7d972921cd32f36d22ccdb (patch)
tree9aaf9b701c1b82a345ef6385368d160b2855a30f
parent3bcc87c39bb83cb02b4c7ff49b4184c0e4a2add9 (diff)
downloadaports-4880c9b99dbc45d4ff7d972921cd32f36d22ccdb.tar.gz
aports-4880c9b99dbc45d4ff7d972921cd32f36d22ccdb.tar.bz2
aports-4880c9b99dbc45d4ff7d972921cd32f36d22ccdb.tar.xz
community/cloud-utils: make -growpart subpackage depend on partx
Partx was moved out of the main util-linux and into a subpackage therefore cloud-utils-growpart's dependency for util-linux needs to be changed to partx instead. Also remove cloud-utils-growpart dependency on coreutils and add patch growpart to use a flock command-line option that is understood by both util-linux and bosybox's flock command.
-rw-r--r--community/cloud-utils/03-growpart-flock.patch23
-rwxr-xr-xcommunity/cloud-utils/APKBUILD9
2 files changed, 28 insertions, 4 deletions
diff --git a/community/cloud-utils/03-growpart-flock.patch b/community/cloud-utils/03-growpart-flock.patch
new file mode 100644
index 0000000000..fe84424e75
--- /dev/null
+++ b/community/cloud-utils/03-growpart-flock.patch
@@ -0,0 +1,23 @@
+From: Dermot Bradley <dermot_bradley@yahoo.com>
+Date: Thu, 12 Nov 2020 14:05 +0000
+Subject: [PATCH] cloud-utils: Make growpart call to flock work with Busybox
+
+Change growpart's to call the flock command using the short option "-x"
+rather than the long option "--exclusive" as the short option works with
+both util-linux's flock as well as Busybox's flock. This means that the
+cloud-utils-growpart package can have the util-linux dependency removed.
+
+---
+
+diff -aur a/bin/growpart b/bin/growpart
+--- a/bin/growpart
++++ b/bin/growpart
+@@ -162,7 +162,7 @@
+ # Do not use --nonblock or --timeout as udev may be already processing
+ # the disk and we must wait until it has released the disk to
+ # proceed. Failure to obtain exclusive lock is fatal to growpart.
+- rq flock flock --exclusive $FLOCK_DISK_FD ||
++ rq flock flock -x $FLOCK_DISK_FD ||
+ fail "Error while obtaining exclusive lock on $DISK"
+ debug 1 "FLOCK: $disk: obtained exclusive lock"
+ }
diff --git a/community/cloud-utils/APKBUILD b/community/cloud-utils/APKBUILD
index 843f56cd10..e5c3a6ebc4 100755
--- a/community/cloud-utils/APKBUILD
+++ b/community/cloud-utils/APKBUILD
@@ -3,7 +3,7 @@
# Maintainer: Dermot Bradley <dermot_bradley@yahoo.com>
pkgname=cloud-utils
pkgver=0.32
-pkgrel=1
+pkgrel=2
pkgdesc="Utilities for interacting with cloud VM images"
url="https://launchpad.net/cloud-utils/"
arch="noarch !mips !mips64 !s390x" # tests are broken on big-endian
@@ -25,6 +25,7 @@ subpackages="$pkgname-doc $pkgname-ec2metadata $pkgname-growpart"
source="cloud-utils-$pkgver.tar.gz::https://github.com/canonical/cloud-utils/archive/$pkgver.tar.gz
01-minor-corrections.patch
02-make-udev-optional.patch
+ 03-growpart-flock.patch
"
build() {
@@ -66,13 +67,13 @@ growpart() {
pkgdesc="Grow the size of disk partitions"
depends="
blkid
- coreutils
+ partx
sfdisk
- util-linux
"
amove usr/bin/growpart
}
sha512sums="62bc07759c9c74397cd16a6a0781efb50803efc9f59969e16943fcab0d73ef96966c6abfe21edd17c15ac96dbffaaffa594b3abc0d3fab23102d2d6e7f380a7d cloud-utils-0.32.tar.gz
0efa8170b41cb5b6799fda9de3d3054aab1f765dfc46d1bada11edb103797ddd8153582dbfa1b4c22fd088d4cbf3a1f0729ff708f128d899645f988a8bc4c35e 01-minor-corrections.patch
-83275289265f9a754bc49262133c3cbb42683f42e58de05fc446e9411be457f012edad7058325bbaae2ba8aa7fb7e42698df94f28682b0869d7f15956bde8f2a 02-make-udev-optional.patch"
+83275289265f9a754bc49262133c3cbb42683f42e58de05fc446e9411be457f012edad7058325bbaae2ba8aa7fb7e42698df94f28682b0869d7f15956bde8f2a 02-make-udev-optional.patch
+2a3802364f46c3144d06736dc5719378e6e7bd8635e2a625387d4b5ad0f9e8d1e76c3e9bccd3b87a224e3b8a6563cb4c61f41be6d4c3fc23780f538d56b733b4 03-growpart-flock.patch"