RPM support: fixed broken RPM build

The command "make rpm" was failing for the following reasons :
- setting the build directory to ./rpmbuild/ instead of default
  ~/rpmbuild/ was ignored.
- errors in the spec file : wrong dates and characters in the
  changelog, and unpackaged files under misc/*
- debug package built even if unneeded but failing to build because
  of missing requisites.
Using "rpmbuild -tb ipmitool-*.tar.gz" instead of 'make rpm" builds
under ~/rpmbuild/ but also fails because of the last two reasons.

Signed-off-by: Gilles Buloz <gilles.buloz@kontron.com>
This commit is contained in:
Gilles Buloz 2020-06-24 14:55:22 +02:00 committed by Alexander Amelkin
parent 055719b7b9
commit 8838e4b0e2
3 changed files with 10 additions and 6 deletions

View File

@ -104,8 +104,10 @@ RPMDIR = $(BUILDDIR)/rpmbuild
rpm: control/ipmitool.spec dist rpm: control/ipmitool.spec dist
mkdir -p $(RPMDIR)/{BUILD,RPMS,SRPMS,SOURCES,SPECS,tmp} mkdir -p $(RPMDIR)/{BUILD,RPMS,SRPMS,SOURCES,SPECS,tmp}
cp control/ipmitool.spec $(RPMDIR)/SPECS cp control/ipmitool.spec $(RPMDIR)/SPECS
BUILDDIR=$(RPMDIR) CONFIGDIR=$(BUILDDIR)/control \ cp $(distdir).tar.gz $(RPMDIR)/SOURCES
@RPMBUILD@ -ba --rcfile $(SRCDIR)/control/rpmrc \ CONFIGDIR=$(BUILDDIR)/control \
@RPMBUILD@ -ba --define "_topdir $(RPMDIR)" \
--rcfile $(SRCDIR)/control/rpmrc \
$(RPMDIR)/SPECS/ipmitool.spec $(RPMDIR)/SPECS/ipmitool.spec
.PHONY: clean-rpm .PHONY: clean-rpm

View File

@ -1,3 +1,5 @@
%define debug_package %{nil}
Name: ipmitool Name: ipmitool
Summary: ipmitool - Utility for IPMI control Summary: ipmitool - Utility for IPMI control
Version: @VERSION@ Version: @VERSION@
@ -56,6 +58,7 @@ fi
%attr(755,root,root) %{_bindir}/* %attr(755,root,root) %{_bindir}/*
%attr(755,root,root) %{_sbindir}/* %attr(755,root,root) %{_sbindir}/*
%{_datadir}/ipmitool/* %{_datadir}/ipmitool/*
%{_datadir}/misc/*
%{_mandir}/man*/* %{_mandir}/man*/*
%doc %{_datadir}/doc/ipmitool %doc %{_datadir}/doc/ipmitool
@ -257,7 +260,7 @@ fi
- Make ipmievd generate pidfile - Make ipmievd generate pidfile
- Add initscripts for ipmievd - Add initscripts for ipmievd
* Mon Jan 17 2006 <duncan@iceblink.org> 1.8.6-1 * Tue Jan 17 2006 <duncan@iceblink.org> 1.8.6-1
- Fix memory corruption when sending encrypted SOL traffic - Fix memory corruption when sending encrypted SOL traffic
- Add keepalive timer to IPMIv2 SOL sessions - Add keepalive timer to IPMIv2 SOL sessions
@ -325,7 +328,7 @@ fi
- new "shell" and "exec" commands - new "shell" and "exec" commands
- lots of other contributed patches - lots of other contributed patches
* Sat May 27 2004 <duncan@iceblink.org> 1.5.9-1 * Thu May 27 2004 <duncan@iceblink.org> 1.5.9-1
- Add ability to get a particular sensor by name - Add ability to get a particular sensor by name
- Add ability to set a particular sensor threshold - Add ability to set a particular sensor threshold
- Add support for displaying V2 channel authentication levels - Add support for displaying V2 channel authentication levels
@ -359,7 +362,7 @@ fi
- Fix SEL event decoding for generic events - Fix SEL event decoding for generic events
- Handle empty SEL gracefully when doing "sel list" - Handle empty SEL gracefully when doing "sel list"
- Fix sdr handling of sensors that do not return a reading - Fix sdr handling of sensors that do not return a reading
- Fix for CSV display of sensor readings/units from Fredrik Öhrn - Fix for CSV display of sensor readings/units from Fredrik Öhrn
* Tue Nov 25 2003 <duncan@iceblink.org> 1.5.5-1 * Tue Nov 25 2003 <duncan@iceblink.org> 1.5.5-1
- Add -U option for setting LAN username - Add -U option for setting LAN username

View File

@ -1,4 +1,3 @@
%_topdir %(echo $BUILDDIR)
%_sourcedir %{_topdir}/.. %_sourcedir %{_topdir}/..
%_specdir %{_sourcedir} %_specdir %{_sourcedir}
%_tmppath %{_topdir}/tmp %_tmppath %{_topdir}/tmp