Commit Graph

13503 Commits

Author SHA1 Message Date
Yorick van Pelt
58210e5306 Don't allow writing to /etc
(cherry picked from commit db41f74af3)
2023-02-14 15:50:29 +00:00
Robert Hensing
4ca48e3c7f NarInfoDiskCache: Also test id consistency with updated fields
And clarify test

(cherry picked from commit 19b495a48a)
2023-02-14 14:54:51 +01:00
Robert Hensing
2e31c54ce5 NarInfoDiskCache: Keep BinaryCache.id stable and improve test
Fixes #3898

The entire `BinaryCaches` row used to get replaced after it became
stale according to the `timestamp` column. In a concurrent scenario,
this leads to foreign key conflicts as different instances of the
in-process `state.caches` cache now differ, with the consequence that
the older process still tries to use the `id` number of the old record.

Furthermore, this phenomenon appears to have caused the cache for
actual narinfos to be erased about every week, while the default
ttl for narinfos was supposed to be 30 days.

(cherry picked from commit fb94d5cabd)
2023-02-14 14:54:51 +01:00
Robert Hensing
e404ae5bb6 NarInfoDiskCache: Prepare reproducer for #3898
(cherry picked from commit 2ceece3ef3)
2023-02-14 14:54:51 +01:00
Robert Hensing
80498bd923 NarInfoDiskCacheImpl: Make dbPath a parameter
This allows testing with a clean database.

(cherry picked from commit 79f62d2dda)
2023-02-13 12:02:46 +00:00
Robert Hensing
7a67baf951 NarInfoDiskCache: Rename cacheExists -> upToDateCacheExists
This is slightly more accurate considering that an outdated record
may exist in the persistent cache. Possibly-outdated records are
quite relevant as they may be foreign keys to more recent information
that we want to keep, but we will not return them here.

(cherry picked from commit 29f0b196f4)
2023-02-13 12:02:46 +00:00
Robert Hensing
9f788403cf sqlite.cc: Add SQL tracing
Set environment variable NIX_DEBUG_SQLITE_TRACES=1 to log all sql statements.

(cherry picked from commit 8a0ef5d58e)
2023-02-13 12:02:46 +00:00
Robert Hensing
b6ce4e100a local.mk: Don't log docroot comments
These were accidentally logged and do not need to appear in make's
log output.

(cherry picked from commit 1a86d3e98e)
2023-02-13 12:02:46 +00:00
Robert Hensing
9157f94e77
Merge pull request #7746 from NixOS/backport-7705-to-2.13-maintenance
[Backport 2.13-maintenance] perl: run `initLibStore()` on `openStore()`
2023-02-04 13:39:00 +01:00
Maximilian Bosch
77d8066e83 perl: run initLibStore() on openStore()
Since #7478 it's mandatory that `initLibStore()` is called for store
operations. However that's not the case when running `openStore()` in
Perl using the perl-bindings. That breaks e.g. `hydra-eval-jobset` when
built against Nix 2.13 which uses small portions of the store API.

(cherry picked from commit 51013da921)
2023-02-03 22:33:58 +00:00
Eelco Dolstra
286d212d10 Bump version 2023-01-26 12:42:03 +01:00
Eelco Dolstra
435a16b555
Merge pull request #7694 from NixOS/backport-7685-to-2.13-maintenance
[Backport 2.13-maintenance] Fix the 2.13 changelog
2023-01-25 21:28:02 +01:00
John Ericson
13c00e2969 Update doc/manual/src/release-notes/rl-2.13.md
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
(cherry picked from commit f465e378c4)
2023-01-25 20:08:59 +00:00
John Ericson
e60a492173 Fix the 2.13 changelog
It is just the new CLI that gets the `^` syntax. The old CLI already has
a (slightly different) `!` syntax.

Fixes #7682

