Commit graph

471 commits

Author SHA1 Message Date
Dominique Martinet
844a08cc06 systemd: 251.5 -> 251.7
systemd 251.6 added support for libbpf 1.0.0, so use new libbpf version.
2022-11-05 11:09:47 +09:00
rnhmjoj
926ad2fffc systemd: mark that libbpf requires clang ≥ 10 2022-10-16 20:01:37 +02:00
Yureka
53d33caa8c systemd: disable portabled on musl 2022-10-14 19:34:07 +02:00
Florian Klink
3ff0a8f840
Merge pull request #189676 from zhaofengli/cryptenroll
systemd: Fix systemd-{cryptenroll,cryptsetup} TPM2 and FIDO2 support (attempt #3)
2022-10-12 00:56:04 +02:00
Franz Pletz
f6011b26e4
systemd: fix build with libxcrypt 2022-10-09 18:09:40 +02:00
Zhaofeng Li
570824e102 systemd: Wrap in LUKS2 tokens
Update pkgs/os-specific/linux/systemd/default.nix

Co-authored-by: Janne Heß <janne@hess.ooo>
Co-authored-by: Ilan Joselevich <personal@ilanjoselevich.com>
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2022-10-05 08:22:14 -06:00
Florian Klink
72911a27bb
Merge pull request #193502 from phaer/systemd-portabled
Support systemd-portabled
2022-10-04 21:39:39 +02:00
oxalica
5a8e48c968 systemd: don't taint on unmerged /usr
Discussion: https://github.com/systemd/systemd/issues/24191#issuecomment-1209350080
2022-10-05 00:15:00 +08:00
Florian Klink
0247a5b6da systemd: 251.4 -> 251.5
Changes:

```
654ae8c1e4 base-filesystem.c: add trailing zero byte for s390x entry
e4a19eef33 basic/missing_loop.h: fix missing lo_flags LO_FLAGS_DIRECT_IO
24238be484 mount-util: fix error code
1b1ad8c79f udev: certainly restart event for previously locked device
7dacfb3fb4 stub: Use EfiLoaderCode for kernel memory
eaeaf4f6ef network: do not silently stop to process configuration on activation failure
bb803856bc bus: use inline trace argument for ANONYMOUS auth
6349062326 Fix ObjectManager interface emitted for non-manager objects
c90ab07fa0 test-bus-objects: Test interfaces added/removed signal interfaces
e32fe1b457 Fix GetManagedObjects returning ObjectManager interface for non-manager objects
efd8e39f4a test-bus-objects: Test GetManagedObjects interfaces are correct
344efd022a coredump: when parsing json, optionally copy the string first
de08edca17 systemctl: color ignored exit status in yellow, not red
1531a496e3 manager: make clear internal Dump() logic is debugging only.
c4fd38f7d2 man: document the Dump() calls of the PID 1 D-Bus interface, and what they are
140fee4627 resolve: do not cache mDNS goodbye packet
1a2d93a770 kbd-model-map: correct variants for cz-qwerty to include comma
9d1ebb2247 resolve: persist DNSOverTLS configuration in state file
3137ac6ef5 udev: support by-path devlink for multipath nvme block devices
c948091cc5 run: make --working-directory= work for --scope too
7bb204620d kbd-model-map: add a mapping for switched czech qwerty/us
e5157050d1 test: add more test cases for mkdir_p_safe() and mkdir_p_root()
b3a9f7b5cb mkdir: chase_symlinks_and_stat() does not return 0
0bfdc91807 units: make sure that initrd-switch-root.service pulls in .target
45fb64c54b units: add dependency ordering for emergency.service conflicts
6535813084 units: add ordering dependencies on initrd-switch-root.target
09c90224f1 units/systemd-network-generator.service: add forgotten ordering for shutdown
1dd723a3b8 units: reorder/split unit dependency blocks
054cad0097 man: explicitly document that "reboot -f" is different from "systemctl reboot -f"
c5b0ae86b1 watchdog: use /dev/watchdog0 only if it exists
ac805eac15 journalctl: respect --quiet flag during file concistency verification
c1d729795d xdg-autostart-service: expand tilde in Exec lines
35c5f5d688 unit: drop ProtectClock=yes from systemd-udevd.service
175ba30cf6 busctl: Fix warning about invaild introspection data
6c7b91372d udev/rules,hwdb: filter out mostly meaningless default strings
8b89e677e9 units: prolong the stop timeout for homed
202a79e7c5 homed: don't wait indefinitely for workers on exit
44660d2e12 man: fix static bridge example
e0dde8a14f log: don't attempt to duplicate closed fd
254b77e73c condition: fix device-tree firmware path
96da39ddb1 udev-util: minor cleanups for on_ac_power()
3345520512 docs: fix incorrect env var name for credentials directory
49f9fa87b2 shell-completion: drop unused $mode
1e29d934de oomd: fix off-by-one when dumping kill candidates
b00cb050c8 on-ac-power: ignore devices with scope==Device
9886011356 on-ac-power: rework logic
1fc74d251e sd-device: add helper to read a unsigned int attribute
6d4c138534 shared/udev-util: say "ignoring device", not "ignoring"
cd2fad2300 virt: Support detection of Apple Virtualization.framework guests
6e47e75c86 virt: align tables
951e99231e check-os-release.py compatible with Python < 3.8
d572a74163 core/mount: adjust deserialized state based on /proc/self/mountinfo
2e372afc35 Allow uneven length BootXXXX variables
8ad143e684 gpt: fix native uuids for s390x
2bb9a0a29b udev: fix inversed inequality for timeout of retrying event
cf67d5ed1b bash-completion: add systemd-sysext support
ada437cfb1 sysext: add missing COMMAND to the help output and man synopsis
58bc1e8e04 hostname: make chassis type actually obtained from ACPI when nothing from DMI
4ffde70981 booctl: do not say uuids differ if one of the uuids is unset
5219a99ccb bash-completion: autocomplete cgroup names in systemd-cgtop
9f2f391153 sysusers: add fsync for passwd (#24324)
c966377c51 dhcp6: do not append ORO option when no option requested
97474b03e7 dhcp6: gracefully handle NoBinding error
c67a388aef udev/cdrom_id: check last track info
52c631b02e firstboot: fix can't overwrite timezone
f279a6f4d1 cryptenroll: fix memory leak
66b060225d sd-device-enumerator: drop noisy log messages
6e1acfe818 sd-device-monitor: actually refuse to send invalid devices
81339c45e8 sd-device-monitor: fix inversed condition
1760559918 resolvctl: only remove protocol after last dot when mangling ifname for resolvconf
a3348ba748 oom: drop invalid %m in the log message
b3dd66f32b meson: Test correct efi linker for supported args
f9d936b865 sysusers: properly process user entries with an explicit GID
ec5a46ca34 sysusers: only check whether the requested GID is available
037b1a8acc dhcp: fix potential buffer overflow
ed2955f8fe udev-util: assume system is running on AC power when no battery found
37b54927d3 Fix issue with system time set back (#24131)
4fdca1ab9e shared/generator: Ensure growfs unit runs after repart
32f9d70f8b manager: optionally, do a full preset on first boot
```
2022-10-03 13:56:23 +02:00
Florian Klink
20c2a3a9d5 systemd: nixpkgs-fmt 2022-10-03 13:09:29 +02:00
phaer
fcd5087046 systemd: build with portabled by default. 2022-09-30 14:53:50 +02:00
github-actions[bot]
2f49e0bb89
Merge master into staging-next 2022-09-20 18:01:23 +00:00
Sandro
95d3c49389
Merge pull request #175406 from SuperSandro2000/systemd-null 2022-09-20 17:09:26 +02:00
Yuka
2444caed5a
systemd: set withTpm2Tss and withUserDb to true on musl (#191030)
When we initially applied the openembedded patchset to make systemd
build with musl, these options had to be disabled for it to work.
Now they seem to work fine, so re-enabling.
2022-09-13 16:03:35 +02:00
Yureka
4817865887 systemd: add withUtmp flag and inherit in passthru
The NixOS systemd module has to include some upstream unit files
depending on if the systemd package was built with utmp support.
This makes it possible for the NixOS systemd module to detect if the
systemd package was built with utmp support.
2022-09-13 10:32:35 +02:00
Nick Cao
767c3e5fa9
systemd: fix cross compilation with libbpf enabled 2022-08-25 22:18:06 +08:00
Florian Klink
4a641f7ac3
Merge pull request #187714 from veehaitch/systemd-bpf-framework
systemd: enable `BPF_FRAMEWORK` by default (`withLibBPF=true`)
2022-08-21 16:59:14 +02:00
Vincent Haupert
ca0120a4bc systemd: enable BPF_FRAMEWORK by default (withLibBPF=true)
So far, we have been building Systemd without `BPF_FRAMEWORK`. As a
result, some Systemd features like `RestrictNetworkInterfaces=` cannot
work. To make things worse, Systemd doesn't even complain when using a
feature which requires `+BPF_FRAMEWORK`; yet, the option has no effect:

    # systemctl --version | grep -o "\-BPF_FRAMEWORK"
    -BPF_FRAMEWORK
    # systemd-run -t -p RestrictNetworkInterfaces="lo" ping -c 1 8.8.8.8

This commit enables `BPF_FRAMEWORK` by default. This is in line with
other distros (e.g., Fedora). Also note that BPF does not support stack
protector: https://lkml.org/lkml/2020/2/21/1000. To that end, I added a
small `CFLAGS` patch to the BPF building to keep using stack protector
as a default.

I also added an appropriate NixOS test.
2022-08-21 12:22:16 +02:00
Janne Heß
a8c50530fc
systemd: Enable oomd by default
This is only in the big systemd, not the minimal one
2022-08-15 10:13:04 +02:00
Sergei Trofimovich
7659f31d69 systemd: 251.3 -> 251.4
Notable change is binutils-2.39 support.

Changes: https://github.com/systemd/systemd-stable/compare/v251.3...v251.4
2022-08-11 09:33:22 +01:00
github-actions[bot]
50de8aa60e
Merge master into staging-next 2022-07-29 18:01:27 +00:00
Alyssa Ross
4a487f4c33
pkgsMusl.systemd: fix build with latest oe patches 2022-07-29 16:06:16 +00:00
Florian Klink
ad29dc19c1
Merge pull request #182436 from K900/systemd-initrd-fixes
nixos/systemd: make sure all the device nodes are created in stage1
2022-07-22 15:06:59 +07:00
K900
c9183d3738 nixos/systemd: make sure all the device nodes are created in stage1
The ConditionFileNotEmpty override patch wasn't correct for stage1, which
does have the modules in /lib. So, remove the patch and set
the right path with overrides in the final system.

Also, make sure systemd-tmpfiles-setup-dev is pulled in to create
all the necessary symlinks.
2022-07-22 10:01:21 +03:00
Artturin
229ecd4bbc systemd: update substituteInPlace to restore cross
systemd-aarch64-unknown-linux-gnu> src/boot/efi/meson.build:433:8: ERROR: Program 'objcopy' not found or not executable
2022-07-21 05:00:18 +03:00
Jörg Thalheim
a14d1a2e7e systemd: 250.4 -> 251.3 2022-07-18 14:17:05 +02:00
Sandro Jäckel
0aed504d4a
systemd: remove unused null checks 2022-05-30 05:49:19 +02:00
Martin Weinelt
1923b68bda Merge remote-tracking branch 'origin/staging-next' into staging 2022-05-23 17:35:37 +02:00
Florian Klink
2403723108
Merge pull request #172652 from klemensn/systemd-optional-system-units
nixos/systemd: Package only built component units
2022-05-23 11:35:01 +02:00
Ben Wolsieffer
5e2009d894 systemd: fix build platform shebang reference
patchShebangs was writing a build platform bash shebang to
systemd-update-helper, which ends up in the output. To fix this, this patch
restricts patchShebangs to only run on certain directories.

Also, remove a comment stating that patchShebangs will no longer be necessary
after the next systemd release. This is not the case because /usr/bin/env
doesn't exist within the sandbox and will still need to be patched.
2022-05-21 16:13:48 -04:00
Klemens Nanni
cbcc746f8f nixos/systemd: Package only built component units
Account for all `with*` options causing their respective unit files to
not be built, just like the current code `withCryptsetup` already does.

This fixes build errors like the following:
```
missing /nix/store/5fafsfms64fn3ywv274ky7arhm9yq2if-systemd-250.4/example/systemd/system/systemd-importd.service
error: builder for '/nix/store/67rdli5q5akzwmqgf8q0a1yp76jgr0px-system-units.drv' failed with exit code 1
```

Found by using a customised systemd package as follows:
```
systemd.package = pkgs.systemd-small;

nixpkgs.config.packageOverrides = pkgs: {

  "systemd-small" = pkgs.systemd.override {
    withImportd = false;
    withMachined = false;
    ...
  };

};
```
2022-05-16 16:52:25 +02:00
06kellyjac
eeff6c4933 systemd: fix reproducibility of dbus interface xml
systemd's `--bus-introspect` was generating nondeterministic xml which
is saved into our build outputs
2022-05-12 10:11:22 +01:00
Janne Heß
509e2b499e
systemd: Remove accidential sysinit re-add
0423158e10 re-introduced a previously
removed mv call.
2022-05-05 14:55:40 -07:00
github-actions[bot]
da11317d1c
Merge staging-next into staging 2022-04-27 06:01:39 +00:00
Guillaume Girol
71ca66602b systemd: mark as broken for static builds 2022-04-24 23:20:48 +02:00
Sergei Trofimovich
77a189e066 systemd: disable EFI stripping
In Issue #169693 we found out that systemd-bootaa64.efi does not have
required `#### LoaderInfo: systemd-boot 250.4 ####` marking.

It is destroyed by `nixpkgs`'s `_doStrip` hook (part of `fixupOutputHooks`).
It makes sense as PE32+ is a bit different from ELF where `.sdmagic` section
is inserted.

The change avoids stripping EFI files altogether by moving them out
of default strip directories of _doStrip for the time while `fixupPhase`
is running.

Closes: https://github.com/NixOS/nixpkgs/issues/169693
2022-04-23 18:54:48 +01:00
Janne Heß
adab6ce552
nixos/systemd-stage-1: Minor fixups
- Fix the name of the env
- Add the correct kmod to the initrd
- Add `less` to make journalctl usable
- Fix SYSTEMD_SULOGIN_FORCe for rescue.target
- Add some missing binaries
2022-04-11 11:13:01 +01:00
github-actions[bot]
c46200d454
Merge master into staging-next 2022-04-03 18:01:07 +00:00
Alyssa Ross
39eee39fd9
pkgsMusl.systemd: fix build for 250.4 2022-03-27 14:13:18 +00:00
Sergei Trofimovich
35e2c61dfd systemd: 250.3 -> 250.4
Among other things fixes build failure on linux-headers-5.17:

    ../src/basic/meson.build:389:8: ERROR: Problem encountered: found unknown filesystem(s) defined in kernel headers:

    Filesystem found in kernel header but not in filesystems-gperf.gperf: CIFS_SUPER_MAGIC
    Filesystem found in kernel header but not in filesystems-gperf.gperf: SMB2_SUPER_MAGIC
2022-03-23 08:44:15 +00:00
Will Fancher
2d4ebf1259 initrd: Optional systemd-based initrd 2022-03-22 21:28:43 -04:00
Alyssa Ross
b8734c50e2 pkgsMusl.systemdMinimal: fix build
Use latest patches from OpenEmbedded.  pkgsMusl.systemd doesn't build
yet because pkgsMusl.libnetfilter_conntrack is currently broken.
2022-03-14 12:21:51 +00:00
Florian Klink
57230883fb
Merge pull request #162949 from alyssais/systemd-typos
systemd: fix a whole bunch of typos
2022-03-06 19:59:42 +01:00
Alyssa Ross
a0bfc8e7c1 systemd: update patchShebangs comment
We can't remove this yet even though we're on 250.3, because some more
crept in and weren't fixed in time for the release.
2022-03-06 10:12:19 -08:00
Alyssa Ross
479b1cb510
systemd: fix a whole bunch of typos 2022-03-06 00:58:59 +00:00
Florian Klink
f5c243d6c2 systemd: drop -Defi-ld=gold
As reported in
https://github.com/NixOS/nixpkgs/pull/156096#pullrequestreview-900986176,
this fails to build on EFI enabled RISC-V because the requested EFI
linker (efi-ld=gold) is unsupported. According to Wikipedia gold only
supports x86, x86-64, ARM, PowerPC, TileGX.

Removing this option alltogether will cause meson to figure out the
default linker by itself.
2022-03-05 21:28:08 +01:00
Jörg Thalheim
f592c5a7c4 systemd: do not patch test files
We do not run them, so it is unnecessary work.
2022-03-05 21:27:45 +01:00
Andreas Rammhold
49267a99d2 systemd: add the release timestamp into the build
This helps systemd during runtime to make decisions about the sanity of
the system clock. See the references news article for more details on
the matter.
2022-03-05 21:27:45 +01:00
Andreas Rammhold
e6280a6397 systemd: introduce withTests flag
This allows us to make test-only dependencies optional in builds that
aren't running tests (sadly all of our builds).
2022-03-05 21:27:45 +01:00
Andreas Rammhold
0c852e1fa6 systemd: remove unused lvm2 input 2022-03-05 21:27:45 +01:00