Commit graph

58434 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 64903d18df basic/list: drop LIST_IS_EMPTY
This was a trivial wrapper that didn't provide any added value. With more
complicated structures like strvs, hashmaps, sets, and arrays, it is possible
to have an empty container. But in case of a list, the list is empty only when
the head is missing.

Also, we generally want the positive condition, so we replace many
if (!LIST_IS_EMPTY(x)) with just if (x).
2022-07-02 12:46:16 +02:00
Zbigniew Jędrzejewski-Szmek a4d60b3e1c
Merge pull request #23827 from yuwata/sd-event-process-buffered-inotify-data
sd-event: process buffered inotify data
2022-06-28 18:25:14 +02:00
Yu Watanabe aaec221660
Merge pull request #23181 from thesamesam/parisc-seccomp
Add seccomp support for PARISC (HPPA)
2022-06-28 20:01:01 +09:00
Sam James 5a9276f659 gpt: add PARISC UUIDs
Not doing PARISC64 for now as no userland exists for it yet.
2022-06-28 04:52:42 +01:00
Sam James 344e6b62fc seccomp: add PARISC (HPPA support)
We have to skip the W^X protections as we need executable
memory on PARISC for now. Kernel work is in progress (started
w/ 5.18).

Closes: https://github.com/systemd/systemd/issues/23180
2022-06-28 04:39:29 +01:00
Sam James d40de37edd basic/missing-syscalls: add PARISC (HPPA support)
Bug: https://github.com/systemd/systemd/issues/23180
2022-06-28 04:28:57 +01:00
Jan Macku f0390fa034 github: add more components to RFE issue template
Follow-up to: #23838
2022-06-28 02:18:42 +09:00
Yu Watanabe c7b5a5a736 test: add another test for inotify event source
The test case is for issue #23826.
2022-06-28 00:05:14 +09:00
Yu Watanabe 067fc91702 sd-event: make sd_event_prepare() return positive when buffered inotify data exists
Previously, even if there is buffered inotify data, sd_event_prepare()
did not process the data when there is no pending event source.

Fixes #23826.
2022-06-28 00:05:14 +09:00
Yu Watanabe 32861b4c76 sd-event: use LIST_IS_EMPTY() 2022-06-28 00:05:14 +09:00
Piotr Drąg eaee50fee2 po: add a false positive to POTFILES.skip
Scripts used to detect files that should be in POTFILES.in, like
intltool-update -m used on https://l10n.gnome.org/module/systemd/,
falsely detect this file as containing translations. Avoid this
behavior by putting the file in POTFILES.skip.
2022-06-27 22:59:26 +09:00
Yu Watanabe 54e0cfc44e network: grouping elements in network_free() 2022-06-27 15:52:31 +02:00
Yu Watanabe b09a5659e2
Merge pull request #23842 from medhefgo/boot-std
boot: Use standard types
2022-06-27 22:32:31 +09:00
Zbigniew Jędrzejewski-Szmek 6b0485c29a test-sd-hwdb: adjust the test to actually do anything
Without the terminating colon we wouldn't match anything, so the loop over
properties was skipped.
2022-06-27 22:31:24 +09:00
Jan Janssen e5a1b8f9a3 boot: Use stdbool
The way the UEFI spec defines BOOLEAN is fully compatible to stdbool, so
it is perfectly safe to switch to it. Although any other values than 0/1
are undefined by the spec, we could theoretically have cases where a
sloppy firmware hands us a bad BOOLEAN (since gnu-efi/edk2 declare it
as uint8_t). So any uses where we pass a pointer to BOOLEAN are left
untouched.
2022-06-27 12:27:23 +02:00
Jan Janssen 07d0fde49e boot: Use char
This also switches to _cleanup_free_. Otherwise no code changes.
2022-06-27 12:26:57 +02:00
Jan Janssen 3639d1b021 boot: Use char16_t
This also switches to _cleanup_free_. Otherwise no code changes.
2022-06-27 12:26:21 +02:00
Jan Janssen db4122d130 boot: Use stdint types 2022-06-27 12:16:27 +02:00
Jan Janssen 2a5e4fe414 boot: Remove use of EFI_ERROR
The macro is ugly and annoying to use and provides no real benefit. The
only reason to use it would be to allow warnings to go through. But any
EFI APIs we call do not return warning status codes or we do not check
the return value anyway. The only other case would be BS->StartImage,
where we already treat anything other than EFI_SUCCESS as an error
anyway.

This also helps the compiler and code analyzers to better reason about
the code. In particular, this can help reduce use of uninitialized
variable warnings.
2022-06-27 12:16:27 +02:00
Jan Janssen 8599bdb67c boot: Rename remaining EFI_STATUS vars to err for consistency 2022-06-27 12:16:27 +02:00
Jan Janssen 6b852d22b6 fundamental: Remove types-fundamental.h
This removes the fundamental typedefs in favor of just using standard C
types. These are all used internally anyway and also do not do anything
special to warrant any redefinition to EFI types.

Even for BOOLEAN we can safely use stdbool. The defition from the EFI
specification is fully compatible, including making any other values
than 0/1 as undefined.

The exception is sd_char as those need to be char16_t. The typedef is
moved to string-util-fundamental.h instead.
2022-06-27 12:16:27 +02:00
Yu Watanabe aec2f54b30 github: add more components to issue template 2022-06-27 16:58:59 +09:00
Yu Watanabe 88b6f0dee9 meson: show default nspawn locale in summary
Follow-up for a22f518676.
2022-06-27 09:56:13 +02:00
Jacek Migacz 25e17bddec emacs: ignore .dir-locals-2.el (personal customization) versioning 2022-06-27 07:32:14 +00:00
Akihiko Odaki c3b8113af0 hwdb: Add Lenovo ThinkPad C13 Yoga 2022-06-27 08:24:32 +09:00
Evgeny Vereshchagin 32ed59a6f9
Merge pull request #23834 from mrc0mmand/dfuzzer-in-a-container
A couple of tweaks to allow running TEST-21-DFUZZER in a container
2022-06-27 01:55:36 +03:00
Frantisek Sumsal 53008d0714 test: drop unnecessary || :
since we use `set +e` in the cleanup handler.
2022-06-26 22:06:02 +02:00
Frantisek Sumsal eda0e525d3 test: run TEST-21 in nspawn only if $TEST_PREFER_NSPAWN is set
so we can run it under nspawn in CIs which don't support nested KVM, but
avoid running it twice (both under nspawn and qemu) in CIs which support
both methods.
2022-06-26 22:06:02 +02:00
Frantisek Sumsal 71cde065b5 test: make TEST-21-DFUZZER work in containers
by avoiding fuzzing networkd and timesyncd when running in a container.
2022-06-26 22:06:02 +02:00
Jan Janssen 4e5c39597a sha256: Use stdbool and uintptr_t
This also syncs the copyright blurb with current glibc sources. The
written by line does not appear in upstream, so it should be okay to
remove.
2022-06-24 17:51:17 +01:00
Daan De Meyer c024a6ac96 mkosi: Pull in fix that solves action mirror issue 2022-06-24 16:00:18 +03:00
Yu Watanabe c3613ee51e udev: allow to execute longer command line
Fixes #23607.
2022-06-24 20:09:24 +09:00
Evgeny Vereshchagin f3bd663faf ci: set top-level permissions as well
It should turn on the "restricted" mode by default regardless of
whether the global setting is on or not. New jobs in this action
should have to overwrite it explicitly to gain write access in any
way.

It should also make the action consistent with the other actions
writing various stuff like 'labeler' and 'codeql'.
2022-06-24 20:08:30 +09:00
Evgeny Vereshchagin 1a2620e8bd ci: remove links to "codeless contribution" actions
They refer to actions with script injections running with full
access to repositories.
2022-06-23 20:43:57 +00:00
Jan Janssen c4ba5fef78 boot: Fix calls to ResetSystem
gnu-efi falsely declares a return type for ResetSystem when it should be
void. The spec also says that it never returns, so just assert.
2022-06-23 18:41:35 +02:00
Zbigniew Jędrzejewski-Szmek e5c09aad37 logind: simplify code
Follow-up for 4885d7490b.
2022-06-23 17:55:09 +02:00
Jan Macku 6cacdb3985 github: Issue forms - fix GA SHA1 ref
Fix `SHA1` reference for github action `stefanbuck/github-issue-parser` to
point to correct commit.

Follow-up to: #23811
2022-06-23 17:58:25 +03:00
Jan Macku 632372bcbc github: Issue forms templates follow-up
- Use `SHA1` for actions versioning
- Fix typo: `github-issue-praser` -> `github-issue-parser`
- Define exact permissions

Follow-up to: #23693
2022-06-23 17:22:47 +03:00
Zbigniew Jędrzejewski-Szmek ef88c81bbe
Merge pull request #23802 from yuwata/core-watchdog-follow-ups
core: cleanups for watchdog
2022-06-23 09:59:24 +02:00
Jan Macku 6b16539879 github: Update issue templates to issue forms
Issue forms templates allow us to add automation in place.
This patch replaces old markdown issue templates with new issue forms.
It also adds workflow to automatically mark issues by component label
based on reported data.

This change could help with initial triaging of issues.
2022-06-23 09:47:42 +02:00
David Tardon 4885d7490b logind-session-dbus: allow to set display name via dbus
Currently, the only way to set display name of a graphical session is to
pass it to CreateSession(). But modern display managers like gdm start
the display server as part of the user session, which means that the
display name isn't known yet when the session is being created. Hence,
let's make it possible to set it later.
2022-06-22 22:34:29 +02:00
Jan Janssen 35148e8ff9 bootspec: Add PE file name to log messages
Fixes: #23783
2022-06-23 01:34:28 +09:00
Yu Watanabe 46355675f7
Merge pull request #23774 from yuwata/netlabel-nftset-follow-ups
network, core: revert NFTSet and NetLabel features
2022-06-23 01:33:19 +09:00
Zbigniew Jędrzejewski-Szmek a7b2aa658f
Merge pull request #23806 from keszybz/udevadm-info-pager
Pager for udevadm info
2022-06-22 16:50:53 +02:00
Yu Watanabe a32badc5a6 Revert "networkd: NetLabel integration"
This reverts PR #23269 and its follow-up commit. Especially,
2299b1cae3 (partially), and
3cf63830ac.

The PR was merged without final approval, and has several issues:
- The NetLabel for static addresses are not assigned, as labels are
  stored in the Address objects managed by Network, instead of Link.
- If NetLabel is specified for a static address, then the address
  section will be invalid and the address will not be configured,
- It should be implemented with Request object,
- There is no test about the feature.
2022-06-22 22:34:26 +09:00
Yu Watanabe b48ed70c79 Revert NFTSet feature
This reverts PR #22587 and its follow-up commit. More specifically,
2299b1cae3 (partially),
e176f85527,
ceb46a31a0, and
51bb9076ab.

The PR was merged without final approval, and has several issues:
- OSS fuzz reported issues in the conf parser,
- It calls synchrnous netlink call, it should not be especially in PID1,
- The importance of NFTSet for CGroup and DynamicUser may be
  questionable, at least, there was no justification PID1 should support
  it.
- For networkd, it should be implemented with Request object,
- There is no test for the feature.

Fixes #23711.
Fixes #23717.
Fixes #23719.
Fixes #23720.
Fixes #23721.
Fixes #23759.
2022-06-22 22:23:58 +09:00
Zbigniew Jędrzejewski-Szmek cbef829f80 udevadm info: use pager for all output types
Before we used the pager for --tree, but not e.g. for --export-db.
I don't see any particular reason to limit this.
2022-06-22 14:31:43 +02:00
Zbigniew Jędrzejewski-Szmek b6ec23a01a udevadm info: implement --no-pager 2022-06-22 14:31:42 +02:00
Yu Watanabe 82d7a151db core: close watchdog device if watchdog device is unspecified now
If a watchdog device was specified previously, and unspecified later and
PID1 is reloaded, then we need to close the device.
2022-06-22 16:23:36 +09:00
Yu Watanabe e83c4d178b core: drop unnecessary free
As reset_arguments() frees the string.

Follow-up for 919ea64f69.
2022-06-22 16:21:06 +09:00