]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agoUSER_RECORD: fix typo
Lennart Poettering [Tue, 16 Jun 2020 14:10:37 +0000 (16:10 +0200)] 
USER_RECORD: fix typo

Fixes: #16172
3 years agoupdate TODO
Lennart Poettering [Tue, 16 Jun 2020 12:38:23 +0000 (14:38 +0200)] 
update TODO

3 years agoREADME: add reference to systemd.io
Lennart Poettering [Tue, 16 Jun 2020 09:37:06 +0000 (11:37 +0200)] 
README: add reference to systemd.io

3 years agoupdate TODO
Lennart Poettering [Tue, 16 Jun 2020 09:42:16 +0000 (11:42 +0200)] 
update TODO

3 years agohwdb: Mask rfkill event from intel-hid on HP platforms
Kai-Heng Feng [Thu, 11 Jun 2020 13:32:12 +0000 (21:32 +0800)] 
hwdb: Mask rfkill event from intel-hid on HP platforms

HP spec mandates the hp-wireless driver as canonical source of rfkill
event, so mask the rfkill event from intel-hid to avoid double rfkill
events fired from a single hotkey press.

3 years agosd-boot: Work around malformed CR key code
Paul Cercueil [Sun, 14 Jun 2020 10:51:36 +0000 (12:51 +0200)] 
sd-boot: Work around malformed CR key code

When a key is pressed, the EFI firmware gives us a 64-bit word that
contains the modifier key code in the upper 32 bits, the scan code in
the middle 16 bits, and a unicode character in the low 16 bits.

Some bogus EFI firmwares will put the unicode character in the scan code
area, for instance on the EZpad mini 4s tablet.

Others will even put the unicode character in both the scan code and
unicode areas. This is the case for instance on the Teclast X98+ II
tablet.

Add workarounds for these corner cases, only for the carriage return key
right now. Some more workarounds may be needed, e.g. for volume keys,
but I cannot test it.

Partially fixes #8466.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
3 years agohwdb: Add accel orientation quirk for Odys Fusion Win 12 2in1
AndreRH [Sat, 13 Jun 2020 14:48:53 +0000 (16:48 +0200)] 
hwdb: Add accel orientation quirk for Odys Fusion Win 12 2in1

3 years agoMerge pull request #16170 from keszybz/man-user@
Zbigniew Jędrzejewski-Szmek [Sun, 14 Jun 2020 17:55:11 +0000 (19:55 +0200)] 
Merge pull request #16170 from keszybz/man-user@

Better documentation for user@ services

3 years agoman: mention systemd-user-runtime-dir in user@.service too 16170/head
Zbigniew Jędrzejewski-Szmek [Sat, 13 Jun 2020 15:11:00 +0000 (17:11 +0200)] 
man: mention systemd-user-runtime-dir in user@.service too

_riotingpacifist was complaining on reddit [1] that systemd-user-runtime-dir
is not documented anywhere. So let's add the binary name as page alias.

[1] https://www.reddit.com/r/linux/comments/h086fd/why_linuxs_systemd_is_still_divisive_after_all/ftllr66/

This page should be in section 8, like all .service descriptions.

Also extend the text a bit to make it clearer that systemd --user is the same
executable but running in a different mode (which might be certainly a bit
confusing to users.)

3 years agoefi: Skip parsing SystemdOptions if there's an error getting it.
Filipe Brandenburger [Thu, 11 Jun 2020 22:33:32 +0000 (15:33 -0700)] 
efi: Skip parsing SystemdOptions if there's an error getting it.

The original logic was logging an "ignored" debug message, but it was still
going ahead and calling proc_cmdline_parse_given() on the NULL line. Fix that
to skip that explicitly when the EFI variable wasn't really read.

3 years agonetworkd: Add missing match_wlan_iftype check to network_verify
Daan De Meyer [Fri, 12 Jun 2020 17:31:22 +0000 (19:31 +0200)] 
networkd: Add missing match_wlan_iftype check to network_verify

3 years agoman: Document the crypttab keyfile syntax specifying a device
Vladimir Panteleev [Fri, 12 Jun 2020 10:44:57 +0000 (10:44 +0000)] 
man: Document the crypttab keyfile syntax specifying a device

Feature introduced in 50d2eba27b9bfc77ef6b40e5721713846815418b. Also documented
as part of the kernel parameter syntax in systemd-cryptsetup-generator(8), but
should also be documented here as part of the overall file syntax.

3 years agoMerge pull request #16163 from DaanDeMeyer/resolved-edns-info
Zbigniew Jędrzejewski-Szmek [Sun, 14 Jun 2020 08:45:02 +0000 (10:45 +0200)] 
Merge pull request #16163 from DaanDeMeyer/resolved-edns-info

resolved: Don't complain too much when downgrading from EDNS

