Upstream tracking#165
Draft
grahamc wants to merge 2802 commits into
Draft
Conversation
These fields are in fact optional, and various binary cache implementations do not return them (e.g. when NARs are compressed on the fly).
This is a built-in binary cache server, similar to nix-serve. It uses libmicrohttpd.
If we have a negative path info cache entry for the path being added (e.g. due to a prior call to maybeQueryPathInfo()), then we need to use isValidPathUncached(), otherwise addToStore() will fail.
An operation like $ nix path-info --store https://cache.nixos.org /nix/store/2lwxwsaixnaq561hbq02v5236935ass8-coreutils-full-9.8 -vv previously resulted in multiple downloads of the same .narinfo: downloading 'https://cache.nixos.org/2lwxwsaixnaq561hbq02v5236935ass8.narinfo'... querying info about '/nix/store/2lwxwsaixnaq561hbq02v5236935ass8-coreutils-full-9.8' on 'https://cache.nixos.org'... downloading 'https://cache.nixos.org/2lwxwsaixnaq561hbq02v5236935ass8.narinfo'... This is because queryMissing() calls isValidPath(), which causes a HEAD request to the binary cache. Subsequently we call queryValidPath(), which requires an additional GET request. It's better to do a HEAD request right away. (Of course, it's a bit questionable whether `nix path-info` should call queryMissing() in the first place...)
…998-5408-415d-888c-22b360e92308 Release v3.20.0
Add `nix serve` command
Restore resBuildResult fields for failed builds
If the string isn't terminated, parseString() returns a string of size std::string::npos, which then causes an out-of-bounds read later. Fixes: ==47978== Invalid read of size 1 ==47978== at 0x4BEF70A: nix::expect(nix::(anonymous namespace)::StringViewStream&, char) (../src/libstore/derivations.cc:232) ==47978== by 0x4BEE3CA: parseDerivationOutput (../src/libstore/derivations.cc:383) ==47978== by 0x4BEE3CA: nix::parseDerivation(nix::StoreDirConfig const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, std::basic_string_view<char, std::char_traits<char> >, nix::ExperimentalFeatureSettings const&) (???:492) ==47978== by 0x3F3803: nix::DerivationTest_UnterminatedString_Test::TestBody() (../src/libstore-tests/derivation/external-formats.cc:27) ==47978== by 0x52AD3DD: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (in /nix/store/qyg0071v3bf8vgcnccd6zi0gvc5abs3f-gtest-1.17.0/lib/libgtest.so.1.17.0) ==47978== by 0x5298E3D: testing::Test::Run() (in /nix/store/qyg0071v3bf8vgcnccd6zi0gvc5abs3f-gtest-1.17.0/lib/libgtest.so.1.17.0) ==47978== by 0x5298FCC: testing::TestInfo::Run() (in /nix/store/qyg0071v3bf8vgcnccd6zi0gvc5abs3f-gtest-1.17.0/lib/libgtest.so.1.17.0) ==47978== by 0x529920E: testing::TestSuite::Run() (in /nix/store/qyg0071v3bf8vgcnccd6zi0gvc5abs3f-gtest-1.17.0/lib/libgtest.so.1.17.0) ==47978== by 0x52A3996: testing::internal::UnitTestImpl::RunAllTests() (in /nix/store/qyg0071v3bf8vgcnccd6zi0gvc5abs3f-gtest-1.17.0/lib/libgtest.so.1.17.0) ==47978== by 0x52A3F74: testing::UnitTest::Run() (in /nix/store/qyg0071v3bf8vgcnccd6zi0gvc5abs3f-gtest-1.17.0/lib/libgtest.so.1.17.0) ==47978== by 0x49DD52: RUN_ALL_TESTS (gtest.h:2334) ==47978== by 0x49DD52: main (???:16)
parseString(): Fix out-of-bounds read
…exceptions filetransfer: handle exceptions thrown from enqueueItem
`pull_request_target` is a dangerous action trigger and should be avoided. This workflow comes from upstream, and is not necessary in this repository.
Delete .github/workflows/labels.yml: uses pull_request_target
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Not intended to be merged directly. This PR is a convenience to show the diff between upstream Nix and Determinate Nix (the
mainbranch).Continuation of #4.