1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 00:51:24 +03:00
Commit Graph

51666 Commits

Author SHA1 Message Date
Yu Watanabe
f318f64388 sd-netlink: do not enable dump flag by default for RTM_GETADDR message 2021-05-25 08:26:00 +09:00
Yu Watanabe
97bb863c25 sd-netlink: do not append prefixlen by default
Otherwise, when NETLINK_GET_STRICT_CHK socket option is enabled, no
address will be dumped.
2021-05-25 08:26:00 +09:00
Yu Watanabe
5aafd5b190 network: add several assertions in conf parsers 2021-05-25 07:12:05 +09:00
Yu Watanabe
f0c09831bd network: allow to set Group=0 in [Link] section
Previously, when a link has already in a numbered group, we cannot
remove the link from the group.

This also fixes the range mentioned in the man page.
2021-05-25 07:12:05 +09:00
наб
44230fa2b0
kernel-install: don't erase previous errors if a hook returns 77
The manpage says that exiting 77 is the same as exiting 0,
then skipping all other hooks, but the behaviour heretofor
was to exit 0, skip all, and behave as if all hooks exited 0
2021-05-24 21:56:35 +02:00
Zbigniew Jędrzejewski-Szmek
82855aa610 sysusers: make sysusers work with dnf --installroot
This is not very pretty, but the code in fs-util.c already provisions for
missing /proc. We ourselves are careful to set up /proc, but not everybody
is and it is important for sysusers to also work where shadow-utils would:
I would like to replace calls to useradd and groupadd in Fedora systemd rpm
scriptlets with a call to sysusers. It has a number of advantages:
- dogfooding
- we don't need to manually duplicate the information from our sysusers
  files to scriptlets
- a dependency on shadow-utils is dropped, which transitively drops dependencies
  on setup and fedora-repos and bunch of other stuff.

We could try to get 'dnf' and 'rpm --root' and such to be reworked,
but not in any reasonable timeframe. And even if this was done, we'd still
want to support older rpm/dnf versions.
2021-05-24 21:41:24 +02:00
Zbigniew Jędrzejewski-Szmek
0520564dcf basic: allow copy_rights() to work without mounted /proc
This will be used in sysusers later on.
2021-05-24 21:41:22 +02:00
Zbigniew Jędrzejewski-Szmek
335f6ab4f1 sysusers: add debug lines to failing getent/putent operations
I'm trying to use systemd-sysusers for systemd.rpm itself, and the invocation
in dnf chroot is failing like this:
...
Creating group input with gid 999.
Creating group kvm with gid 36.
Creating group render with gid 998.
Creating group sgx with gid 997.
Creating group systemd-journal with gid 190.
Creating group systemd-network with gid 192.
Creating user systemd-network (systemd Network Management) with uid 192 and gid 192.
Creating group systemd-oom with gid 996.
Creating user systemd-oom (systemd Userspace OOM Killer) with uid 996 and gid 996.
Creating group systemd-resolve with gid 193.
Creating user systemd-resolve (systemd Resolver) with uid 193 and gid 193.
Creating group systemd-timesync with gid 995.
Creating user systemd-timesync (systemd Time Synchronization) with uid 995 and gid 995.
Creating group systemd-coredump with gid 994.
Creating user systemd-coredump (systemd Core Dumper) with uid 994 and gid 994.
Failed to write files: Function not implemented

Let's add more info to make such failures easier to debug.
2021-05-24 21:41:10 +02:00
Zbigniew Jędrzejewski-Szmek
62d1c93a02 sysusers: reduce scope of variables and drop unnecessary initializations 2021-05-24 21:39:04 +02:00
наб
0ad401dc5d
kernel-install/90-loaderentry: use install(1) instead of cp/chown/chmod chains
Also fix typo in error message
2021-05-24 21:35:12 +02:00
Roshan Shariff
07c0e5eeaf rules.d: Properly quote $env{MODALIAS}
Add quotes around use of $env{MODALIAS} in rules.d/80-drivers.rules. The
 modalias can contain whitespace, for example when it is dynamically generated
 using device or vendor IDs.