3 years agoImprove message for scheduled shutdown or reboot
Tomáš Pospíšek [Sun, 14 Jun 2020 08:43:06 +0000 (10:43 +0200)] 
Improve message for scheduled shutdown or reboot

Depending on if the system has been scheduled for shutdown or for reboot pring the corresponding message (and not only "Shutdown"). Prtinting the "wrong" message when rebooting will mislead and panic people. I get these messages via cron from remote servers and it would be bad if those systems actually *did* shut down, as the email from cron is telling me. Those messages cause an adrenalin spike in our team, which wouldn't happen, if the message was "correct"

Fixes #16129.

3 years agoman: really fix conditional in homed.conf
Zbigniew Jędrzejewski-Szmek [Sat, 13 Jun 2020 14:45:37 +0000 (16:45 +0200)] 
man: really fix conditional in homed.conf

Followup for f978844eb62e1c47431b388ab90aafdd29f624ec.

3 years agoman: drop obsolete HAVE_PYTHON conditional
Zbigniew Jędrzejewski-Szmek [Sat, 13 Jun 2020 14:44:58 +0000 (16:44 +0200)] 
man: drop obsolete HAVE_PYTHON conditional

It stopped making sense when automake support was dropped and python started
being required to perform a build.
Follow-up for 72cdb3e783174dcf9223a49f03e3b0e2ca95ddb8.

3 years agoupdate-man-rules: properly filter out directives index again
Zbigniew Jędrzejewski-Szmek [Sat, 13 Jun 2020 14:29:43 +0000 (16:29 +0200)] 
update-man-rules: properly filter out directives index again

When directives-template.xml was created in 282230882cd0fc49b5377349f2aee22a1c9dd159,
this generator started picking it up. Let's filter it out properly again,
and also simply the filter while at it.

3 years agoresolved: Log the feature level we're downgrading from as well 16163/head
Daan De Meyer [Sat, 13 Jun 2020 12:48:40 +0000 (14:48 +0200)] 
resolved: Log the feature level we're downgrading from as well

3 years agoefi: Cache contents of EFI variable SystemdOptions
Filipe Brandenburger [Wed, 10 Jun 2020 22:11:32 +0000 (15:11 -0700)] 
efi: Cache contents of EFI variable SystemdOptions

Cache it early in startup of the system manager, right after `/run/systemd` is
created, so that further access to it can be done without accessing the EFI
filesystem at all.

3 years agotest: in test_bridge_configure_without_carrier, ignore setup_state
Dan Streetman [Fri, 12 Jun 2020 22:23:15 +0000 (18:23 -0400)] 
test: in test_bridge_configure_without_carrier, ignore setup_state

This test is failing becuase the setup state isn't reaching 'configured'
for unknown reasons; ignore the setup state for now to prevent failures
of CI until the reason can be investigated.

3 years agoresolved: Don't complain too much when downgrading from EDNS
Daan De Meyer [Fri, 12 Jun 2020 18:17:15 +0000 (20:17 +0200)] 
resolved: Don't complain too much when downgrading from EDNS

3 years agologin: filenames in /run/systemd/users are uids
Jan Palus [Thu, 11 Jun 2020 16:23:28 +0000 (18:23 +0200)] 
login: filenames in /run/systemd/users are uids

Fixes: #16146
3 years agocifuzz: build fuzz target with UBsan and MSan as well
Evgeny Vereshchagin [Thu, 11 Jun 2020 20:26:17 +0000 (22:26 +0200)] 
cifuzz: build fuzz target with UBsan and MSan as well

3 years agoturn off fuzzit part 2
Evgeny Vereshchagin [Thu, 11 Jun 2020 16:34:42 +0000 (18:34 +0200)] 
turn off fuzzit part 2

it's just a follow-up to https://github.com/systemd/systemd/pull/16064

3 years agoMerge pull request #16144 from mrc0mmand/gh-actions-followup
Evgeny Vereshchagin [Thu, 11 Jun 2020 15:04:13 +0000 (18:04 +0300)] 
Merge pull request #16144 from mrc0mmand/gh-actions-followup

GH Actions followup

3 years agoci: tweak the dependency installation 16144/head
Frantisek Sumsal [Thu, 11 Jun 2020 13:00:15 +0000 (15:00 +0200)] 
ci: tweak the dependency installation

3 years agoci: tweak the compilation options
Frantisek Sumsal [Thu, 11 Jun 2020 12:21:02 +0000 (14:21 +0200)] 
ci: tweak the compilation options

Build each build with tests (slow tests and fuzzer tests as well), and
combine the LTO build with -O3.

3 years agoci: move the build check script to workflows directory
Frantisek Sumsal [Thu, 11 Jun 2020 11:29:01 +0000 (13:29 +0200)] 
ci: move the build check script to workflows directory

3 years agoci: do the compiler-detection magic in the test script
Frantisek Sumsal [Thu, 11 Jun 2020 11:18:07 +0000 (13:18 +0200)] 
ci: do the compiler-detection magic in the test script

