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

29263 Commits

Author SHA1 Message Date
Susant Sahani
593022fa37 systemd-link: add support to configure the device port (#6153)
This work allows to configure device port:

tp — An Ethernet interface using Twisted-Pair cable as the medium.
aui — Attachment Unit Interface (AUI). Normally used with hubs.
bnc — An Ethernet interface using BNC connectors and co-axial cable.
mii — An Ethernet interface using a Media Independent Interface (MII).
fibre — An Ethernet interface using Optical Fibre as the medium.
2017-06-25 18:42:57 -04:00
Dušan Kazik
66c36247e9 Added slovak translation (#6191)
Create sk.po and update LINGUAS.
2017-06-25 13:19:10 -04:00
Michael Biebl
40b6b81372 Merge pull request #6189 from keszybz/parse-hwdb-timeout
meson: increase timeout for parse_hwdb.py test to 90 s
2017-06-25 04:01:25 +02:00
Michael Biebl
939c43012a meson: increase timeout for parse_hwdb.py test to 90 s
Fixes #5846.
2017-06-24 19:24:20 -04:00
Zbigniew Jędrzejewski-Szmek
7e867138f5 Merge pull request #5600 from fbuihuu/make-logind-restartable
Make logind restartable.
2017-06-24 18:58:36 -04:00
Waldemar Brodkorb
e7e11bbf34 make nss-systemd support conditional (#6155)
This allows the nss-systemd module to be disabled on minimal installations.
2017-06-24 13:30:26 -04:00
Evgeny Vereshchagin
a4bdea5e31 Merge pull request #6185 from keszybz/env-serialization
Environment serialization fixes
2017-06-24 19:37:45 +03:00
Zbigniew Jędrzejewski-Szmek
a096d8c88f tests: add tests for environment serialization 2017-06-23 20:46:33 -04:00
Zbigniew Jędrzejewski-Szmek
417eefb170 basic/env-util: when serializing, actually use escaping
Fixes #6152.
2017-06-23 20:46:33 -04:00
Zbigniew Jędrzejewski-Szmek
d233c99ac8 manager: just warn about an invalid environment entry
Apart from bugs (as in #6152), this can happen if we ever make
our requirements for environment entries more stringent. As with
the rest of deserialization, we should just warn and continue.
2017-06-23 20:46:33 -04:00
Zbigniew Jędrzejewski-Szmek
62c460c6e2 manager: raise level of notices about failed deserialization
This is something that shouldn't happen. If it does, we want to
know about it.
2017-06-23 20:46:33 -04:00
Torstein Husebø
3561eafa92 core: fix typo (#6183) 2017-06-23 18:53:29 -04:00
Zbigniew Jędrzejewski-Szmek
cb0cf46f45 Merge pull request #6179 from poettering/loopback-addr
Synchronously set up IP addresses of loopback device in loopback-setup.c.
2017-06-23 15:49:40 -04:00
Lennart Poettering
fb8939274a loopback-setup: also add IP addresses to loopback devices
This changes loopback setup to not only start the loopback device but
also add the relevant IP addresses to it. This way, we can synchronously
wait until that's complete, and properly guarantee that loopback setup
is complete at the time we start our first processes.

This is a semi-revert of f3fc48150b, but
heavily updated.

Fixes: #5641
2017-06-23 12:07:03 +02:00
Lennart Poettering
3becdb8ac6 test: show debug log output during test-loopback 2017-06-23 12:06:58 +02:00
Lennart Poettering
a877b1d9a7 Merge pull request #6151 from speakinghedge/6150-LLDP-messages-containing-padding-are-dropped
accept LLDP messages containing padding
2017-06-23 09:57:23 +02:00
hecke
8c7c7100b5 add note that explains relaxed bytes-left check #6150 2017-06-23 08:55:01 +02:00
Lennart Poettering
a462478539 nspawn: make sure to send SIGTERM/SIGHUP to the main nspawn process if stubinit receives SIGRTMIN+3 (#6167)
This code already existed in some form, however commented. Remove the
comments, as this was most likely simply a forgotten commenting for
debugging purposes.

This also extends the logic a bit, by sending SIGHUP right after the
SIGTERM, so that shells will also terminate, when PID 1 gets a
SIGRTMIN+3.

Fixes: #5711
2017-06-22 22:20:09 -04:00
Zbigniew Jędrzejewski-Szmek
9fe4a3d98e Merge pull request #6176 from poettering/timer-boottime-monotonic
WakeSystem= and other timer fixes.
2017-06-22 21:34:39 -04:00
Yu Watanabe
525e9db3b3 meson: do not use path separator for target name (#6177)
Fixes #6158.
2017-06-22 21:27:07 -04:00
Michael Biebl
7cdd978346 meson: install manual and unsafe tests (#6178)
Always install all tests if install-tests is set to true, as they might
be useful for CI. This includes manual and unsafe tests. Install those
in subdirectories of /usr/lib/systemd/tests.

Fixes #6163.
2017-06-22 21:23:30 -04:00
Zbigniew Jędrzejewski-Szmek
53ec2a3226 Merge pull request #6164 from poettering/bus-non-existant-object
sd-bus: don't treat requests for non-existent objects as connection errors
2017-06-22 20:56:59 -04:00
Lennart Poettering
00c83b4300 core: return a friendlier error for a dbus path referring to a non-existent unit
See: #6059
2017-06-22 20:54:54 -04:00
Michal Sekletar
05e33aa1d5 core: unset sysfs path after transition to dead state (#6174)
Device is gone and most likely it will get garbage collected. However in
cases when it doesn't get gc'ed (because it is referenced by some
other unit, e.g. mount from fstab) we need to unset sysfs. This is
because when device appears next time, possibly, with different sysfs
path we need to update the sysfs path. Current code could end up caching
stale sysfs path forever.

In reality this is not a problem for normal disks (unless you swap them
during system runtime). However this issue causes failures to mount
filesystems on LVM where sysfs path depends on activation
order (i.e. logical volumes from volume group that is activated first
get assigned lower dm-X numbers and corresponding syspaths).

Fixes #6126.
2017-06-22 20:29:15 -04:00
Michal Koutný
b007626897 core: dbus: Interpret released names properly (#6175)
When a DBus name is released, NameOwnerChanged signal contains an empty string
as new_owner. Commit bbc2908 changed interpretation of the empty string to a
valid name, which is not consistent with values that are sent by dbus-daemon.

As a side effect, this masks symptoms of systemd-logind dbus disconnections
(#2925) by completely restarting it so it can freshly reconnect to dbus.
2017-06-22 20:26:04 -04:00
Lennart Poettering
c4834ffaef tests: show current monotonic/boottime/realtime clock values in test-time
When debugging time issues its kinda handy to have an easy way to query
the three clocks, hence let's just output them at the beginning of
test-time.
2017-06-22 21:10:34 +02:00
Lennart Poettering
c54be90b28 timer: make sure we use the right monotonic timestamp
This reworks timer_enter_waiting() in a couple of ways in order to clean
it up a bit and fix #5629.

Most importantly, we previously we initialized ts_monotonic to either
the current time in CLOCK_MONOTONIC or in CLOCK_BOOTTIME, depending on
t->wake_system. Then given specific conditions we'd use this time as
base for our timers. And afterwards, if t->wake_system was on we'd
convetr the resulting value from CLOCK_MONOTONIC to CLOCK_BOOTTIME again
— which of course is wrong since we already were in CLOCK_BOOTTIME! This
fixes this logic, by using a triple timestamp so that we always have the
right base around, and initially only calculate in CLOCK_MONOTONIC and
only convert as last step.

Conversion between the clocks is now done with the generic
usec_shift_clock(), and additions via usec_add() making these
calculations a bit safer.

Fixes: #5629
2017-06-22 21:04:20 +02:00
Lennart Poettering
79fc8b9623 timer: convert property_get_next_elapse_monotonic() to use usec_shift_clock()
Let's use the generic clock shifting logic here.
2017-06-22 20:59:48 +02:00
Lennart Poettering
1007ec60e6 time-util: add new call usec_shift_clock() for converting times between clocks
We use that quite often, let's implement one clean version of it.
2017-06-22 20:52:23 +02:00
Lennart Poettering
54d8ef14d8 time-util: rename usec_sub() to usec_sub_signed() and add usec_sub_unsigned()
Quite often we just want to subtract two normal usec_t values, hence
provide an implementation for that.
2017-06-22 20:51:06 +02:00
Lennart Poettering
8825742c44 mkosi: order package list alphabetically again 2017-06-22 20:48:18 +02:00
Lennart Poettering
7be1420f44 dissect: when dissecting block devices, ignore weird MMC RPMB partitions (#6165)
For now, let's just special-case this in the sources. If more partition
types like this show up we should probably find some other solution.

Fixes: #5806
2017-06-22 17:40:50 +02:00
Zbigniew Jędrzejewski-Szmek
670d494690 mkosi: install libidn2 in the final system (#6173)
Recent systemd compiled in a build root which had libidn2-devel installed would
not run in the default installation root which had just libidn and did not have
libidn2. Since a8a2a0ed64 libidn2-devel (or equivalent) is installed in
the build root. Normally, since we install systemd in the installation root,
all dependencies that are needed for the compiled systemd to run are present,
but libidn2 is a new dependency, so the distro packages would just pull in
libidn, and not libidn2.

Temporily add libdn2 to explicitly specified Packages. We can remove that once
distro-compiled systemds have moved to libind2.
2017-06-22 15:23:29 +02:00
Lennart Poettering
f778b8fe27 Merge pull request #6095 from fsateler/machines-mount
nspawn: convert var-lib-machines.mount to an automount
2017-06-22 15:21:57 +02:00
Lennart Poettering
cf2d0085ba Merge pull request #6170 from whot/master
Extend the joystick detection
2017-06-22 15:14:18 +02:00
Evgeny Vereshchagin
1741b25c72 log: pass the correct length to vsnprintf (#6168)
This prevents log_object_internalv from corrupting the stack.
Closes #6147.

Many thanks to Walter Doekes for the code review.
2017-06-21 21:10:29 -04:00
Peter Hutterer
2e856c63d4 udev: always consider devices with joystick axes/buttons as joystick
Even when they don't have an x/y axis.

https://github.com/systemd/systemd/issues/6137

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-22 09:19:53 +10:00
Peter Hutterer
c874fed348 udev: consider a device with BTN_TRIGGER_HAPPY as joystick
These buttons were added specifically for joysticks with lots of buttons, no
other device should be using them. See kernel commit
cf2f765f18960 "HID: handle joysticks with large number of buttons"

We only test for BTN_TRIGGER_HAPPY (an alias for BTN_TRIGGER_HAPPY1) here, a
device that sets buttons 2 and above but doesn't set 1 is considered buggy.

https://github.com/systemd/systemd/issues/6137

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-22 09:19:25 +10:00
Felipe Sateler
2221c17afb machined: add RequiresMountsFor=/var/lib/machines
Since any part of the path could be remote mounted, make sure they are
before starting machined
2017-06-21 16:20:11 -04:00
Felipe Sateler
78d1039d6b nspawn: hook var-lib-machines.mount to machines.target and remote-fs.target
/var can be on a remote filesystem, thus hooking it to local-fs.target is not correct.

Also, only install the mount unit when machined is enabled, because
machined is the one managing the underlying device, and thus makes no
sense without machined.

Fixes #1175
2017-06-21 16:19:20 -04:00
Lennart Poettering
f2bfc6ba45 sd-bus: make sure propagate all errors with vtable callbacks back to clients
Previously we'd propagate errors returned by user callbacks configured
in vtables back to the users only for method handlers and property
get/set handlers. This does the same for child enumeration and when we
check whether a fallback unit exists.

Without this the failure will be treated as a non-recoverable connection
error and result in connection termination.

Fixes: #6059
2017-06-21 20:42:28 +02:00
tblume
c9fb8c7c4a only check signature job error if signature job exists (#6118)
otherwise it will segfault when accessing signature jobs error status
2017-06-21 19:29:58 +02:00
Zbigniew Jędrzejewski-Szmek
4b57a27200 meson: add -pthreads and more libs when -Dlink-udev-shared=false (#6159)
Three binaries would fail to link when ld.bfd was used and link-udev-shared was
false. Add -pthreads (again) to the failing binaries and synchronize the
dependency list between libsystemd-shared .a and .so versions.
Apart from allowing the build to succeed, this shouldn't have much effect becuase
systemd-networkd was already using pthreads.

Fixes #5828.
2017-06-21 12:05:15 +02:00
Amir Pakdel
9d3c1efaa3 hwdb: add axis range corrections for Dell Latitude E7470 (#6156) 2017-06-21 10:23:16 +10:00
AsciiWolf
676a0406a2 HACKING: update qemu-kvm instructions (#6138) 2017-06-20 23:16:16 +02:00
Lukáš Nykrýn
75d96e22d2 github: how to report bugs for older distribution versions (#6146) 2017-06-20 20:20:25 +02:00
Lennart Poettering
6c223c6719 Merge pull request #6113 from keszybz/shell-quoting
Use "dollar-single-quotes" to escape shell-sensitive strings
2017-06-20 20:17:03 +02:00
Zbigniew Jędrzejewski-Szmek
804ee07c13 Use "dollar-single-quotes" to escape shell-sensitive strings
Also called "ANSI-C Quoting" in info:(bash) ANSI-C Quoting.

The escaping rules are a POSIX proposal, and are described in
http://austingroupbugs.net/view.php?id=249. There's a lot of back-and-forth on
the details of escaping of control characters, but we'll be only using a small
subset of the syntax that is common to all proposals and is widely supported.
Unfortunately dash and fish and maybe some other shells do not support it (see
the man page patch for a list).

This allows environment variables to be safely exported using show-environment
and imported into the shell. Shells which do not support this syntax will have
to do something like
    export $(systemctl show-environment|grep -v '=\$')
or whatever is appropriate in their case. I think csh and fish do not support
the A=B syntax anyway, so the change is moot for them.

Fixes #5536.

v2:
- also escape newlines (which currently disallowed in shell values, so this
  doesn't really matter), and tabs (as $'\t'), and ! (as $'!'). This way quoted
  output can be included directly in both interactive and noninteractive bash.
2017-06-19 19:39:43 -04:00
hecke
bc652b81f6 accept LLDP messages containing padding 2017-06-20 01:12:30 +02:00
Lennart Poettering
b1e98c643c github: tweak the issue template a bit more 2017-06-19 12:15:44 +02:00