platform/upstream/systemd.git
9 years agoMerge pull request #1582 from evverx/dump-runtime-dir-mode
Ronny Chevalier [Fri, 16 Oct 2015 19:33:17 +0000 (21:33 +0200)]
Merge pull request #1582 from evverx/dump-runtime-dir-mode

core: dump RuntimeDirectories and RuntimeDirectoryMode too

9 years agocore: dump RuntimeDirectories and RuntimeDirectoryMode too
Evgeny Vereshchagin [Thu, 15 Oct 2015 19:15:11 +0000 (19:15 +0000)]
core: dump RuntimeDirectories and RuntimeDirectoryMode too

9 years agoMerge pull request #1586 from martinpitt/master
Kay Sievers [Fri, 16 Oct 2015 14:40:55 +0000 (16:40 +0200)]
Merge pull request #1586 from martinpitt/master

keymap: Add HP ProBook 6555b

9 years agokeymap: Add HP ProBook 6555b
Martin Pitt [Fri, 16 Oct 2015 14:30:08 +0000 (16:30 +0200)]
keymap: Add HP ProBook 6555b

Thanks to Olaf Hering!

9 years agoMerge pull request #1581 from teg/netlink-broadcast-leave
David Herrmann [Fri, 16 Oct 2015 11:05:39 +0000 (13:05 +0200)]
Merge pull request #1581 from teg/netlink-broadcast-leave

sd-netlink: refcount multicast groups

9 years agounits: .gitignore: units - ignore tmp.mount
Tom Gundersen [Thu, 15 Oct 2015 17:28:07 +0000 (19:28 +0200)]
units: .gitignore: units - ignore tmp.mount

This is a follow-up to 409c2a13fd656.

9 years agosd-netlink: refcount multicast groups
Tom Gundersen [Thu, 15 Oct 2015 15:59:10 +0000 (17:59 +0200)]
sd-netlink: refcount multicast groups

Track the number of matches installed for a given multicast group, and leave the
group once no matches depend on it.

In order to handle passed-in sockets that are already members of multicast groups
we initialize the refcount based on the membership once we take over the socket.
This way we will leave the socket in the state we found it once we finish with
it.

On kernels that do not fully support reading out the multicast group membership
we fall back to never leaving any groups (as before).

9 years agoMerge pull request #1575 from evverx/expose-manager-timerslacknsec
Lennart Poettering [Thu, 15 Oct 2015 12:11:36 +0000 (14:11 +0200)]
Merge pull request #1575 from evverx/expose-manager-timerslacknsec

core: expose manager's TimerSlackNSec as propery on dbus

9 years agocore: expose manager's TimerSlackNSec as propery on dbus
Evgeny Vereshchagin [Thu, 15 Oct 2015 11:55:04 +0000 (11:55 +0000)]
core: expose manager's TimerSlackNSec as propery on dbus

9 years agoMerge pull request #1527 from keszybz/lz4
Lennart Poettering [Thu, 15 Oct 2015 11:37:11 +0000 (13:37 +0200)]
Merge pull request #1527 from keszybz/lz4

Using lz4 frame api for coredump files

9 years agoMerge pull request #1572 from again4you/devel/tmp-smack
Lennart Poettering [Thu, 15 Oct 2015 11:09:57 +0000 (13:09 +0200)]
Merge pull request #1572 from again4you/devel/tmp-smack

units: add 'smackfsroot=*' option into tmp.mount when SMACK is enabled

9 years agoMerge pull request #1569 from mustrumr/date-parse-additions
Lennart Poettering [Thu, 15 Oct 2015 11:09:26 +0000 (13:09 +0200)]
Merge pull request #1569 from mustrumr/date-parse-additions

Date parse additions

9 years agoMerge pull request #1574 from evverx/run-timer-slack-nsec
Lennart Poettering [Thu, 15 Oct 2015 10:58:17 +0000 (12:58 +0200)]
Merge pull request #1574 from evverx/run-timer-slack-nsec

systemd-run can launch units with TimerSlackNSec

9 years agoshell-completion: systemd-run: add TimerSlackNSec property
Evgeny Vereshchagin [Thu, 15 Oct 2015 10:01:09 +0000 (10:01 +0000)]
shell-completion: systemd-run: add TimerSlackNSec property

9 years agorun: can launch units with TimerSlackNSec
Evgeny Vereshchagin [Thu, 15 Oct 2015 09:57:28 +0000 (09:57 +0000)]
run: can launch units with TimerSlackNSec

9 years agounits: add 'smackfsroot=*' option into tmp.mount when SMACK is enabled
Sangjung Woo [Wed, 14 Oct 2015 06:57:47 +0000 (15:57 +0900)]
units: add 'smackfsroot=*' option into tmp.mount when SMACK is enabled

If SMACK is enabled, 'smackfsroot=*' option should be specified in
tmp.mount file since many non-root processes use /tmp for temporary
usage. If not, /tmp is labeled as '_' and smack denial occurs when
writing.

9 years agobuild-sys: enable lz4 by default if available
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2015 02:57:55 +0000 (22:57 -0400)]
build-sys: enable lz4 by default if available

--enable-lz4 can be used to force lz4 requirement,
--disable-lz4 can be used to skip lz4 support even if available.

Also, make surrounding checks for bzip2, xz, and zlib similar in structure.
This fixes the check for requested but missing bzip2.

9 years agocompress: return errors without logging, do not fake errno
Zbigniew Jędrzejewski-Szmek [Wed, 14 Oct 2015 14:42:18 +0000 (10:42 -0400)]
compress: return errors without logging, do not fake errno

Logging for compression and decompression is assymetrical on purpose:
if compiled without some type of compression, those compression code
paths should never be invoked. OTOH, it is possible to encounter
unsupported format on decompression, so leave those log_debug statements
in, to make it easier to diagnose stuff.

9 years agoman: mention UTC support for calendar events
Hristo Venev [Wed, 14 Oct 2015 23:58:02 +0000 (02:58 +0300)]
man: mention UTC support for calendar events

9 years agotest: add calendarspec UTC tests
Hristo Venev [Wed, 14 Oct 2015 23:58:00 +0000 (02:58 +0300)]
test: add calendarspec UTC tests

9 years agobasic: calendarspec UTC support
Hristo Venev [Wed, 14 Oct 2015 23:57:59 +0000 (02:57 +0300)]
basic: calendarspec UTC support

Just add " UTC" to the end of the event expression. Works for the
special expressions.

9 years agoman: mention UTC support for timestamps
Hristo Venev [Wed, 14 Oct 2015 23:57:58 +0000 (02:57 +0300)]
man: mention UTC support for timestamps

9 years agotest: parse_timestamp UTC and fractional seconds tests
Hristo Venev [Wed, 14 Oct 2015 23:56:57 +0000 (02:56 +0300)]
test: parse_timestamp UTC and fractional seconds tests

9 years agobasic: parse_timestamp UTC and fractional seconds support
Hristo Venev [Wed, 14 Oct 2015 23:57:57 +0000 (02:57 +0300)]
basic: parse_timestamp UTC and fractional seconds support

9 years agobasic: add mktime_or_timegm and localtime_or_gmtime_r
Hristo Venev [Tue, 13 Oct 2015 19:14:33 +0000 (22:14 +0300)]
basic: add mktime_or_timegm and localtime_or_gmtime_r

to time-util.h. They take an extra argument `bool utc`.

9 years agoMerge pull request #1567 from teg/logind-suspend-logging
Lennart Poettering [Wed, 14 Oct 2015 20:34:20 +0000 (22:34 +0200)]
Merge pull request #1567 from teg/logind-suspend-logging

login: suspend - be a bit more explicit when logging

9 years agologin: suspend - be a bit more explicit when logging
Tom Gundersen [Wed, 14 Oct 2015 20:22:17 +0000 (22:22 +0200)]
login: suspend - be a bit more explicit when logging

When the Suspend method is called, the only log message we write
(unless debugging is enabled) is "Operation finished.". This is
not very helpful when trying to figure out what is going on, so
add what operation we are talking about to the message:
"Operation 'sleep' finished.".

Hat tip to Daniel Aleksandersen for pointing this out.

9 years agoMerge pull request #1528 from evverx/systemd-run-syslog-pri-fac
Lennart Poettering [Wed, 14 Oct 2015 17:39:28 +0000 (19:39 +0200)]
Merge pull request #1528 from evverx/systemd-run-syslog-pri-fac

systemd-run can launch units with SyslogLevel and SyslogFacility

9 years agocore: execute: validate syslog level and facility
Evgeny Vereshchagin [Wed, 14 Oct 2015 16:30:35 +0000 (16:30 +0000)]
core: execute: validate syslog level and facility

9 years agoutil: add functions for validating syslog level and facility
Evgeny Vereshchagin [Wed, 14 Oct 2015 16:28:40 +0000 (16:28 +0000)]
util: add functions for validating syslog level and facility

9 years agoMerge pull request #1562 from michich/overlinking
Lennart Poettering [Wed, 14 Oct 2015 15:29:24 +0000 (17:29 +0200)]
Merge pull request #1562 from michich/overlinking

build: fix overlinking

9 years agoMerge pull request #1563 from poettering/exciting-fixes
Zbigniew Jędrzejewski-Szmek [Wed, 14 Oct 2015 15:22:14 +0000 (11:22 -0400)]
Merge pull request #1563 from poettering/exciting-fixes

A variety of fixes

9 years agoshell-completion: systemd-run: add SyslogFacility property
Evgeny Vereshchagin [Sun, 11 Oct 2015 03:57:07 +0000 (03:57 +0000)]
shell-completion: systemd-run: add SyslogFacility property

9 years agosystemd-run: can launch units with SyslogFacility
Evgeny Vereshchagin [Sun, 11 Oct 2015 03:55:41 +0000 (03:55 +0000)]
systemd-run: can launch units with SyslogFacility

9 years agoshell-completion: systemd-run: add SyslogLevel property
Evgeny Vereshchagin [Sun, 11 Oct 2015 03:39:46 +0000 (03:39 +0000)]
shell-completion: systemd-run: add SyslogLevel property

9 years agosystemd-run: can launch units with SyslogLevel
Evgeny Vereshchagin [Sun, 11 Oct 2015 03:37:50 +0000 (03:37 +0000)]
systemd-run: can launch units with SyslogLevel

9 years agounit: remove [Install] section from the user exit.target unit
Lennart Poettering [Wed, 14 Oct 2015 14:25:23 +0000 (16:25 +0200)]
unit: remove [Install] section from the user exit.target unit

There's no concept of ctrl-alt-del for user systemd instances, hence
don't suggest it woud make sense to symlink the unit to it.

Fixes #1525.

9 years agotty-ask-password-agent: don't warn if we cannot disable wall messages on the calling tty
Lennart Poettering [Wed, 14 Oct 2015 14:24:25 +0000 (16:24 +0200)]
tty-ask-password-agent: don't warn if we cannot disable wall messages on the calling tty

For example, due to perm issues.

THis simply downgrades the message about it, since this is purely
cosmetical anyway.

Fixes #1543.

9 years agocore: log if the service to activate vanished before we activate it
Lennart Poettering [Wed, 14 Oct 2015 14:22:22 +0000 (16:22 +0200)]
core: log if the service to activate vanished before we activate it

Normally this shouldn't happen unless the daemon is reloaded.

A similar check is already in place in socket.c for the socket
activation case.

This hopefully makes #1526 non-fatal, though it will not fix this, and
there's something else to fix.

9 years agocompress: fix mmap error handling
Zbigniew Jędrzejewski-Szmek [Wed, 14 Oct 2015 14:15:27 +0000 (10:15 -0400)]
compress: fix mmap error handling

9 years agobuild: libdl is needed only for libnss_resolve
Michal Schmidt [Tue, 13 Oct 2015 18:06:04 +0000 (20:06 +0200)]
build: libdl is needed only for libnss_resolve

Not everything needs to link to libdl. dlopen+dlsym are used only by
libnss_resolve.

9 years agobuild: don't link everything to libcap
Michal Schmidt [Tue, 13 Oct 2015 17:52:06 +0000 (19:52 +0200)]
build: don't link everything to libcap

The intent of the assignments around the check for libcap was obviously
to avoid polluting LIBS. To work properly, LIBS must be restored from
the save_LIBS variable.

The practical effect is small though, because pretty much everything
links with libbasic, which links with CAP_LIBS.

9 years agobuild: fix overlinking to libdw
Michal Schmidt [Tue, 13 Oct 2015 14:52:53 +0000 (16:52 +0200)]
build: fix overlinking to libdw

We have two AC_CHECK_LIB checks for libdw. The first one has an empty
action-if-found, so it defaults to adding "-ldw" to LIBS. LIBS are
applied to everything we build. But only systemd-coredump needs libdw.
It already links to ELFUTILS_LIBS correctly in Makefile.am.

Drop the first AC_CHECK_LIB check. The second check is sufficient.

Q: Don't we already use "-Wl,--as-needed" to eliminate overlinking?
A: We do, but it is effective only for executables, not for shared
   libraries. This is due to a libtool bug:
   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=347650

9 years agoMerge pull request #1530 from teg/network-fixes-2
Lennart Poettering [Wed, 14 Oct 2015 10:15:09 +0000 (12:15 +0200)]
Merge pull request #1530 from teg/network-fixes-2

networkd/libsystemd-network: collection of trivial patches v2

9 years agoMerge pull request #1529 from evverx/dbus-props-syslog-fac-pri
Lennart Poettering [Wed, 14 Oct 2015 10:05:24 +0000 (12:05 +0200)]
Merge pull request #1529 from evverx/dbus-props-syslog-fac-pri

core: expose `SyslogFacility` and `SyslogLevel` as properties on dbus

9 years agocore: expose SyslogLevel and SyslogFacility as properties on dbus
Evgeny Vereshchagin [Sun, 11 Oct 2015 04:57:17 +0000 (04:57 +0000)]
core: expose SyslogLevel and SyslogFacility as properties on dbus

9 years agoMerge pull request #1560 from evverx/fix-default-chopping
Lennart Poettering [Wed, 14 Oct 2015 07:54:13 +0000 (09:54 +0200)]
Merge pull request #1560 from evverx/fix-default-chopping

bus-util: change `Default`-chopping to `Limit`-searching

9 years agoMerge pull request #1558 from martinpitt/master
Lennart Poettering [Wed, 14 Oct 2015 07:53:39 +0000 (09:53 +0200)]
Merge pull request #1558 from martinpitt/master

Fix keymap aliases and add support for Lenovo Thinkpad Yoga S1

9 years agoMerge pull request #1561 from phomes/unused-function
Lennart Poettering [Wed, 14 Oct 2015 07:47:52 +0000 (09:47 +0200)]
Merge pull request #1561 from phomes/unused-function

manager: remove unused function

9 years agokeymap: Drop keyboard-keys-to-name.h
Martin Pitt [Wed, 14 Oct 2015 04:52:41 +0000 (06:52 +0200)]
keymap: Drop keyboard-keys-to-name.h

We don't use that anywhere any more. With the introduction of alias names it
also is not a proper mapping any more as several keys (e. g. KEY_COFFEE and
KEY_SCREENLOCK) have the same numerical mapping.

9 years agokeymap: Drop ThinkPad Yoga
Martin Pitt [Tue, 13 Oct 2015 16:24:47 +0000 (18:24 +0200)]
keymap: Drop ThinkPad Yoga

The Yoga's firmware sends key events whenever it's being folded or unfolded.
These are thus *not* a button for requesting a screen orientation change, just
an indication that this already happened. Thus they should not be assigned to
"direction", but be ignored. Assigning them to "reserved" does not silence the
"unknown key pressed" kernel warning, so there's no point in maintaining a
mapping here.

Fixes #1440

9 years agokeymap: Recognize KEY_* aliases
Martin Pitt [Tue, 13 Oct 2015 16:20:34 +0000 (18:20 +0200)]
keymap: Recognize KEY_* aliases

linux/input.h contains alias definitions like

  #define KEY_COFFEE              152
  #define KEY_SCREENLOCK          KEY_COFFEE
  #define KEY_ROTATE_DISPLAY      153
  #define KEY_DIRECTION           KEY_ROTATE_DISPLAY

But we ignored these when building keyboard-keys-list.txt. Also allow the value
to start with "K" now (for KEY_*), and drop the hardcoded COFFEE →  SCREENLOCK
aliasing.

