From 96b0eace3d6d69b85ed4d862f96be1e3b63c6530 Mon Sep 17 00:00:00 2001 From: Juerg Haefliger Date: Fri, 16 Aug 2013 11:28:51 -0400 Subject: [PATCH] Make the package a no-noarch package on EPEL So that the build of the main package is prevented on arches that don't support it. Fixes bz #986809. --- cloud-utils.spec | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/cloud-utils.spec b/cloud-utils.spec index 3da97f9..2ed9687 100644 --- a/cloud-utils.spec +++ b/cloud-utils.spec @@ -1,7 +1,7 @@ Summary: Cloud image management utilities Name: cloud-utils Version: 0.27 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv3 Group: System Environment/Base URL: https://launchpad.net/cloud-utils/trunk/0.27/+download/cloud-utils-0.27.tar.gz @@ -9,7 +9,17 @@ URL: https://launchpad.net/cloud-utils/trunk/0.27/+download/cloud-utils-0.27.ta Source0: %{name}-%{version}.tar.gz Source1: LICENSE +# 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} +%ifarch i386 ppc64 +%define BuildMainPackage 0 +%endif # %ifarch i386 ppc64 +%else # %if 0%{?rhel} BuildArch: noarch +%endif # %if 0%{?rhel} Requires: cloud-utils-growpart Requires: gawk @@ -51,16 +61,6 @@ primarily used in cloud images in conjunction with the dracut-modules-growroot package to grow the root partition on first boot. -# Don't build the cloud-utils main package on EPEL architectures that don't -# have qemu-img -%define BuildMainPackage 1 -%if 0%{?rhel} -%ifarch i386 ppc64 -%define BuildMainPackage 0 -%endif # %ifarch i386 ppc64 -%endif # %if 0%{?rhel} - - %prep %setup -q @@ -116,6 +116,10 @@ cp man/growpart.* $RPM_BUILD_ROOT/%{_mandir}/man1/ %changelog +* Fri Aug 16 2013 Juerg Haefliger - 0.27-8 +- Make the package a no-noarch package on EPEL so that the build of the main + package can be prevented for the arches that don't support it [bz#986809]. + * Tue Aug 06 2013 Juerg Haefliger - 0.27-7 - Build the growpart subpackage on all EPEL architectures [bz#986809].