platform/upstream/systemd.git
6 years agoMerge pull request #9958 from yuwata/sd-device-enum-set
Zbigniew Jędrzejewski-Szmek [Sat, 15 Sep 2018 16:33:18 +0000 (18:33 +0200)]
Merge pull request #9958 from yuwata/sd-device-enum-set

sd-device: make sd_device_enumerator_get_*_next() not destroy the list

6 years agoMerge pull request #10070 from keszybz/test-reporting
Yu Watanabe [Sat, 15 Sep 2018 06:55:15 +0000 (15:55 +0900)]
Merge pull request #10070 from keszybz/test-reporting

Test reporting improvements

6 years agoMerge pull request #10089 from yuwata/fix-oss-fuzz-10350
Evgeny Vereshchagin [Sat, 15 Sep 2018 02:36:44 +0000 (05:36 +0300)]
Merge pull request #10089 from yuwata/fix-oss-fuzz-10350

bus-util: use _printf_ attribute

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10350.

6 years agotest-catalog: drop unused variable
Yu Watanabe [Fri, 14 Sep 2018 16:58:50 +0000 (01:58 +0900)]
test-catalog: drop unused variable

Follow-up for 49cdae63d168b2fe0e19f9f090b90d79de3c39bb.

6 years agobus-util: use _printf_ attribute
Yu Watanabe [Fri, 14 Sep 2018 16:49:29 +0000 (01:49 +0900)]
bus-util: use _printf_ attribute

Follow-up for eda193578effbc3cee0f6d56ade52434778737c9.

Fixes oss-fuzz#10350.

6 years agosocket-util: attempt SO_RCVBUFFORCE/SO_SNDBUFFORCE only if SO_RCVBUF/SO_SNDBUF fails
Franck Bui [Fri, 14 Sep 2018 07:24:08 +0000 (09:24 +0200)]
socket-util: attempt SO_RCVBUFFORCE/SO_SNDBUFFORCE only if SO_RCVBUF/SO_SNDBUF fails

Both SO_SNDBUFFORCE and SO_RCVBUFFORCE requires capability 'net_admin'.

If this capability is not granted to the service the first attempt to increase
the recv/snd buffers (via sd_notify()) with SO_RCVBUFFORCE/SO_SNDBUFFORCE will
fail, even if the requested size is lower than the limit enforced by the
kernel.

If apparmor is used, the DENIED logs for net_admin will show up. These log
entries are seen as red warning light, because they could indicate that a
program has been hacked and tries to compromise the system.

It would be nicer if they can be avoided without giving services (relying on
sd_notify) net_admin capability or dropping DENIED logs for all such services
via their apparmor profile.

I'm not sure if sd_notify really needs to forcibly increase the buffer sizes,
but at least if the requested size is below the kernel limit, the capability
(hence the log entries) should be avoided.

Hence let's first ask politely for increasing the buffers and only if it fails
then ignore the kernel limit if we have sufficient privileges.

6 years agoMerge pull request #9920 from yuwata/udev-cleanup-4
Zbigniew Jędrzejewski-Szmek [Fri, 14 Sep 2018 08:05:59 +0000 (10:05 +0200)]
Merge pull request #9920 from yuwata/udev-cleanup-4

udev: drop unused udev structs and use verbs in udevadm

6 years agotests: add a helper function to skip with errno
Zbigniew Jędrzejewski-Szmek [Thu, 13 Sep 2018 14:11:16 +0000 (16:11 +0200)]
tests: add a helper function to skip with errno

6 years agotests: use a helper function to parse environment and open logging
Zbigniew Jędrzejewski-Szmek [Thu, 13 Sep 2018 12:31:13 +0000 (14:31 +0200)]
tests: use a helper function to parse environment and open logging

The advantages are that we save a few lines, and that we can override
logging using environment variables in more test executables.

6 years agotest-condition: make function return void
Zbigniew Jędrzejewski-Szmek [Thu, 13 Sep 2018 11:35:03 +0000 (13:35 +0200)]
test-condition: make function return void

We don't look at the result anyway.

6 years agotests: add helper to unify skipping a test and exiting
Zbigniew Jędrzejewski-Szmek [Thu, 13 Sep 2018 11:34:12 +0000 (13:34 +0200)]
tests: add helper to unify skipping a test and exiting

