]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
7 years agomeson: add test-libsystemd-sym, fix linking of libsystemd
Zbigniew Jędrzejewski-Szmek [Mon, 10 Apr 2017 18:13:40 +0000 (14:13 -0400)] 
meson: add test-libsystemd-sym, fix linking of libsystemd

This is quite messy. I think libtool might have been using something
like -Wl,--whole-archive, but I don't think meson has support for that.
For now, just recompile all the sources for linking into libsystemd
directly. This should not matter much for efficiency, since it's a
few small files.

7 years agomeson: install systemd-sulogin-shell too
Zbigniew Jędrzejewski-Szmek [Mon, 10 Apr 2017 16:37:52 +0000 (12:37 -0400)] 
meson: install systemd-sulogin-shell too

7 years agomeson: remove libnss_*.so symlinks after install
Zbigniew Jędrzejewski-Szmek [Mon, 10 Apr 2017 16:26:39 +0000 (12:26 -0400)] 
meson: remove libnss_*.so symlinks after install

7 years agomeson: create /var/log/journal/remote
Zbigniew Jędrzejewski-Szmek [Mon, 10 Apr 2017 16:20:03 +0000 (12:20 -0400)] 
meson: create /var/log/journal/remote

C.f. https://github.com/mesonbuild/meson/issues/1604.

7 years agomeson: create various symlinks
Zbigniew Jędrzejewski-Szmek [Mon, 10 Apr 2017 03:55:50 +0000 (23:55 -0400)] 
meson: create various symlinks

v2:
- remove bashisms

7 years agomeson: create dirs and touch /usr
Zbigniew Jędrzejewski-Szmek [Mon, 10 Apr 2017 03:55:05 +0000 (23:55 -0400)] 
meson: create dirs and touch /usr

This is the equivalent of $(INSTALL_DIRS) and install-touch-usr-hook.
I did not bother to create the directories into which we install files,
since they will be created anyway.

v2:
- remove bashism

7 years agomeson: add unit installation symlinks
Zbigniew Jędrzejewski-Szmek [Mon, 10 Apr 2017 03:43:53 +0000 (23:43 -0400)] 
meson: add unit installation symlinks

This is the equivalent of $(SYSTEM_UNIT_ALIASES) and $(GENERAL_ALIASES)
in Makefile.am.

ninja-build uninstall does not remove the symlinks, see
https://github.com/mesonbuild/meson/issues/1602.
I don't consider this a blocker: after all either one installs into $DESTDIR,
where uninstallation doesn't make much sense, or into a real system, where a
successfull uninstallation would likely destroy the system.

v2:
- remove bashisms
- add various forgotten symlinks and fix service/timer/target confusions

7 years agomeson: create a static version of libshared and link libcore and some tests to it
Zbigniew Jędrzejewski-Szmek [Sun, 9 Apr 2017 18:08:53 +0000 (14:08 -0400)] 
meson: create a static version of libshared and link libcore and some tests to it

This is what autoconf-based build does, and it makes test-bus-error and
test-engine able to access the bus error mapping table. OTOH, this is a heavy
price to pay: it would be excellent to link libcore.a to libsystemd-shared-NNN.so.
Otherwise we duplicate the same code in 'systemd' and 'libsystemd-shared-NNN.so'.

-rwxrwxr-x. 1 4075544 Apr  6 20:30 systemd* <-- libcore linked against libsystemd-shared.so
-rwxrwxr-x. 1 5596504 Apr  9 14:07 systemd* <-- libcore linked against libsystemd-shared.a

v2:
- update for 6b5cf3ea621a5bfd218cd2249e066a52c0e73657

7 years agomeson: include the library symbol version list in link_depends
Zbigniew Jędrzejewski-Szmek [Sun, 9 Apr 2017 17:11:49 +0000 (13:11 -0400)] 
meson: include the library symbol version list in link_depends

This is pretty ugly, because I don't know how to use a single
definition for two purposes:
- --version-script needs a path relative to the build root
- link_depends needs a path relative to source root
Also, link_depends does not accept files() output
[https://github.com/mesonbuild/meson/issues/1172], and I don't see a way to go
from files() output to a string path that can be used to craft the -Wl arg.

Ideally, a single files() result could be used in both places.
I'm leaving this as a separate commit for now.

7 years agomeson: add option to install tests
Zbigniew Jędrzejewski-Szmek [Sat, 8 Apr 2017 05:55:38 +0000 (01:55 -0400)] 
meson: add option to install tests

Instead of a separate target as with make, it is decided at configure time
whether to install tests as part of the install target. The effect should be
the same.

7 years agomeson: define tests
Zbigniew Jędrzejewski-Szmek [Fri, 7 Apr 2017 04:19:09 +0000 (00:19 -0400)] 
meson: define tests

Tests can be run with 'ninja-build test' or using 'mesontest'.
'-Dtests=unsafe' can be used to include the "unsafe" tests in the
test suite, same as with autotools.

v2:
- use more conf.get guards are optional components
- declare deps on generated headers for test-{af,arphrd,cap}-list

v3:
- define environment for tests

  Most test don't need this, but to be consistent with autotools-based build, and
  to avoid questions which tests need it and which don't, set the same environment
  for all tests.

v4:
- rework test generation

  Use a list of lists to define each test. This way we can reduce the
  boilerplate somewhat, although the test listings are still pretty verbose. We
  can also move the definitions of the tests to the subdirs. Unfortunately some
  subdirs are included earlier than some of the libraries that test binaries
  are linked to.  So just dump all definitions of all tests that cannot be
  defined earlier into src/test. The `executable` definitions are still at the
  top level, so the binaries are compiled into the build root.

v5:
- tag test-dnssec-complex as manual

v6:
- fix HAVE_LIBZ typo
- add missing libgobject/libgio defs
- mark test-qcow2 as manual

7 years agomeson: add TAGS target
Zbigniew Jędrzejewski-Szmek [Thu, 6 Apr 2017 18:33:27 +0000 (14:33 -0400)] 
meson: add TAGS target

Quite necessary for all the emacs users out there ;)

v2:
- fix error with etags or git are not found

v3:
- move the definition of git and etags up so it's available for man/

7 years agomeson: add custom targets man/man and man/html
Zbigniew Jędrzejewski-Szmek [Thu, 6 Apr 2017 02:46:03 +0000 (22:46 -0400)] 
meson: add custom targets man/man and man/html

This provides functionality similar to the ./configure --disable-manpages
switch. Man pages are built by default (if xsltproc is found), html pages
are not. Those default can be changed with -Dman=no, -Dhtml=yes/auto.
It is still possible to build one or the either, even if not configured, with
ninja-build man/man and ninja-build man/html.

v2:
- obey conditionals in index/directives list

7 years agomeson: add rule to generate custom-entities.ent
Zbigniew Jędrzejewski-Szmek [Wed, 5 Apr 2017 23:44:41 +0000 (19:44 -0400)] 
meson: add rule to generate custom-entities.ent

This is a bit bare-bones, but should work for now. Maybe in the future we'll
have a way to make meson generate it for us, without specifying all the names
by hand.

7 years agomeson: avoid detecting m4 dir as a program
Zbigniew Jędrzejewski-Szmek [Wed, 5 Apr 2017 04:40:21 +0000 (00:40 -0400)] 
meson: avoid detecting m4 dir as a program

This is a bug in meson, already fixed upstream.
For now, just specify the full path.

7 years agomake-man-rules: add support for generating the list in meson.build format
Zbigniew Jędrzejewski-Szmek [Wed, 5 Apr 2017 03:21:04 +0000 (23:21 -0400)] 
make-man-rules: add support for generating the list in meson.build format

v2:
- sort the alias array too, otherwise the output is not stable

7 years agomeson: build systemd using meson
Zbigniew Jędrzejewski-Szmek [Wed, 5 Apr 2017 03:03:47 +0000 (23:03 -0400)] 
meson: build systemd using meson

It's crucial that we can build systemd using VS2010!

... er, wait, no, that's not the official reason. We need to shed old systems
by requring python 3! Oh, no, it's something else. Maybe we need to throw out
345 years of knowlege accumulated in autotools? Whatever, this new thing is
cool and shiny, let's use it.

This is not complete, I'm throwing it out here for your amusement and critique.

- rules for sd-boot are missing. Those might be quite complicated.

- rules for tests are missing too. Those are probably quite simple and
  repetitive, but there's lots of them.

- it's likely that I didn't get all the conditions right, I only tested "full"
  compilation where most deps are provided and nothing is disabled.

- busname.target and all .busname units are skipped on purpose.

  Otherwise, installation into $DESTDIR has the same list of files and the
  autoconf install, except for .la files.

It'd be great if people had a careful look at all the library linking options.
I added stuff until things compiled, and in the end there's much less linking
then in the old system. But it seems that there's still a lot of unnecessary
deps.

meson has a `shared_module` statement, which sounds like something appropriate
for our nss and pam modules. Unfortunately, I couldn't get it to work. For the
nss modules, we need an .so version of '2', but `shared_module` disallows the
version argument. For the pam module, it also didn't work, I forgot the reason.

The handling of .m4 and .in and .m4.in files is rather awkward. It's likely
that this could be simplified. If make support is ever dropped, I think it'd
make sense to switch to a different templating system so that two different
languages and not required, which would make everything simpler yet.

v2:
- use get_pkgconfig_variable
- use sh not bash
- use add_project_arguments

v3:
- drop required:true and fix progs/prog typo

v4:
- use find_library('bz2')
- add TTY_GID definition
- define __SANE_USERSPACE_TYPES__
- use join_paths(prefix, ...) is used on all paths to make them all absolute

v5:
- replace all declare_dependency's with []
- add more conf.get guards around optional components

