2014-03-17 18:57:17 +01:00
|
|
|
#
|
2016-09-13 22:58:48 +02:00
|
|
|
# spec file for package growpart
|
2014-03-17 18:57:17 +01:00
|
|
|
#
|
2018-01-23 14:48:13 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2014-03-17 18:57:17 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2016-09-13 22:58:48 +02:00
|
|
|
|
2018-01-24 18:16:59 +01:00
|
|
|
%define base_version 0.30
|
2014-03-17 18:57:17 +01:00
|
|
|
Name: growpart
|
2018-01-24 18:16:59 +01:00
|
|
|
Version: %{base_version}
|
2014-03-17 18:57:17 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Grow a partition
|
2018-04-04 13:56:23 +02:00
|
|
|
License: GPL-3.0-only
|
2014-03-18 21:38:17 +01:00
|
|
|
Group: System/Management
|
2016-09-13 22:58:48 +02:00
|
|
|
Url: http://launchpad.net/cloud-utils
|
2018-01-24 18:16:59 +01:00
|
|
|
Source0: cloud-utils-%{base_version}.tar.gz
|
2018-01-23 14:48:13 +01:00
|
|
|
Source1: rootgrow
|
|
|
|
Source2: rootgrow.service
|
2014-03-18 21:38:17 +01:00
|
|
|
Patch: licenseGPLv3.patch
|
2014-03-17 18:57:17 +01:00
|
|
|
Requires: util-linux
|
2018-01-23 14:48:13 +01:00
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} > 1220
|
2014-03-17 18:57:17 +01:00
|
|
|
Requires: gptfdisk
|
|
|
|
%endif
|
2016-09-13 22:58:48 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2014-03-17 18:57:17 +01:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description
|
|
|
|
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.
|
|
|
|
|
2018-01-24 18:16:59 +01:00
|
|
|
%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
|
|
|
|
|
2014-03-17 18:57:17 +01:00
|
|
|
%prep
|
2018-01-24 18:16:59 +01:00
|
|
|
%setup -q -n cloud-utils-%{base_version}
|
2014-03-18 21:38:17 +01:00
|
|
|
%patch -p1
|
2014-03-17 18:57:17 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p %{buildroot}/%{_mandir}/man1
|
2018-01-23 14:48:13 +01:00
|
|
|
mkdir -p %{buildroot}/%{_sbindir}
|
2014-03-17 18:57:17 +01:00
|
|
|
cp bin/growpart %{buildroot}/%{_sbindir}
|
|
|
|
cp man/growpart.1 %{buildroot}/%{_mandir}/man1
|
2018-01-23 14:48:13 +01:00
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} > 1220
|
|
|
|
mkdir -p %{buildroot}/usr/lib/systemd/system
|
|
|
|
cp %SOURCE1 %{buildroot}/%{_sbindir}
|
|
|
|
cp %SOURCE2 %{buildroot}/usr/lib/systemd/system
|
2018-01-23 15:40:21 +01:00
|
|
|
chmod 755 %{buildroot}/%{_sbindir}/rootgrow
|
2018-01-23 14:48:13 +01:00
|
|
|
%endif
|
2014-03-17 18:57:17 +01:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
2018-04-04 13:56:23 +02:00
|
|
|
%license LICENSE-GPLv3
|
2014-03-17 18:57:17 +01:00
|
|
|
%{_sbindir}/growpart
|
|
|
|
%{_mandir}/man1/*
|
2018-01-24 18:16:59 +01:00
|
|
|
|
2018-01-23 14:48:13 +01:00
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} > 1220
|
2018-01-24 18:16:59 +01:00
|
|
|
%files rootgrow
|
|
|
|
%defattr(-,root,root,-)
|
2018-01-23 14:48:13 +01:00
|
|
|
%{_sbindir}/rootgrow
|
|
|
|
/usr/lib/systemd/system/rootgrow.service
|
|
|
|
%endif
|
2014-03-17 18:57:17 +01:00
|
|
|
|
|
|
|
%changelog
|