This fixes assignments to key "direction".

Fixes #1151

9 years agomanager: remove unused function
Thomas Hindoe Paaboel Andersen [Mon, 12 Oct 2015 20:10:15 +0000 (22:10 +0200)]
manager: remove unused function

9 years agobus-util: change `Default`-chopping to `Limit`-searching
Evgeny Vereshchagin [Tue, 13 Oct 2015 18:45:11 +0000 (18:45 +0000)]
bus-util: change `Default`-chopping to `Limit`-searching

See https://github.com/systemd/systemd/pull/1534#commitcomment-13744013

Actually, thinking about this, maybe it would be nicer to actually look
for "Limit" in the string rather than chopping off a "Default"....
Sounds more generic...

9 years agoman: /dev/kmsg is not a socket
Zbigniew Jędrzejewski-Szmek [Tue, 13 Oct 2015 18:22:12 +0000 (14:22 -0400)]
man: /dev/kmsg is not a socket

Fixup for #1542.

9 years agoMerge pull request #1548 from evverx/journalctl-catalog-ops-fixes
Lennart Poettering [Tue, 13 Oct 2015 17:23:54 +0000 (19:23 +0200)]
Merge pull request #1548 from evverx/journalctl-catalog-ops-fixes

Fix journalctl --dump-catalog, journalctl --list-catalog

9 years agoMerge pull request #1534 from evverx/expose-rlimits-on-dbus
Lennart Poettering [Tue, 13 Oct 2015 15:28:29 +0000 (17:28 +0200)]
Merge pull request #1534 from evverx/expose-rlimits-on-dbus

Expose `DefaultLimit*` as properties on dbus

9 years agoMerge pull request #1542 from keszybz/journal-audit-optional
Lennart Poettering [Tue, 13 Oct 2015 15:23:33 +0000 (17:23 +0200)]
Merge pull request #1542 from keszybz/journal-audit-optional

Make journald audit socket maskable

9 years agoMerge pull request #1544 from keszybz/man-IPv6AcceptRouterAdvertisements
Daniel Mack [Tue, 13 Oct 2015 11:46:39 +0000 (13:46 +0200)]
Merge pull request #1544 from keszybz/man-IPv6AcceptRouterAdvertisements

man: describe IPv6AcceptRouterAdvertisements= better

9 years agoMerge pull request #1545 from keszybz/check-for-xsltproc
Daniel Mack [Tue, 13 Oct 2015 11:46:01 +0000 (13:46 +0200)]
Merge pull request #1545 from keszybz/check-for-xsltproc

build-sys: check for xsltproc when building manpages

9 years agoMerge pull request #1552 from jsynacek/short-flags-since-until
Lennart Poettering [Tue, 13 Oct 2015 10:41:13 +0000 (12:41 +0200)]
Merge pull request #1552 from jsynacek/short-flags-since-until

journalctl: introduce short options for --since and --until

9 years agojournalctl: introduce short options for --since and --until
Jan Synacek [Tue, 13 Oct 2015 08:50:49 +0000 (10:50 +0200)]
journalctl: introduce short options for --since and --until

Fixes #1514.

9 years agojournalctl: enable args for --dump-catalog and --list-catalog
Evgeny Vereshchagin [Tue, 13 Oct 2015 06:04:11 +0000 (09:04 +0300)]
journalctl: enable args for --dump-catalog and --list-catalog

`journalctl --dump-catalog ID1 ID2 ...` works fine.

9 years agojournalctl: open pager for --dump-catalog and --list-catalog
Evgeny Vereshchagin [Tue, 13 Oct 2015 06:01:37 +0000 (09:01 +0300)]
journalctl: open pager for --dump-catalog and --list-catalog

9 years agoDocument journald sockets paths a bit more
Zbigniew Jędrzejewski-Szmek [Mon, 12 Oct 2015 03:25:43 +0000 (23:25 -0400)]
Document journald sockets paths a bit more

Adding them to the documentation makes it easier to find
the right man page for people who are trying to understand
where some socket in the filesystem is coming from.