so we have all PPA definitions at one place.

3 years agoMerge pull request #16137 from poettering/sleep-fixlets
Lennart Poettering [Thu, 11 Jun 2020 12:12:48 +0000 (14:12 +0200)] 
Merge pull request #16137 from poettering/sleep-fixlets

some log fixes in the sleep code

3 years agoMerge pull request #16136 from mrc0mmand/travis-cleanup
Evgeny Vereshchagin [Thu, 11 Jun 2020 11:16:44 +0000 (14:16 +0300)] 
Merge pull request #16136 from mrc0mmand/travis-cleanup

Move the gcc/clang build check to GitHub Actions

3 years agoci: add homed/zstd dependencies 16136/head
Frantisek Sumsal [Wed, 10 Jun 2020 18:51:15 +0000 (20:51 +0200)] 
ci: add homed/zstd dependencies

Also, sort the whole list when we're at it.

3 years agogithub: move the clang/gcc build check to GH Actions
Frantisek Sumsal [Wed, 10 Jun 2020 11:41:28 +0000 (13:41 +0200)] 
github: move the clang/gcc build check to GH Actions

Travis CI is getting overloaded, so let's move some load over to GitHub
Actions.

3 years agoMerge pull request #16124 from ssahani/dhcpv6-duid
Lennart Poettering [Thu, 11 Jun 2020 10:03:07 +0000 (12:03 +0200)] 
Merge pull request #16124 from ssahani/dhcpv6-duid

network: Display DHCPv6 DUID

3 years agosleep: pass error we see to log function 16137/head
Lennart Poettering [Wed, 10 Jun 2020 14:54:10 +0000 (16:54 +0200)] 
sleep: pass error we see to log function

3 years agosleep-config: modernize destructors
Lennart Poettering [Wed, 10 Jun 2020 14:53:24 +0000 (16:53 +0200)] 
sleep-config: modernize destructors

All other destructors in the same .c file return NULL, let's make sure
the one where this so far wasn't done does it too.

3 years agosleep-config: downgrade log level in can_s2h()
Lennart Poettering [Wed, 10 Jun 2020 14:52:08 +0000 (16:52 +0200)] 
sleep-config: downgrade log level in can_s2h()

As in the previous commit: can_sleep() is more a library-style function,
hence log at debug level only.

3 years agosleep: clean up debug/error logging
Lennart Poettering [Wed, 10 Jun 2020 14:47:38 +0000 (16:47 +0200)] 
sleep: clean up debug/error logging

half of find_hibernation_location() logged at debug level, the other
half logged at error level, and the third half didn't log at all.

Let's clean this up somewhat. Since can_sleep() is probably more
a library-style function let's downgrade everything to LOG_DEBUG and
then make sure sleep.c logs at error level, as the main program.

3 years agosleep-config: return correct error code
Lennart Poettering [Wed, 10 Jun 2020 14:40:52 +0000 (16:40 +0200)] 
sleep-config: return correct error code

3 years agosleep-config: add more debug logging
Lennart Poettering [Wed, 10 Jun 2020 14:40:36 +0000 (16:40 +0200)] 
sleep-config: add more debug logging

3 years agogithub: rename CIFuzz workflow file to cifuzz.yml
Frantisek Sumsal [Wed, 10 Jun 2020 15:06:49 +0000 (17:06 +0200)] 
github: rename CIFuzz workflow file to cifuzz.yml

3 years agotravis: bump Ubuntu release to Bionic
Frantisek Sumsal [Wed, 10 Jun 2020 15:05:55 +0000 (17:05 +0200)] 
travis: bump Ubuntu release to Bionic

3 years agojournal: drop the assert-only variable completely
Frantisek Sumsal [Wed, 10 Jun 2020 17:45:33 +0000 (19:45 +0200)] 
journal: drop the assert-only variable completely

Followup to dfa64b64a7e2b9bffea260953b30e6236047fffb.

3 years agotravis: replace set (+|-)e with travis_terminate
Frantisek Sumsal [Wed, 10 Jun 2020 15:48:14 +0000 (17:48 +0200)] 
travis: replace set (+|-)e with travis_terminate

It looks nicer and works around
https://travis-ci.community/t/exit-0-cannot-exit-successfully-on-arm/5731/

3 years agotree-wide: port to fd_wait_for_event()
Lennart Poettering [Wed, 10 Jun 2020 09:43:40 +0000 (11:43 +0200)] 
tree-wide: port to fd_wait_for_event()

Prompted by the discussion on #16110, let's migrate more code to
fd_wait_for_event().

This only leaves 7 places where we call into poll()/poll() directly in
our entire codebase. (one of which is fd_wait_for_event() itself)

3 years agonetworkctl: Display DHCP6 DUID 16124/head
Susant Sahani [Tue, 9 Jun 2020 14:49:48 +0000 (16:49 +0200)] 
networkctl: Display DHCP6 DUID

