backport fix for #1327337 (growpart fail with newer util-linux-ng)

This commit is contained in:
Adam Williamson 2016-06-03 12:54:10 -07:00
parent 307a7dd6d5
commit 10dd4f5215
2 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,27 @@
From ea2e255eeefe691828fee8055e9ebed816109acc Mon Sep 17 00:00:00 2001
From: Lars Kellogg-Stedman <lars@redhat.com>
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

View File

@ -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 <awilliam@redhat.com> - 0.27-16
- backport fix for RHBZ #1327337 (growpart fail with newer util-linux-ng)
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.27-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild