Commit Graph

28794 Commits

Author SHA1 Message Date
Yu Watanabe c258349f1a tmpfiles: downgrade error message when operation is not supported (#5692)
Fixes #5607
2017-04-10 13:22:18 +02:00
Evgeny Vereshchagin c9b0610856 core: fix values of BindPaths and BindReadOnlyPaths properties on 32-bit platforms (#5713)
$ busctl get-property \
    org.freedesktop.systemd1 \
    /org/freedesktop/systemd1/unit/run_2dr471de87550554a6dbb165501c33c5dab_2eservice \
    org.freedesktop.systemd1.Service BindReadOnlyPaths

a(ssbt) 1 "/etc" "/etc" false 9228635523571007488

The correct values are 0 and 16384
2017-04-10 13:20:17 +02:00
umuttl ddbf0d4b92 core: downgrade legit error logs (#5705)
manager_sync_bus_names() function retrieves the dbus names
and compares it with unit bus names. It could be right
after the list is retrieved, the dbus peer is disconnected.
In this case it is really not an ERROR print if
sd_bus_get_name_creds() or sd_bus_creds_get_unique_name()
fail.
2017-04-10 13:12:25 +02:00
Nathaniel R. Lewis f472d466ec Remove BTN_DPAD_* keys from ID_INPUT_KEY test (#5701)
At present, devices implementing the BTN_DPAD_UP/DOWN/LEFT/RIGHT
codes will be incorrectly classified as key devices.  This causes
devices respecting the Linux gamepad spec (such as the DS3 as of
kernel 4.12) to be classified as keyboards by X11.

This is caused by the test_key function checking all codes on
[KEY_OK, BTN_TRIGGER_HAPPY).  Unfortunately the BTN_DPAD_* codes
are placed between KEY_LIGHTS_TOGGLE and KEY_ALS_TOGGLE.  This
patch splits the upper key block check into the block before and
after the BTN_DPAD_* codes.  An array is used to avoid dedicated,
per block loops in the event that more event codes are added in
the future.
2017-04-06 21:13:14 +02:00
Matt Clarkson 6b5cf3ea62 build-sys: correct blkid.h includes
When using pkg-config to determine the include flags for blkid the
flags are returned as:

    $ pkg-config blkid --cflags
    -I/usr/include/blkid -I/usr/include/uuid

We use the <blkid/blkid.h> include which would be correct when using
the default compiler /usr/include header search path. However, when
cross-compiling the blkid.h will not be installed at /usr/include and
highly likely in a temporary system root. It is futher compounded if
the cross-compile packages are split up and the blkid package is not
available in the same sysroot as the compiler.

Regardless of the compilation setup, the correct include path should be
<blkid.h> if using the pkg-config returned CFLAGS.
2017-04-06 14:33:02 +01:00
Matt Clarkson cf8e2953b5 build-sys: correct ARM32 GNU EFI boot binary build
Due to ARM not having an EFI capable objcopy we need to use the binary
output argument. This is correctly set up for AArch64 but is missed
when building for ARM32. This patch adds the ARCH_ARM automake define
which can then be used in the makefile to determine if to use the
correct linker flags.

The addition of the ARM32 flags is a copy and paste from the AArch64 to
create a logical OR for the ARCH_AARCH64 and ARCH_ARM variables. I
couldn't figure out a better way to create the conditional with basic
Make language constructs.
2017-04-06 14:33:02 +01:00
Matt Clarkson cba49f2dea build-sys: correctly search for gnu-efi header
When the user provides the --with-efi-includedir we incorrectly search
for the header at /usr/include not the provided location. This patch
changes the check to use the provided value so that non-standard header
locations are supported.

This situation occurs commonly when cross-compiling systemd because the
GNU EFI headers and library will not be installed into the root
locations but highly likely a temporary system root.
2017-04-06 14:32:41 +01:00
Lennart Poettering 6cb484cc06 Merge pull request #5706 from keszybz/make-cleanups
Move busctl to its own dir and other cleanups
2017-04-05 12:10:11 +02:00
afrantzis 5e8273acac logind: Stopped inhibitions should be considered inactive (#5698) 2017-04-05 10:32:55 +02:00
Zbigniew Jędrzejewski-Szmek cc566cd06c build-sys: drop obsolete hook from Makefile.am 2017-04-04 22:39:30 -04:00
Zbigniew Jędrzejewski-Szmek 65fbd93915 udev: rename gperf struct name to match other headers
This makes it easier to use the same generator script as for other
gperf scripts. With automake each gperf file had it's own rule, but
with meson I'm trying to use one script, and this inconsistency made
that harder.
2017-04-04 20:36:09 -04:00
Zbigniew Jędrzejewski-Szmek 948aaa7c52 tree-wide: standardize on $(PACKAGE_VERSION) for the version string
We defined both $(VERSION) and $(PACKAGE_VERSION) with the same contents.
$(PACKAGE_VERSION) is slightly more descriptive, so settle on that, and
drop the other define.
2017-04-04 20:36:09 -04:00
Zbigniew Jędrzejewski-Szmek 1b81e156c5 build-sys: drop undefined target ref from Makefile.am 2017-04-04 20:36:09 -04:00
Zbigniew Jędrzejewski-Szmek f52df9bff3 build-sys: drop undefined var ref from Makefile.am 2017-04-04 20:36:09 -04:00
Zbigniew Jędrzejewski-Szmek 79f1c8f619 build-sys: use a single ENABLE_LOGIND conditional
We used ENABLE_LOGIND for the automake conditional, and HAVE_LOGIND
for the ifdef. That wasn't wrong, but it certainly was confusing.

Also, move the ifdeffery to avoid warning about unused static function
logind_set_wall_message() when logind is disabled.
2017-04-04 20:36:09 -04:00
Zbigniew Jędrzejewski-Szmek a75e27eb70 shared/dissect-image: fix warning about unused function when !HAVE_BLKID 2017-04-04 20:36:09 -04:00
Zbigniew Jędrzejewski-Szmek 3bcaf458f6 Move busctl sources to src/busctl
busctl is not part of libsystemd, and should not be stored under libsystemd.
In particular this is confusing because busctl is linked with libshared, but
stuff in libsystemd is not supposed to depend on libshared.
2017-04-04 20:36:09 -04:00
Martin Pitt 91dacd4451 po: fix typo in pt_BR
See https://github.com/systemd/systemd/pull/5694#issuecomment-291446842
2017-04-04 12:08:46 +02:00
Lucas Werkmeister 77d3bb1200 man: fix <function> tag (#5686) 2017-04-04 08:47:30 +02:00
Rafael Fontenelle 259a751691 Update Brazilian Portuguese translation (#5694) 2017-04-03 23:29:09 +02:00
wiertel 40591b4183 hwdb: Asus TP300LJ accelerometer quirks (#5681)
iio-sensor-proxy expects the accelerometer oriented as follows:
positive x - to the right, positive y - up (opposite to gravity).
The hardware in the Asus TP300LJ-DW049H is however oriented
differently:
positive x - down, positive y - to the left
This commit adds a ACCEL_MOUNT_MATRIX quirk for this
particular laptop model.
2017-04-03 09:53:10 +02:00
Yu Watanabe 4d8b0f0f7a core: downgrade error message if command is prefixed with `-` and the command is not found
Fixes #5621
2017-04-03 15:38:37 +09:00
Lennart Poettering 88be0aa226 Merge pull request #5589 from jasonreeder/claimed_address_fix
libsystemd-network: sd-ipv4ll: acquire new address after claimed addr…
2017-04-01 11:41:58 +02:00
Lennart Poettering 3007f25fd4 Merge pull request #5558 from dm0-/nspawn-resolved
nspawn: fix DNS when the stub listener is disabled
2017-04-01 11:39:08 +02:00
Jason Reeder 0698ff4184 libsystemd-network: sd-ipv4ll: acquire new address after claimed address conflict
If a conflict occurs on a claimed ipv4ll address, the device releases
the address and then does not attempt to acquire a new ipv4ll
address. According to RFC3927, releasing the address in this
situation is correct. However, this should be followed by an attempt
to configure a new ipv4ll address.

This commit restarts the ipv4ll address acquisition state machine
after releasing the conflicting address.

From RFC3927 Section 2.5 conflict defense method (b):
...
However, if this is not the first conflicting ARP packet the host has
seen, and the time recorded for the previous conflicting ARP packet is
recent, within DEFEND_INTERVAL seconds, then the host MUST immediately
cease using this address and configure a new IPv4 Link-Local address
as described above.
...

Signed-off-by: Jason Reeder <jasonreeder@gmail.com>
2017-03-31 15:40:18 -05:00
Jason Reeder 5e25a13a05 libsystemd-network: sd-ipv4ll: Wrapper to restart address aquisition after conflict
After an ipv4ll claimed address conflict occurs a new address needs
to be chosen and then the acquisition state machine needs to be
restarted.

This commit adds a function (sd_ipv4ll_restart) that clears the
previously acquired address (ll->address) and then calls the existing
sd_ipv4ll_start function to choose the new address and start the
acquisition.

Signed-off-by: Jason Reeder <jasonreeder@gmail.com>
2017-03-31 15:29:00 -05:00
David Michael 7357272ed1 nspawn: check if the DNS stub is listening for requests 2017-03-31 11:34:32 -07:00
David Michael 7ed1565a9d resolved: add a DNSStubListener property to Manager 2017-03-31 11:33:58 -07:00
Franck Bui 765a00b98d udev: net_id - support predictable ifnames on vio buses (#5675)
For IBM PowerVM Virtual I/O network devices, we can build predictable names
based on the slot number passed as part of the OF "reg" property.  Valid slot
numbers range between 2-32767, so we only need the bottom half of the unit
address passed.

For example:

  /proc/device-tree/vdevice/l-lan@30000002
  /proc/device-tree/vdevice/vnic@30000005

would initially map to something like:

  /sys/devices/vio/30000002/net/eth0
  /sys/devices/vio/30000005/net/eth1

and would then translate to env2 and env5

This patch ignores the bus number, as there should only ever be one bus, and
then remove leading zeros.
2017-03-31 16:32:09 +02:00
hendrikw01 6554550f35 networkd: RFC compliant autonomous prefix handling (#5636)
Previously, `lifetime_valid` of a Router Advertisement was not handled
the way RFC4862 has specified.

In particular: Sections 5.5.3.d and  5.5.3.e
2017-03-31 15:10:59 +02:00
Lennart Poettering 510cb1ce89 Merge pull request #5534 from ssahani/vxlan-label
networkd: vxlan support setting IPv6 flow label
2017-03-31 11:30:33 +02:00
Susant Sahani 0b180d754c networkd: fix route_new_static assert when IPv4LLRoute=true (#5676)
fixes: #5664
2017-03-31 08:29:20 +02:00
Michael Biebl 3daffa82c4 doc: spell out handle-* options, use <literal> syntax (#5673) 2017-03-31 08:01:41 +02:00
Yu Watanabe b0b46a2c12 journal-upload: add state file directory to ReadWritePaths (#5578)
The commit c7fb922d62 prohibits
journal-upload to save its state in /var/lib/systemd/journal-upload/state,
thus the daemon fails and outputs the following error message even if
the directory is not read-only file system
```Cannot save state to /var/lib/systemd/journal-upload/state: Read-only file system```
This commit adds the permission the daemon to write the state file.
2017-03-30 18:01:03 +02:00
Martin Pitt 969faed189 Merge pull request #5670 from poettering/trivialities
trivial doc fixes
2017-03-30 15:09:28 +02:00
Michael Biebl b6a20306fa journal: fix up syslog facility when forwarding native messages (#5667)
Native journal messages (_TRANSPORT=journal) typically don't have a
syslog facility attached to it. As a result when forwarding the messages
to syslog they ended up with facility 0 (LOG_KERN).
Apply syslog_fixup_facility() so we use LOG_USER instead.

Fixes: #5640
2017-03-30 11:56:25 +02:00
Lennart Poettering b493bdafa9 man: use <varlistentry> for all unit entries
So far, all sections of the systemd.special(7) man page used
<varlistentry> for listing the targets, with one exception: the
"Special Passive User Units" one. Let's clean this up and use the same
formatting everywhere.
2017-03-30 11:54:45 +02:00
Lennart Poettering 4f5e972279 README: document that gperf 3.1 is required for building now 2017-03-30 11:54:23 +02:00
tblume 4e6f13af93 units: move Before deps for quota services to remote-fs.target (#5627)
Creating quota on an iscsi device is causing dependency loops at next reboot.
Reason is that systemd-quotacheck and quotaon.service are ordered before
local-fs.target and quota enabled mounts have a before dependency to them.
This cannot work for _netdev mounts, because network activation is ordered
after local-fs.target.
Moving the Before dependency for systemd-quotacheck and quotaon.service
to remote-fs.target fixes this.
2017-03-30 11:21:18 +02:00
Lukáš Nykrýn bd9ad4ff5b sysv-generator: Provides: $network should also pull network.target to transaction (#5652)
network.target should be pulled in to the transaction
by the unit that provides network services, but currently
for initscripts it only pulls in network-online.target.
2017-03-30 11:12:50 +02:00
Franck Bui 9aeac5c623 serial-getty@.service.m4: add Conflicts=/Before= against rescue.service (#5632)
Commit 5ed020d8d1 already fixed this issue for
getty@.service but forgot serial console.

Note that this is not needed for emergency target as the sysinit target
conflicts against this target already.
2017-03-30 10:39:16 +02:00
Michael Biebl 3ebfa4df79 man: clarify that handle-lid-switch is a low level inhibitor lock (#5662)
… like the other handle-*-key inhibitor locks.

Follow-up for 05b2a8fd7a

Fixes: #5647
2017-03-30 10:12:54 +02:00
Lennart Poettering 7e65c6e501 Merge pull request #5663 from keszybz/test-sizeof-more
Add a few `struct timespec`-related types to `test-sizeof`
2017-03-30 09:58:05 +02:00
Zbigniew Jędrzejewski-Szmek 0c183e963d test-sizeof: add some struct-timespec related fields
Might help with #5264.
2017-03-29 21:31:58 -04:00
Zbigniew Jędrzejewski-Szmek 61d1a5a25c test-sizeof: do not link with libsystemd-shared
This makes it much quicker to compile.
2017-03-29 21:31:21 -04:00
Jan Synacek ab88312570 basic: forbid rm_rf() to remove paths ending with ".." (#5653)
Fixes: #5644
2017-03-29 08:25:52 +02:00
Zbigniew Jędrzejewski-Szmek 9e49656037 units: make enablement of s-n-wait-online.service follow systemd-networkd.service (#5635)
In 58a6dd1558 s-n-wait-online.service was added
to presets to synchronize the presets with the state after installation. But it
is harmful to have s-n-wait-online.service enabled when s-n.service is
disabled, because s-n-wait-online.service has Requsite=s-n.service and cannot
be activated. Thus remove s-n-wait-online.service from presets again, and let
it be enabled whenever s-n.service is enabled.

During installation we create enablement symlinks by hand, and since s-n.service
is enabled, s-n-w-o.service should be enabled too, so the symlink should still
be created during installation.

https://bugzilla.redhat.com/show_bug.cgi?id=1433459#c15
2017-03-27 12:55:55 +02:00
Zbigniew Jędrzejewski-Szmek 5a664ca10f rules: add a rule to set /dev/kvm access mode and ownership (#5597)
Kernel default mode is 0600, but distributions change it to group kvm, mode
either 0660 (e.g. Debian) or 0666 (e.g. Fedora). Both approaches have valid
reasons (a stricter mode limits exposure to bugs in the kvm subsystem, a looser
mode makes libvirt and other virtualization mechanisms work out of the box for
unprivileged users over ssh).

In Fedora the qemu package carries the relevant rule, but it's nicer to have it
in systemd, so that the permissions are not dependent on the qemu package being
installed. Use of packaged qemu binaries is not required to make use of
/dev/kvm, e.g. it's possible to use a self-compiled qemu or some alternative.

https://bugzilla.redhat.com/show_bug.cgi?id=1431876

To accomodate both approaches, add a rule to set the mode in 50-udev-default.rules,
but allow the mode to be overridden with a --with-dev-kvm-mode configure rule.
The default is 0660, as the (slightly) more secure option.
2017-03-27 12:34:24 +02:00
flussence d7e228d9fe hwdb: add resolution values for Waltop USB tablet (#5634)
Newer versions of libinput need this to recognise it as an input device.

https://bugs.freedesktop.org/show_bug.cgi?id=99664
2017-03-26 20:00:40 -04:00
Thomas Haller 1539a651a9 basic: don't link "libm.so" into "libbasic.so" (#5628)
Very few parts of the systemd source require <math.h> or "libm.so".
Linking libbasic with -lm drags the mathematical library in for all
systemd components, and in turn for all users of systemd libraries.

It's just unneeded.
2017-03-24 15:36:06 +01:00