platform/upstream/systemd.git
9 years agoMerge pull request #1671 from keszybz/zsh-journalctl-identifier
Ronny Chevalier [Sun, 25 Oct 2015 16:19:30 +0000 (17:19 +0100)]
Merge pull request #1671 from keszybz/zsh-journalctl-identifier

zsh-completion: journalctl --identifier

9 years agozsh-completion: journalctl --identifier
Zbigniew Jędrzejewski-Szmek [Sun, 25 Oct 2015 14:49:19 +0000 (10:49 -0400)]
zsh-completion: journalctl --identifier

Fixes #1549.

9 years agoMerge pull request #1668 from ssahani/net1
Tom Gundersen [Sun, 25 Oct 2015 13:35:40 +0000 (14:35 +0100)]
Merge pull request #1668 from ssahani/net1

networkd: fix asserts

9 years agoMerge pull request #1654 from poettering/util-lib
Tom Gundersen [Sun, 25 Oct 2015 13:22:43 +0000 (14:22 +0100)]
Merge pull request #1654 from poettering/util-lib

Various changes to src/basic/

9 years agoMerge pull request #1667 from evverx/run-protect-system
Lennart Poettering [Sun, 25 Oct 2015 12:56:40 +0000 (13:56 +0100)]
Merge pull request #1667 from evverx/run-protect-system

systemd-run can launch units with ProtectSystem

9 years agoutil-lib: move formats-util.h from shared/ to basic/
Lennart Poettering [Sun, 25 Oct 2015 12:16:10 +0000 (13:16 +0100)]
util-lib: move formats-util.h from shared/ to basic/

It's only a header file, definining format strings for basic system
types, hence it should be in src/basic/, not src/shared/.

9 years agoutil-lib: split out fd-related operations into fd-util.[ch]
Lennart Poettering [Sun, 25 Oct 2015 12:14:12 +0000 (13:14 +0100)]
util-lib: split out fd-related operations into fd-util.[ch]

There are more than enough to deserve their own .c file, hence move them
over.

9 years agoMerge pull request #1663 from poettering/journal-compress-fix
Zbigniew Jędrzejewski-Szmek [Sun, 25 Oct 2015 04:14:51 +0000 (00:14 -0400)]
Merge pull request #1663 from poettering/journal-compress-fix

journal: fix error handling when compressing journal objects

9 years agovxlan: fix assert
Susant Sahani [Sun, 25 Oct 2015 03:55:54 +0000 (09:25 +0530)]
vxlan: fix assert

9 years agoveth: fix assert
Susant Sahani [Sun, 25 Oct 2015 03:55:16 +0000 (09:25 +0530)]
veth: fix assert

9 years agoipvlan: fix assert
Susant Sahani [Sun, 25 Oct 2015 03:54:59 +0000 (09:24 +0530)]
ipvlan: fix assert

9 years agobond: fix assert
Susant Sahani [Sun, 25 Oct 2015 03:54:31 +0000 (09:24 +0530)]
bond: fix assert

9 years agovlan: fix assert
Susant Sahani [Sun, 25 Oct 2015 04:00:17 +0000 (09:30 +0530)]
vlan: fix assert

9 years agoshell-completion: systemd-run: add the property ProtectSystem
Evgeny Vereshchagin [Sat, 24 Oct 2015 22:49:46 +0000 (22:49 +0000)]
shell-completion: systemd-run: add the property ProtectSystem

9 years agorun: can launch units with ProtectSystem
Evgeny Vereshchagin [Sat, 24 Oct 2015 22:48:33 +0000 (22:48 +0000)]
run: can launch units with ProtectSystem

9 years agoMerge pull request #1665 from evverx/unit-printf-fixes
Lennart Poettering [Sat, 24 Oct 2015 21:57:23 +0000 (23:57 +0200)]
Merge pull request #1665 from evverx/unit-printf-fixes

core: various small fixes to unit-printf

9 years agosd-*.h: clean up exported (or to-be-exported) header files
Lennart Poettering [Sat, 24 Oct 2015 21:42:56 +0000 (23:42 +0200)]
sd-*.h: clean up exported (or to-be-exported) header files

