systemtap.spec: merge/tweak systemd conditionals from systemtap git
This commit is contained in:
parent
ab0fa14ef8
commit
79da85a4a7
@ -24,13 +24,14 @@
|
|||||||
%ifnarch s390 s390x %{arm}
|
%ifnarch s390 s390x %{arm}
|
||||||
%{!?with_dyninst: %global with_dyninst 0%{?fedora} >= 18 || 0%{?rhel} >= 7}
|
%{!?with_dyninst: %global with_dyninst 0%{?fedora} >= 18 || 0%{?rhel} >= 7}
|
||||||
%else
|
%else
|
||||||
%global with_dyninst 0
|
%{!?with_dyninst: %global with_dyninst 0}
|
||||||
%endif
|
%endif
|
||||||
%{!?with_systemd: %global with_systemd 0%{?fedora} >= 19}
|
%{!?with_systemd: %global with_systemd 0%{?fedora} >= 19}
|
||||||
|
%{!?with_emacsvim: %global with_emacsvim 1}
|
||||||
|
|
||||||
Name: systemtap
|
Name: systemtap
|
||||||
Version: 2.1
|
Version: 2.1
|
||||||
Release: 0.244.g2c7281e.1%{?dist}
|
Release: 0.244.g2c7281e.2%{?dist}
|
||||||
# for version, see also configure.ac
|
# for version, see also configure.ac
|
||||||
|
|
||||||
|
|
||||||
@ -95,6 +96,9 @@ BuildRequires: elfutils-devel >= %{elfutils_version}
|
|||||||
%endif
|
%endif
|
||||||
%if %{with_docs}
|
%if %{with_docs}
|
||||||
BuildRequires: /usr/bin/latex /usr/bin/dvips /usr/bin/ps2pdf latex2html
|
BuildRequires: /usr/bin/latex /usr/bin/dvips /usr/bin/ps2pdf latex2html
|
||||||
|
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
|
||||||
|
BuildRequires: tex(fullpage.sty) tex(fancybox.sty) tex(bchr7t.tfm)
|
||||||
|
%endif
|
||||||
# On F10, xmlto's pdf support was broken off into a sub-package,
|
# On F10, xmlto's pdf support was broken off into a sub-package,
|
||||||
# called 'xmlto-tex'. To avoid a specific F10 BuildReq, we'll do a
|
# called 'xmlto-tex'. To avoid a specific F10 BuildReq, we'll do a
|
||||||
# file-based buildreq on '/usr/share/xmlto/format/fo/pdf'.
|
# file-based buildreq on '/usr/share/xmlto/format/fo/pdf'.
|
||||||
@ -104,6 +108,9 @@ BuildRequires: publican
|
|||||||
BuildRequires: /usr/share/publican/Common_Content/%{publican_brand}/defaults.cfg
|
BuildRequires: /usr/share/publican/Common_Content/%{publican_brand}/defaults.cfg
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with_emacsvim}
|
||||||
|
BuildRequires: emacs
|
||||||
|
%endif
|
||||||
|
|
||||||
# Install requirements
|
# Install requirements
|
||||||
Requires: systemtap-client = %{version}-%{release}
|
Requires: systemtap-client = %{version}-%{release}
|
||||||
@ -337,6 +344,10 @@ cd ..
|
|||||||
%configure %{?elfutils_config} %{dyninst_config} %{sqlite_config} %{crash_config} %{docs_config} %{pie_config} %{publican_config} %{rpm_config} --disable-silent-rules --with-extra-version="rpm %{version}-%{release}"
|
%configure %{?elfutils_config} %{dyninst_config} %{sqlite_config} %{crash_config} %{docs_config} %{pie_config} %{publican_config} %{rpm_config} --disable-silent-rules --with-extra-version="rpm %{version}-%{release}"
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
%if %{with_emacsvim}
|
||||||
|
%{_emacs_bytecompile} emacs/systemtap-mode.el
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf ${RPM_BUILD_ROOT}
|
rm -rf ${RPM_BUILD_ROOT}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=$RPM_BUILD_ROOT install
|
||||||
@ -387,7 +398,7 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/systemtap
|
|||||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/systemtap
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/systemtap
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
|
||||||
install -m 644 initscript/logrotate.stap-server $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/stap-server
|
install -m 644 initscript/logrotate.stap-server $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/stap-server
|
||||||
%if %{?with_systemd}
|
%if %{with_systemd}
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
||||||
touch $RPM_BUILD_ROOT%{_unitdir}/stap-server.service
|
touch $RPM_BUILD_ROOT%{_unitdir}/stap-server.service
|
||||||
install -m 644 stap-server.service $RPM_BUILD_ROOT%{_unitdir}/stap-server.service
|
install -m 644 stap-server.service $RPM_BUILD_ROOT%{_unitdir}/stap-server.service
|
||||||
@ -406,6 +417,19 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
|||||||
install -m 644 initscript/config.stap-server $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/stap-server
|
install -m 644 initscript/config.stap-server $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/stap-server
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{with_emacsvim}
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_emacs_sitelispdir}
|
||||||
|
install -p -m 644 emacs/systemtap-mode.el* $RPM_BUILD_ROOT%{_emacs_sitelispdir}
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_emacs_sitestartdir}
|
||||||
|
install -p -m 644 emacs/systemtap-init.el $RPM_BUILD_ROOT%{_emacs_sitestartdir}/systemtap-init.el
|
||||||
|
for subdir in ftdetect ftplugin indent syntax
|
||||||
|
do
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/$subdir
|
||||||
|
install -p -m 644 vim/$subdir/*.vim $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/$subdir
|
||||||
|
done
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf ${RPM_BUILD_ROOT}
|
rm -rf ${RPM_BUILD_ROOT}
|
||||||
|
|
||||||
@ -442,7 +466,7 @@ if test ! -e ~stap-server/.systemtap/ssl/server/stap.cert; then
|
|||||||
runuser -s /bin/sh - stap-server -c %{_libexecdir}/%{name}/stap-gen-cert >/dev/null
|
runuser -s /bin/sh - stap-server -c %{_libexecdir}/%{name}/stap-gen-cert >/dev/null
|
||||||
fi
|
fi
|
||||||
# Activate the service
|
# Activate the service
|
||||||
%if %{?with_systemd}
|
%if %{with_systemd}
|
||||||
/bin/systemctl enable stap-server.service >/dev/null 2>&1 || :
|
/bin/systemctl enable stap-server.service >/dev/null 2>&1 || :
|
||||||
/bin/systemd-tmpfiles --create >/dev/null 2>&1 || :
|
/bin/systemd-tmpfiles --create >/dev/null 2>&1 || :
|
||||||
%else
|
%else
|
||||||
@ -463,7 +487,7 @@ exit 0
|
|||||||
# Check that this is the actual deinstallation of the package, as opposed to
|
# Check that this is the actual deinstallation of the package, as opposed to
|
||||||
# just removing the old package on upgrade.
|
# just removing the old package on upgrade.
|
||||||
if [ $1 = 0 ] ; then
|
if [ $1 = 0 ] ; then
|
||||||
%if %{?with_systemd}
|
%if %{with_systemd}
|
||||||
/bin/systemctl --no-reload disable stap-server.service >/dev/null 2>&1 || :
|
/bin/systemctl --no-reload disable stap-server.service >/dev/null 2>&1 || :
|
||||||
/bin/systemctl stop stap-server.service >/dev/null 2>&1 || :
|
/bin/systemctl stop stap-server.service >/dev/null 2>&1 || :
|
||||||
%else
|
%else
|
||||||
@ -477,7 +501,7 @@ exit 0
|
|||||||
# Check whether this is an upgrade of the package.
|
# Check whether this is an upgrade of the package.
|
||||||
# If so, restart the service if it's running
|
# If so, restart the service if it's running
|
||||||
if [ "$1" -ge "1" ] ; then
|
if [ "$1" -ge "1" ] ; then
|
||||||
%if %{?with_systemd}
|
%if %{with_systemd}
|
||||||
/bin/systemctl restart stap-server.service >/dev/null 2>&1 || :
|
/bin/systemctl restart stap-server.service >/dev/null 2>&1 || :
|
||||||
%else
|
%else
|
||||||
/sbin/service stap-server condrestart >/dev/null 2>&1 || :
|
/sbin/service stap-server condrestart >/dev/null 2>&1 || :
|
||||||
@ -486,7 +510,7 @@ fi
|
|||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%post initscript
|
%post initscript
|
||||||
%if %{?with_systemd}
|
%if %{with_systemd}
|
||||||
/bin/systemctl enable stap-server.service >/dev/null 2>&1 || :
|
/bin/systemctl enable stap-server.service >/dev/null 2>&1 || :
|
||||||
/bin/systemd-tmpfiles --create >/dev/null 2>&1 || :
|
/bin/systemd-tmpfiles --create >/dev/null 2>&1 || :
|
||||||
%else
|
%else
|
||||||
@ -498,7 +522,7 @@ exit 0
|
|||||||
# Check that this is the actual deinstallation of the package, as opposed to
|
# Check that this is the actual deinstallation of the package, as opposed to
|
||||||
# just removing the old package on upgrade.
|
# just removing the old package on upgrade.
|
||||||
if [ $1 = 0 ] ; then
|
if [ $1 = 0 ] ; then
|
||||||
%if %{?with_systemd}
|
%if %{with_systemd}
|
||||||
/bin/systemctl --no-reload disable stap-server.service >/dev/null 2>&1 || :
|
/bin/systemctl --no-reload disable stap-server.service >/dev/null 2>&1 || :
|
||||||
/bin/systemctl stop stap-server.service >/dev/null 2>&1 || :
|
/bin/systemctl stop stap-server.service >/dev/null 2>&1 || :
|
||||||
%else
|
%else
|
||||||
@ -512,7 +536,7 @@ exit 0
|
|||||||
# Check whether this is an upgrade of the package.
|
# Check whether this is an upgrade of the package.
|
||||||
# If so, restart the service if it's running
|
# If so, restart the service if it's running
|
||||||
if [ "$1" -ge "1" ] ; then
|
if [ "$1" -ge "1" ] ; then
|
||||||
%if %{?with_systemd}
|
%if %{with_systemd}
|
||||||
/bin/systemctl restart stap-server.service >/dev/null 2>&1 || :
|
/bin/systemctl restart stap-server.service >/dev/null 2>&1 || :
|
||||||
%else
|
%else
|
||||||
/sbin/service systemtap condrestart >/dev/null 2>&1 || :
|
/sbin/service systemtap condrestart >/dev/null 2>&1 || :
|
||||||
@ -550,7 +574,7 @@ exit 0
|
|||||||
%{_mandir}/man7/stappaths.7*
|
%{_mandir}/man7/stappaths.7*
|
||||||
%{_mandir}/man7/warning*
|
%{_mandir}/man7/warning*
|
||||||
%{_mandir}/man8/stap-server.8*
|
%{_mandir}/man8/stap-server.8*
|
||||||
%if %{?with_systemd}
|
%if %{with_systemd}
|
||||||
%{_unitdir}/stap-server.service
|
%{_unitdir}/stap-server.service
|
||||||
/usr/lib/tmpfiles.d/stap-server.conf
|
/usr/lib/tmpfiles.d/stap-server.conf
|
||||||
%else
|
%else
|
||||||
@ -584,6 +608,11 @@ exit 0
|
|||||||
%dir %{_libdir}/%{name}
|
%dir %{_libdir}/%{name}
|
||||||
%{_libdir}/%{name}/lib*.so*
|
%{_libdir}/%{name}/lib*.so*
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with_emacsvim}
|
||||||
|
%{_emacs_sitelispdir}/*.el*
|
||||||
|
%{_emacs_sitestartdir}/systemtap-init.el
|
||||||
|
%{_datadir}/vim/vimfiles/*/*.vim
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%files runtime -f %{name}.lang
|
%files runtime -f %{name}.lang
|
||||||
@ -635,7 +664,7 @@ exit 0
|
|||||||
|
|
||||||
%files initscript
|
%files initscript
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%if %{?with_systemd}
|
%if %{with_systemd}
|
||||||
%else
|
%else
|
||||||
%{_sysconfdir}/rc.d/init.d/systemtap
|
%{_sysconfdir}/rc.d/init.d/systemtap
|
||||||
%dir %{_sysconfdir}/systemtap
|
%dir %{_sysconfdir}/systemtap
|
||||||
@ -666,6 +695,9 @@ exit 0
|
|||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jan 24 2013 Frank Ch. Eigler <fche@redhat.com> - 2.1-0.244.g2c7281e.2
|
||||||
|
- Merge in .spec file changes from upstream.
|
||||||
|
|
||||||
* Thu Jan 24 2013 Frank Ch. Eigler <fche@redhat.com> - 2.1-0.244.g2c7281e.1
|
* Thu Jan 24 2013 Frank Ch. Eigler <fche@redhat.com> - 2.1-0.244.g2c7281e.1
|
||||||
- Turn docs back on for rawhide.
|
- Turn docs back on for rawhide.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user