3 years agosd-network: Introduce APIs to get DHCP6 DUID
Susant Sahani [Tue, 9 Jun 2020 14:49:12 +0000 (16:49 +0200)] 
sd-network: Introduce APIs to get DHCP6 DUID

3 years agonetwork: DHCP6 - save DUID to state file
Susant Sahani [Tue, 9 Jun 2020 14:48:42 +0000 (16:48 +0200)] 
network: DHCP6 - save DUID to state file

3 years agonetwork: DHCP6 - introduce DHCP6 DUID to string
Susant Sahani [Tue, 9 Jun 2020 14:47:49 +0000 (16:47 +0200)] 
network: DHCP6 - introduce DHCP6 DUID to string

3 years agoMerge pull request #15940 from keszybz/names-set-optimization
Lennart Poettering [Wed, 10 Jun 2020 16:52:08 +0000 (18:52 +0200)] 
Merge pull request #15940 from keszybz/names-set-optimization

Try to optimize away Unit.names set

3 years agoupdate TODO
Lennart Poettering [Wed, 10 Jun 2020 16:37:00 +0000 (18:37 +0200)] 
update TODO

3 years agotest: make TEST-02-CRYPTSETUP a bit more robust
Frantisek Sumsal [Tue, 9 Jun 2020 14:51:55 +0000 (16:51 +0200)] 
test: make TEST-02-CRYPTSETUP a bit more robust

Prompted by systemd/systemd#16111.

* check if /var is a mountpoint - if not, something went wrong. In case
  of systemd/systemd#16111 the /failed file was created, because
  systemd-cryptsetup failed, but it ended up being empty, making the result
  check incorrectly pass
* forward journal messages to console - if we fail to mount /var,
  journald won't flush logs to the persistent storage and we end up
  empty handed and with no clue what went wrong

For example, without systemd/systemd#16111 and with this patch:
...
[FAILED] Failed to start systemd-cryptsetup@varcrypt.service.
See 'systemctl status systemd-cryptsetup@varcrypt.service' for details.
[DEPEND] Dependency failed for cryptsetup.target.
...
[    3.882451] systemd-cryptsetup[581]: Key file /etc/varkey is world-readable. This is not a good idea!
[    3.883946] systemd-cryptsetup[581]: WARNING: Locking directory /run/cryptsetup is missing!
[    3.884846] systemd-cryptsetup[581]: Failed to load Bitlocker superblock on device /dev/disk/by-uuid/180ba5ef-873b-4018-9968-47c23431f71a: Invalid argument
...
[    4.099451] sh[606]: + mountpoint /var
[    4.100025] sh[603]: + systemctl poweroff --no-block
[    4.101636] systemd[1]: Finished systemd-user-sessions.service.
[    4.102598] sh[608]: /var is not a mountpoint
[FAILED] Failed to start testsuite-02.service.

3 years agocore: don't consider SERVICE_SKIP_CONDITION for abnormal or failure restarts
Anita Zhang [Wed, 10 Jun 2020 08:18:00 +0000 (01:18 -0700)] 
core: don't consider SERVICE_SKIP_CONDITION for abnormal or failure restarts

Fixes: #16115
3 years agodocs: Change suffix for desktop applications to support non-transient services
David Edmundson [Mon, 8 Jun 2020 21:00:33 +0000 (22:00 +0100)] 
docs: Change suffix for desktop applications to support non-transient services

One problem found with the current draft specification is we can't have
an application provide a non-transient systemd service file in a way
that is spec compliant as the service name currently needs to end in a
random token defined by the launcher.

This came up when trying to put DBus activated services into the correct
cgroup. There isn't enough metadata in the DBus service file to know the
correct application ID, and the most intuitive fix is for those
applications to just specify the SystemdService file in the existing
system. They're generally unique for a given user session anyway so
don't need a separate cgroup identifier.

This changes the spec for RANDOM to be optional for services.

It also changes the separator between in services to act like templates.
Ultimately that's what we're trying to recreate with the RANDOM token of
the systemd service and it's a better fit. It's needed as otherwise with
launcher and the random ident being both optional it would be impossible
to get the application ID reliably.

Scopes are unchanged as they don't support templates.

3 years agopager: set PR_DEATHSIG for pager to SIGINT rather than SIGTERM
Lennart Poettering [Tue, 9 Jun 2020 06:59:33 +0000 (08:59 +0200)] 
pager: set PR_DEATHSIG for pager to SIGINT rather than SIGTERM

"less" doesn't properly reset its terminal on SIGTERM, it does so only
on SIGINT. Let's thus configure SIGINT instead of SIGTERM.

I think this is something less should fix too, and clean up things
correctly on SIGTERM, too. However, given that we explicitly enable
SIGINT behaviour by passing "K" to $LESS I figure it makes sense if we
also send SIGINT instead of SIGTERM to match it.

