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

- make corosync.spec uniform (bsc#1051385)
Modified: corosync.spec
    1. there are some lines are commented in corosync.spec, will define new macro to make these lines uncommented
    2. in former, xmlconf, rdma and snmp were disabled, these features are wrongly enabled, will disable them

OBS-URL: https://build.opensuse.org/request/show/513099
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/corosync?expand=0&rev=96
This commit is contained in:
Bin Liu 2017-07-31 03:05:03 +00:00 committed by Git OBS Bridge
parent 9b7f65cbfb
commit f3fa54cd08
2 changed files with 31 additions and 41 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Jul 31 02:54:49 UTC 2017 - bliu@suse.com
- make corosync.spec uniform (bsc#1051385)
Modified: corosync.spec
1. there are some lines are commented in corosync.spec, will define new macro to make these lines uncommented
2. in former, xmlconf, rdma and snmp were disabled, these features are wrongly enabled, will disable them
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jul 12 05:25:45 UTC 2017 - bliu@suse.com Wed Jul 12 05:25:45 UTC 2017 - bliu@suse.com

View File

@ -23,15 +23,16 @@
# to disable or enable specific features # to disable or enable specific features
%define with_testagents 1 %define with_testagents 1
%define with_watchdog 1 %define with_watchdog 1
#%define with_monitoring 0 %define with_monitoring 0
%define with_snmp 1 %define with_snmp 0
#%define with_dbus 1 %define with_dbus 0
%define with_rdma 1 %define with_rdma 0
%define with_systemd 1 %define with_systemd 1
%define with_xmlconf 1 %define with_xmlconf 0
%define with_runautogen 1 %define with_runautogen 1
%define with_qdevices 1 %define with_qdevices 1
%define with_qnetd 1 %define with_qnetd 1
%define with_upstart 0
%if 0%{?sles_version} == 12 %if 0%{?sles_version} == 12
%ifnarch s390 s390x %ifnarch s390 s390x
%define buildib 1 %define buildib 1
@ -47,7 +48,6 @@ License: BSD-3-Clause
Group: Productivity/Clustering/HA Group: Productivity/Clustering/HA
Version: 2.4.2 Version: 2.4.2
Release: 0 Release: 0
#Release: 1%{?gitver}%{?dist}
Url: http://corosync.github.io/corosync/ Url: http://corosync.github.io/corosync/
Source0: %{name}-%{version}.tar.gz Source0: %{name}-%{version}.tar.gz
Source2: baselibs.conf Source2: baselibs.conf
@ -96,9 +96,9 @@ BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: libtool BuildRequires: libtool
%endif %endif
#%if %{with monitoring} %if %{with_monitoring}
#BuildRequires: libstatgrab-devel BuildRequires: libstatgrab-devel
#%endif %endif
%if %{with_rdma} %if %{with_rdma}
BuildRequires: libibverbs-devel BuildRequires: libibverbs-devel
BuildRequires: librdmacm-devel BuildRequires: librdmacm-devel
@ -106,9 +106,9 @@ BuildRequires: librdmacm-devel
%if %{with_snmp} %if %{with_snmp}
BuildRequires: net-snmp-devel BuildRequires: net-snmp-devel
%endif %endif
#%if %{with dbus} %if %{with_dbus}
#BuildRequires: dbus-1-devel BuildRequires: dbus-1-devel
#%endif %endif
%if %{with_systemd} %if %{with_systemd}
BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(systemd)
Requires(post): systemd Requires(post): systemd
@ -197,10 +197,10 @@ rm -rf %{buildroot}
make install DESTDIR=%{buildroot} make install DESTDIR=%{buildroot}
#%if %{with dbus} %if %{with_dbus}
#mkdir -p -m 0700 %{buildroot}/%{_sysconfdir}/dbus-1/system.d 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 install -m 644 %{_builddir}/%{name}-%{version}/conf/corosync-signals.conf %{buildroot}/%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
#%endif %endif
%if %{with_systemd} %if %{with_systemd}
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rccorosync ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rccorosync
%endif %endif
@ -219,33 +219,25 @@ install -m 0644 tools/corosync-notifyd.sysconfig.example %{buildroot}/usr/lib/t
install -m 0644 conf/corosync.conf.example* %{buildroot}/usr/share/doc/packages/corosync/ 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/corosync/corosync.conf.example*
rm -rf %{buildroot}/etc/logrotate.d/ rm -rf %{buildroot}/etc/logrotate.d/
# /etc/sysconfig/corosync-notifyd
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
install -m 644 tools/corosync-notifyd.sysconfig.example \ install -m 644 tools/corosync-notifyd.sysconfig.example \
%{buildroot}/usr/lib/tmpfiles.d/corosync-notifyd %{buildroot}/usr/lib/tmpfiles.d/corosync-notifyd
# %{buildroot}%{_sysconfdir}/sysconfig/corosync-notifyd
# /etc/sysconfig/corosync
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
# %{buildroot}%{_sysconfdir}/sysconfig/corosync
#add init scripts for corosync, corosync-qdevice, corosync-qnetd #add init scripts for corosync, corosync-qdevice, corosync-qnetd
install -m 755 init/corosync %{buildroot}%{_sysconfdir}/init.d/corosync 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-qdevice %{buildroot}%{_sysconfdir}/init.d/corosync-qdevice
install -m 755 init/corosync-qnetd %{buildroot}%{_sysconfdir}/init.d/corosync-qnetd 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}
# /etc/sysconfig/corosync-qdevice
install -m 644 init/corosync-qdevice.sysconfig.example \ install -m 644 init/corosync-qdevice.sysconfig.example \
%{buildroot}/var/adm/fillup-templates/sysconfig.corosync-qdevice %{buildroot}/var/adm/fillup-templates/sysconfig.corosync-qdevice
# %{buildroot}%{_sysconfdir}/sysconfig/corosync-qdevice
install -m 770 -d %{buildroot}/run/corosync-qdevice install -m 770 -d %{buildroot}/run/corosync-qdevice
%endif %endif
%if %{with_qnetd} %if %{with_qnetd}
# /etc/sysconfig/corosync-qnetd
install -m 644 init/corosync-qnetd.sysconfig.example \ install -m 644 init/corosync-qnetd.sysconfig.example \
%{buildroot}/var/adm/fillup-templates/sysconfig.corosync-qnetd %{buildroot}/var/adm/fillup-templates/sysconfig.corosync-qnetd
# %{buildroot}%{_sysconfdir}/sysconfig/corosync-qnetd
install -m 770 -d %{buildroot}/run/corosync-qnetd install -m 770 -d %{buildroot}/run/corosync-qnetd
%if %{with_systemd} %if %{with_systemd}
sed -i -e 's/^#User=/User=/' \ sed -i -e 's/^#User=/User=/' \
@ -267,7 +259,6 @@ APIs and libraries, default configuration files, and an init script.
%pre %pre
%if %{with_systemd} %if %{with_systemd}
#%service_add_pre corosync.service corosync-notifyd.service
#we do not use corosync-notifyd.service #we do not use corosync-notifyd.service
%service_add_pre corosync.service %service_add_pre corosync.service
%endif %endif
@ -275,7 +266,6 @@ APIs and libraries, default configuration files, and an init script.
%post %post
%{fillup_and_insserv -n corosync} %{fillup_and_insserv -n corosync}
%if %{with_systemd} %if %{with_systemd}
#%service_add_post corosync.service corosync-notifyd.service
#we do not use corosync-notifyd.service #we do not use corosync-notifyd.service
%service_add_post corosync.service %service_add_post corosync.service
%endif %endif
@ -331,13 +321,11 @@ fi
%config(noreplace) /usr/share/doc/packages/corosync/corosync.conf.example %config(noreplace) /usr/share/doc/packages/corosync/corosync.conf.example
%config(noreplace) /usr/share/doc/packages/corosync/corosync.conf.example.udpu %config(noreplace) /usr/share/doc/packages/corosync/corosync.conf.example.udpu
%config(noreplace) /usr/lib/tmpfiles.d/corosync-notifyd %config(noreplace) /usr/lib/tmpfiles.d/corosync-notifyd
#%config(noreplace) %{_sysconfdir}/sysconfig/corosync
%config(noreplace) /var/adm/fillup-templates/sysconfig.corosync %config(noreplace) /var/adm/fillup-templates/sysconfig.corosync
#%config(noreplace) %{_sysconfdir}/logrotate.d/corosync
#%if %{with dbus} %if %{with_dbus}
#%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf %{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
#%endif %endif
%if %{with_snmp} %if %{with_snmp}
%{_datadir}/snmp/mibs/COROSYNC-MIB.txt %{_datadir}/snmp/mibs/COROSYNC-MIB.txt
%endif %endif
@ -351,10 +339,10 @@ fi
%{_initrddir}/corosync %{_initrddir}/corosync
%{_initrddir}/corosync-notifyd %{_initrddir}/corosync-notifyd
%endif %endif
#%if %{with_upstart} %if %{with_upstart}
#%{_sysconfdir}/init/corosync.conf %{_sysconfdir}/init/corosync.conf
#%{_sysconfdir}/init/corosync-notifyd.conf %{_sysconfdir}/init/corosync-notifyd.conf
#%endif %endif
%dir %{_localstatedir}/lib/corosync %dir %{_localstatedir}/lib/corosync
%dir %{_localstatedir}/log/cluster %dir %{_localstatedir}/log/cluster
%{_mandir}/man8/corosync_overview.8* %{_mandir}/man8/corosync_overview.8*
@ -536,13 +524,11 @@ fi
%dir %config(noreplace) %{_sysconfdir}/corosync/qdevice/net %dir %config(noreplace) %{_sysconfdir}/corosync/qdevice/net
#change corosync-qdevice to /run as /var/run is symlink nowdays #change corosync-qdevice to /run as /var/run is symlink nowdays
%ghost /run/corosync-qdevice %ghost /run/corosync-qdevice
#%dir %{_localstatedir}/run/corosync-qdevice
%{_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 %{_sysconfdir}/init.d/corosync-qdevice
%config(noreplace) /var/adm/fillup-templates/sysconfig.corosync-qdevice %config(noreplace) /var/adm/fillup-templates/sysconfig.corosync-qdevice
#%config(noreplace) %{_sysconfdir}/sysconfig/corosync-qdevice
%if %{with_systemd} %if %{with_systemd}
%{_unitdir}/corosync-qdevice.service %{_unitdir}/corosync-qdevice.service
%dir %{_datadir}/corosync %dir %{_datadir}/corosync
@ -583,8 +569,6 @@ getent passwd coroqnetd >/dev/null || \
exit 0 exit 0
%post -n corosync-qnetd %post -n corosync-qnetd
#mkdir -m 770 /run/corosync-qnetd
#chown coroqnetd:coroqnetd /run/corosync-qnetd
%if %{sles_version} > 0 %if %{sles_version} > 0
ln -s /run/corosync-qnetd /var/run/ ln -s /run/corosync-qnetd /var/run/
%endif %endif
@ -619,13 +603,11 @@ fi
%dir %config(noreplace) %attr(770, coroqnetd, coroqnetd) %{_sysconfdir}/corosync/qnetd %dir %config(noreplace) %attr(770, 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(770, coroqnetd, coroqnetd) /run/corosync-qnetd
#%dir %attr(770, coroqnetd, coroqnetd) %{_localstatedir}/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 %{_sysconfdir}/init.d/corosync-qnetd
%config(noreplace) /var/adm/fillup-templates/sysconfig.corosync-qnetd %config(noreplace) /var/adm/fillup-templates/sysconfig.corosync-qnetd
#%config(noreplace) %{_sysconfdir}/sysconfig/corosync-qnetd
%if %{with_systemd} %if %{with_systemd}
%{_unitdir}/corosync-qnetd.service %{_unitdir}/corosync-qnetd.service
%dir %{_datadir}/corosync %dir %{_datadir}/corosync