9 years agobuild-sys: check for xsltproc when building manpages
Zbigniew Jędrzejewski-Szmek [Mon, 12 Oct 2015 17:50:03 +0000 (13:50 -0400)]
build-sys: check for xsltproc when building manpages

Only check for xsltproc if it will be used.
If not found, complain.

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

9 years agoman: describe IPv6AcceptRouterAdvertisements= better
Zbigniew Jędrzejewski-Szmek [Wed, 30 Sep 2015 18:59:43 +0000 (14:59 -0400)]
man: describe IPv6AcceptRouterAdvertisements= better

With the previous description it wasn't clear that the
kernel default is being described.

Add link to kernel docs.

9 years agojournald: make audit socket optional
Zbigniew Jędrzejewski-Szmek [Sun, 2 Aug 2015 17:55:57 +0000 (13:55 -0400)]
journald: make audit socket optional

If we were given some sockets through socket activation, and audit
socket is not among them, do not try to open it. This way, if the
socket unit is disabled, we will not receive audit events.

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

9 years agoMerge pull request #1536 from jsynacek/master
Daniel Mack [Mon, 12 Oct 2015 13:27:37 +0000 (15:27 +0200)]
Merge pull request #1536 from jsynacek/master

po/da: use unix line endings

9 years agoMerge pull request #1540 from zonque/cmsg
David Herrmann [Mon, 12 Oct 2015 13:23:51 +0000 (15:23 +0200)]
Merge pull request #1540 from zonque/cmsg

sd-daemon: wipe out memory before using CMSG_NXTHDR()

9 years agosd-daemon: wipe out memory before using CMSG_NXTHDR()
Daniel Mack [Mon, 12 Oct 2015 12:44:26 +0000 (14:44 +0200)]
sd-daemon: wipe out memory before using CMSG_NXTHDR()

CMSG_NXTHDR() checks for cmsg->cmsg_len *after* it increased the pointer.
While this makes sense for parsing received messages, that's a pitfall
for code crafting messages with this macro.

Wipe out the allocated memory to fix this.

9 years agopo/da: use unix line endings
Jan Synacek [Mon, 12 Oct 2015 07:56:24 +0000 (09:56 +0200)]
po/da: use unix line endings

9 years agoMerge pull request #1532 from phomes/trivial-fixes
Daniel Mack [Mon, 12 Oct 2015 07:45:58 +0000 (09:45 +0200)]
Merge pull request #1532 from phomes/trivial-fixes

Trivial fixes

9 years agocore: manager: expose DefaultLimit* as properties on dbus
Evgeny Vereshchagin [Mon, 12 Oct 2015 06:39:00 +0000 (06:39 +0000)]
core: manager: expose DefaultLimit* as properties on dbus

9 years agobus-util: add bus_property_get_rlimit (move from core/dbus_execute)
Evgeny Vereshchagin [Mon, 12 Oct 2015 05:16:05 +0000 (05:16 +0000)]
bus-util: add bus_property_get_rlimit (move from core/dbus_execute)

9 years agoshared: remove an unused variable
Thomas Hindoe Paaboel Andersen [Sun, 11 Oct 2015 14:42:22 +0000 (16:42 +0200)]
shared: remove an unused variable

9 years agorfkill: consistently use = in designator
Thomas Hindoe Paaboel Andersen [Sun, 11 Oct 2015 12:08:28 +0000 (14:08 +0200)]
rfkill: consistently use = in designator

9 years agonetworkd: address - introduce address_is_ready()
Tom Gundersen [Mon, 28 Sep 2015 11:30:10 +0000 (13:30 +0200)]
networkd: address - introduce address_is_ready()

Checks that a given address is not tentative nor deprecated.

9 years agonetworkd: make address_{establish,release}() static
Tom Gundersen [Thu, 24 Sep 2015 13:25:20 +0000 (15:25 +0200)]
networkd: make address_{establish,release}() static

No need to expose these functions, but rather call them from address_{add,drop}.

9 years agonetworkd: manager - avoid unnecessary memory allocation
Tom Gundersen [Wed, 23 Sep 2015 23:22:05 +0000 (01:22 +0200)]
networkd: manager - avoid unnecessary memory allocation

Don't allocate Address objects only to free them again when processing
rtnl events.

