]> git.ipfire.org Git - thirdparty/ccache.git/log
thirdparty/ccache.git
3 years agorefactor: Extract get_umask function to Util
Joel Rosdahl [Sat, 19 Feb 2022 15:52:26 +0000 (16:52 +0100)] 
refactor: Extract get_umask function to Util

3 years agochore: Touch up Util::read_text_file code
Joel Rosdahl [Sat, 19 Feb 2022 15:24:36 +0000 (16:24 +0100)] 
chore: Touch up Util::read_text_file code

3 years agofix: Support UTF-16LE .rsp files (#1005)
vvainola [Sat, 19 Feb 2022 15:22:16 +0000 (17:22 +0200)] 
fix: Support UTF-16LE .rsp files (#1005)

3 years agodocs: Add documentation that compiler plugins are hashed too (#1006)
Philipp Gortan [Tue, 15 Feb 2022 19:41:24 +0000 (20:41 +0100)] 
docs: Add documentation that compiler plugins are hashed too (#1006)

3 years agofeat: Remove automatic enabling of ccache for ccache build
Joel Rosdahl [Mon, 7 Feb 2022 19:36:47 +0000 (20:36 +0100)] 
feat: Remove automatic enabling of ccache for ccache build

When enabling ccache using the standard recommended method (via PATH or
via masquerading symlinks), UseCcache.cmake will introduce double
invocations of ccache. I find this a bit annoying and I also think that
it should be up to the user to enable or not enable ccache and which
settings to use.

3 years agochore: Remove obsolete GCC 4.8 workarounds
Joel Rosdahl [Mon, 7 Feb 2022 19:31:02 +0000 (20:31 +0100)] 
chore: Remove obsolete GCC 4.8 workarounds

3 years agofix: Ensure that raw filenames are static in length
Joel Rosdahl [Mon, 7 Feb 2022 19:20:08 +0000 (20:20 +0100)] 
fix: Ensure that raw filenames are static in length

PrimaryStorage::evict assumes that the entry number is encoded in the
filename as one character, so make sure that this precondition holds in
Result::{Reader,Writer} as well.

3 years agorefactor: Clean up code related to -Fp/-Yu with concatenated path
Joel Rosdahl [Sat, 5 Feb 2022 18:48:59 +0000 (19:48 +0100)] 
refactor: Clean up code related to -Fp/-Yu with concatenated path

3 years agofix: Fix clang-cl display name (#1003)
Orgad Shaneh [Thu, 3 Feb 2022 20:19:55 +0000 (22:19 +0200)] 
fix: Fix clang-cl display name (#1003)

3 years agostyle: Improve names related to clang-cl
Joel Rosdahl [Thu, 3 Feb 2022 19:49:11 +0000 (20:49 +0100)] 
style: Improve names related to clang-cl

3 years agodocs: Add missing documentation of compiler type “clang-cl”
Joel Rosdahl [Thu, 3 Feb 2022 19:48:12 +0000 (20:48 +0100)] 
docs: Add missing documentation of compiler type “clang-cl”

3 years agofix: Don’t finalize ZstdCompressor twice
Joel Rosdahl [Thu, 3 Feb 2022 08:57:08 +0000 (09:57 +0100)] 
fix: Don’t finalize ZstdCompressor twice

This fixes an issue with older libzstd versions, which don’t like when
you continue writing data to a stream after calling ZSTD_endStream.

3 years agofeat: Add support for clang-cl (#993)
Orgad Shaneh [Thu, 3 Feb 2022 19:38:31 +0000 (21:38 +0200)] 
feat: Add support for clang-cl (#993)

Co-authored-by: Luboš Luňák <l.lunak@centrum.cz>
3 years agofeat: Add option to use Bearer token with HTTP backend (#1001)
Delgan [Fri, 28 Jan 2022 18:28:15 +0000 (19:28 +0100)] 
feat: Add option to use Bearer token with HTTP backend (#1001)

3 years agobump: Upgrade to cpp-httplib 0.10.2
Joel Rosdahl [Thu, 27 Jan 2022 19:15:29 +0000 (20:15 +0100)] 
bump: Upgrade to cpp-httplib 0.10.2

3 years agofeat: Enable HTTP keep-alive by default (#1000)
Joel Rosdahl [Thu, 27 Jan 2022 19:10:05 +0000 (20:10 +0100)] 
feat: Enable HTTP keep-alive by default (#1000)

3 years agofeat: Add --inspect option instead of --dump-manifest/--dump-result
Joel Rosdahl [Mon, 24 Jan 2022 19:24:16 +0000 (20:24 +0100)] 
feat: Add --inspect option instead of --dump-manifest/--dump-result

“Inspect” sounds more appropriate than “dump” for viewing metadata of
cache files. Also, it’s convenient to have one option instead of two
different.

3 years agoenhance: Add File::File(FILE*) constructor
Joel Rosdahl [Thu, 30 Dec 2021 12:29:18 +0000 (13:29 +0100)] 
enhance: Add File::File(FILE*) constructor

3 years agofix: Do not handle -o<file> for MSVC (#994)
Orgad Shaneh [Mon, 24 Jan 2022 17:07:20 +0000 (19:07 +0200)] 
fix: Do not handle -o<file> for MSVC (#994)

Co-authored-by: Luboš Luňák <l.lunak@centrum.cz>
3 years agobump: Upgrade to BLAKE3 1.3.0
Joel Rosdahl [Sun, 23 Jan 2022 19:58:56 +0000 (20:58 +0100)] 
bump: Upgrade to BLAKE3 1.3.0

3 years agobump: Upgrade to fmt 8.1.1
Joel Rosdahl [Sun, 23 Jan 2022 19:35:30 +0000 (20:35 +0100)] 
bump: Upgrade to fmt 8.1.1

3 years agobump: Upgrade to doctest 2.4.8
Joel Rosdahl [Sun, 23 Jan 2022 19:33:01 +0000 (20:33 +0100)] 
bump: Upgrade to doctest 2.4.8

3 years agobump: Upgrade to zstd 1.5.2
Joel Rosdahl [Sun, 23 Jan 2022 19:29:27 +0000 (20:29 +0100)] 
bump: Upgrade to zstd 1.5.2

3 years agofeat: Detect MSVC compiler case insensitive and with exact match
Joel Rosdahl [Sun, 23 Jan 2022 19:27:03 +0000 (20:27 +0100)] 
feat: Detect MSVC compiler case insensitive and with exact match

3 years agofeat: Make it possible to configure compiler type msvc
Joel Rosdahl [Sun, 23 Jan 2022 15:55:40 +0000 (16:55 +0100)] 
feat: Make it possible to configure compiler type msvc

3 years agorefactor: Rename compiler type cl to msvc
Joel Rosdahl [Sun, 23 Jan 2022 15:54:30 +0000 (16:54 +0100)] 
refactor: Rename compiler type cl to msvc

3 years agofix: Ensure existing directory before copying from secondary storage
Joel Rosdahl [Thu, 20 Jan 2022 19:57:09 +0000 (20:57 +0100)] 
fix: Ensure existing directory before copying from secondary storage

Fixes #998.

3 years agodoc: Fix typo and missing word
Joel Rosdahl [Wed, 19 Jan 2022 18:59:18 +0000 (19:59 +0100)] 
doc: Fix typo and missing word

3 years agotest: Verify -fsyntax-only handling without -c
Joel Rosdahl [Mon, 17 Jan 2022 17:47:24 +0000 (18:47 +0100)] 
test: Verify -fsyntax-only handling without -c

3 years agorefactor: Simplify -fsyntax-only logic
Joel Rosdahl [Mon, 17 Jan 2022 17:46:45 +0000 (18:46 +0100)] 
refactor: Simplify -fsyntax-only logic

3 years agofeat: Add support for MSVC's -Zs option (#995)
Orgad Shaneh [Mon, 17 Jan 2022 17:41:15 +0000 (19:41 +0200)] 
feat: Add support for MSVC's -Zs option (#995)

Co-authored-by: Luboš Luňák <l.lunak@centrum.cz>
3 years agoFix upload-redis after cache entry format change (#973)
Anders Björklund [Mon, 17 Jan 2022 17:23:17 +0000 (18:23 +0100)] 
Fix upload-redis after cache entry format change (#973)

3 years agofeat: Support MSVC /Yu option (compiling with PCH) (#991)
Orgad Shaneh [Sun, 16 Jan 2022 17:51:55 +0000 (19:51 +0200)] 
feat: Support MSVC /Yu option (compiling with PCH) (#991)

Co-authored-by: Luboš Luňák <l.lunak@centrum.cz>
3 years agofix: Unconstify variable to allow automatic move
Joel Rosdahl [Mon, 10 Jan 2022 21:22:08 +0000 (22:22 +0100)] 
fix: Unconstify variable to allow automatic move

As suggested by Clang-Tidy.

3 years agofix: Make src/ccache.cpp cacheable by ccache itself
Joel Rosdahl [Sun, 9 Jan 2022 21:13:02 +0000 (22:13 +0100)] 
fix: Make src/ccache.cpp cacheable by ccache itself

“.incbin” should not be present verbatim in the source code since that
makes ccache consider the code uncacheable.

Regression in 2d2de82bb9231b981b40486b093a2c0002200c40.

3 years agodoc: Improve documentation of --config-path
Joel Rosdahl [Mon, 10 Jan 2022 20:13:31 +0000 (21:13 +0100)] 
doc: Improve documentation of --config-path

See also discussion #986.

3 years agoFix stats output for secondary storage (#988)
Orgad Shaneh [Mon, 10 Jan 2022 19:56:59 +0000 (21:56 +0200)] 
Fix stats output for secondary storage (#988)

3 years agofix: Check writability of /run/user/<UID>/ccache-tmp before using
Joel Rosdahl [Thu, 6 Jan 2022 15:57:00 +0000 (16:57 +0100)] 
fix: Check writability of /run/user/<UID>/ccache-tmp before using

Closes #984.

3 years agorefactor: Decouple Manifest data structure from how it’s stored
Joel Rosdahl [Wed, 29 Dec 2021 19:50:29 +0000 (20:50 +0100)] 
refactor: Decouple Manifest data structure from how it’s stored

Manifest is now a standalone data structure that knows how to serialize
and deserialize itself but not how it’s embedded in a cache entry.

3 years agobump: Upgrade to xxHash 0.8.1
Joel Rosdahl [Wed, 29 Dec 2021 15:26:32 +0000 (16:26 +0100)] 
bump: Upgrade to xxHash 0.8.1

3 years agobump: Upgrade to cpp-httplib 0.10.1
Joel Rosdahl [Wed, 29 Dec 2021 15:21:32 +0000 (16:21 +0100)] 
bump: Upgrade to cpp-httplib 0.10.1

3 years agotest: Improve code style
Joel Rosdahl [Wed, 29 Dec 2021 14:23:35 +0000 (15:23 +0100)] 
test: Improve code style

3 years agostyle: Avoid operator++ in expression
Joel Rosdahl [Wed, 29 Dec 2021 13:58:20 +0000 (14:58 +0100)] 
style: Avoid operator++ in expression

3 years agofix: Avoid .incbin false positive (#983)
Alexey Sheplyakov [Wed, 29 Dec 2021 14:20:11 +0000 (18:20 +0400)] 
fix: Avoid .incbin false positive (#983)

3 years agofix: Remove duplicate -Xarch second argument (#981)
Steve Mokris [Wed, 29 Dec 2021 13:56:45 +0000 (08:56 -0500)] 
fix: Remove duplicate -Xarch second argument (#981)

3 years agostyle: Add some comments and tweaks
Joel Rosdahl [Sun, 19 Dec 2021 20:11:49 +0000 (21:11 +0100)] 
style: Add some comments and tweaks

3 years agofix: Fix copying of binary files on Windows (#979)
R. Voggenauer [Sun, 19 Dec 2021 20:07:58 +0000 (21:07 +0100)] 
fix: Fix copying of binary files on Windows (#979)

3 years agofix: Don’t run trim_dir test suite unless cleanup tests are enabled
Joel Rosdahl [Sun, 19 Dec 2021 15:38:36 +0000 (16:38 +0100)] 
fix: Don’t run trim_dir test suite unless cleanup tests are enabled

Fixes #974.

3 years agorefactor: Move conversion to slash option outside file test
Joel Rosdahl [Sun, 12 Dec 2021 20:12:22 +0000 (21:12 +0100)] 
refactor: Move conversion to slash option outside file test

3 years agorefactor: Remove redundant conditions for MSVC options
Joel Rosdahl [Sun, 12 Dec 2021 20:10:39 +0000 (21:10 +0100)] 
refactor: Remove redundant conditions for MSVC options

3 years agofix: Handle stdout from distcc-pump when used as a prefix
Joel Rosdahl [Sun, 12 Dec 2021 19:41:36 +0000 (20:41 +0100)] 
fix: Handle stdout from distcc-pump when used as a prefix

The compiler guessing doesn’t work if pump is used as a
prefix/CCACHE_PREFIX, so let’s just not depend on such guesswork.

Also, since the distcc-pump wrapper isn’t really a compiler type, it
actually makes sense not to treat it as such.

3 years agofeat: Support caching stdout for all compiler types
Joel Rosdahl [Sun, 12 Dec 2021 19:29:38 +0000 (20:29 +0100)] 
feat: Support caching stdout for all compiler types

3 years agoenhance: Add Result::write_data method
Joel Rosdahl [Thu, 9 Dec 2021 20:10:10 +0000 (21:10 +0100)] 
enhance: Add Result::write_data method

3 years agofix: MSVC's -link option is too hard (#972)
Luboš Luňák [Sun, 12 Dec 2021 20:15:21 +0000 (21:15 +0100)] 
fix: MSVC's -link option is too hard (#972)

3 years agofix: Handle MSVC flags -MD[d], -MT[d] and -LT[d] properly (#971)
Luboš Luňák [Sun, 12 Dec 2021 20:09:40 +0000 (21:09 +0100)] 
fix: Handle MSVC flags -MD[d], -MT[d] and -LT[d] properly (#971)

3 years agoFix and simplify handling of options for MSVC (#954)
Luboš Luňák [Sun, 12 Dec 2021 20:03:47 +0000 (21:03 +0100)] 
Fix and simplify handling of options for MSVC (#954)

3 years agoAdd support for caching stdout from MSVC (#962)
Luboš Luňák [Sun, 12 Dec 2021 19:57:10 +0000 (20:57 +0100)] 
Add support for caching stdout from MSVC (#962)

3 years agofix: Ignore CCACHE_NOCPP2=1 with MSVC (#970)
Luboš Luňák [Tue, 30 Nov 2021 19:47:14 +0000 (20:47 +0100)] 
fix: Ignore CCACHE_NOCPP2=1 with MSVC (#970)

3 years agodoc: Correct reference to the debug_dir option
Joel Rosdahl [Fri, 26 Nov 2021 19:27:56 +0000 (20:27 +0100)] 
doc: Correct reference to the debug_dir option

3 years agorefactor: Simplify code related to send_to_fd
Joel Rosdahl [Wed, 24 Nov 2021 20:26:12 +0000 (21:26 +0100)] 
refactor: Simplify code related to send_to_fd

3 years agofix: Correct error message in send_to_fd
Joel Rosdahl [Wed, 24 Nov 2021 20:25:41 +0000 (21:25 +0100)] 
fix: Correct error message in send_to_fd

3 years agoMerge pull request #968 from jhnc-oss/fix-newline-on-windows
Joel Rosdahl [Wed, 24 Nov 2021 20:17:58 +0000 (21:17 +0100)] 
Merge pull request #968 from jhnc-oss/fix-newline-on-windows

3 years agofix: handle newlines on Windows properly 968/head
Luboš Luňák [Mon, 1 Nov 2021 12:37:11 +0000 (12:37 +0000)] 
fix: handle newlines on Windows properly

3 years agofix: Use default object file extension .obj for MSVC (#964)
Luboš Luňák [Tue, 23 Nov 2021 18:35:46 +0000 (19:35 +0100)] 
fix: Use default object file extension .obj for MSVC (#964)

3 years agofix: Make AVX2 code work also with MSVC (#963)
Luboš Luňák [Tue, 23 Nov 2021 18:33:34 +0000 (19:33 +0100)] 
fix: Make AVX2 code work also with MSVC (#963)

3 years agochore: Improve language in NEWS
Joel Rosdahl [Wed, 17 Nov 2021 19:49:40 +0000 (20:49 +0100)] 
chore: Improve language in NEWS

3 years agochore: Update NEWS
Joel Rosdahl [Wed, 17 Nov 2021 19:31:58 +0000 (20:31 +0100)] 
chore: Update NEWS

(cherry picked from commit 764dc83795d9a05c2a9d69f267ed86f61a253d09)

3 years agofix: Correct error handling for unconstructible storage backend
Joel Rosdahl [Wed, 17 Nov 2021 16:00:34 +0000 (17:00 +0100)] 
fix: Correct error handling for unconstructible storage backend

This fixes a crash when using a secondary storage backend that throws on
construction, for instance the Redis backend with an unreachable server.

Closes #966.

3 years agofix: Remove extraneous space in log message
Joel Rosdahl [Wed, 17 Nov 2021 15:59:55 +0000 (16:59 +0100)] 
fix: Remove extraneous space in log message

3 years agofix: Correct entry_size field for result entries
Joel Rosdahl [Wed, 17 Nov 2021 15:47:41 +0000 (16:47 +0100)] 
fix: Correct entry_size field for result entries

The entry_size field in result entries created by ccache 4.5 are off by
one. Fix this by properly accounting for the new format_ver field in
result payload data.

Note: This bug only affects the recompression feature (-X/--recompress)
and not other ccache usage.

Closes #965.

3 years agofix: Store actual compression level in cache entry header
Joel Rosdahl [Wed, 17 Nov 2021 15:45:25 +0000 (16:45 +0100)] 
fix: Store actual compression level in cache entry header

This detail got lost in e83ac28d74dcb60af9ceaa58d92e706ded089ea3.

3 years agofeat: Visual C/C++ compiler support (#506)
Cristian Adam [Mon, 15 Nov 2021 19:06:16 +0000 (20:06 +0100)] 
feat: Visual C/C++ compiler support (#506)

3 years agochore: Update NEWS v4.5
Joel Rosdahl [Sat, 13 Nov 2021 09:38:46 +0000 (10:38 +0100)] 
chore: Update NEWS

3 years agochore: Update authors
Joel Rosdahl [Fri, 12 Nov 2021 19:07:09 +0000 (20:07 +0100)] 
chore: Update authors

3 years agodoc: Tweak preposition
Joel Rosdahl [Fri, 12 Nov 2021 18:54:07 +0000 (19:54 +0100)] 
doc: Tweak preposition

3 years agofeat: Pretty-print entry type in --dump-{manifest,result}
Joel Rosdahl [Tue, 9 Nov 2021 18:20:07 +0000 (19:20 +0100)] 
feat: Pretty-print entry type in --dump-{manifest,result}

3 years agofeat: Add namespace support
Joel Rosdahl [Mon, 8 Nov 2021 18:38:35 +0000 (19:38 +0100)] 
feat: Add namespace support

If a namespace configured, the namespace string will be added to the
hashed data for each compilation. This will make the associated cache
entries logically separate from cache entries with other namespaces, but
they will still share the same storage space. Cache entries can also be
selectively removed from the primary cache with the command line option
--evict-namespace, potentially in combination with --evict-older-than.

Closes #870.

3 years agofix: Disable hard link and file clone with enabled secondary storage
Joel Rosdahl [Sun, 7 Nov 2021 12:37:47 +0000 (13:37 +0100)] 
fix: Disable hard link and file clone with enabled secondary storage

3 years agorefactor: Rename tag header field to namespace
Joel Rosdahl [Sat, 6 Nov 2021 18:44:52 +0000 (19:44 +0100)] 
refactor: Rename tag header field to namespace

3 years agofeat: Support rewriting absolute path to Clang option --gcc-toolchain
Joel Rosdahl [Sat, 6 Nov 2021 18:25:32 +0000 (19:25 +0100)] 
feat: Support rewriting absolute path to Clang option --gcc-toolchain

Closes #889.

3 years agostyle: Add curly braces around if statement body
Joel Rosdahl [Sat, 6 Nov 2021 15:29:34 +0000 (16:29 +0100)] 
style: Add curly braces around if statement body

3 years agodoc: Fix description of --checksum-file
Joel Rosdahl [Sat, 6 Nov 2021 15:22:48 +0000 (16:22 +0100)] 
doc: Fix description of --checksum-file

3 years agofix: Correct debug dir handling on Windows (#955)
Luboš Luňák [Sat, 6 Nov 2021 15:28:01 +0000 (16:28 +0100)] 
fix: Correct debug dir handling on Windows (#955)

3 years agofeat: Improve cache entry format
Joel Rosdahl [Thu, 4 Nov 2021 07:20:33 +0000 (08:20 +0100)] 
feat: Improve cache entry format

Cache entry header changes:

* Changed magic bytes to represent a generic “ccache entry” instead of a
  specific result/manifest entry.
* Added a payload type field (currently manifest or result) separate
  from the magic bytes. This allows code that only operates on the
  “container” (e.g. recompression) to be ignorant of payload types and
  changes to payload formats.
* Added a creation timestamp field. This can be useful when debugging,
  for instance to match the timestamp with a build start/end.
* Added a field for the ccache version that created the cache entry.
  This can be useful for debugging, and it also makes it possible for
  future ccache versions to refuse using results from previous buggy
  ccache versions.
* Added a tag field to be used by a future feature.

Cache entry epilogue changes:

* Use 128-bit XXH3 instead of 64-bit XXH3 for the checksum since those
  extra bits are computed by the algorithm anyway.

Manifest/result entry changes:

* Added manifest/result format version fields. This means that the
  payload version can be stepped without stepping the outer format
  version, thereby making it possible for older ccache versions to for
  instance recompress the cache even though the payload format has
  changed.

Other improvements:

* Added generic Reader and Writer interfaces to decouple code from using
  FILE* directly.
* Refactored checksum handling into ChecksummingReader and
  ChecksummingWriter.

3 years agoenhance: Add util::XXH3_128
Joel Rosdahl [Tue, 19 Oct 2021 18:38:54 +0000 (20:38 +0200)] 
enhance: Add util::XXH3_128

3 years agorefactor: Rename Checksum to util::XXH3_64
Joel Rosdahl [Tue, 19 Oct 2021 18:34:24 +0000 (20:34 +0200)] 
refactor: Rename Checksum to util::XXH3_64

3 years agobump: Upgrade to BLAKE3 1.2.0
Joel Rosdahl [Sat, 6 Nov 2021 07:54:46 +0000 (08:54 +0100)] 
bump: Upgrade to BLAKE3 1.2.0

3 years agobump: Upgrade to cpp-httplib 0.9.7
Joel Rosdahl [Wed, 3 Nov 2021 20:38:50 +0000 (21:38 +0100)] 
bump: Upgrade to cpp-httplib 0.9.7

3 years agobump: Upgrade to optional-lite 3.5.0
Joel Rosdahl [Wed, 3 Nov 2021 20:35:05 +0000 (21:35 +0100)] 
bump: Upgrade to optional-lite 3.5.0

3 years agobump: Upgrade to fmt 8.0.1
Joel Rosdahl [Wed, 3 Nov 2021 20:33:08 +0000 (21:33 +0100)] 
bump: Upgrade to fmt 8.0.1

3 years agoci: Add job for testing Clang 12
Joel Rosdahl [Wed, 3 Nov 2021 20:28:53 +0000 (21:28 +0100)] 
ci: Add job for testing Clang 12

3 years agofix: Correct win32 log messages about file locks (#953)
Luboš Luňák [Wed, 3 Nov 2021 20:19:54 +0000 (21:19 +0100)] 
fix: Correct win32 log messages about file locks (#953)

3 years agobump: Upgrade to Hiredis 1.0.2 (#949)
Alexander Falkenstern [Thu, 28 Oct 2021 18:42:12 +0000 (20:42 +0200)] 
bump: Upgrade to Hiredis 1.0.2 (#949)

3 years agofix: Support special characters in URL user info
Joel Rosdahl [Wed, 6 Oct 2021 19:37:31 +0000 (21:37 +0200)] 
fix: Support special characters in URL user info

Bump CxxUrl to v0.3 to fix a URL parsing bug, as suggested by Russell
McClellan.

Fixes #941.

3 years agodoc: Tweak AsciiDoc bullet indentation
Joel Rosdahl [Wed, 6 Oct 2021 19:29:25 +0000 (21:29 +0200)] 
doc: Tweak AsciiDoc bullet indentation

3 years agoMerge pull request #934 from gjasny/no-keep-alive
Joel Rosdahl [Wed, 6 Oct 2021 19:27:07 +0000 (21:27 +0200)] 
Merge pull request #934 from gjasny/no-keep-alive

3 years agofeat(http-storage): Make HTTP keep-alive configurable 934/head
Gregor Jasny [Fri, 1 Oct 2021 06:54:38 +0000 (08:54 +0200)] 
feat(http-storage): Make HTTP keep-alive configurable

3 years agofix(http-storage): Disable broken connection keep-alive
Gregor Jasny [Sun, 5 Sep 2021 17:55:27 +0000 (19:55 +0200)] 
fix(http-storage): Disable broken connection keep-alive

After ignoring SIGPIPE (b2a88e7) keep-alive support has been
re-enabled for HTTP Storage. Unfortunately it's still broken
but does not crash ccache, anymore.

This is the tcpdump of a (cache miss) compilation that takes longer
than the server keep-alive timeout:

```
10:51:17.214678 IP 10.34.129.62.37468 > 10.34.132.45.webcache: Flags [S], seq 1018344313, win 62727, options [mss 8961,sackOK,TS val 1638189791 ecr 0,nop,wscale 7], length 0
10:51:17.216386 IP 10.34.132.45.webcache > 10.34.129.62.37468: Flags [S.], seq 2695216843, ack 1018344314, win 26847, options [mss 8645,sackOK,TS val 1598789083 ecr 1638189791,nop,wscale 9], length 0
10:51:17.216424 IP 10.34.129.62.37468 > 10.34.132.45.webcache: Flags [.], ack 1, win 491, options [nop,nop,TS val 1638189793 ecr 1598789083], length 0
10:51:17.216534 IP 10.34.129.62.37468 > 10.34.132.45.webcache: Flags [P.], seq 1:143, ack 1, win 491, options [nop,nop,TS val 1638189793 ecr 1598789083], length 142: HTTP: GET /cache/ff87vlgke3poou7uq1ma2m3hh000gckmq HTTP/1.1
10:51:17.217393 IP 10.34.132.45.webcache > 10.34.129.62.37468: Flags [.], ack 143, win 55, options [nop,nop,TS val 1598789084 ecr 1638189793], length 0
10:51:17.217433 IP 10.34.132.45.webcache > 10.34.129.62.37468: Flags [P.], seq 1:309, ack 143, win 55, options [nop,nop,TS val 1598789085 ecr 1638189793], length 308: HTTP: HTTP/1.1 404 Not Found
10:51:17.217456 IP 10.34.129.62.37468 > 10.34.132.45.webcache: Flags [.], ack 309, win 489, options [nop,nop,TS val 1638189794 ecr 1598789085], length 0
10:51:17.538819 IP 10.34.129.62.37468 > 10.34.132.45.webcache: Flags [P.], seq 143:285, ack 309, win 489, options [nop,nop,TS val 1638190115 ecr 1598789085], length 142: HTTP: GET /cache/135di89r02vv5fgopbtsopfjllo01b8lg HTTP/1.1
10:51:17.539838 IP 10.34.132.45.webcache > 10.34.129.62.37468: Flags [P.], seq 309:617, ack 285, win 57, options [nop,nop,TS val 1598789407 ecr 1638190115], length 308: HTTP: HTTP/1.1 404 Not Found
10:51:17.539876 IP 10.34.129.62.37468 > 10.34.132.45.webcache: Flags [.], ack 617, win 487, options [nop,nop,TS val 1638190117 ecr 1598789407], length 0

10:52:32.536322 IP 10.34.132.45.webcache > 10.34.129.62.37468: Flags [F.], seq 617, ack 285, win 57, options [nop,nop,TS val 1598864404 ecr 1638190117], length 0
10:52:32.577893 IP 10.34.129.62.37468 > 10.34.132.45.webcache: Flags [.], ack 618, win 487, options [nop,nop,TS val 1638265155 ecr 1598864404], length 0

10:52:42.173135 IP 10.34.129.62.37468 > 10.34.132.45.webcache: Flags [P.], seq 285:492, ack 618, win 487, options [nop,nop,TS val 1638274750 ecr 1598864404], length 207: HTTP: PUT /cache/135di89r02vv5fgopbtsopfjllo01b8lg HTTP/1.1
10:52:42.173153 IP 10.34.129.62.37468 > 10.34.132.45.webcache: Flags [.], seq 492:9125, ack 618, win 487, options [nop,nop,TS val 1638274750 ecr 1598864404], length 8633: HTTP
10:52:42.173159 IP 10.34.129.62.37468 > 10.34.132.45.webcache: Flags [P.], seq 9125:17758, ack 618, win 487, options [nop,nop,TS val 1638274750 ecr 1598864404], length 8633: HTTP
10:52:42.173165 IP 10.34.129.62.37468 > 10.34.132.45.webcache: Flags [.], seq 17758:26391, ack 618, win 487, options [nop,nop,TS val 1638274750 ecr 1598864404], length 8633: HTTP
10:52:42.174049 IP 10.34.132.45.webcache > 10.34.129.62.37468: Flags [R], seq 2695217461, win 0, length 0
10:52:42.174056 IP 10.34.132.45.webcache > 10.34.129.62.37468: Flags [R], seq 2695217461, win 0, length 0
10:52:42.174057 IP 10.34.132.45.webcache > 10.34.129.62.37468: Flags [R], seq 2695217461, win 0, length 0
```

The PUT error due to the closed socket is also logged:
```
[2021-09-14T10:52:42.068112 2089 ] Storing result file modules/asyncly/Test/Unit/CMakeFiles/test_asyncly.dir/future/FutureTest.cpp.o
[2021-09-14T10:52:42.068118 2089 ] Storing embedded file #0 .o (36847216 bytes) from modules/asyncly/Test/Unit/CMakeFiles/test_asyncly.dir/future/FutureTest.cpp.o
[2021-09-14T10:52:42.154930 2089 ] Storing result file modules/asyncly/Test/Unit/CMakeFiles/test_asyncly.dir/future/FutureTest.cpp.o.d
[2021-09-14T10:52:42.154951 2089 ] Storing embedded file #1 .d (122626 bytes) from modules/asyncly/Test/Unit/CMakeFiles/test_asyncly.dir/future/FutureTest.cpp.o.d
[2021-09-14T10:52:42.155260 2089 ] Stored 135di89r02vv5fgopbtsopfjllo01b8lg in primary storage (/cache/ccache/1/3/5di89r02vv5fgopbtsopfjllo01b8lgR)
[2021-09-14T10:52:42.175445 2089 ] Failed to put /cache/135di89r02vv5fgopbtsopfjllo01b8lg to http storage: Unknown (1)
[2021-09-14T10:52:42.175999 2089 ] Adding result key to /cache/ccache/f/f/87vlgke3poou7uq1ma2m3hh000gckmqM
[2021-09-14T10:52:42.179375 2089 ] Using default compression level 1
[2021-09-14T10:52:42.180306 2089 ] Stored ff87vlgke3poou7uq1ma2m3hh000gckmq in primary storage (/cache/ccache/f/f/87vlgke3poou7uq1ma2m3hh000gckmqM)
[2021-09-14T10:52:42.180341 2089 ] Not putting in http://jenkins3-bazelcache.ec2.getgotools.net:8080/cache since it failed earlier
```

I believe a 90s compilation is worth caching and more important than
skipping the TCP three-way handshake.

3 years agodocs: Remove stray heading in NEWS
Joel Rosdahl [Tue, 28 Sep 2021 19:47:22 +0000 (21:47 +0200)] 
docs: Remove stray heading in NEWS

3 years agochore: Update authors v4.4.2
Joel Rosdahl [Tue, 28 Sep 2021 19:36:30 +0000 (21:36 +0200)] 
chore: Update authors