From 10dd4f52155982f8ccc556ac812658f44fb7b3c4 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Fri, 3 Jun 2016 12:54:10 -0700 Subject: [PATCH] backport fix for #1327337 (growpart fail with newer util-linux-ng) --- ...-of-partx-for-newer-util-linux-versi.patch | 27 +++++++++++++++++++ cloud-utils.spec | 10 ++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 0001-growpart-fix-use-of-partx-for-newer-util-linux-versi.patch diff --git a/0001-growpart-fix-use-of-partx-for-newer-util-linux-versi.patch b/0001-growpart-fix-use-of-partx-for-newer-util-linux-versi.patch new file mode 100644 index 0000000..0ea9bc8 --- /dev/null +++ b/0001-growpart-fix-use-of-partx-for-newer-util-linux-versi.patch @@ -0,0 +1,27 @@ +From ea2e255eeefe691828fee8055e9ebed816109acc Mon Sep 17 00:00:00 2001 +From: Lars Kellogg-Stedman +Date: Wed, 1 Jun 2016 12:37:40 -0400 +Subject: [PATCH] growpart: fix use of partx for newer util-linux versions + +prevent errors with recent versions (2.28) versions of partx (still +works with earlier versions as well). +--- + bin/growpart | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bin/growpart b/bin/growpart +index 85c2d1f..fd97a10 100755 +--- a/bin/growpart ++++ b/bin/growpart +@@ -498,7 +498,7 @@ pt_update() { + if ! $update; then + return 0 + fi +- partx --update "$part" "$dev" ++ partx --update --nr "$part" "$dev" + } + + has_cmd() { +-- +2.7.4 + diff --git a/cloud-utils.spec b/cloud-utils.spec index d4c2fc0..337dac2 100644 --- a/cloud-utils.spec +++ b/cloud-utils.spec @@ -1,7 +1,7 @@ Summary: Cloud image management utilities Name: cloud-utils Version: 0.27 -Release: 15%{?dist} +Release: 16%{?dist} License: GPLv3 Group: System Environment/Base URL: https://launchpad.net/cloud-utils/trunk/0.27/+download/cloud-utils-0.27.tar.gz @@ -10,6 +10,10 @@ Source0: %{name}-%{version}.tar.gz Source1: LICENSE Patch0: 0001-supress-partx-usage-error.patch Patch1: 0002-Support-new-sfdisk-version-2.26.patch +# backport of upstream rev 291, fixes RHBZ #1327337 (failed growpart +# with newer util-linux-ng) +# https://bazaar.launchpad.net/~cloud-utils-dev/cloud-utils/trunk/revision/291 +Patch2: 0001-growpart-fix-use-of-partx-for-newer-util-linux-versi.patch # Don't build the cloud-utils main package on EPEL architectures that don't # have qemu-img. Which means we need to make it a no-noarch package for EPEL @@ -69,6 +73,7 @@ package to grow the root partition on first boot. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build @@ -126,6 +131,9 @@ cp man/growpart.* $RPM_BUILD_ROOT/%{_mandir}/man1/ %changelog +* Fri Jun 03 2016 Adam Williamson - 0.27-16 +- backport fix for RHBZ #1327337 (growpart fail with newer util-linux-ng) + * Wed Feb 03 2016 Fedora Release Engineering - 0.27-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild