Commit graph

25925 commits

Author SHA1 Message Date
Maximilian Bosch da905d4cf9
nixos/stage-1: fix modprobe in initial ramdisk on systems w/glibc-2.34
This effectively fixes the majority of all VM tests which were broken
because `/dev/vda` (or any other block device) wasn't mountable:

      machine # mounting /dev/vda on /...
      machine # mount: mounting /dev/vda on /mnt-root/ failed: No such device[    2.820976] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
      machine # [    2.821757] CPU: 0 PID: 1 Comm: init Not tainted 5.10.72 #1-NixOS
      machine # [    2.821757] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
      machine # [    2.821757] Call Trace:
      machine # [    2.821757]  dump_stack+0x6b/0x83
      machine # [    2.821757]  panic+0x101/0x2c8
      machine # [    2.821757]  do_exit.cold+0x14/0xb3
      machine # [    2.821757]  do_group_exit+0x33/0xa0
      machine # [    2.821757]  __x64_sys_exit_group+0x14/0x20
      machine # [    2.821757]  do_syscall_64+0x33/0x40
      machine # [    2.821757]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
      machine # [    2.821757] RIP: 0033:0x7f67ec2800f6
      machine # [    2.821757] Code: 00 4c 8b 0d 2c 5d 11 00 eb 19 66 2e 0f 1f 84 00 00 00 00 00 89 d7 89 f0 0f 05 48 3d 00 f0 ff ff 77 22 f4 89 d7 44 89 c0 0f 05 <48> 3d 00 f0 ff ff 76 e2 f7 d8 64 41 89 01 eb da 66 2e 0f 1f 84 00
      machine # [    2.821757] RSP: 002b:00007fff8f5a71d8 EFLAGS: 00000202 ORIG_RAX: 00000000000000e7
      machine # [    2.821757] RAX: ffffffffffffffda RBX: 0000000000699704 RCX: 00007f67ec2800f6
      machine # [    2.821757] RDX: 0000000000000001 RSI: 000000000000003c RDI: 0000000000000001
      machine # [    2.821757] RBP: 0000000000000004 R08: 00000000000000e7 R09: ffffffffffffff80
      machine # [    2.821757] R10: 00007f67ec33f3e0 R11: 0000000000000202 R12: 000000000000000b
      machine # [    2.821757] R13: 00007fff8f5a75a8 R14: 0000000000000000 R15: 00000000004fc198
      machine # [    2.821757] Kernel Offset: 0x31e00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
      machine # [    2.821757] Rebooting in 1 seconds..

This happened because the kernel failed to load modules such as `ext4`
from `boot.initrd.availableKernelModules`[1] on e.g. a `mount(2)` syscall.

The problem is that `kmod` isn't linked against `libpthread.so.0`
anymore because it got merged into `libc.so.6` (however, the .so still
exists), but still needs it:

      machine # newfstatat(AT_FDCWD, "/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-2.34-36/lib/x86_64", 0x7ffd951114c0, 0) = -1 ENOENT (No such file or directory)
      machine # openat(AT_FDCWD, "/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-2.34-36/lib/x86_64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
      machine # newfstatat(AT_FDCWD, "/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-2.34-36/lib/x86_64", 0x7ffd951114c0, 0) = -1 ENOENT (No such file or directory)
      machine # openat(AT_FDCWD, "/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-2.34-36/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
      machine # newfstatat(AT_FDCWD, "/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-2.34-36/lib", 0x7ffd951114c0, 0) = -1 ENOENT (No such file or directory)
      machine # openat(AT_FDCWD, "/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-2.34-36/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
      machine # writev(2, [{iov_base="/nix/store/kdc9n48ksdc1a8y8w512w"..., iov_len=69}, {iov_base=": ", iov_len=2}, {iov_base="error while loading shared libra"..., iov_len=36}, {iov_base=": ", iov_len=2}, {iov_base="libpthread.so.0", iov_len=15}, {iov_base=": ", iov_len=2}, {iov_base="cy
      machine # ) = 184
      machine # exit_group(127)                         = ?
      machine # +++ exited with 127 +++
      machine # mount: mounting /dev/vda on /mnt-root/ failed: No such device
      machine # [   19.167180] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
      machine # [   19.167711] CPU: 0 PID: 1 Comm: init Not tainted 5.10.72 #1-NixOS

This is not a problem

* inside stage-1 because `LD_LIBRARY_PATH` points to `$out/lib` of
  extra-utils where `libpthread.so.6` also exists.
* on a running system because `${pkgs.glibc}/lib` is part of kmod's
  rpath.

However this is a problem inside the kernel which calls `modprobe` (in
our case `kmod`) to load modules and doesn't know about
`LD_LIBRARY_PATH`. Also, the rpath-reference was nuked.

To work around this, the kernel's `modprobe`
(i.e. `/proc/sys/kernel/modprobe`) now points to a wrapper which
explicitly declares `LD_LIBRARY_PATH`. We can't use `makeWrapper` here
because `modprobe` itself must not be renamed. Otherwise, `kmod` (which
is the link-target of `modprobe`) won't work because it expects
`argv[0] == "modprobe"` to perform modprobe's tasks.

[1] https://nixos.org/manual/nixos/stable/options.html#opt-boot.initrd.availableKernelModules
2022-02-27 10:26:51 +01:00
Jan Tojnar 1316edc465 Merge branch 'staging-next' into staging 2022-02-27 09:24:31 +01:00
Dominique Martinet 0dadec45d8 logrotate/systemd: add 'minsize = 1M' to wtmp/btmp rotation
align with upstream logrotate which added the minsize rule at some point.
This avoids needlessly rotating the files too often as brought up in
https://github.com/NixOS/nixpkgs/pull/159187#issuecomment-1052426774
2022-02-27 07:20:26 +09:00
Martin Weinelt 308403c329
Merge pull request #161663 from felixsinger/update/pkgs/mumble 2022-02-26 22:38:26 +01:00
Felix Singer c267e9ce37 mumble,murmur: 1.3.4 -> 1.4.231
Update version to 1.4.231.

Build 231 points to a specific commit from the 1.4.x branch adding many
fixes and improvements. Since this version is an unofficial release, add
an unstable prefix to the version string in Nixpkgs.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
Signed-off-by: Franz Pletz <fpletz@fnordicwalking.de>
2022-02-26 22:08:22 +01:00
Maciej Krüger 03fbc3ea99
release-notes: mention pgadmin 2022-02-26 14:30:20 +01:00
Maciej Krüger 42a5831e62
nixos/pgadmin: init 2022-02-26 14:30:14 +01:00
Maciej Krüger ae2f179c9b
tests/pgadmin4-standalone: add 2022-02-26 14:27:30 +01:00
florian on nixos (Florian Brandes) 0dda2d3888
pgadmin4: init at 6.3
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2022-02-26 13:17:37 +01:00
K900 066a581a80 nixos/doc: add release note for makeDesktopItem changes 2022-02-25 13:40:38 -08:00
K900 cb2cfba6f7 treewide: switch all desktop file generators to new API
Notably:
- remove explicit arguments that match the defaults
- convert everything to the right Nix types
2022-02-25 13:40:38 -08:00
Luflosi 0eb1d070c8 ipfs-migrator: 1.7.1 -> 2.0.2
https://github.com/ipfs/fs-repo-migrations/releases/tag/v2.0.2

This is pretty much a complete rewrite of the ipfs-migrator package.
In version 2.0.0 a major change was made to the way the migrator works. Before, there was one binary that contained every migration. Now every migration has its own binary. If fs-repo-migrations can't find a required binary in the PATH, it will download it off the internet. To prevent that, build every migration individually, symlink them all into one package and then wrap fs-repo-migrations so it finds the package with all the migrations.
The change to the IPFS NixOS module and the IPFS package is needed because without explicitly specifying a repo version to migrate to, fs-repo-migrations will query the internet to find the latest version. This fails in the sandbox, for example when testing the ipfs passthru tests.
While it may seem like the repoVersion and IPFS version are in sync and the code could be simplified, this is not the case. See https://github.com/ipfs/fs-repo-migrations#when-should-i-migrate for a table with the IPFS versions and corresponding repo versions.
Go 1.17 breaks the migrations, so use Go 1.16 instead. This is also the Go version used in their CI, see 3dc218e300/.github/workflows/test.yml (L4). See https://github.com/ipfs/fs-repo-migrations/pull/140#issuecomment-982715907 for a previous mention of this issue. The issue manifests itself when doing anything with a migration, for example `fs-repo-11-to-12 --help`:
```
panic: qtls.ClientHelloInfo doesn't match

goroutine 1 [running]:
github.com/marten-seemann/qtls-go1-15.init.0()
	github.com/marten-seemann/qtls-go1-15@v0.1.1/unsafe.go:20 +0x132
```
Also add myself as a maintainer for this package.
This fixes the test failure discovered in https://github.com/NixOS/nixpkgs/pull/160914.
See https://github.com/ipfs/fs-repo-migrations/issues/148 to read some of my struggles with updating this package.
2022-02-25 11:12:19 -08:00
Vladimír Čunát bb75870cef
Merge #161734: nixos/tests/networking: Fix link test 2022-02-25 18:42:21 +01:00
0x4A6F 7ad39a4125
Merge pull request #161193 from Mic92/bird1
bird: drop bird1 package & modules; hardening
2022-02-25 17:03:09 +01:00
Jörg Thalheim a9252603d5
Merge pull request #160195 from illustris/proxmox-lxc
nixos/proxmox-lxc: init
2022-02-25 14:49:48 +00:00
Stig c1f6adfaa8
Merge pull request #154109 from Izorkin/update-peertube
peertube: 3.4.1 -> 4.1.0
2022-02-25 14:38:15 +01:00
Sandro 035c360136
Merge pull request #148257 from zseri/opt-disable-avahi-geoclue 2022-02-25 13:00:05 +01:00
Martin Weinelt f45ba367d9
Merge pull request #161735 from fooker/pr/snapserver-config-fix 2022-02-25 11:41:30 +01:00
Jörg Thalheim ad16194460
nixos/bird: improve systemd hardening / capability set
aligned with https://github.com/archlinux/svntogit-packages/blob/packages/bird/trunk/bird.service#L20-L21
2022-02-25 11:39:34 +01:00
Jörg Thalheim 9abf72f229
bird1: drop package + modules
reason: no longer maintained upstream.
2022-02-25 11:39:34 +01:00
zowoq ec2028eb3c nixos/kubernetes: use kubectl from kubernetes
- also clarify kubectl wrapper naming
2022-02-25 19:22:30 +10:00
zowoq 4ee1f9eafc podman: 3.4.4 -> 4.0.1
https://github.com/containers/podman/releases/tag/v4.0.0
https://github.com/containers/podman/releases/tag/v4.0.1

- wrap helper binaries via CONTAINERS_HELPER_BINARY_DIR
2022-02-25 19:09:29 +10:00
Ben Siraphob 8725b29aa0
Merge pull request #161707 from Synthetica9/nano-test-rewrite 2022-02-24 21:41:33 -06:00
Dustin Frisch ec10d9a836
nixos/snapserver: fix argument handling.
The argument parser used by snapserver behaves differntly for optional
arguments with existing defaults. In such cases, the standalone argument
name is a valid input and a following value is interpreted as a
positional argument. Therefore the argument and the value must be
provided as a single argument seperated by equals sign.
2022-02-24 23:11:58 +01:00
Martin Weinelt 60225c6bbd
nixos/tests/networking: Fix link test
The test was looking at the wrong interface and relying on silly
behaviour by the dummy driver, which autocreated a `dummy0` interface on
modprobe.

