1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-31 16:21:26 +03:00
Commit Graph

48971 Commits

Author SHA1 Message Date
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
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
corvusnix
fee6441601
hwdb: add Medion Akoya E2228T MD61900 (#18317)
Add a model-specific entry for Medion Akoya E2228T MD61900 accelerometer to 60-sensor.hwdb so the orientation is detected correctly.
2021-01-21 09:21:50 +01:00
Zbigniew Jędrzejewski-Szmek
fc9b937b44
Merge pull request #18327 from benzea/benzea/libfprint-autosuspend-hwdb
Pull libfprint autosuspend hwdb
2021-01-21 09:09:34 +01:00
Yu Watanabe
33f7b61ca5
Merge pull request #18329 from poettering/notify-chroot
chroot/sd_notify() fixes
2021-01-21 13:16:59 +09:00
Lennart Poettering
9807fdc1da varlink: make 'userdata' pointer inheritance from varlink server to connection optional
@keszybz's right on
https://github.com/systemd/systemd/pull/18248#issuecomment-760798473:
swapping out the userdata pointer of a live varlink connection is iffy.

Let's fix this by making the userdata inheritance from VarlinkServer
object to the Varlink connection object optional: we want it for most
cases, but not all, i.e. all those cases where the calls implemented as
varlink methods are stateless and can be answered synchronously. For the
other cases (i.e. where we want per-connection objects that wrap the
asynchronous operation as it goes on) let's not do such inheritance but
initialize the userdata pointer only once we have it. THis means the
original manager object must be manually retrieved from the
VarlinkServer object, which in turn needs to be requested from the
Varlink connection object.

The userdata inheritance is now controlled by the
VARLINK_INHERIT_USERDATA flag passed at VarlinkServer construction.

Alternative-to: #18248
2021-01-21 07:31:58 +09:00
Yu Watanabe
4723205968
Merge pull request #18311 from poettering/sysext-fixups
sysext: post-merge fixups
2021-01-21 07:20:04 +09:00
Lennart Poettering
fe239c7d7d portabled: update profiles to current semantics
MountAPIVFS= implicitly mounts /run as tmpfs now, no need to do this
explicitly.

The notification socket is now implicitly mounted too, if NotifyAccess=
and RootImage=/RootDirectory= are used together.
2021-01-20 22:39:53 +01:00
Lennart Poettering
09872a6e1a man: document how get logging to work in a RootDirectory=/RootImage= environment
Fixes: #18051
2021-01-20 22:39:33 +01:00
Lennart Poettering
3bdc25a4cf core: make NotifyAccess= in combination with RootDirectory=/RootImage= work
Previously if people enabled RootDirectory=/RootImage= and NotifyAccess=
together, things wouldn't work, they'd have to explicitly add
BindReadOnlyPaths=/run/systemd/notify too.

Let's make this implicit. Since both options are opt-in, if people use
them together it would be pointless not also defining the
BindReadOnlyPaths= entry, in which case we can just do it automatically.

See: #18051
2021-01-20 22:39:07 +01:00
Benjamin Berg
b25e76eada hwdb: Pull autosuspend rules from upstream libfprint
libfprint includes a list of known fingerprint readers that can be
autosuspended. Upstream libfprint generates this file from the USB IDs
registered to drivers and a list of well-known readers that are
currently unsupported.

Closes: #17663
2021-01-20 22:14:23 +01:00
Luca Boccassi
7504f599e1
Merge pull request #18325 from ssahani/more-cleanup
Tree wide various cleanup
2021-01-20 20:48:18 +00:00
Yu Watanabe
4dbc0be2e5 udev/cdrom_id: re-enable logging related functions
The logging related functions are mistakenly located in main() by
a084b38789, and dropped by
23afa884d4.
2021-01-20 18:31:10 +00:00
Lennart Poettering
301265ea10 man: document recent systemd-sysext interface changes 2021-01-20 17:50:23 +01:00
Lennart Poettering
8de42cb461 sysext: add --force swich for forcibly ignoring version incompatibilities 2021-01-20 17:50:23 +01:00
Lennart Poettering
8662fcbcf1 sysext: rework command line interface to be verb-based
As suggested by @yuwata:

https://github.com/systemd/systemd/pull/18181#pullrequestreview-570826113
2021-01-20 17:50:23 +01:00
Lennart Poettering
9901835d80 sysext: split version validation logic into function of its own
Just some simple refactoring to simplify the logic.
2021-01-20 17:44:53 +01:00
Lennart Poettering
1f3707aeea sysext: use log_setup_cli() 2021-01-20 17:44:53 +01:00
Yu Watanabe
888f65ace6 path-util: simplify check_x_access()
Follow-up for ece852c845.

This addresses the following comments by the Lennart:
---
hmm, so this now does two access() calls for the case where the fd is
not requested, and opens things up for races (theoretically, …). now,
the access() code path was in place for optimization, but if an optimization
is less sexy than the original (and i think it is less sexy, since more
than one syscall, and non-atomic), i think we shouldn't do the optimization.

maybe we should just always use open(O_PATH) now, and then fstat() it to
check if regular file, and then access_fd() it for checking if its executable.
2021-01-20 17:43:36 +01:00
Luca Boccassi
aac5fbff0b sysext: install in rootbindir, remove template from unit
This reverts commit 71ad75f306.
2021-01-20 15:25:03 +01:00
Susant Sahani
cecaba2003 btrfs-util: tighten variable scope used in loop 2021-01-20 15:14:30 +01:00
Susant Sahani
a67f102e79 analyze: tighten variable scope used in loop 2021-01-20 15:13:24 +01:00
Susant Sahani
c2484a7514 sd-event: Use hashmap_ensure_put 2021-01-20 15:13:21 +01:00
Susant Sahani
f656fdb623 sd-event: Use hashmap_ensure_put 2021-01-20 15:13:18 +01:00
Susant Sahani
639deab187 sd-device: Use TAKE_PTR 2021-01-20 15:13:13 +01:00
Susant Sahani
e8480482ca sd-device: Use hashmap_ensure_put 2021-01-20 15:13:08 +01:00
Susant Sahani
875038d5fe udev-rules: use ordered_hashmap_ensure_put 2021-01-20 15:13:02 +01:00
Susant Sahani
0c7bd7ecbd network: networkd-network use TAKE_PTR 2021-01-20 15:09:26 +01:00
Susant Sahani
6de530f2b8 network: Use hashmap_ensure_put 2021-01-20 15:09:20 +01:00
Susant Sahani
9b1fd1f55b network: ndisc - Use ordered_set_ensure_put 2021-01-20 15:09:14 +01:00
Susant Sahani
32ae5db60a machine: Use hashmap_ensure_put 2021-01-20 15:09:09 +01:00