v6:
- drop -pipe, -Wall which are the default in meson
- use compiler.has_function() and compiler.has_header_symbol instead of the
  hand-rolled checks.
- fix duplication in 'liblibsystemd' library name
- use the right .sym file for pam_systemd
- rename 'compiler' to 'cc': shorter, and more idiomatic.

v7:
- use ENABLE_ENVIRONMENT_D not HAVE_ENVIRONMENT_D
- rename prefix to prefixdir, rootprefix to rootprefixdir
  ("prefix" is too common of a name and too easy to overwrite by mistake)
- wrap more stuff with conf.get('ENABLE...') == 1
- use rootprefix=='/' and rootbindir as install_dir, to fix paths under
  split-usr==true.

v8:
- use .split() also for src/coredump. Now everything is consistent ;)
- add rootlibdir option and use it on the libraries that require it

v9:
- indentation

v10:
- fix check for qrencode and libaudit

v11:
- unify handling of executable paths, provide options for all progs

  This makes the meson build behave slightly differently than the
  autoconf-based one, because we always first try to find the executable in the
  filesystem, and fall back to the default. I think different handling of
  loadkeys, setfont, and telinit was just a historical accident.

  In addition to checking in $PATH, also check /usr/sbin/, /sbin for programs.
  In Fedora $PATH includes /usr/sbin, (and /sbin is is a symlink to /usr/sbin),
  but in Debian, those directories are not included in the path.

  C.f. https://github.com/mesonbuild/meson/issues/1576.

- call all the options 'xxx-path' for clarity.
- sort man/rules/meson.build properly so it's stable

7 years agojournal/fsprg: set -Wno-pointer-arithm only for that file
Zbigniew Jędrzejewski-Szmek [Sat, 22 Apr 2017 22:49:49 +0000 (18:49 -0400)] 
journal/fsprg: set -Wno-pointer-arithm only for that file

Both gcc and clang issue a host of warnings about void pointers used in
arithmetic. The warning must be ignored in that file to avoid multiple
warnings.

Makefile.am used to set this for all libsystemd-journal-internal.a sources,
because there's no finer granularity for warnings. Let's just set it for
this one file.

7 years agogitignore: ignore all build* subdirs in main directory
Zbigniew Jędrzejewski-Szmek [Fri, 7 Apr 2017 15:24:46 +0000 (11:24 -0400)] 
gitignore: ignore all build* subdirs in main directory

Now that meson builds require a separate build dir, everybody's bound to have
at least one. So let's accept the convention that build*/ is for builds, and
apply a blanket ignore rule, we shouldn't have any important files named build*
in the main directory.

7 years agoMerge pull request #5774 from keszybz/printf-annotations
Djalal Harouni [Sat, 22 Apr 2017 23:03:42 +0000 (01:03 +0200)] 
Merge pull request #5774 from keszybz/printf-annotations

Printf annotation improvements

7 years agoMerge pull request #5756 from keszybz/make-cleanups
Martin Pitt [Fri, 21 Apr 2017 19:36:56 +0000 (21:36 +0200)] 
Merge pull request #5756 from keszybz/make-cleanups

Various meson-independent cleanups from the meson patchset