Fixes: #16084
3 years agodocs: point contributors to list of most recent systemd releases
Lennart Poettering [Tue, 9 Jun 2020 07:42:12 +0000 (09:42 +0200)] 
docs: point contributors to list of most recent systemd releases

Fixes: #16083
3 years agoMerge pull request #16111 from poettering/bitlck-fix
Zbigniew Jędrzejewski-Szmek [Wed, 10 Jun 2020 08:25:36 +0000 (10:25 +0200)] 
Merge pull request #16111 from poettering/bitlck-fix

bitlocker cryptsetup fix

3 years agoMerge pull request #16118 from poettering/inaccessible-fixlets
Zbigniew Jędrzejewski-Szmek [Wed, 10 Jun 2020 08:23:13 +0000 (10:23 +0200)] 
Merge pull request #16118 from poettering/inaccessible-fixlets

move $XDG_RUNTIME_DIR/inaccessible/ to $XDG_RUNTIME_DIR/systemd/inaccessible

3 years agoMerge pull request #16120 from poettering/udevd-fixlets
Zbigniew Jędrzejewski-Szmek [Wed, 10 Jun 2020 08:18:36 +0000 (10:18 +0200)] 
Merge pull request #16120 from poettering/udevd-fixlets

minor udev fixlets

3 years agocore: do not touch instance from unit_choose_id() 15940/head
Zbigniew Jędrzejewski-Szmek [Wed, 27 May 2020 14:36:38 +0000 (16:36 +0200)] 
core: do not touch instance from unit_choose_id()

unit_choose_id() is about marking one of the aliases of the unit as the main
name. With the preparatory work in previous patches, all aliases of the unit
must have the same instance, so the operation to update the instance is a noop.

3 years agocore: create socket service instances with the correct name from the start
Zbigniew Jędrzejewski-Szmek [Fri, 29 May 2020 12:24:12 +0000 (14:24 +0200)] 
core: create socket service instances with the correct name from the start

Upon an incoming connection for an accepting socket, we'd create a unit like
foo@0.service, then figure out that the instance name should be e.g. "0-41-0",
and then add the name foo@0-41-0.service to the unit. This obviously violates
the rule that any service needs to have a constance instance part.

So let's reverse the order: we first determine the instance name and then
create the unit with the correct name from the start.

There are two cases where we don't know the instance name:
- analyze-verify: we just do a quick check that the instance unit can be
  created. So let's use a bogus instance string.
- selinux: the code wants to load the service unit to extract the ExecStart path
  and query it for the selinux label. Do the same as above.

Note that in both cases it is possible that the real unit that is loaded could
be different than the one with the bogus instance value, for example if there
is a dropin for a specific instance name. We can't do much about this, since we
can't figure out the instance name in advance. The old code had the same
shortcoming.

3 years agocore: rework error messages in unit_add_name()
Zbigniew Jędrzejewski-Szmek [Fri, 29 May 2020 09:22:14 +0000 (11:22 +0200)] 
core: rework error messages in unit_add_name()

They were added recently in acd1987a1867fc3390ef2516962b2313cbeb366e. We can
make them more informative by using unit_type_to_string() and not repeating
unit names as much. Also, %m should not be used together with SYNTHETIC_ERRNO().

3 years agocore: when adding names to unit, require matching instance strings
Zbigniew Jędrzejewski-Szmek [Wed, 27 May 2020 14:39:35 +0000 (16:39 +0200)] 
core: when adding names to unit, require matching instance strings

We would check that the instance is present in both units (or missing in both).
But when it is defined, it should be the same in both. The comment in the code
was explicitly saying that differing instance strings are allowed, but this
mostly seems to be a left-over from old times. The man page is pretty clear:

> the instance (if any) is always uniquely defined for a given unit and all its
> aliases.

3 years agocore: store unit aliases in a separate set
Zbigniew Jędrzejewski-Szmek [Wed, 27 May 2020 13:49:17 +0000 (15:49 +0200)] 
core: store unit aliases in a separate set

We allocated the names set for each unit, but in the majority of cases, we'd
put only one name in the set:

$ systemctl show --value -p Names '*'|grep .|grep -v ' '|wc -l
564
$ systemctl show --value -p Names '*'|grep .|grep ' '|wc -l
16

So let's add a separate .id field, and only store aliases in the set, and only
create the set if there's at least one alias. This requires a bit of gymnastics
in the code, but I think this optimization is worth the trouble, because we
save one object for many loaded units.

In particular set_complete_move() wasn't very useful because the target
unit would always have at least one name defined, i.e. the optimization to
move the whole set over would never fire.

3 years agoMerge pull request #16087 from mrc0mmand/travis-build-check
Zbigniew Jędrzejewski-Szmek [Wed, 10 Jun 2020 07:06:14 +0000 (09:06 +0200)] 
Merge pull request #16087 from mrc0mmand/travis-build-check

