From eac27c0ffc3a997c6be6a0d285ef6a4d5c7bb6d504e83d1916a037fbb07cc006 Mon Sep 17 00:00:00 2001 From: Robert Schweikert Date: Wed, 24 Jan 2018 17:16:59 +0000 Subject: [PATCH] - Split rootgrow and script and service into subpackage to retain dependency chain for growpart OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/growpart?expand=0&rev=9 --- growpart.changes | 6 ++++++ growpart.spec | 32 ++++++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/growpart.changes b/growpart.changes index 5858182..5c311dd 100644 --- a/growpart.changes +++ b/growpart.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jan 24 17:15:46 UTC 2018 - rjschwei@suse.com + +- Split rootgrow and script and service into subpackage to retain + dependency chain for growpart + ------------------------------------------------------------------- Mon Jan 22 21:12:33 UTC 2018 - rjschwei@suse.com diff --git a/growpart.spec b/growpart.spec index e917233..552f75b 100644 --- a/growpart.spec +++ b/growpart.spec @@ -16,25 +16,21 @@ # +%define base_version 0.30 Name: growpart -Version: 0.30 +Version: %{base_version} Release: 0 Summary: Grow a partition License: GPL-3.0 Group: System/Management Url: http://launchpad.net/cloud-utils -Source0: cloud-utils-%{version}.tar.gz +Source0: cloud-utils-%{base_version}.tar.gz Source1: rootgrow Source2: rootgrow.service Patch: licenseGPLv3.patch Requires: util-linux %if 0%{?suse_version} && 0%{?suse_version} > 1220 Requires: gptfdisk -Requires: python3 -Requires: systemd -# pkg-config is needed to find correct systemd unit dir -BuildRequires: pkg-config -BuildRequires: systemd %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -44,8 +40,25 @@ Grow a partition. This is predominantly useful in the cloud when an instance is started with a larger root partition than the image size. The root partition can be expanded to take up the additional size. +%if 0%{?suse_version} && 0%{?suse_version} > 1220 +%package rootgrow +Version: 1.0.0 +Release: 0 +Summary: Resize root partition +Group: System/Management +Requires: growpart +Requires: python3 +Requires: systemd +# pkg-config is needed to find correct systemd unit dir +BuildRequires: pkg-config +BuildRequires: systemd + +%description rootgrow +Provides as script and service togrow the root partition +%endif + %prep -%setup -q -n cloud-utils-%{version} +%setup -q -n cloud-utils-%{base_version} %patch -p1 %build @@ -70,7 +83,10 @@ rm -rf $RPM_BUILD_ROOT %doc LICENSE-GPLv3 %{_sbindir}/growpart %{_mandir}/man1/* + %if 0%{?suse_version} && 0%{?suse_version} > 1220 +%files rootgrow +%defattr(-,root,root,-) %{_sbindir}/rootgrow /usr/lib/systemd/system/rootgrow.service %endif