7 years agokernel-install: remove unneeded modules.* files created by depmod (#5766)
Yu Watanabe [Fri, 21 Apr 2017 18:03:17 +0000 (03:03 +0900)] 
kernel-install: remove unneeded modules.* files created by depmod (#5766)

Fixes #5765.

7 years agocoredump: fix non-literal string used in printf 5774/head
Zbigniew Jędrzejewski-Szmek [Thu, 20 Apr 2017 18:28:19 +0000 (14:28 -0400)] 
coredump: fix non-literal string used in printf

This was exposed by the previous commit. This could be potentially
unpleasant, but we are saved by the fact that this code path was only
taken for journald crashes, where we control COMM and know that it doesn't
contain any special characters. Use log_dispatch which does not do any
format processing to push the message out.

7 years agobasic/log: expose log_dispatch
Zbigniew Jędrzejewski-Szmek [Fri, 21 Apr 2017 16:52:54 +0000 (12:52 -0400)] 
basic/log: expose log_dispatch

This is useful when we want to avoid printf formatting on the message.
It's nicer than using log_struct with "%s" as the format, because printf
is slow and with a large message (like from a backtrace) this would require
extra unnecessary memory.

I'm not exposing all the fields in the wrapper: only level and errno.
Those are the most likely to be useful.

7 years agotree-wide: mark log_struct with _printf_ and fix fallout
Zbigniew Jędrzejewski-Szmek [Thu, 20 Apr 2017 18:15:28 +0000 (14:15 -0400)] 
tree-wide: mark log_struct with _printf_ and fix fallout

log_struct takes multiple format strings, each one followed by arguments.
The _printf_ annotation is not sufficiently flexible to express this,
but we can still annotate the first format string, though not its
arguments (because their number is unknown).

With the annotation, the places which specified the message id or similar
as the first pattern cause a warning from -Wformat-nonliteral. This can
be trivially fixed by putting the MESSAGE= first.

This change will help find issues where a non-literal is erroneously used
as the pattern.

7 years agoµhttpd-util: use #pragma to silence warning about nonliteral pattern
Zbigniew Jędrzejewski-Szmek [Thu, 20 Apr 2017 18:45:30 +0000 (14:45 -0400)] 
µhttpd-util: use #pragma to silence warning about nonliteral pattern

This is safe, because we're taking a pattern which was already marked with
_printf_ and appending a literal string.

7 years agobus: include sd-{bus,messages}.h the same as other systemd headers 5756/head
Zbigniew Jędrzejewski-Szmek [Wed, 5 Apr 2017 22:50:13 +0000 (18:50 -0400)] 
bus: include sd-{bus,messages}.h the same as other systemd headers

This is our own header, we should include use the local-include syntax
("" not <>), to make it clear we are including the one from the build tree.
All other includes of files from src/systemd/ use this scheme.

7 years agomicrohttpd-util: silence warnings about deprecated options
Zbigniew Jędrzejewski-Szmek [Wed, 19 Apr 2017 20:37:24 +0000 (16:37 -0400)] 
microhttpd-util: silence warnings about deprecated options

C.f. 21b6ff368438bd3e809c2fabe73038eb305df296.

7 years agotest-exec-util: drop duplicate const
Zbigniew Jędrzejewski-Szmek [Wed, 19 Apr 2017 20:32:52 +0000 (16:32 -0400)] 
test-exec-util: drop duplicate const

gcc-7 warns about this with -Wduplicate-decl-specifier.

7 years agobasic/random-util: add new header for getrandom()
Zbigniew Jędrzejewski-Szmek [Wed, 19 Apr 2017 20:13:27 +0000 (16:13 -0400)] 
basic/random-util: add new header for getrandom()

There's some confusion: older man pages specify that linux/random.h
contains getrandom, but newer glibc has it in sys/random.h. Detect if
the newer header is available and include it. We still need the older
header for the flags.

7 years agolibshared: fix compilation without libblkid
Zbigniew Jędrzejewski-Szmek [Tue, 18 Apr 2017 23:05:05 +0000 (19:05 -0400)] 
libshared: fix compilation without libblkid

This reverts a75e27eba75e27eb fixed the case of libcryptsetup=no, libblkid=yes,
but broke the case of libcryptsetup=no, libblkid=yes. Instead of trying to define
the function only when used, which would result in too much ifdeffery, just silence
the warning.

7 years agobasic/missing.h: drop inclusion of macro.h
Zbigniew Jędrzejewski-Szmek [Tue, 18 Apr 2017 23:04:15 +0000 (19:04 -0400)] 
basic/missing.h: drop inclusion of macro.h

It's not necessary for anything.

7 years agoMakefile.am: remove duplicated rules for efi
Zbigniew Jędrzejewski-Szmek [Tue, 11 Apr 2017 03:27:55 +0000 (23:27 -0400)] 
Makefile.am: remove duplicated rules for efi

Specifying the same rule with a slightly different dep list was not useful,
since make cannot distinguish rules with the same input / output. (It possibly
could have two rules with different dependency list, but here all dependencies
that are different between the two rules are always present, so the two rules
are effectively the same.)

7 years agoman: fix small typo (#5778)
AsciiWolf [Fri, 21 Apr 2017 13:01:09 +0000 (15:01 +0200)] 
man: fix small typo (#5778)

7 years agonetworkd: route - support 'onlink' routes (#5734)
Susant Sahani [Fri, 21 Apr 2017 09:22:30 +0000 (14:52 +0530)] 
networkd: route - support 'onlink' routes (#5734)

This work based on Tom's original patch
teg@1312172

By setting GatewayOnlink=yes, the kernel will assume that the gateway is onlink
even if there is no route to it.

Resolves issue #1283.

7 years agounits: systemd-resolved should start before network-online.target and nss-lookup...
Yu Watanabe [Fri, 21 Apr 2017 09:21:17 +0000 (18:21 +0900)] 
units: systemd-resolved should start before network-online.target and nss-lookup.target (#5691)

systemd-resolved provides
1. local API via NSS and D-Bus
2. kind of a local "DNS proxy" through its stub listener
The 1st item should be started before nss-lookup.target.
The 2nd item should be started before network-online.target,
because if the networking works in general, then DNS (and DNS proxy) should too.

Fixes #5650

7 years agonetworkd: vlan add GVRP support (#5761)
Susant Sahani [Fri, 21 Apr 2017 09:01:59 +0000 (14:31 +0530)] 
networkd: vlan add GVRP support (#5761)

Add support to configure GVRP.

Closes #5760

7 years agocore: move checking default_dependencies into target_add_default_dependencies. (...
iplayinsun [Fri, 21 Apr 2017 09:00:47 +0000 (18:00 +0900)] 
core: move checking default_dependencies into target_add_default_dependencies. (#5762)

Almost units check default_dependencies within [unit]_add_default_dependencies
except target unit.

7 years agoima: Ensure policy exists before asking the kernel to load it (#5777)
Benjamin Gilbert [Fri, 21 Apr 2017 08:53:40 +0000 (01:53 -0700)] 
ima: Ensure policy exists before asking the kernel to load it (#5777)

e8e42b31c5a950a7b43d64f4a531ec59750e823e added support for having the
kernel load the IMA policy directly, but didn't check that the policy
file exists.  If not, this produced a kernel message:

    IMA: policy update failed

7 years agol10n: update Czech Translation (#5776)
AsciiWolf [Fri, 21 Apr 2017 06:38:37 +0000 (08:38 +0200)] 
l10n: update Czech Translation (#5776)

7 years agohwdb: fix warning "atkbd serio0: Unknown key pressed" (#5772)
Franck Bui [Thu, 20 Apr 2017 19:09:13 +0000 (21:09 +0200)] 
hwdb: fix warning "atkbd serio0: Unknown key pressed" (#5772)

At each time pressing the WiFi Fn key on Dell Latitude E7270 laptop, the system
reports the following error/warning messages:

  atkbd serio0: Unknown key pressed (translated set 2, code 0x88 on isa0060/serio0).
  atkbd serio0: Use 'setkeycodes e008 ' to make it known.

This is due to commit 0e33634 which was added to fix
https://bugs.launchpad.net/ubuntu/+source/udev/+bug/1441849.

However on Dell Latitude E7* models, we need to restore the old generic
behavior which consists in ignoring the key event since it's already done by
the HW.

Indeed the hardware has a specific driver (dell_wmi) to handle rfkill in the
hardware level. So, as long as the hardware handles, the best is to leave as
is.

This patch was originally written by Takashi Iwai.

Fixes #5047

7 years agobasic/log: fix _printf_ annotation on log_object_internalv
Zbigniew Jędrzejewski-Szmek [Thu, 20 Apr 2017 18:09:47 +0000 (14:09 -0400)] 
basic/log: fix _printf_ annotation on log_object_internalv

Fixup for 4b58153dd22172d817055d2a09a0cdf3f4bd9db3.

I saw this because of a clang warning. With gcc the -Wformat-nonliteral warning
doesn't seem to work as expected.

In two places, a string constructed with strjoina is used as the pattern. This
is safe, because we're taking a pattern which was already marked with _printf_
and prepending a known value to it.  Those places are marked with #pragma to
silence the warning.

7 years agoman: Fix reference to timer-sync.target instead of time-sync.target (#5764)
Philip Withnall [Thu, 20 Apr 2017 10:34:26 +0000 (11:34 +0100)] 
man: Fix reference to timer-sync.target instead of time-sync.target (#5764)

Also fix an erroneous reference to it in the NEWS file, for posterity.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
7 years agoMakefile.am: link dbus-org.freedesktop.network1 alias in /etc
Zbigniew Jędrzejewski-Szmek [Mon, 10 Apr 2017 15:59:58 +0000 (11:59 -0400)] 
Makefile.am: link dbus-org.freedesktop.network1 alias in /etc

This makes dbus-org.freedesktop.network1.service like dbus-org.freedesktop.resolve1.service.
When systemd-networkd.service is disabled, the alias is also removed.

7 years agotest-compress*: silence warning about unused definitions when w/o both xz and lz4
Zbigniew Jędrzejewski-Szmek [Fri, 7 Apr 2017 13:28:50 +0000 (09:28 -0400)] 
test-compress*: silence warning about unused definitions when w/o both xz and lz4

I think it's nice to mark the test as skipped instead of omitting
it entirely, hence #ifdefs in the code instead of excluding the test
in Makefile.am/meson.build.

7 years agoconfigure: restore check for glib libraries
Zbigniew Jędrzejewski-Szmek [Thu, 6 Apr 2017 15:03:00 +0000 (11:03 -0400)] 
configure: restore check for glib libraries

This is a partial revert of 2375607039517c88df. We still have code
guarded by HAVE_GLIB in tests.

v2:
- do not define the automake conditional, it wasn't used anywhere
- rename --disable-gudev to --disable-glib

v3:
- do not cause an error if the libs are not found, this is supposed
  to be an "auto" dep by default.

7 years agorc-local-generator: drop duplicate definitions for rc.local
Zbigniew Jędrzejewski-Szmek [Wed, 12 Apr 2017 23:30:58 +0000 (19:30 -0400)] 
rc-local-generator: drop duplicate definitions for rc.local

We always define those paths in the configure scripts.

7 years agobasic/def.h: drop TTY_GID definition
Zbigniew Jędrzejewski-Szmek [Thu, 6 Apr 2017 04:12:40 +0000 (00:12 -0400)] 
basic/def.h: drop TTY_GID definition

We already provide a definition through the configuration system, this
one is duplicate.

7 years agounits: drop explicit NotifyAccess setting from journald's unit file (#5749)
Michal Sekletar [Wed, 19 Apr 2017 06:52:40 +0000 (08:52 +0200)] 
units: drop explicit NotifyAccess setting from journald's unit file (#5749)

systemd-journald service consists of only single process and that is the
MainPID. Make unit file shorter and drop NotifyAccess=all since it is
not useful in such case.

https://lists.freedesktop.org/archives/systemd-devel/2017-April/038667.html

7 years agohwdb: MS Surface Pro Type Cover touchpad integration (#5751)
Sarang S. Dalal [Wed, 19 Apr 2017 06:52:08 +0000 (08:52 +0200)] 
hwdb: MS Surface Pro Type Cover touchpad integration (#5751)

Sets ID_INPUT_TOUCHPAD_INTEGRATION=internal for Microsoft Surface Pro Type Covers (IDs should cover at least the type covers for the Surface Pro 3 and 4). This is needed so that libinput can disable the touchpad while typing.

7 years agotree-wide: fix wrong indent (#5757)
Yu Watanabe [Wed, 19 Apr 2017 06:48:29 +0000 (15:48 +0900)] 
tree-wide: fix wrong indent (#5757)

Fixes wrong indent introduced by the commit 43688c49d1fdb585196d94e2e30bb29755fa591b.

7 years agoMerge pull request #5708 from vcatechnology/arm-cross-compile
Lennart Poettering [Mon, 17 Apr 2017 13:49:06 +0000 (15:49 +0200)] 
Merge pull request #5708 from vcatechnology/arm-cross-compile

ARM32 cross-compile fixes

7 years agoMerge pull request #5731 from jprvita/hwdb-acer
Martin Pitt [Thu, 13 Apr 2017 10:48:39 +0000 (12:48 +0200)] 
Merge pull request #5731 from jprvita/hwdb-acer

Acer hwdb keymap updates

7 years agologinctl: fix typo causing ignoring multiple session IDs (#5732)
slodki [Thu, 13 Apr 2017 10:34:59 +0000 (12:34 +0200)] 
loginctl: fix typo causing ignoring multiple session IDs (#5732)

Fixes #5733

7 years agoMerge pull request #5690 from yuwata/fix-5621
Djalal Harouni [Wed, 12 Apr 2017 18:22:03 +0000 (20:22 +0200)] 
Merge pull request #5690 from yuwata/fix-5621

core: downgrade error message if command is prefixed with `-` and the…

7 years agohwdb: Add power button mapping for Acer models 5731/head
Chris Chiu [Wed, 12 Apr 2017 13:03:47 +0000 (09:03 -0400)] 
hwdb: Add power button mapping for Acer models

The power key keycode e076 is emitted on several different Acer laptop
models, and it is expected that it will also be used on upcoming models.
Verified on the following models:

Aspire ES1-421
Aspire ES1-432
Aspire A515-51
Aspire A515-51G
Aspire A517-51
Aspire A517-51G
Nitro AN515-31

7 years agohwdb: Fix airplane mode key for all Acer series
Chris Chiu [Wed, 12 Apr 2017 13:03:35 +0000 (09:03 -0400)] 
hwdb: Fix airplane mode key for all Acer series

According to the key code v2.02 from Acer, scancode E0 86 will be
generated for airplane mode hotkey. Verified on Aspire, TravelMate,
Easynote and Predator.

7 years agohwdb: Map 0x8a to F20 on the Acer Travelmate P648-G2-MG
João Paulo Rechi Vita [Tue, 4 Apr 2017 14:48:06 +0000 (10:48 -0400)] 
hwdb: Map 0x8a to F20 on the Acer Travelmate P648-G2-MG

This model emits 0x9a for the microphone mute button above the keyboard,
so let's map it to correct keycode.

7 years agoman: document how to include an equals sign in a value provided to Environment= ...
Mark Stosberg [Tue, 11 Apr 2017 21:19:06 +0000 (17:19 -0400)] 
man: document how to include an equals sign in a value provided to Environment= (#5710)

It wasn't clear before how an equals sign in an "Environment=" value might be
handled. Ref:
http://stackoverflow.com/questions/43278883/how-to-write-systemd-environment-variables-value-which-contains/43280157

7 years agonetworkd: Add bridge port priority setting (#5545)
Dimitri John Ledkov [Tue, 11 Apr 2017 21:17:31 +0000 (22:17 +0100)] 
networkd: Add bridge port priority setting (#5545)

Allow setting bridge port priority in the Bridge section of the network file,
similar to e.g. port path cost setting.

Set the default to an invalid value of 128, and only set the port priority when
it's not 128. Unlike e.g. path cost, zero is a valid priority value.

Add a networkd-test.py to check that bridge port priority is correctly set.

Incidently, fix bridge port cost type and document valid ranges.

7 years agotest/TEST-12-ISSUE-3171: specify -w1 option to netcat due to default change. (#5722)
Dimitri John Ledkov [Tue, 11 Apr 2017 19:34:29 +0000 (20:34 +0100)] 
test/TEST-12-ISSUE-3171: specify -w1 option to netcat due to default change. (#5722)

On Ubuntu 17.04 (zesty zapus) netcat-openbsd was upgraded from 1.105-7ubuntu1
to 1.130-3, at the same time the defaults got changed from -q0 to -q-1
(infinity) the net result is that `echo A | nc -U' call now hangs, preventing
the testcase to complete. One could use the old default of -q0, but that option
is not available in some netcat implementations. Thus settle to specify -w1
instead to mitigate the testcase hang.

7 years agotmpfiles: downgrade error message when operation is not supported (#5692)
Yu Watanabe [Mon, 10 Apr 2017 11:22:18 +0000 (20:22 +0900)] 
tmpfiles: downgrade error message when operation is not supported (#5692)

Fixes #5607

7 years agocore: fix values of BindPaths and BindReadOnlyPaths properties on 32-bit platforms...
Evgeny Vereshchagin [Mon, 10 Apr 2017 11:20:17 +0000 (14:20 +0300)] 
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

7 years agocore: downgrade legit error logs (#5705)
umuttl [Mon, 10 Apr 2017 11:12:25 +0000 (13:12 +0200)] 
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.

7 years agoRemove BTN_DPAD_* keys from ID_INPUT_KEY test (#5701)
Nathaniel R. Lewis [Thu, 6 Apr 2017 19:13:14 +0000 (12:13 -0700)] 
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.

7 years agobuild-sys: correct blkid.h includes 5708/head
Matt Clarkson [Thu, 6 Apr 2017 13:12:17 +0000 (14:12 +0100)] 
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.

7 years agobuild-sys: correct ARM32 GNU EFI boot binary build
Matt Clarkson [Thu, 6 Apr 2017 13:12:15 +0000 (14:12 +0100)] 
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.

7 years agobuild-sys: correctly search for gnu-efi header
Matt Clarkson [Thu, 6 Apr 2017 13:12:11 +0000 (14:12 +0100)] 
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.

7 years agoMerge pull request #5706 from keszybz/make-cleanups
Lennart Poettering [Wed, 5 Apr 2017 10:10:11 +0000 (12:10 +0200)] 
Merge pull request #5706 from keszybz/make-cleanups

Move busctl to its own dir and other cleanups

7 years agologind: Stopped inhibitions should be considered inactive (#5698)
afrantzis [Wed, 5 Apr 2017 08:32:55 +0000 (11:32 +0300)] 
logind: Stopped inhibitions should be considered inactive (#5698)

7 years agobuild-sys: drop obsolete hook from Makefile.am 5706/head
Zbigniew Jędrzejewski-Szmek [Wed, 5 Apr 2017 02:39:30 +0000 (22:39 -0400)] 
build-sys: drop obsolete hook from Makefile.am

7 years agoudev: rename gperf struct name to match other headers
Zbigniew Jędrzejewski-Szmek [Tue, 4 Apr 2017 00:02:58 +0000 (20:02 -0400)] 
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.

7 years agotree-wide: standardize on $(PACKAGE_VERSION) for the version string
Zbigniew Jędrzejewski-Szmek [Mon, 3 Apr 2017 16:15:33 +0000 (12:15 -0400)] 
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.

7 years agobuild-sys: drop undefined target ref from Makefile.am
Zbigniew Jędrzejewski-Szmek [Mon, 3 Apr 2017 00:52:47 +0000 (20:52 -0400)] 
build-sys: drop undefined target ref from Makefile.am

7 years agobuild-sys: drop undefined var ref from Makefile.am
Zbigniew Jędrzejewski-Szmek [Mon, 3 Apr 2017 00:52:03 +0000 (20:52 -0400)] 
build-sys: drop undefined var ref from Makefile.am

7 years agobuild-sys: use a single ENABLE_LOGIND conditional
Zbigniew Jędrzejewski-Szmek [Mon, 3 Apr 2017 00:12:36 +0000 (20:12 -0400)] 
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.

7 years agoshared/dissect-image: fix warning about unused function when !HAVE_BLKID
Zbigniew Jędrzejewski-Szmek [Sat, 1 Apr 2017 03:21:20 +0000 (23:21 -0400)] 
shared/dissect-image: fix warning about unused function when !HAVE_BLKID

7 years agoMove busctl sources to src/busctl
Zbigniew Jędrzejewski-Szmek [Sat, 1 Apr 2017 02:49:02 +0000 (22:49 -0400)] 
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.

7 years agopo: fix typo in pt_BR
Martin Pitt [Tue, 4 Apr 2017 10:08:46 +0000 (12:08 +0200)] 
po: fix typo in pt_BR

See https://github.com/systemd/systemd/pull/5694#issuecomment-291446842

7 years agoman: fix <function> tag (#5686)
Lucas Werkmeister [Tue, 4 Apr 2017 06:47:30 +0000 (08:47 +0200)] 
man: fix <function> tag (#5686)

7 years agoUpdate Brazilian Portuguese translation (#5694)
Rafael Fontenelle [Mon, 3 Apr 2017 21:29:09 +0000 (18:29 -0300)] 
Update Brazilian Portuguese translation (#5694)

7 years agohwdb: Asus TP300LJ accelerometer quirks (#5681)
wiertel [Mon, 3 Apr 2017 07:53:10 +0000 (09:53 +0200)] 
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.

7 years agocore: downgrade error message if command is prefixed with `-` and the command is... 5690/head
Yu Watanabe [Mon, 3 Apr 2017 06:38:33 +0000 (15:38 +0900)] 
core: downgrade error message if command is prefixed with `-` and the command is not found

Fixes #5621

7 years agoMerge pull request #5589 from jasonreeder/claimed_address_fix
Lennart Poettering [Sat, 1 Apr 2017 09:41:58 +0000 (11:41 +0200)] 
Merge pull request #5589 from jasonreeder/claimed_address_fix

libsystemd-network: sd-ipv4ll: acquire new address after claimed addr…

7 years agoMerge pull request #5558 from dm0-/nspawn-resolved
Lennart Poettering [Sat, 1 Apr 2017 09:39:08 +0000 (11:39 +0200)] 
Merge pull request #5558 from dm0-/nspawn-resolved

nspawn: fix DNS when the stub listener is disabled

7 years agolibsystemd-network: sd-ipv4ll: acquire new address after claimed address conflict 5589/head
Jason Reeder [Fri, 31 Mar 2017 20:40:18 +0000 (15:40 -0500)] 
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>
7 years agolibsystemd-network: sd-ipv4ll: Wrapper to restart address aquisition after conflict
Jason Reeder [Fri, 31 Mar 2017 19:23:10 +0000 (14:23 -0500)] 
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>
7 years agonspawn: check if the DNS stub is listening for requests 5558/head
David Michael [Wed, 8 Mar 2017 20:45:03 +0000 (12:45 -0800)] 
nspawn: check if the DNS stub is listening for requests

7 years agoresolved: add a DNSStubListener property to Manager
David Michael [Wed, 8 Mar 2017 20:43:17 +0000 (12:43 -0800)] 
resolved: add a DNSStubListener property to Manager

7 years agoudev: net_id - support predictable ifnames on vio buses (#5675)
Franck Bui [Fri, 31 Mar 2017 14:32:09 +0000 (16:32 +0200)] 
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.

7 years agonetworkd: RFC compliant autonomous prefix handling (#5636)
hendrikw01 [Fri, 31 Mar 2017 13:10:59 +0000 (15:10 +0200)] 
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

7 years agoMerge pull request #5534 from ssahani/vxlan-label
Lennart Poettering [Fri, 31 Mar 2017 09:30:33 +0000 (11:30 +0200)] 
Merge pull request #5534 from ssahani/vxlan-label

networkd: vxlan support setting IPv6 flow label

7 years agonetworkd: fix route_new_static assert when IPv4LLRoute=true (#5676)
Susant Sahani [Fri, 31 Mar 2017 06:29:20 +0000 (11:59 +0530)] 
networkd: fix route_new_static assert when IPv4LLRoute=true (#5676)

fixes: #5664

7 years agodoc: spell out handle-* options, use <literal> syntax (#5673)
Michael Biebl [Fri, 31 Mar 2017 06:01:41 +0000 (08:01 +0200)] 
doc: spell out handle-* options, use <literal> syntax (#5673)

7 years agojournal-upload: add state file directory to ReadWritePaths (#5578)
Yu Watanabe [Thu, 30 Mar 2017 16:01:03 +0000 (01:01 +0900)] 
journal-upload: add state file directory to ReadWritePaths (#5578)

The commit c7fb922d6250543ba5462fa7a6ff03cc8f628e94 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.

7 years agoMerge pull request #5670 from poettering/trivialities
Martin Pitt [Thu, 30 Mar 2017 13:09:28 +0000 (15:09 +0200)] 
Merge pull request #5670 from poettering/trivialities

trivial doc fixes

7 years agojournal: fix up syslog facility when forwarding native messages (#5667)
Michael Biebl [Thu, 30 Mar 2017 09:56:25 +0000 (11:56 +0200)] 
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
7 years agoman: use <varlistentry> for all unit entries 5670/head
Lennart Poettering [Thu, 30 Mar 2017 09:54:45 +0000 (11:54 +0200)] 
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.

7 years agoREADME: document that gperf 3.1 is required for building now
Lennart Poettering [Thu, 30 Mar 2017 09:54:23 +0000 (11:54 +0200)] 
README: document that gperf 3.1 is required for building now

7 years agounits: move Before deps for quota services to remote-fs.target (#5627)
tblume [Thu, 30 Mar 2017 09:21:18 +0000 (11:21 +0200)] 
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.