Hi Kazunori-san, On Wed, Jun 18, 2014 at 05:57:14PM +0900, Kazunori INOUE wrote: > Hi, > > make of cluster-glue fails on RHEL7. > > $ cat /etc/redhat-release > Red Hat Enterprise Linux Server release 7.0 (Maipo) > > $ hg parents > changeset: 2792:45e21bc9795d > tag: tip > user: Dejan Muhamedagic <[email protected]> > date: Thu Jun 12 12:28:59 2014 +0200 > summary: Low: hb_report: gdb debug symbols output change > > $ make rpm > rm -f cluster-glue.tar.bz2 > hg archive -t tbz2 -r tip cluster-glue.tar.bz2 > echo `date`: Rebuilt cluster-glue.tar.bz2 > Wed Jun 18 16:09:36 JST 2014: Rebuilt cluster-glue.tar.bz2 > rm -f *.src.rpm > To create custom builds, edit the flags and options in > cluster-glue-fedora.spec first > rpmbuild -bs --define "dist .fedora" --define "_sourcedir > /zzz/DEV/glue" --define "_specdir /zzz/DEV/glue" --define "_srcrpmdir > /zzz/DEV/glue" cluster-glue-fedora.spec > Wrote: /zzz/DEV/glue/cluster-glue-1.0.12-0.rc1.fedora.src.rpm > rpmbuild --define "_sourcedir /zzz/DEV/glue" --define "_specdir > /zzz/DEV/glue" --define "_srcrpmdir /zzz/DEV/glue" --rebuild > /zzz/DEV/glue/*.src.rpm > Installing /zzz/DEV/glue/cluster-glue-1.0.12-0.rc1.fedora.src.rpm > (snip) > + /usr/lib/rpm/redhat/brp-java-repack-jars > Processing files: cluster-glue-1.0.12-0.rc1.el7.x86_64 > error: File not found: > /root/rpmbuild/BUILDROOT/cluster-glue-1.0.12-0.rc1.fedora.x86_64/etc/init.d/logd
Yes, unfortunately the systemd support was added without adding support to the spec files. I'm not an expert on these, so I'd like to ask you to test the patch I put together. If you could also fix any problems you run into, that'd be great. Cheers, Dejan > Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.kJSlFu > + umask 022 > + cd /root/rpmbuild/BUILD > + cd cluster-glue > + > DOCDIR=/root/rpmbuild/BUILDROOT/cluster-glue-1.0.12-0.rc1.fedora.x86_64/usr/share/doc/cluster-glue-1.0.12 > + export DOCDIR > + /usr/bin/mkdir -p > /root/rpmbuild/BUILDROOT/cluster-glue-1.0.12-0.rc1.fedora.x86_64/usr/share/doc/cluster-glue-1.0.12 > + cp -pr doc/stonith/README.bladehpi doc/stonith/README.cyclades > doc/stonith/README.drac3 doc/stonith/README.dracmc > doc/stonith/README.external doc/stonith/README.ibmrsa > doc/stonith/README.ibmrsa-telnet doc/stonith/README.ipmilan > doc/stonith/README.ippower9258 doc/stonith/README.meatware > doc/stonith/README.rackpdu doc/stonith/README.rcd_serial > doc/stonith/README.riloe doc/stonith/README.vacm > doc/stonith/README.vcenter doc/stonith/README.wti_mpc > doc/stonith/README_kdumpcheck.txt > /root/rpmbuild/BUILDROOT/cluster-glue-1.0.12-0.rc1.fedora.x86_64/usr/share/doc/cluster-glue-1.0.12 > + cp -pr logd/logd.cf > /root/rpmbuild/BUILDROOT/cluster-glue-1.0.12-0.rc1.fedora.x86_64/usr/share/doc/cluster-glue-1.0.12 > + cp -pr AUTHORS > /root/rpmbuild/BUILDROOT/cluster-glue-1.0.12-0.rc1.fedora.x86_64/usr/share/doc/cluster-glue-1.0.12 > + cp -pr COPYING > /root/rpmbuild/BUILDROOT/cluster-glue-1.0.12-0.rc1.fedora.x86_64/usr/share/doc/cluster-glue-1.0.12 > + cp -pr ChangeLog > /root/rpmbuild/BUILDROOT/cluster-glue-1.0.12-0.rc1.fedora.x86_64/usr/share/doc/cluster-glue-1.0.12 > + exit 0 > > > RPM build errors: > File not found: > /root/rpmbuild/BUILDROOT/cluster-glue-1.0.12-0.rc1.fedora.x86_64/etc/init.d/logd > make: *** [rpm] Error 1 > $ > _______________________________________________________ > Linux-HA-Dev: [email protected] > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev > Home Page: http://linux-ha.org/
# HG changeset patch # User Dejan Muhamedagic <[email protected]> # Date 1403119156 -7200 # Wed Jun 18 21:19:16 2014 +0200 # Node ID 6380f4c77ddc62288eeb854f81288c78bdc06251 # Parent 45e21bc9795d70b86ecc3825b91ef6424db178d8 build: update spec files for systemd diff -r 45e21bc9795d -r 6380f4c77ddc cluster-glue-fedora.spec --- a/cluster-glue-fedora.spec Thu Jun 12 12:28:59 2014 +0200 +++ b/cluster-glue-fedora.spec Wed Jun 18 21:19:16 2014 +0200 @@ -60,6 +60,11 @@ BuildRequires: libuuid-devel BuildRequires: e2fsprogs-devel %endif +%if %{defined systemd_requires} +BuildRequires: systemd +%{?systemd_requires} +%endif + %prep %setup -q -n cluster-glue @@ -82,6 +87,9 @@ export docdir=%{glue_docdir} --with-daemon-user=%{uname} \ --localstatedir=%{_var} \ --libdir=%{_libdir} \ +%if %{defined _unitdir} + --with-systemdsystemunitdir=%{_unitdir} \ +%endif --docdir=%{glue_docdir} %endif @@ -112,7 +120,11 @@ standards, and an interface to common ST %files %defattr(-,root,root) %dir %{_datadir}/%{name} +%if %{defined _unitdir} +%{_unitdir}/logd.service +%else %{_sysconfdir}/init.d/logd +%endif %{_datadir}/%{name}/ha_cf_support.sh %{_datadir}/%{name}/openais_conf_support.sh %{_datadir}/%{name}/utillib.sh @@ -174,8 +186,22 @@ getent group %{gname} >/dev/null || grou getent passwd %{uname} >/dev/null || \ useradd -r -g %{gname} -d %{_var}/lib/heartbeat/cores/hacluster -s /sbin/nologin \ -c "cluster user" %{uname} +%if %{defined _unitdir} + %service_add_pre logd.service +%endif exit 0 +%if %{defined _unitdir} +%post +%service_add_post logd.service + +%preun +%service_del_preun logd.service + +%postun +%service_del_postun logd.service +%endif + %post -n cluster-glue-libs -p /sbin/ldconfig %postun -n cluster-glue-libs -p /sbin/ldconfig diff -r 45e21bc9795d -r 6380f4c77ddc cluster-glue-suse.spec --- a/cluster-glue-suse.spec Thu Jun 12 12:28:59 2014 +0200 +++ b/cluster-glue-suse.spec Wed Jun 18 21:19:16 2014 +0200 @@ -56,6 +56,11 @@ BuildRequires: sgml-skel BuildRequires: libcurl-devel %endif +%if %{defined systemd_requires} +BuildRequires: systemd +%{?systemd_requires} +%endif + %description A collection of common tools derived from the Heartbeat project that are useful for writing cluster managers such as Pacemaker. @@ -113,6 +118,9 @@ export docdir=%{glue_docdir} --with-daemon-group=%{gname} \ --with-daemon-user=%{uname} \ --with-rundir=%{_rundir} \ +%if %{defined _unitdir} + --with-systemdsystemunitdir=%{_unitdir} \ +%endif --docdir=%{glue_docdir} %endif @@ -128,11 +136,15 @@ find $RPM_BUILD_ROOT -name '*.la' -type find $RPM_BUILD_ROOT -name '*.pyc' -type f -print0 | xargs -0 rm -f find $RPM_BUILD_ROOT -name '*.pyo' -type f -print0 | xargs -0 rm -f +%if %{defined _unitdir} +ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rclogd +%else test -d $RPM_BUILD_ROOT/sbin || mkdir $RPM_BUILD_ROOT/sbin ( cd $RPM_BUILD_ROOT/sbin ln -s /etc/init.d/logd rclogd ) +%endif ########################################################### @@ -163,7 +175,20 @@ else -d %{_var}/lib/heartbeat/cores/%{uname} -o -u %{uid} \ %{uname} 2>/dev/null || : fi +%if %{defined _unitdir} + %service_add_pre logd.service +%endif +%if %{defined _unitdir} +%post +%service_add_post logd.service + +%preun +%service_del_preun logd.service + +%postun +%service_del_postun logd.service +%else %preun %stop_on_removal logd @@ -172,6 +197,7 @@ fi %postun %insserv_cleanup +%endif %post -n libglue2 /sbin/ldconfig @@ -213,7 +239,12 @@ fi %{_sbindir}/meatclient %{_sbindir}/stonith +%if %{defined _unitdir} +%{_unitdir}/logd.service +%else %{_sysconfdir}/init.d/logd +/sbin/rclogd +%endif %doc %{_mandir}/man1/* %doc %{_mandir}/man8/* @@ -223,8 +254,6 @@ fi %doc logd/logd.cf %doc doc/stonith/README* -/sbin/rclogd - %{_libdir}/heartbeat/lrmd %{_libdir}/heartbeat/ha_logd
_______________________________________________________ Linux-HA-Dev: [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/
