Accepting request 662665 from systemsmanagement

OBS-URL: https://build.opensuse.org/request/show/662665
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/freeipmi?expand=0&rev=40
This commit is contained in:
Dominique Leuenberger 2019-01-08 11:27:42 +00:00 committed by Git OBS Bridge
commit 0680a88d19
2 changed files with 109 additions and 145 deletions

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Fri Nov 9 15:30:58 UTC 2018 - trenn@suse.de
- Remove has_systemd conditions
- Add rcservice shortcut links to control services
- Fix some more build warnings
- Use %license instead of %doc where appropriate
- Extract ipmiseld service as a separate package as done with other
services
- Declare /var/lib/freeipmi/ipckey as %ghost and do not create it
explicitly in .spec file (bsc#1100124)
-------------------------------------------------------------------
Tue Aug 28 15:54:51 UTC 2018 - trenn@suse.de

View File

@ -1,7 +1,7 @@
#
# spec file for package freeipmi
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2003-2008 FreeIPMI Core Team
#
# All modifications and additions to the file contributed by third parties
@ -13,7 +13,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@ -22,12 +22,6 @@
%define _fillupdir /var/adm/fillup-templates
%endif
%if 0%{?suse_version} > 1140 || 0%{?fedora_version} > 14
%define has_systemd 1
%else
%define has_systemd 0
%endif
%define srcversion %{version}
%if %{?_with_debug:1}%{!?_with_debug:0}
%define release 1.debug%{?dist}
@ -54,16 +48,11 @@ Summary: FreeIPMI
License: GPL-3.0-or-later
Group: System/Management
BuildRequires: automake
BuildRequires: fdupes
BuildRequires: libgcrypt-devel
BuildRequires: libtool
BuildRequires: pkg-config
BuildRequires: texinfo
%if 0%{?suse_version} > 1010
BuildRequires: fdupes
%endif
%if 0%{?has_systemd}
BuildRequires: pkgconfig(systemd)
%endif
%if 0%{?fedora_version} == 20 || 0%{?rhel_version} >= 700
BuildRequires: perl-Exporter
%endif
@ -99,10 +88,8 @@ Summary: FreeIPMI BMC watchdog
Group: System/Management
%if 0%{?suse_version}
Requires(pre): %fillup_prereq
%if %{has_systemd}
%{?systemd_requires}
%endif
%endif
Requires: freeipmi = %{version}
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
Requires(post): chkconfig
@ -121,13 +108,28 @@ Requires: freeipmi = %{version}
Requires(post): chkconfig
Requires(preun): chkconfig
%endif
%if %{has_systemd}
%{?systemd_requires}
%endif
%description ipmidetectd
This service detects and monitors IPMI nodes.
%package ipmiseld
Summary: Polls system event logs (SEL)
Group: System/Management
Requires: freeipmi = %{version}
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
Requires(post): chkconfig
Requires(preun): chkconfig
%endif
%{?systemd_requires}
%description ipmiseld
The daemon polls the system event log (SEL) of specified hosts and stores the
logs into the local syslog. By default, the daemon can also make best efforts
to manage the remote SEL buffer to ensure events are never lost.
Recent logging data will be cached to disk to ensure that SEL events are
not missed in the event the client or server is rebooted.
%if %{?_with_debug:1}%{!?_with_debug:0}
%define _enable_debug --enable-debug --enable-trace
%endif
@ -201,9 +203,7 @@ automake --gnu --include-deps --copy --add-missing
%define docpath %{_docdir}/%{name}
%endif
%if %{has_systemd}
%define configure_systemd --with-systemdsystemunitdir=%{_unitdir}
%endif
%configure --program-prefix=%{?_program_prefix:%{_program_prefix}} \
--docdir=%{docpath} \
@ -230,6 +230,12 @@ make install DESTDIR=%{buildroot}
mkdir -p %{buildroot}%{_datadir}/doc/packages/freeipmi-bmc-watchdog
mv %{buildroot}%{_datadir}/doc/packages/freeipmi/*bmc-watchdog* %{buildroot}%{_datadir}/doc/packages/freeipmi-bmc-watchdog
mkdir -p %{buildroot}%{_datadir}/doc/packages/freeipmi-ipmiseld
mv %{buildroot}%{_datadir}/doc/packages/freeipmi/*ipmiseld* %{buildroot}%{_datadir}/doc/packages/freeipmi-ipmiseld
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcbmc-watchdog
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcipmidetectd
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcipmiseld
# Silent build check warning
rm -f %{buildroot}%{_datadir}/doc/packages/freeipmi/INSTALL
@ -244,9 +250,6 @@ rm -rf %{buildroot}%{_datadir}/doc/packages/freeipmi/freeipmi-testing.txt
# fix coherance problems with associated script filenames
rm -f %{buildroot}%{_infodir}/dir
# kludge to get around rpmlint complaining about 0 length semephore file
mkdir -p %{buildroot}%{_localstatedir}/lib/freeipmi
echo freeipmi > %{buildroot}%{_localstatedir}/lib/freeipmi/ipckey
# Remove .la files
rm -rf %{buildroot}/%{_libdir}/*.la
@ -261,7 +264,6 @@ mv %{buildroot}%{_sysconfdir}/sysconfig/bmc-watchdog %{buildroot}%{_fillupdir}/s
%post
if [ -x /sbin/install-info ]; then
#/sbin/install-info %{_infodir}/freeipmi.info.gz %{_infodir}/dir
/sbin/install-info %{_infodir}/freeipmi-faq.info.gz %{_infodir}/dir
fi
/sbin/ldconfig
@ -269,7 +271,6 @@ fi
%preun
if [ $1 = 0 ]; then
if [ -x /sbin/install-info ]; then
#/sbin/install-info --delete %{_infodir}/freeipmi.info.gz %{_infodir}/dir
/sbin/install-info --delete %{_infodir}/freeipmi-faq.info.gz %{_infodir}/dir
fi
fi
@ -292,84 +293,40 @@ fi
%if 0%{?suse_version}
%{fillup_only}
%endif
%if %{has_systemd}
%service_add_post bmc-watchdog.service
%else
if [ "$1" = 1 ]; then
if [ -x %{_initddir}/bmc-watchdog ]; then
/sbin/chkconfig --add bmc-watchdog
/sbin/chkconfig bmc-watchdog off
fi
fi
if [ $1 -ge 1 ]; then
if [ -x %{_initddir}/bmc-watchdog ]; then
if %{_initddir}/bmc-watchdog status | grep -q running; then
%{_initddir}/bmc-watchdog restart
else
%{_initddir}/bmc-watchdog condrestart
fi
fi
fi
%endif
%pre bmc-watchdog
%service_add_pre bmc-watchdog.service
%postun bmc-watchdog
%service_del_postun bmc-watchdog.service
%preun bmc-watchdog
%if %{has_systemd}
%service_del_preun bmc-watchdog.service
%else
#
# Stop bmc-watchdog if it is running
#
if [ "$1" = 0 ]; then
if [ -x %{_initddir}/bmc-watchdog ]; then
if %{_initddir}/bmc-watchdog status | grep -q running; then
%{_initddir}/bmc-watchdog stop
fi
/sbin/chkconfig --del bmc-watchdog
fi
fi
%endif
%post ipmidetectd
%if %{has_systemd}
%service_add_post ipmidetectd.service
%else
if [ "$1" = 1 ]; then
if [ -x %{_initddir}/ipmidetectd ]; then
/sbin/chkconfig --add ipmidetectd
/sbin/chkconfig ipmidetectd off
fi
fi
if [ $1 -ge 1 ]; then
if [ -x %{_initddir}/ipmidetectd ]; then
if %{_initddir}/ipmidetectd status | grep -q running; then
%{_initddir}/ipmidetectd restart
else
%{_initddir}/ipmidetectd condrestart
fi
fi
fi
%endif
%pre ipmidetectd
%service_add_pre ipmidetectd.service
%postun ipmidetectd
%service_del_postun ipmidetectd.service
%preun ipmidetectd
%if %{has_systemd}
%service_del_preun ipmidetectd.service
%else
#
# Stop ipmidetectd if it is running
#
if [ "$1" = 0 ]; then
if [ -x %{_initddir}/ipmidetectd ]; then
if %{_initddir}/ipmidetectd status | grep -q running; then
%{_initddir}/ipmidetectd stop
fi
/sbin/chkconfig --del ipmidetectd
fi
fi
%endif
%post ipmiseld
%service_add_post ipmiseld.service
%pre ipmiseld
%service_add_pre ipmiseld.service
%preun ipmiseld
%service_del_preun ipmiseld.service
# Could have several files and files with hostname ghost directive
# might not work
rm -rf %{_localstatedir}/cache/ipmiseld/*
%postun ipmiseld
%service_del_postun ipmiseld.service
%files
%defattr(-,root,root)
# %attr(0444,root,root) %config(noreplace) %{_sysconfdir}/ipmi_monitoring_sensors.conf
%config(noreplace) %{_sysconfdir}/freeipmi/freeipmi.conf
%dir %{_sysconfdir}/freeipmi
%config %{_sysconfdir}/freeipmi/freeipmi_interpret_sel.conf
@ -377,10 +334,9 @@ fi
%config %{_sysconfdir}/freeipmi/ipmidetect.conf
%config %{_sysconfdir}/freeipmi/libipmiconsole.conf
%doc AUTHORS
%doc COPYING
%license %docpath/COPYING
%doc ChangeLog
%doc ChangeLog.0
# doc INSTALL
%doc NEWS
%doc README
%doc README.argp
@ -388,49 +344,42 @@ fi
%doc README.openipmi
%doc TODO
%doc %{_infodir}/*
%doc COPYING.ipmiping
%doc COPYING.ipmipower
%doc COPYING.ipmiconsole
%doc COPYING.ipmimonitoring
%doc COPYING.pstdout
%doc COPYING.ipmidetect
%doc COPYING.ipmi-fru
%doc COPYING.ZRESEARCH
%doc COPYING.ipmi-dcmi
%doc COPYING.ipmiseld
%doc COPYING.sunbmc
%doc DISCLAIMER.ipmiping
%doc DISCLAIMER.ipmipower
%doc DISCLAIMER.ipmiconsole
%doc DISCLAIMER.ipmidetect
%doc DISCLAIMER.ipmimonitoring
%doc DISCLAIMER.pstdout
%doc DISCLAIMER.ipmi-fru
%doc DISCLAIMER.ipmiping.UC
%doc DISCLAIMER.ipmipower.UC
%doc DISCLAIMER.ipmiconsole.UC
%doc DISCLAIMER.ipmimonitoring.UC
%doc DISCLAIMER.pstdout.UC
%doc DISCLAIMER.ipmidetect.UC
%doc DISCLAIMER.ipmi-fru.UC
%doc DISCLAIMER.ipmi-dcmi
%doc DISCLAIMER.ipmiseld
%license %docpath/COPYING.ipmiping
%license %docpath/COPYING.ipmipower
%license %docpath/COPYING.ipmiconsole
%license %docpath/COPYING.ipmimonitoring
%license %docpath/COPYING.pstdout
%license %docpath/COPYING.ipmidetect
%license %docpath/COPYING.ipmi-fru
%license %docpath/COPYING.ZRESEARCH
%license %docpath/COPYING.ipmi-dcmi
%license %docpath/COPYING.sunbmc
%license %docpath/DISCLAIMER.ipmiping
%license %docpath/DISCLAIMER.ipmipower
%license %docpath/DISCLAIMER.ipmiconsole
%license %docpath/DISCLAIMER.ipmidetect
%license %docpath/DISCLAIMER.ipmimonitoring
%license %docpath/DISCLAIMER.pstdout
%license %docpath/DISCLAIMER.ipmi-fru
%license %docpath/DISCLAIMER.ipmiping.UC
%license %docpath/DISCLAIMER.ipmipower.UC
%license %docpath/DISCLAIMER.ipmiconsole.UC
%license %docpath/DISCLAIMER.ipmimonitoring.UC
%license %docpath/DISCLAIMER.pstdout.UC
%license %docpath/DISCLAIMER.ipmidetect.UC
%license %docpath/DISCLAIMER.ipmi-fru.UC
%license %docpath/DISCLAIMER.ipmi-dcmi
%doc doc/freeipmi-coding.txt
%doc doc/freeipmi-hostrange.txt
%doc doc/freeipmi-libraries.txt
%doc doc/freeipmi-bugs-issues-and-workarounds.txt
%doc freeipmi-oem-documentation-requirements.txt
%doc doc/freeipmi-oem-documentation-requirements.txt
%if 0%{?fedora_version} == 20
%{docpath}
%endif
%config %{_sysconfdir}/freeipmi/ipmiseld.conf
%if %{has_systemd}
%{_unitdir}/ipmiseld.service
%else
%{_initddir}/ipmiseld
%endif
%{_localstatedir}/lib/*
%dir %{_localstatedir}/lib/freeipmi
%ghost %{_localstatedir}/lib/freeipmi/ipckey
%{_sbindir}/ipmi-config
%{_sbindir}/bmc-config
%{_sbindir}/bmc-info
@ -442,7 +391,6 @@ fi
%{_sbindir}/pef-config
%{_sbindir}/ipmi-raw
%{_sbindir}/ipmi-sel
%{_sbindir}/ipmiseld
%{_sbindir}/ipmi-sensors
%{_sbindir}/ipmi-sensors-config
%{_sbindir}/ipmiping
@ -497,8 +445,6 @@ fi
%{_mandir}/man5/freeipmi_interpret_sel.conf.5*
%{_mandir}/man5/freeipmi_interpret_sensor.conf.5*
%{_mandir}/man5/libipmiconsole.conf.5*
%{_mandir}/man5/ipmiseld.conf.5*
%{_mandir}/man8/ipmiseld.8*
%{_mandir}/man8/ipmi-console.8*
%{_mandir}/man8/ipmi-detect.8*
%{_mandir}/man8/ipmi-ping.8*
@ -567,36 +513,42 @@ fi
%files bmc-watchdog
%defattr(-,root,root)
%doc COPYING.bmc-watchdog
%doc DISCLAIMER.bmc-watchdog
%doc DISCLAIMER.bmc-watchdog.UC
%if %{has_systemd}
%dir %{_docdir}/freeipmi-bmc-watchdog
%license %{_docdir}/freeipmi-bmc-watchdog/COPYING.bmc-watchdog
%license %{_docdir}/freeipmi-bmc-watchdog/DISCLAIMER.bmc-watchdog
%license %{_docdir}/freeipmi-bmc-watchdog/DISCLAIMER.bmc-watchdog.UC
%{_unitdir}/bmc-watchdog.service
%else
%config(noreplace) %{_initddir}/bmc-watchdog
%endif
%if 0%{?suse_version}
%attr(0444,root,root) %config(noreplace) %{_fillupdir}/sysconfig.bmc-watchdog
%else
%attr(0444,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/bmc-watchdog
%endif
# %attr(0444,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/bmc-watchdog
%{_sbindir}/bmc-watchdog
%{_sbindir}/rcbmc-watchdog
%{_mandir}/man8/bmc-watchdog.8*
# %dir %{_localstatedir}/log/freeipmi
%files ipmidetectd
%defattr(-,root,root)
%if %{has_systemd}
%{_unitdir}/ipmidetectd.service
%else
%config(noreplace) %{_initddir}/ipmidetectd
%endif
%attr(0444,root,root) %config(noreplace) %{_sysconfdir}/freeipmi/ipmidetectd.conf
%{_sbindir}/ipmidetectd
%{_sbindir}/rcipmidetectd
%{_mandir}/man5/ipmidetectd.conf.5*
%{_mandir}/man8/ipmidetectd.8*
%files ipmiseld
%defattr(-,root,root)
%config %{_sysconfdir}/freeipmi/ipmiseld.conf
%dir %{_localstatedir}/cache/ipmiseld
%{_unitdir}/ipmiseld.service
%{_sbindir}/ipmiseld
%{_sbindir}/rcipmiseld
%{_mandir}/man5/ipmiseld.conf.5*
%{_mandir}/man8/ipmiseld.8*
%dir %{_docdir}/freeipmi-ipmiseld
%license %{_docdir}/freeipmi-ipmiseld/COPYING.ipmiseld
%license %{_docdir}/freeipmi-ipmiseld/DISCLAIMER.ipmiseld
%files -n libipmiconsole%{libipmiconsole_soname}
%defattr(-,root,root)
%{_libdir}/libipmiconsole*so.%{libipmiconsole_soname}*