Exported header files should not include internal headers. Fix that.

Exported header files should not use the bool type. So far we opted to
stick to C89 for exported headers, and hence use "int" for bools in
them. Continue to do so.

Exported header files should have #include lines for everything they use
including inttypes.h and sys/types.h, so that they may be included in
any order.

Exported header files should have C++ guards, hence add them.

Exported header files should not use gcc extensions like #pragma once,
get rid of it.

9 years agoutil: move logind_running() to login-util.[ch]
Lennart Poettering [Sat, 24 Oct 2015 21:30:40 +0000 (23:30 +0200)]
util: move logind_running() to login-util.[ch]

9 years agocore: various small fixes to unit-printf
Evgeny Vereshchagin [Sat, 24 Oct 2015 20:55:56 +0000 (20:55 +0000)]
core: various small fixes to unit-printf

* check memory allocation errors in specifier_cgroup_slice
* %I doesn't fail for non-instantiated units (%i doesn't fail too)
* EOPNOTSUPP for consistency

9 years agoman: let's enclose * in shell examples in ''
Lennart Poettering [Sat, 24 Oct 2015 21:05:51 +0000 (23:05 +0200)]
man: let's enclose * in shell examples in ''

Technically, it's safer that way, since dnf is supposed to parse the
"*", not the shell. It doesn't really matter too much in real life (as
the expression is too complex), but let's better be safe than sorry, and
make sure people won't file bugs about this...

9 years agoutil-lib: split our string related calls from util.[ch] into its own file string...
Lennart Poettering [Sat, 24 Oct 2015 20:58:24 +0000 (22:58 +0200)]
util-lib: split our string related calls from util.[ch] into its own file string-util.[ch]

There are more than enough calls doing string manipulations to deserve
its own files, hence do something about it.

This patch also sorts the #include blocks of all files that needed to be
updated, according to the sorting suggestions from CODING_STYLE. Since
pretty much every file needs our string manipulation functions this
effectively means that most files have sorted #include blocks now.

Also touches a few unrelated include files.

9 years agoutil: split out escaping code into escape.[ch]
Lennart Poettering [Fri, 23 Oct 2015 16:52:53 +0000 (18:52 +0200)]
util: split out escaping code into escape.[ch]

This really deserves its own file, given how much code this is now.

9 years agoutil-lib: rework extract_first_word_and_warn() a bit
Lennart Poettering [Fri, 23 Oct 2015 16:20:54 +0000 (18:20 +0200)]
util-lib: rework extract_first_word_and_warn() a bit

- Really warn in all error cases, not just some. We need to make sure
  that all errors are logged to not confuse the user.

- Explicitly check for EINVAL error code before claiming anything about
  invalid escapes, could be ENOMEM after all.

9 years agoutil: split out extract_first_word() and related calls into extract-word.[ch]
Lennart Poettering [Thu, 22 Oct 2015 18:12:31 +0000 (20:12 +0200)]
util: split out extract_first_word() and related calls into extract-word.[ch]

This is quite a lot of code these days, hence move it to its own source
file.

9 years agopath-util: unify how we process paths specified on the command line
Lennart Poettering [Thu, 22 Oct 2015 17:54:29 +0000 (19:54 +0200)]
path-util: unify how we process paths specified on the command line

Let's introduce a common function that makes relative paths absolute and
warns about any errors while doing so.

9 years agoutil-lib: get_current_dir_name() can return errors other than ENOMEM
Lennart Poettering [Thu, 22 Oct 2015 17:28:31 +0000 (19:28 +0200)]
util-lib: get_current_dir_name() can return errors other than ENOMEM

get_current_dir_name() can return a variety of errors, not just ENOMEM,
hence don't blindly turn its errors to ENOMEM, but return correct errors
in path_make_absolute_cwd().

This trickles down into a couple of other functions, some of which
receive unrelated minor fixes too with this commit.

9 years agopath-util: rework find_binary(), fsck_exists() and mkfs_exists()
Lennart Poettering [Thu, 22 Oct 2015 16:24:59 +0000 (18:24 +0200)]
path-util: rework find_binary(), fsck_exists() and mkfs_exists()

