Accepting request 205000 from systemsmanagement
Add systemd support for openSUSE >= 12.3 (forwarded request 204927 from posophe) OBS-URL: https://build.opensuse.org/request/show/205000 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/freeipmi?expand=0&rev=10
This commit is contained in:
commit
38807fa62f
12
bmc-watchdog.service
Normal file
12
bmc-watchdog.service
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=BMC Watchdog Timer Daemon
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
PIDFile=/run/bmc-watchdog.pid
|
||||||
|
EnvironmentFile=-/etc/sysconfig/bmc-watchdog
|
||||||
|
ExecStart=/usr/sbin/bmc-watchdog $OPTIONS
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Oct 27 19:14:16 UTC 2013 - p.drouand@gmail.com
|
||||||
|
|
||||||
|
- Add systemd support for openSUSE >= 12.3
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Oct 4 07:56:38 UTC 2013 - kkaempf@suse.com
|
Fri Oct 4 07:56:38 UTC 2013 - kkaempf@suse.com
|
||||||
|
|
||||||
|
@ -31,7 +31,10 @@ Name: %{name}
|
|||||||
Version: %{version}
|
Version: %{version}
|
||||||
Release: %{release}
|
Release: %{release}
|
||||||
Url: http://www.gnu.org/software/freeipmi/
|
Url: http://www.gnu.org/software/freeipmi/
|
||||||
Source: %{name}-%{version}.tar.bz2
|
Source0: %{name}-%{version}.tar.bz2
|
||||||
|
Source1: bmc-watchdog.service
|
||||||
|
Source2: ipmidetectd.service
|
||||||
|
Source3: ipmiseld.service
|
||||||
Summary: FreeIPMI
|
Summary: FreeIPMI
|
||||||
License: GPL-3.0+
|
License: GPL-3.0+
|
||||||
Group: System/Management
|
Group: System/Management
|
||||||
@ -43,6 +46,9 @@ BuildRequires: texinfo
|
|||||||
%if 0%{?suse_version} > 1010
|
%if 0%{?suse_version} > 1010
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
%endif
|
%endif
|
||||||
|
%if 0%{?suse_version} >=1230
|
||||||
|
BuildRequires: pkgconfig(systemd)
|
||||||
|
%endif
|
||||||
|
|
||||||
Obsoletes: freeipmi-ipmimonitoring
|
Obsoletes: freeipmi-ipmimonitoring
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
@ -70,6 +76,9 @@ Summary: FreeIPMI BMC watchdog
|
|||||||
Group: System/Management
|
Group: System/Management
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
Requires(pre): %fillup_prereq
|
Requires(pre): %fillup_prereq
|
||||||
|
%if 0%{?suse_version} >=1230
|
||||||
|
%{?systemd_requires}
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
Requires: freeipmi = %{version}
|
Requires: freeipmi = %{version}
|
||||||
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
|
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
|
||||||
@ -89,6 +98,9 @@ Requires: freeipmi = %{version}
|
|||||||
Requires(post): chkconfig
|
Requires(post): chkconfig
|
||||||
Requires(preun): chkconfig
|
Requires(preun): chkconfig
|
||||||
%endif
|
%endif
|
||||||
|
%if 0%{?suse_version} >=1230
|
||||||
|
%{?systemd_requires}
|
||||||
|
%endif
|
||||||
|
|
||||||
%description ipmidetectd
|
%description ipmidetectd
|
||||||
This service detects and monitors IPMI nodes.
|
This service detects and monitors IPMI nodes.
|
||||||
@ -143,6 +155,13 @@ rm -f %{buildroot}%{_datadir}/doc/packages/freeipmi/INSTALL
|
|||||||
(cd %{buildroot}/%{_sysconfdir}; rm init.d)
|
(cd %{buildroot}/%{_sysconfdir}; rm init.d)
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# Add systemd support for openSUSE >= 12.3
|
||||||
|
%if 0%{?suse_version} >=1230
|
||||||
|
mkdir -p %{buildroot}%{_unitdir}
|
||||||
|
%{__install} -m 0755 %{S:1} %{S:2} %{S:3} %{buildroot}%{_unitdir}/
|
||||||
|
rm -r %{buildroot}%{_initddir}
|
||||||
|
%endif
|
||||||
|
|
||||||
# fix coherance problems with associated script filenames
|
# fix coherance problems with associated script filenames
|
||||||
rm -f %{buildroot}%{_infodir}/dir
|
rm -f %{buildroot}%{_infodir}/dir
|
||||||
# kludge to get around rpmlint complaining about 0 length semephore file
|
# kludge to get around rpmlint complaining about 0 length semephore file
|
||||||
@ -160,9 +179,6 @@ mv %{buildroot}%{_sysconfdir}/sysconfig/bmc-watchdog %{buildroot}%{_localstatedi
|
|||||||
%fdupes $RPM_BUILD_ROOT
|
%fdupes $RPM_BUILD_ROOT
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf %{buildroot}
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
if [ -x /sbin/install-info ]; then
|
if [ -x /sbin/install-info ]; then
|
||||||
#/sbin/install-info %{_infodir}/freeipmi.info.gz %{_infodir}/dir
|
#/sbin/install-info %{_infodir}/freeipmi.info.gz %{_infodir}/dir
|
||||||
@ -184,6 +200,9 @@ fi
|
|||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
%{fillup_only}
|
%{fillup_only}
|
||||||
%endif
|
%endif
|
||||||
|
%if 0%{?suse_version} >=1230
|
||||||
|
%service_add_post bmc-watchdog.service
|
||||||
|
%else
|
||||||
if [ "$1" = 1 ]; then
|
if [ "$1" = 1 ]; then
|
||||||
if [ -x %{_initddir}/bmc-watchdog ]; then
|
if [ -x %{_initddir}/bmc-watchdog ]; then
|
||||||
/sbin/chkconfig --add bmc-watchdog
|
/sbin/chkconfig --add bmc-watchdog
|
||||||
@ -199,8 +218,12 @@ if [ $1 -ge 1 ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
%preun bmc-watchdog
|
%preun bmc-watchdog
|
||||||
|
%if 0%{?suse_version} >=1230
|
||||||
|
%service_del_preun bmc-watchdog.service
|
||||||
|
%else
|
||||||
#
|
#
|
||||||
# Stop bmc-watchdog if it is running
|
# Stop bmc-watchdog if it is running
|
||||||
#
|
#
|
||||||
@ -212,8 +235,12 @@ if [ "$1" = 0 ]; then
|
|||||||
/sbin/chkconfig --del bmc-watchdog
|
/sbin/chkconfig --del bmc-watchdog
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
%post ipmidetectd
|
%post ipmidetectd
|
||||||
|
%if 0%{?suse_version} >=1230
|
||||||
|
%service_add_post ipmidetectd.service
|
||||||
|
%else
|
||||||
if [ "$1" = 1 ]; then
|
if [ "$1" = 1 ]; then
|
||||||
if [ -x %{_initddir}/ipmidetectd ]; then
|
if [ -x %{_initddir}/ipmidetectd ]; then
|
||||||
/sbin/chkconfig --add ipmidetectd
|
/sbin/chkconfig --add ipmidetectd
|
||||||
@ -229,8 +256,12 @@ if [ $1 -ge 1 ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
%preun ipmidetectd
|
%preun ipmidetectd
|
||||||
|
%if 0%{?suse_version} >=1230
|
||||||
|
%service_del_preun ipmidetectd.service
|
||||||
|
%else
|
||||||
#
|
#
|
||||||
# Stop ipmidetectd if it is running
|
# Stop ipmidetectd if it is running
|
||||||
#
|
#
|
||||||
@ -242,6 +273,7 @@ if [ "$1" = 0 ]; then
|
|||||||
/sbin/chkconfig --del ipmidetectd
|
/sbin/chkconfig --del ipmidetectd
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -292,7 +324,11 @@ fi
|
|||||||
#%{_docdir}
|
#%{_docdir}
|
||||||
#%endif
|
#%endif
|
||||||
%config %{_sysconfdir}/freeipmi/ipmiseld.conf
|
%config %{_sysconfdir}/freeipmi/ipmiseld.conf
|
||||||
|
%if 0%{?suse_version} >=1230
|
||||||
|
%{_unitdir}/ipmiseld.service
|
||||||
|
%else
|
||||||
%{_initddir}/ipmiseld
|
%{_initddir}/ipmiseld
|
||||||
|
%endif
|
||||||
%{_libdir}/libipmiconsole*so.*
|
%{_libdir}/libipmiconsole*so.*
|
||||||
%{_libdir}/libipmidetect*so.*
|
%{_libdir}/libipmidetect*so.*
|
||||||
%{_libdir}/libfreeipmi*so.*
|
%{_libdir}/libfreeipmi*so.*
|
||||||
@ -426,7 +462,11 @@ fi
|
|||||||
%doc COPYING.bmc-watchdog
|
%doc COPYING.bmc-watchdog
|
||||||
%doc DISCLAIMER.bmc-watchdog
|
%doc DISCLAIMER.bmc-watchdog
|
||||||
%doc DISCLAIMER.bmc-watchdog.UC
|
%doc DISCLAIMER.bmc-watchdog.UC
|
||||||
|
%if 0%{?suse_version} >=1230
|
||||||
|
%{_unitdir}/bmc-watchdog.service
|
||||||
|
%else
|
||||||
%config(noreplace) %{_initddir}/bmc-watchdog
|
%config(noreplace) %{_initddir}/bmc-watchdog
|
||||||
|
%endif
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
%attr(0444,root,root) %config(noreplace) %{_localstatedir}/adm/fillup-templates/sysconfig.bmc-watchdog
|
%attr(0444,root,root) %config(noreplace) %{_localstatedir}/adm/fillup-templates/sysconfig.bmc-watchdog
|
||||||
%else
|
%else
|
||||||
@ -439,7 +479,11 @@ fi
|
|||||||
|
|
||||||
%files ipmidetectd
|
%files ipmidetectd
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
%if 0%{?suse_version} >=1230
|
||||||
|
%{_unitdir}/ipmidetectd.service
|
||||||
|
%else
|
||||||
%config(noreplace) %{_initddir}/ipmidetectd
|
%config(noreplace) %{_initddir}/ipmidetectd
|
||||||
|
%endif
|
||||||
%attr(0444,root,root) %config(noreplace) %{_sysconfdir}/freeipmi/ipmidetectd.conf
|
%attr(0444,root,root) %config(noreplace) %{_sysconfdir}/freeipmi/ipmidetectd.conf
|
||||||
%{_sbindir}/ipmidetectd
|
%{_sbindir}/ipmidetectd
|
||||||
%{_mandir}/man5/ipmidetectd.conf.5*
|
%{_mandir}/man5/ipmidetectd.conf.5*
|
||||||
|
10
ipmidetectd.service
Normal file
10
ipmidetectd.service
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=IPMI Node Detection Monitoring Daemon
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
ExecStart=/usr/sbin/ipmidetectd
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
10
ipmiseld.service
Normal file
10
ipmiseld.service
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=IPMI SEL syslog logging daemon
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
ExecStart=/usr/sbin/ipmiseld
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
x
Reference in New Issue
Block a user