[uucp: 5/7] enable lock directory on tmpfs (#656714)

Nils Philippsen nphilipp at fedoraproject.org
Thu Nov 25 07:45:30 UTC 2010


commit 555becbcf0cb4aaf7bc8cda3f5cd020f983ab05d
Author: Nils Philippsen <nils at redhat.com>
Date:   Thu Nov 25 08:43:22 2010 +0100

    enable lock directory on tmpfs (#656714)
    
    add /etc/tmpfiles.d/uucp.conf

 uucp.spec |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/uucp.spec b/uucp.spec
index eeddcc5..c06d5f1 100644
--- a/uucp.spec
+++ b/uucp.spec
@@ -1,3 +1,10 @@
+# lock_on_tmpfs: whether lock files are placed on tmpfs
+%if 0%{?fedora} > 14 || 0%{?rhel} > 6
+%bcond_without lock_on_tmpfs
+%else
+%bcond_with lock_on_tmpfs
+%endif
+
 %define	_newconfigdir	%{_sysconfdir}/uucp
 %define	_oldconfigdir	%{_sysconfdir}/uucp/oldconfig
 %define	_varlogdir	%{_localstatedir}/log/uucp
@@ -33,6 +40,9 @@ BuildRequires: lockdev-devel >= 1.0.0-14
 Requires: lockdev >= 1.0.0-14
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: tetex, texi2html
+%if %{with lock_on_tmpfs}
+Requires: systemd-units >= 13
+%endif
 
 %description
 The uucp command copies files between systems. Uucp is primarily used
@@ -102,6 +112,14 @@ rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir
 # some more documentation
 texi2html -monolithic uucp.texi
 
+%if %{with lock_on_tmpfs}
+# install /etc/tmpfiles.d/uucp.conf
+mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/tmpfiles.d
+cat > ${RPM_BUILD_ROOT}%{_sysconfdir}/tmpfiles.d/uucp.conf <<EOF
+d %{_varlockdir} 0755 uucp uucp -
+EOF
+%endif
+
 %clean
 rm -rf ${RPM_BUILD_ROOT}
 
@@ -154,12 +172,17 @@ fi
 %attr(0644,uucp,uucp)	%ghost	%{_varlogdir}/Log
 %attr(0644,uucp,uucp)	%ghost	%{_varlogdir}/Stats
 %attr(0600,uucp,uucp)	%ghost	%{_varlogdir}/Debug
+
 %attr(755,uucp,uucp)	%dir	%{_varlockdir}
+
 %attr(755,uucp,uucp)	%dir	%{_varspooldir}/uucp
 %attr(775,uucp,uucp)	%dir	%{_varspooldir}/uucppublic
 
 %config(noreplace)	/etc/logrotate.d/uucp
 %config(noreplace)	/etc/xinetd.d/uucp
+%if %{with lock_on_tmpfs}
+%{_sysconfdir}/tmpfiles.d/uucp.conf
+%endif
 
 %dir	%{_newconfigdir}
 %dir	%{_oldconfigdir}
@@ -171,6 +194,9 @@ fi
 %config(noreplace)	%{_newconfigdir}/sys
 
 %changelog
+* Wed Nov 24 2010 Nils Philippsen <nils at redhat.com>
+- add /etc/tmpfiles.d/uucp.conf to enable lock directory on tmpfs (#656714)
+
 * Sat Apr 17 2010 Ondrej Vasik <ovasik at redhat.com> - 1.07-23
 - fix uucico path in uucp.xinetd to work on 64 bit machines
   (#583179)


More information about the scm-commits mailing list