Skip to content
Snippets Groups Projects
Commit 4880c9b9 authored by Dermot Bradley's avatar Dermot Bradley Committed by Leo
Browse files

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.
parent 3bcc87c3
No related branches found
No related tags found
No related merge requests found
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"
}
......@@ -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"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment