Commit Graph
54455 Commits
Author SHA1 Message Date
Daan De Meyer 44bc7f4fcf meson: Fix update-man-rules when the build dir is not a subdir of the project dir
Until now, update-man-rules assumed that the build directory was
a subdirectory of the project directory. When using mkosi, this is
not the case. We use find instead of git ls-files because git ls-files
does not seem to support outputting absolute paths.

Also, this makes update-man-rules a bit more user-friendly as new manpages
don't have to be added to the git staging area before they are processed by
update-man-rules.py.
2021-01-24 17:33:49 +00:00
Daan De Meyer 5a89c7972a mkosi: Pass build script arguments to ninja
mkosi recently gained support to pass arguments to the build script.
Let's take advantage of this in systemd's build script to allow
passing which target to build to ninja in the build script.
2021-01-24 14:13:02 +00:00
Luca Boccassi d9e606e89f tests: build the image once and then copy/extend it
Building custom images for each test takes a lot of time.
Build the default one, and if the test needs incompatible changes
just copy it and extend it instead.
2021-01-24 13:07:39 +00:00
Luca Boccassi 74eec54d66 test: note where the bionic-* CI tool/integration lives 2021-01-24 12:03:53 +00:00
Luca Boccassi 4a5fc0e61f Merge pull request #18358 from jwrdegoede/hwdb-2-accel-quirks
Hwdb 2 accel quirks
2021-01-24 11:35:59 +00:00
Daan De Meyer c38667f70d docs: Update HACKING.md with the mkosi boot/qemu commands + options
Let's use the mkosi commands in HACKING.md and recommend some options
that speed up mkosi builds. Also includes some other small improvements.
2021-01-24 11:15:30 +00:00
Daan De Meyer 4cc06b8073 docs: Add a section to HACKING.md on using mkosi and clangd together
While it's perfectly possible today to completely rely on mkosi for
building and testing systemd, to get code completion and other IDE
niceties to work properly, it's still necessary to build systemd
locally.

Recently, mkosi gained the ability to allow external programs to
communicate with the build script. We can use this feature to run
the clangd language server in the mkosi build image via a custom
build script to provide IDE features in editors without requiring
developers to build systemd on the host or install any of systemd's
build dependencies locally.

This commit adds the necessary information on how to set this up
to HACKING.md.
2021-01-24 11:14:30 +00:00
Anita Zhang 2e744a2cd8 oom: update extended test to remove swap gating 2021-01-24 02:03:59 -08:00
Anita Zhang 924c89e9fe oom: fix reclaim activity detection
This should have been checking for any reclaim activity within a larger interval
of time rather than within the past second. On systems with swap this
doesn't seem to have mattered too much as reclaim would always increase when
memory pressure was elevated. But testing in the no swap case having
this larger interval made a difference between oomd killing or not.
2021-01-24 02:02:09 -08:00
Anita Zhang 408a3bbd76 oom: make swap a soft requirement 2021-01-24 01:59:03 -08:00
Anita Zhang c20aa7b171 oom: make memory pressure duration configurable through oomd.conf 2021-01-24 01:59:03 -08:00
Hans de Goede e607710e5d hwdb: Add accel orientation quirk for the Jumper Ezpad 7 tablet
Add a quirk to fix the accelerometer orientation on
the Jumper Ezpad 7 tablet.
2021-01-23 22:36:58 +01:00
Hans de Goede 3b5606d95d hwdb: Add accel orientation quirk for the Estar Beauty HD tablet
Add a quirk to fix the accelerometer orientation on the Estar Beauty HD
(marked as model-number MID 7316R on the back) tablet.
2021-01-23 20:21:26 +01:00
Luca Boccassi 664e54b1bb Merge pull request #18349 from poettering/import-fixlets2
minor importd fixlets
2021-01-23 00:21:48 +00:00
Lennart Poettering 9d252fbb94 repart: improve help text
Finding "partitions" in a "directory" is a bit weird. Let's find
"partition definitions" there, after all the option is called
--definitions=
2021-01-22 22:46:17 +00:00
Lennart Poettering 6a117acf5e import: downgrade error messages we ignore to LOG_WARNING 2021-01-22 20:55:34 +01:00
Lennart Poettering 052ba0ebae import: set up btrfs qgroups on correct hierarchy
Also, simplify import_assign_pool_quota_and_warn(), don't do the same
thing twice. Let's just allow the caller call this twice.
2021-01-22 20:54:51 +01:00
Lennart Poettering 2ab214eac1 import: drop redundant {}, as per coding style 2021-01-22 20:54:51 +01:00
Lennart Poettering 5183c50add import: introduce ImportFlags flags field
This merges the two flags that are passed to the ImportTar/ImportRaw
objects into a single flags parameter, which we then can extend more
easily later on.