travis: check build with various compiler options

3 years agotree-wide: check POLLNVAL everywhere
Lennart Poettering [Tue, 9 Jun 2020 11:40:25 +0000 (13:40 +0200)] 
tree-wide: check POLLNVAL everywhere

poll() sets POLLNVAL inside of the poll structures if an invalid fd is
passed. So far we generally didn't check for that, thus not taking
notice of the error. Given that this specific kind of error is generally
indication of a programming error, and given that our code is embedded
into our projects via NSS or because people link against our library,
let's explicitly check for this and convert it to EBADF.

(I ran into a busy loop because of this missing check when some of my
test code accidentally closed an fd it shouldn't close, so this is a
real thing)

3 years agotree-wide: mark assert()-only variables as unused 16087/head
Frantisek Sumsal [Tue, 9 Jun 2020 19:31:10 +0000 (21:31 +0200)] 
tree-wide: mark assert()-only variables as unused

to make a compilation with -Db_ndebug=true and --werror pass once again.

3 years agotravis: check build with various compiler options
Frantisek Sumsal [Sun, 7 Jun 2020 12:05:20 +0000 (14:05 +0200)] 
travis: check build with various compiler options

In the past we occasionally stumbled upon a build issue which could be
reproduced only with specific optimization level or other compilation
option. Let's try to build the current revision with several most common
compiler options causing such issues to catch them early.

3 years agoMerge pull request #16104 from ssahani/dhcpv6-iaid
Daan De Meyer [Tue, 9 Jun 2020 19:18:28 +0000 (21:18 +0200)] 
Merge pull request #16104 from ssahani/dhcpv6-iaid

networkctl: Display DHCPv6 IAID

3 years agoAppArmor: Support for loading a set of pre-compiled profiles at startup time
YmrDtnJu [Mon, 25 May 2020 08:46:54 +0000 (10:46 +0200)] 
AppArmor: Support for loading a set of pre-compiled profiles at startup time

Let systemd load a set of pre-compiled AppArmor profile files from a policy
cache at /etc/apparmor/earlypolicy. Maintenance of that policy cache must be
done outside of systemd.

After successfully loading the profiles systemd will attempt to change to a
profile named systemd.

If systemd is already confined in a profile, it will not load any profile files
and will not attempt to change it's profile.

If anything goes wrong, systemd will only log failures. It will not fail to
start.

3 years agoMerge pull request #16058 from Werkov/fix-memory-protection-default
Lennart Poettering [Tue, 9 Jun 2020 18:02:53 +0000 (20:02 +0200)] 
Merge pull request #16058 from Werkov/fix-memory-protection-default

Fix memory protection default setting

3 years agoMerge pull request #16046 from bluca/dissect_squashfs_verity
Lennart Poettering [Tue, 9 Jun 2020 17:52:21 +0000 (19:52 +0200)] 
Merge pull request #16046 from bluca/dissect_squashfs_verity

dissect: single-filesystem verity images with external hashdevice

3 years agoman: udevadm: mention non-zero exit code on settle
Yigal Korman [Sun, 7 Jun 2020 18:46:59 +0000 (21:46 +0300)] 
man: udevadm: mention non-zero exit code on settle

'udevadm settle --timeout=XY' will return 1 in case the timeout was
reached and the event queue was not empty.
The manpage should mention it.

3 years agotest-network: wait 2min for the bridge being in configured state
Yu Watanabe [Tue, 9 Jun 2020 09:27:57 +0000 (18:27 +0900)] 
test-network: wait 2min for the bridge being in configured state

On some CIs, it may takes more than 40 seconds.

Hopefully fixes #16105.

3 years agodoc: Try to clarify automount dependency confusion
Chris Down [Tue, 9 Jun 2020 13:43:05 +0000 (14:43 +0100)] 
doc: Try to clarify automount dependency confusion

Arch recently upgraded systemd to 245.6. Shortly afterwards, users began
reporting[0] that systemd detected an ordering cycle, and they were
unable to log in. The reason they were unable to log in was because of
ordering cycle resolution:

    [...]
    systemd[1]: sysinit.target: Job systemd-tmpfiles-setup.service/start deleted to break ordering cycle starting with sysinit.target/start
    systemd[1]: sysinit.target: Job systemd-update-done.service/start deleted to break ordering cycle starting with sysinit.target/start
    systemd[1]: sysinit.target: Job systemd-journal-catalog-update.service/start deleted to break ordering cycle starting with sysinit.target/start
    systemd[1]: sysinit.target: Job local-fs.target/start deleted to break ordering cycle starting with sysinit.target/start
    systemd[1]: sysinit.target: Job systemd-tmpfiles-setup.service/start deleted to break ordering cycle starting with sysinit.target/start
    [...]