2021-05-24 18:40:01 +01:00
Vincent Dechenaux
f0c7e594ed Typo in service.c
use => user
2021-05-24 14:47:29 +02:00
наб
8a2f7b7c9b
man: we is OK too -> which is OK too (#19708) 2021-05-24 18:39:38 +09:00
Zbigniew Jędrzejewski-Szmek
341d883ad6
Merge pull request #19701 from yuwata/network-udev-do-not-manage-loopback-interfaces
udev: do not manage loopback interfaces
2021-05-24 07:26:18 +02:00
Yu Watanabe
113d94c393
Merge pull request #19704 from yuwata/network-small-fixes
network: several tiny cleanups
2021-05-23 23:02:07 +09:00
Yu Watanabe
70f32a260b udev/net: do not manage loopback interfaces
There are nothing we can configure in udevd for loopback interfaces;
no ethertool configs can be applied, MAC address, interface name should
not be touched.
2021-05-23 22:58:47 +09:00
Yu Watanabe
f25e642bca sd-netlink: rename rtnl_get_link_iftype() -> rtnl_get_link_info() and make it optionally return link flags 2021-05-23 22:58:03 +09:00
Yu Watanabe
ce01c07f1c udev/net: rename link_config -> LinkConfig 2021-05-23 22:58:03 +09:00
Yu Watanabe
afca7ac13d udev/net: rename link_config_ctx -> LinkConfigContext 2021-05-23 22:58:03 +09:00
Yu Watanabe
75d5abd298 network: IPv6LinkLocalAddressGenerationMode=none disables IPv6LL addressing 2021-05-23 17:13:06 +09:00
Yu Watanabe
c3b9425130 network: make link_configure() static 2021-05-23 17:12:48 +09:00
Yu Watanabe
fbb1a39866 ordered-set: introduce ordered_set_get() 2021-05-23 17:12:40 +09:00
Yu Watanabe
2a5a844259
Merge pull request #19681 from yuwata/ethtool-util-log
ethtool-util: several cleanups
2021-05-23 15:24:46 +09:00
Yu Watanabe
3ee316bd7b ethtool-util: drop unused function 2021-05-23 11:40:15 +09:00
Yu Watanabe
80662eecbf udev/net: drop unnecessary conditions 2021-05-23 11:40:15 +09:00
Yu Watanabe
a7994dd3ab udev/net: drop fallback logic to set speed
ethtool_set_glinksettings() already fallback to use ETHTOOL_GSET/ETHTOOL_SSET
commands when ETHTOOL_GLINKSETTINGS/ETHTOOL_SLINKSETTINGS are not
supported.
2021-05-23 11:40:15 +09:00
Yu Watanabe
ba1030594e ethtool-util: do not touch anything if nothing is requested
And update settings only when it is necessary.
2021-05-23 11:40:15 +09:00
Yu Watanabe
c8e644b116 ethtool-util: disable autonegotiation when speed, duplex, or port is specified
And if autonegotiation is enabled, speed, duplex, and port are ignored.

Fixes #19625.
2021-05-23 11:40:15 +09:00
Yu Watanabe
4323046c5f ethtool-util: move and rebreak comments 2021-05-23 11:40:15 +09:00
Yu Watanabe
4f5040313d ethtool-util: make ethtool_connect() open fd only when it is not opened 2021-05-23 11:39:56 +09:00
Luca Boccassi
986cdba9f8
Merge pull request #19697 from jwrdegoede/hwdb-more-accel-quirks
Hwdb more accel quirks
2021-05-22 23:57:18 +01:00
Luca Boccassi
d1cb55e6e4
Merge pull request #19700 from keszybz/check-os-release-fixups
Fixups for man/check-os-release.*
2021-05-22 23:56:59 +01:00
Hans de Goede
82de3fc6a4 hwdb: keyboard: Ignore duplicate atkbd keypresses on touchpad on/off toggle
The atkbd device on the Lenovo Yoga 300-11IBR 2-in-1 sends unknown
keycodes when the touchpad is toggled on/off:

[ 1918.995562] atkbd serio0: Unknown key pressed (translated set 2, code 0x63 on isa0060/serio0).
[ 1918.995610] atkbd serio0: Use 'setkeycodes 63 <keycode>' to make it known.
[ 1919.032121] atkbd serio0: Unknown key released (translated set 2, code 0x63 on isa0060/serio0).
[ 1919.032135] atkbd serio0: Use 'setkeycodes 63 <keycode>' to make it known.
[ 1926.098414] atkbd serio0: Unknown key pressed (translated set 2, code 0x62 on isa0060/serio0).
[ 1926.098461] atkbd serio0: Use 'setkeycodes 62 <keycode>' to make it known.
[ 1926.146537] atkbd serio0: Unknown key released (translated set 2, code 0x62 on isa0060/serio0).
[ 1926.146583] atkbd serio0: Use 'setkeycodes 62 <keycode>' to make it known.

The "Ideapad extra buttons" driver alreadys sends f22 / f23 key-events
when the touchpad is toggles off, so map the keycodes for the duplicate
atkbd events to unknown to silence these kernel warnings.
2021-05-22 20:50:36 +02:00
Zbigniew Jędrzejewski-Szmek
91da09bd1a man/check-os-release.*: allow ID_LIKE to have multiple values
I missed the fact that it is documented to be a space-separated list.
2021-05-22 20:44:04 +02:00
Zbigniew Jędrzejewski-Szmek
82ca34e6e6 man/check-os-release.py: ignore comment and empty lines
Plus fix off-by-one in error printing.
2021-05-22 20:44:04 +02:00
Hans de Goede
f769f9d095 hwdb: Add accel orientation quirk for the Lenovo Yoga 300-11IBR 2-in-1
Add a quirk for the accelerometer orientation and location for the
2 accelerometers inside the Lenovo Yoga 300-11IBR 2-in-1.
2021-05-22 16:22:36 +02:00
Lennart Poettering
83a04afc06
Merge pull request #19686 from keszybz/os-release-modernization-and-examples
os-release modernization and examples
2021-05-22 14:44:50 +02:00
Lennart Poettering
4c483e2647
Merge pull request #19693 from poettering/sleep-tweaks
sleep code refactoring + automatic fallback from hybrid sleep to suspend
2021-05-22 14:35:26 +02:00
Zbigniew Jędrzejewski-Szmek
412339835e man/check-os-release.py: strip trailing whitespace
The shell parser would do that, so so should we.
2021-05-22 12:20:51 +02:00
Zbigniew Jędrzejewski-Szmek
c0527e1f95 man: say that initrd-release is like os-release 2021-05-22 12:20:51 +02:00
Hans de Goede
eb281f3eff hwdb: Add accel orientation quirk for the KD Kurio Smart C15200 tablet
Add a quirk to fix the accelerometer orientation on the
KD Kurio Smart C15200 tablet.
2021-05-22 12:13:42 +02:00
Lennart Poettering
c3565fe81f sleep: clarify that failure setting env var is not fatal 2021-05-22 11:00:04 +02:00
Lennart Poettering
3d1321117e sleep: if hybrid sleep fails, do regular suspend
Fixes #19550
2021-05-22 11:00:04 +02:00
Lennart Poettering
b0c035e3c8 sleep: remove duplicate logging
execute() logs about all errors, hence only log about what's new, i.e.
what we'll do as consequence, and don't mention the error cause again.
2021-05-22 11:00:04 +02:00
Lennart Poettering
887b2019b6 sleep: don't check for EADV
EADV is not generated anymore since
6d176522f5, let's hence not check for it
anymore.
2021-05-22 11:00:00 +02:00
Lennart Poettering
61dc84817e sleep: can_sleep_state() + can_sleep_disk() don#t return plain booleans 2021-05-22 11:00:00 +02:00
Lennart Poettering
c8cd8ca398 sleep: use SleepOperation enum everywhere and drop sleep_settings()
Instead of comparing strings everywhere, let's use the new enum. This
allows us to drop sleep_settings(), since the operation enum can be
directly used as index into the config settings.

Some minor other refactoring is done, but mostly just shifting thing
around a bit, no actual change in behaviour.
2021-05-22 11:00:00 +02:00
Lennart Poettering
be2a4b0d7e sleep: introduce high-level SleepOperation enum 2021-05-22 10:58:22 +02:00
Lennart Poettering
86204ae145 units: make sure importd has CAP_LINUX_IMMUTABLE flag
Since d8f9686c0f we use the chattr +i flag
for marking containers in directories as reead-only. But to do so we
need the cap for it, hence grant it.

Fixes: #19115
2021-05-22 16:02:02 +09:00
Yu Watanabe
af92e46527
Merge pull request #19594 from yuwata/network-nexthop-group
network: nexthop: add Group= setting to configure multipath route with group nexthop
2021-05-22 16:01:13 +09:00