9 years agonetworkd: address - store active addresses in a Set rather than a List
Tom Gundersen [Tue, 22 Sep 2015 23:53:29 +0000 (01:53 +0200)]
networkd: address - store active addresses in a Set rather than a List

We need to be able to look these things up quickly as we will be updating them
continuously and there can in principle be many of them.

9 years agonetworkd: address - process in manager.c rather than link.c
Tom Gundersen [Tue, 22 Sep 2015 15:18:20 +0000 (17:18 +0200)]
networkd: address - process in manager.c rather than link.c

9 years agonetworkd: link - refactor (un)ref
Tom Gundersen [Fri, 9 Oct 2015 18:47:34 +0000 (20:47 +0200)]
networkd: link - refactor (un)ref

9 years agonetworkd: link - fix error handling in link_add()
Tom Gundersen [Fri, 9 Oct 2015 15:21:15 +0000 (17:21 +0200)]
networkd: link - fix error handling in link_add()

9 years agosd-netlink: add support for subscribing to ROUTE messages
Tom Gundersen [Fri, 9 Oct 2015 19:37:04 +0000 (21:37 +0200)]
sd-netlink: add support for subscribing to ROUTE messages

Also, explicitly don't support subscribing to GET or SET messages, as these will
never be emitted by the kernel.

9 years agosd-netlink: rtnl - add route_get_{scope,tos,table,protocol}()
Tom Gundersen [Fri, 9 Oct 2015 16:52:35 +0000 (18:52 +0200)]
sd-netlink: rtnl - add route_get_{scope,tos,table,protocol}()

9 years agosd-ipv4ll: allow initial address to be set explicitly
Tom Gundersen [Thu, 1 Oct 2015 19:51:49 +0000 (21:51 +0200)]
sd-ipv4ll: allow initial address to be set explicitly

This is useful in case the daemon is restarted and the state of the IPv4LL client should
be serialized/deserialized.

9 years agonetworkd: link/network - correctly align log messages
Tom Gundersen [Wed, 30 Sep 2015 17:37:52 +0000 (19:37 +0200)]
networkd: link/network - correctly align log messages

9 years agolibsystemd-network: limit accuracy of timestamps in logging
Tom Gundersen [Fri, 25 Sep 2015 15:41:09 +0000 (17:41 +0200)]
libsystemd-network: limit accuracy of timestamps in logging

We don't care about timestamps down to the last usec, round to the closest sec
as that will be plenty for debugging purposes.

9 years agonetworkd: address - add hash helpers for Address objects
Tom Gundersen [Tue, 22 Sep 2015 15:54:27 +0000 (17:54 +0200)]
networkd: address - add hash helpers for Address objects

Add compare_func and hash_func for the Address object. The notion of
address equality is the same as in the kernel, and hashing preserves
preserves equality.

Two addresses are considered equal if:
   - they have the same address family, and
     - they are neither IPv4 nor IPv6 addresses, or
     - the local addresses are identical, and
       - they are IPv6 addresses, or
         - they have the same prefixlength, and
         - their peer prefixes are identical

This fixes a bug in the old equality check, which got the local address
and the peer prefix mixed up.

9 years agonetworkd: manager - free bus after own objects
Tom Gundersen [Fri, 9 Oct 2015 19:36:04 +0000 (21:36 +0200)]
networkd: manager - free bus after own objects

Freeing links/addresses may trigger sending signals over the bus, so let's make sure
the bus stays around until our own objects have been freed.

9 years agonetworkd: route/address - simplify and unify creators
Tom Gundersen [Mon, 21 Sep 2015 13:53:40 +0000 (15:53 +0200)]
networkd: route/address - simplify and unify creators

Rename new_dynamic() to simply _new() and reuse that from new_static().

9 years agotest-compress-benchmark: test three cases (zeros, simple, semi-random)
Zbigniew Jędrzejewski-Szmek [Sun, 7 Dec 2014 02:53:39 +0000 (21:53 -0500)]
test-compress-benchmark: test three cases (zeros, simple, semi-random)

Existing test would use highly-compressible repeatable
input. Two types of input are added:
- zeros
- random blocks interspersed with zeros

