5ac25ecc09
Signed-off-by: Ondrej Mosnáček <omosnacek@gmail.com>
116 lines
2.7 KiB
RPMSpec
116 lines
2.7 KiB
RPMSpec
Summary: Cloud image management utilities
|
|
Name: cloud-utils
|
|
Version: 0.31
|
|
Release: %autorelease
|
|
License: GPLv3
|
|
URL: https://launchpad.net/cloud-utils/
|
|
|
|
Source0: https://launchpad.net/%{name}/trunk/0.31/+download/%{name}-%{version}.tar.gz
|
|
|
|
# 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
|
|
# for this to work properly.
|
|
%define BuildMainPackage 1
|
|
%if 0%{?rhel}
|
|
# don't build debuginfo packages
|
|
%global debug_package %{nil}
|
|
%ifarch i686 ppc64
|
|
%define BuildMainPackage 0
|
|
%endif
|
|
%else
|
|
BuildArch: noarch
|
|
%endif
|
|
|
|
Requires: %{name}-growpart
|
|
Requires: gawk
|
|
Requires: e2fsprogs
|
|
Requires: file
|
|
Requires: python3
|
|
Requires: qemu-img
|
|
Requires: util-linux
|
|
|
|
%description
|
|
This package provides a useful set of utilities for managing cloud images.
|
|
|
|
The tasks associated with image bundling are often tedious and repetitive. The
|
|
cloud-utils package provides several scripts that wrap the complicated tasks
|
|
with a much simpler interface.
|
|
|
|
|
|
%package growpart
|
|
Summary: Script for growing a partition
|
|
|
|
Requires: gawk
|
|
# gdisk is only required for resizing GPT partitions and depends on libicu
|
|
# (25MB). We don't make this a hard requirement to save some space in non-GPT
|
|
# systems.
|
|
Recommends: gdisk
|
|
Requires: util-linux
|
|
|
|
|
|
%description growpart
|
|
This package provides the growpart script for growing a partition. It is
|
|
primarily used in cloud images in conjunction with the dracut-modules-growroot
|
|
package to grow the root partition on first boot.
|
|
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%build
|
|
|
|
%install
|
|
|
|
# Create the target directories
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
mkdir -p %{buildroot}%{_mandir}/man1
|
|
|
|
%if %{BuildMainPackage}
|
|
# Install binaries and manpages
|
|
cp bin/* %{buildroot}%{_bindir}/
|
|
cp man/* %{buildroot}%{_mandir}/man1/
|
|
|
|
# Exclude Ubuntu-specific tools
|
|
rm %{buildroot}%{_bindir}/*ubuntu*
|
|
|
|
# Exclude the cloud-run-instances manpage
|
|
rm -f %{buildroot}%{_mandir}/man1/cloud-run-instances.*
|
|
|
|
# Exclude euca2ools wrappers and manpages
|
|
rm -f %{buildroot}%{_bindir}/cloud-publish-*
|
|
rm -f %{buildroot}%{_mandir}/man1/cloud-publish-*
|
|
%endif
|
|
|
|
# Install the growpart binary and man page
|
|
cp bin/growpart %{buildroot}%{_bindir}/
|
|
cp man/growpart.* %{buildroot}%{_mandir}/man1/
|
|
|
|
|
|
# Files for the main package
|
|
%if %{BuildMainPackage}
|
|
%files
|
|
%doc ChangeLog
|
|
%license LICENSE
|
|
%{_bindir}/cloud-localds
|
|
%{_bindir}/write-mime-multipart
|
|
%{_bindir}/ec2metadata
|
|
%{_bindir}/resize-part-image
|
|
%{_bindir}/mount-image-callback
|
|
%{_bindir}/vcs-run
|
|
%doc %{_mandir}/man1/resize-part-image.*
|
|
%doc %{_mandir}/man1/write-mime-multipart.*
|
|
%doc %{_mandir}/man1/cloud-localds.*
|
|
%endif
|
|
|
|
|
|
# Files for the growpart subpackage
|
|
%files growpart
|
|
%doc ChangeLog
|
|
%license LICENSE
|
|
%{_bindir}/growpart
|
|
%doc %{_mandir}/man1/growpart.*
|
|
|
|
|
|
%changelog
|
|
%autochangelog
|