Modernize the code a bit:

- Get rid of FOREACH_WORD_SEPARATOR() loop in favour of a
  extract_first_word() loop.

- Remove find_binary()'s "local" flag. It's not reasonably possible to
  look for binaries on remote systems, we hence should not pretend we
  could.

- When we cannot find a suitable binary, return the last error returned
  from access() rather than ENOENT unconditionally.

- Rework fsck_exists() and mkfs_exists() to return 1 on success, 0 if
  the implementation is missing and negative on real errors. This is
  more like we do it in other functions.

- Make sure we also detect direct fsck symlinks to "true", rather than
  just absolute ones to /bin/true.

9 years agojournal: irrelevant coding style fixes
Lennart Poettering [Sat, 24 Oct 2015 13:08:15 +0000 (15:08 +0200)]
journal: irrelevant coding style fixes

9 years agoMerge pull request #1664 from again4you/devel/tmp-smack_#5
Lennart Poettering [Sat, 24 Oct 2015 12:58:51 +0000 (14:58 +0200)]
Merge pull request #1664 from again4you/devel/tmp-smack_#5

mount: add new SmackFileSystemRoot= setting for mount unit (v4)

9 years agounits: add 'SmackFileSystemRoot=*' option into tmp.mount
Sangjung Woo [Wed, 21 Oct 2015 12:48:13 +0000 (21:48 +0900)]
units: add 'SmackFileSystemRoot=*' option into tmp.mount

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

In order to do that, 'SmackFileSystemRoot=*' is newly added into
tmp.mount.

9 years agomount: add new SmackFileSystemRoot= setting for mount unit
Sangjung Woo [Wed, 21 Oct 2015 08:42:34 +0000 (17:42 +0900)]
mount: add new SmackFileSystemRoot= setting for mount unit

This option specifies the label to assign the root of the file system if
it lacks the Smack extended attribute. Note that this option will be
ignored if kernel does not support the Smack feature by runtime
checking.

9 years agojournal: fix error handling when compressing journal objects
Lennart Poettering [Sat, 24 Oct 2015 11:17:54 +0000 (13:17 +0200)]
journal: fix error handling when compressing journal objects

Let's make sure we handle compression errors properly, and don't
misunderstand an error for success.

Also, let's actually compress things if lz4 is enabled.

Fixes #1662.

9 years agoMerge pull request #1657 from phomes/tmpfiles-simplification
Lennart Poettering [Sat, 24 Oct 2015 10:17:41 +0000 (12:17 +0200)]
Merge pull request #1657 from phomes/tmpfiles-simplification

tmpfiles: simplify mountpoint detection

9 years agoMerge pull request #1659 from vcaputo/journal_verify_envalid
Lennart Poettering [Sat, 24 Oct 2015 09:52:52 +0000 (11:52 +0200)]
Merge pull request #1659 from vcaputo/journal_verify_envalid

journal: s/Envalid/Invalid/

9 years agojournal: s/Envalid/Invalid/
Vito Caputo [Fri, 23 Oct 2015 23:12:31 +0000 (16:12 -0700)]
journal: s/Envalid/Invalid/

9 years agotmpfiles: simplify mountpoint detection
Thomas Hindoe Paaboel Andersen [Fri, 23 Oct 2015 18:15:17 +0000 (20:15 +0200)]
tmpfiles: simplify mountpoint detection

No functional change. Just a simplification. A || (!A && B) is
the same as A || B

Introduced in 78a92a5a2306709e4587e332728a76901323ade9

9 years agoMerge pull request #1653 from keszybz/lz4-compress-time
Lennart Poettering [Fri, 23 Oct 2015 15:42:24 +0000 (17:42 +0200)]
Merge pull request #1653 from keszybz/lz4-compress-time

Limit test-compress-benchmark to approx. 12 s of runtime

9 years agotest-compress-benchmark: properly initialize buffer
Zbigniew Jędrzejewski-Szmek [Sun, 18 Oct 2015 21:59:40 +0000 (17:59 -0400)]
test-compress-benchmark: properly initialize buffer

We were compressing unitialized memory, which should not result in
any problems, but is inelegant.

9 years agotest-compress-benchmark: limit default runtime to 2 seconds per subtest
Zbigniew Jędrzejewski-Szmek [Sun, 18 Oct 2015 21:10:51 +0000 (17:10 -0400)]
test-compress-benchmark: limit default runtime to 2 seconds per subtest

If both lz4 and xz are enabled, this results in a limit of
2×3×2 s ~= 12 s runtime.

Previous implementation started with really small buffer sizes. When
combined with a short time limit this resulteded in abysmal results for xz.
It seems that the initialization overead is really significant for small
buffers. Since xz will not be used by default anymore, this does not
seem worth fixing. Instead buffer sizes are changed to run a
pseudo-random non-repeating pattern. This should allow reasonable testing
for all buffer sizes. For testing, both runtime and the buffer size seed
can be specified on the command line. Sufficiently large runtime allows
all buffer sizes up to 1MB to be tested.

9 years agoMerge pull request #1652 from filbranden/extract1
Lennart Poettering [Fri, 23 Oct 2015 11:46:03 +0000 (13:46 +0200)]
Merge pull request #1652 from filbranden/extract1

util: Replace state with separate booleans in extract_first_word

9 years agoMerge pull request #1647 from evverx/use-extract-in-namespace-parsing
Lennart Poettering [Fri, 23 Oct 2015 11:18:55 +0000 (13:18 +0200)]
Merge pull request #1647 from evverx/use-extract-in-namespace-parsing

core: use extract_first_word for namespace parsing

9 years agoMerge pull request #1648 from evverx/clarify-journalctl-quiet-option
Lennart Poettering [Fri, 23 Oct 2015 10:47:07 +0000 (12:47 +0200)]
Merge pull request #1648 from evverx/clarify-journalctl-quiet-option

journalctl: clarify -q option

9 years agoMerge pull request #1641 from poettering/btrfs-quota
Daniel Mack [Fri, 23 Oct 2015 08:50:53 +0000 (10:50 +0200)]
Merge pull request #1641 from poettering/btrfs-quota

btrfs quota beef up and various other unrelated changes

9 years agoutil: Replace state with separate booleans in extract_first_word
Filipe Brandenburger [Fri, 23 Oct 2015 06:12:31 +0000 (23:12 -0700)]
util: Replace state with separate booleans in extract_first_word

This simplifies the logic and uniformizes the way single and double
quotes are handled. In the end, the code is about 40 lines shorter.

Tested by running the excellent test cases from test-util. Also
installed the systemd binaries including this patch and booted a
system with it, everything looked normal.

9 years agojournalctl: clarify -q option
Evgeny Vereshchagin [Thu, 22 Oct 2015 23:18:17 +0000 (23:18 +0000)]
journalctl: clarify -q option

-q suppresses info messages too

9 years agocore: use extract_first_word for namespace parsing
Evgeny Vereshchagin [Thu, 22 Oct 2015 20:28:28 +0000 (20:28 +0000)]
core: use extract_first_word for namespace parsing

see https://github.com/systemd/systemd/pull/1632#issuecomment-149903791
We should port this loop over to extract_first_word(), too.

9 years agoMerge pull request #1646 from keszybz/man-dnf-install
Lennart Poettering [Thu, 22 Oct 2015 18:28:50 +0000 (20:28 +0200)]
Merge pull request #1646 from keszybz/man-dnf-install

dnf install command update

9 years agoman: also add --enablerepo=updates to dnf invocation
Zbigniew Jędrzejewski-Szmek [Thu, 22 Oct 2015 18:11:22 +0000 (14:11 -0400)]
man: also add --enablerepo=updates to dnf invocation

Without the updates repo, we are installing packages from the time
that that version of Fedora was released. Normally, during the
lifetime of the release most packages are updated, so most of the
packages installed would be outdated, and the first update after
installation would update a massive set of packages. Avoid all this
by installing from the updates repo from the start.

9 years agoMerge pull request #1625 from teg/ndisc
Patrik Flykt [Thu, 22 Oct 2015 17:41:50 +0000 (20:41 +0300)]
Merge pull request #1625 from teg/ndisc

sd-ndisc: Rename (from sd-icmp6-nd) and prepare for handling SLAAC and router discovery

9 years agoman: remove --nogpg from dnf install command line
Zbigniew Jędrzejewski-Szmek [Thu, 22 Oct 2015 17:34:46 +0000 (13:34 -0400)]
man: remove --nogpg from dnf install command line

Keys for previous and future Fedora distributions were added
for the fedora-repos package recently:
https://bugzilla.redhat.com/show_bug.cgi?id=1246701.
There is no need to skip signature checking.

Also, update to the latest and greatest and remove unnecessary quotes.

9 years agosd-ndisc: reduce callbacks
Tom Gundersen [Thu, 22 Oct 2015 15:34:58 +0000 (17:34 +0200)]
sd-ndisc: reduce callbacks

Only callback on error when the statemachine is in a truly broken state. This
is now only the case when we fail to rearm a timer.

9 years agosd-ndisc: drop sd_ndisc_get_prefixlen()
Tom Gundersen [Wed, 21 Oct 2015 00:14:24 +0000 (02:14 +0200)]
sd-ndisc: drop sd_ndisc_get_prefixlen()

This is unused, and in the future we will pass prefixes and prefixlengths directly
to the callbacks when needed rather than having to search for them.

9 years agosd-ndisc: drop sd_ndisc_prefix_match()
Tom Gundersen [Mon, 19 Oct 2015 13:04:22 +0000 (15:04 +0200)]
sd-ndisc: drop sd_ndisc_prefix_match()

This is no longer used.

9 years agosd-ndisc: don't trigger timeout on prefix expiry
Tom Gundersen [Sun, 18 Oct 2015 15:45:22 +0000 (17:45 +0200)]
sd-ndisc: don't trigger timeout on prefix expiry

The caller of the library is no longer notified, so triggering a timer
just to clean up is not necessary. Instead check for and clean up
invalid prefixes lazily.

9 years agosd-ndisc: remove a prefix from the ndisc object when freeing it
Tom Gundersen [Sun, 18 Oct 2015 15:27:10 +0000 (17:27 +0200)]
sd-ndisc: remove a prefix from the ndisc object when freeing it

This follows the coding style, and allows some simplification to the rest of the code.

9 years agosd-ndisc: don't inform the caller of expired prefixes
Tom Gundersen [Sun, 18 Oct 2015 15:19:29 +0000 (17:19 +0200)]
sd-ndisc: don't inform the caller of expired prefixes

The caller should push any lifetime information into the kernel and let the kernel handle
prefix expiration.

9 years agosd-ndisc: clean up state enum
Tom Gundersen [Sun, 18 Oct 2015 15:13:03 +0000 (17:13 +0200)]
sd-ndisc: clean up state enum

There is no need to assign valuse to the states. Also add _INVALID and _MAX,
even though these are not used, it keeps it consistent.

9 years agonetworkd: dhcp6 - do not handle prefix expiration
Tom Gundersen [Sun, 18 Oct 2015 15:06:31 +0000 (17:06 +0200)]
networkd: dhcp6 - do not handle prefix expiration

This ressurects 47d45d3cde45d6545367570264e4e3636bc9e345. We now always use /128 prefixes,
so there is no need for the DHCPv6 code to know about prefixes expiring.

9 years agonetworkd: dhcp6 - DHCPv6 addresses should always be /128
Tom Gundersen [Sun, 18 Oct 2015 14:59:21 +0000 (16:59 +0200)]
networkd: dhcp6 - DHCPv6 addresses should always be /128

The routing information should be configured separately by ND, there is no need to
indicate the prefix again in the DHCPv6 addresses.

See discussion and related links at issue #1520.

9 years agonetworkd: ndisc - split out from dhcp6 code
Tom Gundersen [Fri, 16 Oct 2015 19:09:15 +0000 (21:09 +0200)]
networkd: ndisc - split out from dhcp6 code