(cherry picked from commit 816031173c)
2023-01-25 20:08:59 +00:00
Robert Hensing
da3faaf8a6
Merge pull request #7687 from hercules-ci/2.13-maintenance-revert-addition-of-property-tests
[2.13-maintenance] revert addition of property tests
2023-01-25 18:54:17 +01:00
Robert Hensing
cdad101bc9 Restore some non-rapidcheck tests 2023-01-25 18:11:36 +01:00
Robert Hensing
3424e1e055 Revert "Try to fix #7669"
We've decided against backporting rapidcheck

This reverts commit e60ee9e90a.
2023-01-25 18:09:10 +01:00
Robert Hensing
9566203d0d Partially revert "Test store paths, with property tests"
This reverts the addition of property tests from commit d111d2ed49.
2023-01-25 11:33:29 +01:00
Robert Hensing
65e690a087 Revert "Add rapidcheck dependency for testing"
This reverts commit c92e51ecec.
2023-01-25 11:27:52 +01:00
Robert Hensing
2e66fe9b1e
Merge pull request #7680 from NixOS/backport-7679-to-2.13-maintenance
[Backport 2.13-maintenance] Revert "fixup: remove boehmgc patch"
2023-01-24 17:17:24 +01:00
Robert Hensing
7ddbc12bc8 Update boehmgc-coroutine-sp-fallback.diff
(cherry picked from commit 46054f932b)
2023-01-24 15:27:09 +00:00
Robert Hensing
8f170f98f4 Actually complete the revert
(cherry picked from commit 8270dccf60)
2023-01-24 15:27:09 +00:00
Robert Hensing
46daba3852 Revert "fixup: remove boehmgc patch"
It is still necessary.
Please do your research, or f ask the author, which happens to be me.

An evaluator like this is not an environment where "it compiles, so
it works" will ever hold.

This reverts commit 1c40182b12.

(cherry picked from commit 0664ba0a67)
2023-01-24 15:27:09 +00:00
Robert Hensing
75d33d3e89
Merge pull request #7678 from NixOS/backport-7670-to-2.13-maintenance
[Backport 2.13-maintenance] Try to fix #7669
2023-01-24 13:51:31 +01:00
John Ericson
e60ee9e90a Try to fix #7669
The issue *seems* to be the cross jobs, which are missing the `CXXFLAGS`
needed to get rapidcheck.

PR #6538 would be really nice to resurrect which will prevent the
`configureFlags` from going out of sync between the regular build and
the cross build again.

(cherry picked from commit a91709a604)
2023-01-24 11:44:19 +00:00
Robert Hensing
2c552c66af
Merge pull request #7666 from NixOS/backport-7657-to-2.13-maintenance
[Backport 2.13-maintenance] Fix #7655
2023-01-23 16:22:59 +01:00
Robert Hensing
aff2c1c642
Merge pull request #7664 from NixOS/backport-7639-to-2.13-maintenance
[Backport 2.13-maintenance] Test store paths, with property tests, fix bug
2023-01-23 15:58:43 +01:00
John Ericson
af27f2fe00 Fix #7655
We had some local variables left over from the older (more
complicated) implementation of this function. They should all be unused,
but one wasn't by mistake.

Delete them all, and replace the one that was still in use as intended.

(cherry picked from commit 0afdf4084c)
2023-01-23 14:43:23 +00:00
John Ericson
3f58d5a76b Expand tests to reproduce #7655
The original `builtins.getContext` test from
1d757292d0 would have caught this. The
problem is that b30be6b450 adding
`builtins.appendContext` modified that test to make it test too much at
once, rather than adding a separate test.

We now have isolated tests for both functions, and also a property test
showing everything put together (in the form of an eta rule for strings
with context). This is better coverage and properly reproduces the bug.

(cherry picked from commit 88d8f6ac48)
2023-01-23 14:43:23 +00:00
John Ericson
d111d2ed49 Test store paths, with property tests
The property test in fact found a bug: we were excluding numbers!

