Blame SOURCES/0023-Move_ipa_s_systemd_tmpfiles_from_var_run_to_run_rhbz#1658487.patch

b01884
From 13b6fec04582d43bfc057a4cc3dbb7e652c8a64f Mon Sep 17 00:00:00 2001
b01884
From: Stanislav Levin <slev@altlinux.org>
b01884
Date: Oct 15 2018 12:07:12 +0000
b01884
Subject: Move ipa's systemd tmpfiles from /var/run to /run
b01884
b01884
b01884
systemd 239 complains about the legacy of ipa's tmpfiles which
b01884
are located on /var/run.
b01884
b01884
Fixes: https://pagure.io/freeipa/issue/7732
b01884
Reviewed-By: Christian Heimes <cheimes@redhat.com>
b01884
b01884
---
b01884
b01884
diff --git a/init/tmpfilesd/Makefile.am b/init/tmpfilesd/Makefile.am
b01884
index b2d91c3..3ea4533 100644
b01884
--- a/init/tmpfilesd/Makefile.am
b01884
+++ b/init/tmpfilesd/Makefile.am
b01884
@@ -7,4 +7,4 @@ systemdtmpfiles_DATA =         \
b01884
 CLEANFILES = $(systemdtmpfiles_DATA)
b01884
 
b01884
 %: %.in Makefile
b01884
-	sed -e 's|@localstatedir[@]|$(localstatedir)|g' '$(srcdir)/$@.in' >$@
b01884
+	cp '$(srcdir)/$@.in' $@
b01884
diff --git a/init/tmpfilesd/ipa.conf.in b/init/tmpfilesd/ipa.conf.in
b01884
index df66bef..183ceed 100644
b01884
--- a/init/tmpfilesd/ipa.conf.in
b01884
+++ b/init/tmpfilesd/ipa.conf.in
b01884
@@ -1,2 +1,2 @@
b01884
-d @localstatedir@/run/ipa 0711 root root
b01884
-d @localstatedir@/run/ipa/ccaches 0770 ipaapi ipaapi
b01884
+d /run/ipa 0711 root root
b01884
+d /run/ipa/ccaches 0770 ipaapi ipaapi
b01884
diff --git a/ipaplatform/base/paths.py b/ipaplatform/base/paths.py
b01884
index bc04964..8c1d44f 100644
b01884
--- a/ipaplatform/base/paths.py
b01884
+++ b/ipaplatform/base/paths.py
b01884
@@ -350,7 +350,7 @@ class BasePathNamespace(object):
b01884
     OPENDNSSEC_KASP_DB = "/var/opendnssec/kasp.db"
b01884
     IPA_ODS_EXPORTER_CCACHE = "/var/opendnssec/tmp/ipa-ods-exporter.ccache"
b01884
     VAR_RUN_DIRSRV_DIR = "/var/run/dirsrv"
b01884
-    IPA_CCACHES = "/var/run/ipa/ccaches"
b01884
+    IPA_CCACHES = "/run/ipa/ccaches"
b01884
     HTTP_CCACHE = "/var/lib/ipa/gssproxy/http.ccache"
b01884
     CA_BUNDLE_PEM = "/var/lib/ipa-client/pki/ca-bundle.pem"
b01884
     KDC_CA_BUNDLE_PEM = "/var/lib/ipa-client/pki/kdc-ca-bundle.pem"
b01884