9 years agonetworkd: ndisc - make logging messages uniform
Tom Gundersen [Fri, 16 Oct 2015 17:28:27 +0000 (19:28 +0200)]
networkd: ndisc - make logging messages uniform

Refer to Router Discovery rather than ICMPv6.

9 years agosd-ndisc: rename icmp6 to ndisc throughout the code
Tom Gundersen [Fri, 16 Oct 2015 17:17:50 +0000 (19:17 +0200)]
sd-ndisc: rename icmp6 to ndisc throughout the code

9 years agolibsystemd-network: split icm6-util.[ch] out of dhcp6 code
Tom Gundersen [Fri, 16 Oct 2015 16:09:10 +0000 (18:09 +0200)]
libsystemd-network: split icm6-util.[ch] out of dhcp6 code

9 years agonetworkd: rename icmp6 to ndisc
Tom Gundersen [Fri, 16 Oct 2015 15:34:58 +0000 (17:34 +0200)]
networkd: rename icmp6 to ndisc

9 years agosd-ndisc: rename API from sd-icmp6-nd
Tom Gundersen [Fri, 16 Oct 2015 15:07:47 +0000 (17:07 +0200)]
sd-ndisc: rename API from sd-icmp6-nd

9 years agosd-icmp6-nd: rename files to sd-ndisc
Tom Gundersen [Thu, 15 Oct 2015 17:25:31 +0000 (19:25 +0200)]
sd-icmp6-nd: rename files to sd-ndisc

The actual code rename will follow. The reason for the change of name is to make it
simpler and more uniform with how we name other libraries (we don't include the
underlying protocol). The new name also matches the naming in the kernel (which
is particularly relevent here as we expect to let the kernel do some parts of
the protocol and we do others).

9 years agoMerge pull request #1644 from reverendhomer/patch-1
Tom Gundersen [Thu, 22 Oct 2015 15:02:54 +0000 (17:02 +0200)]
Merge pull request #1644 from reverendhomer/patch-1

networkd-manager: fix swapped arguments

9 years agoMerge pull request #1642 from evverx/allow-unbalanced-double-quote-in-relax-mode
Lennart Poettering [Thu, 22 Oct 2015 10:20:12 +0000 (12:20 +0200)]
Merge pull request #1642 from evverx/allow-unbalanced-double-quote-in-relax-mode

util: allow unbalanced double quote in EXTRACT_QUOTES|EXTRACT_RELAX mode

9 years agonetworkd-manager: fix swapped arguments
reverendhomer [Thu, 22 Oct 2015 07:36:07 +0000 (10:36 +0300)]
networkd-manager: fix swapped arguments

fixes Coverity #1328493

9 years agoutil: allow unbalanced double quote in EXTRACT_QUOTES|EXTRACT_RELAX mode
Evgeny Vereshchagin [Thu, 22 Oct 2015 00:37:32 +0000 (00:37 +0000)]
util: allow unbalanced double quote in EXTRACT_QUOTES|EXTRACT_RELAX mode

extract_first_word understands "\'string" but doesn't understand "\"string"
fixed this inconsistency.

9 years agocore: check parsed bus msg in full before applying it
Lennart Poettering [Thu, 22 Oct 2015 00:02:17 +0000 (02:02 +0200)]
core: check parsed bus msg in full before applying it

9 years agonspawn: don't try to resolve passed binary before entering namespace
Lennart Poettering [Wed, 21 Oct 2015 23:33:06 +0000 (01:33 +0200)]
nspawn: don't try to resolve passed binary before entering namespace

Othewise we might follow the symlinks on the host, instead of the
container.

Fixes #1400

9 years agonspawn: rework how we determine private networking settings
Lennart Poettering [Wed, 21 Oct 2015 22:59:18 +0000 (00:59 +0200)]
nspawn: rework how we determine private networking settings

Make sure we acquire CAP_NET_ADMIN if we require virtual networking.

Make sure we imply virtual ethernet correctly when bridge is request.

Fixes: #1511
Fixes: #1554
Fixes: #1590

9 years agounits: also whitelist "blkext" block devices for nspawn service
Lennart Poettering [Wed, 21 Oct 2015 22:39:57 +0000 (00:39 +0200)]
units: also whitelist "blkext" block devices for nspawn service

