From 859f2b73e75fb4781779fda425f1bcc20c3a1d3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Fri, 10 Nov 2006 20:10:10 +0000 Subject: [PATCH 01/16] - Require coreutils for triggers (#215030). --- ccache.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ccache.spec b/ccache.spec index 2f9e575..94c6aba 100644 --- a/ccache.spec +++ b/ccache.spec @@ -3,7 +3,7 @@ Name: ccache Version: 2.4 -Release: 6%{?dist} +Release: 7%{?dist} Summary: C/C++ compiler cache Group: Development/Tools @@ -13,6 +13,9 @@ Source0: http://ccache.samba.org/ftp/ccache/%{name}-%{version}.tar.gz Patch0: %{name}-html-links.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Requires(triggerin): coreutils +Requires(triggerpostun): coreutils + %description ccache is a compiler cache. It acts as a caching pre-processor to C/C++ compilers, using the -E compiler switch and a hash to detect @@ -83,6 +86,9 @@ done %changelog +* Fri Nov 10 2006 Ville Skyttä - 2.4-7 +- Require coreutils for triggers (#215030). + * Wed Aug 9 2006 Ville Skyttä - 2.4-6 - Add auto-symlink support for compat-gcc-34(-c++). - Untabify, escape macros in changelog. From 8e1b4ffd4210e9cd03f3b5f0077ecad27becb65d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Thu, 15 Mar 2007 10:40:54 +0000 Subject: [PATCH 02/16] - Bypass cache with --coverage, -fprofile-arcs and -ftest-coverage (upstream CVS and Matt Fago, #231462). --- ccache-2.4-coverage-231462.patch | 12 ++++++++++++ ccache.spec | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 ccache-2.4-coverage-231462.patch diff --git a/ccache-2.4-coverage-231462.patch b/ccache-2.4-coverage-231462.patch new file mode 100644 index 0000000..27d063b --- /dev/null +++ b/ccache-2.4-coverage-231462.patch @@ -0,0 +1,12 @@ +--- ccache.c~ 2004-09-13 13:38:30.000000000 +0300 ++++ ccache.c 2007-03-15 12:31:41.000000000 +0200 +@@ -640,6 +640,9 @@ + + /* these are too hard */ + if (strcmp(argv[i], "-fbranch-probabilities")==0 || ++ strcmp(argv[i], "--coverage") == 0 || ++ strcmp(argv[i], "-fprofile-arcs") == 0 || ++ strcmp(argv[i], "-ftest-coverage") == 0 || + strcmp(argv[i], "-M") == 0 || + strcmp(argv[i], "-MM") == 0 || + strcmp(argv[i], "-x") == 0) { diff --git a/ccache.spec b/ccache.spec index 94c6aba..099724d 100644 --- a/ccache.spec +++ b/ccache.spec @@ -3,7 +3,7 @@ Name: ccache Version: 2.4 -Release: 7%{?dist} +Release: 8%{?dist} Summary: C/C++ compiler cache Group: Development/Tools @@ -11,6 +11,7 @@ License: GPL URL: http://ccache.samba.org/ Source0: http://ccache.samba.org/ftp/ccache/%{name}-%{version}.tar.gz Patch0: %{name}-html-links.patch +Patch1: %{name}-2.4-coverage-231462.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(triggerin): coreutils @@ -26,6 +27,7 @@ a 5 to 10 times speedup in common compilations. %prep %setup -q %patch0 -p0 +%patch1 -p0 %build @@ -86,6 +88,10 @@ done %changelog +* Thu Mar 15 2007 Ville Skyttä - 2.4-8 +- Bypass cache with --coverage, -fprofile-arcs and -ftest-coverage + (upstream CVS and Matt Fago, #231462). + * Fri Nov 10 2006 Ville Skyttä - 2.4-7 - Require coreutils for triggers (#215030). From ecf88276da91384b6b4e66e586df7629d80fc402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 29 Jul 2007 22:38:31 +0000 Subject: [PATCH 03/16] - Use shared cache dir for users in the ccache group by default (#247760, based on Andy Shevchenko's work). - Fix outdated hardlink info in cache sharing docs. - Add auto-symlink support for avr-gcc(-c++) and arm-gp2x-linux-gcc(-c++). - Make triggers always exit with a zero exit status. --- ccache-2.4-hardlink-doc.patch | 48 +++++++++++++++++++++++++++++++++++ ccache.csh.in | 16 ++++++++++++ ccache.sh.in | 16 ++++++++++++ ccache.spec | 41 ++++++++++++++++++++---------- 4 files changed, 107 insertions(+), 14 deletions(-) create mode 100644 ccache-2.4-hardlink-doc.patch create mode 100644 ccache.csh.in create mode 100644 ccache.sh.in diff --git a/ccache-2.4-hardlink-doc.patch b/ccache-2.4-hardlink-doc.patch new file mode 100644 index 0000000..bd9e25b --- /dev/null +++ b/ccache-2.4-hardlink-doc.patch @@ -0,0 +1,48 @@ +Index: ccache.1 +=================================================================== +RCS file: /cvsroot/ccache/ccache.1,v +retrieving revision 1.26 +diff -u -r1.26 ccache.1 +--- ccache.1 24 Nov 2005 21:10:08 -0000 1.26 ++++ ccache.1 21 Jul 2007 21:03:32 -0000 +@@ -330,7 +330,7 @@ + .IP o + Use the same \fBCCACHE_DIR\fP environment variable setting + .IP o +-Set the \fBCCACHE_NOLINK\fP environment variable ++Unset the \fBCCACHE_HARDLINK\fP environment variable + .IP o + Make sure everyone sets the CCACHE_UMASK environment variable + to 002, this ensures that cached files are accessible to everyone in +Index: ccache.yo +=================================================================== +RCS file: /cvsroot/ccache/ccache.yo,v +retrieving revision 1.27 +diff -u -r1.27 ccache.yo +--- ccache.yo 24 Nov 2005 21:54:09 -0000 1.27 ++++ ccache.yo 21 Jul 2007 21:03:32 -0000 +@@ -289,7 +289,7 @@ + + itemize( + it() Use the same bf(CCACHE_DIR) environment variable setting +- it() Set the bf(CCACHE_NOLINK) environment variable ++ it() Unset the bf(CCACHE_HARDLINK) environment variable + it() Make sure everyone sets the CCACHE_UMASK environment variable + to 002, this ensures that cached files are accessible to everyone in + the group. +Index: web/ccache-man.html +=================================================================== +RCS file: /cvsroot/ccache/web/ccache-man.html,v +retrieving revision 1.25 +diff -u -r1.25 ccache-man.html +--- web/ccache-man.html 13 Sep 2004 10:38:17 -0000 1.25 ++++ web/ccache-man.html 21 Jul 2007 21:03:32 -0000 +@@ -256,7 +256,7 @@ + following conditions need to be met: +

    +
  • Use the same CCACHE_DIR environment variable setting +-
  • Set the CCACHE_NOLINK environment variable ++
  • Unset the CCACHE_HARDLINK environment variable +
  • Make sure everyone sets the CCACHE_UMASK environment variable + to 002, this ensures that cached files are accessible to everyone in + the group. diff --git a/ccache.csh.in b/ccache.csh.in new file mode 100644 index 0000000..af6fa9e --- /dev/null +++ b/ccache.csh.in @@ -0,0 +1,16 @@ +# Use ccache by default. Users who don't want that can set the CCACHE_DISABLE +# environment variable in their personal profile. + +if ( "$path" !~ *@LIBDIR@/ccache* ) then + set path = ( @LIBDIR@/ccache $path ) +endif + +# If @CACHEDIR@ is writable, use a shared cache there. Users who don't +# want that even if they have that write permission can set the CCACHE_DIR +# and unset the CCACHE_UMASK environment variables in their personal profile. + +if ( ! $?CCACHE_DIR && -d @CACHEDIR@ && -w @CACHEDIR@ ) then + setenv CCACHE_DIR /var/cache/ccache + setenv CCACHE_UMASK 002 + unsetenv CCACHE_HARDLINK +endif diff --git a/ccache.sh.in b/ccache.sh.in new file mode 100644 index 0000000..d5cd116 --- /dev/null +++ b/ccache.sh.in @@ -0,0 +1,16 @@ +# Use ccache by default. Users who don't want that can set the CCACHE_DISABLE +# environment variable in their personal profile. + +if ! echo "$PATH" | grep -qw @LIBDIR@/ccache ; then + PATH="@LIBDIR@/ccache:$PATH" +fi + +# If @CACHEDIR@ is writable, use a shared cache there. Users who don't +# want that even if they have that write permission can set the CCACHE_DIR +# and unset the CCACHE_UMASK environment variables in their personal profile. + +if [ -z "$CCACHE_DIR" -a -d @CACHEDIR@ -a -w @CACHEDIR@ ] ; then + export CCACHE_DIR=/var/cache/ccache + export CCACHE_UMASK=002 + unset CCACHE_HARDLINK +fi diff --git a/ccache.spec b/ccache.spec index 099724d..bac3b8e 100644 --- a/ccache.spec +++ b/ccache.spec @@ -1,17 +1,20 @@ -%define compilers gcc g++ cc c++ gcc296 g++296 gcc32 c++32 g++32 gcc34 c++34 g++34 g++-libstdc++-so_7 -%define pkgs gcc, gcc-c++, compat-gcc, compat-gcc-c++, compat-gcc-32, compat-gcc-32-c++, gcc34, gcc34-c++, compat-gcc-34, compat-gcc-34-c++, libstdc++so7-devel +%define compilers gcc g++ cc c++ gcc296 g++296 gcc32 c++32 g++32 gcc34 c++34 g++34 g++-libstdc++-so_7 avr-gcc avr-c++ avr-g++ arm-gp2x-linux-gcc arm-gp2x-linux-c++ arm-gp2x-linux-g++ +%define pkgs gcc, gcc-c++, compat-gcc, compat-gcc-c++, compat-gcc-32, compat-gcc-32-c++, gcc34, gcc34-c++, compat-gcc-34, compat-gcc-34-c++, libstdc++so7-devel, avr-gcc, avr-gcc-c++, arm-gp2x-linux-gcc, arm-gp2x-linux-gcc-c++ Name: ccache Version: 2.4 -Release: 8%{?dist} +Release: 9%{?dist} Summary: C/C++ compiler cache Group: Development/Tools License: GPL URL: http://ccache.samba.org/ Source0: http://ccache.samba.org/ftp/ccache/%{name}-%{version}.tar.gz +Source1: %{name}.sh.in +Source2: %{name}.csh.in Patch0: %{name}-html-links.patch Patch1: %{name}-2.4-coverage-231462.patch +Patch2: %{name}-2.4-hardlink-doc.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(triggerin): coreutils @@ -28,21 +31,16 @@ a 5 to 10 times speedup in common compilations. %setup -q %patch0 -p0 %patch1 -p0 +%patch2 -p0 +sed -e 's|@LIBDIR@|%{_libdir}|g' -e 's|@CACHEDIR@|%{_var}/cache/ccache|g' \ + %{SOURCE1} > %{name}.sh +sed -e 's|@LIBDIR@|%{_libdir}|g' -e 's|@CACHEDIR@|%{_var}/cache/ccache|g' \ + %{SOURCE2} > %{name}.csh %build %configure -%{__make} %{?_smp_mflags} -cat < %{name}.sh -if ! echo "\$PATH" | grep -q %{_libdir}/ccache ; then - PATH="%{_libdir}/ccache:\$PATH" -fi -EOF -cat < %{name}.csh -if ( "\$path" !~ *%{_libdir}/ccache* ) then - set path = ( %{_libdir}/ccache \$path ) -endif -EOF +make %{?_smp_mflags} %install @@ -57,18 +55,24 @@ for name in %{compilers} ; do echo "%ghost %{_libdir}/ccache/$c" >> %{name}-%{version}.compilers done done +install -dm 770 $RPM_BUILD_ROOT%{_var}/cache/ccache %clean rm -fr $RPM_BUILD_ROOT +%pre +getent group ccache >/dev/null || groupadd -r ccache || : + + %triggerin -- %{pkgs} for name in %{compilers} ; do for c in $name %{_target_cpu}-%{_vendor}-%{_target_os}-$name ; do [ ! -x %{_bindir}/$c ] || ln -sf %{_bindir}/ccache %{_libdir}/ccache/$c done done +: %triggerpostun -- %{pkgs} for name in %{compilers} ; do @@ -76,6 +80,7 @@ for name in %{compilers} ; do [ -x %{_bindir}/$c ] || rm -f %{_libdir}/ccache/$c done done +: %files -f %{name}-%{version}.compilers @@ -84,10 +89,18 @@ done %config %{_sysconfdir}/profile.d/%{name}.*sh %{_bindir}/ccache %dir %{_libdir}/ccache/ +%attr(2770,root,ccache) %dir %{_var}/cache/ccache/ %{_mandir}/man1/ccache.1* %changelog +* Mon Jul 30 2007 Ville Skyttä - 2.4-9 +- Use shared cache dir for users in the ccache group by default + (#247760, based on Andy Shevchenko's work). +- Fix outdated hardlink info in cache sharing docs. +- Add auto-symlink support for avr-gcc(-c++) and arm-gp2x-linux-gcc(-c++). +- Make triggers always exit with a zero exit status. + * Thu Mar 15 2007 Ville Skyttä - 2.4-8 - Bypass cache with --coverage, -fprofile-arcs and -ftest-coverage (upstream CVS and Matt Fago, #231462). From ea9104370c7d9a2adb5c389fa7159a694cb885c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Thu, 16 Aug 2007 09:09:14 +0000 Subject: [PATCH 04/16] - License: GPLv2+ --- ccache.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ccache.spec b/ccache.spec index bac3b8e..98ba8d8 100644 --- a/ccache.spec +++ b/ccache.spec @@ -3,11 +3,11 @@ Name: ccache Version: 2.4 -Release: 9%{?dist} +Release: 10%{?dist} Summary: C/C++ compiler cache Group: Development/Tools -License: GPL +License: GPLv2+ URL: http://ccache.samba.org/ Source0: http://ccache.samba.org/ftp/ccache/%{name}-%{version}.tar.gz Source1: %{name}.sh.in @@ -94,6 +94,9 @@ done %changelog +* Wed Aug 15 2007 Ville Skyttä - 2.4-10 +- License: GPLv2+ + * Mon Jul 30 2007 Ville Skyttä - 2.4-9 - Use shared cache dir for users in the ccache group by default (#247760, based on Andy Shevchenko's work). From 36637c85c8da2c1ad440c67c6dddc4663183ee71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 19 Aug 2007 17:05:06 +0000 Subject: [PATCH 05/16] - Make compiler symlinks relative. - Make profile.d scripts noreplace. --- ccache.spec | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ccache.spec b/ccache.spec index 98ba8d8..f0fbf97 100644 --- a/ccache.spec +++ b/ccache.spec @@ -1,6 +1,9 @@ %define compilers gcc g++ cc c++ gcc296 g++296 gcc32 c++32 g++32 gcc34 c++34 g++34 g++-libstdc++-so_7 avr-gcc avr-c++ avr-g++ arm-gp2x-linux-gcc arm-gp2x-linux-c++ arm-gp2x-linux-g++ %define pkgs gcc, gcc-c++, compat-gcc, compat-gcc-c++, compat-gcc-32, compat-gcc-32-c++, gcc34, gcc34-c++, compat-gcc-34, compat-gcc-34-c++, libstdc++so7-devel, avr-gcc, avr-gcc-c++, arm-gp2x-linux-gcc, arm-gp2x-linux-gcc-c++ +%define abs2rel() perl -MFile::Spec -e 'print File::Spec->abs2rel(@ARGV)' %1 %2 +%{expand: %%define relccache %(%abs2rel %{_bindir}/ccache %{_libdir}/ccache)} + Name: ccache Version: 2.4 Release: 10%{?dist} @@ -17,6 +20,7 @@ Patch1: %{name}-2.4-coverage-231462.patch Patch2: %{name}-2.4-hardlink-doc.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: perl(File::Spec) Requires(triggerin): coreutils Requires(triggerpostun): coreutils @@ -51,7 +55,7 @@ install -pm 644 %{name}.sh %{name}.csh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d install -dm 755 $RPM_BUILD_ROOT%{_libdir}/ccache for name in %{compilers} ; do for c in $name %{_target_cpu}-%{_vendor}-%{_target_os}-$name ; do - ln -s %{_bindir}/ccache $RPM_BUILD_ROOT%{_libdir}/ccache/$c + ln -s %{relccache} $RPM_BUILD_ROOT%{_libdir}/ccache/$c echo "%ghost %{_libdir}/ccache/$c" >> %{name}-%{version}.compilers done done @@ -69,7 +73,7 @@ getent group ccache >/dev/null || groupadd -r ccache || : %triggerin -- %{pkgs} for name in %{compilers} ; do for c in $name %{_target_cpu}-%{_vendor}-%{_target_os}-$name ; do - [ ! -x %{_bindir}/$c ] || ln -sf %{_bindir}/ccache %{_libdir}/ccache/$c + [ ! -x %{_bindir}/$c ] || ln -sf %{relccache} %{_libdir}/ccache/$c done done : @@ -86,7 +90,7 @@ done %files -f %{name}-%{version}.compilers %defattr(-,root,root,-) %doc COPYING README web/*.html -%config %{_sysconfdir}/profile.d/%{name}.*sh +%config(noreplace) %{_sysconfdir}/profile.d/%{name}.*sh %{_bindir}/ccache %dir %{_libdir}/ccache/ %attr(2770,root,ccache) %dir %{_var}/cache/ccache/ @@ -94,8 +98,10 @@ done %changelog -* Wed Aug 15 2007 Ville Skyttä - 2.4-10 +* Sun Aug 19 2007 Ville Skyttä - 2.4-10 - License: GPLv2+ +- Make compiler symlinks relative. +- Make profile.d scripts noreplace. * Mon Jul 30 2007 Ville Skyttä - 2.4-9 - Use shared cache dir for users in the ccache group by default From 0c996b9a28b660b2ca6ea42770cb8057d3e6eb9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Wed, 22 Aug 2007 05:30:17 +0000 Subject: [PATCH 06/16] - Fix URL to upstream tarball. --- ccache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ccache.spec b/ccache.spec index f0fbf97..3d138a7 100644 --- a/ccache.spec +++ b/ccache.spec @@ -12,7 +12,7 @@ Summary: C/C++ compiler cache Group: Development/Tools License: GPLv2+ URL: http://ccache.samba.org/ -Source0: http://ccache.samba.org/ftp/ccache/%{name}-%{version}.tar.gz +Source0: http://samba.org/ftp/ccache/%{name}-%{version}.tar.gz Source1: %{name}.sh.in Source2: %{name}.csh.in Patch0: %{name}-html-links.patch @@ -98,6 +98,9 @@ done %changelog +* Wed Aug 22 2007 Ville Skyttä +- Fix URL to upstream tarball. + * Sun Aug 19 2007 Ville Skyttä - 2.4-10 - License: GPLv2+ - Make compiler symlinks relative. From 5dc57d7dbfc87b7a2dc59054c6f37888c7f0680c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Tue, 2 Oct 2007 16:50:35 +0000 Subject: [PATCH 07/16] - Apply upstream fix for problems when $HOME is not set (#315441). --- ccache-2.4-noHOME-315441.patch | 45 ++++++++++++++++++++++++++++++++++ ccache.spec | 7 +++++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 ccache-2.4-noHOME-315441.patch diff --git a/ccache-2.4-noHOME-315441.patch b/ccache-2.4-noHOME-315441.patch new file mode 100644 index 0000000..03b04f2 --- /dev/null +++ b/ccache-2.4-noHOME-315441.patch @@ -0,0 +1,45 @@ +Index: config.h.in +=================================================================== +RCS file: /cvsroot/ccache/config.h.in,v +retrieving revision 1.5 +retrieving revision 1.7 +diff -u -r1.5 -r1.7 +--- config.h.in 7 Mar 2003 12:09:19 -0000 1.5 ++++ config.h.in 25 Jul 2005 07:05:46 -0000 1.7 +@@ -19,6 +19,9 @@ + /* Define to 1 if you have the `gethostname' function. */ + #undef HAVE_GETHOSTNAME + ++/* Define to 1 if you have the `getpwuid' function. */ ++#undef HAVE_GETPWUID ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_INTTYPES_H + +@@ -31,6 +34,9 @@ + /* Define to 1 if you have the header file, and it defines `DIR'. */ + #undef HAVE_NDIR_H + ++/* Define to 1 if you have the header file. */ ++#undef HAVE_PWD_H ++ + /* Define to 1 if you have the `realpath' function. */ + #undef HAVE_REALPATH + +Index: util.c +=================================================================== +RCS file: /cvsroot/ccache/util.c,v +retrieving revision 1.34 +retrieving revision 1.37 +diff -u -r1.34 -r1.37 +--- util.c 6 Sep 2004 12:59:12 -0000 1.34 ++++ util.c 17 Jul 2006 03:41:12 -0000 1.37 +@@ -448,7 +444,7 @@ + } + } + #endif +- fatal("Unable to determine home directory"); ++ fprintf(stderr, "ccache: Unable to determine home directory"); + return NULL; + } + diff --git a/ccache.spec b/ccache.spec index 3d138a7..bc2a840 100644 --- a/ccache.spec +++ b/ccache.spec @@ -6,7 +6,7 @@ Name: ccache Version: 2.4 -Release: 10%{?dist} +Release: 11%{?dist} Summary: C/C++ compiler cache Group: Development/Tools @@ -18,6 +18,7 @@ Source2: %{name}.csh.in Patch0: %{name}-html-links.patch Patch1: %{name}-2.4-coverage-231462.patch Patch2: %{name}-2.4-hardlink-doc.patch +Patch3: %{name}-2.4-noHOME-315441.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: perl(File::Spec) @@ -36,6 +37,7 @@ a 5 to 10 times speedup in common compilations. %patch0 -p0 %patch1 -p0 %patch2 -p0 +%patch3 -p0 sed -e 's|@LIBDIR@|%{_libdir}|g' -e 's|@CACHEDIR@|%{_var}/cache/ccache|g' \ %{SOURCE1} > %{name}.sh sed -e 's|@LIBDIR@|%{_libdir}|g' -e 's|@CACHEDIR@|%{_var}/cache/ccache|g' \ @@ -98,6 +100,9 @@ done %changelog +* Tue Oct 2 2007 Ville Skyttä - 2.4-11 +- Apply upstream fix for problems when $HOME is not set (#315441). + * Wed Aug 22 2007 Ville Skyttä - Fix URL to upstream tarball. From 7ea7ef627bd075db51c6e52807303e830acbb5da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sat, 9 Feb 2008 21:05:57 +0000 Subject: [PATCH 08/16] - Rebuild. --- ccache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ccache.spec b/ccache.spec index bc2a840..55d8c07 100644 --- a/ccache.spec +++ b/ccache.spec @@ -6,7 +6,7 @@ Name: ccache Version: 2.4 -Release: 11%{?dist} +Release: 12%{?dist} Summary: C/C++ compiler cache Group: Development/Tools @@ -100,6 +100,9 @@ done %changelog +* Sat Feb 9 2008 Ville Skyttä - 2.4-12 +- Rebuild. + * Tue Oct 2 2007 Ville Skyttä - 2.4-11 - Apply upstream fix for problems when $HOME is not set (#315441). From 6ccf70a21cad7af15e47a37113c129a2e33e3c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Wed, 19 Mar 2008 20:41:35 +0000 Subject: [PATCH 09/16] - Apply patch to fix path to saved dependency files (#438201). --- ccache-2.4-md.patch | 78 +++++++++++++++++++++++++++++++++++++++++++++ ccache.spec | 7 +++- 2 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 ccache-2.4-md.patch diff --git a/ccache-2.4-md.patch b/ccache-2.4-md.patch new file mode 100644 index 0000000..3ee5941 --- /dev/null +++ b/ccache-2.4-md.patch @@ -0,0 +1,78 @@ +diff -rup ccache-2.4.orig/ccache.c ccache-2.4/ccache.c +--- ccache-2.4.orig/ccache.c Mon Sep 13 11:38:30 2004 ++++ ccache-2.4/ccache.c Thu Jun 21 22:17:32 2007 +@@ -627,6 +627,13 @@ static void process_args(int argc, char + int found_S_opt = 0; + struct stat st; + char *e; ++ /* is gcc being asked to output dependencies? */ ++ int generating_dependencies = 0; ++ /* is the dependency makefile name overridden with -MF? */ ++ int dependency_filename_specified = 0; ++ /* is the dependency makefile target name specified with -MQ or -MF? */ ++ int dependency_target_specified = 0; ++ + + stripped_args = args_init(0, NULL); + +@@ -702,6 +709,18 @@ static void process_args(int argc, char + continue; + } + ++ /* These options require special handling, because they ++ behave differently with gcc -E, when the output ++ file is not specified. */ ++ ++ if (strcmp(argv[i], "-MD") == 0 || strcmp(argv[i], "-MMD") == 0) { ++ generating_dependencies = 1; ++ } else if (strcmp(argv[i], "-MF") == 0) { ++ dependency_filename_specified = 1; ++ } else if (strcmp(argv[i], "-MQ") == 0 || strcmp(argv[i], "-MT") == 0) { ++ dependency_target_specified = 1; ++ } ++ + /* options that take an argument */ + { + const char *opts[] = {"-I", "-include", "-imacros", "-iprefix", +@@ -812,6 +831,41 @@ static void process_args(int argc, char + } + p[1] = found_S_opt ? 's' : 'o'; + p[2] = 0; ++ } ++ ++ /* If dependencies are generated, configure the preprocessor */ ++ ++ if (generating_dependencies && output_file) { ++ if (!dependency_filename_specified) { ++ char *default_depfile_name = x_strdup(output_file); ++ char *p = strrchr(default_depfile_name, '.'); ++ ++ if (p) { ++ if (strlen(p) < 2) { ++ stats_update(STATS_ARGS); ++ failed(); ++ return; ++ } ++ *p = 0; ++ } ++ else { ++ int len = p - default_depfile_name; ++ ++ p = x_malloc(len + 3); ++ strncpy(default_depfile_name, p, len - 1); ++ free(default_depfile_name); ++ default_depfile_name = p; ++ } ++ ++ strcat(default_depfile_name, ".d"); ++ args_add(stripped_args, "-MF"); ++ args_add(stripped_args, default_depfile_name); ++ } ++ ++ if (!dependency_target_specified) { ++ args_add(stripped_args, "-MT"); ++ args_add(stripped_args, output_file); ++ } + } + + /* cope with -o /dev/null */ diff --git a/ccache.spec b/ccache.spec index 55d8c07..2cb2783 100644 --- a/ccache.spec +++ b/ccache.spec @@ -6,7 +6,7 @@ Name: ccache Version: 2.4 -Release: 12%{?dist} +Release: 13%{?dist} Summary: C/C++ compiler cache Group: Development/Tools @@ -19,6 +19,7 @@ Patch0: %{name}-html-links.patch Patch1: %{name}-2.4-coverage-231462.patch Patch2: %{name}-2.4-hardlink-doc.patch Patch3: %{name}-2.4-noHOME-315441.patch +Patch4: http://darkircop.org/ccache/ccache-2.4-md.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: perl(File::Spec) @@ -38,6 +39,7 @@ a 5 to 10 times speedup in common compilations. %patch1 -p0 %patch2 -p0 %patch3 -p0 +%patch4 -p1 sed -e 's|@LIBDIR@|%{_libdir}|g' -e 's|@CACHEDIR@|%{_var}/cache/ccache|g' \ %{SOURCE1} > %{name}.sh sed -e 's|@LIBDIR@|%{_libdir}|g' -e 's|@CACHEDIR@|%{_var}/cache/ccache|g' \ @@ -100,6 +102,9 @@ done %changelog +* Wed Mar 19 2008 Ville Skyttä - 2.4-13 +- Apply patch to fix path to saved dependency files (#438201). + * Sat Feb 9 2008 Ville Skyttä - 2.4-12 - Rebuild. From 1628c789bbe63a9080513226a69c9216289de4f7 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 24 Feb 2009 06:39:52 +0000 Subject: [PATCH 10/16] - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild --- ccache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ccache.spec b/ccache.spec index 2cb2783..4a13b33 100644 --- a/ccache.spec +++ b/ccache.spec @@ -6,7 +6,7 @@ Name: ccache Version: 2.4 -Release: 13%{?dist} +Release: 14%{?dist} Summary: C/C++ compiler cache Group: Development/Tools @@ -102,6 +102,9 @@ done %changelog +* Mon Feb 23 2009 Fedora Release Engineering - 2.4-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + * Wed Mar 19 2008 Ville Skyttä - 2.4-13 - Apply patch to fix path to saved dependency files (#438201). From 71706d4261abb1b05b6493c19976c66fbca879af Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Fri, 24 Jul 2009 18:41:35 +0000 Subject: [PATCH 11/16] - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild --- ccache.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ccache.spec b/ccache.spec index 4a13b33..a6b64a0 100644 --- a/ccache.spec +++ b/ccache.spec @@ -6,7 +6,7 @@ Name: ccache Version: 2.4 -Release: 14%{?dist} +Release: 15%{?dist} Summary: C/C++ compiler cache Group: Development/Tools @@ -102,6 +102,9 @@ done %changelog +* Fri Jul 24 2009 Fedora Release Engineering - 2.4-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + * Mon Feb 23 2009 Fedora Release Engineering - 2.4-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild From cce51f8845d59ad905b82e8afc23933416dd28eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 10 Aug 2009 17:43:51 +0000 Subject: [PATCH 12/16] - Switch #438201 patch URL to Debian patch tracking (original is MIA). --- ccache-2.4-md.patch => 06_md.diff | 27 ++++++++++--------- ccache.spec | 45 ++++++++++++++++--------------- 2 files changed, 39 insertions(+), 33 deletions(-) rename ccache-2.4-md.patch => 06_md.diff (80%) diff --git a/ccache-2.4-md.patch b/06_md.diff similarity index 80% rename from ccache-2.4-md.patch rename to 06_md.diff index 3ee5941..75d82a2 100644 --- a/ccache-2.4-md.patch +++ b/06_md.diff @@ -1,7 +1,9 @@ -diff -rup ccache-2.4.orig/ccache.c ccache-2.4/ccache.c ---- ccache-2.4.orig/ccache.c Mon Sep 13 11:38:30 2004 -+++ ccache-2.4/ccache.c Thu Jun 21 22:17:32 2007 -@@ -627,6 +627,13 @@ static void process_args(int argc, char + +diff --git a/ccache.c b/ccache.c +index 64c979b..843929f 100644 +--- a/ccache.c ++++ b/ccache.c +@@ -647,6 +647,13 @@ static void process_args(int argc, char **argv) int found_S_opt = 0; struct stat st; char *e; @@ -15,7 +17,7 @@ diff -rup ccache-2.4.orig/ccache.c ccache-2.4/ccache.c stripped_args = args_init(0, NULL); -@@ -702,6 +709,18 @@ static void process_args(int argc, char +@@ -725,6 +732,18 @@ static void process_args(int argc, char **argv) continue; } @@ -34,12 +36,10 @@ diff -rup ccache-2.4.orig/ccache.c ccache-2.4/ccache.c /* options that take an argument */ { const char *opts[] = {"-I", "-include", "-imacros", "-iprefix", -@@ -812,6 +831,41 @@ static void process_args(int argc, char - } - p[1] = found_S_opt ? 's' : 'o'; +@@ -837,6 +856,41 @@ static void process_args(int argc, char **argv) p[2] = 0; -+ } -+ + } + + /* If dependencies are generated, configure the preprocessor */ + + if (generating_dependencies && output_file) { @@ -73,6 +73,9 @@ diff -rup ccache-2.4.orig/ccache.c ccache-2.4/ccache.c + args_add(stripped_args, "-MT"); + args_add(stripped_args, output_file); + } - } - ++ } ++ /* cope with -o /dev/null */ + if (strcmp(output_file,"/dev/null") != 0 && stat(output_file, &st) == 0 && !S_ISREG(st.st_mode)) { + cc_log("Not a regular file %s\n", output_file); + diff --git a/ccache.spec b/ccache.spec index a6b64a0..60711af 100644 --- a/ccache.spec +++ b/ccache.spec @@ -6,7 +6,7 @@ Name: ccache Version: 2.4 -Release: 15%{?dist} +Release: 16%{?dist} Summary: C/C++ compiler cache Group: Development/Tools @@ -19,7 +19,7 @@ Patch0: %{name}-html-links.patch Patch1: %{name}-2.4-coverage-231462.patch Patch2: %{name}-2.4-hardlink-doc.patch Patch3: %{name}-2.4-noHOME-315441.patch -Patch4: http://darkircop.org/ccache/ccache-2.4-md.patch +Patch4: http://patch-tracking.debian.net/patch/series/dl/ccache/2.4-17/06_md.diff BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: perl(File::Spec) @@ -102,86 +102,89 @@ done %changelog +* Mon Aug 10 2009 Ville Skyttä - 2.4-16 +- Switch #438201 patch URL to Debian patch tracking (original is MIA). + * Fri Jul 24 2009 Fedora Release Engineering - 2.4-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Mon Feb 23 2009 Fedora Release Engineering - 2.4-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild -* Wed Mar 19 2008 Ville Skyttä - 2.4-13 +* Wed Mar 19 2008 Ville Skyttä - 2.4-13 - Apply patch to fix path to saved dependency files (#438201). -* Sat Feb 9 2008 Ville Skyttä - 2.4-12 +* Sat Feb 9 2008 Ville Skyttä - 2.4-12 - Rebuild. -* Tue Oct 2 2007 Ville Skyttä - 2.4-11 +* Tue Oct 2 2007 Ville Skyttä - 2.4-11 - Apply upstream fix for problems when $HOME is not set (#315441). -* Wed Aug 22 2007 Ville Skyttä +* Wed Aug 22 2007 Ville Skyttä - Fix URL to upstream tarball. -* Sun Aug 19 2007 Ville Skyttä - 2.4-10 +* Sun Aug 19 2007 Ville Skyttä - 2.4-10 - License: GPLv2+ - Make compiler symlinks relative. - Make profile.d scripts noreplace. -* Mon Jul 30 2007 Ville Skyttä - 2.4-9 +* Mon Jul 30 2007 Ville Skyttä - 2.4-9 - Use shared cache dir for users in the ccache group by default (#247760, based on Andy Shevchenko's work). - Fix outdated hardlink info in cache sharing docs. - Add auto-symlink support for avr-gcc(-c++) and arm-gp2x-linux-gcc(-c++). - Make triggers always exit with a zero exit status. -* Thu Mar 15 2007 Ville Skyttä - 2.4-8 +* Thu Mar 15 2007 Ville Skyttä - 2.4-8 - Bypass cache with --coverage, -fprofile-arcs and -ftest-coverage (upstream CVS and Matt Fago, #231462). -* Fri Nov 10 2006 Ville Skyttä - 2.4-7 +* Fri Nov 10 2006 Ville Skyttä - 2.4-7 - Require coreutils for triggers (#215030). -* Wed Aug 9 2006 Ville Skyttä - 2.4-6 +* Wed Aug 9 2006 Ville Skyttä - 2.4-6 - Add auto-symlink support for compat-gcc-34(-c++). - Untabify, escape macros in changelog. -* Tue May 16 2006 Ville Skyttä - 2.4-5 +* Tue May 16 2006 Ville Skyttä - 2.4-5 - Add auto-symlink support for g++-libstdc++-so_7. -* Sat Nov 26 2005 Ville Skyttä - 2.4-4 +* Sat Nov 26 2005 Ville Skyttä - 2.4-4 - Drop "bin" from compiler symlink path. - Make profile.d snippets non-executable (#35714). -* Sun May 1 2005 Ville Skyttä - 2.4-3 +* Sun May 1 2005 Ville Skyttä - 2.4-3 - Auto-symlink update: add compat-gcc-32 and compat-gcc-32-c++, drop bunch of no longer relevant compilers. * Fri Apr 7 2005 Michael Schwendt - 2.4-2 - rebuilt -* Sun Sep 26 2004 Ville Skyttä - 0:2.4-0.fdr.1 +* Sun Sep 26 2004 Ville Skyttä - 0:2.4-0.fdr.1 - Update to 2.4. - Add symlinking support for gcc4 and gcc4-c++. - Move the ccache executable to %%{_bindir}. - Include more docs. -* Fri Jun 25 2004 Ville Skyttä - 0:2.3-0.fdr.5 +* Fri Jun 25 2004 Ville Skyttä - 0:2.3-0.fdr.5 - Add support for gcc33 and g++33. -* Thu Jun 10 2004 Ville Skyttä - 0:2.3-0.fdr.4 +* Thu Jun 10 2004 Ville Skyttä - 0:2.3-0.fdr.4 - Fix hardcoded lib path in profile.d scriptlets (bug 1558). -* Mon May 3 2004 Ville Skyttä - 0:2.3-0.fdr.3 +* Mon May 3 2004 Ville Skyttä - 0:2.3-0.fdr.3 - Add support for gcc34 and g++34, and %%{_target_cpu}-%%{_vendor}-%%{_target_os}-* variants. -* Thu Nov 13 2003 Ville Skyttä - 0:2.3-0.fdr.2 +* Thu Nov 13 2003 Ville Skyttä - 0:2.3-0.fdr.2 - Add overriding symlinks for gcc-ssa and g++-ssa (bug 963). -* Tue Nov 11 2003 Ville Skyttä - 0:2.3-0.fdr.1 +* Tue Nov 11 2003 Ville Skyttä - 0:2.3-0.fdr.1 - Update to 2.3. - Implement triggers to keep list of "aliased" compilers up to date on the fly. - Add gcc32 and a bunch of legacy packages to the list of overridden compilers. -* Sat Aug 2 2003 Ville Skyttä - 0:2.2-0.fdr.6 +* Sat Aug 2 2003 Ville Skyttä - 0:2.2-0.fdr.6 - Add c++ to the list of overridden compilers (bug 548). - Own everything including dirs under %%{_libdir}/ccache (bug 529). - %%{buildroot} -> $RPM_BUILD_ROOT. From d0de5221ffa31c6da1f33eaa1397d581ae0e07b5 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 22:47:29 +0000 Subject: [PATCH 13/16] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 006abfe..6bf36ae 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: ccache -# $Id: Makefile,v 1.1 2004/11/08 04:07:41 cvsextras Exp $ +# $Id: Makefile,v 1.2 2004/11/24 03:10:00 gafton Exp $ NAME := ccache SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From f4ba2cd223dc6cd7e078ee6128700f2b3e57ca85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sat, 19 Dec 2009 11:44:52 +0000 Subject: [PATCH 14/16] - Minor profile.d script performance improvements. - Fix hardcoded /var/cache/ccache in profile.d scripts. --- ccache.csh.in | 4 ++-- ccache.sh.in | 8 +++----- ccache.spec | 8 +++++++- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ccache.csh.in b/ccache.csh.in index af6fa9e..846fead 100644 --- a/ccache.csh.in +++ b/ccache.csh.in @@ -9,8 +9,8 @@ endif # want that even if they have that write permission can set the CCACHE_DIR # and unset the CCACHE_UMASK environment variables in their personal profile. -if ( ! $?CCACHE_DIR && -d @CACHEDIR@ && -w @CACHEDIR@ ) then - setenv CCACHE_DIR /var/cache/ccache +if ( ! $?CCACHE_DIR && -w @CACHEDIR@ && -d @CACHEDIR@ ) then + setenv CCACHE_DIR @CACHEDIR@ setenv CCACHE_UMASK 002 unsetenv CCACHE_HARDLINK endif diff --git a/ccache.sh.in b/ccache.sh.in index d5cd116..7d6d485 100644 --- a/ccache.sh.in +++ b/ccache.sh.in @@ -1,16 +1,14 @@ # Use ccache by default. Users who don't want that can set the CCACHE_DISABLE # environment variable in their personal profile. -if ! echo "$PATH" | grep -qw @LIBDIR@/ccache ; then - PATH="@LIBDIR@/ccache:$PATH" -fi +pathmunge @LIBDIR@/ccache # If @CACHEDIR@ is writable, use a shared cache there. Users who don't # want that even if they have that write permission can set the CCACHE_DIR # and unset the CCACHE_UMASK environment variables in their personal profile. -if [ -z "$CCACHE_DIR" -a -d @CACHEDIR@ -a -w @CACHEDIR@ ] ; then - export CCACHE_DIR=/var/cache/ccache +if [ -z "$CCACHE_DIR" ] && [ -w @CACHEDIR@ ] && [ -d @CACHEDIR@ ] ; then + export CCACHE_DIR=@CACHEDIR@ export CCACHE_UMASK=002 unset CCACHE_HARDLINK fi diff --git a/ccache.spec b/ccache.spec index 60711af..f57ca07 100644 --- a/ccache.spec +++ b/ccache.spec @@ -6,7 +6,7 @@ Name: ccache Version: 2.4 -Release: 16%{?dist} +Release: 17%{?dist} Summary: C/C++ compiler cache Group: Development/Tools @@ -23,6 +23,8 @@ Patch4: http://patch-tracking.debian.net/patch/series/dl/ccache/2.4-17/0 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: perl(File::Spec) +# For pathmunge in profile.d/ccache.sh, #123621 +Requires: setup >= 2.5.48 Requires(triggerin): coreutils Requires(triggerpostun): coreutils @@ -102,6 +104,10 @@ done %changelog +* Sat Dec 19 2009 Ville Skyttä - 2.4-17 +- Minor profile.d script performance improvements. +- Fix hardcoded /var/cache/ccache in profile.d scripts. + * Mon Aug 10 2009 Ville Skyttä - 2.4-16 - Switch #438201 patch URL to Debian patch tracking (original is MIA). From 19dee0d7e63d82cb427d2fc69e5ee03f8e0feef6 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 17 Feb 2010 01:01:13 +0000 Subject: [PATCH 15/16] Initialize branch F-13 for ccache --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..baa94ef --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-13 From 16a95ab0cf675601b487debc9e09e98298de3ab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Fri, 4 Jun 2010 20:00:38 +0000 Subject: [PATCH 16/16] - Don't use "pathmunge" in the profile.d sh script to work around #548960. --- ccache.sh.in | 5 ++++- ccache.spec | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ccache.sh.in b/ccache.sh.in index 7d6d485..c751a60 100644 --- a/ccache.sh.in +++ b/ccache.sh.in @@ -1,7 +1,10 @@ # Use ccache by default. Users who don't want that can set the CCACHE_DISABLE # environment variable in their personal profile. -pathmunge @LIBDIR@/ccache +case ":$PATH:" in + *:@LIBDIR@/ccache:*) ;; + *) PATH="@LIBDIR@/ccache:$PATH" ;; +esac # If @CACHEDIR@ is writable, use a shared cache there. Users who don't # want that even if they have that write permission can set the CCACHE_DIR diff --git a/ccache.spec b/ccache.spec index f57ca07..dab1e56 100644 --- a/ccache.spec +++ b/ccache.spec @@ -6,7 +6,7 @@ Name: ccache Version: 2.4 -Release: 17%{?dist} +Release: 18%{?dist} Summary: C/C++ compiler cache Group: Development/Tools @@ -104,6 +104,9 @@ done %changelog +* Fri Jun 4 2010 Ville Skyttä - 2.4-18 +- Don't use "pathmunge" in the profile.d sh script to work around #548960. + * Sat Dec 19 2009 Ville Skyttä - 2.4-17 - Minor profile.d script performance improvements. - Fix hardcoded /var/cache/ccache in profile.d scripts.