Whether the resolution did the right thing here or not is a longer-term
discussion, but in the interim we should at least make this distinction
between automount dependencies and mount dependencies clearer in the
documentation, so that users and distribution maintainers know what's
acceptable. In this case Arch actually backed out b3d7aef5 entirely and
released a new version due to the confusion.

Also see https://github.com/systemd/systemd-stable/issues/69.

0: https://bugs.archlinux.org/task/66908

3 years agodocs: use bool in varlink interface definition
Michał Bartoszkiewicz [Thu, 28 May 2020 16:02:03 +0000 (18:02 +0200)] 
docs: use bool in varlink interface definition

Boolean type in varlink is named bool, not boolean.

3 years agoinaccessible: move inaccessible file nodes to /systemd/ subdir in runtime dir always 16118/head
Lennart Poettering [Tue, 9 Jun 2020 14:22:24 +0000 (16:22 +0200)] 
inaccessible: move inaccessible file nodes to /systemd/ subdir in runtime dir always

Let's make sure $XDG_RUNTIME_DIR for the user instance and /run for the
system instance is always organized the same way: the "inaccessible"
device nodes should be placed in a subdir of either called "systemd" and
a subdir of that called "inaccessible".

This way we can emphasize the common behaviour, and only differ where
really necessary.

Follow-up for #13823

3 years agologin: use ERRNO_IS_PRIVILEGE() where appropriate
Lennart Poettering [Tue, 9 Jun 2020 14:13:51 +0000 (16:13 +0200)] 
login: use ERRNO_IS_PRIVILEGE() where appropriate

3 years agomkdir: use log_full_errno() where appropriate
Lennart Poettering [Tue, 9 Jun 2020 14:13:16 +0000 (16:13 +0200)] 
mkdir: use log_full_errno() where appropriate

3 years agoudev: set fewer process properties 16120/head
Lennart Poettering [Tue, 9 Jun 2020 13:40:20 +0000 (15:40 +0200)] 
udev: set fewer process properties

On systemd systems we generally don't need to chdir() to root, we don't
need to setup /dev/ ourselves (as PID 1 does that during earliest boot),
and we don't need to set the OOM adjustment values, as that's done via
unit files.

Hence, drop this. if people want to use udev from other init systems
they should do this on their own, I am very sure it's a good thing to do
it from outside of udevd, so that fewer privileges are required by udevd. In
particular the dev_setup() stuff is something that people who build
their own non-systemd distros want to set up themselves anyway, in
particular as they already have to mount devtmpfs themselves anyway.

Note that this only drops stuff that isn't really necessary for testing
stuff, i.e. process properties and settings that don't matter if you
quickly want to invoke udev from a terminal session to test something.

3 years agoudevd: use cpus_in_affinity_mask()
Lennart Poettering [Tue, 9 Jun 2020 13:39:51 +0000 (15:39 +0200)] 
udevd: use cpus_in_affinity_mask()

Let's make use of our own helpers. This has the benefit that we can deal
with arbitrarily sized affinity masks.

3 years agoMerge pull request #16074 from msekletar/freezer-test-flakes
Lennart Poettering [Tue, 9 Jun 2020 12:38:40 +0000 (14:38 +0200)] 
Merge pull request #16074 from msekletar/freezer-test-flakes

Freezer test flakes

3 years agocryptsetup: pass selected mode to crypt_load() when doing LUKS 16111/head
Lennart Poettering [Tue, 9 Jun 2020 12:21:32 +0000 (14:21 +0200)] 
cryptsetup: pass selected mode to crypt_load() when doing LUKS

This doesn't fix anything IRL, but is a bit cleaner, since it makes sure
that arg_type is properly passed to crypt_load() in all cases.

We actually never set arg_type to CRYPT_LUKS2, which is why this wasn't
noticed before, but theoretically this might change one day, and
existing comments suggest it as possible value for arg_type, hence let's
process it properly.

3 years agocryptsetup: try to load bitlocker superblock only if requested
Lennart Poettering [Tue, 9 Jun 2020 12:18:09 +0000 (14:18 +0200)] 
cryptsetup: try to load bitlocker superblock only if requested

let's do automatic discovery only for our native LUKS/LUKS2 headers,
since they are Linux stuff, and let's require that BitLocker to be
requested explicitly.

This makes sure cryptsetup without either "luks" nor "bitlk" in the
option string will work. Right now it would fail because we'd load the
superblock once with luks and once with bitlk and one of them would
necessarily fail.

Follow-up for #15979

