>From 3d09bd91780f2f17a2aaba6fb071ba12b6c43fa5 Mon Sep 17 00:00:00 2001
From: Ade Lee <alee@redhat.com>
Date: Fri, 4 Oct 2013 15:04:45 -0400
Subject: [PATCH] Remove run and lock files from pki-core for f20

These files are no longer needed by pki-core as we are usign the
tomcat unit files, and no longer need to deliver these.  Plus,
they wer breaking the TPS build.
---
 specs/pki-core.spec | 33 ++++++++++++++++-----------------
 1 file changed, 16 insertions(+), 17 deletions(-)

diff --git a/specs/pki-core.spec b/specs/pki-core.spec
index a6fceb4ef89418d22e86ac1742f6fd5ef618525d..045c0c6ef57f7ce23f7ee18d08cd8ea2a56d7cdf 100644
--- a/specs/pki-core.spec
+++ b/specs/pki-core.spec
@@ -5,7 +5,7 @@ distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 
 Name:             pki-core
 Version:          10.1.0
-Release:          0.10%{?dist}
+Release:          0.11%{?dist}
 Summary:          Certificate System - PKI Core Components
 URL:              http://pki.fedoraproject.org/
 License:          GPLv2
@@ -584,6 +584,7 @@ fi
 #     * https://fedoraproject.org/wiki/Features/var-run-tmpfs
 #     * https://fedoraproject.org/wiki/Tmpfiles.d_packaging_draft
 #
+%if 0%{?rhel} || 0%{?fedora} < 20
 %{__mkdir_p} %{buildroot}%{_sysconfdir}/tmpfiles.d
 # generate 'pki-ca.conf' under the 'tmpfiles.d' directory
 echo "D /var/lock/pki 0755 root root -"    >  %{buildroot}%{_sysconfdir}/tmpfiles.d/pki-ca.conf
@@ -610,11 +611,7 @@ echo "D /var/lock/pki 0755 root root -"     >  %{buildroot}%{_sysconfdir}/tmpfil
 echo "D /var/lock/pki/tks 0755 root root -" >> %{buildroot}%{_sysconfdir}/tmpfiles.d/pki-tks.conf
 echo "D /var/run/pki 0755 root root -"      >> %{buildroot}%{_sysconfdir}/tmpfiles.d/pki-tks.conf
 echo "D /var/run/pki/tks 0755 root root -"  >> %{buildroot}%{_sysconfdir}/tmpfiles.d/pki-tks.conf
-# generate 'pki-tps.conf' under the 'tmpfiles.d' directory
-echo "D /var/lock/pki 0755 root root -"     >  %{buildroot}%{_sysconfdir}/tmpfiles.d/pki-tps.conf
-echo "D /var/lock/pki/tps 0755 root root -" >> %{buildroot}%{_sysconfdir}/tmpfiles.d/pki-tps.conf
-echo "D /var/run/pki 0755 root root -"      >> %{buildroot}%{_sysconfdir}/tmpfiles.d/pki-tps.conf
-echo "D /var/run/pki/tps 0755 root root -"  >> %{buildroot}%{_sysconfdir}/tmpfiles.d/pki-tps.conf
+%endif
 
 %{__rm} %{buildroot}%{_initrddir}/pki-cad
 %{__rm} %{buildroot}%{_initrddir}/pki-krad
@@ -1031,7 +1028,9 @@ fi
 #     * https://fedoraproject.org/wiki/Features/var-run-tmpfs
 #     * https://fedoraproject.org/wiki/Tmpfiles.d_packaging_draft
 #
+%if 0%{?rhel} || 0%{?fedora} < 20
 %config(noreplace) %{_sysconfdir}/tmpfiles.d/pki-tomcat.conf
+%endif
 
 %{_datadir}/pki/setup/
 %{_datadir}/pki/server/
@@ -1064,8 +1063,9 @@ fi
 #     * https://fedoraproject.org/wiki/Features/var-run-tmpfs
 #     * https://fedoraproject.org/wiki/Tmpfiles.d_packaging_draft
 #
+%if 0%{?rhel} || 0%{?fedora} < 20
 %config(noreplace) %{_sysconfdir}/tmpfiles.d/pki-ca.conf
-
+%endif
 
 %files -n pki-kra
 %defattr(-,root,root,-)
@@ -1085,8 +1085,9 @@ fi
 #     * https://fedoraproject.org/wiki/Features/var-run-tmpfs
 #     * https://fedoraproject.org/wiki/Tmpfiles.d_packaging_draft
 #
+%if 0%{?rhel} || 0%{?fedora} < 20
 %config(noreplace) %{_sysconfdir}/tmpfiles.d/pki-kra.conf
-
+%endif
 
 %files -n pki-ocsp
 %defattr(-,root,root,-)
@@ -1106,8 +1107,9 @@ fi
 #     * https://fedoraproject.org/wiki/Features/var-run-tmpfs
 #     * https://fedoraproject.org/wiki/Tmpfiles.d_packaging_draft
 #
+%if 0%{?rhel} || 0%{?fedora} < 20
 %config(noreplace) %{_sysconfdir}/tmpfiles.d/pki-ocsp.conf
-
+%endif
 
 %files -n pki-tks
 %defattr(-,root,root,-)
@@ -1127,8 +1129,9 @@ fi
 #     * https://fedoraproject.org/wiki/Features/var-run-tmpfs
 #     * https://fedoraproject.org/wiki/Tmpfiles.d_packaging_draft
 #
+%if 0%{?rhel} || 0%{?fedora} < 20
 %config(noreplace) %{_sysconfdir}/tmpfiles.d/pki-tks.conf
-
+%endif
 
 %files -n pki-tps-tomcat
 %defattr(-,root,root,-)
@@ -1143,13 +1146,6 @@ fi
 %{_datadir}/pki/tps/webapps/
 %dir %{_localstatedir}/lock/pki/tps
 %dir %{_localstatedir}/run/pki/tps
-# Details:
-#
-#     * https://fedoraproject.org/wiki/Features/var-run-tmpfs
-#     * https://fedoraproject.org/wiki/Tmpfiles.d_packaging_draft
-#
-%config(noreplace) %{_sysconfdir}/tmpfiles.d/pki-tps.conf
-
 
 %if %{?_without_javadoc:0}%{!?_without_javadoc:1}
 %files -n pki-javadoc
@@ -1159,6 +1155,9 @@ fi
 
 
 %changelog
+* Fri Oct 4 2013 Ade Lee <alee@redhat.com> 10.1.0-0.11
+- Removed delivery of /var/lock and /var/run directories for fedora 20.
+
 * Wed Aug 14 2013 Endi S. Dewata <edewata@redhat.com> 10.1.0-0.10
 - Moved Tomcat-based TPS into pki-core.
 
-- 
1.8.3.1