Fix this by making it look at the actual `foo` interface that the test
creates.
2022-02-24 23:11:13 +01:00
Patrick Hilhorst 7ef8df8767
nixosTests.nano: replace with script using GNU expect 2022-02-24 21:26:25 +01:00
Samuel Dionne-Riel 0adf99aee4
Merge pull request #156005 from zhaofengli/pi02
Update Raspberry Pi packages
2022-02-24 15:05:23 -05:00
Izorkin e0616741d1
nixos/peertube: add python path 2022-02-24 22:34:01 +03:00
Izorkin c2296c3ec2
nixos/peertube: fix youtube-dl import 2022-02-24 22:34:01 +03:00
Markus Kowalewski 5aebf5097b nixos/manual: add 22.05 section to list 2022-02-24 09:44:57 -08:00
Markus Kowalewski bf021cf990 nixos/release-notes: fix typos in 22.05 section. 2022-02-24 09:44:57 -08:00
Markus Kowalewski 5721945070 nixos/tetrd: add to module list and fix enable description
The module was dangling and and not listed.
2022-02-24 09:44:57 -08:00
Florian Klink 6ebc6ca13f
Merge pull request #161426 from flokli/rl-2111-nftables
nixos/doc: improve release notes for iptables-nft and systemd with nftables backend
2022-02-24 17:22:17 +01:00
Dustin Frisch 5f9b2148b7
nixos/k40-whisperer: module init 2022-02-24 16:03:09 +01:00
github-actions[bot] 7a0c5ae7a1
Merge staging-next into staging 2022-02-24 12:02:29 +00:00
lewo 49fa262cda
Merge pull request #161388 from nlewo/fix-openstack-metadata-fetcher
openstack-metadata-fetcher: do not fail if no user-data is provided
2022-02-24 10:16:44 +01:00
Thiago Kenji Okada e22d349e67
Merge pull request #159546 from K900/the-plumbening
[RFC] [RFT] nixos/pipewire: default to wireplumber
2022-02-24 08:49:45 +00:00
github-actions[bot] fa7e685342
Merge staging-next into staging 2022-02-24 00:02:43 +00:00
ajs124 9748295636
Merge pull request #160237 from helsinki-systems/drop/virtuoso
virtuoso: drop
2022-02-23 23:48:52 +01:00
zseri 72957a2dc0 element-desktop: make keytar optional 2022-02-23 23:41:15 +01:00
ajs124 21eccc5e09
Merge pull request #161569 from helsinki-systems/upd/openssh
[staging] openssh: 8.8p1 -> 8.9p1
2022-02-23 22:49:23 +01:00
Pascal Wittmann 65f66dd4d2
Merge pull request #161056 from dywedir/nixos/vaultwarden
nixos/vaultwarden: fix evaluation
2022-02-23 22:27:58 +01:00
Janne Heß 0269c10d74
openssh: 8.8p1 -> 8.9p1 2022-02-23 20:36:18 +01:00
Shahar Dawn Or f48ff2a079 add /usr neededForBoot entry to 21.11 release notes 2022-02-23 11:49:24 -05:00
Pascal Bach 66ddd69bdc
Merge pull request #158375 from afreakk/plex-example
plex: extraPlugins example
2022-02-23 17:39:15 +01:00
Robert Hensing 62258041a4
Merge pull request #160489 from Infinisil/types.raw
Introduce `types.raw`
2022-02-23 14:08:04 +01:00
Patrick Hilhorst a8de36a1d0
Merge pull request #158034 from OmnipotentEntity/wordlist 2022-02-23 12:43:26 +01:00
Martin Weinelt d778e18366
Merge pull request #160042 from stigtsp/test/nginx-modsecurity 2022-02-23 12:02:20 +01:00
Janne Heß e5823f77b3
Merge pull request #159187 from martinetd/logrotate
logrotate service enhancements
2022-02-23 11:24:17 +01:00
Stig Palmquist 21f5ce0bd9 nixos/tests/nginx-modsecurity: init 2022-02-23 08:54:52 +01:00