6 years agoman: fix typo (#10084)
Harshit Jain [Fri, 14 Sep 2018 07:04:10 +0000 (12:34 +0530)]
man: fix typo (#10084)

fixes #10083

6 years agouser-runtime-dir@.service: don't stop on runlevel switch (#10079)
Alan Jenkins [Fri, 14 Sep 2018 03:11:57 +0000 (04:11 +0100)]
user-runtime-dir@.service: don't stop on runlevel switch (#10079)

Followup to commit 13cf422e04b7 ("user@.service: don't kill user manager at runlevel switch")

I think there's a general rule that units with `StopWhenUnneeded=yes` need
`IgnoreOnIsolate=yes`...  But it doesn't apply to `suspend.target` and friends.
`printer.target` and friends break on isolate even if we apply the rule[1].
That just leaves `graphical-session.target`, which is a user service.
"isolate" is *mostly* a weird attempt to emulate runlevels, so I decided
not to worry about it for user services.

[1] https://github.com/systemd/systemd/issues/6505#issuecomment-320644819

6 years agoreplace https://github.com/systemd/systemd/blob/master/doc/* with https://github...
killermoehre [Thu, 13 Sep 2018 11:53:03 +0000 (13:53 +0200)]
replace https://github.com/systemd/systemd/blob/master/doc/* with https://github.com/systemd/systemd/blob/master/docs/* to point to proper documentation

6 years agouser@.service: don't kill user manager at runlevel switch
Thomas Blume [Wed, 12 Sep 2018 13:10:58 +0000 (15:10 +0200)]
user@.service: don't kill user manager at runlevel switch

Loggin in as root user and then switching the runlevel results in a
stop of the user manager, even though the user ist still logged in.
That leaves a broken user session.

Adding "IgnoreOnIsolate=true" to user@.service fixes this.

6 years agotest: unset $XDG_{CONFIG,DATA}_DIRS
Yu Watanabe [Thu, 13 Sep 2018 07:37:33 +0000 (16:37 +0900)]
test: unset $XDG_{CONFIG,DATA}_DIRS

When $XDG_DATA_DIRS is unset, then, the default value
'/usr/local/share:/usr/share' is used.
When $XDG_DATA_DIRS contain the default paths but the order
is inverted: '/usr/share:/usr/local/share', then test-path-lookup fails.

Fixes #10002.

6 years agomeson: drop some unneeded parens
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 14:57:06 +0000 (16:57 +0200)]
meson: drop some unneeded parens

6 years agomeson: always allow compilation of tests binaries
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 14:52:08 +0000 (16:52 +0200)]
meson: always allow compilation of tests binaries

6 years agoNEWS: remove repeated "slightly"
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 14:11:15 +0000 (16:11 +0200)]
NEWS: remove repeated "slightly"

6 years agomeson: do not build tests by default when '-Dtests=false'
Yu Watanabe [Wed, 12 Sep 2018 12:47:56 +0000 (21:47 +0900)]
meson: do not build tests by default when '-Dtests=false'

[zj: it is still possible to build tests explicitly by calling
     ninja -C build test-name. This way we have full flexibility.]

6 years agotest: log when skipping tests in more cases
Yu Watanabe [Wed, 12 Sep 2018 12:52:31 +0000 (21:52 +0900)]
test: log when skipping tests in more cases

Follow-up for the previous commit.

6 years agotest: when skipping tests, always print something
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 11:25:45 +0000 (13:25 +0200)]
test: when skipping tests, always print something

It is quite confusing if the test "fails" without printing anything at all.

A typo in an 'if' statement is also fixed.

6 years agomeson: disable _all_ tests when -Dtests=false
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 09:08:49 +0000 (11:08 +0200)]
meson: disable _all_ tests when -Dtests=false

Back in 08318a2c5acb3d0e4243c36461e69a3e45482441, value "false" was enabled for
'-Dtests=', but various tests were not conditionalized properly. So even with
-Dtests=false -Dslow-tests=false we'd run 120 tests. Let's make this consistent.

6 years agomeson: disable "slow tests" too when tests are generally disabled
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 09:02:58 +0000 (11:02 +0200)]
meson: disable "slow tests" too when tests are generally disabled

We would have a strange situation where after setting -Dslow-tests=true -Dtests=false
we'd get mostly the slow tests (plus some other ones which I'll fix in
subsequent commit). Let's simplify things by making -Dtests=false just
disable those tests too.

6 years agotest-barrier: just make this a slow test
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 07:55:39 +0000 (09:55 +0200)]
test-barrier: just make this a slow test

test-barrier was using a custom mechanism to skip itself. Let's
just follow the normal scheme.

6 years agotests: centralize check for slow tests
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 07:45:17 +0000 (09:45 +0200)]
tests: centralize check for slow tests

6 years agoupdate TODO
Lennart Poettering [Wed, 12 Sep 2018 19:39:14 +0000 (21:39 +0200)]
update TODO

6 years agonspawn: use copy-static if systemd-resolved is up and image is writable
afg [Wed, 29 Aug 2018 01:20:27 +0000 (09:20 +0800)]
nspawn: use copy-static if systemd-resolved is up and image is writable

6 years agoMerge pull request #10061 from xnox/fix-logindless-scheduled-shutdown
Lennart Poettering [Wed, 12 Sep 2018 18:45:31 +0000 (20:45 +0200)]
Merge pull request #10061 from xnox/fix-logindless-scheduled-shutdown

Fix logindless scheduled shutdown

6 years agoMerge pull request #10060 from yuwata/property-take-value
Lennart Poettering [Wed, 12 Sep 2018 18:17:53 +0000 (20:17 +0200)]
Merge pull request #10060 from yuwata/property-take-value

bus-util: make --property= optionaly take value

6 years agotest: use ${builddir}/systemd-runtest.env for $SYSTEMD_CATALOG_DIR
Filipe Brandenburger [Wed, 12 Sep 2018 07:23:40 +0000 (00:23 -0700)]
test: use ${builddir}/systemd-runtest.env for $SYSTEMD_CATALOG_DIR

This makes it so that tests no longer need to know the absolute paths to the
source and build dirs, instead using the systemd-runtest.env file to get these
paths when running from the build tree.

Confirmed that test-catalog works on `ninja test`, when called standalone and
also when the environment file is not present, in which case it will use the
installed location under /usr/lib/systemd/catalog.

The location can now also be overridden for this test by setting the
$SYSTEMD_CATALOG_DIR environment variable.

6 years agotest: use ${builddir}/systemd-runtest.env to set $SYSTEMD_TEST_DATA
Filipe Brandenburger [Wed, 12 Sep 2018 06:55:02 +0000 (23:55 -0700)]
test: use ${builddir}/systemd-runtest.env to set $SYSTEMD_TEST_DATA

This simplifies get_testdata_dir() to simply checking for an environment
variable, with an additional function to locate a systemd-runtest.env file in
the same directory as the test binary and reading environment variable
assignments from that file if it exists.

This makes it possible to:
- Run `ninja test` from the build dir and have it use ${srcdir}/test for
  test unit definitions.
- Run a test directly, such as `build/test-execute` and have it locate
  them correctly.
- Run installed tests (from systemd-tests package) and locate the test
  units in the installed location (/usr/lib/systemd/tests/testdata), in
  which case the absence of the systemd-runtest.env file will have
  get_testdata_dir() use the installed location hardcoded into the
  binaries.

Explicit setting of $SYSTEMD_TEST_DATA still overrides the contents of
systemd-runtest.env.

6 years agotest: remove support for suffix in get_testdata_dir()
Filipe Brandenburger [Wed, 12 Sep 2018 06:15:09 +0000 (23:15 -0700)]
test: remove support for suffix in get_testdata_dir()

Instead, use path_join() in callers wherever needed.

6 years agoSet theme jekyll-theme-slate
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 09:51:27 +0000 (11:51 +0200)]
Set theme jekyll-theme-slate

6 years agobash-completion: systemctl: re-implement __filter_units_by_properties()
Yu Watanabe [Wed, 12 Sep 2018 03:36:22 +0000 (12:36 +0900)]
bash-completion: systemctl: re-implement __filter_units_by_properties()

This also unifies __filter_units_by_property() and
__filter_units_by_properties(), and makes completion for 'restart',
'reload' or 'stop' show more candidates.

6 years agobus-util: make --property= optionally take value
Yu Watanabe [Tue, 11 Sep 2018 08:18:14 +0000 (17:18 +0900)]
bus-util: make --property= optionally take value

6 years agoMerge pull request #10046 from yuwata/fix-10045
Michael Biebl [Tue, 11 Sep 2018 21:30:16 +0000 (23:30 +0200)]
Merge pull request #10046 from yuwata/fix-10045

test: use installed catalogs when test-catalog is not located at build dir

6 years agosystemctl: correctly proceed to immediate shutdown if scheduling fails
Dimitri John Ledkov [Tue, 11 Sep 2018 09:41:56 +0000 (10:41 +0100)]
systemctl: correctly proceed to immediate shutdown if scheduling fails

Actually check the return code from logind_schedule_shutdown() and proceed to
immediate shutdown if that fails. Negative return codes can be returned if
systemctl is compiled without logind support, or if logind otherwise failed
(either too old, disabled/masked, or it is incomplete
systemd-shim/systemd-service implementation).

6 years agodhcp: fix assertion starting DHCP client without MAC address (#10054)
Thomas Haller [Tue, 11 Sep 2018 00:45:48 +0000 (02:45 +0200)]
dhcp: fix assertion starting DHCP client without MAC address (#10054)

An assertion in dhcp_network_bind_raw_socket() is triggered when
starting an sd_dhcp_client without setting a MAC address first.

  - sd_dhcp_client_start()
    - client_start()
      - client_start_delayed()
        - dhcp_network_bind_raw_socket()

In that case, the arp-type and MAC address is still unset. Note that
dhcp_network_bind_raw_socket() already checks for a valid arp-type
and MAC address below, so we should just gracefully return -EINVAL.

Maybe sd_dhcp_client_start() should fail earlier when starting without
MAC address. But the failure here will be correctly propagated and
the start aborted.

Fixes: 76253e73f9c9c24fec755e485516f3b55d0707b4

6 years agotest: make test-catalog relocatable
Yu Watanabe [Tue, 11 Sep 2018 00:18:33 +0000 (09:18 +0900)]
test: make test-catalog relocatable

Fixes #10045.

6 years agotest: introduce test_is_running_from_builddir()
Yu Watanabe [Tue, 11 Sep 2018 00:17:22 +0000 (09:17 +0900)]
test: introduce test_is_running_from_builddir()

6 years agohwdb: Update PNP IDs of Goldstar (now: LG Electronics). (#10051)
Dariusz Gadomski [Mon, 10 Sep 2018 22:35:30 +0000 (00:35 +0200)]
hwdb: Update PNP IDs of Goldstar (now: LG Electronics). (#10051)

hwdb: Update PNP IDs of Goldstar (now: LG Electronics)

6 years agonspawn: always use mode 555 for /sys
Franck Bui [Mon, 10 Sep 2018 12:17:32 +0000 (14:17 +0200)]
nspawn: always use mode 555 for /sys

When a network namespace is needed, /sys is mounted as tmpfs (see commit
d8fc6a000fe21b0c1ba27f for details).

But in this case mode 755 was used as initial permissions for /sys whereas the
default mode for sysfs is 555.

In practice using 755 doesn't have any impact because /sys is mounted read-only
too but for consistency, let's use the correct mode.

Fixes: #10050

6 years agoRevert "systemctl: if no logind, don't try to schedule shutdown"
Dimitri John Ledkov [Mon, 10 Sep 2018 18:54:12 +0000 (19:54 +0100)]
Revert "systemctl: if no logind, don't try to schedule shutdown"

This reverts commit c68867da320de296917820e5a76e902a8a86be5a.

6 years agoRevert "systemctl: fix compilation w/o logind"
Dimitri John Ledkov [Mon, 10 Sep 2018 18:53:59 +0000 (19:53 +0100)]
Revert "systemctl: fix compilation w/o logind"

This reverts commit 807690fb7f7e4998e2bb67f32026ab9f1c7b8077.

6 years agopam_systemd: support use in PID namespaces
Jürg Billeter [Sat, 18 Aug 2018 07:29:43 +0000 (09:29 +0200)]
pam_systemd: support use in PID namespaces

Pass 0 as leader PID to CreateSession to let logind use the PID from the
D-Bus credentials. This allows use of pam_systemd in PID namespaces.

6 years agoudevadm-util: drop unused function print_version()
Yu Watanabe [Wed, 22 Aug 2018 14:56:34 +0000 (23:56 +0900)]
udevadm-util: drop unused function print_version()

6 years agoudevadm-info: make info_main() returns negative value on error
Yu Watanabe [Wed, 22 Aug 2018 14:52:52 +0000 (23:52 +0900)]
udevadm-info: make info_main() returns negative value on error

Also, this replaces fprintf(stderr, ...) by log_error().

6 years agoudevadm-trigger: make trigger_main() returns negative value on error
Yu Watanabe [Wed, 22 Aug 2018 14:41:55 +0000 (23:41 +0900)]
udevadm-trigger: make trigger_main() returns negative value on error

6 years agoudevadm-test: modernize code
Yu Watanabe [Tue, 21 Aug 2018 07:24:23 +0000 (16:24 +0900)]
udevadm-test: modernize code

6 years agoudevadm-test-builtin: modernize code
Yu Watanabe [Tue, 21 Aug 2018 07:08:54 +0000 (16:08 +0900)]
udevadm-test-builtin: modernize code

6 years agoudevadm-settle: modernize code
Yu Watanabe [Wed, 22 Aug 2018 12:59:29 +0000 (21:59 +0900)]
udevadm-settle: modernize code

6 years agoudevadm-monitor: modernize code
Yu Watanabe [Fri, 24 Aug 2018 12:55:47 +0000 (21:55 +0900)]
udevadm-monitor: modernize code

6 years agoudevadm-control: modernize code a bit
Yu Watanabe [Fri, 24 Aug 2018 12:55:19 +0000 (21:55 +0900)]
udevadm-control: modernize code a bit

6 years agoudevadm-hwdb: modernize code a bit
Yu Watanabe [Tue, 21 Aug 2018 02:28:26 +0000 (11:28 +0900)]
udevadm-hwdb: modernize code a bit

6 years agostrbuf: accept NULL for strbuf_cleanup()
Yu Watanabe [Wed, 22 Aug 2018 12:50:50 +0000 (21:50 +0900)]
strbuf: accept NULL for strbuf_cleanup()

6 years agoudevadm: use dispatch_verb() and drop udevadm_cmd struct
Yu Watanabe [Tue, 21 Aug 2018 02:17:01 +0000 (11:17 +0900)]
udevadm: use dispatch_verb() and drop udevadm_cmd struct

6 years agoudevd: drop unused refcount
Yu Watanabe [Tue, 28 Aug 2018 05:02:37 +0000 (14:02 +0900)]
udevd: drop unused refcount

6 years agoudev-ctrl: use DEFINE_TRIVIAL_REF_FUNC() macro or friends
Yu Watanabe [Tue, 28 Aug 2018 05:01:35 +0000 (14:01 +0900)]
udev-ctrl: use DEFINE_TRIVIAL_REF_FUNC() macro or friends

6 years agoudev: drop unused udev struct
Yu Watanabe [Wed, 22 Aug 2018 10:57:32 +0000 (19:57 +0900)]
udev: drop unused udev struct

6 years agoudev: drop unused udev_watch struct
Yu Watanabe [Wed, 22 Aug 2018 10:57:07 +0000 (19:57 +0900)]
udev: drop unused udev_watch struct

6 years agolibudev-util: adjust type of returned value by util_string_hash32()
Yu Watanabe [Wed, 22 Aug 2018 10:51:32 +0000 (19:51 +0900)]
libudev-util: adjust type of returned value by util_string_hash32()

6 years agolibudev-util: drop unnecessary argument 'struct udev *udev' from util_resolve_subsys_...
Yu Watanabe [Wed, 22 Aug 2018 10:46:37 +0000 (19:46 +0900)]
libudev-util: drop unnecessary argument 'struct udev *udev' from util_resolve_subsys_kernel()

6 years agoudev/net: replace udev_device by sd_device
Yu Watanabe [Wed, 22 Aug 2018 08:10:38 +0000 (17:10 +0900)]
udev/net: replace udev_device by sd_device

6 years agoudev/scsi_id: drop never used code blocks
Yu Watanabe [Fri, 24 Aug 2018 03:31:15 +0000 (12:31 +0900)]
udev/scsi_id: drop never used code blocks

6 years agoudev/scsi_id: coding style fixes
Yu Watanabe [Fri, 24 Aug 2018 03:30:38 +0000 (12:30 +0900)]
udev/scsi_id: coding style fixes

6 years agoudev/scsi_id: drop unused udev struct
Yu Watanabe [Fri, 24 Aug 2018 03:30:12 +0000 (12:30 +0900)]
udev/scsi_id: drop unused udev struct

6 years agoudev/cdrom_id: drop duplicated logs
Yu Watanabe [Thu, 23 Aug 2018 12:04:25 +0000 (21:04 +0900)]
udev/cdrom_id: drop duplicated logs

6 years agoudev/cdrom_id: drop unused udev struct
Yu Watanabe [Wed, 22 Aug 2018 08:07:45 +0000 (17:07 +0900)]
udev/cdrom_id: drop unused udev struct

6 years agoudev/ata_id: coding style fixes
Yu Watanabe [Wed, 22 Aug 2018 08:06:26 +0000 (17:06 +0900)]
udev/ata_id: coding style fixes

6 years agoudev/ata_id: drop unused udev struct
Yu Watanabe [Wed, 22 Aug 2018 08:05:57 +0000 (17:05 +0900)]
udev/ata_id: drop unused udev struct

6 years agoudev: drop collect
Yu Watanabe [Wed, 22 Aug 2018 08:03:42 +0000 (17:03 +0900)]
udev: drop collect

6 years agocore/umount: use structured initializers
Yu Watanabe [Sat, 1 Sep 2018 14:04:42 +0000 (23:04 +0900)]
core/umount: use structured initializers

6 years agotree-wide: replace device_enumerator_scan_devices()+FOREACH_DEVICE_AND_SUBSYSTEM...
Yu Watanabe [Tue, 28 Aug 2018 07:05:35 +0000 (16:05 +0900)]
tree-wide: replace device_enumerator_scan_devices()+FOREACH_DEVICE_AND_SUBSYSTEM() by FOREACH_DEVICE()

6 years agologin/sysfs-show: use device_enumerator_get_devices()
Yu Watanabe [Tue, 28 Aug 2018 07:05:20 +0000 (16:05 +0900)]
login/sysfs-show: use device_enumerator_get_devices()

6 years agosd-device: introduce device_enumerator_get_devices()
Yu Watanabe [Tue, 28 Aug 2018 06:59:08 +0000 (15:59 +0900)]
sd-device: introduce device_enumerator_get_devices()

6 years agosd-device: make sd_device_enumerator_get_*_next() not destroy the list
Yu Watanabe [Mon, 27 Aug 2018 06:35:45 +0000 (15:35 +0900)]
sd-device: make sd_device_enumerator_get_*_next() not destroy the list

6 years agoMerge pull request #10037 from filbranden/docs2
Zbigniew Jędrzejewski-Szmek [Sun, 9 Sep 2018 19:01:17 +0000 (21:01 +0200)]
Merge pull request #10037 from filbranden/docs2

Moving docs around and starting conversion to Markdown

6 years agobuild-sys: Use common gcc argument detection for negative warning flags.
Filipe Brandenburger [Sat, 8 Sep 2018 20:55:09 +0000 (13:55 -0700)]
build-sys: Use common gcc argument detection for negative warning flags.

Starting with meson 0.46, it is able to detect these argument correctly.

See this commit in meson codebase for more details:
https://github.com/mesonbuild/meson/commit/695b8f3a0377d3e2ce78ba8716adc365b18edea1

We already carry a requirement for meson_version : '>= 0.46', so we can be sure
our build system will include this commit.

Tested by building systemd using a cloned meson synced to the 0.46.0 tag,
confirmed the warnings were detected correctly in that case. The meson messages included this snippet:

> Compiler for C supports arguments -Wno-unused-parameter -Wunused-parameter: YES
> Compiler for C supports arguments -Wno-missing-field-initializers -Wmissing-field-initializers: YES
> Compiler for C supports arguments -Wno-unused-result -Wunused-result: YES
> Compiler for C supports arguments -Wno-format-signedness -Wformat-signedness: YES
> Compiler for C supports arguments -Wno-error=nonnull -Werror=nonnull: YES
> Compiler for C supports arguments -Wno-maybe-uninitialized -Wmaybe-uninitialized: YES

6 years agoMerge pull request #10042 from jwrdegoede/hwdb-sensors4
Zbigniew Jędrzejewski-Szmek [Sun, 9 Sep 2018 18:39:23 +0000 (20:39 +0200)]
Merge pull request #10042 from jwrdegoede/hwdb-sensors4

Hwdb sensors4

6 years agohwdb: Add accelerometer orientation quirk for the Onda v975w tablet
Hans de Goede [Fri, 7 Sep 2018 11:14:52 +0000 (13:14 +0200)]
hwdb: Add accelerometer orientation quirk for the Onda v975w tablet

Add accelerometer orientation quirk for the Onda v975w tablet.

6 years agohwdb: Add accelerometer orientation quirk for the Connect Tablet9 tablet
Hans de Goede [Sat, 30 Jun 2018 19:56:59 +0000 (21:56 +0200)]
hwdb: Add accelerometer orientation quirk for the Connect Tablet9 tablet

Add accelerometer orientation quirk for the Connect Tablet9 tablet.

6 years agohwdb: Add accelerometer orientation quirk for the HP Pavilion x2 - 10-n000nd
Hans de Goede [Sun, 20 May 2018 15:33:30 +0000 (17:33 +0200)]
hwdb: Add accelerometer orientation quirk for the HP Pavilion x2 - 10-n000nd

Add accelerometer orientation quirk for the HP Pavilion x2 - 10-n000nd 2-in-1.

6 years agohwdb: Add accelerometer orientation quirk for the Chuwi Vi10 tablet
Hans de Goede [Fri, 8 Jun 2018 07:29:09 +0000 (09:29 +0200)]
hwdb: Add accelerometer orientation quirk for the Chuwi Vi10 tablet

Add accelerometer orientation quirk for the Chuwi Vi10 (CWI505) tablet.

While at it also update the Chuwi Hi8 Pri comment to include the
CWI model-number.

6 years agodocs: convert TRANSLATORS to Markdown
Filipe Brandenburger [Fri, 7 Sep 2018 08:44:49 +0000 (01:44 -0700)]
docs: convert TRANSLATORS to Markdown

Also expand it to cover typical tasks of creating new translations, updating
existing ones and compiling them (which can be useful to check syntax.)

6 years agodocs: convert DISTRO_PORTING to Markdown
Filipe Brandenburger [Fri, 7 Sep 2018 08:22:34 +0000 (01:22 -0700)]
docs: convert DISTRO_PORTING to Markdown

6 years agodocs: move markdown docs from .github/ to docs/
Filipe Brandenburger [Fri, 7 Sep 2018 08:07:06 +0000 (01:07 -0700)]
docs: move markdown docs from .github/ to docs/

The GitHub guide on contributing file says: "Decide whether to store your
contributing guidelines in your repository's root, docs, or .github directory."

https://help.github.com/articles/setting-guidelines-for-repository-contributors/#adding-a-contributing-file

But there's really no advantage to keeping it in the hidden .github/, since
these are public and really belong together with the other documentation.

We can still keep the issue templates under .github/, since they are not really
documentation on their own.

Updated the links pointing to CONTRIBUTING.md to refer to the one in docs/.

6 years agodocs: move doc/ to docs/
Filipe Brandenburger [Fri, 7 Sep 2018 08:02:42 +0000 (01:02 -0700)]
docs: move doc/ to docs/

The docs/ directory is special in GitHub, since it can be used to serve GitHub
Pages from, so there's a benefit to switching to it in order to expose it
directly as a website.

Updated references to it from the documentations themselves, from the
CONTRIBUTING.md file and from Meson build files.

6 years agoMerge pull request #9832 from yuwata/fix-9831
Zbigniew Jędrzejewski-Szmek [Sat, 8 Sep 2018 15:17:07 +0000 (17:17 +0200)]
Merge pull request #9832 from yuwata/fix-9831

network: fixes related to setting MTU

6 years agoMerge pull request #9942 from lucaswerkmeister/9939
Zbigniew Jędrzejewski-Szmek [Sat, 8 Sep 2018 10:08:54 +0000 (12:08 +0200)]
Merge pull request #9942 from lucaswerkmeister/9939

seccomp: fix #9939 and allow specifying multiple errnos for syscall

6 years agobuild-sys: disable -Wmaybe-uninitialized
Filipe Brandenburger [Thu, 6 Sep 2018 19:34:24 +0000 (12:34 -0700)]
build-sys: disable -Wmaybe-uninitialized

Compiler flag -Wmaybe-uninitialized is quite noisy and produces many false
positives, especially when optimization flags are enabled (tested gcc 8.2.1),
so let's just disable it in systemd build.

For example, with CFLAGS=-O2, the build produces 11 such warnings and the
default CFLAGS of Fedora's rpmbuild warns about it in 176 places. A look at a
sample of those shows that most are false positives, where the compiler just
can't figure it out correctly. (While fixing those would be nice, I'm not sure
it's a good use of our time.)

The noisy [-Wmaybe-uninitialized] warnings are not just an annoyance, since
they make it harder to spot warnings that indicate actual problems (such as
variable declared but not used.) Silencing those is beneficial, so that
contributors would see warnings where there are actually actionable problems,
so there's a better chance of having those issues addressed before a PR is
pushed.

Tested:
  $ CFLAGS='-O2 -Wp,-D_FORTIFY_SOURCE=2' meson build/
  $ ninja -C build/

(NOTE: -Wp,-D_FORTIFY_SOURCE=2 prevents [-Wstringop-truncation] warnings.)

With the commands above, the build will not produce any [-Wmaybe-uninitialized]
warnings (or any other warnings), which is not really the case before this commit.

Also tested with rpmbuild on Fedora, after this commit there are no warnings
produced in the build step.

6 years agotests: put fuzz_journald_processing_function in a .c file
Evgeny Vereshchagin [Fri, 7 Sep 2018 06:13:17 +0000 (06:13 +0000)]
tests: put fuzz_journald_processing_function in a .c file

6 years agohwdb: Add hwdb entry for X220 tablet (#10036)
Wyatt Ward [Sat, 8 Sep 2018 06:18:44 +0000 (02:18 -0400)]
hwdb: Add hwdb entry for X220 tablet (#10036)

6 years agoseccomp: permit specifying multiple errnos for a syscall
Lucas Werkmeister [Wed, 29 Aug 2018 19:35:38 +0000 (21:35 +0200)]
seccomp: permit specifying multiple errnos for a syscall

If more than one errno is specified for a syscall in SystemCallFilter=,
use the last one instead of reporting an error. This is especially
useful when used with system call sets:

    SystemCallFilter=@privileged:EPERM @reboot

This will block any system call requiring super-user capabilities with
EPERM, except for attempts to reboot the system, which will immediately
terminate the process. (@reboot is included in @privileged.)

This also effectively fixes #9939, since specifying different errnos for
“the same syscall” (same pseudo syscall number) is no longer an error.

6 years agogitignore: add nspawn image lock and mkosi temporary files
Yu Watanabe [Wed, 5 Sep 2018 05:56:08 +0000 (14:56 +0900)]
gitignore: add nspawn image lock and mkosi temporary files

6 years agobacklight: do not unref parent device
Yu Watanabe [Thu, 6 Sep 2018 02:58:29 +0000 (11:58 +0900)]
backlight: do not unref parent device

Fixes double-free introduced by 9aadd28149ae2d8ce9956495c961d97ba4033b0e.

6 years agopo: update Brazilian Portuguese translation
Filipe Brandenburger [Fri, 7 Sep 2018 03:10:22 +0000 (20:10 -0700)]
po: update Brazilian Portuguese translation

6 years agoman: Document networkd states in networkctl(1) (#10033)
Julian Andres Klode [Fri, 7 Sep 2018 14:39:44 +0000 (16:39 +0200)]
man: Document networkd states in networkctl(1) (#10033)

The manpage gives example outputs with the states, but it never
explains what the states are.

Fixes #575

6 years agohwdb: Added entry for X200 Tablet/X201 Tablet so their pointing sticks would be recog...
Wyatt Ward [Fri, 7 Sep 2018 01:35:55 +0000 (21:35 -0400)]
hwdb: Added entry for X200 Tablet/X201 Tablet so their pointing sticks would be recognized. They share parts with normal X200 and X201's. (#10029)

6 years agoMerge pull request #10009 from evverx/rework-journald-fuzzers
Yu Watanabe [Wed, 5 Sep 2018 02:46:17 +0000 (11:46 +0900)]
Merge pull request #10009 from evverx/rework-journald-fuzzers

Add a fuzzer for server_process_native_message