1
0
mirror of https://github.com/systemd/systemd synced 2025-11-21 09:44:44 +01:00

Compare commits

...

12 Commits

Author SHA1 Message Date
Antonio Alvarez Feijoo
a35780d5d0 creds: fix return type from normalize_separator()
Follow-up for 097374f3b904e0649db8b0385b3ee66e1bf0a7d6
2025-10-09 12:09:06 +01:00
Lennart Poettering
bdcfd54b1a
hwdb.d/70-mouse.hwdb: Add Nulea M501 trackball flags for USB Dongle + Bluetooth (#39241)
Adds an entry for the Nulea M501 trackball in both USB and Bluetooth
mode, such that it is correctly recognised as a trackball.

Note added to flag a potential issue arise with other mouse using the
same dongle w/ generic name.

Initially noted in #39230
2025-10-09 09:40:41 +02:00
Jelle van der Waa
c6ebb98e3c logind: emit PropertiesChanged when lingering is enabled/disabled
Cockpit's podman plugin needs to know the lingering status so the UI can
advertise enabling `podman-restart` (which depends on lingering to
work). Currently it relies on watching `/var/lib/systemd/linger/${user}`
but that isn't a public API.

Related: #22244
2025-10-09 09:39:45 +02:00
Lennart Poettering
03936a55a1
docs: two clarifications for release process (#39246)
doc was slightly out of sync with current practice, so update it to
match
2025-10-09 09:37:23 +02:00
Justin Kromlinger
0fe45b98dd Drop machine-id OSC event field if /etc/machine-id doesn't exist
While we can safely assume that `/proc/sys/kernel/random/boot_id`
exists, the same can't be said for `/etc/machine-id` in environments
where systemd is installed, but not running. An example would be OCI
containers like with the official Arch Linux image, see [0].

Without this check the prompt would constantly output `/etc/machine-id:
no such file or directory` with the OSC events introduced in dadbb34
(v258).

[0] https://gitlab.archlinux.org/archlinux/archlinux-docker/-/issues/107
2025-10-09 09:08:13 +02:00
Lennart Poettering
b97fccf0ce man: fix description of .membership files
First, let's say "must" rather than "shall" regarding creation of these
files, because without them group memberships will not work.

Secondly, suggest placing an empty JSON object in them, rather than
making them empty, simply to avoid issues with older systems that didn't
backport d6570eafe3b86584ca42979d1ced5bfd2228a5c7.

Fixes: #38943
2025-10-09 06:32:59 +02:00
helpvisa
b12cd57f6d
remove bonus line 2025-10-08 07:18:48 -04:00
Luca Boccassi
5b45dd60cf docs: document creating new CI branch for the new stable branch after a release 2025-10-08 11:00:06 +01:00
Luca Boccassi
5d946798ba docs: document uploading manpages for new dev version after release
This adds the new 'in development' section to the drop-down menu
2025-10-08 10:56:43 +01:00
Daniel Brackenbury
2dc0e6cd73
remove extra space from new hwdb.d/70-mouse.hwdb entries to fix failing test 2025-10-07 18:55:57 -04:00
Daniel Brackenbury
6dfbaa8063
add comment to 70-mouse.hwdb regarding generic name for Nulea M501 USB dongle 2025-10-07 18:04:56 -04:00
Daniel Brackenbury
9dde7d9ae8
Add Nulea M501 trackball to hwdb 2025-10-07 18:00:57 -04:00
9 changed files with 37 additions and 12 deletions

View File

@ -26,8 +26,11 @@ SPDX-License-Identifier: LGPL-2.1-or-later
17. Update IRC topic (`/msg chanserv TOPIC #systemd Version NNN released | Online resources https://systemd.io/`) 17. Update IRC topic (`/msg chanserv TOPIC #systemd Version NNN released | Online resources https://systemd.io/`)
18. [FINAL] Create an empty -stable branch: `git push systemd origin/main:refs/heads/v${version}-stable`. 18. [FINAL] Create an empty -stable branch: `git push systemd origin/main:refs/heads/v${version}-stable`.
19. [FINAL] Build and upload the documentation (on the -stable branch): `ninja -C build doc-sync` 19. [FINAL] Build and upload the documentation (on the -stable branch): `ninja -C build doc-sync`
20. [FINAL] Change the Github Pages branch to the newly created branch (https://github.com/systemd/systemd/settings/pages) and set the 'Custom domain' to 'systemd.io' 20. [FINAL] Create a new `ci/v${version}-stable` branch for deb package builds on https://salsa.debian.org/systemd-team/systemd
21. [FINAL] Update version number in `meson.version` to the devel version of the next release (e.g. from `256` to `257~devel`) 21. [FINAL] Switch `.semaphore/semaphore-runner.sh` and `mkosi/mkosi.conf.d/debian-ubuntu/mkosi.conf.d/pkgenv.conf` to the new `ci/v${version}-stable` branch on the -stable branch
22. [FINAL] Change the Github Pages branch to the newly created branch (https://github.com/systemd/systemd/settings/pages) and set the 'Custom domain' to 'systemd.io'
23. [FINAL] Update version number in `meson.version` to the devel version of the next release (e.g. from `256` to `257~devel`)
24. [FINAL] Build and upload the documentation (on the main branch): `ninja -C build doc-sync`
# Steps to a Successful Stable Release # Steps to a Successful Stable Release

View File

@ -821,6 +821,20 @@ mouse:usb:v22d4p1308:name:Laview Technology Mionix Avior 7000:*
mouse:usb:v0e8fp00a7:name:DaKai 2.4G RX:* mouse:usb:v0e8fp00a7:name:DaKai 2.4G RX:*
MOUSE_DPI=*800@126 1600@126 MOUSE_DPI=*800@126 1600@126
##########################################
# Nulea
##########################################
# Note: it is possible that other devices may use the same wireless dongle,
# as such this could require revisiting if it causes issues with other mice
# Nulea M501 Wireless Trackball (USB Receiver)
mouse:usb:v25a7pfa61:name:Compx 2.4G Receiver Mouse:*
ID_INPUT_TRACKBALL=1
# Nulea M501 Wireless Trackball (Bluetooth)
mouse:bluetooth:v000ep3412:name:Nulea BT5.0 Mouse:*
ID_INPUT_TRACKBALL=1
########################################## ##########################################
# Oklick # Oklick
########################################## ##########################################

View File

@ -98,11 +98,12 @@ lrwxrwxrwx. 1 root root 19 May 10 4711.user-privileged -> foobar.user-privileg
users in groups. Specifically, for every pair of user/group where the user shall be a member of a group a users in groups. Specifically, for every pair of user/group where the user shall be a member of a group a
file named file named
<literal><replaceable>username</replaceable>:<replaceable>groupname</replaceable>.membership</literal> <literal><replaceable>username</replaceable>:<replaceable>groupname</replaceable>.membership</literal>
should be created, i.e. the textual UNIX user name, followed by a colon, followed by the textual UNIX must be created, i.e. the textual UNIX user name, followed by a colon, followed by the textual UNIX group
group name, suffixed by <literal>.membership</literal>. The contents of these files are currently not name, suffixed by <literal>.membership</literal>. The contents of these files are currently not read,
read, and the files should be created empty. The mere existence of these files is enough to affect a however it is recommended to create them containing an empty JSON object
user/group membership. If a program provides user and/or group record files in the searched directories, (i.e. <literal>{}</literal>). The mere existence of these files is enough to affect a user/group
it should always also create such files, both for primary and auxiliary group memberships.</para> membership. If a program provides user and/or group record files in the searched directories, it must
always also create such files, both for primary and auxiliary group memberships.</para>
<para>Note that static user/group records generally do not override conflicting records in <para>Note that static user/group records generally do not override conflicting records in
<filename>/etc/passwd</filename> or <filename>/etc/group</filename> or other account databases. In fact, <filename>/etc/passwd</filename> or <filename>/etc/group</filename> or other account databases. In fact,

View File

@ -1067,7 +1067,6 @@ node /org/freedesktop/login1/user/_1000 {
readonly b IdleHint = ...; readonly b IdleHint = ...;
readonly t IdleSinceHint = ...; readonly t IdleSinceHint = ...;
readonly t IdleSinceHintMonotonic = ...; readonly t IdleSinceHintMonotonic = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("false")
readonly b Linger = ...; readonly b Linger = ...;
}; };
interface org.freedesktop.DBus.Peer { ... }; interface org.freedesktop.DBus.Peer { ... };

View File

@ -24,7 +24,10 @@ __systemd_osc_context_escape() {
} }
__systemd_osc_context_common() { __systemd_osc_context_common() {
printf ";user=%s;hostname=%s;machineid=%s;bootid=%s;pid=%s" "$USER" "$HOSTNAME" "$(</etc/machine-id)" "$(</proc/sys/kernel/random/boot_id)" "$$" if [ -f /etc/machine-id ]; then
printf ";machineid=%s" "$(</etc/machine-id)"
fi
printf ";user=%s;hostname=%s;bootid=%s;pid=%s" "$USER" "$HOSTNAME" "$(</proc/sys/kernel/random/boot_id)" "$$"
} }
__systemd_osc_context_precmdline() { __systemd_osc_context_precmdline() {

View File

@ -1232,7 +1232,7 @@ static int settle_scope(
return 0; return 0;
} }
static bool normalize_separator(char c) { static char normalize_separator(char c) {
if (IN_SET(c, '-', '+', '_')) if (IN_SET(c, '-', '+', '_'))
return '_'; return '_';

View File

@ -1668,6 +1668,7 @@ static int method_set_user_linger(sd_bus_message *message, void *userdata, sd_bu
return r; return r;
if (manager_add_user_by_uid(m, uid, &u) >= 0) { if (manager_add_user_by_uid(m, uid, &u) >= 0) {
(void) user_send_changed(u, "Linger");
r = user_start(u); r = user_start(u);
if (r < 0) { if (r < 0) {
user_add_to_gc_queue(u); user_add_to_gc_queue(u);
@ -1685,6 +1686,7 @@ static int method_set_user_linger(sd_bus_message *message, void *userdata, sd_bu
/* Make sure that disabling lingering will terminate the user tracking if no sessions pin it. */ /* Make sure that disabling lingering will terminate the user tracking if no sessions pin it. */
u->gc_mode = USER_GC_BY_PIN; u->gc_mode = USER_GC_BY_PIN;
user_add_to_gc_queue(u); user_add_to_gc_queue(u);
(void) user_send_changed(u, "Linger");
} }
} }

View File

@ -367,7 +367,7 @@ static const sd_bus_vtable user_vtable[] = {
SD_BUS_PROPERTY("IdleHint", "b", property_get_idle_hint, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE), SD_BUS_PROPERTY("IdleHint", "b", property_get_idle_hint, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
SD_BUS_PROPERTY("IdleSinceHint", "t", property_get_idle_since_hint, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE), SD_BUS_PROPERTY("IdleSinceHint", "t", property_get_idle_since_hint, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
SD_BUS_PROPERTY("IdleSinceHintMonotonic", "t", property_get_idle_since_hint, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE), SD_BUS_PROPERTY("IdleSinceHintMonotonic", "t", property_get_idle_since_hint, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
SD_BUS_PROPERTY("Linger", "b", property_get_linger, 0, 0), SD_BUS_PROPERTY("Linger", "b", property_get_linger, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
SD_BUS_METHOD("Terminate", NULL, NULL, bus_user_method_terminate, SD_BUS_VTABLE_UNPRIVILEGED), SD_BUS_METHOD("Terminate", NULL, NULL, bus_user_method_terminate, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD_WITH_ARGS("Kill", SD_BUS_METHOD_WITH_ARGS("Kill",

View File

@ -590,7 +590,10 @@ testcase_list_users_sessions_seats() {
assert_eq "$(loginctl list-users --no-legend | awk '$2 == "logind-test-user" { print $3 }')" no assert_eq "$(loginctl list-users --no-legend | awk '$2 == "logind-test-user" { print $3 }')" no
assert_eq "$(loginctl list-users --no-legend | awk '$2 == "logind-test-user" { print $4 }')" active assert_eq "$(loginctl list-users --no-legend | awk '$2 == "logind-test-user" { print $4 }')" active
loginctl enable-linger logind-test-user systemd-run --quiet --service-type=notify --unit=test-linger-signal-wait --pty \
-p Environment=SYSTEMD_LOG_LEVEL=debug \
-p ExecStartPost="loginctl enable-linger logind-test-user" \
busctl --timeout=30 wait "/org/freedesktop/login1/user/_$(id -ru logind-test-user)" org.freedesktop.DBus.Properties PropertiesChanged | grep -qF '"Linger" b true'
assert_eq "$(loginctl list-users --no-legend | awk '$2 == "logind-test-user" { print $3 }')" yes assert_eq "$(loginctl list-users --no-legend | awk '$2 == "logind-test-user" { print $3 }')" yes
for s in $(loginctl list-sessions --no-legend | grep tty | awk '$3 == "logind-test-user" { print $1 }'); do for s in $(loginctl list-sessions --no-legend | grep tty | awk '$3 == "logind-test-user" { print $1 }'); do