No change in behaviour.

This is inspired by 133b34f69a which does
the same for PullTar/PullRaw.
2021-01-22 20:54:51 +01:00
Lennart Poettering 1f5a21324c import: don't apply empty_or_dash_to_null() to stuff we know is NULL anyway 2021-01-22 20:54:51 +01:00
Jiehong 9ae5fed64e feature: display status with a different shape depending on the status (#17728) 2021-01-22 20:45:43 +01:00
Luca Boccassi 95457dc13c Merge pull request #18302 from bluca/mount_image_runtime
systemctl/core: add DBUS method to mount images without service restart
2021-01-22 17:49:11 +00:00
Anita Zhang 42e6f54979 core: update setings on the unit and job as the result of ExecCondition=
Update ExecCondition= to set Unit->condition_result and return JOB_DONE
in the Job results  if the check fails so as to match the current behavior
of ConditionXYZ= w.r.t units/jobs dependency checks.

Fixes: #18207
2021-01-22 17:41:13 +01:00
Yu Watanabe f190ac486e hostname: accept an empty hostname to unset transient hostname
Follow-up for 60e4fb4240.

Before 60e4fb4240,
`hostnamectl --transient set-hostname ""` unsets the transient hostname.
But after the commit, it is refused. This fixes the issue.
2021-01-22 07:40:26 +01:00
Yu Watanabe abcf60e730 dhcp: use conservative_rename() 2021-01-22 12:55:54 +09:00
Yu Watanabe af664001f5 network: use conservative_rename() to reduce to trigger network events
networkd part to fix #17577.

Note resolved part is f3e1f00d03.
2021-01-22 12:55:54 +09:00
Yu Watanabe 10195179bb fs-util: rename conservative_rename() -> conservative_renameat()
And this introduces conservative_rename() which does not take dirfd.
2021-01-22 12:55:54 +09:00
Yu Watanabe 9092113d93 network: drop many unnecessary link_dirty() calls
Now link state saves mostly link state, DNS and NTP settings, .network
file name. So, it is not necessary to call link_dirty() e.g. when an
address is updated. This drops such unnecessary link_dirty() calls.
2021-01-22 12:55:51 +09:00
Yu Watanabe 92395e0e83 network: do not re-assign static routes when dynamic IPv6 addresses are updated
This effectively reverts 6545067aa9.

Unlike IPv4 addresses, routes are not removed when IPv6 addresses are
removed. So, it is not necessary to re-assign routes.
2021-01-22 12:53:18 +09:00
Yu Watanabe 3e405f28f4 Merge pull request #16228 from ddstreet/administrative_state
Add ActivationPolicy= [Link] parameter
2021-01-22 12:11:29 +09:00
Luca Boccassi 87970ee5bc Merge pull request #18338 from poettering/print-table-with-bells-and-whistles
json/table printing unification work
2021-01-21 22:41:18 +00:00
Lennart Poettering 8dd294c5a9 portabled: add BindPaths=/run back into "trusted" policy
This partly reverts fe239c7d7d, where I
accidentally dropped only line for /run that was unlike the others.
Oops.

@bluca, thanks for noticing:

https://github.com/systemd/systemd/pull/18329#pullrequestreview-573343549
2021-01-21 19:15:08 +00:00
Evgeny Vereshchagin 012648f965 ci: point the Fossies badge to main
Another follow-up to https://github.com/systemd/systemd/issues/16834
2021-01-21 20:08:44 +01:00
Luca Boccassi 6faecbd353 systemctl: add new option to mount image inside a running service namespace
Use the new DBUS method and follow the same pattern as the
systemctl bind command.
2021-01-21 19:08:40 +00:00
Luca Boccassi af47713952 pid1: add DBUS method to mount image inside a running service namespace
Follow the same pattern as the BindMount method.
2021-01-21 18:37:00 +00:00
Luca Boccassi 7059996766 mount-util: add helper to mount image inside live namespace 2021-01-21 18:35:31 +00:00
Luca Boccassi 4beda31698 dissect: split verity_dissect_and_mount helper out for reuse 2021-01-21 18:32:44 +00:00
Luca Boccassi 988172cecf core: split read_mount_options helper out for reuse 2021-01-21 18:31:45 +00:00
Frantisek Sumsal c5a7055f5f ci: change the Semaphore CI badge branch to 'main'
Follow-up to #16834
2021-01-21 21:15:57 +03:00
Lennart Poettering 8d0d1a309e man: share a common explanation for --json= 2021-01-21 18:21:41 +01:00
Lennart Poettering bb1a570018 busctl: show --help in pager
We do this for other larger --help texts, do so here too.
2021-01-21 18:14:37 +01:00
Lennart Poettering 17547fb5cb dissect: almost port systemd-dissect to table_print_with_pager()
This doesn't actually port systemd-dissect to table_print_with_pager()
but at least rearranges things so that similar behaviour is exposed. The
reason it's not ported over 1:1 is that systemd-dissect actually adjusts
the JSON output of the table with additional info, and doesn't print the
table 1:1 as JSON.
2021-01-21 18:14:37 +01:00
Lennart Poettering 16a36b5616 sysext: port to table_print_with_pager()
This adds --no-legend as side-effect.
2021-01-21 18:14:21 +01:00
Lennart Poettering 896e678bea repart: port to table_print_with_pager()
This adds support for showing a pager, turning of the legend, like in
the other tools.
2021-01-21 18:14:21 +01:00
Lennart Poettering 665ffc7fba busctl/homectl: port the obvious cases to table_print_with_pager() 2021-01-21 18:14:21 +01:00
Lennart Poettering e676b4fc8b format-table: add new helper table_print_with_pager()
This adds a new function table_print_with_pager() which is a wrapper
around table_print_json()/table_print() but spawns a pager first, if
that's enabled, and optionally turns off the header line of the table.

This addresses the fact that many of our tools actually keep doing very
this very similar stuff, over and over again. Let's unify this in one
place.
2021-01-21 18:14:21 +01:00
Dan Streetman a853652ae9 save link activation policy to state file and display in networkctl 2021-01-21 12:05:17 -05:00
Dan Streetman 2236d75df9 test: add ActivationPolicy= unit tests 2021-01-21 12:05:17 -05:00
Dan Streetman 61135582e0 network: add ActivationPolicy= configuration parameter
This parameter allows configuring the activation policy for an interface,
meaning how it manages the interface's administrative state (IFF_UP flag).
The policy can be configured to bring the interface either up or down when
the interface is (re)configured, to always force the interface either up or
down, or to never change the interface administrative state.

If the interface is bound with BindCarrier=, its administrative state is
controlled by the interface(s) it's bound to, and this parameter is forced
to 'bound'.

This changes the default behavior of how systemd-networkd sets the IFF_UP
flag; previously, it was set up (if not already up) every time the
link_joined() function was called. Now, with the default ActivationPolicy=
setting of 'up', it will only set the IFF_UP flag once, the first time
link_joined() is called, during an interface's configuration; and on
the first link_joined() call each time the interface is reconfigured.

Fixes: #3031
Fixes: #17437
2021-01-21 11:49:43 -05:00
Evgeny Vereshchagin 9b25429cb4 GH Actions: switch to main
It's just a follow-up to https://github.com/systemd/systemd/issues/16834
2021-01-21 16:28:02 +01:00