Accepting request 516959 from home:BinLiu:branches:network:ha-clustering:Factory

OBS-URL: https://build.opensuse.org/request/show/516959
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/corosync?expand=0&rev=99
This commit is contained in:
Bin Liu
2017-08-15 07:08:53 +00:00
committed by Git OBS Bridge
parent cbb9681882
commit 20bf446802

View File

@@ -81,7 +81,6 @@ Conflicts: openais < 1.2
Requires: libcorosync4 = %{version}-%{release} Requires: libcorosync4 = %{version}-%{release}
Requires(pre): /usr/sbin/useradd Requires(pre): /usr/sbin/useradd
Requires(post): /sbin/chkconfig Requires(post): /sbin/chkconfig
Requires(post): %insserv_prereq %fillup_prereq
Requires(preun): /sbin/chkconfig Requires(preun): /sbin/chkconfig
Conflicts: openais <= 0.89, openais-devel <= 0.89 Conflicts: openais <= 0.89, openais-devel <= 0.89
@@ -213,6 +212,9 @@ install -m 644 %{_builddir}/%{name}-%{version}/conf/corosync-signals.conf %{buil
%endif %endif
%if %{with systemd} %if %{with systemd}
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rccorosync ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rccorosync
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rccorosync-qnetd
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rccorosync-qdevice
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rccorosync-notifyd
%endif %endif
## tree fixup ## tree fixup
@@ -221,6 +223,8 @@ rm -f %{buildroot}%{_libdir}/*.a
rm -f %{buildroot}%{_libdir}/*.la rm -f %{buildroot}%{_libdir}/*.la
# drop docs and html docs for now # drop docs and html docs for now
rm -rf %{buildroot}%{_docdir}/* rm -rf %{buildroot}%{_docdir}/*
#remove init scripts for corosync, corosync-qdevice, corosync-qnetd
rm -rf init/corosync init/corosync-qnetd init/corosync-qdevice
mkdir -p %{buildroot}/usr/lib/tmpfiles.d/ mkdir -p %{buildroot}/usr/lib/tmpfiles.d/
mkdir -p %{buildroot}/usr/share/doc/packages/corosync/ mkdir -p %{buildroot}/usr/share/doc/packages/corosync/
mkdir -p %{buildroot}/var/adm/fillup-templates/ mkdir -p %{buildroot}/var/adm/fillup-templates/
@@ -230,14 +234,8 @@ install -m 0644 conf/corosync.conf.example* %{buildroot}/usr/share/doc/packages/
rm -rf %{buildroot}/etc/corosync/corosync.conf.example* rm -rf %{buildroot}/etc/corosync/corosync.conf.example*
rm -rf %{buildroot}/etc/logrotate.d/ rm -rf %{buildroot}/etc/logrotate.d/
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
install -m 644 tools/corosync-notifyd.sysconfig.example \
%{buildroot}/usr/lib/tmpfiles.d/corosync-notifyd
install -m 644 init/corosync.sysconfig.example \ install -m 644 init/corosync.sysconfig.example \
%{buildroot}/var/adm/fillup-templates/sysconfig.corosync %{buildroot}/var/adm/fillup-templates/sysconfig.corosync
#add init scripts for corosync, corosync-qdevice, corosync-qnetd
install -m 755 init/corosync %{buildroot}%{_sysconfdir}/init.d/corosync
install -m 755 init/corosync-qdevice %{buildroot}%{_sysconfdir}/init.d/corosync-qdevice
install -m 755 init/corosync-qnetd %{buildroot}%{_sysconfdir}/init.d/corosync-qnetd
rm -rf %{buildroot}%{localstatedir}/run/ rm -rf %{buildroot}%{localstatedir}/run/
%if %{with qdevices} %if %{with qdevices}
install -m 644 init/corosync-qdevice.sysconfig.example \ install -m 644 init/corosync-qdevice.sysconfig.example \
@@ -271,6 +269,7 @@ APIs and libraries, default configuration files, and an init script.
%service_add_pre corosync.service corosync-notifyd.service %service_add_pre corosync.service corosync-notifyd.service
%post %post
#%tmpfiles_create /usr/lib/tmpfiles.d/corosync-notifyd
%{fillup_and_insserv -n corosync} %{fillup_and_insserv -n corosync}
%service_add_post corosync.service corosync-notifyd.service %service_add_post corosync.service corosync-notifyd.service
@@ -297,9 +296,9 @@ fi
%{_sbindir}/corosync-cpgtool %{_sbindir}/corosync-cpgtool
%{_sbindir}/corosync-quorumtool %{_sbindir}/corosync-quorumtool
%{_sbindir}/corosync-notifyd %{_sbindir}/corosync-notifyd
%{_sysconfdir}/init.d/corosync
%if %{with systemd} %if %{with systemd}
%{_sbindir}/rccorosync %{_sbindir}/rccorosync
%{_sbindir}/rccorosync-notifyd
%endif %endif
%{_bindir}/corosync-blackbox %{_bindir}/corosync-blackbox
%if %{with xmlconf} %if %{with xmlconf}
@@ -330,9 +329,6 @@ fi
%dir %{_datadir}/corosync %dir %{_datadir}/corosync
%{_datadir}/corosync/corosync %{_datadir}/corosync/corosync
%{_datadir}/corosync/corosync-notifyd %{_datadir}/corosync/corosync-notifyd
%else
%{_initrddir}/corosync
%{_initrddir}/corosync-notifyd
%endif %endif
%if %{with upstart} %if %{with upstart}
%{_sysconfdir}/init/corosync.conf %{_sysconfdir}/init/corosync.conf
@@ -388,7 +384,6 @@ Summary: The Corosync Cluster Engine Libraries
Group: System/Libraries Group: System/Libraries
Obsoletes: libopenais3 < 1.2 Obsoletes: libopenais3 < 1.2
Conflicts: libopenais3 < 1.2 Conflicts: libopenais3 < 1.2
Requires: %{name} = %{version}
%description -n libcorosync4 %description -n libcorosync4
This package contains corosync libraries. This package contains corosync libraries.
@@ -461,8 +456,6 @@ The Corosync Cluster Engine APIs.
%post -n libcorosync-devel -p /sbin/ldconfig %post -n libcorosync-devel -p /sbin/ldconfig
%postun -n libcorosync-devel -p /sbin/ldconfig %postun -n libcorosync-devel -p /sbin/ldconfig
# optional qdevices
#
%if %{with qdevices} %if %{with qdevices}
%package -n corosync-qdevice %package -n corosync-qdevice
@@ -475,7 +468,6 @@ Requires: mozilla-nss-tools
Requires(post): systemd Requires(post): systemd
Requires(preun): systemd Requires(preun): systemd
Requires(postun): systemd Requires(postun): systemd
Requires(post): %insserv_prereq %fillup_prereq
%endif %endif
%description -n corosync-qdevice %description -n corosync-qdevice
@@ -483,7 +475,7 @@ This package contains the Corosync Cluster Engine Qdevice, script for creating
NSS certificates and an init script. NSS certificates and an init script.
%pre -n corosync-qdevice %pre -n corosync-qdevice
%service_add_pre corosync-qdevice %service_add_pre corosync-qdevice.service
%post -n corosync-qdevice %post -n corosync-qdevice
%{fillup_and_insserv -n corosync-qdevice} %{fillup_and_insserv -n corosync-qdevice}
@@ -514,22 +506,18 @@ fi
%{_sbindir}/corosync-qdevice %{_sbindir}/corosync-qdevice
%{_sbindir}/corosync-qdevice-net-certutil %{_sbindir}/corosync-qdevice-net-certutil
%{_sbindir}/corosync-qdevice-tool %{_sbindir}/corosync-qdevice-tool
%{_sysconfdir}/init.d/corosync-qdevice
%config(noreplace) /var/adm/fillup-templates/sysconfig.corosync-qdevice %config(noreplace) /var/adm/fillup-templates/sysconfig.corosync-qdevice
%if %{with systemd} %if %{with systemd}
%{_unitdir}/corosync-qdevice.service %{_unitdir}/corosync-qdevice.service
%{_sbindir}/rccorosync-qdevice
%dir %{_datadir}/corosync %dir %{_datadir}/corosync
%{_datadir}/corosync/corosync-qdevice %{_datadir}/corosync/corosync-qdevice
%else
%{_initrddir}/corosync-qdevice
%endif %endif
%{_mandir}/man8/corosync-qdevice-tool.8* %{_mandir}/man8/corosync-qdevice-tool.8*
%{_mandir}/man8/corosync-qdevice-net-certutil.8* %{_mandir}/man8/corosync-qdevice-net-certutil.8*
%{_mandir}/man8/corosync-qdevice.8* %{_mandir}/man8/corosync-qdevice.8*
%endif %endif
# optional qnetd
#
%if %{with qnetd} %if %{with qnetd}
%package -n corosync-qnetd %package -n corosync-qnetd
@@ -542,7 +530,6 @@ Requires(pre): shadow
Requires(post): systemd Requires(post): systemd
Requires(preun): systemd Requires(preun): systemd
Requires(postun): systemd Requires(postun): systemd
Requires(post): %insserv_prereq %fillup_prereq
%endif %endif
%description -n corosync-qnetd %description -n corosync-qnetd
@@ -550,13 +537,15 @@ This package contains the Corosync Cluster Engine Qdevice Network Daemon, script
NSS certificates and an init script. NSS certificates and an init script.
%pre -n corosync-qnetd %pre -n corosync-qnetd
getent group coroqnetd >/dev/null || groupadd -r coroqnetd getent group coroqnetd >/dev/null || groupadd -r coroqnetd -g 701
getent passwd coroqnetd >/dev/null || \ getent passwd coroqnetd >/dev/null || useradd -r -g coroqnetd -u 701 -s /sbin/nologin -c "User for corosync-qnetd" coroqnetd
useradd -r -g coroqnetd -d / -s /sbin/nologin -c "User for corosync-qnetd" coroqnetd
exit 0
%service_add_pre corosync-qnetd.service %service_add_pre corosync-qnetd.service
exit 0
%post -n corosync-qnetd %post -n corosync-qnetd
#%tmpfiles_create /usr/lib/tmpfiles.d/corosync-qnetd.conf
%if %{sles_version} > 0 %if %{sles_version} > 0
ln -s /run/corosync-qnetd /var/run/ ln -s /run/corosync-qnetd /var/run/
%endif %endif
@@ -579,21 +568,19 @@ fi
%files -n corosync-qnetd %files -n corosync-qnetd
%defattr(-,root,root,-) %defattr(-,root,root,-)
%dir %config(noreplace) %attr(770, coroqnetd, coroqnetd) %{_sysconfdir}/corosync/qnetd %dir %config(noreplace) %attr(750, coroqnetd, coroqnetd) %{_sysconfdir}/corosync/qnetd
#change corosync-qnetd to /run as /var/run is just symlink nowadays #change corosync-qnetd to /run as /var/run is just symlink nowadays
%ghost %attr(770, coroqnetd, coroqnetd) /run/corosync-qnetd %ghost %attr (750, coroqnetd, coroqnetd) /run/corosync-qnetd
%{_bindir}/corosync-qnetd %{_bindir}/corosync-qnetd
%{_bindir}/corosync-qnetd-certutil %{_bindir}/corosync-qnetd-certutil
%{_bindir}/corosync-qnetd-tool %{_bindir}/corosync-qnetd-tool
%{_sysconfdir}/init.d/corosync-qnetd
%config(noreplace) /var/adm/fillup-templates/sysconfig.corosync-qnetd %config(noreplace) /var/adm/fillup-templates/sysconfig.corosync-qnetd
%if %{with systemd} %if %{with systemd}
%{_unitdir}/corosync-qnetd.service %{_unitdir}/corosync-qnetd.service
%{_sbindir}/rccorosync-qnetd
%dir %{_datadir}/corosync %dir %{_datadir}/corosync
%{_datadir}/corosync/corosync-qnetd %{_datadir}/corosync/corosync-qnetd
%{_tmpfilesdir}/corosync-qnetd.conf %{_tmpfilesdir}/corosync-qnetd.conf
%else
%{_initrddir}/corosync-qnetd
%endif %endif
%{_mandir}/man8/corosync-qnetd-tool.8* %{_mandir}/man8/corosync-qnetd-tool.8*
%{_mandir}/man8/corosync-qnetd-certutil.8* %{_mandir}/man8/corosync-qnetd-certutil.8*