forked from pool/corosync
Accepting request 438123 from home:BinLiu:branches:network:ha-clustering:Factory
- upgrade to corosync-2.4.1(bsc#1004967) corosync-2.4.1: Low: totemsrp: Addition of the log. cts: Make it run with pacemaker-1.13+ Config: Flag config uidgid entries Spec: Qdevice require same version of corosync corosync-2.4.0: qdevice and qnet config: get_cluster_mcast_addr error is not fatal some typo fixes corosync-v2.3.6 CFG: Prevent CFG orignating messages during SYNC wd: fix setting of watchdog timeouts votequorum: Don't send multiple callbacks when nodes join cfgtool: Display nodeid as unsigned int quorum: Display node id as unsigned int. Check for fdatasync Fix detection of qb_log_thread_priority_set totempg: Fix memory leak cpg: Memory not unmapped in cpg_zcb_free cpg: Handle ipc error in cpg_zcb_alloc/free totemconfig: Explicitly pass IP version parser: Make config file parser more hierarchy logsys: fix TOTEM logging when corosync built out of tree wd: make watchdog device configurable schedwrk: Cleanup and make it work on PPC BE Reapply config defaults corosync.conf reload logconfig: Fix logging reload disabling logfiles - Default token timeout was 5000 ms in SLE 11 SP4, but is 1000 ms in SLE 12(bsc#1001164) OBS-URL: https://build.opensuse.org/request/show/438123 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/corosync?expand=0&rev=71
This commit is contained in:
378
corosync.spec
378
corosync.spec
@@ -21,17 +21,17 @@
|
||||
# Conditionals
|
||||
# Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>"
|
||||
# to disable or enable specific features
|
||||
%bcond_with testagents
|
||||
%define with_testagents 1
|
||||
%bcond_with watchdog
|
||||
%bcond_with monitoring
|
||||
%bcond_with snmp
|
||||
%bcond_with rdma
|
||||
%define with_testagents 1
|
||||
%define with_watchdog 1
|
||||
#%define with_monitoring 0
|
||||
%define with_snmp 1
|
||||
#%define with_dbus 1
|
||||
%define with_rdma 1
|
||||
%define with_systemd 1
|
||||
%bcond_with upstart
|
||||
%bcond_with xmlconf
|
||||
%bcond_with runautogen
|
||||
%define with_xmlconf 1
|
||||
%define with_runautogen 1
|
||||
%define with_qdevices 1
|
||||
%define with_qnetd 1
|
||||
|
||||
%if 0%{?sles_version} == 12
|
||||
%ifnarch s390 s390x
|
||||
@@ -44,19 +44,22 @@
|
||||
|
||||
Name: corosync
|
||||
Summary: The Corosync Cluster Engine and Application Programming Interfaces
|
||||
License: BSD-3-Clause
|
||||
Group: Productivity/Clustering/HA
|
||||
Version: 2.3.5
|
||||
License: BSD
|
||||
Group: System Environment/Base
|
||||
Version: 2.4.1
|
||||
Release: 0
|
||||
Url: http://www.corosync.org
|
||||
#Release: 1%{?gitver}%{?dist}
|
||||
Url: http://corosync.github.io/corosync/
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Source2: baselibs.conf
|
||||
Patch1: corosync-init-lockfile-path-error.patch
|
||||
Patch2: corosync-cts-api-error.patch
|
||||
Patch3: bnc#867767-add-version.patch
|
||||
Patch4: bnc#872651-stop-cluster.patch
|
||||
Patch5: bnc#882449-corosync-conf-example.patch
|
||||
Patch6: corosync-2.3.4-fix-bashisms.patch
|
||||
Patch2: bnc#867767-add-version.patch
|
||||
Patch3: bnc#872651-stop-cluster.patch
|
||||
Patch4: bnc#882449-corosync-conf-example.patch
|
||||
Patch5: corosync-2.3.4-fix-bashisms.patch
|
||||
Patch6: bsc#1001164-corosync.conf-example.patch
|
||||
Patch7: corosync-start-stop-level.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
# openais is indeed gone and should be uninstalled. Yes, we do not
|
||||
# provide openais on purpose, the package has been deleted.
|
||||
@@ -67,47 +70,51 @@ Conflicts: openais < 1.2
|
||||
Requires: libcorosync4 = %{version}-%{release}
|
||||
Requires(pre): /usr/sbin/useradd
|
||||
Requires(post): /sbin/chkconfig
|
||||
Requires(post): %insserv_prereq %fillup_prereq
|
||||
Requires(preun): /sbin/chkconfig
|
||||
Conflicts: openais <= 0.89, openais-devel <= 0.89
|
||||
|
||||
# Build bits
|
||||
|
||||
Requires: libcorosync4 = %{version}-%{release}
|
||||
#Requires(pre): /usr/sbin/useradd
|
||||
#Requires(post): /sbin/chkconfig
|
||||
#Requires(preun): /sbin/chkconfig
|
||||
|
||||
BuildRequires: groff
|
||||
BuildRequires: libqb-devel
|
||||
BuildRequires: mozilla-nss
|
||||
BuildRequires: mozilla-nss-devel
|
||||
BuildRequires: zlib-devel
|
||||
%if %{with_runautogen}
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: libtool
|
||||
|
||||
%endif
|
||||
%if %{with monitoring}
|
||||
BuildRequires: libstatgrab-devel
|
||||
%endif
|
||||
%if %{with rdma}
|
||||
#%if %{with monitoring}
|
||||
#BuildRequires: libstatgrab-devel
|
||||
#%endif
|
||||
%if %{with_rdma}
|
||||
BuildRequires: libibverbs-devel
|
||||
BuildRequires: librdmacm-devel
|
||||
%endif
|
||||
%if %{with snmp}
|
||||
%if %{with_snmp}
|
||||
BuildRequires: net-snmp-devel
|
||||
%endif
|
||||
%if %{with dbus}
|
||||
BuildRequires: dbus-1-devel
|
||||
%endif
|
||||
%if %{with systemd}
|
||||
#%if %{with dbus}
|
||||
#BuildRequires: dbus-1-devel
|
||||
#%endif
|
||||
%if %{with_systemd}
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
%endif
|
||||
%if %{with xmlconf}
|
||||
%if %{with_xmlconf}
|
||||
Requires: libxslt
|
||||
%endif
|
||||
%if %{with_qdevices} || %{with_qnetd}
|
||||
Requires: mozilla-nss-tools
|
||||
%endif
|
||||
%if %{with_qnetd}
|
||||
BuildRequires: sed
|
||||
%endif
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
@@ -117,51 +124,48 @@ Requires: libxslt
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
|
||||
%build
|
||||
%if %{with runautogen}
|
||||
%if %{with_runautogen}
|
||||
./autogen.sh
|
||||
%endif
|
||||
|
||||
%if %{with rdma}
|
||||
%if %{with_rdma}
|
||||
export ibverbs_CFLAGS=-I/usr/include/infiniband \
|
||||
export ibverbs_LIBS=-libverbs \
|
||||
export rdmacm_CFLAGS=-I/usr/include/rdma \
|
||||
export rdmacm_LIBS=-lrdmacm \
|
||||
%endif
|
||||
%{configure} \
|
||||
%if %{with testagents}
|
||||
%if %{with_testagents}
|
||||
--enable-testagents \
|
||||
--enable-augeas \
|
||||
--enable-debug \
|
||||
%endif
|
||||
%if %{with watchdog}
|
||||
%if %{with_watchdog}
|
||||
--enable-watchdog \
|
||||
%endif
|
||||
%if %{with monitoring}
|
||||
--enable-monitoring \
|
||||
%endif
|
||||
%if %{with snmp}
|
||||
%if %{with_snmp}
|
||||
--enable-snmp \
|
||||
%endif
|
||||
%if %{with dbus}
|
||||
--enable-dbus \
|
||||
%endif
|
||||
%if %{with rdma}
|
||||
%if %{with_rdma}
|
||||
--enable-rdma \
|
||||
%endif
|
||||
%if %{with systemd}
|
||||
%if %{with_systemd}
|
||||
--enable-systemd \
|
||||
%endif
|
||||
%if %{with upstart}
|
||||
--enable-upstart \
|
||||
%endif
|
||||
%if %{with xmlconf}
|
||||
%if %{with_xmlconf}
|
||||
--enable-xmlconf \
|
||||
%endif
|
||||
%if %{with_qdevices}
|
||||
--enable-qdevices \
|
||||
%endif
|
||||
%if %{with_qnetd}
|
||||
--enable-qnetd \
|
||||
%endif
|
||||
--with-initddir=%{_initrddir} \
|
||||
--with-systemddir=%{_unitdir} \
|
||||
--with-upstartdir=%{_sysconfdir}/init
|
||||
--with-upstartdir=%{_sysconfdir}/init \
|
||||
--with-tmpfilesdir=%{_tmpfilesdir}
|
||||
|
||||
make %{_smp_mflags}
|
||||
|
||||
@@ -169,12 +173,11 @@ make %{_smp_mflags}
|
||||
rm -rf %{buildroot}
|
||||
|
||||
make install DESTDIR=%{buildroot}
|
||||
rm -rf %{buildroot}/usr/share/doc/corosync/html
|
||||
rm -rf %{buildroot}/usr/share/doc/corosync
|
||||
%if %{with dbus}
|
||||
mkdir -p -m 0700 %{buildroot}/%{_sysconfdir}/dbus-1/system.d
|
||||
install -m 644 %{_builddir}/%{name}-%{version}/conf/corosync-signals.conf %{buildroot}/%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
|
||||
%endif
|
||||
|
||||
#%if %{with dbus}
|
||||
#mkdir -p -m 0700 %{buildroot}/%{_sysconfdir}/dbus-1/system.d
|
||||
#install -m 644 %{_builddir}/%{name}-%{version}/conf/corosync-signals.conf %{buildroot}/%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
|
||||
#%endif
|
||||
%if %{with_systemd}
|
||||
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rccorosync
|
||||
%endif
|
||||
@@ -187,13 +190,53 @@ rm -f %{buildroot}%{_libdir}/*.la
|
||||
rm -rf %{buildroot}%{_docdir}/*
|
||||
mkdir -p %{buildroot}/usr/lib/tmpfiles.d/
|
||||
mkdir -p %{buildroot}/usr/share/doc/packages/corosync/
|
||||
mkdir -p %{buildroot}/var/adm/fillup-templates/
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/init.d/
|
||||
install -m 0644 tools/corosync-notifyd.sysconfig.example %{buildroot}/usr/lib/tmpfiles.d/corosync-notifyd
|
||||
install -m 0644 conf/corosync.conf.example* %{buildroot}/usr/share/doc/packages/corosync/
|
||||
rm -rf %{buildroot}/etc/corosync/corosync.conf.example*
|
||||
rm -rf %{buildroot}/etc/logrotate.d/
|
||||
# /etc/sysconfig/corosync-notifyd
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
||||
install -m 644 tools/corosync-notifyd.sysconfig.example \
|
||||
%{buildroot}/usr/lib/tmpfiles.d/corosync-notifyd
|
||||
# %{buildroot}%{_sysconfdir}/sysconfig/corosync-notifyd
|
||||
# /etc/sysconfig/corosync
|
||||
install -m 644 init/corosync.sysconfig.example \
|
||||
%{buildroot}/var/adm/fillup-templates/sysconfig.corosync
|
||||
# %{buildroot}%{_sysconfdir}/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/
|
||||
%if %{with_qdevices}
|
||||
# /etc/sysconfig/corosync-qdevice
|
||||
install -m 644 init/corosync-qdevice.sysconfig.example \
|
||||
%{buildroot}/var/adm/fillup-templates/sysconfig.corosync-qdevice
|
||||
# %{buildroot}%{_sysconfdir}/sysconfig/corosync-qdevice
|
||||
install -m 770 -d %{buildroot}/run/corosync-qdevice
|
||||
%endif
|
||||
|
||||
%if %{with_qnetd}
|
||||
# /etc/sysconfig/corosync-qnetd
|
||||
install -m 644 init/corosync-qnetd.sysconfig.example \
|
||||
%{buildroot}/var/adm/fillup-templates/sysconfig.corosync-qnetd
|
||||
# %{buildroot}%{_sysconfdir}/sysconfig/corosync-qnetd
|
||||
install -m 770 -d %{buildroot}/run/corosync-qnetd
|
||||
%if %{with_systemd}
|
||||
sed -i -e 's/^#User=/User=/' \
|
||||
%{buildroot}%{_unitdir}/corosync-qnetd.service
|
||||
sed -i -e 's/root/coroqnetd/g' \
|
||||
%{buildroot}%{_tmpfilesdir}/corosync-qnetd.conf
|
||||
%else
|
||||
sed -i -e 's/^COROSYNC_QNETD_RUNAS=""$/COROSYNC_QNETD_RUNAS="coroqnetd"/' \
|
||||
%{buildroot}%{_sysconfdir}/sysconfig/corosync-qnetd
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
#rm -rf %{buildroot}
|
||||
|
||||
%description
|
||||
This package contains the Corosync Cluster Engine Executive, several default
|
||||
@@ -205,7 +248,8 @@ APIs and libraries, default configuration files, and an init script.
|
||||
%endif
|
||||
|
||||
%post
|
||||
%if %{with systemd} && 0%{?systemd_post:1}
|
||||
%{fillup_and_insserv -n corosync}
|
||||
%if %{with_systemd} && 0%{?systemd_post:1}
|
||||
%service_add_post corosync.service corosync-notifyd.service
|
||||
%endif
|
||||
rm -rf %{_sysconfdir}/corosync/corosync.conf.example %{_sysconfdir}/corosync/corosync.conf.example.unicast
|
||||
@@ -215,9 +259,9 @@ ln -s /usr/share/doc/packages/corosync/corosync.conf.example.udpu %{_sysconfdir}
|
||||
%preun
|
||||
|
||||
unlink %{_sysconfdir}/corosync/corosync.conf.example.unicast
|
||||
unlink %{_sysconfdir}//corosync/corosync.conf.example
|
||||
unlink %{_sysconfdir}/corosync/corosync.conf.example
|
||||
|
||||
%if %{with systemd} && 0%{?systemd_preun:1}
|
||||
%if %{with_systemd} && 0%{?systemd_preun:1}
|
||||
%systemd_preun corosync.service
|
||||
%else
|
||||
if [ $1 -eq 0 ]; then
|
||||
@@ -227,14 +271,13 @@ fi
|
||||
%endif
|
||||
|
||||
%postun
|
||||
%if %{with systemd} && 0%{?systemd_postun:1}
|
||||
%if %{with_systemd} && 0%{?systemd_postun:1}
|
||||
%systemd_postun
|
||||
%endif
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE
|
||||
%doc SECURITY
|
||||
%doc LICENSE SECURITY
|
||||
%{_sbindir}/corosync
|
||||
%{_sbindir}/corosync-keygen
|
||||
%{_sbindir}/corosync-cmapctl
|
||||
@@ -242,11 +285,12 @@ fi
|
||||
%{_sbindir}/corosync-cpgtool
|
||||
%{_sbindir}/corosync-quorumtool
|
||||
%{_sbindir}/corosync-notifyd
|
||||
%{_sysconfdir}/init.d/corosync
|
||||
%if %{with_systemd}
|
||||
%{_sbindir}/rccorosync
|
||||
%endif
|
||||
%{_bindir}/corosync-blackbox
|
||||
%if %{with xmlconf}
|
||||
%if %{with_xmlconf}
|
||||
%{_bindir}/corosync-xmlproc
|
||||
%config(noreplace) %{_sysconfdir}/corosync/corosync.xml.example
|
||||
%dir %{_datadir}/corosync
|
||||
@@ -256,17 +300,21 @@ fi
|
||||
%endif
|
||||
%dir %{_sysconfdir}/corosync
|
||||
%dir %{_sysconfdir}/corosync/uidgid.d
|
||||
%dir %{_datadir}/doc/corosync/
|
||||
%config(noreplace) /usr/share/doc/packages/corosync/corosync.conf.example
|
||||
%config(noreplace) /usr/share/doc/packages/corosync/corosync.conf.example.udpu
|
||||
#%config(noreplace) %{_sysconfdir}/sysconfig/corosync-notifyd
|
||||
%config(noreplace) /usr/lib/tmpfiles.d/corosync-notifyd
|
||||
%if %{with dbus}
|
||||
%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
|
||||
%endif
|
||||
%if %{with snmp}
|
||||
#%config(noreplace) %{_sysconfdir}/sysconfig/corosync
|
||||
%config(noreplace) /var/adm/fillup-templates/sysconfig.corosync
|
||||
#%config(noreplace) %{_sysconfdir}/logrotate.d/corosync
|
||||
|
||||
#%if %{with dbus}
|
||||
#%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
|
||||
#%endif
|
||||
%if %{with_snmp}
|
||||
%{_datadir}/snmp/mibs/COROSYNC-MIB.txt
|
||||
%endif
|
||||
%if %{with systemd}
|
||||
%if %{with_systemd}
|
||||
%{_unitdir}/corosync.service
|
||||
%{_unitdir}/corosync-notifyd.service
|
||||
%dir %{_datadir}/corosync
|
||||
@@ -276,10 +324,10 @@ fi
|
||||
%{_initrddir}/corosync
|
||||
%{_initrddir}/corosync-notifyd
|
||||
%endif
|
||||
%if %{with upstart}
|
||||
%{_sysconfdir}/init/corosync.conf
|
||||
%{_sysconfdir}/init/corosync-notifyd.conf
|
||||
%endif
|
||||
#%if %{with_upstart}
|
||||
#%{_sysconfdir}/init/corosync.conf
|
||||
#%{_sysconfdir}/init/corosync-notifyd.conf
|
||||
#%endif
|
||||
%dir %{_localstatedir}/lib/corosync
|
||||
%dir %{_localstatedir}/log/cluster
|
||||
%{_mandir}/man8/corosync_overview.8*
|
||||
@@ -294,10 +342,10 @@ fi
|
||||
%{_mandir}/man5/corosync.conf.5*
|
||||
%{_mandir}/man5/votequorum.5*
|
||||
%{_mandir}/man8/cmap_keys.8*
|
||||
|
||||
%{_datadir}/doc/corosync/*
|
||||
# optional testagent rpm
|
||||
#
|
||||
%if %{with testagents}
|
||||
%if %{with_testagents}
|
||||
|
||||
%package -n corosync-testagents
|
||||
Summary: The Corosync Cluster Engine Test Agents
|
||||
@@ -310,16 +358,11 @@ This package contains corosync test agents.
|
||||
%files -n corosync-testagents
|
||||
%defattr(755,root,root,-)
|
||||
%dir %{_datadir}/corosync/tests
|
||||
%dir %{_datadir}/augeas
|
||||
%dir %{_datadir}/augeas/lenses
|
||||
%dir %{_datadir}/augeas/lenses/tests
|
||||
|
||||
%{_datadir}/corosync/tests/mem_leak_test.sh
|
||||
%{_datadir}/corosync/tests/net_breaker.sh
|
||||
%{_datadir}/corosync/tests/cmap-dispatch-deadlock.sh
|
||||
%{_datadir}/corosync/tests/shm_leak_audit.sh
|
||||
%{_datadir}/augeas/lenses/corosync.aug
|
||||
%{_datadir}/augeas/lenses/tests/test_corosync.aug
|
||||
%{_bindir}/cpg_test_agent
|
||||
%{_bindir}/sam_test_agent
|
||||
%{_bindir}/votequorum_test_agent
|
||||
@@ -408,4 +451,167 @@ The Corosync Cluster Engine APIs.
|
||||
%post -n libcorosync-devel -p /sbin/ldconfig
|
||||
%postun -n libcorosync-devel -p /sbin/ldconfig
|
||||
|
||||
# optional qdevices
|
||||
#
|
||||
%if %{with_qdevices}
|
||||
|
||||
%package -n corosync-qdevice
|
||||
Summary: The Corosync Cluster Engine Qdevice
|
||||
Group: System Environment/Base
|
||||
Requires: corosync
|
||||
Requires: mozilla-nss-tools
|
||||
|
||||
%if %{with_systemd}
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
Requires(post): %insserv_prereq %fillup_prereq
|
||||
%endif
|
||||
|
||||
%description -n corosync-qdevice
|
||||
This package contains the Corosync Cluster Engine Qdevice, script for creating
|
||||
NSS certificates and an init script.
|
||||
|
||||
%post -n corosync-qdevice
|
||||
%{fillup_and_insserv -n corosync-qdevice}
|
||||
#mkdir /run/corosync-qdevice
|
||||
%if %{sles_version} > 0
|
||||
ln -s /run/corosync-qdevice /var/run/
|
||||
%endif
|
||||
%if %{with_systemd} && 0%{?systemd_post:1}
|
||||
%systemd_post corosync-qdevice.service
|
||||
%else
|
||||
if [ $1 -eq 1 ]; then
|
||||
/sbin/chkconfig --add corosync-qdevice || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%preun -n corosync-qdevice
|
||||
%if %{with_systemd} && 0%{?systemd_preun:1}
|
||||
%systemd_preun corosync-qdevice.service
|
||||
%else
|
||||
if [ $1 -eq 0 ]; then
|
||||
/sbin/service corosync-qdevice stop &>/dev/null || :
|
||||
/sbin/chkconfig --del corosync-qdevice || :
|
||||
fi
|
||||
%endif
|
||||
%if %{sles_version}
|
||||
unlink /var/run/corosync-qdevice
|
||||
%endif
|
||||
|
||||
%postun -n corosync-qdevice
|
||||
%if %{with_systemd} && 0%{?systemd_postun:1}
|
||||
%systemd_postun
|
||||
%endif
|
||||
|
||||
%files -n corosync-qdevice
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{_sysconfdir}/corosync/qdevice
|
||||
%dir %config(noreplace) %{_sysconfdir}/corosync/qdevice/net
|
||||
#change corosync-qdevice to /run as /var/run is symlink nowdays
|
||||
%ghost /run/corosync-qdevice
|
||||
#%dir %{_localstatedir}/run/corosync-qdevice
|
||||
%{_sbindir}/corosync-qdevice
|
||||
%{_sbindir}/corosync-qdevice-net-certutil
|
||||
%{_sbindir}/corosync-qdevice-tool
|
||||
%{_sysconfdir}/init.d/corosync-qdevice
|
||||
%config(noreplace) /var/adm/fillup-templates/sysconfig.corosync-qdevice
|
||||
#%config(noreplace) %{_sysconfdir}/sysconfig/corosync-qdevice
|
||||
%if %{with_systemd}
|
||||
%{_unitdir}/corosync-qdevice.service
|
||||
%dir %{_datadir}/corosync
|
||||
%{_datadir}/corosync/corosync-qdevice
|
||||
%else
|
||||
%{_initrddir}/corosync-qdevice
|
||||
%endif
|
||||
%{_mandir}/man8/corosync-qdevice-tool.8*
|
||||
%{_mandir}/man8/corosync-qdevice-net-certutil.8*
|
||||
%{_mandir}/man8/corosync-qdevice.8*
|
||||
%endif
|
||||
|
||||
# optional qnetd
|
||||
#
|
||||
%if %{with_qnetd}
|
||||
|
||||
%package -n corosync-qnetd
|
||||
Summary: The Corosync Cluster Engine Qdevice Network Daemon
|
||||
Group: System Environment/Base
|
||||
Requires: mozilla-nss-tools
|
||||
Requires(pre): shadow
|
||||
|
||||
%if %{with_systemd}
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
Requires(post): %insserv_prereq %fillup_prereq
|
||||
%endif
|
||||
|
||||
%description -n corosync-qnetd
|
||||
This package contains the Corosync Cluster Engine Qdevice Network Daemon, script for creating
|
||||
NSS certificates and an init script.
|
||||
|
||||
%pre -n corosync-qnetd
|
||||
getent group coroqnetd >/dev/null || groupadd -r coroqnetd
|
||||
getent passwd coroqnetd >/dev/null || \
|
||||
useradd -r -g coroqnetd -d / -s /sbin/nologin -c "User for corosync-qnetd" coroqnetd
|
||||
exit 0
|
||||
|
||||
%post -n corosync-qnetd
|
||||
#mkdir -m 770 /run/corosync-qnetd
|
||||
#chown coroqnetd:coroqnetd /run/corosync-qnetd
|
||||
%if %{sles_version} > 0
|
||||
ln -s /run/corosync-qnetd /var/run/
|
||||
%endif
|
||||
%{fillup_and_insserv -n corosync-qnetd}
|
||||
%if %{with_systemd} && 0%{?systemd_post:1}
|
||||
%systemd_post corosync-qnetd.service
|
||||
%else
|
||||
if [ $1 -eq 1 ]; then
|
||||
/sbin/chkconfig --add corosync-qnetd || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%preun -n corosync-qnetd
|
||||
%if %{with_systemd} && 0%{?systemd_preun:1}
|
||||
%systemd_preun corosync-qnetd.service
|
||||
%else
|
||||
if [ $1 -eq 0 ]; then
|
||||
/sbin/service corosync-qnetd stop &>/dev/null || :
|
||||
/sbin/chkconfig --del corosync-qnetd || :
|
||||
fi
|
||||
%endif
|
||||
%if %{sles_version} > 0
|
||||
unlink /var/run/corosync-qnetd
|
||||
%endif
|
||||
|
||||
%postun -n corosync-qnetd
|
||||
%if %{with_systemd} && 0%{?systemd_postun:1}
|
||||
%systemd_postun
|
||||
%endif
|
||||
|
||||
%files -n corosync-qnetd
|
||||
%defattr(-,root,root,-)
|
||||
%dir %config(noreplace) %attr(770, coroqnetd, coroqnetd) %{_sysconfdir}/corosync/qnetd
|
||||
#change corosync-qnetd to /run as /var/run is just symlink nowadays
|
||||
%ghost %attr(770, coroqnetd, coroqnetd) /run/corosync-qnetd
|
||||
#%dir %attr(770, coroqnetd, coroqnetd) %{_localstatedir}/run/corosync-qnetd
|
||||
%{_bindir}/corosync-qnetd
|
||||
%{_bindir}/corosync-qnetd-certutil
|
||||
%{_bindir}/corosync-qnetd-tool
|
||||
%{_sysconfdir}/init.d/corosync-qnetd
|
||||
%config(noreplace) /var/adm/fillup-templates/sysconfig.corosync-qnetd
|
||||
#%config(noreplace) %{_sysconfdir}/sysconfig/corosync-qnetd
|
||||
%if %{with_systemd}
|
||||
%{_unitdir}/corosync-qnetd.service
|
||||
%dir %{_datadir}/corosync
|
||||
%{_datadir}/corosync/corosync-qnetd
|
||||
%{_tmpfilesdir}/corosync-qnetd.conf
|
||||
%else
|
||||
%{_initrddir}/corosync-qnetd
|
||||
%endif
|
||||
%{_mandir}/man8/corosync-qnetd-tool.8*
|
||||
%{_mandir}/man8/corosync-qnetd-certutil.8*
|
||||
%{_mandir}/man8/corosync-qnetd.8*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user