- 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
This commit is contained in:
Robert Schweikert 2018-01-24 17:16:59 +00:00 committed by Git OBS Bridge
parent 61cd2ed987
commit eac27c0ffc
2 changed files with 30 additions and 8 deletions

View File

@ -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

View File

@ -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