The idea is to get more information about behaviour in various cases.

On Intel Xeon the results are:

% ./test-compress-benchmark
XZ/zeros: compressed & decompressed 2535301373 bytes in 32.56s (74.26MiB/s), mean compresion 99.96%, skipped 3160 bytes
LZ4/zeros: compressed & decompressed 2535304362 bytes in 1.16s (2088.69MiB/s), mean compresion 99.60%, skipped 171 bytes
XZ/simple: compressed & decompressed 2535300963 bytes in 30.42s (79.48MiB/s), mean compresion 99.95%, skipped 3570 bytes
LZ4/simple: compressed & decompressed 2535303543 bytes in 1.22s (1978.86MiB/s), mean compresion 99.60%, skipped 990 bytes
XZ/random: compressed & decompressed 381756649 bytes in 60.02s (6.07MiB/s), mean compresion 39.64%, skipped 27813723 bytes
LZ4/random: compressed & decompressed 2507385036 bytes in 0.97s (2477.52MiB/s), mean compresion 54.77%, skipped 27919497 bytes

If someone has ideas for more realistic test cases, they can be easily
added to this framework.

9 years agocoredump: use lz4frame api to compress coredumps
Zbigniew Jędrzejewski-Szmek [Sun, 7 Dec 2014 02:33:27 +0000 (21:33 -0500)]
coredump: use lz4frame api to compress coredumps

This converts the stream compression to use the new lz4frame api,
compatible with lz4cat. Previous code used custom headers, so the
compressed file was not compatible with lz4 command line tools.
I considered this the last blocker to using lz4 by default.

Speed seems to be reasonable, although a bit (a few percent) slower
than the lz4 binary, even though compression is the same. I don't
consider this important. It could be caused by the overhead of library
calls, but is probably caused by slightly different buffer sizes or
such. The code in this patch uses mmap, since since this allows the
buffer to be reused while not making the code more complicated at all.
In my testing, this version is noticably faster (~20%) than a naive
single-buffered version. mmap can cause the program to be killed with
SIGBUS, if the underlying file is truncated or a disk error occurs. We
only use this from within coredump and coredumpctl, so I don't
consider this an issue.

Old decompression code is retained and is used if the new code fails
indicating a format error. There have been reports of various smaller
distributions using previous lz4 code, i.e. the old format, and it is
nice to provide backwards compatibility. We can remove the legacy code
in a few versions.

The way that blobs are compressed in the journal is not affected.

9 years agobuild-sys: use pkgconfig and lz4 and bump version
Zbigniew Jędrzejewski-Szmek [Wed, 3 Dec 2014 03:20:08 +0000 (22:20 -0500)]
build-sys: use pkgconfig and lz4 and bump version

The new frame api was released in v. 125.

9 years agoMerge pull request #1524 from Danielmachon/catalog-danish-translation
Daniel Mack [Sat, 10 Oct 2015 17:15:28 +0000 (19:15 +0200)]
Merge pull request #1524 from Danielmachon/catalog-danish-translation

catalog: added systemd.da.catalog

9 years agocatalog: added systemd.da.catalog
Danielmachon [Sat, 10 Oct 2015 16:35:44 +0000 (18:35 +0200)]
catalog: added systemd.da.catalog

9 years agoMerge pull request #1510 from mirco/fix-nspawn
Lennart Poettering [Fri, 9 Oct 2015 15:45:42 +0000 (18:45 +0300)]
Merge pull request #1510 from mirco/fix-nspawn

nspawn: create /sys/fs/cgroup for unified hierarchy as well

9 years agoMerge pull request #1516 from poettering/dontisolaterootslice
Martin Pitt [Fri, 9 Oct 2015 15:32:30 +0000 (17:32 +0200)]
Merge pull request #1516 from poettering/dontisolaterootslice

Don't isolate `-.slice`

9 years agocore: ignore -.slice and init.scope when isolating
Lennart Poettering [Fri, 9 Oct 2015 15:18:18 +0000 (17:18 +0200)]
core: ignore -.slice and init.scope when isolating

Otherwise, we might end up trying to isolate it away when starting user
instances.

While we are at it, also prohibit manual start/stop of these two units.

Fixes: #1507