]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
7 years agoMerge pull request #2471 from michaelolbrich/transient-mounts
Lennart Poettering [Thu, 4 Aug 2016 14:16:04 +0000 (16:16 +0200)] 
Merge pull request #2471 from michaelolbrich/transient-mounts

allow transient mounts and automounts

7 years agoMerge pull request #3885 from keszybz/help-output
Lennart Poettering [Thu, 4 Aug 2016 14:11:38 +0000 (16:11 +0200)] 
Merge pull request #3885 from keszybz/help-output

Update help for "short-full" and shorten to 80 columns

7 years agonetworkd: add support to configure NOARP/ARP for interface (#3854)
Susant Sahani [Thu, 4 Aug 2016 14:00:58 +0000 (19:30 +0530)] 
networkd: add support to configure NOARP/ARP for interface (#3854)

https://lists.freedesktop.org/archives/systemd-devel/2016-August/037268.html

7 years agonetworkd: remove route if carrier is lost (#3831)
Susant Sahani [Thu, 4 Aug 2016 13:56:39 +0000 (19:26 +0530)] 
networkd: remove route if carrier is lost (#3831)

Fixes #3669.

7 years agosrc/test: add tests for parse_percent_unbounded (#3889)
Jonathan Boulle [Thu, 4 Aug 2016 13:54:10 +0000 (15:54 +0200)] 
src/test: add tests for parse_percent_unbounded (#3889)

7 years agoman: describe list-dependencies --all 3885/head
Zbigniew Jędrzejewski-Szmek [Thu, 4 Aug 2016 03:49:18 +0000 (23:49 -0400)] 
man: describe list-dependencies --all

Meaning of --all was mentioned in list-dependencies description, but the this
effect should also be mentioned in the description of the option itself.

7 years agonspawn,resolve: short --help output to fit within 80 columns
Zbigniew Jędrzejewski-Szmek [Thu, 4 Aug 2016 00:05:37 +0000 (20:05 -0400)] 
nspawn,resolve: short --help output to fit within 80 columns

make dist-check-help FTW!

7 years agojournalctl,systemctl: add "short-full", "short-unix" mode to --help
Zbigniew Jędrzejewski-Szmek [Wed, 3 Aug 2016 23:52:28 +0000 (19:52 -0400)] 
journalctl,systemctl: add "short-full", "short-unix" mode to --help

7 years agoutil-lib: add parse_percent_unbounded() for percentages over 100% (#3886)
David Michael [Thu, 4 Aug 2016 11:09:54 +0000 (04:09 -0700)] 
util-lib: add parse_percent_unbounded() for percentages over 100% (#3886)

This permits CPUQuota to accept greater values as documented.

7 years agoMerge pull request #3820 from poettering/nspawn-resolvconf
Zbigniew Jędrzejewski-Szmek [Thu, 4 Aug 2016 00:14:32 +0000 (20:14 -0400)] 
Merge pull request #3820 from poettering/nspawn-resolvconf

nspawn resolv.conf handling improvements, and inherit $TERM all the way through nspawn → console login

7 years agohwdb: fix hwdb entry for numeric-only Lenovo *40, *50 and *60 series
Peter Hutterer [Wed, 3 Aug 2016 23:57:36 +0000 (09:57 +1000)] 
hwdb: fix hwdb entry for numeric-only Lenovo *40, *50 and *60 series

Commit e5bc3f4fdc matches on e.g. a T440s, but not a T440 (i.e. the one
without a suffix).

7 years agojournalctl: add new output mode "short-full" (#3880)
Lennart Poettering [Wed, 3 Aug 2016 23:45:07 +0000 (01:45 +0200)] 
journalctl: add new output mode "short-full" (#3880)

This new output mode formats all timestamps using the usual format_timestamp()
call we use pretty much everywhere else. Timestamps formatted this way are some
ways more useful than traditional syslog timestamps as they include weekday,
month and timezone information, while not being much longer. They are also not
locale-dependent. The primary advantage however is that they may be passed
directly to journalctl's --since= and --until= switches as soon as #3869 is
merged.

While we are at it, let's also add "short-unix" to shell completion.

7 years agoutil-lib: make timestamp generation and parsing reversible (#3869)
Lennart Poettering [Wed, 3 Aug 2016 23:04:53 +0000 (01:04 +0200)] 
util-lib: make timestamp generation and parsing reversible (#3869)

This patch improves parsing and generation of timestamps and calendar
specifications in two ways:

- The week day is now always printed in the abbreviated English form, instead
  of the locale's setting. This makes sure we can always parse the week day
  again, even if the locale is changed. Given that we don't follow locale
  settings for printing timestamps in any other way either (for example, we
  always use 24h syntax in order to make uniform parsing possible), it only
  makes sense to also stick to a generic, non-localized form for the timestamp,
  too.

- When parsing a timestamp, the local timezone (in its DST or non-DST name)
  may be specified, in addition to "UTC". Other timezones are still not
  supported however (not because we wouldn't want to, but mostly because libc
  offers no nice API for that). In itself this brings no new features, however
  it ensures that any locally formatted timestamp's timezone is also parsable
  again.

These two changes ensure that the output of format_timestamp() may always be
passed to parse_timestamp() and results in the original input. The related
flavours for usec/UTC also work accordingly. Calendar specifications are
extended in a similar way.

The man page is updated accordingly, in particular this removes the claim that
timestamps systemd prints wouldn't be parsable by systemd. They are now.

The man page previously showed invalid timestamps as examples. This has been
removed, as the man page shouldn't be a unit test, where such negative examples
would be useful. The man page also no longer mentions the names of internal
functions, such as format_timestamp_us() or UNIX error codes such as EINVAL.

7 years agosystemctl: consider service running only when it is in active or reloading state...
Lukáš Nykrýn [Wed, 3 Aug 2016 15:08:37 +0000 (17:08 +0200)] 
systemctl: consider service running only when it is in active or reloading state (#3874)

Otherwise for example services that are failing on start and have Restart=on-failure
and bigger RestartSec systemctl status will return 0.

Fixes: #3864
7 years agonspawn: if we can't mark the boot ID RO let's fail 3820/head
Lennart Poettering [Wed, 3 Aug 2016 12:51:05 +0000 (14:51 +0200)] 
nspawn: if we can't mark the boot ID RO let's fail

It's probably better to be safe here.

7 years agoexecute: don't set $SHELL and $HOME for services, if they don't contain interesting...
Lennart Poettering [Wed, 27 Jul 2016 18:00:33 +0000 (20:00 +0200)] 
execute: don't set $SHELL and $HOME for services, if they don't contain interesting data

7 years agocore: inherit TERM from PID 1 for all services started on /dev/console
Lennart Poettering [Wed, 27 Jul 2016 13:25:55 +0000 (15:25 +0200)] 
core: inherit TERM from PID 1 for all services started on /dev/console

This way, invoking nspawn from a shell in the best case inherits the TERM
setting all the way down into the login shell spawned in the container.

Fixes: #3697
7 years agocore: drop spurious newline
Lennart Poettering [Wed, 27 Jul 2016 13:12:42 +0000 (15:12 +0200)] 
core: drop spurious newline

7 years agonspawn: deprecate --share-system support
Lennart Poettering [Wed, 27 Jul 2016 12:56:17 +0000 (14:56 +0200)] 
nspawn: deprecate --share-system support

This removes the --share-system switch: from the documentation, the --help text
as well as the command line parsing. It's an ugly option, given that it kinda
contradicts the whole concept of PID namespaces that nspawn implements. Since
it's barely ever used, let's just deprecate it and remove it from the options.

It might be useful as a debugging option, hence the functionality is kept
around for now, exposed via an undocumented $SYSTEMD_NSPAWN_SHARE_SYSTEM
environment variable.

7 years agonspawn: try to bind mount resolved's resolv.conf snippet into the container
Lennart Poettering [Wed, 27 Jul 2016 12:50:45 +0000 (14:50 +0200)] 
nspawn: try to bind mount resolved's resolv.conf snippet into the container

This has the benefit that the container can follow the host's DNS server
changes without us having to constantly update the container's resolv.conf
settings.

7 years agoMerge pull request #3828 from keszybz/drop-systemd-vconsole-setup-service
Lennart Poettering [Wed, 3 Aug 2016 12:38:36 +0000 (14:38 +0200)] 
Merge pull request #3828 from keszybz/drop-systemd-vconsole-setup-service

Update documentation for systemd-vconsole-setup

7 years agohwdb: compress the various Lenovo *40, *50 and *60 series (#3877)
Peter Hutterer [Wed, 3 Aug 2016 11:12:37 +0000 (21:12 +1000)] 
hwdb: compress the various Lenovo *40, *50 and *60 series (#3877)

Each series has identical hardware, let's use a glob instead of listing them
one by one.

7 years agohwdb: add ID_INPUT_TRACKBALL as additional identifier (#3872)
Peter Hutterer [Wed, 3 Aug 2016 10:34:56 +0000 (20:34 +1000)] 
hwdb: add ID_INPUT_TRACKBALL as additional identifier (#3872)

Whether a device is a trackball or not is a physical property so we should
store this globally, in one place. The new property must be set in addition to
ID_INPUT_MOUSE, otherwise existing clients won't detect the device.

No actual code changes required, the default match rule is simply checking for
"Trackball" in the name (in a few versions), other entries need to be added
manually.

7 years agosocket: add support to control no. of connections from one source (#3607)
Susant Sahani [Tue, 2 Aug 2016 17:48:23 +0000 (23:18 +0530)] 
socket: add support to control no. of connections from one source (#3607)

Introduce MaxConnectionsPerSource= that is number of concurrent
connections allowed per IP.

RFE: 1939

7 years agoMerge pull request #3858 from jfilak/coredump-containers-v2
Zbigniew Jędrzejewski-Szmek [Tue, 2 Aug 2016 17:38:00 +0000 (13:38 -0400)] 
Merge pull request #3858 from jfilak/coredump-containers-v2

Coredump: save information useful for debuging crashes in containers - v2

7 years agotest: fix test-execute personality tests on ppc64 and aarch64 (#3825)
Jan Synacek [Tue, 2 Aug 2016 14:22:56 +0000 (16:22 +0200)] 
test: fix test-execute personality tests on ppc64 and aarch64 (#3825)

7 years agogitignore: libsystemd-journal.pc is no more (#3863)
Zbigniew Jędrzejewski-Szmek [Tue, 2 Aug 2016 14:04:39 +0000 (10:04 -0400)] 
gitignore: libsystemd-journal.pc is no more (#3863)

…since 4de282cf9324ab.

7 years agocoredump: save process container parent cmdline 3858/head
Jakub Filak [Wed, 27 Apr 2016 13:23:49 +0000 (15:23 +0200)] 
coredump: save process container parent cmdline

Process container parent is the process used to start processes with a new
user namespace - e.g systemd-nspawn, runc, lxc, etc.

There is not standard way how to find such a process - or I do not know
about it - hence I have decided to find the first process in the parent
process hierarchy with a different mount namespace and different
/proc/self/root's inode.

I have decided for this criteria because in ABRT we take special care
only if the crashed process runs different code than installed on the
host. Other processes with namespaces different than PID 1's namespaces
are just processes running code shipped by the OS vendor and bug
reporting tools can get information about the provider of the code
without the need to deal with changed root and so on.

7 years agomain: load Smack policy before IMA policy (#3859)
Ismo Puustinen [Tue, 2 Aug 2016 12:58:30 +0000 (15:58 +0300)] 
main: load Smack policy before IMA policy (#3859)

IMA wiki says: "If the IMA policy contains LSM labels, then the LSM
policy must be loaded prior to the IMA policy." Right now, in case of
Smack, the IMA policy is loaded before the Smack policy. Move the order
around to allow Smack labels to be used in IMA policy.

7 years agounits: add graphical-session-pre.target user unit (#3848)
Martin Pitt [Tue, 2 Aug 2016 12:56:45 +0000 (14:56 +0200)] 
units: add graphical-session-pre.target user unit (#3848)

This complements graphical-session.target for services which set up the
environment (e. g. dbus-update-activation-environment) and need to run before
the actual graphical session.

7 years agosystemd-ask-password: make sure directory watch is started before cryptsetup (#3850)
tblume [Tue, 2 Aug 2016 12:55:25 +0000 (14:55 +0200)] 
systemd-ask-password: make sure directory watch is started before cryptsetup (#3850)

The password directory watch should get ordered before cryptsetup to make sure
that the password for unlocking the crypt device gets prompted.

7 years agocoredump: save /proc/[pid]/mountinfo
Jakub Filak [Tue, 26 Apr 2016 07:54:39 +0000 (09:54 +0200)] 
coredump: save /proc/[pid]/mountinfo

The file contains information one can use to debug processes running
within a container.

7 years agomachinectl: hide legend in a case when no data (#3839)
0xAX [Mon, 1 Aug 2016 15:39:27 +0000 (18:39 +0300)] 
machinectl: hide legend in a case when no data (#3839)

For this moment machinectl prints legend and count of machines/images/etc.
But in a case when we have no images,machines,etc., there is no sense to
show legend:

~$ machinectl
MACHINE CLASS SERVICE

0 machines listed.

Let's print only 'No machines', 'No images', 'No transfers' in this case.

7 years agovirt: detect bhyve (FreeBSD hypervisor) (#3840)
Leonardo Brondani Schenkel [Mon, 1 Aug 2016 13:04:49 +0000 (15:04 +0200)] 
virt: detect bhyve (FreeBSD hypervisor) (#3840)

The CPUID and DMI vendor strings do not seem to be documented.
Values were found experimentally and by inspecting the source code.

7 years agomain: get rid of ACTION_DONE (#3849)
0xAX [Mon, 1 Aug 2016 10:38:25 +0000 (13:38 +0300)] 
main: get rid of ACTION_DONE (#3849)

the ACTION_DONE was introduced in the 4288f61921 (dbus: automatically
generate and install introspection files ) commit and was used in
systemd --introspect command.

Later 'introspect' command was removed in the ca2871d9b (bus: remove
static introspection file export) commit and have no users anymore.

So we can remove it.

7 years agoMerge pull request #3817 from dwassenberg/lenovo-trackpoint-speed-fixes
Peter Hutterer [Mon, 1 Aug 2016 03:15:39 +0000 (13:15 +1000)] 
Merge pull request #3817 from dwassenberg/lenovo-trackpoint-speed-fixes

Lenovo trackpoint speed fixes

7 years agoman: move description of kernel vconsole.conf overrides to vconsole.conf(5) 3828/head
Zbigniew Jędrzejewski-Szmek [Fri, 29 Jul 2016 05:01:04 +0000 (01:01 -0400)] 
man: move description of kernel vconsole.conf overrides to vconsole.conf(5)

They were outdated, and this way it's less likely that they'll get out of sync
again. Anyway, it's easier for the reader to have the kernel and config file
options next to one another.

7 years agovconsole-setup: add lots of debug messages
Zbigniew Jędrzejewski-Szmek [Sun, 24 Jul 2016 18:14:20 +0000 (14:14 -0400)] 
vconsole-setup: add lots of debug messages

For error messages, make them more meaningful by printing the tty name.

Follow-up for #3742.

7 years agoAdd enable_disable() helper
Zbigniew Jędrzejewski-Szmek [Sun, 24 Jul 2016 18:12:58 +0000 (14:12 -0400)] 
Add enable_disable() helper

In this patch "enabled" and "disabled" is used exclusively, but "enable" and
"disable" forms are need for the following patch.

7 years agoMerge pull request 3821 from davide125/fix-tests
Zbigniew Jędrzejewski-Szmek [Mon, 1 Aug 2016 02:01:43 +0000 (22:01 -0400)] 
Merge pull request 3821 from davide125/fix-tests

7 years agotest-path-util: check for /lt-test-path-util or /test-path-util (#3841)
Mike Gilbert [Mon, 1 Aug 2016 01:50:50 +0000 (21:50 -0400)] 
test-path-util: check for /lt-test-path-util or /test-path-util (#3841)

Depending on how binutils was configured and the --enable-fast-install
configure option, the test binary might be called either name.

Fixes: https://github.com/systemd/systemd/issues/3838
7 years agologind: 0% and 100% should be valid for UserTasksMax (#3836)
Tejun Heo [Mon, 1 Aug 2016 01:38:47 +0000 (21:38 -0400)] 
logind: 0% and 100% should be valid for UserTasksMax (#3836)

config_parse_user_tasks_max() was incorrectly accepting percentage value
between 1 and 99.  Update it to accept 0% and 100%.  This brings it in line
with TasksMax handling in systemd.

7 years agoMerge pull request #3843 from maxime1986/minor-systemd.resource-control
Zbigniew Jędrzejewski-Szmek [Mon, 1 Aug 2016 01:14:26 +0000 (21:14 -0400)] 
Merge pull request #3843 from maxime1986/minor-systemd.resource-control

7 years agodocumentation: cgroup-v1 and systemd user instance 3843/head
Maxime de Roucy [Sun, 31 Jul 2016 12:43:23 +0000 (14:43 +0200)] 
documentation: cgroup-v1 and systemd user instance

Explain in the systemd.resource-control man that systemd user instance can't use resource control on
cgroup-v1.

7 years agodocumentation: add cgroup-v2.txt link
Maxime de Roucy [Sun, 31 Jul 2016 12:38:56 +0000 (14:38 +0200)] 
documentation: add cgroup-v2.txt link

add cgroup-v2.txt link in section "Unified and Legacy Control Group
Hierarchies" of systemd.resource-control man.

7 years agotests: don't run private device tests if running in a container 3821/head
Steve Muir [Wed, 27 Jul 2016 21:23:44 +0000 (14:23 -0700)] 
tests: don't run private device tests if running in a container

Private devices don't exist when running in a container, so skip the related
tests.

7 years agotests: skip process 1 tests if systemd not is running
Davide Cavalca [Wed, 27 Jul 2016 21:22:26 +0000 (14:22 -0700)] 
tests: skip process 1 tests if systemd not is running

No point running tests against process 1 if systemd is not running as that
process. This is a rework of an unpublished patch by @9muir.

7 years agotests: don't test hostname if it looks like an id128
Steve Muir [Wed, 27 Jul 2016 21:19:37 +0000 (14:19 -0700)] 
tests: don't test hostname if it looks like an id128

The condition tests for hostname will fail if hostname looks like an id128.
The test function attempts to convert hostname to an id128, and if that
succeeds compare it to the machine ID (presumably because the 'hostname'
condition test is overloaded to also test machine ID). That will typically
fail, and unfortunately the 'mock' utility generates a random hostname that
happens to have the same format as an id128, thus causing a test failure.

7 years agotests: skip udev-test if running inside a chroot
Davide Cavalca [Wed, 27 Jul 2016 21:17:52 +0000 (14:17 -0700)] 
tests: skip udev-test if running inside a chroot

7 years agoMerge pull request #3742 from msoltyspl/vconfix2
Zbigniew Jędrzejewski-Szmek [Fri, 29 Jul 2016 03:59:06 +0000 (23:59 -0400)] 
Merge pull request #3742 from msoltyspl/vconfix2

vconsole-setup: updates & fixes V2

7 years agobuild-sys: conditionally disable LTO if requested (#3823)
Davide Cavalca [Fri, 29 Jul 2016 03:42:45 +0000 (20:42 -0700)] 
build-sys: conditionally disable LTO if requested (#3823)

This adds a --disable-lto option to ./configure, but does not change the
default behavior.

7 years agosystemctl: be sure to be quiet with 'systemctl is-enabled --quiet' (#3819)
Christian Rebischke [Thu, 28 Jul 2016 02:40:20 +0000 (04:40 +0200)] 
systemctl: be sure to be quiet with 'systemctl is-enabled --quiet' (#3819)

Fixes #3813.

7 years agohwdb: add Lenovo X260 pointing stick speed fix 3817/head
Dennis Wassenberg [Wed, 27 Jul 2016 09:01:27 +0000 (11:01 +0200)] 
hwdb: add Lenovo X260 pointing stick speed fix

Like many other recent thinkpads the factory default pointingstick
sensitivity on these devices is quite low, making the pointingstick
very slow in moving the cursor.

This extends the existing hwdb rules for tweaking the sensitivity to
also apply to the X260 models.

7 years agohwdb: add Lenovo T560 pointing stick speed fix
Dennis Wassenberg [Wed, 27 Jul 2016 09:00:56 +0000 (11:00 +0200)] 
hwdb: add Lenovo T560 pointing stick speed fix

Like many other recent thinkpads the factory default pointingstick
sensitivity on these devices is quite low, making the pointingstick
very slow in moving the cursor.

This extends the existing hwdb rules for tweaking the sensitivity to
also apply to the T560 models.

7 years agohwdb: add Lenovo T460s pointing stick speed fix
Dennis Wassenberg [Wed, 27 Jul 2016 09:00:27 +0000 (11:00 +0200)] 
hwdb: add Lenovo T460s pointing stick speed fix

Like many other recent thinkpads the factory default pointingstick
sensitivity on these devices is quite low, making the pointingstick
very slow in moving the cursor.

This extends the existing hwdb rules for tweaking the sensitivity to
also apply to the T460s models.

7 years agohwdb: add Lenovo L460 pointing stick speed fix
Dennis Wassenberg [Wed, 27 Jul 2016 08:59:38 +0000 (10:59 +0200)] 
hwdb: add Lenovo L460 pointing stick speed fix

Like many other recent thinkpads the factory default pointingstick
sensitivity on these devices is quite low, making the pointingstick
very slow in moving the cursor.

This extends the existing hwdb rules for tweaking the sensitivity to
also apply to the L460 models.

7 years agohwdb: add Lenovo X250 pointing stick speed fix
Dennis Wassenberg [Wed, 27 Jul 2016 08:56:50 +0000 (10:56 +0200)] 
hwdb: add Lenovo X250 pointing stick speed fix

Like many other recent thinkpads the factory default pointingstick
sensitivity on these devices is quite low, making the pointingstick
very slow in moving the cursor.

This extends the existing hwdb rules for tweaking the sensitivity to
also apply to the X250 models.

7 years agohwdb: add Lenovo T450s pointing stick speed fix
Dennis Wassenberg [Tue, 26 Jul 2016 14:50:07 +0000 (16:50 +0200)] 
hwdb: add Lenovo T450s pointing stick speed fix

Like many other recent thinkpads the factory default pointingstick
sensitivity on these devices is quite low, making the pointingstick
very slow in moving the cursor.

This extends the existing hwdb rules for tweaking the sensitivity to
also apply to the T450s models.

7 years agohwdb: add Lenovo L450 pointing stick speed fix
Dennis Wassenberg [Tue, 26 Jul 2016 14:47:54 +0000 (16:47 +0200)] 
hwdb: add Lenovo L450 pointing stick speed fix

Like many other recent thinkpads the factory default pointingstick
sensitivity on these devices is quite low, making the pointingstick
very slow in moving the cursor.

This extends the existing hwdb rules for tweaking the sensitivity to
also apply to the L450 models.

7 years agohwdb: add Lenovo T440p pointing stick speed fix
Dennis Wassenberg [Tue, 26 Jul 2016 14:41:47 +0000 (16:41 +0200)] 
hwdb: add Lenovo T440p pointing stick speed fix

Like many other recent thinkpads the factory default pointingstick
sensitivity on these devices is quite low, making the pointingstick
very slow in moving the cursor.

This extends the existing hwdb rules for tweaking the sensitivity to
also apply to the T440p models.

7 years agostring-util: rework memory_erase() to not use GCC optimize attribute (#3812)
Michael Biebl [Wed, 27 Jul 2016 03:32:37 +0000 (05:32 +0200)] 
string-util: rework memory_erase() to not use GCC optimize attribute (#3812)

"#pragma GCC optimize" is merely a convenience to decorate multiple
functions with attribute optimize. And the manual has this to say about
this attribute:

  This attribute should be used for debugging purposes only. It
  is not suitable in production code.

Some versions of GCC also seem to have a problem with this pragma in
combination with LTO, resulting in ICEs.

So use a different approach (indirect the memset call via a volatile
function pointer) as implemented in openssl's crypto/mem_clr.c.

Closes: #3811
7 years agovconsole: update man page 3742/head
Michal Soltys [Tue, 26 Jul 2016 22:57:01 +0000 (00:57 +0200)] 
vconsole: update man page

- about namespace
- about udev rules

7 years agovconsole: correct kernel command line namespace
Michal Soltys [Tue, 26 Jul 2016 22:57:01 +0000 (00:57 +0200)] 
vconsole: correct kernel command line namespace

7 years agovconsole: add copyright line
Michal Soltys [Tue, 26 Jul 2016 22:57:01 +0000 (00:57 +0200)] 
vconsole: add copyright line

7 years agovconsole: Don't do static installation under sysinit.target
Michal Soltys [Tue, 26 Jul 2016 22:57:01 +0000 (00:57 +0200)] 
vconsole: Don't do static installation under sysinit.target

Udev rules cover all the necessary initializations.

As the service now is neither installed, nor installable - we can
remove explicit dependencies and RemainAfterExit=yes option.

7 years agovconsole: use KD_FONT_OP_GET/SET to handle copying
Michal Soltys [Tue, 26 Jul 2016 22:57:01 +0000 (00:57 +0200)] 
vconsole: use KD_FONT_OP_GET/SET to handle copying

We now use KD_FONT_OP_GET & KD_FONT_OP_SET instead of
problematic KD_FONT_OP_COPY.

7 years agovconsole: updates of keyboard/font loading functions
Michal Soltys [Tue, 26 Jul 2016 22:57:01 +0000 (00:57 +0200)] 
vconsole: updates of keyboard/font loading functions

Change return convention to -errno/==0 and use isempty() instead
of just pointer tests.

7 years agovconsole: Add generic is_*() functions
Michal Soltys [Tue, 26 Jul 2016 22:57:01 +0000 (00:57 +0200)] 
vconsole: Add generic is_*() functions

is_allocated() and is_allocated_byfd():

Checks if the console is allocated by its index (first function) or
its open descriptor (second function).

is_settable():

Checks if the console is in xlate or unicode mode, so we can adjust
is safely without interfering with X.

7 years agovconsole: add two new toggle functions, remove old enable/disable ones
Michal Soltys [Tue, 26 Jul 2016 22:57:01 +0000 (00:57 +0200)] 
vconsole: add two new toggle functions, remove old enable/disable ones

Add toggle_utf8() and toggle_utf8_sysfs() and use them in place of old
enable/disable functions. toggle_utf8() also adds iutf8 setting and is
set up to be called per-console (in subsequent patches).

Note, that old disable_utf8() didn't bother checking if it was ok
to change the kbdmode.

7 years agovconsole: copy font to 63 consoles instead of 15
Michal Soltys [Tue, 26 Jul 2016 22:57:01 +0000 (00:57 +0200)] 
vconsole: copy font to 63 consoles instead of 15

We copy only to allocated consoles, so the cost of looping over
all possible ones is minuscule.

7 years agovconsole: don't do GIO_SCRNMAP / GIO_UNISCRNMAP
Michal Soltys [Tue, 26 Jul 2016 22:57:01 +0000 (00:57 +0200)] 
vconsole: don't do GIO_SCRNMAP / GIO_UNISCRNMAP

GIO_SCRNMAP / GIO_UNISCRNMAP are related to what setfont does with -m
option - namely setting intermediate map from 8bit values into unicode
values. This map is global, so single setfont invocation sets it for
all applicable consoles.

Furthermore calling GIO_SCRNMAP before GIO_UNISCRNMAP causes issues as
the former corrupts values > 255 (UNI alone would be sufficient).

The bug can be easily tested with the following conf:

KEYMAP=pl
FONT=LatArCyrHeb-16
FONT_MAP=8859-2

7 years agonspawn: add SYSTEMD_NSPAWN_USE_CGNS env variable (#3809)
Christian Brauner [Tue, 26 Jul 2016 14:49:15 +0000 (16:49 +0200)] 
nspawn: add SYSTEMD_NSPAWN_USE_CGNS env variable (#3809)

SYSTEMD_NSPAWN_USE_CGNS allows to disable the use of cgroup namespaces.

7 years agosystemctl: allow disable on the unit file path, but warn about it (#3806)
Michal Sekletar [Tue, 26 Jul 2016 12:25:52 +0000 (14:25 +0200)] 
systemctl: allow disable on the unit file path, but warn about it (#3806)

systemd now returns an error when it is asked to perform disable on the
unit file path. In the past this was allowed, but systemd never really
considered an actual content of the [Install] section of the unit
file. Instead it performed disable on the unit name, i.e. purged all
symlinks pointing to the given unit file (undo of implicit link action
done by systemd when enable is called on the unit file path) and all
symlinks that have the same basename as the given unit file.

However, to notice that [Install] info of the file is not consulted one
must create additional symlinks manually. I argue that in most cases
users do not create such links. Let's be nice to our users and don't
break existing scripts that expect disable to work with the unit file
path.

Fixes #3706.

7 years agojournald: deprecate SplitMode=login (#3805)
Zbigniew Jędrzejewski-Szmek [Tue, 26 Jul 2016 06:19:33 +0000 (02:19 -0400)] 
journald: deprecate SplitMode=login (#3805)

In this mode, messages from processes which are not part of the session
land in the main journal file, and only output of processes which are
properly part of the session land in the user's journal. This is
confusing, in particular because systemd-coredump runs outside of the
login session.

"Deprecate" SplitMode=login by removing it from documentation, to
discourage people from using it.

7 years agoMerge pull request #3728 from poettering/dynamic-users
Zbigniew Jędrzejewski-Szmek [Mon, 25 Jul 2016 20:40:26 +0000 (16:40 -0400)] 
Merge pull request #3728 from poettering/dynamic-users

7 years agoMerge pull request #3757 from poettering/efi-search
Zbigniew Jędrzejewski-Szmek [Mon, 25 Jul 2016 20:17:48 +0000 (16:17 -0400)] 
Merge pull request #3757 from poettering/efi-search

7 years agoMerge pull request #3589 from brauner/cgroup_namespace
Lennart Poettering [Mon, 25 Jul 2016 20:23:00 +0000 (22:23 +0200)] 
Merge pull request #3589 from brauner/cgroup_namespace

Cgroup namespace

7 years agounits: add graphical-session.target user unit (#3678)
Martin Pitt [Mon, 25 Jul 2016 20:01:35 +0000 (22:01 +0200)] 
units: add graphical-session.target user unit (#3678)

This unit acts as a dynamic "alias" target for any concrete graphical user
session like gnome-session.target; these should declare
"BindsTo=graphical-session.target" so that both targets stop and start at the
same time.

This allows services that run in a particular graphical user session (e. g.
gnome-settings-daemon.service) to declare "PartOf=graphical-session.target"
without having to know or get updated for all/new session types. This will
ensure that stopping the graphical session will stop all services which are
associated to it.

7 years agobuild-sys: metadata updates for v231 (#3803) v231
Lennart Poettering [Mon, 25 Jul 2016 19:49:47 +0000 (21:49 +0200)] 
build-sys: metadata updates for v231 (#3803)

7 years agoCODING_STYLE fixes (#3804)
Lennart Poettering [Mon, 25 Jul 2016 19:34:42 +0000 (21:34 +0200)] 
CODING_STYLE fixes (#3804)

As noted by @evverx:

https://github.com/systemd/systemd/pull/3802/files/0b81133facb7576e983ec8427ffc3a4a8cc62846#r72126018
https://github.com/systemd/systemd/pull/3802/files/0b81133facb7576e983ec8427ffc3a4a8cc62846#r72126432

7 years agoMerge pull request #3802 from poettering/id128-fixes
Zbigniew Jędrzejewski-Szmek [Mon, 25 Jul 2016 19:08:29 +0000 (15:08 -0400)] 
Merge pull request #3802 from poettering/id128-fixes

Id128 fixes and more

7 years agoMerge pull request #3800 from keszybz/systemctl-more-cleanup
Lennart Poettering [Mon, 25 Jul 2016 19:01:01 +0000 (21:01 +0200)] 
Merge pull request #3800 from keszybz/systemctl-more-cleanup

Systemctl more cleanup

7 years agoman: extend documentation on the SplitMode= setting (#3801)
Lennart Poettering [Mon, 25 Jul 2016 18:56:24 +0000 (20:56 +0200)] 
man: extend documentation on the SplitMode= setting (#3801)

Adressing https://github.com/systemd/systemd/issues/3755#issuecomment-234214273

7 years agoCODING_STYLE: document src/shared ←→ src/basic split 3802/head
Lennart Poettering [Mon, 25 Jul 2016 18:54:34 +0000 (20:54 +0200)] 
CODING_STYLE: document src/shared ←→ src/basic split

Addresses: https://github.com/systemd/systemd/pull/3580#issuecomment-227931168

While we are at it, also document that we focus on glibc, not any other libcs.

7 years agosd-id128: be more liberal when reading files with 128bit IDs
Lennart Poettering [Mon, 25 Jul 2016 18:50:24 +0000 (20:50 +0200)] 
sd-id128: be more liberal when reading files with 128bit IDs

Accept both files with and without trailing newlines. Apparently some rkt
releases generated them incorrectly, missing the trailing newlines, and we
shouldn't break that.

7 years agofileio: imply /tmp as directory if passed as NULL to open_tmpfile_unlinkable()
Lennart Poettering [Mon, 25 Jul 2016 18:35:04 +0000 (20:35 +0200)] 
fileio: imply /tmp as directory if passed as NULL to open_tmpfile_unlinkable()

We can make this smarter one day, to honour $TMPDIR and friends, but for now,
let's just use /tmp.

7 years agoman: minor man page fix
Lennart Poettering [Mon, 25 Jul 2016 18:14:13 +0000 (20:14 +0200)] 
man: minor man page fix

Addressing:

https://github.com/systemd/systemd/commit/b541146bf8c34aaaa9efcf58325f18da9253c4ec#commitcomment-17997074

7 years agoautomount: don't cancel mount/umount request on reload/reexec (#3670)
Michael Olbrich [Mon, 25 Jul 2016 18:04:02 +0000 (20:04 +0200)] 
automount: don't cancel mount/umount request on reload/reexec (#3670)

All pending tokens are already serialized correctly and will be handled
when the mount unit is done.

Without this a 'daemon-reload' cancels all pending tokens. Any process
waiting for the mount will continue with EHOSTDOWN.
This can happen when the mount unit waits for it's dependencies, e.g.
network, devices, fsck, etc.

7 years agotransaction: don't cancel jobs for units with IgnoreOnIsolate=true (#3671)
Michael Olbrich [Mon, 25 Jul 2016 18:02:55 +0000 (20:02 +0200)] 
transaction: don't cancel jobs for units with IgnoreOnIsolate=true (#3671)

This is important if a job was queued for a unit but not yet started.
Without this, the job will be canceled and is never executed even though
IgnoreOnIsolate it set to 'true'.

7 years agosystemctl: use _cleanup_ for UnitCondition 3800/head
Zbigniew Jędrzejewski-Szmek [Mon, 25 Jul 2016 16:29:20 +0000 (12:29 -0400)] 
systemctl: use _cleanup_ for UnitCondition

7 years agosystemctl: simplify machine_info_clear
Zbigniew Jędrzejewski-Szmek [Mon, 25 Jul 2016 16:21:50 +0000 (12:21 -0400)] 
systemctl: simplify machine_info_clear

It is only used with info allocated on the stack, so the pointer cannot be
NULL.

7 years agocoredump: turn off coredump collection only when PID 1 crashes, not when journald...
Lennart Poettering [Mon, 25 Jul 2016 17:03:43 +0000 (19:03 +0200)] 
coredump: turn off coredump collection only when PID 1 crashes, not when journald crashes (#3799)

As suggested:

https://github.com/systemd/systemd/pull/3783/files/5157879b757bffce3da0a68ca207753569e8627d#r71906971

7 years agosystemctl: avoid "leaking" some strings in UnitStatusInfo
Zbigniew Jędrzejewski-Szmek [Mon, 25 Jul 2016 16:15:57 +0000 (12:15 -0400)] 
systemctl: avoid "leaking" some strings in UnitStatusInfo

% valgrind --leak-check=full systemctl status multipathd.service --no-pager -n0
...
==431== 16 bytes in 2 blocks are definitely lost in loss record 1 of 2
==431==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==431==    by 0x534AF19: strdup (in /usr/lib64/libc-2.23.so)
==431==    by 0x4E81AEE: free_and_strdup (string-util.c:794)
==431==    by 0x4EF66C1: map_basic (bus-util.c:1030)
==431==    by 0x4EF6A8E: bus_message_map_all_properties (bus-util.c:1153)
==431==    by 0x120487: show_one (systemctl.c:4672)
==431==    by 0x1218F3: show (systemctl.c:4990)
==431==    by 0x4EC359E: dispatch_verb (verbs.c:92)
==431==    by 0x12A3AE: systemctl_main (systemctl.c:7742)
==431==    by 0x12B1A8: main (systemctl.c:8011)
==431==
==431== LEAK SUMMARY:
==431==    definitely lost: 16 bytes in 2 blocks

This happens because map_basic() strdups the strings. Other code in systemctl
assigns strings to UnitStatusInfo without copying them, relying on the fact
that the message is longer lived than UnitStatusInfo. Add a helper function
that is similar to map_basic, but only accepts strings and does not copy them.
The alternative of continuing to use map_basic() but adding proper cleanup
to free fields in UnitStatusInfo seems less attractive because it'd require
changing a lot of code and doing a lot of more allocations for little gain.

(I put "leaking" in quotes, because systemctl is short lived anyway.)

7 years agosystemctl: use cleanup function for UnitStatusInfo
Zbigniew Jędrzejewski-Szmek [Mon, 25 Jul 2016 15:53:14 +0000 (11:53 -0400)] 
systemctl: use cleanup function for UnitStatusInfo

There is no functional change, but clarity of the code is increased
by splitting out the cleanup part and putting it next to the structure
definition.

7 years agoMerge pull request #3681 from walyong/systemctl_condition
Zbigniew Jędrzejewski-Szmek [Mon, 25 Jul 2016 15:27:14 +0000 (11:27 -0400)] 
Merge pull request #3681 from walyong/systemctl_condition

7 years agoMerge pull request #3798 from keszybz/news-and-man-tweaks
Lennart Poettering [Mon, 25 Jul 2016 15:24:35 +0000 (17:24 +0200)] 
Merge pull request #3798 from keszybz/news-and-man-tweaks

News and man tweaks

7 years agosystemctl: style tweaks for the new condition code
Zbigniew Jędrzejewski-Szmek [Mon, 25 Jul 2016 15:20:58 +0000 (11:20 -0400)] 
systemctl: style tweaks for the new condition code

7 years agocore: change ExecStart=! syntax to ExecStart=+ (#3797)
Lennart Poettering [Mon, 25 Jul 2016 14:53:33 +0000 (16:53 +0200)] 
core: change ExecStart=! syntax to ExecStart=+ (#3797)

As suggested by @mbiebl we already use the "!" special char in unit file
assignments for negation, hence we should not use it in a different context for
privileged execution. Let's use "+" instead.

7 years agoman: use "search for unit" 3798/head
Zbigniew Jędrzejewski-Szmek [Mon, 25 Jul 2016 14:41:04 +0000 (10:41 -0400)] 
man: use "search for unit"

To "search something", in the meaning of looking for it, is valid,
but "search _for_ something" is much more commonly used, especially when
the meaning could be confused with "looking _through_ something"
(for some other object).

(C.f. "the police search a person", "the police search for a person".)

Also reword the rest of the paragraph to avoid using "automatically"
three times.

7 years agoNEWS: reword the text about libshared
Zbigniew Jędrzejewski-Szmek [Mon, 25 Jul 2016 14:34:56 +0000 (10:34 -0400)] 
NEWS: reword the text about libshared

"strict versioned dependency" suggests that version "231" of the library
is stable. But the ABI or API might be changed in any patch, so reword
the text to avoid using "version".