]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
7 years agorules: allow quirks for platform input accelerometers
Thomas Hindoe Paaboel Andersen [Fri, 3 Mar 2017 20:23:39 +0000 (21:23 +0100)] 
rules: allow quirks for platform input accelerometers

7 years agoAvoid strict DM interface version dependencies (#5519)
Michael Biebl [Thu, 2 Mar 2017 18:11:37 +0000 (19:11 +0100)] 
Avoid strict DM interface version dependencies (#5519)

Compiling against the dm-ioctl.h header as provided by the Linux kernel
will embed the DM interface version number. Running an older kernel can
result in an error like this on shutdown:

Could not detach DM dm-11: ioctl mismatch, kernel(4.34.4), user(4.35.4)

Work around this by shipping a local copy of dm-ioctl.h. We need at
least the version from 3.13 for DM_DEFERRED_REMOVE [1], so bump the
requirements in README accordingly.

[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2c140a246dc0bc085b98eddde978060fcec1080c

Fixes: #5492
7 years agobuild-sys: do not require everything to be rebuild to push man pages (#5521)
Zbigniew Jędrzejewski-Szmek [Thu, 2 Mar 2017 16:55:45 +0000 (11:55 -0500)] 
build-sys: do not require everything to be rebuild to push man pages (#5521)

When the doc-sync target was created, we didn't have man target yet.

7 years agoMerge pull request #5515 from glaubitz/master
Lennart Poettering [Thu, 2 Mar 2017 16:54:13 +0000 (17:54 +0100)] 
Merge pull request #5515 from glaubitz/master

Refine sub-architecture detection in basic/architecture

7 years agobasic/architecture: Add sub-architecture types for SuperH 5515/head
John Paul Adrian Glaubitz [Thu, 2 Mar 2017 00:51:53 +0000 (01:51 +0100)] 
basic/architecture: Add sub-architecture types for SuperH

On SuperH, there are multiple sub-architectures defined with
different values for LIB_ARCH_TUPLE. The different sub-
architectures can be detected by checking whether __SH1__,
__SH2__, __SH3__, __SH4__, and so on are defined.

7 years agobasic/architecture: Properly set LIB_ARCH_TUPLE for powerpcspe
John Paul Adrian Glaubitz [Thu, 2 Mar 2017 00:51:11 +0000 (01:51 +0100)] 
basic/architecture: Properly set LIB_ARCH_TUPLE for powerpcspe

On powerpc, there are two possible ABIs and hence values for
LIB_ARCH_TUPLE. The convential type with an FPU and the embedded
variant, called powerpcspe, which does not have a convential FPU
but a special Signal Processing Engine (SPE). The latter can be
detected by checking whether __NO_FPRS__ is defined.

7 years agobasic/architecture: Properly set LIB_ARCH_TUPLE for x32
John Paul Adrian Glaubitz [Thu, 2 Mar 2017 00:50:36 +0000 (01:50 +0100)] 
basic/architecture: Properly set LIB_ARCH_TUPLE for x32

On x86_64, there are two possible ABIs and hence values for
LIB_ARCH_TUPLE. The convential 64-bit type and the 32-bit
variant, called x32. The latter can be detected by checking
whether __ILP32__ is defined.

7 years agoRevert "environment.d: fix date"
Zbigniew Jędrzejewski-Szmek [Thu, 2 Mar 2017 00:27:44 +0000 (19:27 -0500)] 
Revert "environment.d: fix date"

This reverts commit 46987593ccb1c78f3889ea91a0c94f9cc810d43c.

Pushed to the wrong repo, sorry.

7 years agoenvironment.d: fix date
Zbigniew Jędrzejewski-Szmek [Thu, 2 Mar 2017 00:27:09 +0000 (19:27 -0500)] 
environment.d: fix date

7 years agoNEWS: fix word (#5514)
Lucas Werkmeister [Thu, 2 Mar 2017 00:08:32 +0000 (01:08 +0100)] 
NEWS: fix word (#5514)

7 years agohwdb: Endless ELT-NL3 accelerometer support
Daniel Drake [Tue, 28 Feb 2017 17:54:53 +0000 (11:54 -0600)] 
hwdb: Endless ELT-NL3 accelerometer support

The Endless ELT-NL3 laptop has an accelerometer but its values are
not being interpreted correctly, meaning that it's very easy to end up
with the screen rotated inappropriately.

Add an appropriate mount matrix to correct the values.

P: /devices/LNXSYSTM:00/LNXSYBUS:00/ACCE0001:00
E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/ACCE0001:00
E: DRIVER=cmpc_accel_v4
E: ID_VENDOR_FROM_DATABASE=Accton Technology Corporation
E: MODALIAS=acpi:ACCE0001:
E: SUBSYSTEM=acpi

P: /devices/LNXSYSTM:00/LNXSYBUS:00/ACCE0001:00/input/input8
E: ABS=7
E: ACCEL_MOUNT_MATRIX=0, 1, 0; 0, 0, -1; -1, 0, 0
E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/ACCE0001:00/input/input8
E: EV=9
E: ID_FOR_SEAT=input-acpi-ACCE0001_00
E: ID_INPUT=1
E: ID_INPUT_ACCELEROMETER=1
E: ID_PATH=acpi-ACCE0001:00
E: ID_PATH_TAG=acpi-ACCE0001_00
E: IIO_SENSOR_PROXY_TYPE=input-accel
E: MODALIAS=input:b0000v0000p0000e0000-e0,3,kra0,1,2,mlsfw
E: NAME="cmpc_accel_v4"
E: PRODUCT=0/0/0/0
E: PROP=0
E: SUBSYSTEM=input
E: SYSTEMD_WANTS=iio-sensor-proxy.service
E: TAGS=:seat:systemd:

P: /devices/LNXSYSTM:00/LNXSYBUS:00/ACCE0001:00/input/input8/event7
N: input/event7
E: ACCEL_MOUNT_MATRIX=0, 1, 0; 0, 0, -1; -1, 0, 0
E: DEVNAME=/dev/input/event7
E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/ACCE0001:00/input/input8/event7
E: ID_INPUT=1
E: ID_INPUT_ACCELEROMETER=1
E: ID_PATH=acpi-ACCE0001:00
E: ID_PATH_TAG=acpi-ACCE0001_00
E: IIO_SENSOR_PROXY_TYPE=input-accel
E: MAJOR=13
E: MINOR=71
E: SUBSYSTEM=input
E: SYSTEMD_WANTS=iio-sensor-proxy.service
E: TAGS=:power-switch:systemd:

7 years agoudev: Allow quirks for ACPI input accelerometers
Daniel Drake [Tue, 28 Feb 2017 17:38:18 +0000 (11:38 -0600)] 
udev: Allow quirks for ACPI input accelerometers

The existing accelerometer rules only support IIO devices, however
iio-sensor-proxy can also work with accelerometers made available
through the input (evdev) subsystem.

In this case I am working with an accelerometer input device backed by an
ACPI driver for which the hierarchy is:
ACCE0001 (ACPI device)
  -> input8
    -> event7

We want the mount matrix (from hwdb) to be applied to both input8 and
event7. However, to match in 60-sensor.hwdb, we need to be working
with the modalias of the parent device (ACCE0001), and it is tricky
to access that when processing the input8 device which has it's own
modalias.

Instead of working directly with modalias, this ACPI-specific rule
uses the "hid" attribute to reconstruct the ACPI modalias. Since input
and event devices do not provide a hid attribute we will always get this
from the ACPI parent.

The modalias is constructed according to the definition in the kernel's
Documentation/acpi/namespace.txt and create_pnp_modalias(). We will only
use the first _CID/_HID value available, i.e. in some cases we will only
reconstruct the first part of the modalias, but that should be enough
granularity for our needs.

7 years agoMerge pull request #5283 from poettering/tighten-sandbox
Lennart Poettering [Wed, 1 Mar 2017 22:35:06 +0000 (23:35 +0100)] 
Merge pull request #5283 from poettering/tighten-sandbox

Tighten sandbox of long-running services

7 years agoNEWS: 'systemd' is always spelt with a lowercase 's' v233
Lennart Poettering [Wed, 1 Mar 2017 21:43:06 +0000 (22:43 +0100)] 
NEWS: 'systemd' is always spelt with a lowercase 's'

7 years agoNEWS: add note about 'make install-tests' (#5512)
Zbigniew Jędrzejewski-Szmek [Wed, 1 Mar 2017 21:29:38 +0000 (16:29 -0500)] 
NEWS: add note about 'make install-tests' (#5512)

7 years agoMerge pull request #5502 from poettering/coredump-mini-fixes
Lennart Poettering [Wed, 1 Mar 2017 21:14:33 +0000 (22:14 +0100)] 
Merge pull request #5502 from poettering/coredump-mini-fixes

Coredump mini improvments

7 years agoNEWS: reorder entries by subject, fix some typos and descriptions (#5511)
Zbigniew Jędrzejewski-Szmek [Wed, 1 Mar 2017 21:14:12 +0000 (16:14 -0500)] 
NEWS: reorder entries by subject, fix some typos and descriptions (#5511)

This doesn't add anything major, but moves some stuff around.
In particular changes which might require updates to the build
environment (new kernel requirements, cgroup stuff, dbus, etc)
are moved to the top, where it's most likely that people will
read them. In particular cgroup hierarchy changes are moved to the
top because they're most likely to be problematic.

Various items are grouped by subject where it's easy.

The description of list-jobs --after/--before was reversed.

7 years agoudev: Use parent bus id for virtio disk builtin path-id (#5500)
Viktor Mihajlovski [Wed, 1 Mar 2017 20:30:17 +0000 (21:30 +0100)] 
udev: Use parent bus id for virtio disk builtin path-id (#5500)

The builtin path id for virtio block devices has been changed
to use the bus id without a prefix "virtio-pci" to be
compatible with all virtio transport types.

In order to not break existing setups, the by-path symlinks for
virtio block devices on the PCI bus are reintroduced by udev rules.
The virtio-pci symlinks are considered to be deprecated and
should be replaced by the native PCI symlinks.

Example output for a virtio disk in PCI slot 7:
 $ ls  /dev/disk/by-path
 pci-0000:00:07.0
 pci-0000:00:07.0-part1
 virtio-pci-0000:00:07.0
 virtio-pci-0000:00:07.0-part1

See also
[1] https://lists.freedesktop.org/archives/systemd-devel/2017-February/038326.html
[2] https://lists.freedesktop.org/archives/systemd-devel/2017-March/038397.html

This reverts f073b1b but keeps the same symlinks for compatibility.

7 years agoman: escape: fix --suffix examples (#5508)
Lucas Werkmeister [Wed, 1 Mar 2017 20:24:18 +0000 (21:24 +0100)] 
man: escape: fix --suffix examples (#5508)

systemd-escape does not permit the suffix to begin with a dot.

7 years agoRevert "util: Fine tune running_in_chroot() a bit" (#5506)
Lennart Poettering [Wed, 1 Mar 2017 20:22:02 +0000 (21:22 +0100)] 
Revert "util: Fine tune running_in_chroot() a bit" (#5506)

This reverts commit 295ee9845c801300298d01256eb5a9e3ff117ae0.

Let'd revert this for now, see #5446 for discussions.

We want systemd-detect-virt --chroot to return true for all chroot-like stuff, for
example mock environments which have use a mount namespace. The downside
of this revert that systemctl will not work from our own namespaced services, anything
with RootDirectory=/RootImage= set.

7 years agoman: systemd: fix description of SIGRTMIN+26,27,28 (#5505)
Lucas Werkmeister [Wed, 1 Mar 2017 17:33:02 +0000 (18:33 +0100)] 
man: systemd: fix description of SIGRTMIN+26,27,28 (#5505)

7 years agocoredump: define a macro for a "short bus call timeout" 5502/head
Lennart Poettering [Wed, 1 Mar 2017 15:00:47 +0000 (16:00 +0100)] 
coredump: define a macro for a "short bus call timeout"

I think it would be a good idea to move such fixed, picked values out of
the main sources into the head of a file, to make sure they are
ultimately tunables.

7 years agocoredump: introduce is_journald_crash() and is_pid1_crash() helpers
Lennart Poettering [Wed, 1 Mar 2017 14:58:40 +0000 (15:58 +0100)] 
coredump: introduce is_journald_crash() and is_pid1_crash() helpers

We check these a number of times, hence let's unify these checks here.
This also allows us to make the PID 1 check more elaborate as we can
check both the PID and the cgroup. Checking the PID has the benefit that
we'll also cover cases where PID 1 might still be in the root cgroup, and
the cgroup check has the benefit that we also cover crashes in forked
off crasher processes (the way we actually do it in systemd)

7 years agocoredump: normalize generation/parsing of COREDUMP_TRUNCATED=
Lennart Poettering [Wed, 1 Mar 2017 14:46:54 +0000 (15:46 +0100)] 
coredump: normalize generation/parsing of COREDUMP_TRUNCATED=

Given that this is a field primarily processed by computers, and not so
much by humans, assign "1" instead of "yes". Also, use parse_boolean()
as we usually do for parsing it again.

This makes things more alike udev options (as one example), such as
SYSTEMD_READY where we also spit out "1" and "0", and parse with
parse_boolean().

7 years agomount-util: accept that name_to_handle_at() might fail with EPERM (#5499)
Lennart Poettering [Wed, 1 Mar 2017 16:35:05 +0000 (17:35 +0100)] 
mount-util: accept that name_to_handle_at() might fail with EPERM (#5499)

Container managers frequently block name_to_handle_at(), returning
EACCES or EPERM when this is issued. Accept that, and simply fall back
to to fdinfo-based checks.

Note that we accept either EACCES or EPERM here, as container managers
can choose the error code and aren't very good on agreeing on just one.

(note that this is a non-issue with nspawn, as we permit
name_to_handle_at() there, only block open_by_handle_at(), which should
be sufficiently safe).

7 years agoupdate NEWS for v233 (#5503)
Lennart Poettering [Wed, 1 Mar 2017 16:21:29 +0000 (17:21 +0100)] 
update NEWS for v233 (#5503)

7 years agocore: when a unit's SourcePath points to API VFS pretend we are never out-of-date...
Lennart Poettering [Wed, 1 Mar 2017 15:25:08 +0000 (16:25 +0100)] 
core: when a unit's SourcePath points to API VFS pretend we are never out-of-date (#5487)

If the unit's SourcePath is below /proc then it's a unit genreated from
a kernel resource (such as a .mount or .swap unit). And those we watch
anyway, and hence should never be out-of-date.

Fixes: #5461
7 years agoMerge pull request #5458 from keszybz/coredump
Lennart Poettering [Wed, 1 Mar 2017 13:37:15 +0000 (14:37 +0100)] 
Merge pull request #5458 from keszybz/coredump

Fix for coredump crash

7 years agoMerge pull request #5494 from poettering/run-fixes
Zbigniew Jędrzejewski-Szmek [Wed, 1 Mar 2017 04:03:12 +0000 (23:03 -0500)] 
Merge pull request #5494 from poettering/run-fixes

systemd-run --user fixes.

7 years agoresolved: add the new KSK to the built-in resolved trust anchor (#5486)
Lennart Poettering [Wed, 1 Mar 2017 03:49:19 +0000 (04:49 +0100)] 
resolved: add the new KSK to the built-in resolved trust anchor (#5486)

Fixes: #5482
7 years agoautomount: if an automount unit is masked, don't react to activation anymore (#5445)
Lennart Poettering [Wed, 1 Mar 2017 03:03:48 +0000 (04:03 +0100)] 
automount: if an automount unit is masked, don't react to activation anymore (#5445)

Otherwise we'll hit an assert sooner or later.

This requires us to initialize ->where even if we come back in "masked"
mode, as otherwise we don't know how to operate on the automount and
detach it.

Fixes: #5441
7 years agocoredumpctl: avoid spurious warning about systemd-coredump@0.service 5458/head
Zbigniew Jędrzejewski-Szmek [Wed, 1 Mar 2017 02:47:45 +0000 (21:47 -0500)] 
coredumpctl: avoid spurious warning about systemd-coredump@0.service

Fixes #5477.

7 years agocoredumpctl: print a hint when no journal files are found
Zbigniew Jędrzejewski-Szmek [Sun, 26 Feb 2017 23:07:39 +0000 (18:07 -0500)] 
coredumpctl: print a hint when no journal files are found

[guest@fedora ~]$ coredumpctl
No coredumps found.

[guest@fedora ~]$ ./coredumpctl
Hint: You are currently not seeing messages from other users and the system.
      Users in groups 'adm', 'systemd-journal', 'wheel' can see all messages.
      Pass -q to turn off this notice.
No coredumps found.

Fixes #1733.

7 years agojournalctl: move access_check() to shared/
Zbigniew Jędrzejewski-Szmek [Sun, 26 Feb 2017 23:00:39 +0000 (18:00 -0500)] 
journalctl: move access_check() to shared/

The only functional change is that log_notice("No journal files were found.")
is not printed any more with --quiet. log_error("No journal files were opened
due to insufficient permissions.") is still printed.

I wasn't quite sure where to put this function, but shared/ seems to be the
right place and none of the existing files seem to fit too well.

v2: rename journal_access_check to journal_access_check_and_warn.

7 years agocoredumpctl: use a 3s timeout for checking units
Zbigniew Jędrzejewski-Szmek [Sun, 26 Feb 2017 22:00:01 +0000 (17:00 -0500)] 
coredumpctl: use a 3s timeout for checking units

This is just a hint, so we shouldn't wait too long. A short timeout
helps for the case where pid1 of dbus have crashed.

7 years agocoredump: process special crashes in an (almost) normal way
Zbigniew Jędrzejewski-Szmek [Sun, 26 Feb 2017 21:46:23 +0000 (16:46 -0500)] 
coredump: process special crashes in an (almost) normal way

We would only log a terse message when pid1 or systemd-journald crashed.
It seems better to reuse the normal code paths as much as possible,
with the following differences:
- if pid1 crashes, we cannot launch the helper, so we don't analyze the
 coredump, just write it to file directly from the helper invoked by the
 kernel;
- if journald crashes, we can produce the backtrace, but we don't log full
  structured messages.

With comparison to previous code, advantages are:
- we go through most of the steps, so for example vacuuming is performed,
- we gather and log more data. In particular for journald and pid1 crashes we
  generate a backtrace, and for pid1 crashes we record the metadata (fdinfo,
  maps, etc.),
- coredumpctl shows pid1 crashes.

A disavantage (inefficiency) is that we gather metadata for journald crashes
which is then ignored because _TRANSPORT=kernel does not support structued
messages.

Messages for the systemd-journald "crash" have _TRANSPORT=kernel, and
_TRANSPORT=journal for the pid1 "crash".

Feb 26 16:27:55 systemd[1]: systemd-journald.service: Main process exited, code=dumped, status=11/SEGV
Feb 26 16:27:55 systemd[1]: systemd-journald.service: Unit entered failed state.
Feb 26 16:37:54 systemd-coredump[18801]: Process 18729 (systemd-journal) of user 0 dumped core.
Feb 26 16:37:54 systemd-coredump[18801]: Coredump diverted to /var/lib/systemd/coredump/core.systemd-journal.0.36c14bf3c6ce4c38914f441038990979.18729.1488145074000000.lz4
Feb 26 16:37:54 systemd-coredump[18801]: Stack trace of thread 18729:
Feb 26 16:37:54 systemd-coredump[18801]: #0  0x00007f46d6a06b8d fsync (libpthread.so.0)
Feb 26 16:37:54 systemd-coredump[18801]: #1  0x00007f46d71bfc47 journal_file_set_online (libsystemd-shared-233.so)
Feb 26 16:37:54 systemd-coredump[18801]: #2  0x00007f46d71c1c31 journal_file_append_object (libsystemd-shared-233.so)
Feb 26 16:37:54 systemd-coredump[18801]: #3  0x00007f46d71c3405 journal_file_append_data (libsystemd-shared-233.so)
Feb 26 16:37:54 systemd-coredump[18801]: #4  0x00007f46d71c4b7c journal_file_append_entry (libsystemd-shared-233.so)
Feb 26 16:37:54 systemd-coredump[18801]: #5  0x00005577688cf056 write_to_journal (systemd-journald)
Feb 26 16:37:54 systemd-coredump[18801]: #6  0x00005577688d2e98 dispatch_message_real (systemd-journald)
Feb 26 16:37:54 kernel: systemd-coredum: 9 output lines suppressed due to ratelimiting
Feb 26 16:37:54 systemd-journald[18810]: Journal started

Feb 26 16:50:59 systemd-coredump[19229]: Due to PID 1 having crashed coredump collection will now be turned off.
Feb 26 16:51:00 systemd[1]: Caught <SEGV>, dumped core as pid 19228.
Feb 26 16:51:00 systemd[1]: Freezing execution.
Feb 26 16:51:00 systemd-coredump[19229]: Process 19228 (systemd) of user 0 dumped core.

                                         Stack trace of thread 19228:
                                         #0  0x00007fab82075c47 kill (libc.so.6)
                                         #1  0x000055fdf7c38b6b crash (systemd)
                                         #2  0x00007fab824175c0 __restore_rt (libpthread.so.0)
                                         #3  0x00007fab82148573 epoll_wait (libc.so.6)
                                         #4  0x00007fab8366f84a sd_event_wait (libsystemd-shared-233.so)
                                         #5  0x00007fab836701de sd_event_run (libsystemd-shared-233.so)
                                         #6  0x000055fdf7c4a380 manager_loop (systemd)
                                         #7  0x000055fdf7c402c2 main (systemd)
                                         #8  0x00007fab82060401 __libc_start_main (libc.so.6)
                                         #9  0x000055fdf7c3818a _start (systemd)

Poor machine ;)

7 years agoMerge pull request #5493 from poettering/service-mini-fixes
Martin Pitt [Tue, 28 Feb 2017 22:23:18 +0000 (23:23 +0100)] 
Merge pull request #5493 from poettering/service-mini-fixes

three small mini-fixes for src/core/service.c

7 years agohostname: detect detachable dmi chassis type (#5489)
David Herrmann [Tue, 28 Feb 2017 20:57:58 +0000 (21:57 +0100)] 
hostname: detect detachable dmi chassis type (#5489)

Detect the 'Detachable' dmi chassis type properly. Use the new
'convertible' chassis class of hostnamed, instead of returning the
generic 'computer' chassis class.

7 years agocryptsetup-generator: run cryptsetup service before swap unit (#5480)
Mauricio Faria de Oliveira [Tue, 28 Feb 2017 20:30:22 +0000 (17:30 -0300)] 
cryptsetup-generator: run cryptsetup service before swap unit (#5480)

If the cryptsetup service unit and swap unit for a swap device
are not strictly ordered, it might happen that the swap unit
activates/mounts the swap device before its cryptsetup service unit
has a chance to run the 'mkswap' command (that it is programmed to).

This leads to the following error:

             Starting Cryptography Setup for sda3_crypt...
    [  OK  ] Found device /dev/mapper/sda3_crypt.
             Activating swap /dev/mapper/sda3_crypt...
    [  OK  ] Activated swap /dev/mapper/sda3_crypt.
    [  OK  ] Reached target Swap.
    [FAILED] Failed to start Cryptography Setup for sda3_crypt.
    See 'systemctl status systemd-cryptsetup@sda3_crypt.service' for
    details.
    [DEPEND] Dependency failed for Encrypted Volumes.

Which happens because the swap device is already mounted:

    # systemctl status systemd-cryptsetup@sda3_crypt.service
    <...>
       Active: failed (Result: exit-code) since Mon 2017-02-27 14:21:43 CST;
    54s ago
    <...>

    <...> systemd[1]: Starting Cryptography Setup for sda3_crypt...
    <...> mkswap[2420]: mkswap: error: /dev/mapper/sda3_crypt is mounted;
    will not make swapspace
    <...>

So, modify cryptsetup-generator to include a 'Before=' option for the
respective 'dev-mapper-%i.swap' device in the cryptsetup service unit.

Now, correct ordering is ensured, and the error no longer occurs:

             Starting Cryptography Setup for sda3_crypt...
    [  OK  ] Found device /dev/mapper/sda3_crypt.
    [  OK  ] Started Cryptography Setup for sda3_crypt.
             Activating swap /dev/mapper/sda3_crypt...
    [  OK  ] Reached target Encrypted Volumes.
    [  OK  ] Activated swap /dev/mapper/sda3_crypt.
    [  OK  ] Reached target Swap.

7 years agoudev rules: add udev rule to create /dev/ptp_kvm (#5495)
Lennart Poettering [Tue, 28 Feb 2017 20:28:21 +0000 (21:28 +0100)] 
udev rules: add udev rule to create /dev/ptp_kvm (#5495)

Its necessary to specify the KVM PTP device name in userspace.

In case a network card with PTP device is assigned to the guest,
it might be the case that KVM PTP gets /dev/ptp0 instead of /dev/ptp1.

Fix a device name for the KVM PTP device.

7 years agorun: also pin unit when we we are in --pty mode 5494/head
Lennart Poettering [Tue, 28 Feb 2017 17:27:42 +0000 (18:27 +0100)] 
run: also pin unit when we we are in --pty mode

Since 95f1d6bfecde60b245fae1ab0313b550201e7880 we'll subscribe to unit
signals to figure out when to disconnect the pty. But that can only work
correctly if we actually subscribe to the unit's signals. Hence,
explicitly pin (and thus subscribe to) the unit we just created not only
in --wait mode but also in --pty mode.

Or to say this differently: we need to pin the unit in the same cases as
we install the signal match. 95f1d6bfecde60b245fae1ab0313b550201e7880
forgot to do that.

This is relevant to make sure systemd-run works correctly in --user
mode, and correctly exits when the spawned service dies. To test:

systemd-run --user -t /bin/bash

And then press ^D. This will hang before this change, but exit cleanly
after it.

7 years agocore: always consider clients that pinned a unit to be subscribers
Lennart Poettering [Tue, 28 Feb 2017 16:55:57 +0000 (17:55 +0100)] 
core: always consider clients that pinned a unit to be subscribers

If a client pins a unit, then it makes sense to also implicitly make it
a subscriber. This is useful for clients that just want to watch one
specific unit: they can pin it and receive its messages.

7 years agoupdate TODO
Lennart Poettering [Tue, 28 Feb 2017 16:22:14 +0000 (17:22 +0100)] 
update TODO

7 years agosystemctl: fix bad memory access when mangle_names() fails (#5485)
Lennart Poettering [Tue, 28 Feb 2017 15:55:18 +0000 (16:55 +0100)] 
systemctl: fix bad memory access when mangle_names() fails (#5485)

Fixes #5483

7 years agoMerge pull request #5491 from poettering/hwdb-update-v233
Martin Pitt [Tue, 28 Feb 2017 15:52:46 +0000 (16:52 +0100)] 
Merge pull request #5491 from poettering/hwdb-update-v233

hwbd: update once again for 233

7 years agoservice: refuse using PID 1 as MAINPID for a service 5493/head
Lennart Poettering [Tue, 28 Feb 2017 15:08:40 +0000 (16:08 +0100)] 
service: refuse using PID 1 as MAINPID for a service

7 years agoservice: make use of log_unit_warning_errno()'s return value
Lennart Poettering [Tue, 28 Feb 2017 15:08:21 +0000 (16:08 +0100)] 
service: make use of log_unit_warning_errno()'s return value

7 years agocore: use PID_FMT where appropriate
Lennart Poettering [Tue, 28 Feb 2017 15:07:56 +0000 (16:07 +0100)] 
core: use PID_FMT where appropriate

7 years agoupdate TODO
Lennart Poettering [Tue, 28 Feb 2017 14:24:10 +0000 (15:24 +0100)] 
update TODO

7 years agoupdate TODO 5491/head
Lennart Poettering [Tue, 28 Feb 2017 14:20:22 +0000 (15:20 +0100)] 
update TODO

7 years agoMerge pull request #5464 from ssahani/label
Lennart Poettering [Tue, 28 Feb 2017 14:11:57 +0000 (15:11 +0100)] 
Merge pull request #5464 from ssahani/label

socket-util: introduce address_label_valid

7 years agoMerge pull request #5484 from dvdhrm/convertible
Lennart Poettering [Tue, 28 Feb 2017 14:11:36 +0000 (15:11 +0100)] 
Merge pull request #5484 from dvdhrm/convertible

hostname: support 'convertible' chassis

7 years agohwbd: update once again for 233
Lennart Poettering [Tue, 28 Feb 2017 14:07:49 +0000 (15:07 +0100)] 
hwbd: update once again for 233

7 years agoMerge pull request #5438 from ssahani/vxlan-address
Lennart Poettering [Tue, 28 Feb 2017 11:32:18 +0000 (12:32 +0100)] 
Merge pull request #5438 from ssahani/vxlan-address

networkd: add symlinks for Makefile (netdev and wait-online) , vxlan enhancements.

7 years agonetworkd: use address_label_valid for label validation 5464/head
Susant Sahani [Tue, 28 Feb 2017 11:24:33 +0000 (16:54 +0530)] 
networkd: use address_label_valid for label validation

7 years agosocket-util: introduce address_label_valid
Susant Sahani [Tue, 28 Feb 2017 11:23:58 +0000 (16:53 +0530)] 
socket-util: introduce address_label_valid

7 years agohostname: detect convertible dmi chassis type 5484/head
David Herrmann [Tue, 28 Feb 2017 10:58:14 +0000 (11:58 +0100)] 
hostname: detect convertible dmi chassis type

Detect the 'Convertible' dmi chassis type properly. Use the new
'convertible' chassis class of hostnamed, instead of returning the
generic 'computer' chassis class.

Based on a patch by Jani Nikula <jani.nikula@intel.com>.

7 years agohostname: add 'convertible' chassis type
David Herrmann [Tue, 28 Feb 2017 10:54:52 +0000 (11:54 +0100)] 
hostname: add 'convertible' chassis type

Add the 'convertible' type to the set of allowed chassis. This applies
to all devices that can be transformed by the user from laptop style to
tablet style.

This does not add any auto-detection, yet. It only makes 'set-chassis'
accept 'convertible' as valid input.

7 years agoFix MIPS N64 and N32 LIB_ARCH_TUPLE (#5469)
YunQiang Su [Tue, 28 Feb 2017 10:35:40 +0000 (18:35 +0800)] 
Fix MIPS N64 and N32 LIB_ARCH_TUPLE (#5469)

* Fix MIPS N64 and N32 LIB_ARCH_TUPLE

For mips, we have 3 major ABIs, they are N64, N32 and O32.
Both N32 and N64 defined __mips64__, and only N64 defined __LP64__.

7 years agonetworkd: fix assertion crash for tunnel, log error instead (#5465)
Susant Sahani [Tue, 28 Feb 2017 09:32:22 +0000 (15:02 +0530)] 
networkd: fix assertion crash for tunnel, log error instead (#5465)

GRE6 and IP6TNL address should be a IPv6.

fix :

```
Assertion 't->family == AF_INET6' failed at src/network/netdev/tunnel.c:170,
function netdev_ip6gre_fill_message_create(). Aborting.
```

7 years agohwdb: release PageUp on Acer Aspire 7750G (#5476) 5217/head
xTibor [Mon, 27 Feb 2017 19:55:43 +0000 (20:55 +0100)] 
hwdb: release PageUp on Acer Aspire 7750G (#5476)

7 years agobuild-sys: add LIB_ARCH_TUPLE for tilegx-linux-gnu (#5474)
Martin Pitt [Mon, 27 Feb 2017 19:54:11 +0000 (20:54 +0100)] 
build-sys: add LIB_ARCH_TUPLE for tilegx-linux-gnu (#5474)

Fix build failure on the tilegx architecture.

https://bugs.debian.org/856306

7 years agosd-boot: stub: check LoadOptions contains data (#5467)
Mikko Ylinen [Mon, 27 Feb 2017 19:03:07 +0000 (21:03 +0200)] 
sd-boot: stub: check LoadOptions contains data (#5467)

With some UEFI shells LoadOptionsSize is reported being > 0
but the corresponding LoadOptions does not contain any data
(the first element has value 0).

When that happens, the stub feature that allows .cmdline to be
replaced by what's in LoadOptions ends up copying nothing/random
data to the kernel cmdline resulting in different kinds of boot
problems.

To fix this, add a check to see if LoadOptions contains data
before replacing the .cmdline.

Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com>
7 years agoman: fix typo (#5468)
AsciiWolf [Mon, 27 Feb 2017 12:59:11 +0000 (13:59 +0100)] 
man: fix typo (#5468)

7 years agoman: systemctl list-timers: Provide sample output and document it. (#5463) 5447/head
Mark Stosberg [Mon, 27 Feb 2017 01:03:30 +0000 (20:03 -0500)] 
man: systemctl list-timers: Provide sample output and document it. (#5463)

As with `systemctl list-sockets` and `systemctl status`, we provide a sample
output for `systemctl list-timers` and document what the columns mean.

7 years agocoredumpctl,man: mark truncated messages as such in output
Zbigniew Jędrzejewski-Szmek [Sat, 25 Feb 2017 22:29:14 +0000 (17:29 -0500)] 
coredumpctl,man: mark truncated messages as such in output

Unit systemd-coredump@1-3854-0.service is failed/failed, not counting it.
TIME                            PID   UID   GID SIG COREFILE  EXE
Fri 2017-02-24 11:11:00 EST   10002  1000  1000   6 none      /home/zbyszek/src/systemd-work/.libs/lt-Sat 2017-02-25 00:49:32 EST   26921     0     0  11 error     /usr/libexec/fprintd
Sat 2017-02-25 11:56:30 EST   30703  1000  1000   - -         /usr/bin/python3.5
Sat 2017-02-25 13:16:54 EST    3275  1000  1000  11 present   /usr/bin/bash
Sat 2017-02-25 17:25:40 EST    4049  1000  1000  11 truncated /usr/bin/bash

For info and gdb output, the filename is marked in red and "(truncated)" is
appended. (Red is necessary because the annotation is hard to see when running
under a pager.)

Fixed #3883.

7 years agocoredumpctl: add debug information which services count towards the warning
Zbigniew Jędrzejewski-Szmek [Sat, 25 Feb 2017 22:14:00 +0000 (17:14 -0500)] 
coredumpctl: add debug information which services count towards the warning

A few times I have seen the hint unexpectedly. Add this so debug info
so it's easier to see what's happening.

...
Unit systemd-coredump@0-3119-0.service is failed/failed, not counting it.
Unit systemd-coredump@1-3854-0.service is activating/start-pre, counting it.
...
-- Notice: 1 systemd-coredump@.service unit is running, output may be incomplete.

7 years agocoredump: when storing an incomplete coredump, add COREDUMP_TRUNCATED=yes
Zbigniew Jędrzejewski-Szmek [Sat, 25 Feb 2017 21:38:00 +0000 (16:38 -0500)] 
coredump: when storing an incomplete coredump, add COREDUMP_TRUNCATED=yes

We logged about this, but did not attach information directly to the log
entry. It *would* be nice to log the full untruncated size, but afaict, to do
this, we would have to read the full data from the kernel. Doing this just to
log that information seems a bit excessive, in particular when the limit could
be set quite low. So for now let's just add a boolean field.

7 years agocoredump: do not try to access unitialized CONTEXT_COMM field
Zbigniew Jędrzejewski-Szmek [Sat, 25 Feb 2017 19:00:39 +0000 (14:00 -0500)] 
coredump: do not try to access unitialized CONTEXT_COMM field

Most of the fields in the context array come from the kernel (passed
through argv), but two are special: comm and exe. We allocate them
ourselves. We forgot to initialize context[CONTEXT_COMM] with the value
we allocated (introduced in 9aa820231414baa28e6bf02a033932cb69ff6b8b).
To simplify things, just set context[CONTEXT_COMM] and context[CONTEXT_EXE],
and free those two fields at the end.

Fixes #5442.

7 years agobuild-sys: make "incomatible pointer types" warnings fatal (#5459)
Martin Pitt [Sun, 26 Feb 2017 20:28:43 +0000 (21:28 +0100)] 
build-sys: make "incomatible pointer types" warnings fatal (#5459)

This isn't something that can be safely ignored, and easy to miss. This
prevents errors like issue #5452.

7 years agogpt-auto-generator: fix warning when compiling w/o efi (#5456)
Zbigniew Jędrzejewski-Szmek [Sun, 26 Feb 2017 07:24:39 +0000 (02:24 -0500)] 
gpt-auto-generator: fix warning when compiling w/o efi (#5456)

Fixes #5452.

7 years agoREADME: document dependency on kernel crypto/hash API (#5457)
Mike Gilbert [Sun, 26 Feb 2017 03:42:27 +0000 (22:42 -0500)] 
README: document dependency on kernel crypto/hash API (#5457)

The hmac and sha256 algorithms are used in sd-id128.

Closes: https://github.com/systemd/systemd/issues/5454
Closes: https://github.com/systemd/systemd/issues/5455
7 years agocoredump: slight simplification
Zbigniew Jędrzejewski-Szmek [Sat, 25 Feb 2017 14:35:09 +0000 (09:35 -0500)] 
coredump: slight simplification

7 years agoNEWS: fix typo (#5453)
Thomas H. P. Andersen [Sat, 25 Feb 2017 14:19:26 +0000 (15:19 +0100)] 
NEWS: fix typo (#5453)

7 years agoMerge pull request #5449 from keszybz/blkd-error-handling
Martin Pitt [Sat, 25 Feb 2017 11:25:27 +0000 (12:25 +0100)] 
Merge pull request #5449 from keszybz/blkd-error-handling

blkid error handling

7 years agoMerge pull request #5429 from GiedriusS/master
Zbigniew Jędrzejewski-Szmek [Sat, 25 Feb 2017 02:35:38 +0000 (21:35 -0500)] 
Merge pull request #5429 from GiedriusS/master

coredumpctl: implement --since/--until (-S/-U) for info/list verbs

7 years agoMerge pull request #5444 from poettering/cgroups-revert-no-error
Zbigniew Jędrzejewski-Szmek [Fri, 24 Feb 2017 23:48:57 +0000 (18:48 -0500)] 
Merge pull request #5444 from poettering/cgroups-revert-no-error

Revert "core: simplify cg_[all_]unified()" and more.

7 years agoshell-completion: include the new coredumpctl options 5429/head
Giedrius Statkevičius [Fri, 24 Feb 2017 19:30:59 +0000 (21:30 +0200)] 
shell-completion: include the new coredumpctl options

7 years agoman/coredumpctl: document the new options -S/-U
Giedrius Statkevičius [Fri, 24 Feb 2017 19:30:41 +0000 (21:30 +0200)] 
man/coredumpctl: document the new options -S/-U

7 years agocoredumpctl: implement --since/--until (-S/-U) for info/list verbs
Giedrius Statkevičius [Fri, 24 Feb 2017 19:29:40 +0000 (21:29 +0200)] 
coredumpctl: implement --since/--until (-S/-U) for info/list verbs

Implement --since/--until (-S/-U) in the same fashion as journalctl.
This lets the user filter the results a bit so it would be easier to
find relevant info in case there were many core dumps.

7 years agonetworkd: add symlinks to the Makefile for dir netdev and wait-online 5438/head
Susant Sahani [Thu, 23 Feb 2017 11:11:47 +0000 (16:41 +0530)] 
networkd: add symlinks to the Makefile for dir netdev and wait-online

7 years agonetworkd: add support for vxlan Remote and Local.
Susant Sahani [Fri, 24 Feb 2017 19:01:47 +0000 (00:31 +0530)] 
networkd: add support for vxlan Remote and Local.

This patch add supports to configure IFLA_VXLAN_LOCAL
and IFLA_VXLAN_GROUP.

The "Group" is renamed to "Remote" which is a multicast address.`

```
Description=vxlan-test
Name=vxlan1
Kind=vxlan

[VXLAN]
Id=33
Local=2001:db8:2f4:4bff:fa71:1a56
Remote=FF02:0:0:0:0:0:1:9
```

output
```
ip -d link show vxlan1
16: vxlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1430 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether fe:b4:97:03:f8:e5 brd ff:ff:ff:ff:ff:ff promiscuity 0
    vxlan id 33 group ff02::1:9 local 2001:db8:02f4:4bff:fa71:1a56 dev enp0s3 srcport 0 0 dstport 8472 ageing 300 noudpcsum noudp6zerocsumtx noudp6zerocsumrx addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535

```

7 years agoFix missing space in comments (#5439)
AsciiWolf [Fri, 24 Feb 2017 17:14:02 +0000 (18:14 +0100)] 
Fix missing space in comments (#5439)

7 years agocgroup: rework cg_all_unified() 5444/head
Lennart Poettering [Fri, 24 Feb 2017 17:05:31 +0000 (18:05 +0100)] 
cgroup: rework cg_all_unified()

Let's just check the unified level, directly. There's really no value in
wrapping cg_unified_controllers() with this, i.e. potentially do string
comparison when there's no reason to.

Also, this makes the clal more alike cg_hybrid_unified().

7 years agocgroup: rename cg_update_unified() → cg_unified_update()
Lennart Poettering [Fri, 24 Feb 2017 17:03:09 +0000 (18:03 +0100)] 
cgroup: rename cg_update_unified() → cg_unified_update()

We usually put the noun first, the verb (i.e. method) secont, for
example in cg_unified_flush(), let's follow the logic here...

7 years agocgroup: rename cg_unified() → cg_unified_controller()
Lennart Poettering [Fri, 24 Feb 2017 17:00:04 +0000 (18:00 +0100)] 
cgroup: rename cg_unified() → cg_unified_controller()

cg_unified() is a bit generic a name, let's make clear that it checks
whether a specified controller is in unified mode.

7 years agocgroup: change cg_unified() to possibly return errors again
Lennart Poettering [Fri, 24 Feb 2017 16:52:58 +0000 (17:52 +0100)] 
cgroup: change cg_unified() to possibly return errors again

We use our cgroup APIs in various contexts, including from our libraries
sd-login, sd-bus. As we don#t control those environments we can't rely
that the unified cgroup setup logic succeeds, and hence really shouldn't
assert on it.

This more or less reverts 415fc41ceaeada2e32639f24f134b1c248b9e43f.

7 years agocgroup-util: check unified_cache before invoking streq()
Lennart Poettering [Fri, 24 Feb 2017 14:53:17 +0000 (15:53 +0100)] 
cgroup-util: check unified_cache before invoking streq()

Just a minor optimization.

7 years agosd-netlink: fix type for IFLA_VXLAN_LOCAL
Susant Sahani [Thu, 23 Feb 2017 18:03:55 +0000 (23:33 +0530)] 
sd-netlink: fix type for IFLA_VXLAN_LOCAL

7 years agotest: add support for in_addr_is_multicast tests
Susant Sahani [Thu, 23 Feb 2017 17:59:31 +0000 (23:29 +0530)] 
test: add support for in_addr_is_multicast tests

7 years agosocket-util: introduce in_addr_is_multicast
Susant Sahani [Thu, 23 Feb 2017 17:58:12 +0000 (23:28 +0530)] 
socket-util: introduce in_addr_is_multicast

This patch add support to test whether a internet
address is multicast or not.

7 years agoMerge pull request #4670 from htejun/systemd-controller-on-unified-v2
Lennart Poettering [Thu, 23 Feb 2017 15:23:02 +0000 (16:23 +0100)] 
Merge pull request #4670 from htejun/systemd-controller-on-unified-v2

Systemd controller on unified v2

7 years agoMerge pull request #5434 from poettering/udev-log-revert
Evgeny Vereshchagin [Thu, 23 Feb 2017 12:06:03 +0000 (15:06 +0300)] 
Merge pull request #5434 from poettering/udev-log-revert

Udev log revert

7 years agojournal: avoid duplicated call to get cgroup path (#5404)
Namhyung Kim [Thu, 23 Feb 2017 12:04:57 +0000 (21:04 +0900)] 
journal: avoid duplicated call to get cgroup path (#5404)

The cg_pid_get_path_shifted() is called twice during
server_dispatch_message().  We can get rid of the second by passing the
path to dispatch_message_real().

7 years agoRevert "udev: Introduce UDEV_PROPAGATE_LOG macro (#5302)" 5434/head
Lennart Poettering [Thu, 23 Feb 2017 11:36:07 +0000 (12:36 +0100)] 
Revert "udev: Introduce UDEV_PROPAGATE_LOG macro (#5302)"

This reverts commit c22569eeeafa94cf510267071f5b75c4ab714e09.

Let's revert this for now, since it apparently doesn't fix the problem
at hand.

7 years agoRevert "Makefile.am: add a `\` (#5422)"
Lennart Poettering [Thu, 23 Feb 2017 11:36:04 +0000 (12:36 +0100)] 
Revert "Makefile.am: add a `\` (#5422)"

This reverts commit 00d1e0c9def4557c74f46cc2fe3a7ebc32a1dc8a.

7 years agotest-cgroup-util: add a "test" to print out cg_is_*_wanted() values 4670/head
Zbigniew Jędrzejewski-Szmek [Thu, 23 Feb 2017 00:57:11 +0000 (19:57 -0500)] 
test-cgroup-util: add a "test" to print out cg_is_*_wanted() values

This isn't terribly useful because /sys/fs/cgroup will usually be mounted.
But it at least allows checking if the values make sense in this case.

7 years agocgroup-util: fix the case of default=unified, unified-cgroup-hierarchy=0
Zbigniew Jędrzejewski-Szmek [Thu, 23 Feb 2017 00:55:31 +0000 (19:55 -0500)] 
cgroup-util: fix the case of default=unified, unified-cgroup-hierarchy=0

We should mount the hybrid hierarchy if the user disabled the unified
hierarchy on the kernel command line.

7 years agoMerge pull request #5424 from segfault-cc/master
Peter Hutterer [Thu, 23 Feb 2017 00:02:17 +0000 (10:02 +1000)] 
Merge pull request #5424 from segfault-cc/master

Added hwdb rule for E5570 laptop (PointingStick)

7 years agoman: journalctl: update --new-id128 format count (#5423)
Lucas Werkmeister [Wed, 22 Feb 2017 18:58:01 +0000 (19:58 +0100)] 
man: journalctl: update --new-id128 format count (#5423)

The Python format was added in d489071fb3.