Commit graph

514728 commits

Author SHA1 Message Date
FrancescoDeSimone
95f63c3207
Update pkgs/tools/backup/duplicati/default.nix
Co-authored-by: Ludovico <ludovicopiero@pm.me>
2023-08-14 22:11:33 +00:00
Adam Joseph
1912681314 tests.cross.sanity: enable mbuffer test
This test passes now.  Also fixes a minor oversight in the bug --
the test case needs to `touch $out` on success.
2023-08-14 15:09:06 -07:00
Adam Joseph
64046f0191 glibcCross: use a libgcc built separately from gcc
### Summary

This PR completely and finally solves the gcc<->glibc circular
`buildInputs` problem, for cross compilation.  The same technique
can be applied to native builds in the future.

Closes #213453

 ### Motivation

Prior to this PR, we had the following circular `buildInputs` problem:

1. gcc has glibc in its `buildInputs`

   - a compiled copy of glibc must be present before building gcc;
     if it isn't, gcc cripples itself (`inhibit_libc`) and refuses
     to build libgcc_s.so

2. glibc has libgcc_s.so in its `buildInputs`

   - glibc `dlopen()`s libgcc_s.so in order to implement POSIX
     thread cancellation.  For security reasons `glibc` requires
     that the path to `libgcc_s.so` is [hardwired] into `glibc` at
     compile time, so it's technically not a true dynamic link -- it
     just pretends to be one.

3. libgcc_s.so is built in the same derivation as gcc

   - libgcc_s.so is built as part of the gcc build process

We must cut one of these three links in the loop.

 ### Previous Attempts

Previously https://github.com/NixOS/nixpkgs/pull/238154 had
attempted to cut link (1) by building `gcc` without `glibc`, and
using the `libgcc_s` which emerges from that build.  Unfortunately
this just doesn't work.  GCC's configure script extracts quite a lot
of information from the glibc headers (which are a build artifact --
you can't just copy them out of the source tarball) and various
`./configure`-driven linking attempts.  If `glibc` isn't around at
build time you wind up with a `libgcc_s.so` that is missing various
unwinder features (see https://github.com/NixOS/nixpkgs/issues/213453
for the most problematic one).

Musl "cuts" link (2), or rather never creates it in the first place.
["Cancellation cleanup handling in musl has no relationship to C++
exceptions and unwinding... glibc implements cancellation as an
exception"](https://wiki.musl-libc.org/functional-differences-from-glibc.html#Thread-cancellation).
IMHO Musl made the smarter decision here.  It is incredibly rare to
find a codebase that uses both POSIX thread cancellation *and* C++
exceptions.  I have never seen a codebase that uses both *and*
expects them to be aware of each other, and I would be astonished if
one existed.  Glibc paid an immense cost in complexity for something
nobody has ever used.

 ### Changes Made

This PR cuts link (3): instead of building libgcc_s.so as part of
gcc, we build it separately from gcc.  Now there is a strict acyclic
graph of `buildInputs`:

```
 gccWithoutTargetLibc
 |
 +--->glibc-nolibgcc
 |    |
 |    v
 +--->libgcc
 |    |
 |    v
 +--->glibc
 |    |
 |    v
 +--->gcc
```

In other words, there's a simple linear `buildInputs` chain
`glibc-nolibgcc` `->` `libgcc` `->` `glibc` `->` `gcc` where all
four packages are compiled by (and therefore have as a
`(native)BuildInput`) `gccWithoutTargetLibc`.

`gccWithoutTargetLibc` and `glibc-nolibgcc` are strictly
bootstrapping artifacts; nothing else has them as a `buildInput` and
they shouldn't appear in the closure of any final deployment
packages.  `glibc-nolibgcc` lacks `libgcc_s.so`, so it will segfault
if you try to use it with POSIX thread cancellation.  Fortunately
all we need from it is (a) its headers (`lib.getDev`) and (b) to use
it in the `./configure` script for `libgcc`.

When translated over to the native bootstrap, `xgcc` takes the place
of `gccWithoutTargetLibc`, and the "first `glibc`" (we build two of
them) takes the place of `glibc-nolibgcc`.  At that point our native
and cross bootstrap have the same overall architecture, and it
becomes possible to merge them (at last!)

[213453]: https://github.com/NixOS/nixpkgs/issues/213453
[238154]: https://github.com/NixOS/nixpkgs/pull/238154
[hardwired]: 7553d0fe29/pkgs/development/libraries/glibc/default.nix (L69-L88)
2023-08-14 15:09:06 -07:00
Adam Joseph
18c52d09bc libgcc: make needed architecture-specific targets if isArmv7 2023-08-14 15:08:59 -07:00
Adam Joseph
c0e4121ba5 libgcc: make needed architecture-specific targets if isM68k 2023-08-14 15:08:29 -07:00
Adam Joseph
17ce8682d6 libgcc: let-rename stdenvNoLibs to stdenv 2023-08-14 15:08:29 -07:00
Adam Joseph
8c37dae9ad libgcc: gccConfigureFlags: minimize, fix
This commit minimizes libgcc's gccConfigureFlags, and -- importantly
-- includes the three flags needed in order to prevent
`inhibit_libc` from becoming active.
2023-08-14 15:08:29 -07:00
Adam Joseph
fa0ebe80f1 libgcc: configureFlags: minimize
A lot of these flags were unnecessary.
2023-08-14 15:08:29 -07:00
Adam Joseph
da371c7c5a libgcc: use forceLibgccToBuildCrtStuff
This duplicates (by reference) the two-line adjustment to libgcc's
Makefile needed in order to get crtstuff to build without a full
build of gcc.
2023-08-14 15:08:28 -07:00
Adam Joseph
92186a49bf gcc: factor out forceLibgccToBuildCrtStuff 2023-08-14 15:08:28 -07:00
Adam Joseph
383d62d94c libgcc: add glibc as a buildInput
This is necessary in order to prevent gcc from switching on
`inhibit_libc`, which cripples the `libgcc_s.so` unwinder.
2023-08-14 15:08:28 -07:00
Adam Joseph
b5893e7046 libgcc: let-float gccConfigureFlags out of the derivation attrs 2023-08-14 15:08:28 -07:00
Adam Joseph
2ecf2d954b libgcc: use finalAttrs instead of rec 2023-08-14 15:08:28 -07:00
Adam Joseph
72fa5978fd libgcc: minor formatting adjustments 2023-08-14 15:08:27 -07:00
Adam Joseph
fcaa5a7556 libgcc: take from gcc unless explicitly overridden 2023-08-14 15:08:27 -07:00
Adam Joseph
f445f64207 libgcc: (re)init at 12.3.0
This commit restores the pkgs/development/libraries/gcc/libgcc
package, which was deleted by commit 9818d120be.

We need to be able to build libgcc separately from gcc in order to
avoid a circular dependency.  Nixpkgs is unusual -- unlike any other
distribution, it cannot tolerate circular dependencies between
dynamically linked libraries.  Because of this, upstream is
extremely unsympathetic to the trouble that the glibc<->gcc circular
dependency causes for us; if we don't solve it ourselves it will not
be solved.
2023-08-14 15:08:27 -07:00
Ruud van Asseldonk
cc6ea4f1b2 cargo-fuzz: 0.11.0 -> 0.11.2 2023-08-14 23:48:13 +02:00
Fabian Affolter
4eceab09f4 python311Packages.pyoverkiz: 1.9.1 -> 1.10.1
Diff: https://github.com/iMicknl/python-overkiz-api/compare/refs/tags/v1.9.1...v1.10.1

Changelog: https://github.com/iMicknl/python-overkiz-api/releases/tag/v1.10.1
2023-08-14 23:44:49 +02:00
Maximilian Bosch
519c64b1be
nextcloudPackages*: pin maps to stable 1.1.0
No idea what this gibberish disguised as tag is, but nc4nix doesn't seem
to cope well with it. For now, let's pin `maps` to the stable 1.1 release (as
it's the case for nextcloud27 already) since 1.1 is supported for all of
v25 to v27[1], so this seems reasonable to do.

[1] https://github.com/nextcloud/maps/blob/v1.1.0/appinfo/info.xml#L36
2023-08-14 23:43:20 +02:00
Fabian Affolter
9bd3f4c030 python311Packages.backports-strenum: init at 1.2.4 2023-08-14 23:42:48 +02:00
Silvan Mosberger
150217c1ac lib.removePrefix: Optimise 2023-08-14 23:32:42 +02:00
Silvan Mosberger
8fab18d4c1 lib.removePrefix: Add tests 2023-08-14 23:29:00 +02:00
Maximilian Bosch
b91a4d8db4
Merge pull request #248336 from Ma27/bump-pycups
python3.pkgs.pycups: 1.9.73 -> 2.0.1
2023-08-14 23:12:51 +02:00
Robert Schütz
bc018252ff python310Packages.ocrmypdf: 14.3.0 -> 14.4.0
Diff: https://github.com/ocrmypdf/OCRmyPDF/compare/v14.3.0...v14.4.0

Changelog: https://github.com/ocrmypdf/OCRmyPDF/blob/v14.4.0/docs/release_notes.rst
2023-08-14 13:59:38 -07:00
Fabian Affolter
6d3e7145f7 python311Packages.caldav: 1.2.1 -> 1.3.6
Diff: https://github.com/python-caldav/caldav/compare/refs/tags/v1.2.1...v1.3.6

Changelog: https://github.com/python-caldav/caldav/releases/tag/v1.3.6
2023-08-14 22:54:06 +02:00
Fabian Affolter
64e8ab0cb5 python311Packages.twilio: 8.5.0 -> 8.6.0
Diff: https://github.com/twilio/twilio-python/compare/refs/tags/8.5.0...8.6.0

Changelog: https://github.com/twilio/twilio-python/blob/8.6.0/CHANGES.md
2023-08-14 22:47:15 +02:00
Fabian Affolter
89ca95f00b python311Packages.pyschlage: 2023.7.0 -> 2023.8.1
Diff: https://github.com/dknowles2/pyschlage/compare/refs/tags/2023.7.0...2023.8.1

Changelog: https://github.com/dknowles2/pyschlage/releases/tag/2023.8.1
2023-08-14 22:39:13 +02:00
Fabian Affolter
144482aebd python311Packages.pylitterbot: 2023.4.3 -> 2023.4.4
Diff: https://github.com/natekspencer/pylitterbot/compare/refs/tags/v2023.4.3...v2023.4.4

Changelog: https://github.com/natekspencer/pylitterbot/releases/tag/v2023.4.4
2023-08-14 22:38:09 +02:00
Fabian Affolter
e48398dfb9 python311Packages.mypy-boto3-ebs: 1.28.13 -> 1.28.16 2023-08-14 22:33:52 +02:00
Fabian Affolter
125aaaa251 python311Packages.bthome-ble: 3.0.0 -> 3.1.0
Diff: https://github.com/Bluetooth-Devices/bthome-ble/compare/refs/tags/v3.0.0...v3.1.0

Changelog: https://github.com/bluetooth-devices/bthome-ble/blob/v3.1.0/CHANGELOG.md
2023-08-14 22:33:07 +02:00
Fabian Affolter
ebb53eb422 python311Packages.boschshcpy: 0.2.57 -> 0.2.60
Diff: https://github.com/tschamm/boschshcpy/compare/0.2.57...0.2.60
2023-08-14 22:32:38 +02:00
Fabian Affolter
fd91dcf310
Merge pull request #249130 from fabaff/python-otbr-api-bump
python311Packages.python-otbr-api: 2.3.0 -> 2.4.0
2023-08-14 22:27:34 +02:00
Gaetan Lepage
6729fcf0b4 maintainers/team-list: add GaetanLepage to jupyter team 2023-08-14 22:23:34 +02:00
Dmitry Kalinkin
b315d0a03d python310Packages.ax: 0.3.2 -> 0.3.4 2023-08-14 16:20:49 -04:00
Artturi
f5b8842f61
Merge pull request #249168 from arcnmx/mainPrograms 2023-08-14 23:18:33 +03:00
Fabian Affolter
9e7f179d41 python311Packages.vulcan-api: fix issue with cchardet/faust-cchardet 2023-08-14 22:08:38 +02:00
Fabian Affolter
bc7c971b7e python311Packages.okta: 2.8.0 -> 2.9.2
Changelog: https://github.com/okta/okta-sdk-python/blob/v2.9.2/CHANGELOG.md
2023-08-14 22:04:28 +02:00
Robert Schütz
9a2a6044bf pynitrokey: unpin click version 2023-08-14 12:59:50 -07:00
Fabian Affolter
a306dbd89e python311Packages.awesomeversion: add changelog to meta 2023-08-14 21:55:12 +02:00
Pol Dellaiera
3af9ec4f57 gst123: sort attributes and remove with lib; 2023-08-14 19:54:26 +00:00
Pol Dellaiera
98f70a4dad gst123: add meta.mainProgram 2023-08-14 19:54:26 +00:00
Fabian Affolter
cfb6ce15d6
Merge pull request #249104 from fabaff/dbx-bump
dbx: 0.8.11 -> 0.8.18
2023-08-14 21:52:39 +02:00
Robert Schütz
8f24fc2037 python310Packages.spsdk: 1.10.1 -> 1.11.0
Diff: https://github.com/nxp-mcuxpresso/spsdk/compare/refs/tags/1.10.1...1.11.0

Changelog: https://github.com/nxp-mcuxpresso/spsdk/blob/1.11.0/docs/release_notes.rst
2023-08-14 12:21:23 -07:00
Silvan Mosberger
87c5a6a84f
Merge pull request #243511 from tweag/lib.lists.hasPrefix
`lib.lists.{hasPrefix,removePrefix}`: init
2023-08-14 21:15:54 +02:00
Silvan Mosberger
50d11650a7
Merge pull request #245243 from tweag/contributing-combining
Clean up contributing documentation
2023-08-14 21:06:06 +02:00
K900
b392b28a47
Merge pull request #249173 from K900/pob-2.31.0
path-of-building: 2.30.1 -> 2.31.0
2023-08-14 22:00:34 +03:00
Lassulus
43fd3a94bb
Merge pull request #245215 from idlip/pspp-bump
pspp: 1.4.1 -> 1.6.2
2023-08-14 20:34:03 +02:00
Silvan Mosberger
f10a24eddd
Merge pull request #242339 from hercules-ci/modules-catch-bare-type
lib/modules: Report a good error when option tree has bare type
2023-08-14 20:30:41 +02:00
toastal
737212ecc8 ocamlPackages.thread-table: 0.1.0 → 1.0.0 2023-08-14 20:29:44 +02:00
K900
2b50eb792a path-of-building: 2.30.1 -> 2.31.0 2023-08-14 21:29:31 +03:00