From f75aa9d221728edf6215259ef9ba0d9db28b7d08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ondrej=20Mosn=C3=A1=C4=8Dek?= Date: Tue, 5 Sep 2023 13:21:28 +0200 Subject: [PATCH] Fix Requires/Recommends MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add missing dependencies based on code audit. Also make the package universally noarch by recommending qemu-img instead of requiring it (it is not strictly required for all functionality). Signed-off-by: Ondrej Mosnáček --- cloud-utils.spec | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/cloud-utils.spec b/cloud-utils.spec index 424aa71..7ce1626 100644 --- a/cloud-utils.spec +++ b/cloud-utils.spec @@ -7,27 +7,29 @@ URL: https://github.com/canonical/%{name} Source: %{url}/archive/%{version}/%{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 +# cloud-localds +Recommends: tar +Recommends: dosfstools +Recommends: mtools +Recommends: genisoimage +# cloud-localds & mount-image-callback +Recommends: qemu-img +# resize-part-image +Requires: file +Requires: gzip +Requires: e2fsprogs +# resize-part-image & mount-image-callback +Requires: gawk +# vcs-run +Recommends: breezy +Recommends: git-core +Recommends: mercurial +Recommends: wget %description This package provides a useful set of utilities for managing cloud images. @@ -41,11 +43,12 @@ with a much simpler interface. Summary: Script for growing a partition Requires: gawk +Requires: util-linux # 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 +Recommends: lvm2 %description growpart @@ -65,7 +68,6 @@ package to grow the root partition on first boot. mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_mandir}/man1 -%if %{BuildMainPackage} # Install binaries and manpages cp bin/* %{buildroot}%{_bindir}/ cp man/* %{buildroot}%{_mandir}/man1/ @@ -79,7 +81,6 @@ 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}/ @@ -87,7 +88,6 @@ cp man/growpart.* %{buildroot}%{_mandir}/man1/ # Files for the main package -%if %{BuildMainPackage} %files %doc ChangeLog %license LICENSE @@ -100,7 +100,6 @@ cp man/growpart.* %{buildroot}%{_mandir}/man1/ %doc %{_mandir}/man1/resize-part-image.* %doc %{_mandir}/man1/write-mime-multipart.* %doc %{_mandir}/man1/cloud-localds.* -%endif # Files for the growpart subpackage