]>
git.ipfire.org Git - thirdparty/ccache.git/log
Joel Rosdahl [Tue, 27 Jul 2021 07:16:14 +0000 (09:16 +0200)]
fix(test): Flush stdout/stderr on http-server termination
The log from http-server is lost when the process is killed. Fix this by
flushing explicitly in a signal handler.
Joel Rosdahl [Mon, 26 Jul 2021 19:57:09 +0000 (21:57 +0200)]
style: Format Python code with Black
Joel Rosdahl [Mon, 26 Jul 2021 12:59:05 +0000 (14:59 +0200)]
bump: Upgrade to BLAKE3 1.0.0
Joel Rosdahl [Wed, 28 Jul 2021 10:02:12 +0000 (12:02 +0200)]
chore: Add hints about using conventional commits for commit messages
Joel Rosdahl [Mon, 26 Jul 2021 08:23:25 +0000 (10:23 +0200)]
Use Asciidoctor instead of Asciidoc to render documentation
Asciidoctor seems to:
- Provide a nice left-hand side table of contents.
- Have nicer looking defaults.
- Be faster.
- Have less (but non-zero) quirks.
Joel Rosdahl [Sun, 25 Jul 2021 14:20:21 +0000 (16:20 +0200)]
Don’t use ssize_t
It’s not portable to Windows.
Joel Rosdahl [Sat, 24 Jul 2021 20:01:02 +0000 (22:01 +0200)]
Add Redis support for Windows
Joel Rosdahl [Sat, 24 Jul 2021 20:00:01 +0000 (22:00 +0200)]
Add support for downloading hiredis from Internet
Gregor Jasny [Sun, 25 Jul 2021 05:08:32 +0000 (07:08 +0200)]
Use cpp-httplib 0.9.2 (#905)
Joel Rosdahl [Sat, 24 Jul 2021 11:49:07 +0000 (13:49 +0200)]
Update manual after layout change of compression statistics
Joel Rosdahl [Sat, 24 Jul 2021 09:02:06 +0000 (11:02 +0200)]
Document that CMake 3.10 now is needed
Joel Rosdahl [Sat, 24 Jul 2021 08:53:59 +0000 (10:53 +0200)]
Use auto to simplify lambda expressions
Joel Rosdahl [Sat, 24 Jul 2021 08:59:41 +0000 (10:59 +0200)]
Drop support for compiling ccache with buggy GCC 5
GCC 5 may crash when compiling C++14 generic lambdas:
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69977>
Joel Rosdahl [Fri, 23 Jul 2021 12:21:08 +0000 (14:21 +0200)]
Use util::TextTable for compression statistics
Joel Rosdahl [Fri, 23 Jul 2021 11:52:21 +0000 (13:52 +0200)]
Add TextTable class
Joel Rosdahl [Fri, 23 Jul 2021 11:26:08 +0000 (13:26 +0200)]
Refactor main option processing to a separate file
Joel Rosdahl [Sat, 24 Jul 2021 04:56:23 +0000 (06:56 +0200)]
Set umask when creating configuration file
This opens up for not having to initialize Context before calling
Config::set_value_in_file.
Joel Rosdahl [Fri, 23 Jul 2021 10:56:34 +0000 (12:56 +0200)]
Explicitly default use_syslog to false for clarity
Joel Rosdahl [Thu, 22 Jul 2021 18:53:44 +0000 (20:53 +0200)]
Refactor printing of compression statistics
Joel Rosdahl [Thu, 22 Jul 2021 14:20:01 +0000 (16:20 +0200)]
Convert primary storage to a public member of storage::Storage
Joel Rosdahl [Thu, 22 Jul 2021 11:06:40 +0000 (13:06 +0200)]
Move/split statistics functionality into core and storage::primary
- The Counters class has been moved to core::StatisticsCounters.
- Functionality in the Statistics namespace has been split into:
- core::StatsLog: Knows about “stats log” format.
- core::Statistics: Knows about properties of statistics fields and
how to present them.
- storage::primary::PrimaryStorage: Knows how to store and update
statistics in the primary storage backend.
- storage::primary::StatsFile: Knows about the “stats file” format.
Joel Rosdahl [Wed, 21 Jul 2021 16:19:04 +0000 (18:19 +0200)]
Move Statistic to core
Joel Rosdahl [Wed, 21 Jul 2021 08:45:01 +0000 (10:45 +0200)]
Convert Sloppiness enum to type-safe class
Joel Rosdahl [Tue, 20 Jul 2021 11:46:37 +0000 (13:46 +0200)]
Move code for cleanup, compressing and similar to storage/primary
Joel Rosdahl [Tue, 20 Jul 2021 10:40:06 +0000 (12:40 +0200)]
Rename storage::CacheEntryWriter to EntryWriter
Joel Rosdahl [Tue, 20 Jul 2021 14:56:15 +0000 (16:56 +0200)]
Move compression classes to compression directory/namespace
Joel Rosdahl [Tue, 20 Jul 2021 05:14:46 +0000 (07:14 +0200)]
Convert nonstd::string_view to std::string using constructor
to_string doesn’t exist in the std::string_view form, so use the
std::string constructor to make a future conversion to newer C++
versions easier.
Joel Rosdahl [Mon, 19 Jul 2021 19:19:26 +0000 (21:19 +0200)]
Tweak language
Unix systems use the name “symbolic link” or “symlink”, not “soft link”.
Joel Rosdahl [Mon, 19 Jul 2021 18:13:01 +0000 (20:13 +0200)]
test: Use test_failed_internal in inode_cache suite
Using test_failed_internal makes line numbers in reported failures
correct.
Joel Rosdahl [Mon, 19 Jul 2021 11:29:53 +0000 (13:29 +0200)]
Move exceptions.hpp to core
Gregor Jasny [Tue, 20 Jul 2021 14:18:43 +0000 (16:18 +0200)]
Derive ccache featues from storage registry (#903)
Joel Rosdahl [Mon, 19 Jul 2021 10:50:20 +0000 (12:50 +0200)]
HTTP storage: Fix crash when not specifying port
Url::port(const std::string&) apparently doesn’t accept an empty string
as the port (even though Url::port() can return an empty string), so
work around that.
Joel Rosdahl [Sun, 18 Jul 2021 10:52:23 +0000 (12:52 +0200)]
Move Util::get_path_in_cache to PrimaryStorage
PrimaryStorage is now the sole user of get_path_in_cache.
Joel Rosdahl [Sun, 18 Jul 2021 10:44:39 +0000 (12:44 +0200)]
Store secondary storage hits in primary storage
Joel Rosdahl [Fri, 16 Jul 2021 20:12:17 +0000 (22:12 +0200)]
Improve secondary storage framework
- Let the secondary storage framework create backend instances on demand and
track their failure state - the framework will stop calling a backend after a
connection error/timeout. This makes it possible for a backend to create a
connection in the constructor if wanted.
- Added API and implementation for redacting secrets in secondary storage URLs
and attributes. Passwords in URLs are now redacted in debug logs but not for
"ccache -p" and "ccache -k secondary_storage".
- Adapted existing storage backends to the new APIs. In particular, the Redis
backend could be simplified.
- Moved the SecondaryStorage class to src/storage/secondary, analogous to
PrimaryStorage which is in src/storage/primary.
Joel Rosdahl [Fri, 16 Jul 2021 19:19:36 +0000 (21:19 +0200)]
doc: Mention file URLs without double slash
Joel Rosdahl [Wed, 14 Jul 2021 08:10:10 +0000 (10:10 +0200)]
Remove redundant _utils suffix for util headers
Joel Rosdahl [Tue, 13 Jul 2021 18:40:31 +0000 (20:40 +0200)]
Add util::join function
Joel Rosdahl [Wed, 14 Jul 2021 07:41:55 +0000 (09:41 +0200)]
Split util headers into interface and implementation sections
Joel Rosdahl [Tue, 13 Jul 2021 11:04:49 +0000 (13:04 +0200)]
Move parse_signed and parse_unsigned to util
Joel Rosdahl [Wed, 14 Jul 2021 08:07:15 +0000 (10:07 +0200)]
Add util::value_or_throw function
Joel Rosdahl [Tue, 13 Jul 2021 08:50:12 +0000 (10:50 +0200)]
Move starts_with and ends_with to util
Joel Rosdahl [Tue, 13 Jul 2021 08:41:44 +0000 (10:41 +0200)]
Move strip_whitespace to util
Joel Rosdahl [Tue, 13 Jul 2021 08:29:34 +0000 (10:29 +0200)]
Sort Config::set_* methods
Joel Rosdahl [Tue, 13 Jul 2021 07:49:15 +0000 (09:49 +0200)]
Use std::this_thread::sleep_for instead of usleep
For portability.
Gregor Jasny [Sat, 17 Jul 2021 14:43:22 +0000 (16:43 +0200)]
HTTP storage: Fix IPv6 address handling (#898)
Gregor Jasny [Sat, 17 Jul 2021 12:05:37 +0000 (14:05 +0200)]
Fix test-all-systems (#901)
Gregor Jasny [Wed, 14 Jul 2021 09:37:14 +0000 (11:37 +0200)]
Expose list of enabled features (#897)
Gregor Jasny [Wed, 14 Jul 2021 09:36:48 +0000 (11:36 +0200)]
HTTP storage: Implement timeout support (#896)
Closes #888.
Gregor Jasny [Wed, 14 Jul 2021 07:26:13 +0000 (09:26 +0200)]
HTTP storage: Implement authentication support (#895)
Closes #887.
Joel Rosdahl [Wed, 14 Jul 2021 07:17:32 +0000 (09:17 +0200)]
Add CII Best Practices badge
Joel Rosdahl [Wed, 14 Jul 2021 07:03:31 +0000 (09:03 +0200)]
Mention that test cases are preferred for contributed code
Gregor Jasny [Tue, 13 Jul 2021 07:31:20 +0000 (09:31 +0200)]
Only run redis test if backend is enabled (#891)
Joel Rosdahl [Mon, 12 Jul 2021 11:51:50 +0000 (13:51 +0200)]
Add test for Redis storage with password
Joel Rosdahl [Sun, 11 Jul 2021 19:57:40 +0000 (21:57 +0200)]
Remove read-only tests of HTTP and Redis storage backends
The “read-only” tests in secondary_http and secondary_redis were
inspired by the “read-only” test in secondary_file. However, that test
actually verifies the secondary storage *framework*, not the storage
backend itself, so it’s enough to just do it in secondary_file.
Joel Rosdahl [Sun, 11 Jul 2021 19:51:49 +0000 (21:51 +0200)]
Make secondary_http and secondary_redis tests independent
Instead of starting an HTTP or Redis server that lives for the duration
of the test suite, start a new one for each test case. This makes tests
more independent and also opens up for future testing of e.g. different
ports and authentication modes by allowing different server
configurations for each test case.
Joel Rosdahl [Sun, 11 Jul 2021 19:38:46 +0000 (21:38 +0200)]
test: Fix secondary_http suite for test/run called with relative path
Joel Rosdahl [Sun, 11 Jul 2021 18:32:08 +0000 (20:32 +0200)]
Implement partial support for Redis provisional URI scheme
Reference: https://www.iana.org/assignments/uri-schemes/prov/redis
Supported: Username, password, host, port and db number. Not supported:
connection parameters.
This also drops support for Unix sockets.
Joel Rosdahl [Sun, 11 Jul 2021 06:52:55 +0000 (08:52 +0200)]
Simplify Redis reply object management
Joel Rosdahl [Sat, 10 Jul 2021 19:24:35 +0000 (21:24 +0200)]
Touch up Redis storage code slightly
Note: Unlike atoi, std::stoi throws an exception on conversion error so
use Util::parse_unsigned instead which throws an exception that is
caught correctly.
Joel Rosdahl [Sat, 10 Jul 2021 18:42:50 +0000 (20:42 +0200)]
ci: Extract common package list to a variable
Anders Björklund [Sat, 10 Jul 2021 18:39:59 +0000 (20:39 +0200)]
Add optional Redis secondary storage backend (#875)
Joel Rosdahl [Sat, 10 Jul 2021 11:55:38 +0000 (13:55 +0200)]
Touch up secondary storage code slightly
Joel Rosdahl [Fri, 9 Jul 2021 08:25:46 +0000 (10:25 +0200)]
Move is_full_path to util
Joel Rosdahl [Thu, 8 Jul 2021 14:34:41 +0000 (16:34 +0200)]
Merge pull request #676 from gjasny/httpcache-backend
Add secondary HTTP storage.
Gregor Jasny [Tue, 6 Jul 2021 12:03:41 +0000 (14:03 +0200)]
Add secondary HTTP storage
Fixes: #858
Gregor Jasny [Mon, 28 Jun 2021 06:46:36 +0000 (08:46 +0200)]
Remove dead code in cpp-httplib
See: https://github.com/yhirose/cpp-httplib/pull/965
Gregor Jasny [Mon, 28 Jun 2021 06:46:05 +0000 (08:46 +0200)]
Add cpp-httplib 0.9.0
from https://github.com/yhirose/cpp-httplib
Joel Rosdahl [Wed, 7 Jul 2021 07:23:51 +0000 (09:23 +0200)]
Improve ssize_t typedefs for Windows platforms
Joel Rosdahl [Tue, 6 Jul 2021 19:19:57 +0000 (21:19 +0200)]
Remove system.hpp, including what’s needed instead
This is the next step after
a57f70eda32e99221de56f5499079b4f00dc2bc5 .
Joel Rosdahl [Tue, 6 Jul 2021 18:01:01 +0000 (20:01 +0200)]
Don’t fail “Collect testdir” job if there is no testdir to collect
Joel Rosdahl [Tue, 6 Jul 2021 07:04:44 +0000 (09:04 +0200)]
Move READ_BUFFER_SIZE to config.h, adding a CCACHE_ prefix
Joel Rosdahl [Tue, 6 Jul 2021 06:57:50 +0000 (08:57 +0200)]
Add util::split_path_list function and remove PATH_DELIM macro
Joel Rosdahl [Tue, 6 Jul 2021 06:44:25 +0000 (08:44 +0200)]
Remove now mostly superfluous DIR_DELIM_CH macro
Gregor Jasny [Tue, 6 Jul 2021 20:18:44 +0000 (22:18 +0200)]
Update dockerfiles with supported distributions (#886)
Joel Rosdahl [Tue, 6 Jul 2021 11:01:47 +0000 (13:01 +0200)]
Merge pull request #881 from gjasny/use-url-class
Gregor Jasny [Tue, 6 Jul 2021 10:49:08 +0000 (12:49 +0200)]
Require CMake 3.10 (#885)
Fixes #884.
Gregor Jasny [Mon, 5 Jul 2021 20:08:46 +0000 (22:08 +0200)]
Use URL class for URL parsing
Gregor Jasny [Fri, 2 Jul 2021 11:39:46 +0000 (13:39 +0200)]
Add CxxUrl v0.2
from https://github.com/chmike/CxxUrl
Gregor Jasny [Mon, 5 Jul 2021 18:20:46 +0000 (20:20 +0200)]
Globally define WIN32_LEAN_AND_MEAN (#882)
Gregor Jasny [Mon, 5 Jul 2021 18:18:18 +0000 (20:18 +0200)]
Fix CMake feature detection (#883)
When enabling CMake policy
<https://cmake.org/cmake/help/latest/policy/CMP0067.html> by either enabling it
directly or via a `cmake_minimum_required` of `3.8` or later, the
`test.inode_cache` test starts to fail.
This happens because this policy slightly changes the `CheckCSourceCompiles`
logic by passing-in any configured C-standard. The detection of the following
features now report absence:
--- CMakeCache-old.txt 2021-07-05 15:50:25.
698278961 +0200
+++ CMakeCache-new.txt 2021-07-05 15:50:54.
626397301 +0200
@@ -657,7 +657,7 @@
//Have function pthread_mutexattr_setpshared
HAVE_PTHREAD_MUTEXATTR_SETPSHARED:INTERNAL=1
//Test HAVE_PTHREAD_MUTEX_ROBUST
-HAVE_PTHREAD_MUTEX_ROBUST:INTERNAL=1
+HAVE_PTHREAD_MUTEX_ROBUST:INTERNAL=
//Have include pwd.h
HAVE_PWD_H:INTERNAL=1
//Have function realpath
@@ -675,9 +675,9 @@
//Test HAVE_STRUCT_STATFS_F_FSTYPENAME
HAVE_STRUCT_STATFS_F_FSTYPENAME:INTERNAL=
//Test HAVE_STRUCT_STAT_ST_CTIM
-HAVE_STRUCT_STAT_ST_CTIM:INTERNAL=1
+HAVE_STRUCT_STAT_ST_CTIM:INTERNAL=
//Test HAVE_STRUCT_STAT_ST_MTIM
-HAVE_STRUCT_STAT_ST_MTIM:INTERNAL=1
+HAVE_STRUCT_STAT_ST_MTIM:INTERNAL=
//Have function syslog
HAVE_SYSLOG:INTERNAL=1
//Have include syslog.h
In case of `HAVE_PTHREAD_MUTEX_ROBUST` the now passed-in `-std=c99` does not
enable the required `__USE_XOPEN2K` extension:
#ifdef __USE_XOPEN2K
/* Robust mutex or not flags. */
enum
{
PTHREAD_MUTEX_STALLED,
PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,
PTHREAD_MUTEX_ROBUST,
PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST
};
#endif
To remedy the situation CMake now checks for those features within a C++
language context. In C++ those features seem to be available without enabling
any extra extensions.
It also makes the check more precise because all of the consumers are C++ (and
not C) compilation units.
Joel Rosdahl [Mon, 5 Jul 2021 17:10:20 +0000 (19:10 +0200)]
Don’t collapse empty lines in rewrite_stderr_to_absolute_paths
Joel Rosdahl [Mon, 5 Jul 2021 17:08:04 +0000 (19:08 +0200)]
Don’t collapse empty lines in Depfile::rewrite_paths
Joel Rosdahl [Mon, 5 Jul 2021 12:41:48 +0000 (14:41 +0200)]
Add mode parameter to split_into_* and Tokenizer
Joel Rosdahl [Sun, 4 Jul 2021 16:45:14 +0000 (18:45 +0200)]
Fix typo in Util::split_into_views doc string
Joel Rosdahl [Sun, 4 Jul 2021 05:13:02 +0000 (07:13 +0200)]
Fix bug in debug_dir (CCACHE_DEBUGDIR)
The absolute path to the object file is not created correctly if the
object file doesn’t already exist.
Joel Rosdahl [Sun, 4 Jul 2021 05:12:53 +0000 (07:12 +0200)]
Add util::to_absolute_path
Joel Rosdahl [Sun, 4 Jul 2021 04:59:07 +0000 (06:59 +0200)]
Move is_absolute_path to util
Anders Björklund [Sat, 3 Jul 2021 18:17:53 +0000 (20:17 +0200)]
Add magic file for identifying ccache files (#880)
Useful when working with streams from server.
Joel Rosdahl [Sat, 3 Jul 2021 18:13:42 +0000 (20:13 +0200)]
doc: Mention “-” for standard input consistently
Joel Rosdahl [Fri, 2 Jul 2021 18:00:09 +0000 (20:00 +0200)]
Add integration test for stats_log
Joel Rosdahl [Fri, 2 Jul 2021 17:59:03 +0000 (19:59 +0200)]
Tweak stats_log documentation
Joel Rosdahl [Fri, 2 Jul 2021 17:58:48 +0000 (19:58 +0200)]
Simplify format_stats_log implementation
Anders Björklund [Sat, 3 Jul 2021 18:10:36 +0000 (20:10 +0200)]
Allow dumping stdin by giving - as path (#879)
Similar to other commands, such as tar.
Gregor Jasny [Sat, 3 Jul 2021 18:03:34 +0000 (20:03 +0200)]
Use generator expression for ccache location (#878)
With multi-config generators like Xcode the binary is stored
within an extra Debug / Release directory.
Tested with CMake 3.4.3
Joel Rosdahl [Thu, 1 Jul 2021 18:51:40 +0000 (20:51 +0200)]
Merge pull request #873 from gjasny/fix-appleclang-detection
Joel Rosdahl [Thu, 1 Jul 2021 06:34:54 +0000 (08:34 +0200)]
Fix source file suffix selection for libblake3
In the add_source_if_enabled function in
src/third_party/blake3/CMakeLists.txt, the suffix variable is unset on a
CMake reconfigure in an already configured build tree. This makes CMake
guess the extension and always choose “.c” on a reconfigure.
Fix this by always setting the suffix variable.
Joel Rosdahl [Tue, 29 Jun 2021 18:09:49 +0000 (20:09 +0200)]
Allow one -Xarch_* option that matches -arch (#874)
Closes #871.
Gregor Jasny [Tue, 29 Jun 2021 09:45:10 +0000 (11:45 +0200)]
Default to clang compiler on macOS
Gregor Jasny [Tue, 29 Jun 2021 09:42:50 +0000 (11:42 +0200)]
Fix Apple Clang detection
Apple Clang, when called via `gcc` emits a `Configured with` line
on stderr which confuses the compiler detection. We just ignore
stderr for the `--version` query now.