Lennart Poettering [Thu, 10 Aug 2023 13:01:16 +0000 (15:01 +0200)]
sd-event: explicit document what to do with epoll-incompatible fds
Lennart Poettering [Thu, 10 Aug 2023 12:47:12 +0000 (14:47 +0200)]
journalcl: simplify handling of stdout being a regular file and epoll()
Let's not check the fd type beforehand, let's instead gracefully handle
if we get EPERM back from epoll_ctl() because the fd doesn't do epoll.
THis should be safer and more generic.
The epoll_ctl(2) man page clearly documents EPERM is being returned in
this case, hence it's safe to check for exactly that case.
Follow-up for: #28644
Lennart Poettering [Wed, 9 Aug 2023 16:23:09 +0000 (18:23 +0200)]
man: let's tone down the recommendation to use Type=exec a bit
This is a follow-up for #28596.
I think the suggestion to use Type=exec uses too strong wording:
Type=exec has non-trivial drawbacks over Type=simple, and they deserve
to be mentioned.
Hence drop the <emphasis> and turn this around so that Type=exec is
*recommended*, but Type=simple is not expressly discouraged, because
there are plenty reasons to use it.
Add a brief discussion where Type=simple might be preferable.
Also, fix the outright unruth that Type=exec was the "simplest and
fastest", because it certainly is a lot, but not that.
Daan De Meyer [Thu, 10 Aug 2023 09:32:55 +0000 (11:32 +0200)]
execute: Chown credentials files and directories to service group
For a userns root user to be able to access the credentials, both
the uid and gid of the credentials directory have to be mapped into
the userns. Currently, the credentials directory group is root, which
we obviously do not want to map in to a userns, so let's make sure
that the credentials directory and files are owned by the service
group instead, which can generally be safely mapped into the userns.
Since we use permissions mode 0600, this shouldn't cause any change
in who is able to access the credentials.
Fixes #28747
Daan De Meyer [Thu, 10 Aug 2023 12:36:02 +0000 (14:36 +0200)]
Merge pull request #28756 from DaanDeMeyer/repart-fix
repart --copy-from followups
Daan De Meyer [Thu, 10 Aug 2023 08:46:14 +0000 (10:46 +0200)]
repart: Reword --copy-from docs
Daan De Meyer [Thu, 10 Aug 2023 08:32:35 +0000 (10:32 +0200)]
repart: Pass GptPartitionType *
Lennart Poettering [Thu, 10 Aug 2023 08:14:33 +0000 (10:14 +0200)]
main: drop redundant ()
Lennart Poettering [Thu, 10 Aug 2023 08:06:50 +0000 (10:06 +0200)]
update TODO
Lennart Poettering [Thu, 10 Aug 2023 07:35:52 +0000 (09:35 +0200)]
Merge pull request #28736 from poettering/polkit-tweaks
some minor polkit handling tweaks
Yu Watanabe [Wed, 9 Aug 2023 23:48:51 +0000 (08:48 +0900)]
Merge pull request #28732 from yuwata/udev-vs-tmpfiles-take-2
Udev vs tmpfiles take 2
Yu Watanabe [Wed, 9 Aug 2023 23:45:44 +0000 (08:45 +0900)]
Merge pull request #28741 from keszybz/minor-tweaks-for-recent-patches
Minor tweaks for recent patches
Yu Watanabe [Fri, 21 Jul 2023 01:26:13 +0000 (10:26 +0900)]
udev: re-introduce symlinks for loopback block device
But the directories are changed from /dev/loop/by-ref/ -> /dev/disk/by-loop-ref/
and /dev/loop/by-inode/ -> /dev/disk/by-loop-inode/.
As /dev/loop/ is used by losetup command for other purpose.
See issue #28475.
This effectively reverts commits
9915cc60868c77e7e8cecb669ddb90516dffc7df,
5022fab15fc16204d163883ca818fd6092dc919c, and
c0d998248e10e1dcf18108fdbb70f259acd452eb.
Luca Boccassi [Wed, 9 Aug 2023 19:20:03 +0000 (20:20 +0100)]
Merge pull request #28734 from loongarch64/dev-wu-main
seccomp: add LoongArch 64bit support
Daan De Meyer [Wed, 9 Aug 2023 15:17:50 +0000 (17:17 +0200)]
mkosi: Update to latest
This update introduces the explicit Dependencies= setting, instead
of relying on implicit dependencies via alphanumerical ordering.
We also take the opportunity to rename the "final" preset to the
"system" preset, which seems like a better name.
Lennart Poettering [Wed, 9 Aug 2023 08:48:47 +0000 (10:48 +0200)]
tree-wide: drop _pure_ + _const_ from local, static functions
This is supposed to be a help for compilers to apply optimizations on
functions where they can't determine whether they are const/pure on
their own. For static, local functions the compiler can do this on its
own easily however, hence the decoration with pure/const is just noise.
Let's drop it, and let the compiler to its thing better.
(Use it for exported functions, since compilers can't 'reach-over' into
other modules to determine if they are pure, except if LTO is used)
Mike Yuan [Wed, 9 Aug 2023 15:59:51 +0000 (23:59 +0800)]
Merge pull request #28728 from yuwata/fstab-no
gpt-auto, remount-fs: parse fstab= kernel command line option
Lennart Poettering [Tue, 8 Aug 2023 12:56:40 +0000 (14:56 +0200)]
sysusers: move global variables into a Context object
Our coding style says static variables suck except for very special
cases, i.e. things like the log level or very per-process stuff, such as
parsed version of cmdline args and such. sysusers departed from that as
one of the very few exceptions in our codebases: it keeps its
operational state in global variables.
Address that. Introduce a Context object that carries the fields that so
far have been global, and pass it around as needed.
This has the nice effect that state and configuration is clearly
separated in code, and we can very clearly see which functions mangle
state and which ones do not.
No actual codeflow changes, just refactoring.
Lennart Poettering [Wed, 9 Aug 2023 15:32:12 +0000 (17:32 +0200)]
Merge pull request #28720 from poettering/vconsole-setup-tweaks
vconsole-setup: trivial modernizations
Xiaotian Wu [Wed, 9 Aug 2023 12:52:27 +0000 (20:52 +0800)]
LoongArch: Replace __loongarch64 with __loongarch_lp64
`__loongarch64` is no longer used for historical reasons and should be replaced by `__loongarch_lp64` in new code.
https://loongson.github.io/LoongArch-Documentation/LoongArch-toolchain-conventions-EN.html#_cc_preprocessor_built_in_macro_definitions
Lennart Poettering [Wed, 9 Aug 2023 11:08:58 +0000 (13:08 +0200)]
bootctl: don't advertise systemd-efi-options in --help/man anymore
The command is deprecated, as per NEWS of 254. Let's go one step further
and remove it from the help text and man page, so that people are not
inspired to use it at this time anymore.
This is how we usually have done this before: remove it from visibility,
but support it for a while still.
Zbigniew Jędrzejewski-Szmek [Wed, 9 Aug 2023 10:54:14 +0000 (12:54 +0200)]
60-ukify.install: fix whitespace
Zbigniew Jędrzejewski-Szmek [Wed, 9 Aug 2023 10:25:06 +0000 (12:25 +0200)]
test: use pytest.raises wrapper
This way we check that the appropriate exception is raised,
not just ignore it.
Follow-up for
e3c04a5c84af5a39794a0a4963bc9916787aa5b4.
Lennart Poettering [Wed, 9 Aug 2023 08:51:40 +0000 (10:51 +0200)]
polkit: move asserts up, so that they cover all reply codepaths
Lennart Poettering [Wed, 9 Aug 2023 08:51:19 +0000 (10:51 +0200)]
polkit: use LIST_POP where appropriate
Yu Watanabe [Tue, 8 Aug 2023 17:02:23 +0000 (02:02 +0900)]
remount-fs: refuse to remount based on fstab when fstab=no kernel command line option specified
Otherwise, if for some reasons remount-fs is invoked even when fstab=no is
specified, mounts may get unexpected options from fstab.
For safety, let's parse the kernel command line option.
Yu Watanabe [Tue, 8 Aug 2023 16:57:16 +0000 (01:57 +0900)]
remount-fs: split-out remount_by_fstab()
No functional change, just refactoring and preparation for later
commits.
Yu Watanabe [Tue, 8 Aug 2023 17:40:21 +0000 (02:40 +0900)]
fstab-generator: update cache in fstab_enabled_full() based on the parsed result of fstab=
Currently, fstab-generator does not use fstab file parsers in
fstab-util.c. So, this is not necessary. Just for a possible
optimization in the case the parsers used in the future.
Yu Watanabe [Tue, 8 Aug 2023 17:30:33 +0000 (02:30 +0900)]
fstab-util: introduce fstab_enabled() helper function
And refuse to parse fstab when 'fstab=no' is specified in the kernel
command line.
When 'fstab=no' is specified in the kernel command line, fstab-generator
does not parse fstab and will not create e.g. /boot or /efi mount entry
even if fstab contains entries for the mount points. However, gpt-auto
generator may parse fstab file, and adjust or ignore mounts for EFI or
XBOOTLDR partitions based on the fstab file.
This makes gpt-auto also ignore fstab entries if 'fstab=no' is set in
the kernel command line.
Yu Watanabe [Wed, 9 Aug 2023 08:41:55 +0000 (17:41 +0900)]
proc-cmdline: make proc_cmdline_get_bool() take flags
All other command line parsers takes flags. Let's make
proc_cmdline_get_bool() also take flags. Though, currently,
no flag is set by the caller.
Lennart Poettering [Tue, 8 Aug 2023 12:20:17 +0000 (14:20 +0200)]
vconsole-setup: simplify error handling
no need to negate an error which we don't need negated.
also, add debug log about errors we ignore.
Lennart Poettering [Tue, 8 Aug 2023 12:19:21 +0000 (14:19 +0200)]
vconsole-setup: simplify path allocation
Let's code this straighforwadly, and just allocate the string as we need
it, instead of doing pre-allocation.
This is not performance sensitive, as this will almost certainly just
return /dev/tty1 after the first transition.
Lennart Poettering [Tue, 8 Aug 2023 12:18:50 +0000 (14:18 +0200)]
vconsole-setup: use FOREACH_ARRAY() at one more place
Lennart Poettering [Tue, 8 Aug 2023 12:18:38 +0000 (14:18 +0200)]
vconsole-setup: port to main-func.h boilerplate
Yu Watanabe [Tue, 8 Aug 2023 22:20:49 +0000 (07:20 +0900)]
test: also check the ordering between udevd and tmpfiles-setup
Yu Watanabe [Tue, 8 Aug 2023 16:25:42 +0000 (01:25 +0900)]
Revert "Revert "tmpfiles.d: adjust /dev/vfio/vfio access mode""
This reverts commit
33b91308c26ca5d512e43b6b32d596a2c9237d04.
The commit
b42482af904ae0b94a6e4501ec595448f0ba1c06 dropped
'--exclude-prefix=/dev' from systemd-tmpfiles-setup.service. So, the
possibly later invocation of the service changes the permission set by
udevd.
As commmented in the head of this file, settings should be consistent
with udev rules. Only missing entry here is vfio. Let's re-add the
entry for the device.
Addresses https://github.com/systemd/systemd/pull/28681#issuecomment-
1666949888.
Yu Watanabe [Tue, 8 Aug 2023 18:40:14 +0000 (03:40 +0900)]
veritysetup-generator: fix ordering of generated units
Fixes a bug introduced by
08b04ec7e72b7327b4803809732b1b8fce8dd069 and
953006dcb0a37a57aed0e762ff6289700e8689e8.
Fixes #28725.
Yu Watanabe [Wed, 9 Aug 2023 02:25:44 +0000 (11:25 +0900)]
Merge pull request #28731 from yuwata/sd-dhcp-server-cleanups
sd-dhcp-server: cleanups
Xiaotian Wu [Fri, 5 Nov 2021 08:52:27 +0000 (16:52 +0800)]
seccomp: add LoongArch 64bit support
Luca Boccassi [Wed, 9 Aug 2023 00:18:13 +0000 (01:18 +0100)]
Merge pull request #28727 from yuwata/proc-cmdline-cleanups
tree-wide: fixlet and optimization for parsing kernel command line
Yu Watanabe [Tue, 8 Aug 2023 22:15:26 +0000 (07:15 +0900)]
unit: make udev rules really take precedence over tmpfiles
Follow-up for
b42482af904ae0b94a6e4501ec595448f0ba1c06.
The commit makes systemd-tmpfiles-setup.service also updates the
permission or owner of device nodes. However, the service does not have
ordering for systemd-udevd.service. So, the service may set different
permission from the one udevd already set.
Fixes #28653.
Replaces #28681.
Yu Watanabe [Tue, 8 Aug 2023 22:13:09 +0000 (07:13 +0900)]
Revert "unit: make udev rules take precesence over tmpfiles"
This reverts commit
31845ef554877525dc4ff4f25ad11ad805ebf81c.
systemd-tmpfiles-setup-dev.service has Before=systemd-udevd.service.
So the commit does not change anything.
Yu Watanabe [Tue, 8 Aug 2023 01:38:47 +0000 (10:38 +0900)]
meson: use install_emptydir() and drop meson-make-symlink.sh
The script is mostly equivalent to 'mkdir -p' and 'ln -sfr'.
Let's replace it with install_emptydir() builtin function and
inline meson call.
Yu Watanabe [Tue, 8 Aug 2023 19:58:04 +0000 (04:58 +0900)]
sd-dhcp-server: propagate error on parsing DHCP packet
Otherwise, we silently ignore the received packet and that makes hard to
debug issue.
Yu Watanabe [Tue, 8 Aug 2023 20:04:07 +0000 (05:04 +0900)]
dhcp: rename function argument
mordner [Tue, 8 Aug 2023 19:57:41 +0000 (21:57 +0200)]
man: fix typo in journalctl
Fabian Vogt [Tue, 8 Aug 2023 10:52:53 +0000 (12:52 +0200)]
units/initrd-parse-etc.service: Conflict with emergency.target
If emergency.target is started while initrd-parse-etc.service/start is queued,
the initrd-parse-etc job did not get canceled. In parallel to the emergency
units, it eventually runs the service, which starts initrd-cleanup.service,
which in turn isolates initrd-switch-root.target. This stops the emergency
units and effectively starts the initrd boot process again, which likely
fails again like the initial attempt. The system is thus stuck in an endless
loop, never really reaching emergency.target.
With this conflict added, starting emergency.target automatically cancels
initrd-parse-etc.service/start, avoiding the loop.
Dan Streetman [Fri, 4 Aug 2023 22:51:55 +0000 (18:51 -0400)]
openssl: add log_openssl_errors()
Add a macro to log all errors in the openssl 'thread error queue'.
This consolidates all the openssl-generated errors to return -EIO and log at
debug level.
Also add a 'invalid' test in test-openssl, to allow manual verification that
the openssl error(s) are logged.
Jan Kuparinen [Tue, 8 Aug 2023 17:21:02 +0000 (19:21 +0200)]
po: Translated using Weblate (Finnish)
Currently translated at 86.3% (196 of 227 strings)
Co-authored-by: Jan Kuparinen <copper_fin@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/fi/
Translation: systemd/main
Yu Watanabe [Tue, 8 Aug 2023 17:44:52 +0000 (02:44 +0900)]
tree-wise: drop unnecessary use of proc_cmdline_key_streq()
If the key does not contain '-' or '_', then it is not necessary to use
proc_cmdline_key_streq(), and streq() is sufficient.
This also adds missing assertions about 'key' argument.
Yu Watanabe [Tue, 8 Aug 2023 18:00:34 +0000 (03:00 +0900)]
resolve: ignore nameserver= and domain= kernel command line options without value
Otherwise, manager_parse_dns_server_string_and_warn() or
manager_parse_search_domains_and_warn() will trigger assertion.
Lennart Poettering [Tue, 8 Aug 2023 10:26:09 +0000 (12:26 +0200)]
libfido2: pick up debug logging from libfido2, and funnel it through our log subsystem
Fixes: #27984
Luca Boccassi [Tue, 8 Aug 2023 11:06:40 +0000 (12:06 +0100)]
Merge pull request #28710 from rpigott/zsh-non-template-cache
zsh completion speedups
Yu Watanabe [Tue, 8 Aug 2023 05:54:05 +0000 (14:54 +0900)]
udev: set ID_NAME and ID_SERIAL to MMC/memstick devices again
Fixes a bug introduced by
998db5871fea331ec00b26a3a3f5271df040a905.
Fixes #28671.
Ronan Pigott [Tue, 8 Aug 2023 08:30:28 +0000 (01:30 -0700)]
zsh: reintroduce pattern argument to uncached verbs
The systemctl completion previously made use of PREFIX as a pattern
argument to list-unit-files and list-units. This had the problem of
erroneously filtering the results that were stored in the cache, and
erroneously filtering results that might have been requested according
to the users configuration (e.g. _correct completer, certain
matcher-lists or tag-orders, etc.).
Unfortunately, the runtime of list-unit-files increases when no pattern
argument is provided, and systemctl show, used to filter those units,
can become unacceptably slow when provided with too many units to
describe.
Let's re-introduce the pattern argument to list-unit-files and
list-units where necessary in order to alleviate these bottlenecks
without poisining the cache. A 'use-pattern' style is introduced that
may be used to disable this behavior if it is undesired. We can still
expect that certain completions, like `systemctl start <TAB>` will be
slow, like before. To fix this we will need systemd to learn a more
efficient way of filtering the units than parsing systemctl show.
Yu Watanabe [Tue, 8 Aug 2023 02:24:22 +0000 (11:24 +0900)]
busctl: fix showing array of dictionary in JSON format
This partially reverts the commit
684bce3d54463b3222246f72adfe82ad5d176fea
and fixes the issue introduced by it.
Fixes #28711.
Ronan Pigott [Mon, 7 Aug 2023 19:13:23 +0000 (12:13 -0700)]
zsh: use sys_really_all_units for non-template names
The systemctl invocations used for these completions match the ones used
for the _sys_really_all_units parameter, so we should really just use
the cached parameter rather than recomputing the result.
Lennart Poettering [Mon, 7 Aug 2023 14:36:26 +0000 (16:36 +0200)]
shutdown: handle gracefully if MD_LEVEL udev propery is not set
See: #28490
Lennart Poettering [Mon, 7 Aug 2023 13:36:39 +0000 (15:36 +0200)]
varlink: don't allocate fd control buffer on each read()
We'll need this on each read() again, hence let's just allocate this
once and then reuse it for subsequent read()s.
Follow-up for: #28639
Daan De Meyer [Mon, 7 Aug 2023 18:17:41 +0000 (20:17 +0200)]
mkosi: Unmount /etc/resolv.conf if it's a mountpoint
Jan Macku [Mon, 7 Aug 2023 13:11:00 +0000 (15:11 +0200)]
ci(lint): exclude `.in` files from ShellCheck lint
Exclude all `.in` files because they may contain unsupported syntax, and
they have to be preprocessed first. For example:
```sh
Error: SHELLCHECK_WARNING:
./src/rpm/systemd-update-helper.in:130:37: warning[SC1083]: This { is literal. Check expression (missing ;/\n?) or quote it.
```
Related to: https://github.com/systemd/systemd/pull/28521
Zbigniew Jędrzejewski-Szmek [Mon, 7 Aug 2023 17:27:13 +0000 (19:27 +0200)]
Merge pull request #28521 from keszybz/rpm-reload
rpm: add %systemd_postun_with_reload and %systemd_user_postun_with_reload
Vincent Haupert [Mon, 7 Aug 2023 06:51:02 +0000 (08:51 +0200)]
repart: derive verity salt and uuid from seed
Daan De Meyer [Mon, 7 Aug 2023 13:23:49 +0000 (15:23 +0200)]
repart: Extend check for read-only verity partitions
Let's check for verity signature partitions as well. Let's also
check the configured verity mode, which is another way to indicate
verity partitions aside from the type UUID.
Lennart Poettering [Mon, 7 Aug 2023 13:36:32 +0000 (15:36 +0200)]
update TODO
Emil Renner Berthing [Sat, 29 Jul 2023 20:26:54 +0000 (22:26 +0200)]
90-loaderentry: support installing device trees
Like the cmdline file we look for a devicetree file in
$KERNEL_INSTALL_CONF_ROOT, /etc/kernel and /usr/lib/kernel. If it is
present we look for the specified device tree that comes with the kernel
we're adding and install it into $ENTRY_DIR_ABS and add a devicetree
stanza to the loader entry.
Unfortunately it seems there is no common consensus on where to install
device tree blobs, so we have to look in a few different places for it.
Zbigniew Jędrzejewski-Szmek [Fri, 28 Jul 2023 17:24:58 +0000 (19:24 +0200)]
rpm: add %systemd_user_daemon_reexec
This macros wraps the call to daemon-reexec in all user managers. It would be
called for example from systemd %post right after the call to systemctl
daemon-reexec.
This will be used in the Fedora systemd package to fix a long-standing FIXME.
Tested via building and reinstalling the systemd package with the patches.
Zbigniew Jędrzejewski-Szmek [Fri, 28 Jul 2023 17:03:21 +0000 (19:03 +0200)]
rpm: use rpm.execute() in more cases
7bde8293a4f4ccfe4b5c5000869068e3c1ac45c6 converted all the posix.execp()
calls, but I do not see why we shouldn't also convert the posix.exec()
calls.
Zbigniew Jędrzejewski-Szmek [Wed, 26 Jul 2023 07:02:04 +0000 (09:02 +0200)]
rpm: add %systemd_postun_with_reload and %systemd_user_postun_with_reload
For some units, the package would like to issue a reload. The machinery was
already in place since
c9615f73521986b3607b852c139036d58973043c:
systemctl reload-or-restart --marked
Enqueues restart jobs for all units that have the 'needs-restart'
mark, and reload jobs for units that have the 'needs-reload' mark.
When a unit marked for reload does not support reload, restart will
be queued.
The new macros allow a reload to be issued instead of a restart.
Based on the discussion on fedora-devel:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/IJSUGIEJNYZZRE53FF4YFUEBRHRAVIXR/
Tested using dummy package https://github.com/keszybz/rpm-test-reload.
Zbigniew Jędrzejewski-Szmek [Fri, 28 Jul 2023 15:54:59 +0000 (17:54 +0200)]
manager: fix reloading in reload-or-restart --marked
bus_unit_queue_job_one has two callers:
- bus_unit_queue_job which would do the appropriate transormations
to turn JOB_TRY_RESTART into JOB_TRY_RELOAD,
- and method_enqueue_marked_jobs which did not.
In effect, method_enqueue_marked_jobs() would queue restart jobs for
units which has Markers= needs-reload or needs-restart.
When the chunk of code which does the transformations is moved from
bus_unit_queue_job to bus_unit_queue_job_one, there is no change for
bus_unit_queue_job, and method_enqueue_marked_jobs is fixed.
The additional checks that are done seem reasonable to do from
method_enqueue_marked_jobs: we shouldn't be restarting units which are
configured to not allow that, or force unwanted start of dbus-broker.
Marc Pervaz Boocha [Sun, 30 Jul 2023 17:05:39 +0000 (22:35 +0530)]
Teach 60-ukify.install to search the staging dir
60-ukify.install would only work with initrd provided by command line
arguements. Fixed to look for both microcode and initrd is found in
$KERNEL_INSTALL_STAGING_AREA which is placed by initrd generator like
mkinitcpio
Lennart Poettering [Mon, 7 Aug 2023 09:36:20 +0000 (11:36 +0200)]
Merge pull request #28627 from yuwata/udev-default-children-max
udev: allow to set 0 for the maximum number of worker process
Daan De Meyer [Sat, 5 Aug 2023 17:31:09 +0000 (19:31 +0200)]
repart: Stat temporary file again after mkfs
This makes sure we use the actual size after mkfs which seems to be
important for btrfs as it refuses to mount the partition otherwise.
Follow-up for
2843df3e5734aa07b82b96ba46b799921a6495b8
Mike Yuan [Sat, 5 Aug 2023 14:31:24 +0000 (22:31 +0800)]
shared/fstab-util: use is_device_path instead of is_device_node
Follow-up for
99299d0d5a722812cedc0a23e4987f90a257c2d2
is_device_node() calls lstat(), causing device node
symlinks under /dev/disk/ not being compared correctly
using devnode_same().
Fixes #28585
Frantisek Sumsal [Sat, 5 Aug 2023 14:35:09 +0000 (16:35 +0200)]
ukify: don't panic when prepending to an undefined list
Handle the case when all the arguments are passed in through a
configuration file:
$ cat ukify.conf
[UKI]
Linux = /boot/vmlinuz-linux
Initrd = /boot/initramfs-linux.img
Before:
$ src/ukify/ukify.py --config ukify.conf build
Traceback (most recent call last):
File "/root/systemd/src/ukify/ukify.py", line 1604, in <module>
main()
File "/root/systemd/src/ukify/ukify.py", line 1590, in main
opts = parse_args()
^^^^^^^^^^^^
File "/root/systemd/src/ukify/ukify.py", line 1584, in parse_args
apply_config(opts)
File "/root/systemd/src/ukify/ukify.py", line 1431, in apply_config
item.apply_config(namespace, section_name, group, key, value)
File "/root/systemd/src/ukify/ukify.py", line 1123, in apply_config
self.config_push(namespace, group, dest, value)
File "/root/systemd/src/ukify/ukify.py", line 1019, in config_list_prepend
setattr(namespace, dest, value + old)
~~~~~~^~~~~
TypeError: can only concatenate list (not "NoneType") to list
After:
$ src/ukify/ukify.py --config ukify.conf build
Kernel version not specified, starting autodetection 😖.
Found uname version: 6.4.7-arch1-3
Wrote unsigned vmlinuz-linux.unsigned.efi
Resolves: #28688
Yu Watanabe [Tue, 1 Aug 2023 16:19:37 +0000 (01:19 +0900)]
man: update document about the maximum number of child processes
Yu Watanabe [Tue, 1 Aug 2023 16:14:04 +0000 (01:14 +0900)]
udev: allow to set the maximum number of worker process to 0
In that case, the maximum is calculated based on the system resources.
Yu Watanabe [Tue, 1 Aug 2023 16:07:12 +0000 (01:07 +0900)]
udev: split out manager_set_default_children_max()
Mike Yuan [Sat, 5 Aug 2023 04:35:17 +0000 (12:35 +0800)]
man/systemd: avoid duplicate variable name
Frantisek Sumsal [Fri, 4 Aug 2023 16:02:01 +0000 (18:02 +0200)]
test: ignore missing libudev when creating the test image
Same scenario as with libsystemd - ldd might use unprefixed RPATH, and
we install our own stuff into the image unconditionally anyway.
Also, bail out early if we hit a missing DSO with a possibly helpful
message.
Dan Streetman [Fri, 4 Aug 2023 20:12:05 +0000 (16:12 -0400)]
tpm2: use ELEMENTSOF() instead of sizeof() for TPML_PCR_SELECTION pcrSelections field
The count field indicates the number of elements in the pcrSelections field,
and the size of each elements is greater than 1 byte, so using sizeof() is
incorrect when verifying the count field is valid; instead ELEMENTSOF() should
be used.
Caught by coverity check: https://github.com/systemd/systemd/pull/26331#pullrequestreview-
1556629586
Yu Watanabe [Sat, 5 Aug 2023 04:30:49 +0000 (13:30 +0900)]
Merge pull request #28681 from yuwata/udev-vs-tmpfiles
Udev vs tmpfiles
Luca Boccassi [Fri, 4 Aug 2023 20:04:03 +0000 (21:04 +0100)]
Merge pull request #28398 from ddstreet/tpm2_specify_pcr_value
Tpm2 specify pcr value
Yu Watanabe [Fri, 4 Aug 2023 20:03:16 +0000 (05:03 +0900)]
test: shorten timeout for 'udevadm monitor'
The command should never finish, it is not necessary to wait so long.
Yu Watanabe [Fri, 4 Aug 2023 19:52:16 +0000 (04:52 +0900)]
test: add short test for device node permission
Yu Watanabe [Fri, 4 Aug 2023 19:37:19 +0000 (04:37 +0900)]
unit: make udev rules take precesence over tmpfiles
Without this change, there are no ordering between udevd and tmpfiles,
and if tmpfiles is invoked later it may discard the permission set by
udevd.
Fixes an issue introduced by
b42482af904ae0b94a6e4501ec595448f0ba1c06.
Fixes #28588 and #28653.
Yu Watanabe [Fri, 4 Aug 2023 19:32:01 +0000 (04:32 +0900)]
Revert "tmpfiles.d: adjust /dev/vfio/vfio access mode"
The issue needs to be fixed by setting proper ordering between the
tmpfiles and udevd.
See issue #28653, especially
https://github.com/systemd/systemd/issues/28653#issuecomment-
1665181625.
This reverts commit
a3d610998ad3b4c88224fe89a048a84dbceb652b.
Zbigniew Jędrzejewski-Szmek [Fri, 4 Aug 2023 17:08:43 +0000 (18:08 +0100)]
journalctl: fix loggging invocation
Fixup for
f882a986c271c3de1c622df0f1586946b4a09fef.
Luca Boccassi [Fri, 4 Aug 2023 18:24:46 +0000 (19:24 +0100)]
Merge pull request #28679 from keszybz/two-new-news-tweaks
Two news tweaks
Daan De Meyer [Fri, 4 Aug 2023 18:16:55 +0000 (20:16 +0200)]
Merge pull request #28669 from DaanDeMeyer/mkosi-fix
mkosi: Make sure our systemd build always overrides the distros
Daan De Meyer [Fri, 4 Aug 2023 14:12:35 +0000 (16:12 +0200)]
tmpfiles: Consider ENOPKG as information not available
We already handle the case where /etc/machine-id is empty. Let's make
sure we also handle the case where /etc/machine-id is "uninitialized".
Luca Boccassi [Fri, 4 Aug 2023 12:34:00 +0000 (13:34 +0100)]
portablectl: fix regression when using --force without extension parameters
c18f4eb9e96836a made it possible to use --force with various verbs, by
going through the newer D-Bus methods. Except it didn't, as it regressed
during PR review refactorings, and nobody noticed because there were no
tests for it. Fix it, and add tests.
Follow-up for
c18f4eb9e96836a6a8285ec42fd8a34c8909f6d9
Luca Boccassi [Fri, 4 Aug 2023 15:46:56 +0000 (16:46 +0100)]
Merge pull request #28673 from YHNdnzj/hibernate-resume-escape-node
hibernate-resume-generator: escape device path passed to hibernate-resume
Dan Streetman [Thu, 13 Jul 2023 20:02:37 +0000 (16:02 -0400)]
tpm2: update TEST-70-TPM2 to test passing PCR value to systemd-cryptenroll
Add tests to use expected, not current, PCR values during sealing.
Dan Streetman [Fri, 14 Jul 2023 22:36:20 +0000 (18:36 -0400)]
man: update systemd-cryptenroll man page with details on --tpm2-pcrs format change
The previous commit extended the accepted format of --tpm2-pcrs to allow
specifying the hash algorithm (i.e. PCR bank) and hash digest value, this
updates the man page with those changes.
Dan Streetman [Wed, 12 Jul 2023 21:35:54 +0000 (17:35 -0400)]
tpm2: move policy calculation out of tpm2_seal()
Move the calculation of the sealed object policy hash out of the tpm2_seal()
function. Instead, callers of tpm2_seal() can directly call
tpm2_calculate_sealing_policy() and then provide the policy hash to
tpm2_seal().
Dan Streetman [Tue, 27 Jun 2023 19:03:08 +0000 (15:03 -0400)]
tpm2: add functions to convert TPM2B_PUBLIC to/from openssl pkey or PEM
Add functions to convert a PEM or pkey to TPM2B_PUBLIC, and functions to
convert TPM2B_PUBLIC to pkey or fingerprint.
Supports both RSA and ECC keys.
Add ECC support to some test-tpm2 tests, and tests to cover the newly added functions.
Dan Streetman [Thu, 6 Jul 2023 15:21:29 +0000 (11:21 -0400)]
openssl: add test-openssl
Add openssl unit tests.
Dan Streetman [Thu, 6 Jul 2023 15:21:29 +0000 (11:21 -0400)]
test: add DEFINE_HEX_PTR() helper function
Use function in test-tpm2 to convert hex strings to void* and len vars.
Dan Streetman [Tue, 4 Jul 2023 22:52:59 +0000 (18:52 -0400)]
openssl: add ecc_pkey_new(), ecc_pkey_from_curve_x_y(), ecc_pkey_to_curve_x_y()
Add function to create openssl pkey from ECC curve and point, and function to
get curve id and x/y point from existing ECC pkey. Also add function to create
new ECC key for specified curve.
Also add DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_MACRO() to handle case when func() is
a macro, not a function symbol; specifically in this case it is used for
OPENSSL_free() which is a macro.