[libvirt] [libvirt-snmp][PATCH 0/2] Couple of spec file improvements

While trying to build libvirt-snmp on minimalistic RHEL installation I've noticed couple of problems. These two are pushed under trivial rule. Michal Privoznik (2): spec: Require git and gcc for the build spec: Modernize the spec file libvirt-snmp.spec.in | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) -- 2.16.4

In previous patch 46cae089f12 I've switched the spec file to apply patches with git. However, I forgot to add that as a build dependency so on systems with minimal install this may fail if they don't have git installed. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- libvirt-snmp.spec.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libvirt-snmp.spec.in b/libvirt-snmp.spec.in index 21a9885..b51777c 100644 --- a/libvirt-snmp.spec.in +++ b/libvirt-snmp.spec.in @@ -9,7 +9,13 @@ URL: http://libvirt.org Source0: http://www.libvirt.org/sources/snmp/libvirt-snmp-%{version}.tar.gz BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) -BuildRequires: net-snmp-perl net-snmp net-snmp-utils net-snmp-devel libvirt-devel +BuildRequires: net-snmp-perl +BuildRequires: net-snmp +BuildRequires: net-snmp-utils +BuildRequires: net-snmp-devel +BuildRequires: libvirt-devel +BuildRequires: git +BuildRequires: gcc %description Provides a way to control libvirt through SNMP protocol. -- 2.16.4

There are two macros ("BuildRoot" and "defattr") that were required in RHEL-5 world. Things are different now and we do not need to specify those anymore. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- libvirt-snmp.spec.in | 5 ----- 1 file changed, 5 deletions(-) diff --git a/libvirt-snmp.spec.in b/libvirt-snmp.spec.in index b51777c..070a7ef 100644 --- a/libvirt-snmp.spec.in +++ b/libvirt-snmp.spec.in @@ -7,7 +7,6 @@ Group: Development/Libraries License: GPLv2+ URL: http://libvirt.org Source0: http://www.libvirt.org/sources/snmp/libvirt-snmp-%{version}.tar.gz -BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: net-snmp-perl BuildRequires: net-snmp @@ -23,18 +22,14 @@ Provides a way to control libvirt through SNMP protocol. %prep %autosetup -S git_am - %build %configure make %{?_smp_mflags} - %install make install DESTDIR=$RPM_BUILD_ROOT - %files -%defattr(-,root,root,-) %{_bindir}/libvirtMib_subagent %{_datadir}/snmp/mibs/LIBVIRT-MIB.txt %doc README NEWS ChangeLog AUTHORS -- 2.16.4

On Wed, Sep 05, 2018 at 10:25:12AM +0200, Michal Privoznik wrote:
There are two macros ("BuildRoot" and "defattr") that were required in RHEL-5 world. Things are different now and we do not need to specify those anymore.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- libvirt-snmp.spec.in | 5 ----- 1 file changed, 5 deletions(-)
diff --git a/libvirt-snmp.spec.in b/libvirt-snmp.spec.in index b51777c..070a7ef 100644 --- a/libvirt-snmp.spec.in +++ b/libvirt-snmp.spec.in @@ -7,7 +7,6 @@ Group: Development/Libraries License: GPLv2+ URL: http://libvirt.org Source0: http://www.libvirt.org/sources/snmp/libvirt-snmp-%{version}.tar.gz
For another trivial change these 2 lines should s/http/https/ Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
participants (2)
-
Daniel P. Berrangé
-
Michal Privoznik