3 years agohwbd entry for Dell Inspiron Chromebook 14 2-in-1 sensor (#16109)
Yegor Vialov [Tue, 9 Jun 2020 11:31:58 +0000 (14:31 +0300)] 
hwbd entry for  Dell Inspiron Chromebook 14 2-in-1 sensor (#16109)

3 years agologin: allow individual USB ports to be assigned to seats
Adam Nielsen [Mon, 8 Jun 2020 02:40:47 +0000 (12:40 +1000)] 
login: allow individual USB ports to be assigned to seats

Assigning seats to specific USB ports lets the devices plugged into them
inherit the port's seat assignment.

3 years agodissect: support single-filesystem verity images with external verity hash 16046/head
Luca Boccassi [Fri, 29 May 2020 16:51:20 +0000 (17:51 +0100)] 
dissect: support single-filesystem verity images with external verity hash

dm-verity support in dissect-image at the moment is restricted to GPT
volumes.
If the image a single-filesystem type without a partition table (eg: squashfs)
and a roothash/verity file are passed, set the verity flag and mark as
read-only.

3 years agonetworkctl: DHCPv6 - display IAID 16104/head
Susant Sahani [Tue, 9 Jun 2020 08:50:21 +0000 (10:50 +0200)] 
networkctl: DHCPv6 - display IAID

3 years agosd-network: Introduce API to get DHCPv6 IAID
Susant Sahani [Tue, 9 Jun 2020 08:49:38 +0000 (10:49 +0200)] 
sd-network: Introduce API to get DHCPv6 IAID

3 years agonetwork: DHCPv6 - export IAID to state file
Susant Sahani [Tue, 9 Jun 2020 08:49:08 +0000 (10:49 +0200)] 
network: DHCPv6 - export IAID to state file

3 years agodhcp6: Provide method to access IAID
Susant Sahani [Tue, 9 Jun 2020 08:48:36 +0000 (10:48 +0200)] 
dhcp6: Provide method to access IAID

3 years agoMerge pull request #16080 from YmrDtnJu/9p
Lennart Poettering [Tue, 9 Jun 2020 08:51:20 +0000 (10:51 +0200)] 
Merge pull request #16080 from YmrDtnJu/9p

9p is a network filesystem

3 years agocore: let user define start-/stop-timeout behaviour
Jan Klötzke [Tue, 16 Apr 2019 14:45:20 +0000 (16:45 +0200)] 
core: let user define start-/stop-timeout behaviour

The usual behaviour when a timeout expires is to terminate/kill the
service. This is what user usually want in production systems. To debug
services that fail to start/stop (especially sporadic failures) it
might be necessary to trigger the watchdog machinery and write core
dumps, though. Likewise, it is usually just a waste of time to
gracefully stop a stuck service. Instead it might save time to go
directly into kill mode.

This commit adds two new options to services: TimeoutStartFailureMode=
and TimeoutStopFailureMode=. Both take the same values and tweak the
behavior of systemd when a start/stop timeout expires:

 * 'terminate': is the default behaviour as it has always been,
 * 'abort': triggers the watchdog machinery and will send SIGABRT
   (unless WatchdogSignal was changed) and
 * 'kill' will directly send SIGKILL.

To handle the stop failure mode in stop-post state too a new
final-watchdog state needs to be introduced.

3 years agoMerge pull request #16073 from keszybz/shell-completion
Lennart Poettering [Tue, 9 Jun 2020 07:33:41 +0000 (09:33 +0200)] 
Merge pull request #16073 from keszybz/shell-completion

Bash completion for homectl and help improvement for kernel-install

3 years agoMerge pull request #15953 from keszybz/gdb-script
Lennart Poettering [Tue, 9 Jun 2020 07:31:49 +0000 (09:31 +0200)] 
Merge pull request #15953 from keszybz/gdb-script

Update gdb script to match current sources and other hashmap improvements

3 years agoMerge pull request #16047 from poettering/udev-ro-block
Lennart Poettering [Tue, 9 Jun 2020 07:09:32 +0000 (09:09 +0200)] 
Merge pull request #16047 from poettering/udev-ro-block

udev: optionally mark all block devices popping up read-only by default

3 years agoupdate TODO
Lennart Poettering [Tue, 9 Jun 2020 06:54:41 +0000 (08:54 +0200)] 
update TODO

3 years agoMerge pull request #16085 from ssahani/network-client-id
Yu Watanabe [Tue, 9 Jun 2020 06:30:23 +0000 (15:30 +0900)] 
Merge pull request #16085 from ssahani/network-client-id

networkctl: add support to display DHCPv4 client ID

3 years agoAdd 'bitlk' option to mount Bitlocker drives with cryptsetup.
Maxim Fomin [Sat, 30 May 2020 10:21:44 +0000 (11:21 +0100)] 
Add 'bitlk' option to mount Bitlocker drives with cryptsetup.

3 years agomount-tool: Replace fstype_is_{network,api_vfs} with fstype_is_blockdev_backed 16080/head
YmrDtnJu [Mon, 8 Jun 2020 17:25:18 +0000 (19:25 +0200)] 
mount-tool: Replace fstype_is_{network,api_vfs} with fstype_is_blockdev_backed

Not every filesystem that is not a network filesystem and also not an API VFS
filesystem has a corresponding block device.