1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00
Commit Graph

56565 Commits

Author SHA1 Message Date
Yu Watanabe
c10caebb98 test: skip TEST-17 on ubuntu ppc64el
On Ubuntu CI on ppc64el, the test randomly fails when /run/udev is not
synced before checking its contents (see #22357). But /run/udev is a
tmpfs and fsync on tmpfs is noop (see `struct shmem_file_operations` in
mm/shmem.c of the kernel), hence, it is not necessary to call fsync on
/run/udev in general. This should be a testing emvironment issue (I
guess it is an issue on nested KVM on ppc64el), instead of an issue on
udev.

C.f. #22357.

Fixes #21603.
2022-03-08 17:03:11 +00:00
licunlong
7347b3db83 main: log which process send SIGNAL to PID1
This can help users to figure out what makes systemd freeze.
1. Someone kills systemd accidentally, then the sender_pid won't be 1;
2. systemd triggers segfault or assert, then the sender_pid will be 1;
2022-03-09 00:09:46 +09:00
Zbigniew Jędrzejewski-Szmek
4db62561c2 core: manage SetShowStatus through polkit
When writing docs for SD_BUS_VTABLE_CAPABILITY, I noticed that we have one use
of SD_BUS_VTABLE_CAPABILITY(CAP_SYS_ADMIN) in the tree. This is the default, so
it's not very useful to specify it. But if we're touching that, I think it's
better to use mac + polkit for this like for everything else.

We don't have a very good category for this, but I don't think it makes sense
to add a new one. I just reused the same as other similar calls.
2022-03-08 23:13:36 +09:00
David Bond
e92a3d8fa3 udev: 60-persistent-storage-tape.rules: handle duplicate device ID
Some SCSI tape devices use the same device ID (NAA registered device
designator) for the SCSI tape changer device and the first actual tape
device. For example, this one:

https://docs.oracle.com/en/storage/tape-storage/storagetek-sl150-modular-tape-library/slofs/bridged-tape-drives.html

   You must connect the bridged drive to an HBA supporting multiple
   LUNs (also referred to as LUN scanning). The SL150 Library uses a
   single SCSI ID and two logical unit numbers (LUN). LUN 0 controls
   the tape drive and LUN 1 which is configured as a SCSI medium
   changer device controls the robotics. Data is sent to the remaining
   LUN on the bridged drive or to LUNs on the other, unbridged drives
   in the partition, all of which are configured as SCSI
   sequential-access (tape) devices.

This may lead to errors because /dev/tape/by-id symlinks may sometimes
point to the st device representing the tape, and sometimes to the sg
device representing the changer.

Fix this by assigning an increased priority to the tape device, and creating
a separate -changer link for the SCSI tape changer.

Co-developed-by: Martin Wilck <mwilck@suse.com>
2022-03-08 23:12:10 +09:00
tawefogo
6c5f368646
Fix mic mute on Acer TravelMate B311-31 (#22677) 2022-03-08 23:10:51 +09:00
Zbigniew Jędrzejewski-Szmek
835f79fddd
Merge pull request #22656 from keszybz/portablectl-method2
portable: add return parameter to GetImageMetadataWithExtensions
2022-03-08 13:26:33 +01:00
Luca Boccassi
4f2dba98ad TEST-29: do not pass -q to mk/unsquashfs, not supported on CentOS 8 2022-03-08 18:02:09 +09:00
Ludwig Nussel
ee3d33c415 logind: use mfree instead of freep 2022-03-07 19:43:18 +00:00
Frantisek Sumsal
3a2f1d19d4 ci: make the concurrency group identifier unique once again
Otherwise we end up randomly cancelling once of the two centos_epel
jobs.

Follow-up to da637c8fca.
2022-03-07 19:42:14 +00:00
Luca Boccassi
963c560a29 TEST-29: do not pass -q to mk/unsquashfs, not supported on CentOS 8 2022-03-07 17:05:59 +00:00
Bastien Nocera
d48bf01636 memory-id: Work-around incorrect "Number of slots"
In some BIOSes, the "Number of slots or sockets available for Memory
Devices in this array" is incorrectly set to the number of memory array
that's populated.

Work-around this problem by outputting the number of sockets after
having parsed them so that consumers of this data can carry on expecting
an accurate number in this property.

This fixes the number of memory slots advertised for the HP Z600.

See https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1686
2022-03-07 15:33:26 +00:00
Luca Boccassi
ce3ca32cb9 NEWS: note GetMetadataWithExtensions backward incompatible change 2022-03-07 14:49:54 +00:00
Zbigniew Jędrzejewski-Szmek
087a799f64 portable: add return parameter to GetImageMetadataWithExtensions
The complaint was that the output array was used for two kinds of data, and the
input flag decided whether this extra data should be included. The flag is
removed, and instead the old method is changed to include the data always as
a separate parameter.

This breaks backward compatibility, but  the old method is effectively broken
and does not appear to be used yet, at least in open source code, by
searching on codesearch.debian.net and github.com.

Fixes #22404.

Co-authored-by: Luca Boccassi <bluca@debian.org>
2022-03-07 14:49:54 +00:00
Daan De Meyer
da637c8fca mkosi: Add CentOS Stream 9
The blocker causing Stream 9 builds to fail was fixed
(https://bugzilla.redhat.com/show_bug.cgi?id=2056276) so we can add
CentOS Stream 9 builds as well now.
2022-03-07 14:30:49 +00:00
Zbigniew Jędrzejewski-Szmek
6d6104e0c9 docs: add more links for portabled 2022-03-07 14:32:16 +01:00
Zbigniew Jędrzejewski-Szmek
90e3f3581d portable: inline one variable declaration 2022-03-07 14:32:01 +01:00
Zbigniew Jędrzejewski-Szmek
573e33de07 portablectl: reorder if branches to match previous conditional in the same function
One is a ternary op, the other an normal conditional, but they should still use
the same order of branches.
2022-03-07 14:31:48 +01:00
Zbigniew Jędrzejewski-Szmek
13391986b5 TEST-29: trim output a bit
IIUC, pipefail doesn't matter for a sequence of commands joined with &&, and we
don't have any pipes. And such a failing expression also does not trigger an
exit, so the set +e/set -e were noops.
2022-03-07 14:31:36 +01:00
4piu
19a04e8071 Add support for NEC VersaPro VG-S
The brightness control key (Fn+F7 Fn+F8) and touchpad toggle key (Fn + Space) do not work on the NEC VersaPro VG-S laptop. Add the keycode to fix the problem.
2022-03-07 12:07:26 +00:00
Yu Watanabe
a17e54783a tree-wide: fix typo 2022-03-07 15:32:22 +09:00
Frantisek Sumsal
55c09511e1 test: check systemd RPM macros
Make sure our RPM macros work as intended. Based on the original PR
(#16464) by Mikhail Novosyolov.

Co-authored-by: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
2022-03-06 13:07:20 +09:00
Zbigniew Jędrzejewski-Szmek
af5e1c5bd1
Merge pull request #22663 from keszybz/various-man-page-bits
Various man page bits
2022-03-04 18:16:46 +01:00
Zbigniew Jędrzejewski-Szmek
367a5e8a67 journalctl: advertise --header a bit more
Fixes #2738.
2022-03-04 16:44:02 +01:00
Zbigniew Jędrzejewski-Szmek
c1d1742a7f man: describe UNIT=/USER_UNIT=
Fixes 17538.
2022-03-04 16:44:02 +01:00
Zbigniew Jędrzejewski-Szmek
55fabe92e2 man: tweak description of auto/noauto
I think the current behaviour is stupid: 'x-systemd.automount,noauto' should
mean that we create the units, but don't add .mount or .automount to any targets.
Instead, we completely ignore 'noauto'. But let's at least describe the
implementation.

Text suggested by dpartrid in the bug.

Fixes #21040.
2022-03-04 16:07:19 +01:00
Zbigniew Jędrzejewski-Szmek
b4e7d7555e man: describe capability checks on the bus
A description of SD_BUS_VTABLE_CAPABILITY is added, and the discussion
on SD_BUS_VTABLE_UNPRIVILEGED in expanded. I think it would be nice
to add longer description of how access is checked (maybe in sd-bus(3)),
but I'm leaving that for later. I think the text that was added here
describes everything, even if tersely.

Fixes #21882.
2022-03-04 15:43:18 +01:00
Zbigniew Jędrzejewski-Szmek
3c080282e9 man: fix formatting of macros in sd_bus_add_object
docbook would convert the newline to a space before the first argument:
  SD_BUS_METHOD_WITH_ARGS( member, args, result, handler)

And we need each item in a separate <para>, otherwise they'll all be in
one line.
2022-03-04 15:23:17 +01:00
Zbigniew Jędrzejewski-Szmek
382586894b man: say that we ignore ignored options
Fixes #22057.
2022-03-04 14:13:56 +01:00
Zbigniew Jędrzejewski-Szmek
46d362f406 man: drop outdated info about polkit in pid1
Fixes #22648.
2022-03-04 14:03:50 +01:00
David Tardon
203ea2c8f1 devnode-acl: use _cleanup_ to free acl_t 2022-03-04 11:51:48 +01:00
Alfonso Sánchez-Beato
178d598b5f sd-stub: do not print warning if filesystem is not supported
Do not print a warning in case we try to load the file system protocol for an
unsupported file system, just return EFI_SUCCESS instead.
2022-03-03 23:14:45 +00:00
Zbigniew Jędrzejewski-Szmek
f05a288135
Merge pull request #22644 from keszybz/meson-no-split
Use normal lists in meson instead of splitting on whitespace
2022-03-03 23:10:14 +01:00
Tobias Stoeckmann
1a823cdeb9 core: check size before mmap
The data type off_t can be 64 on 32 bit systems if they have large
file support. Since mmap expects a size_t with 32 bits as second
argument truncation could occur. At worst these huge files could
lead to mmaps smaller than the previous check for small files.

This in turn shouldn't have a lot of impact because mmap allocates
at page size boundaries. This also made the PAGE_ALIGN call in
open_mmap unneeded. In fact it was neither in sync with other mmap
calls nor with its own munmap counterpart in error path.

If such large files are encountered, which is very unlikely in these
code paths, treat them with the same error as if they are too small.
2022-03-03 22:48:43 +01:00
Lennart Poettering
94ce42bcb6 killall: show PID of processes killed in final killing spree
Let's show the PID of killed processes in all cases, to make debugging
easier.

See: https://lists.freedesktop.org/archives/systemd-devel/2022-March/047504.html
2022-03-03 22:45:47 +01:00
Zbigniew Jędrzejewski-Szmek
2f492a739c meson: move files' closing brace to separate line 2022-03-03 12:14:13 +01:00
Luca Boccassi
3a0692e3a8
Merge pull request #22522 from lnussel/fix_logind_restart
logind: load scheduled shutdown on restart
2022-03-02 17:58:53 +00:00
Zbigniew Jędrzejewski-Szmek
b9acb5074e meson: use files() for libudevd_core_sources too
I'm not sure why a plain-text list was used in this case.
2022-03-02 14:52:50 +01:00
Zbigniew Jędrzejewski-Szmek
f1b98127ff meson: do not use split() in file lists
The approach to use '''…'''.split() instead of a list of strings was initially
used when converting from automake because it allowed identical blocks of lines
to be used for both, making the conversion easier.

But over the years we have been using normal lists more and more, especially
when there were just a few filenames listed. This converts the rest.

No functional change.
2022-03-02 14:49:32 +01:00
dependabot[bot]
82e4b0305b build(deps): bump meson from 0.60.3 to 0.61.2 in /.github/workflows
Bumps [meson](https://github.com/mesonbuild/meson) from 0.60.3 to 0.61.2.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/0.60.3...0.61.2)

---
updated-dependencies:
- dependency-name: meson
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-02 11:57:21 +00:00
dependabot[bot]
fd4747d924 build(deps): bump github/codeql-action from 1.0.29 to 1.1.3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1.0.29 to 1.1.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](384cfc42b2...75f07e7ab2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-02 11:56:44 +00:00
dependabot[bot]
8b94bcbd04 build(deps): bump actions/labeler from 3.0.2 to 3.1.0
Bumps [actions/labeler](https://github.com/actions/labeler) from 3.0.2 to 3.1.0.
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](69da01b8e0...3d612d72e6)

---
updated-dependencies:
- dependency-name: actions/labeler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-02 11:56:24 +00:00
Daan De Meyer
ee48779e05 shared: Add more dlopen() tests
Add dlopen_dw(), dlopen_elf() and dlopen_pcre2() to the dlopen test.
To enable adding dlopen_pcre2(), we move pcre2-dlopen.h/c from
src/journal to src/shared.
2022-03-01 21:07:17 +00:00
Josh Triplett
c8aeb9d672 file-hierarchy: Document /sys/fs/cgroup
file-hierarchy does not mention anything about the expected mountpoint
for cgroups. This may lead some software to believe it will need to
search for it (e.g. by scanning mountinfo) rather than just looking in
the canonical location.

Document the canonical mountpoint as /sys/fs/cgroup. Also provide
information on the non-default configurations, but
make it clear that in such configurations if cgroup2 is mounted (hybrid
mode) it won't have resource controllers attached. This will help
software know if it should fall back to /sys/fs/cgroup/unified or just
ignore that case.
2022-03-01 08:34:08 +01:00
Ludwig Nussel
00886e06e8 systemctl: use action_table for scheduling shutdown
The fall-through to reboot doesn't seem to make sense. It won't happen
in the current code. Filtering the actions on client side is not needed
either as the server will refuse unsupported operations anyway.
2022-02-28 11:29:45 +01:00
Ludwig Nussel
aa6123e85e logind: load scheduled shutdown on restart
Make sure logind doesn't forget about a scheduled shutdown, even if it
gets restarted eg due to a package update.
2022-02-28 11:29:45 +01:00
Zbigniew Jędrzejewski-Szmek
ee6fd6a509 man: recommend built-in platform.freedesktop_os_release() in our page
Python gained support for reading os-release, let's advertise it a bit more.
Our open-coded example is still useful, but let's not suggest it as the
default implementation.

I added quotes around the printed string because it looks a bit better
this way.
2022-02-28 09:52:17 +00:00
Ludwig Nussel
9fa9c66dbd logind: fix handle_action_valid() 2022-02-28 10:31:10 +01:00
Luca Boccassi
ba119ffcf9
Merge pull request #22627 from yuwata/network-l2tp-cleanups
network: cleanups for L2TP tunnel
2022-02-27 18:01:14 +00:00
Yu Watanabe
3d24b0ddd8 network: netdev: drop unused creation type NETDEV_CREATE_AFTER_CONFIGURED 2022-02-27 09:36:48 +09:00
Yu Watanabe
0c91c7a241 network: l2tp: change create type to independent
L2TP tunnel does not have underlying interface. Let's change its type to
independent.
2022-02-27 09:36:48 +09:00