a9a20d0
Summary:	Cloud image management utilities
a9a20d0
Name:		cloud-utils
a9a20d0
Version:	0.27
ba47b7e
Release:	10%{?dist}
a9a20d0
License:	GPLv3
a9a20d0
Group:		System Environment/Base
11b4602
URL:		https://launchpad.net/cloud-utils/trunk/0.27/+download/cloud-utils-0.27.tar.gz
a9a20d0
11b4602
Source0:	%{name}-%{version}.tar.gz
ba47b7e
Source1:	LICENSE
ba47b7e
Patch0:		0001-supress-partx-usage-error.patch
a9a20d0
96b0eac
# Don't build the cloud-utils main package on EPEL architectures that don't
96b0eac
# have qemu-img. Which means we need to make it a no-noarch package for EPEL
96b0eac
# for this to work properly.
96b0eac
%define BuildMainPackage 1
96b0eac
%if 0%{?rhel}
d78b10a
# don't build debuginfo packages
d78b10a
%global debug_package %{nil}
d78b10a
%ifarch i686 ppc64
96b0eac
%define BuildMainPackage 0
96b0eac
%endif   # %ifarch i386 ppc64
96b0eac
%else   # %if 0%{?rhel}
a9a20d0
BuildArch:	noarch
96b0eac
%endif   # %if 0%{?rhel}
a9a20d0
2e4dd41
Requires:	cloud-utils-growpart
a9a20d0
Requires:	gawk
a9a20d0
Requires:	e2fsprogs
a9a20d0
Requires:	euca2ools
a9a20d0
Requires:	file
a9a20d0
Requires:	python
a9a20d0
Requires:	python-paramiko
a9a20d0
Requires:	qemu-img
a9a20d0
Requires:	util-linux
a9a20d0
a9a20d0
%description
a9a20d0
This package provides a useful set of utilities for managing cloud images.
a9a20d0
a9a20d0
The euca2ools package (a dependency of cloud-utils) provides an Amazon EC2 API
a9a20d0
compatible set of utilities for bundling kernels, ramdisks, and root
a9a20d0
filesystems, and uploading them to either EC2 or UEC.
a9a20d0
a9a20d0
The tasks associated with image bundling are often tedious and repetitive. The
a9a20d0
cloud-utils package provides several scripts that wrap the complicated tasks
a9a20d0
with a much simpler interface.
a9a20d0
a9a20d0
2e4dd41
%package growpart
2e4dd41
Summary:	Script for growing a partition
2e4dd41
Group:		System Environment/Base
2e4dd41
2e4dd41
Requires:	gawk
cdc44f5
# gdisk is only required for resizing GPT partitions and depends on libicu
cdc44f5
# (25MB). We don't make this a hard requirement to save some space in non-GPT
cdc44f5
# systems.
cdc44f5
#Requires:	gdisk
2e4dd41
Requires:	util-linux
2e4dd41
2e4dd41
2e4dd41
%description growpart
2e4dd41
This package provides the growpart script for growing a partition. It is
2e4dd41
primarily used in cloud images in conjunction with the dracut-modules-growroot
2e4dd41
package to grow the root partition on first boot.
2e4dd41
2e4dd41
a9a20d0
%prep
11b4602
%setup -q
ba47b7e
%patch0 -p1
a9a20d0
a9a20d0
a9a20d0
%build
a9a20d0
a9a20d0
a9a20d0
%install
a9a20d0
cp %{SOURCE1} LICENSE
a9a20d0
b54a90e
# Create the target directories
a9a20d0
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
b54a90e
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1
b54a90e
b54a90e
%if %{BuildMainPackage}
b54a90e
# Install binaries and manpages
a9a20d0
cp bin/* $RPM_BUILD_ROOT/%{_bindir}/
b54a90e
cp man/* $RPM_BUILD_ROOT/%{_mandir}/man1/
b54a90e
a9a20d0
# Exclude Ubuntu-specific tools
a9a20d0
rm $RPM_BUILD_ROOT/%{_bindir}/*ubuntu*
b54a90e
%endif   # %if %{BuildMainPackage}
a9a20d0
b54a90e
# Install the growpart binary and man page
b54a90e
cp bin/growpart $RPM_BUILD_ROOT/%{_bindir}/
b54a90e
cp man/growpart.* $RPM_BUILD_ROOT/%{_mandir}/man1/
a9a20d0
a9a20d0
b54a90e
# Files for the main package
b54a90e
%if %{BuildMainPackage}
a9a20d0
%files
a9a20d0
%doc ChangeLog LICENSE
2e4dd41
%{_bindir}/cloud-localds
2e4dd41
%{_bindir}/cloud-publish-tarball
2e4dd41
%{_bindir}/cloud-run-instances
2e4dd41
%{_bindir}/write-mime-multipart
2e4dd41
%{_bindir}/cloud-publish-image
2e4dd41
%{_bindir}/ec2metadata
2e4dd41
%{_bindir}/resize-part-image
2e4dd41
%doc %{_mandir}/man1/cloud-publish-image.*
2e4dd41
%doc %{_mandir}/man1/cloud-publish-tarball.*
2e4dd41
%doc %{_mandir}/man1/cloud-run-instances.*
2e4dd41
%doc %{_mandir}/man1/resize-part-image.*
2e4dd41
%doc %{_mandir}/man1/write-mime-multipart.*
b54a90e
%endif   # %if %{BuildMainPackage}
2e4dd41
2e4dd41
b54a90e
# Files for the growpart subpackage
2e4dd41
%files growpart
2e4dd41
%doc ChangeLog LICENSE
2e4dd41
%{_bindir}/growpart
2e4dd41
%doc %{_mandir}/man1/growpart.*
a9a20d0
a9a20d0
a9a20d0
%changelog
ba47b7e
* Fri Nov 22 2013 Juerg Haefliger <juergh@gmail.com> - 0.27-10
ba47b7e
- [966574] growpart spits out a non-fatal error
ba47b7e
d78b10a
* Fri Aug 16 2013 Juerg Haefliger <juergh@gmail.com> - 0.27-9
d78b10a
- Prevent building of debuginfo packages.
d78b10a
- Fix 32-bit arch type.
d78b10a
96b0eac
* Fri Aug 16 2013 Juerg Haefliger <juergh@gmail.com> - 0.27-8
96b0eac
- Make the package a no-noarch package on EPEL so that the build of the main
96b0eac
  package can be prevented for the arches that don't support it [bz#986809].
96b0eac
2ab1ebb
* Tue Aug 06 2013 Juerg Haefliger <juergh@gmail.com> - 0.27-7
b54a90e
- Build the growpart subpackage on all EPEL architectures [bz#986809].
b54a90e
92e54bb
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.27-6
92e54bb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
92e54bb
cdc44f5
* Mon Jun 17 2013 Juerg Haefliger <juergh@gmail.com> - 0.27-5
cdc44f5
- Don't make gdisk a hard requirement for cloud-utils-growpart to save some
cdc44f5
  space on systems that don't use GPT partitions.
cdc44f5
2e4dd41
* Mon Jun 17 2013 Juerg Haefliger <juergh@gmail.com> - 0.27-4
2e4dd41
- Break out the growpart script into its own subpackage to prevent pulling a
2e4dd41
  boatload of unnecessary dependencies into a cloud image.
2e4dd41
14a0f95
* Mon Apr  8 2013 Juerg Haefliger <juergh@gmail.com> - 0.27-3
14a0f95
- 3rd attempt to fix the spec file to only build on x86_64 for EPEL.
14a0f95
8f89f9b
* Tue Apr  5 2013 Juerg Haefliger <juergh@gmail.com> - 0.27-2
8f89f9b
- Yet another spec file fix to only build on x86_64 for EPEL.
8f89f9b
11b4602
* Tue Apr  2 2013 Juerg Haefliger <juergh@gmail.com> - 0.27-1
11b4602
- Update to upstream release 0.27.
11b4602
- Fix spec file to only build on x86_64 for EPEL.
11b4602
11b4602
* Wed Feb 12 2013 Juerg Haefliger <juergh@gmail.com> - 0.27-0.2.bzr216
a9a20d0
- Add GPL-3 license.
a9a20d0
- Exclude Ubuntu-specific tools.
a9a20d0
- Fix some spec file issues per reviewers comments.
a9a20d0
a9a20d0
* Tue Feb  5 2013 Juerg Haefliger <juergh@gmail.com> - 0.27-0.1.bzr216
a9a20d0
- Initial build based on upstream revision bzr216.