/dev/loop*p* block devices are of the "blkext" subsystem, not of loop,
hence whitelist this too.

Fixes #1446

9 years agoimport: don't claim we moved .nspawn file into place when in fact we did not
Lennart Poettering [Wed, 21 Oct 2015 22:39:27 +0000 (00:39 +0200)]
import: don't claim we moved .nspawn file into place when in fact we did not

9 years agoimport: correct handling if .nspawn file could not be downloaded
Lennart Poettering [Wed, 21 Oct 2015 22:39:09 +0000 (00:39 +0200)]
import: correct handling if .nspawn file could not be downloaded

9 years agomachinectl: accept "none" and "infinity" as specifier when dropping quotas using...
Lennart Poettering [Wed, 21 Oct 2015 20:41:31 +0000 (22:41 +0200)]
machinectl: accept "none" and "infinity" as specifier when dropping quotas using "machinectl set-limit"

Previously, we already accepted "-" as special value for dropping
limits. Add "infinity", as that's what we support for RLIMITs and hence
should support here to. Also add "none" as that's what the btrfs tools
use.

9 years agoupdate TODO
Lennart Poettering [Wed, 21 Oct 2015 17:48:07 +0000 (19:48 +0200)]
update TODO

9 years agotmpfiles.d: change all subvolumes to use quota
Lennart Poettering [Wed, 21 Oct 2015 17:47:28 +0000 (19:47 +0200)]
tmpfiles.d: change all subvolumes to use quota

Let's make sure the subvolumes we create fit into a sensible definition
of a quota tree.

9 years agotmpfiles: introduce "q" and "Q" for creating quota-enabled btrfs subvolumes
Lennart Poettering [Wed, 21 Oct 2015 17:46:23 +0000 (19:46 +0200)]
tmpfiles: introduce "q" and "Q" for creating quota-enabled btrfs subvolumes

This allows us to set up the quota group hierarchy in a reasonable way
on btrfs file systems.

9 years agoimport: when downloading images, create a subtree quota group for them
Lennart Poettering [Wed, 21 Oct 2015 17:45:44 +0000 (19:45 +0200)]
import: when downloading images, create a subtree quota group for them

9 years agobtrfs: beef-up btrfs support with a limited understanding of quota
Lennart Poettering [Wed, 21 Oct 2015 17:38:21 +0000 (19:38 +0200)]
btrfs: beef-up btrfs support with a limited understanding of quota

With this change we understand more than just leaf quota groups for
btrfs file systems. Specifically:

- When we create a subvolume we can now optionally add the new subvolume
  to all qgroups its parent subvolume was member of too. Alternatively
  it is also possible to insert an intermediary quota group between the
  parent's qgroups and the subvolume's leaf qgroup, which is useful for
  a concept of "subtree" qgroups, that contain a subvolume and all its
  children.

- The remove logic for subvolumes has been updated to optionally remove
  any leaf qgroups or "subtree" qgroups, following the logic above.

- The snapshot logic for subvolumes has been updated to replicate the
  original qgroup setup of the source, if it follows the "subtree"
  design described above. It will not cover qgroup setups that introduce
  arbitrary qgroups, especially those orthogonal to the subvolume
  hierarchy.

This also tries to be more graceful when setting up /var/lib/machines as
btrfs. For example, if mkfs.btrfs is missing we don't even try to set it
up as loopback device.

Fixes #1559
Fixes #1129

9 years agologind: minor clean-ups
Lennart Poettering [Wed, 21 Oct 2015 17:36:22 +0000 (19:36 +0200)]
logind: minor clean-ups

9 years agosystemctl: the various list commands actually can take any number of arguments
Lennart Poettering [Wed, 21 Oct 2015 17:34:52 +0000 (19:34 +0200)]
systemctl: the various list commands actually can take any number of arguments

I accidentally broke this a while back when I ported systemctl to the
verbs logic.

Add support for this back.

9 years agoutil: improve dir_is_empty() call
Lennart Poettering [Mon, 19 Oct 2015 21:58:17 +0000 (23:58 +0200)]
util: improve dir_is_empty() call

