Lennart Poettering [Fri, 20 Apr 2018 14:36:56 +0000 (16:36 +0200)]
link: follow our rule of suffix settings with = in log messages
Lennart Poettering [Fri, 20 Apr 2018 14:33:00 +0000 (16:33 +0200)]
networkd,udev: clean up MTU handling
This cleans up handling of MTU values across the codebase. Previously
MTU values where stored sometimes in uint32_t, sometimes in uint16_t,
sometimes unsigned and sometimes in size_t. This now unifies this to
uint32_t across the codebase, as that's what netlink spits out, and what
the majority was already using.
Also, all MTU parameters are now parsed with config_parse_mtu() and
config_parse_ipv6_mtu() is dropped as it is now unneeded.
(Note there is one exception for the MTU typing: in the DCHPv4 code we
continue to process the MTU as uint16_t value, as it is encoded like
that in the protocol, and it's probably better stay close to the
protocol there.)
Lennart Poettering [Fri, 20 Apr 2018 14:31:17 +0000 (16:31 +0200)]
conf-parse: add a generic config_parse_mtu() conf file parser function
It's mostly a wrapper around parse_mtu() but with some nicer logging.
The address family is initialized from the "ltype" parameter, so that
configuration file parser tables can be easily declare it.
Lennart Poettering [Fri, 20 Apr 2018 14:28:12 +0000 (16:28 +0200)]
parse-util: add explicit parsers for MTU values
We use MTUs all over the place, let's add a unified, strict parser for
it, that takes MTU ranges into account.
We already have parse_ifindex() close-by, hence this appears to be a
natural addition, in particular as the range checking is not entirely
trivial to do, as it depends on the protocol used.
Lennart Poettering [Fri, 20 Apr 2018 14:18:09 +0000 (16:18 +0200)]
missing: add IPV4_MIN_MTU
Similar to IPV6_MIN_MTU, let's add the same for IPv4.
Lennart Poettering [Fri, 20 Apr 2018 14:17:45 +0000 (16:17 +0200)]
networkd: drop duplicate definition of IPV6_MIN_MTU
We already have it in missing.h, and once suffices.
Antique [Thu, 26 Apr 2018 10:37:35 +0000 (12:37 +0200)]
cgroup-util: fix enabling of controllers (#8816)
If enabling controller for some reason fails we need to clear error
for the FILE stream. Enabling remaining controllers would otherwise
fail because write_string_stream_ts() checks for ferror(f) and returns
-EIO if there is one.
Broken by commit <
77fa610b22>.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Yu Watanabe [Thu, 26 Apr 2018 08:53:10 +0000 (17:53 +0900)]
meson: drop 'name' argument in cc.has_argument() (#8823)
This fixes the following warning with clang and meson-0.46.0,
```
WARNING: Passed invalid keyword argument "name".
WARNING: This will become a hard error in the future.
WARNING: Passed invalid keyword argument "name".
WARNING: This will become a hard error in the future.
Compiler for C supports arguments -Wno-typedef-redefinition: YES
WARNING: Passed invalid keyword argument "name".
WARNING: This will become a hard error in the future.
WARNING: Passed invalid keyword argument "name".
WARNING: This will become a hard error in the future.
Compiler for C supports arguments -Wno-gnu-variable-sized-type-not-at-end: YES
```
Yu Watanabe [Thu, 26 Apr 2018 07:51:11 +0000 (16:51 +0900)]
man: fix description of --value option for loginctl (#8820)
Lennart Poettering [Wed, 25 Apr 2018 13:46:57 +0000 (15:46 +0200)]
Merge pull request #8812 from keszybz/gpt-auto-memleak
gpt-auto-generator: use stack variables and fix minor memleak
Zbigniew Jędrzejewski-Szmek [Wed, 25 Apr 2018 11:47:18 +0000 (13:47 +0200)]
meson: do not link libsystemd_static into libcore (#8813)
(or in terms of the names of the actual files on disk, do not link
libsystemd-shared-238.a into libcore.a).
libsystemd_static is linked into libsystemd_shared, which in turn means that
anything that links to libcore and libsystemd_shared will get libsystemd_static
twice:
$ cc -o systemd 'systemd@exe/src_core_main.c.o' -Wl,--no-undefined -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -pie -DVALGRIND -Wl,--start-group src/core/libcore.a src/shared/libsystemd-shared-238.a src/shared/libsystemd-shared-238.so -pthread -lrt -lseccomp -lselinux -lmount -lblkid -Wl,--end-group -lseccomp -lpam -L/lib64 -laudit -lkmod -lmount -lrt -lcap -lacl -lcryptsetup -lgcrypt -lip4tc -lip6tc -lseccomp -lselinux -lidn -llzma -llz4 -lblkid '-Wl,-rpath,$ORIGIN/src/shared' -Wl,-rpath-link,/home/zbyszek/src/systemd/build/src/shared
This propagation of the dependency seems correct (in the sense that meson is
doing the expected thing based on the given configuration). Linking was done
this way in the original meson conversion. I was probably trying to get
everything to compile and link, I'm not sure why this particular choice was
made. In the meantime, meson has gotten better at propagating dependencies, so
it's possible that this had slightly different effect in the original
conversion, but I did not verify this. Either way, I think we should drop this.
With the patch:
$ cc -o systemd 'systemd@exe/src_core_main.c.o' -Wl,--no-undefined -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -pie -DVALGRIND -Wl,--start-group src/core/libcore.a src/shared/libsystemd-shared-238.so -pthread -lrt -lseccomp -lselinux -lmount -Wl,--end-group -lblkid -lrt -lseccomp -lpam -L/lib64 -laudit -lkmod -lselinux -lmount '-Wl,-rpath,$ORIGIN/src/shared' -Wl,-rpath-link,/home/zbyszek/src/systemd/build/src/shared
This is more correct because we're not linking the same code twice.
With the patch, libystemd_static is used in exactly four places:
- src/shared/libsystemd-shared-238.so
- src/udev/libudev.so.1.6.10
- pam_systemd.so
- test-bus-error
(compared to a bunch more executables before, including systemd,
systemd-analyze, test-hostname, test-ns, etc.)
Size savings are also noticable:
$ size /var/tmp/inst?/usr/lib/systemd/libsystemd-shared-238.so
text data bss dec hex filename
2397826 578488 15920 2992234 2da86a /var/tmp/inst1/usr/lib/systemd/libsystemd-shared-238.so
2397826 578488 15920 2992234 2da86a /var/tmp/inst2/usr/lib/systemd/libsystemd-shared-238.so
$ size /var/tmp/inst?/usr/lib/systemd/systemd
text data bss dec hex filename
1858790 261688 9320 2129798 207f86 /var/tmp/inst1/usr/lib/systemd/systemd
1556358 258704 8072 1823134 1bd19e /var/tmp/inst2/usr/lib/systemd/systemd
$ du -s /var/tmp/inst?
52216 /var/tmp/inst1
50844 /var/tmp/inst2
https://github.com/google/oss-fuzz/issues/1330#issuecomment-
384054530 might be related.
Lennart Poettering [Wed, 25 Apr 2018 10:31:45 +0000 (12:31 +0200)]
tree-wide: drop redundant _cleanup_ macros (#8810)
This drops a good number of type-specific _cleanup_ macros, and patches
all users to just use the generic ones.
In most recent code we abstained from defining type-specific macros, and
this basically removes all those added already, with the exception of
the really low-level ones.
Having explicit macros for this is not too useful, as the expression
without the extra macro is generally just 2ch wider. We should generally
emphesize generic code, unless there are really good reasons for
specific code, hence let's follow this in this case too.
Note that _cleanup_free_ and similar really low-level, libc'ish, Linux
API'ish macros continue to be defined, only the really high-level OO
ones are dropped. From now on this should really be the rule: for really
low-level stuff, such as memory allocation, fd handling and so one, go
ahead and define explicit per-type macros, but for high-level, specific
program code, just use the generic _cleanup_() macro directly, in order
to keep things simple and as readable as possible for the uninitiated.
Note that before this patch some of the APIs (notable libudev ones) were
already used with the high-level macros at some places and with the
generic _cleanup_ macro at others. With this patch we hence unify on the
latter.
Zbigniew Jędrzejewski-Szmek [Wed, 25 Apr 2018 08:06:23 +0000 (10:06 +0200)]
gpt-auto-generator: emit warnings and fail if we fail to query mount points
Right now gpt-auto-generator will iterate through all mount entries, and
silently ignore failure to check if the mount point target is empty.
This can hide real errors (in particular from MAC), so instead let's warn
and return failure at the end if this happens. We will still iterate
over other candidates, so there should be no change in behaviour.
Logging is moved into path_is_busy() to avoid the duplication of the same
logging code in the two callers.
Zbigniew Jędrzejewski-Szmek [Wed, 25 Apr 2018 07:45:28 +0000 (09:45 +0200)]
gpt-auto-generator: use stack variables and fix minor memleak
Lennart Poettering [Wed, 25 Apr 2018 00:14:54 +0000 (02:14 +0200)]
Merge pull request #8807 from ChrisLesiak/systemd-update-done-mtime-fix
fileio.c: fix incorrect mtime
Zbigniew Jędrzejewski-Szmek [Tue, 24 Apr 2018 18:57:56 +0000 (20:57 +0200)]
Merge pull request #8775 from poettering/strip-cso
teach strip_tab_ansi() to strip ANSI CSO sequences
Lennart Poettering [Tue, 24 Apr 2018 18:25:27 +0000 (20:25 +0200)]
Merge pull request #8802 from keszybz/errno-reform
Errno reform
Chris Lesiak [Tue, 24 Apr 2018 14:50:42 +0000 (09:50 -0500)]
fileio.c: fix incorrect mtime
A regression was introduced that caused the mtime of /etc/.updated
and /var/.updated to be the current time when systemd-update-done
ran instead of being copied from /usr.
This was nearly fixed, but due to fflush being called after mtime
was carefully set, it was overwritten with the current time.
Regression introduced in
872c40396384f9fa89b01baf4e739d28ed590299
A fix was just missed in
39c38d773fbe2b4f76ff29ecd3344640efb9a86c
Fixes #8806
Lennart Poettering [Tue, 24 Apr 2018 15:30:07 +0000 (17:30 +0200)]
Merge pull request #8800 from keszybz/trivialities
Trivial cleanups
Lennart Poettering [Tue, 24 Apr 2018 15:29:10 +0000 (17:29 +0200)]
Merge pull request #8801 from fbuihuu/tmpfiles-fixes
Tmpfiles fixes
Lennart Poettering [Fri, 20 Apr 2018 13:22:02 +0000 (15:22 +0200)]
update TODO
Lennart Poettering [Fri, 20 Apr 2018 13:22:29 +0000 (15:22 +0200)]
string-util: use fflush_and_check() where appropriate
Lennart Poettering [Fri, 20 Apr 2018 13:16:13 +0000 (15:16 +0200)]
string-util: teach strip_tab_ansi() to deal with CSO sequences
With the recent terminal_urlify() APIs we'll now sometimes generate
clickable link CSO sequences. Hence we should also be able to remove
them again from strings. This beefs up the logic to do so.
Follow-up for:
23b27b39d2a3a002ad827a2e8a9872a51495d797
Zbigniew Jędrzejewski-Szmek [Tue, 24 Apr 2018 11:57:38 +0000 (13:57 +0200)]
basic/log: do not use global errno in log_*_errno()
Quoting https://github.com/systemd/systemd/pull/8760#discussion_r183321060:
> When we originally added the errno patching we went for a "best of both
> worlds" approach, i.e. that we override errno if an error is specified, but
> if no error is specified (i.e. 0 is passed as error code) then we use the
> previously set errno, similar in style how plain `printf()` would do it. In
> retrospect I think we almost never purposefully made use of the second,
> i.e. the plain `printf()` logic, but we multiple times ran into this case
> accidentally and introduced a bug. Hence yes, it probably makes sense to
> switch this over, and consistently ignore the `errno` already set and always
> override it with the error passed in. The only problem I see with that is: I
> wonder if there might be a case or two lurking somewhere where we actually
> made use of the "best of both worlds" approach, and if so, if we can detect
> where... (But then again, even if there is, and we fail to find those cases,
> maybe that's not all bad, as it's just a few new bugs against probably fixing
> many more old and future bugs, if you follow what I mean).
I scanned our codebase, and found some bugs in the value passed to log_*_errno,
but no intentional cases of error=0 being passed.
Zbigniew Jędrzejewski-Szmek [Tue, 24 Apr 2018 11:50:46 +0000 (13:50 +0200)]
core/device: avoid bogus errno use and invert ratelimit_test()
I'm not sure if I understand the original code. AFAICS, errno does not
have to be set at all in this callback.
ratelimit_test() returns positive if we are under limit. The code would only
log if the condition happened very often, which I assume is not inteded, and
this check was supposed to prevent too much logging.
Zbigniew Jędrzejewski-Szmek [Tue, 24 Apr 2018 11:47:20 +0000 (13:47 +0200)]
sd-lldp: eliminate unnecessary variable
Zbigniew Jędrzejewski-Szmek [Tue, 24 Apr 2018 11:46:58 +0000 (13:46 +0200)]
basic/audit-util: always log the reason when disabling audit logs
This state is cached, and it's seems OK to log at least once.
Zbigniew Jędrzejewski-Szmek [Tue, 24 Apr 2018 11:45:44 +0000 (13:45 +0200)]
Fix three uses of bogus errno value in logs (and returned value in one case)
Zbigniew Jędrzejewski-Szmek [Tue, 24 Apr 2018 11:44:09 +0000 (13:44 +0200)]
tree-wide: avoid assignment of r just to use in a comparison
This changes
r = ...;
if (r < 0)
to
if (... < 0)
when r will not be used again.
Zbigniew Jędrzejewski-Szmek [Tue, 24 Apr 2018 10:13:46 +0000 (12:13 +0200)]
Revert "bus-unit-util: fix bus_wait_for_jobs() debug output (#8760)"
This reverts commit
d6b87637c52148f5861aca557de2711dcd0c2efd.
Let's try a different approach.
Franck Bui [Tue, 24 Apr 2018 10:24:38 +0000 (12:24 +0200)]
tmpfiles: 'e' is supposed to accept shell-style globs
Franck Bui [Tue, 24 Apr 2018 10:23:29 +0000 (12:23 +0200)]
tmpfiles: 'e' is supposed to operate on directory only
Zbigniew Jędrzejewski-Szmek [Tue, 24 Apr 2018 10:11:10 +0000 (12:11 +0200)]
systemd-hwdb: reflow help() to avoid a line break
Zbigniew Jędrzejewski-Szmek [Tue, 24 Apr 2018 10:07:34 +0000 (12:07 +0200)]
CGROUP_DELEGATION: typo and grammar fixes
Franck Bui [Wed, 11 Apr 2018 14:58:49 +0000 (16:58 +0200)]
fs-util: introduce fchmod_opath()
fchmod(2) still doesn't take file descriptors opened with O_PATH.
Franck Bui [Thu, 12 Apr 2018 10:18:19 +0000 (12:18 +0200)]
tmpfiles: remove spurious curly braces in create_item()
Zbigniew Jędrzejewski-Szmek [Fri, 20 Apr 2018 10:12:11 +0000 (12:12 +0200)]
core/manager: make manager_enumerate() static
Zbigniew Jędrzejewski-Szmek [Fri, 20 Apr 2018 10:10:32 +0000 (12:10 +0200)]
core/manager: trivial simplification
Milan [Tue, 24 Apr 2018 09:38:08 +0000 (11:38 +0200)]
nspawn: fix copy/reflink fallback when directory already exists (#8781)
Lennart Poettering [Tue, 24 Apr 2018 09:37:44 +0000 (11:37 +0200)]
Merge pull request #8796 from yuwata/remove-unused-variables
Remove unused variables
Yu Watanabe [Tue, 24 Apr 2018 06:43:09 +0000 (15:43 +0900)]
test: drop unused variables
Follow-up for
49eb36596b72e568d4b9b785cd4544e58c89bdee.
Yu Watanabe [Tue, 24 Apr 2018 06:42:00 +0000 (15:42 +0900)]
login: drop an unused variable
Follow-up for
99f1229d76da4b805f8f6c6e5e4a878d17d42f93.
Paul Menzel [Mon, 23 Apr 2018 09:03:16 +0000 (11:03 +0200)]
man/os-release: Document that blank lines are permitted (#8777)
Fixes: https://github.com/systemd/systemd/issues/8773
Paul Milliken [Mon, 23 Apr 2018 08:49:54 +0000 (09:49 +0100)]
hwdb: Add accelerometer orientation quirk for the Linx 1010B tablet (#8784)
Kai-Heng Feng [Mon, 23 Apr 2018 08:23:03 +0000 (16:23 +0800)]
hwdb: Use wlan keycode for all Dell systems (#8762)
Once the seat is acquired, gnome-settings-daemon (GSD) takes full
control of rfkill by sending RFKILL_IOCTL_NOINPUT ioctl to disable
rfkill control in kernel.
Since GSD expects wlan keycode when the hotkey gets pressed, we should
change the "unknown" to "wlan" accordingly.
Tested under both GNOME and KDE.
Yu Watanabe [Mon, 23 Apr 2018 08:14:15 +0000 (17:14 +0900)]
doc: add $SYSTEMD_TIMEDATED_NTP_SERVICES= in ENVIRONMENT.md (#8785)
Yu Watanabe [Mon, 23 Apr 2018 08:13:26 +0000 (17:13 +0900)]
bus-message: use streq_ptr() (#8786)
Muhammet Kara [Mon, 23 Apr 2018 08:12:03 +0000 (11:12 +0300)]
po: update Turkish translation (#8783)
Zbigniew Jędrzejewski-Szmek [Mon, 23 Apr 2018 07:37:17 +0000 (09:37 +0200)]
Merge pull request #8520 from drinkcat/upstream-udevadm
udevadm/hwdb: Return non-zero exit code on error
Mario Limonciello [Mon, 23 Apr 2018 07:24:39 +0000 (02:24 -0500)]
hoestnamed: Also parse HOME_URL from /usr/lib/os-release (#8779)
64928aa54520b8cad3cda14d7aab0f4f59409acf added parsing to
/etc/os-release.
Zbigniew Jędrzejewski-Szmek [Mon, 23 Apr 2018 07:14:42 +0000 (09:14 +0200)]
Merge pull request #8675 from fbuihuu/make-sure-device-enter-in-plugged-state
device: make sure to always retroactively start device dependencies
Yu Watanabe [Mon, 23 Apr 2018 01:24:39 +0000 (10:24 +0900)]
Merge pull request #8769 from keszybz/followups
Three trivial followups for recent patches
Lennart Poettering [Mon, 23 Apr 2018 00:24:43 +0000 (02:24 +0200)]
bus-unit-util: fix bus_wait_for_jobs() debug output (#8760)
We shouldn't print 'errno' if its not initialized properly.
Nicolas Boichat [Tue, 27 Mar 2018 03:24:01 +0000 (11:24 +0800)]
systemd-hwdb update: Return non-zero exit code on error when --strict is used
- Add a new flag --strict to tell systemd-hwdb to return a
non-zero code on error.
- Make systemd-hwdb update return an error when any parsing
error occurs (only if strict flag is set).
Nicolas Boichat [Tue, 20 Mar 2018 05:36:58 +0000 (13:36 +0800)]
udevadm/hwdb: Return non-zero exit code on error when --strict is used
- Add a new flag --strict to tell udevadm hwdb to return a
non-zero code on error.
- Make udevadm hwdb --update return an error when any parsing
error occurs (only if strict flag is set).
Lennart Poettering [Fri, 20 Apr 2018 18:24:10 +0000 (20:24 +0200)]
Merge pull request #8778 from poettering/cgroup-delegation-doc
some docs regarding cgroup delegation and systemd
Lennart Poettering [Fri, 20 Apr 2018 16:10:04 +0000 (18:10 +0200)]
doc: add a bit more documentation about systemd and cgroups and cgroupsv2 and delegation
Ultimately we should replace the relevant wiki texts with documentation
maintained as part of our project tree. This is a start. It can't
replace the wiki documentation in full yet, but I think it's already
very useful.
Lennart Poettering [Fri, 20 Apr 2018 16:09:53 +0000 (18:09 +0200)]
update TODO
Franck Bui [Tue, 17 Apr 2018 13:12:06 +0000 (15:12 +0200)]
device: skip deserialization of device units when udevd is not running
Do not try to party initialize a device during deserialization if it's not
known by udev (anymore) and therefore hasn't been seen during device
enumeration.
The device unit in this case has not been initialized properly and setting it
in the "plugged" state can be confusing.
Actually this happens during every boots when PID switches to the new rootfs:
PID is reexecuted and enumerates devices but since udev is not running, the
list of enumerated devices is empty.
Franck Bui [Fri, 6 Apr 2018 13:02:10 +0000 (15:02 +0200)]
device: make sure to always retroactively start device dependencies
PID1 updates the state of device units upon 2 different events:
- when it processes an event sent by udev and in this case the device deps are
started if the device enters in the "plugged" state.
- when it enumerates all devices during its startup or when it is asked to
reload its configuration data but in this case the device deps (if any) are
not retroactively started.
When udev processes a new "add" kernel event, it first registers the new device
in its databases then sends an event to systemd.
If for any reason, systemd is asked to reload its configuration between the
previous 2 steps, it might see for the first time the new device while scanning
/sys for all devices. Only during a second step, udev will send the event for
the new device.
In this peculiar case the device deps wont be started (even though the device
is first seen by PID1).
Indeed when reloading its configurations, PID1 will put the device unit in the
"plugged" state but without starting the device deps. Thereafter PID1 will get
the event from udev for the new device but the device unit will be in "plugged"
state already therefore it won't see any need to start the device dependencies.
Rather than assuming that during the reloading of systemd manager configuration
all devices listed in udev DBs have been already processed and should be put in
the "plugged" state (done by device_coldplug()), this patch does that only for
devices which have been processed via an udev event (device_dispatch_io())
previously. In this case we set "d->found" to "DEVICE_FOUND_UDEV" and we make
also sure to no more initialize "d->found" while enumerating devices. Instead
this field is now saved/restored while devices are serialized.
Tobias Jungel [Fri, 20 Apr 2018 14:30:40 +0000 (16:30 +0200)]
networkd: more specific link down while enslaving (#8771)
Issue #5853 introduced a link_down for every netdev enslaved. This behaviour is
not required on other slave interfaces.
fixes 14b6bb7
Zbigniew Jędrzejewski-Szmek [Fri, 20 Apr 2018 09:28:04 +0000 (11:28 +0200)]
man: document the new $SYSTEMD_DEBUGGER variable
Follow-up for
c5896b6a.
Zbigniew Jędrzejewski-Szmek [Fri, 20 Apr 2018 09:14:41 +0000 (11:14 +0200)]
sysusers: use uniform order for variables
Follow-up for
43e948eea6.
Tobias Jungel [Fri, 20 Apr 2018 11:31:17 +0000 (13:31 +0200)]
remove unused variables (#8768)
clang 5.0 complains with -Wunused-variable
Susant Sahani [Fri, 20 Apr 2018 09:38:39 +0000 (15:08 +0530)]
networkd: add support to configure IPv6 MTU (#8664)
This patch supports to configure IPv6 MTU.
Closes #8632
Lennart Poettering [Fri, 20 Apr 2018 09:36:25 +0000 (11:36 +0200)]
nspawn: when running nspawn, set a $PATH including both bin + sbin by default (#8756)
We don't know what the container payload needs, hence default to a PATH
with both bin and sbin included, as well as / and /usr.
Follow-up for #8324
Fixes: #8698
Zbigniew Jędrzejewski-Szmek [Fri, 20 Apr 2018 09:09:44 +0000 (11:09 +0200)]
Fix typo
Zbigniew Jędrzejewski-Szmek [Thu, 19 Apr 2018 17:39:48 +0000 (19:39 +0200)]
Merge pull request #8754 from poettering/sysusers-fix
two minor memleak fixes for sysusers, fixing #8718
Zbigniew Jędrzejewski-Szmek [Thu, 19 Apr 2018 16:56:46 +0000 (18:56 +0200)]
Merge pull request #8767 from poettering/urlify-all-things
try to generate clickable links in our output if we can
Lennart Poettering [Thu, 19 Apr 2018 15:54:25 +0000 (17:54 +0200)]
systemctl: format unit file and dropin paths as clickable links in status output
Lennart Poettering [Thu, 19 Apr 2018 15:53:58 +0000 (17:53 +0200)]
systemctl: format documentation links in status output as clickable links
Lennart Poettering [Thu, 19 Apr 2018 15:52:51 +0000 (17:52 +0200)]
hostnamectl: make the distribution name a pretty clickable link if we can
Lennart Poettering [Thu, 19 Apr 2018 15:52:22 +0000 (17:52 +0200)]
hostnamed: expose HOME_URL os-release field on the bus
Lennart Poettering [Thu, 19 Apr 2018 15:48:53 +0000 (17:48 +0200)]
terminal: add internal API to format URLs for display in capable terminals
Newer terminals (in particular gnome-terminal) understand special escape
sequence for formatting clickable links. Let's support that to make our
tool output more clickable where that's appropriate.
For details see this:
https://gist.github.com/egmontkob/
eb114294efbcd5adb1944c9f3cb5feda
The one big issue is that 'less' currently doesn't grok this, and
doesn't ignore sequence like regular terminal implementations do if they
don't support it. Hence for now, let's disable URL output if a pager is
used. We should revisit that though as soon as less added support for it
and enough time passed for it to enter various distributions.
Lennart Poettering [Thu, 19 Apr 2018 14:22:50 +0000 (16:22 +0200)]
Merge pull request #8615 from yuwata/fix-1329
timedated: support multiple NTP services
Lennart Poettering [Thu, 19 Apr 2018 14:18:46 +0000 (16:18 +0200)]
Merge pull request #8765 from poettering/test-fixes
some short fixes for the tests
Zbigniew Jędrzejewski-Szmek [Thu, 19 Apr 2018 10:33:05 +0000 (12:33 +0200)]
Merge pull request #8623 from yuwata/resolvectl
resolvectl: rename systemd-resolve to resolvectl
Lennart Poettering [Thu, 19 Apr 2018 10:13:23 +0000 (12:13 +0200)]
tree-wide: drop spurious newlines (#8764)
Double newlines (i.e. one empty lines) are great to structure code. But
let's avoid triple newlines (i.e. two empty lines), quadruple newlines,
quintuple newlines, …, that's just spurious whitespace.
It's an easy way to drop 121 lines of code, and keeps the coding style
of our sources a bit tigther.
Lennart Poettering [Thu, 19 Apr 2018 09:40:48 +0000 (11:40 +0200)]
user-util: trivial coding style fixes
Use C's downgrade-to-bool feature when comparing pointers against NULL,
as we usually do.
Lennart Poettering [Thu, 19 Apr 2018 09:16:04 +0000 (11:16 +0200)]
mkosi: drop dumping all test output to console again
As it appears meson's test cases nowadays (?) show useful logs for
failing tests anyway, hence there's no need to show them unconditionally
in full every time anymore. Let's hence simplify and drop this.
Lennart Poettering [Thu, 19 Apr 2018 08:35:36 +0000 (10:35 +0200)]
tests: compare with correct shell
We synthesize the passwd record for UID 0, hence we need to compare with
our synthesized data and not with the data stored in /etc/passwd
Lennart Poettering [Thu, 19 Apr 2018 08:34:58 +0000 (10:34 +0200)]
core: don't export per-unit metadata files in test mode
We shouldn't clobber the host's /run directories with metadata we export
for our units when we run in test mode.
Lennart Poettering [Thu, 19 Apr 2018 08:33:57 +0000 (10:33 +0200)]
mkosi: ensure the 'hostname' tool is available in the build environment
Our test-execute test uses 'hostname' to validate specifiers, hence it
should be available in our mkosi build too, so that the test can pass.
Lennart Poettering [Thu, 19 Apr 2018 09:28:05 +0000 (11:28 +0200)]
Merge pull request #8758 from keszybz/improved-slice-checks
Improved slice checks
Ryan Gonzalez [Wed, 18 Apr 2018 19:32:17 +0000 (14:32 -0500)]
coredumpctl: Add debug as a gdb alias, and add lldb support (closes #8722) (#8744)
Yu Watanabe [Wed, 18 Apr 2018 18:26:54 +0000 (03:26 +0900)]
bash-completion: add completion for resolvectl
Yu Watanabe [Wed, 18 Apr 2018 18:25:25 +0000 (03:25 +0900)]
man: create man page for resolvectl
Yu Watanabe [Wed, 11 Apr 2018 01:44:51 +0000 (10:44 +0900)]
resolvectl: change syntax to use verb_dispatch()
This makes `resolvectl` use the verb style command line, e.g.,
`resolvectl status` or `resolvectl tlsa tcp fedoraproject.org:443`.
For compatibility, if the invocation name is `systemd-resolve`,
then it accepts the old syntax, e.g. `systemd-resolve --status`.
Yu Watanabe [Wed, 18 Apr 2018 18:24:23 +0000 (03:24 +0900)]
resolvectl: rename systemd-resolve to resolvectl
For the compatibility, `systemd-resolve` will be created as a symbolic
link to `resolvectl`.
Zbigniew Jędrzejewski-Szmek [Wed, 18 Apr 2018 18:06:56 +0000 (20:06 +0200)]
core: do not allow Delegate= on unsupported unit types
Zbigniew Jędrzejewski-Szmek [Wed, 18 Apr 2018 17:50:07 +0000 (19:50 +0200)]
core: fix resetting of Delegate= and properly ignore invalid assignment
The default is false not true. If we say "ignoring" we must return 0.
Lennart Poettering [Wed, 18 Apr 2018 16:50:06 +0000 (18:50 +0200)]
man: don't place nginx socket in /tmp (#8757)
First of all, it's frickin' ugly and wrong, as IPC sockets should be
placed in /run and definitely not under a guessable name under
world-writable /tmp. Secondly, it can't even work as we set
PrivateTmp=yes on the service.
Hence, let's clean up the example, and simply use a socket in /run
instead.
Fixes: #8419
Lennart Poettering [Wed, 18 Apr 2018 16:46:44 +0000 (18:46 +0200)]
Merge pull request #8708 from poettering/namespace-repeat
pid1 namespacing fixes
Franck Bui [Wed, 18 Apr 2018 16:32:21 +0000 (18:32 +0200)]
sysusers: make sure to reset the returned value when EOF is reached in fget*ent_sane() wrappers (#8737)
To indicate that the there're no more entries, these wrappers return false but
did leave the passed pointed unmodified.
However EOF is not an error and is a very common case so initialize the output
argument to NULL even in this case so callers don't need to do that.
Fixes: #8721
Lennart Poettering [Wed, 18 Apr 2018 15:59:35 +0000 (17:59 +0200)]
sysusers: fix minor memory leak
Lennart Poettering [Wed, 18 Apr 2018 15:59:22 +0000 (17:59 +0200)]
sysusers: clarify that we knowingly ignore process_items() return values
Lennart Poettering [Wed, 18 Apr 2018 15:58:53 +0000 (17:58 +0200)]
sysusers: fix memory leak when /etc/passwd contains multiple identical lines
Fixes: #8718
Lennart Poettering [Wed, 18 Apr 2018 15:58:15 +0000 (17:58 +0200)]
uid-range: remove spurious newline
Lennart Poettering [Wed, 18 Apr 2018 14:20:13 +0000 (16:20 +0200)]
Merge pull request #8709 from poettering/format-table
generic table formatter
Lennart Poettering [Wed, 18 Apr 2018 14:19:46 +0000 (16:19 +0200)]
path-lookup: properly chase paths when reducing with root dir (#8750)
Let's make this correct.