The change of the ccache itself is a one-liner.

The patch also adds an RPM patch that changes the default ccache
location in the man pages we generate in the RPM. I think the upstream
default should still stay set to FILE: for the sake of RHEL and other
distributions.

If maintaining the patch proves difficult, we can always revive
https://fedorahosted.org/sssd/ticket/1378
>From bef57d5cc165f6cded14b162e6dae44c9c6d0bbd Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <[email protected]>
Date: Fri, 24 Aug 2012 14:55:31 +0200
Subject: [PATCH] RPM: Switch the default ccache location

https://fedorahosted.org/sssd/ticket/1500
---
 Makefile.am                                      |  1 +
 contrib/sssd-1.9-man-change-default-ccache.patch | 21 +++++++++++++++++++++
 contrib/sssd.spec.in                             | 23 ++++++++++++++++++++++-
 3 files changed, 44 insertions(+), 1 deletion(-)
 create mode 100644 contrib/sssd-1.9-man-change-default-ccache.patch

diff --git a/Makefile.am b/Makefile.am
index 
571ea55ca8e427eb8955b3f70199561c29b64f33..ecd180a9dd428f538339b0ae4682f157c0aff142
 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1736,6 +1736,7 @@ rpmroot:
 rpmbrprep: dist-gzip rpmroot
        cp $(builddir)/contrib/sssd.spec $(RPMBUILD)/SPECS
        cp $(distdir).tar.gz $(RPMBUILD)/SOURCES
+       cp $(srcdir)/contrib/*.patch $(RPMBUILD)/SOURCES
 
 rpms: rpmbrprep
        cd $(RPMBUILD); \
diff --git a/contrib/sssd-1.9-man-change-default-ccache.patch 
b/contrib/sssd-1.9-man-change-default-ccache.patch
new file mode 100644
index 
0000000000000000000000000000000000000000..9e7f8cb3f02d72e3b3408d0e4556e5c038b4ec97
--- /dev/null
+++ b/contrib/sssd-1.9-man-change-default-ccache.patch
@@ -0,0 +1,21 @@
+diff -up sssd-1.8.97/src/man/sssd-krb5.5.xml.ccachepath 
sssd-1.8.97/src/man/sssd-krb5.5.xml
+--- sssd-1.8.97/src/man/sssd-krb5.5.xml.ccachepath     2012-08-24 
12:14:27.459225839 +0200
++++ sssd-1.8.97/src/man/sssd-krb5.5.xml        2012-08-24 12:14:43.845079652 
+0200
+@@ -148,7 +148,7 @@
+                             </citerefentry> for details) is created.
+                         </para>
+                         <para>
+-                            Default: /tmp
++                            Default: /run/user/%U
+                         </para>
+                     </listitem>
+                 </varlistentry>
+@@ -208,7 +208,7 @@
+                             used to create a unique filename in a safe way.
+                         </para>
+                         <para>
+-                            Default: FILE:%d/krb5cc_%U_XXXXXX
++                            Default: DIR:%d/krb5cc
+                         </para>
+                     </listitem>
+                 </varlistentry>
diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index 
873c737af4bdef16ce78dcf3a9d9a943346c3550..f6e30aff16197eb2d79e447cdc8a86df90e659ca
 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -19,7 +19,7 @@
 %endif
 
 %if (0%{?fedora} >= 17)
-    %global with_ccache --with-default-ccache-dir='/run/user/%U' 
--with-default-ccname-template="DIR:%d/ccdir"
+    %global with_ccache --with-default-ccache-dir='/run/user/%U' 
--with-default-ccname-template="DIR:%d/krb5cc"
 %endif
 
 %global enable_experimental 1
@@ -42,6 +42,7 @@ Source0: %{name}-%{version}.tar.gz
 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
 ### Patches ###
+Patch0001:  sssd-1.9-man-change-default-ccache.patch
 
 ### Dependencies ###
 
@@ -220,8 +221,28 @@ A utility library to allow communication between SUDO and 
SSSD
 %endif
 
 %prep
+# Update timestamps on the files touched by a patch, to avoid non-equal
+# .pyc/.pyo files across the multilib peers within a build, where "Level"
+# is the patch prefix option (e.g. -p1)
+# Taken from specfile for python-simplejson
+UpdateTimestamps() {
+  Level=$1
+  PatchFile=$2
+
+  # Locate the affected files:
+  for f in $(diffstat $Level -l $PatchFile); do
+    # Set the files to have the same timestamp as that of the patch:
+    touch -r $PatchFile $f
+  done
+}
+
 %setup -q
 
+for p in %patches ; do
+    %__patch -p1 -i $p
+    UpdateTimestamps -p1 $p
+done
+
 %build
 
 # RHEL 5 uses an old libtool, so we need to force it to reconfigure
-- 
1.7.11.4

_______________________________________________
sssd-devel mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel

Reply via email to