Simplify the call, and add dir_is_populated() as inverse call, in order
to make some checks easier to read.

9 years agoMerge pull request #1639 from alkino/master
Lennart Poettering [Wed, 21 Oct 2015 19:01:21 +0000 (21:01 +0200)]
Merge pull request #1639 from alkino/master

core dbus: Check that flush works with memstream

9 years agocore dbus: Check that flush works with memstream
Nicolas Cornu [Wed, 21 Oct 2015 16:17:12 +0000 (18:17 +0200)]
core dbus: Check that flush works with memstream

9 years agoMerge pull request #1637 from alkino/master
Lennart Poettering [Wed, 21 Oct 2015 14:38:35 +0000 (16:38 +0200)]
Merge pull request #1637 from alkino/master

shell-completion: systemd-run: add new property EnvironmentFile

9 years agoshell-completion: systemd-run: add new property EnvironmentFile
Nicolas Cornu [Wed, 21 Oct 2015 14:18:59 +0000 (16:18 +0200)]
shell-completion: systemd-run: add new property EnvironmentFile

9 years agoMerge pull request #1632 from evverx/fix-namespace-parsing
Lennart Poettering [Wed, 21 Oct 2015 13:56:48 +0000 (15:56 +0200)]
Merge pull request #1632 from evverx/fix-namespace-parsing

core: fix namespace parsing

9 years agoMerge pull request #1636 from alkino/master
Lennart Poettering [Wed, 21 Oct 2015 13:55:31 +0000 (15:55 +0200)]
Merge pull request #1636 from alkino/master

Add zsh completion on systemd-run's properties

9 years agoAdd zsh completion on systemd-run's properties
Nicolas Cornu [Wed, 21 Oct 2015 13:51:09 +0000 (15:51 +0200)]
Add zsh completion on systemd-run's properties

9 years agocore: fix namespace parsing
Evgeny Vereshchagin [Wed, 21 Oct 2015 11:49:36 +0000 (11:49 +0000)]
core: fix namespace parsing

ReadOnlyDirectories=-/ works fine

9 years agoMerge pull request #1623 from evverx/run-rw-ro-ia-dirs
Lennart Poettering [Wed, 21 Oct 2015 10:08:44 +0000 (12:08 +0200)]
Merge pull request #1623 from evverx/run-rw-ro-ia-dirs

systemd-run can launch units with ReadWriteDirectories, ReadOnlyDirectories, InaccessibleDirectories

9 years agoMerge pull request #1626 from teg/networkd
Lennart Poettering [Wed, 21 Oct 2015 10:07:08 +0000 (12:07 +0200)]
Merge pull request #1626 from teg/networkd

networkd: assorted fixes

9 years agonetworkd: manager/link - only serialize once per event-loop iteration
Tom Gundersen [Wed, 30 Sep 2015 16:17:43 +0000 (18:17 +0200)]
networkd: manager/link - only serialize once per event-loop iteration

Every time the state is written out we may trigger third-party apps, so
let's be a bit more careful about writing this out unnecessarily.

9 years agonetworkd: link - serialize addresses
Tom Gundersen [Wed, 30 Sep 2015 13:32:16 +0000 (15:32 +0200)]
networkd: link - serialize addresses

9 years agonetworkd: route - add hash_ops
Tom Gundersen [Sat, 3 Oct 2015 16:40:28 +0000 (18:40 +0200)]
networkd: route - add hash_ops

9 years agonetworkd: route - simplify route_new()
Tom Gundersen [Fri, 9 Oct 2015 21:43:52 +0000 (23:43 +0200)]
networkd: route - simplify route_new()

9 years agonetworkd: address - distinguish between addresses added by us and by others
Tom Gundersen [Wed, 30 Sep 2015 12:01:44 +0000 (14:01 +0200)]
networkd: address - distinguish between addresses added by us and by others

We only keep the addresses that we added ourselves in link->addresses, and
introduce a new set link->addresses_foreign to keep addresses of unknown
origin.

Only functional change is that "foreign" addresses no longer prevent a link
from entering "configured" state.