diff --git a/.gitignore b/.gitignore index b0b7403..9452199 100644 --- a/.gitignore +++ b/.gitignore @@ -1,33 +1 @@ /*.tar.xz -/ccache-3.7.1.tar.gz -/ccache-3.7.5.tar.gz -/ccache-3.7.6.tar.gz -/ccache-3.7.7.tar.gz -/ccache-3.7.8.tar.gz -/ccache-3.7.9.tar.gz -/ccache-3.7.11.tar.gz -/ccache-3.7.12.tar.gz -/ccache-4.0.tar.gz -/ccache-4.1.tar.gz -/ccache-4.2.tar.gz -/ccache-4.2.1.tar.gz -/ccache-4.4.2.tar.gz -/ccache-4.5.1.tar.gz -/ccache-4.6.1.tar.gz -/ccache-4.6.3.tar.gz -/ccache-4.7.3.tar.gz -/ccache-4.7.4.tar.gz -/ccache-4.7.5.tar.gz -/ccache-4.8.tar.gz -/ccache-4.8.2.tar.gz -/ccache-4.8.3.tar.gz -/ccache-4.9.tar.gz -/ccache-4.9.1.tar.gz -/ccache-4.10.tar.gz -/ccache-4.10.1.tar.gz -/ccache-4.10.2.tar.gz -/ccache-4.11.1.tar.gz -/ccache-4.11.2.tar.gz -/ccache-4.11.3.tar.gz -/ccache-4.12.1.tar.gz -/ccache-4.12.2.tar.gz diff --git a/0001-Recreated-upstream-headless-commit-7091db4cc0286a325.patch b/0001-Recreated-upstream-headless-commit-7091db4cc0286a325.patch new file mode 100644 index 0000000..1317635 --- /dev/null +++ b/0001-Recreated-upstream-headless-commit-7091db4cc0286a325.patch @@ -0,0 +1,63 @@ +From 5fb7b910512226c487c7cc1fcb546618999e0776 Mon Sep 17 00:00:00 2001 +From: Michael Cullen +Date: Mon, 16 Apr 2018 15:39:00 +0100 +Subject: [PATCH] Recreated upstream headless commit + 7091db4cc0286a3254107c4f29e3f9b8d183fca1 + +Upstream referenced a headless commit in https://github.com/ccache/ccache/issues/248 +This recreates it so I can make a patch of it +--- + src/cleanup.c | 7 +++++-- + test/suites/cleanup.bash | 4 ++-- + 2 files changed, 7 insertions(+), 4 deletions(-) + +diff --git a/src/cleanup.c b/src/cleanup.c +index 8c46eac..a86e1ea 100644 +--- a/src/cleanup.c ++++ b/src/cleanup.c +@@ -17,6 +17,9 @@ + + #include "ccache.h" + ++#include ++#include ++ + static struct files { + char *fname; + time_t mtime; +@@ -162,8 +165,8 @@ clean_up_dir(struct conf *conf, const char *dir, float limit_multiple) + // When "max files" or "max cache size" is reached, one of the 16 cache + // subdirectories is cleaned up. When doing so, files are deleted (in LRU + // order) until the levels are below limit_multiple. +- cache_size_threshold = conf->max_size * limit_multiple / 16; +- files_in_cache_threshold = conf->max_files * limit_multiple / 16; ++ cache_size_threshold = roundf(conf->max_size * limit_multiple / 16); ++ files_in_cache_threshold = roundf(conf->max_files * limit_multiple / 16); + + num_files = 0; + cache_size = 0; +diff --git a/test/suites/cleanup.bash b/test/suites/cleanup.bash +index 8eaac4f..45dccb0 100644 +--- a/test/suites/cleanup.bash ++++ b/test/suites/cleanup.bash +@@ -152,7 +152,7 @@ SUITE_cleanup() { + TEST ".o file is removed before .stderr" + + prepare_cleanup_test_dir $CCACHE_DIR/a +- $CCACHE -F 474 -M 0 >/dev/null ++ $CCACHE -F 464 -M 0 >/dev/null + backdate 0 $CCACHE_DIR/a/result9-4017.stderr + $CCACHE -c >/dev/null + expect_file_missing $CCACHE_DIR/a/result9-4017.stderr +@@ -167,7 +167,7 @@ SUITE_cleanup() { + TEST ".stderr file is not removed before .o" + + prepare_cleanup_test_dir $CCACHE_DIR/a +- $CCACHE -F 474 -M 0 >/dev/null ++ $CCACHE -F 464 -M 0 >/dev/null + backdate 0 $CCACHE_DIR/a/result9-4017.o + $CCACHE -c >/dev/null + expect_file_exists $CCACHE_DIR/a/result9-4017.stderr +-- +2.14.3 + diff --git a/ccache.spec b/ccache.spec index f8d1589..9ca4b12 100644 --- a/ccache.spec +++ b/ccache.spec @@ -12,40 +12,27 @@ %global relccache %(%abs2rel %{_bindir}/ccache %{_libdir}/ccache) Name: ccache -Version: 4.12.2 -Release: 1%{?dist} +Version: 3.4.2 +Release: 4%{?dist} Summary: C/C++ compiler cache -# See LICENSE.adoc for licenses of bundled codes -# blake3 is Apache-2.0 -# span.hpp is BSL-1.0 -# url.cpp/hpp is MIT -License: GPL-3.0-or-later AND Apache-2.0 AND BSL-1.0 AND MIT -URL: http://ccache.dev/ -Source0: https://github.com/ccache/ccache/releases/download/v%{version}/%{name}-%{version}.tar.gz +License: GPLv3+ +URL: http://ccache.samba.org/ +Source0: http://samba.org/ftp/ccache/%{name}-%{version}.tar.xz Source1: %{name}.sh.in Source2: %{name}.csh.in -BuildRequires: /usr/bin/asciidoctor -BuildRequires: cmake -# Uses a patched version and is missing on i686 in Fedora -#BuildRequires: blake3-devel -BuildRequires: cpp-httplib-devel -BuildRequires: doctest-devel -BuildRequires: expected-devel -BuildRequires: fmt-devel -BuildRequires: hiredis-devel -BuildRequires: libzstd-devel -BuildRequires: perl perl(File::Spec) -BuildRequires: xxhash-devel +# Fix 32-bit build error: See https://github.com/ccache/ccache/issues/248 +Patch0: 0001-Recreated-upstream-headless-commit-7091db4cc0286a325.patch + +BuildRequires: perl(File::Spec) +BuildRequires: zlib-devel >= 1.2.3 # clang for additional tests -BuildRequires: clang clang-tools-extra +BuildRequires: clang # coreutils for triggerin, triggerpostun Requires: coreutils # For groupadd -Provides: bundled(blake3) = 1.5.1 -Provides: bundled(span-lite) = 0.11.0 -Provides: bundled(cxxurl) +Requires(pre): shadow-utils %description ccache is a compiler cache. It speeds up recompilation of C/C++ code @@ -55,30 +42,25 @@ being done again. The main focus is to handle the GNU C/C++ compiler %prep -%autosetup -p1 -# win32-compat gets imported, but not used -rm -r src/third_party/{[ad-lo-tvy-z]*,cpp-httplib} +%setup -q +%patch0 -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' \ %{SOURCE2} > %{name}.csh - -# Create a sysusers.d config file -cat >ccache.sysusers.conf < %{name}-%{version}.compilers -install -m0644 -D ccache.sysusers.conf %{buildroot}%{_sysusersdir}/ccache.conf - -install -m0644 README.md %{buildroot}%{_pkgdocdir}/ - %check -%ctest +make check +# Fails with clang 3.4.2 in EL7 +make check CC=clang %{?el7:|| :} %define ccache_trigger(p:) \ @@ -224,184 +204,21 @@ done\ %ccache_trigger -p gcc-xtensa-linux-gnu xtensa-linux-gnu-gcc %ccache_trigger -p gcc-c++-xtensa-linux-gnu xtensa-linux-gnu-c++ xtensa-linux-gnu-g++ +%pre +getent group ccache >/dev/null || groupadd -r ccache || : %files -f %{name}-%{version}.compilers %license GPL-3.0.txt LICENSE.* -%{_pkgdocdir}/ +%doc doc/AUTHORS.* doc/MANUAL.* doc/NEWS.* README.md %config(noreplace) %{_sysconfdir}/profile.d/%{name}.*sh %{_bindir}/ccache %dir %{_libdir}/ccache/ %attr(2770,root,ccache) %dir %{_var}/cache/ccache/ %{_mandir}/man1/ccache.1* -%{_sysusersdir}/ccache.conf %changelog -* Thu Nov 27 2025 Orion Poplawski - 4.12.2-1 -- Update to 4.12.2 - -* Thu Oct 02 2025 Orion Poplawski - 4.12.1-1 -- Update to 4.12.1 - -* Wed Jul 23 2025 Fedora Release Engineering - 4.11.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Fri May 09 2025 Orion Poplawski - 4.11.3-1 -- Update to 4.11.3 - -* Tue Mar 25 2025 Orion Poplawski - 4.11.2-1 -- Update to 4.11.2 - -* Tue Mar 18 2025 Orion Poplawski - 4.11.1-1 -- Update to 4.11.1 - -* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek - 4.10.2-3 -- Add sysusers.d config file to allow rpm to create users/groups automatically - -* Thu Jan 16 2025 Fedora Release Engineering - 4.10.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Wed Jul 31 2024 Orion Poplawski - 4.10.2-1 -- Update to 4.10.2 - -* Fri Jul 26 2024 Kefu Chai - 4.10.1-3 -- Rebuilt for fmt 11 - -* Wed Jul 17 2024 Fedora Release Engineering - 4.10.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Fri Jul 12 2024 Orion Poplawski - 4.10.1-1 -- Update to 4.10.1 - -* Sun Jun 02 2024 Orion Poplawski - 4.10-1 -- Update to 4.10 - -* Sat May 11 2024 Kevin Fenzi - 4.9.1-2 -- rebuild for hiredis soname bump - -* Tue Feb 06 2024 Orion Poplawski - 4.9.1-1 -- Update to 4.9.1 -- Unbundle some libraries -- Use SPDX license -- Add licenses for bundled code - -* Tue Jan 23 2024 Fedora Release Engineering - 4.8.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jan 19 2024 Fedora Release Engineering - 4.8.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Sep 01 2023 Orion Poplawski - 4.8.3-1 -- Update to 4.8.3 - -* Wed Jul 19 2023 Fedora Release Engineering - 4.8.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Fri Jun 16 2023 Orion Poplawski - 4.8.2-1 -- Update to 4.8.2 - -* Wed Apr 05 2023 Orion Poplawski - 4.8-1 -- Update to 4.8 (fixes bz#2160275) - -* Wed Mar 22 2023 Orion Poplawski - 4.7.5-1 -- Update to 4.7.5 - -* Wed Jan 18 2023 Fedora Release Engineering - 4.7.4-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Sat Dec 10 2022 Orion Poplawski - 4.7.4-1 -- Update to 4.7.4 - -* Mon Nov 07 2022 Orion Poplawski - 4.7.3-1 -- Update to 4.7.3 - -* Sat Oct 01 2022 Orion Poplawski - 4.6.3-1 -- Update to 4.6.3 - -* Wed Jul 20 2022 Fedora Release Engineering - 4.6.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Mon May 16 2022 Orion Poplawski - 4.6.1-1 -- Update to 4.6.1 - -* Wed Jan 19 2022 Fedora Release Engineering - 4.5.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Mon Jan 17 2022 Kevin Fenzi - 4.5.1-2 -- Rebuild for hiredis 1.0.2 - -* Sun Dec 05 2021 Orion Poplawski - 4.5.1-1 -- Update to 4.5.1 - -* Wed Oct 27 2021 Orion Poplawski - 4.4.2-1 -- Update to 4.4.2 - -* Wed Jul 21 2021 Fedora Release Engineering - 4.2.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Fri Apr 02 2021 Orion Poplawski - 4.2.1-1 -- Update to 4.2.1 - -* Wed Feb 03 2021 Orion Poplawski - 4.2-1 -- Update to 4.2 - -* Tue Jan 26 2021 Fedora Release Engineering - 4.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Sat Jan 02 2021 Łukasz Patron - 4.1-1 -- Update to 4.1 - -* Tue Oct 27 2020 Łukasz Patron - 4.0-1 -- Update to 4.0 - -* Thu Oct 1 2020 Orion Poplawski - 3.7.12-1 -- Update to 3.7.12 - -* Sat Aug 15 2020 Orion Poplawski - 3.7.11-1 -- Update to 3.7.11 - -* Fri Aug 07 2020 Jeff Law - 3.7.9-4 -- Depend on perl - -* Sat Aug 01 2020 Fedora Release Engineering - 3.7.9-3 -- Second attempt - Rebuilt for - https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Mon Jul 27 2020 Fedora Release Engineering - 3.7.9-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Mon Mar 30 2020 LuK1337 - 3.7.9-1 -- Update to 3.7.9 - -* Thu Mar 26 2020 LuK1337 - 3.7.8-1 -- Update to 3.7.8 - -* Tue Feb 18 2020 Orion Poplawski - 3.7.7-1 -- Update to 3.7.7 - -* Tue Jan 28 2020 Fedora Release Engineering - 3.7.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Thu Nov 21 2019 LuK1337 - 3.7.6-1 -- Updated to 3.7.6 - -* Thu Oct 24 2019 Michael Cullen - 3.7.5-1 -- Updated to 3.7.5 -- Updated upstream URL - -* Wed Jul 24 2019 Fedora Release Engineering - 3.7.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Mon May 20 2019 Michael Cullen - 3.7.1-1 -- Updated to 3.7.1 - -* Thu Jan 31 2019 Fedora Release Engineering - 3.4.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Sep 24 2018 Michael Cullen - 3.4.3-1 -- Update to 3.4.3 (bugfix release) - * Tue Aug 28 2018 Major Hayden - 3.4.2-4 - Added powerpc64le/ppc64le to ccache_trigger list diff --git a/sources b/sources index a73b9cd..1714abc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ccache-4.12.2.tar.gz) = e078a393f41660e401c3a2795fe2c2784413fe9e15313e7a996cd321e0180d5b5b89faf723a4fe3e6414ee644de198707b6bf6d0f003bdf2cd49fad0288bdf73 +SHA512 (ccache-3.4.2.tar.xz) = 9bf07269df6785bb92758093f46f3be4df45de532e431e0bc3a68a7170d1782376a9b4495acf77569549062c84f61621c21c5d200e271cd064dbda4a73276f8e