(cherry picked from commit 018e2571aa)
2023-01-23 14:21:44 +00:00
John Ericson
01b30df520 Better-scope Store forward declarations
(cherry picked from commit 685395332d)
2023-01-23 14:21:44 +00:00
John Ericson
c92e51ecec Add rapidcheck dependency for testing
Property tests are great!

Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
(cherry picked from commit 7fe308c2f8)
2023-01-23 14:21:44 +00:00
Eelco Dolstra
291e36b1c0
Merge pull request #7637 from NixOS/backport-7636-to-2.13-maintenance
[Backport 2.13-maintenance] Relase notes: add empty flake registry
2023-01-18 19:37:11 +01:00
Eelco Dolstra
c834fa66b3 Bump version 2023-01-18 19:33:30 +01:00
Lorenzo Manacorda
8cdb15408f Relase notes: add empty flake registry
Introduced in #5420

(cherry picked from commit 913782af4d)
2023-01-18 17:04:47 +00:00
Eelco Dolstra
7304806241
Merge pull request #7635 from NixOS/backport-7631-to-2.13-maintenance
[Backport 2.13-maintenance] OutputSpec: Allow all valid output names
2023-01-18 17:19:37 +01:00
Eelco Dolstra
be0f37ad7b Add test for OutputsSpec::Names
From @Ericson2314.

(cherry picked from commit 75c89c3e5e)
2023-01-18 16:09:36 +00:00
Eelco Dolstra
3de7107312 Fix indentation
(cherry picked from commit 8a3b30822b)
2023-01-18 16:09:36 +00:00
Eelco Dolstra
a7e6bb7fd4 Add some tests for illegal output names
(cherry picked from commit 1ebfa6ba2d)
2023-01-18 16:09:36 +00:00
Eelco Dolstra
9ccde7ec9f OutputSpec: Allow all valid output names
Fixes #7624.

(cherry picked from commit 95cfd50d25)
2023-01-18 16:09:36 +00:00
Eelco Dolstra
7cd4a8f73c
Merge pull request #7632 from NixOS/backport-7627-to-2.13-maintenance
[Backport 2.13-maintenance] Restore support for channel: URLs in fetchTarball
2023-01-18 14:28:06 +01:00
Eelco Dolstra
fda0d52e3c Restore support for channel: URLs in fetchTarball
Fixes #7625.

(cherry picked from commit 01f268322a)
2023-01-18 13:26:57 +00:00
Eelco Dolstra
f60d45d661
Merge pull request #7622 from NixOS/backport-7621-to-2.13-maintenance
[Backport 2.13-maintenance] Revert #6204 to fix regression, add nixpkgs/lib/tests as regression test
2023-01-18 11:49:56 +01:00
Robert Hensing
cfee550bec flake.nix: Add nixpkgs/lib/tests as regression test
(cherry picked from commit 620e4fb89b)
2023-01-18 01:27:12 +00:00
Robert Hensing
b050a226b2 Revert "Merge pull request #6204 from layus/coerce-string"
This reverts commit a75b7ba30f, reversing
changes made to 9af16c5f74.

(cherry picked from commit 9b33ef3879)
2023-01-18 01:27:12 +00:00
Eelco Dolstra
973144c986 Bump version 2023-01-17 22:06:55 +01:00
Eelco Dolstra
54ef7e7664 Typo
(cherry picked from commit 3ff9fc0d7d)
2023-01-17 17:44:38 +01:00
John Ericson
b5e1da41f6 Try again to fix aarch64-linux build failure
f419ab48e6 was on the right track, but
there are a few more missing `raw()` calls to fix.

(cherry picked from commit 3965b0f75f)
2023-01-17 16:29:27 +01:00
Eelco Dolstra
193462930c Mark official release 2023-01-17 13:49:52 +01:00
Eelco Dolstra
deb35c84b3
Merge pull request #7612 from edolstra/release-notes
Release notes for 2.13
2023-01-17 13:47:56 +01:00