Commit graph

19425 commits

Author SHA1 Message Date
Lennart Poettering efe0286285 machined: if /var/lib/machines is backed by a loop file, resize it on "machinectl set-limit"
When the pool size limit is altered with "machinectl set-limit", then
not only set the subvolume quota of the /var/lib/machine subvolume, but
also resize the backing loop file and the btrfs file system on it
dynamically.
2015-02-26 00:43:16 +01:00
Thomas Hindoe Paaboel Andersen 3a4efbff2e bootctl: check that partition uuid is valid
It probably is but check anyway to make coverity happy.

CID#1271354
2015-02-25 23:32:50 +01:00
Lennart Poettering 5bd4b17360 unit: use weaker dependencies between mount and device units in --user mode
When running in user mode unmounting of mount units when a device
vanishes is unlikely to work, and even if it would work is already done
by PID 1 anyway. HEnce, when creating implicit dependencies between
mount units and their backing devices, created a Wants= type dependency
in --user mode, but leave a BindsTo= dependency in --system mode.
2015-02-25 22:06:54 +01:00
Lennart Poettering c6c8f6e218 nspawn: make kill signal to use for PID 1 configurable 2015-02-25 22:06:54 +01:00
Lennart Poettering d6ce17c7f0 machined,machinectl: add calls for changing container/VM quotas 2015-02-25 22:06:54 +01:00
Michal Schmidt 950c07d421 journal: make skipping of exhausted journal files effective again
Commit 668c965af "journal: skipping of exhausted journal files is bad if
direction changed" fixed a correctness issue, but it also significantly
limited the cases where the optimization that skips exhausted journal
files could apply.
As a result, some journalctl queries are much slower in v219 than in v218.
(e.g. queries where a "--since" cutoff should have quickly eliminated
older journal files from consideration, but didn't.)

If already in the initial iteration find_location_with_matches() finds
no entry, the journal file's location is not updated. This is fine,
except that:
 - We must update at least f->last_direction. The optimization relies on
   it. Let's separate that from journal_file_save_location() and update
   it immediately after the direction checks.
 - The optimization was conditional on "f->current_offset > 0", but it
   would always be 0 in this scenario. This check is unnecessary for the
   optimization.
2015-02-25 17:32:27 +01:00
Marcel Holtmann 3cabeab119 hwdb: Update database of Bluetooth company identifiers 2015-02-25 07:27:49 +01:00
Piotr Drąg f921eca259 po: update Polish translation
https://bugs.freedesktop.org/show_bug.cgi?id=89230
2015-02-25 00:00:07 -05:00
Daniele Medri 59a0d2da3e po: update Italian translation 2015-02-24 23:59:09 -05:00
Zbigniew Jędrzejewski-Szmek ec574c5eb0 po: simplify one sentence 2015-02-24 23:55:35 -05:00
Zbigniew Jędrzejewski-Szmek e403d1310a po: fix typo in French translation
Was already fixed elsewhere in 6be9b36068.
2015-02-24 23:53:59 -05:00
Aaro Koskinen 3bec6d4690 systemd: add getrandom syscall numbers for MIPS
Add getrandom syscall numbers for MIPS. Based on Linux 3.17 kernel
(commit 42944521af97a3b25516f15f3149aec3779656dc, "MIPS: Wire up new
syscalls getrandom and memfd_create").
2015-02-24 23:51:58 -05:00
Aaro Koskinen c1682f17a0 bootchart: svg: fix checking of list end
If we have less samples than expected, systemd-bootchart will crash.
2015-02-24 23:51:55 -05:00
Zbigniew Jędrzejewski-Szmek 1d64e14c30 build-sys: fail if gnuefi files are not found
The build would fail later anyway, so it is better to bail
out early.

Also check for the second bios file only if the first one was not
found. I'm not sure which one is preferred. If the other one, the
order should be flipped.
2015-02-24 23:33:45 -05:00
Thomas Hindoe Paaboel Andersen 7cb0f263ad bootctl: fix mem leaks
CID#1271347/1271348
2015-02-25 00:00:32 +01:00
Thomas Hindoe Paaboel Andersen 858a109f4a machined: fix check if host directory could be opened
CID#1271351
2015-02-24 20:51:28 +01:00
Thomas Hindoe Paaboel Andersen 76dcbc4992 acl-util: avoid freeing uninitialized pointer
CID#1271344/1271345
2015-02-24 20:42:40 +01:00
Lennart Poettering 4f3c168202 units: add missing unit file 2015-02-24 18:46:49 +01:00
Lennart Poettering 754061ce71 importd: enable btrfs quota in /var/lib/machines, if necessary 2015-02-24 18:46:49 +01:00
Lennart Poettering 160e3793ad machined/machinectl: when "machinectl image-status" is used without arguments show statistics about pool 2015-02-24 18:46:49 +01:00
Cristian Rodríguez 3f7f1fad76 shared: fix wrong assertion in barrier_set_role()
assert(b->pipe[0] >= 0 && b->pipe[0] >= 0);

Test the same condition twice, pretty sure we mean

 assert(b->pipe[0] >= 0 && b->pipe[1] >= 0);
2015-02-24 18:30:59 +01:00
David Herrmann 43bbf1acc8 build: make sure to test for -Wflag instead of -Wno-flag
gcc does not support testing for negated warnings. See here for details:
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63499

This patch changes CC_CHECK_FLAG_APPEND to always test for the non-negated
warnings.
2015-02-24 17:49:48 +01:00
Lennart Poettering 72c3897f77 machined: actually open up methods to unprivileged clients on dbus1
Many of machined's operations are now opened up to unprivileged clients
via PolicyKit. Open up the dbus policy so that we can actually make
these calls.

kdbus doesn't reuqire this, hence this wasn't noticed before.
2015-02-24 17:27:53 +01:00
Lennart Poettering 113b3fc1a8 importd: create a loopback btrfs file system for /var/lib/machines, if necessary
When manipulating container and VM images we need efficient and atomic
directory snapshots and file copies, as well as disk quota. btrfs
provides this, legacy file systems do not. Hence, implicitly create a
loopback file system in /var/lib/machines.raw and mount it to
/var/lib/machines, if that directory is not on btrfs anyway.

This is done implicitly and transparently the first time the user
invokes "machinectl import-xyz".

This allows us to take benefit of btrfs features for container
management without actually having the rest of the system use btrfs.

The loopback is sized 500M initially. Patches to grow it dynamically are
to follow.
2015-02-24 17:27:53 +01:00
Lennart Poettering 15e80c7b75 id128: add new sd_id128_is_null() call 2015-02-24 17:27:53 +01:00
Lennart Poettering ce06fdfb3d import: print nice warning if we need btrfs but /var/lib/machines is not btrfs 2015-02-24 17:27:53 +01:00
Daniel Mack 4b3eff6164 test-hashmap: fix gcc5 warning
gcc5 spits out a warning about test-hashmap.c:

  CC       src/test/test-hashmap.o
src/test/test-hashmap.c: In function ‘test_string_compare_func’:
src/test/test-hashmap.c:76:79: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
2015-02-24 16:26:30 +01:00
Daniel Mack f9bf3e260c shared/unit-name: fix gcc5 warning
Fix the following gcc5 warning:

  CC       src/shared/libsystemd_shared_la-unit-name.lo
src/shared/unit-name.c: In function 'unit_name_is_valid':
src/shared/unit-name.c:102:34: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
                 if (!template_ok == TEMPLATE_VALID && at+1 == e)
                                  ^
2015-02-24 16:26:30 +01:00
Zbigniew Jędrzejewski-Szmek 95d383ee47 systemctl: bump NOFILE only for systemctl_main
It is not necessary when running as telinit, etc.

https://bugzilla.redhat.com/show_bug.cgi?id=1184712
2015-02-24 10:11:06 -05:00
David Herrmann 0a98d66159 build: add -Wno-format-signedness
gcc5 introduced this option (gcc4 silently ignores it, which is fine).
Given that gcc5 thinks 'unsigned char'/'unsigned short' is promoted to
'int' for var-args, stuff like this spits out warnings:
    uint8_t x;
    printf("%" PRIu8", x);

gcc5 promots 'x' to 'int', instead of 'unsigned int' and thus gets a
signedness-warnings as it expects an 'unsigned int'.

glibc states otherwise: unsigneds are always promoted to 'unsigned int'.
Until gcc and glibc figure this out, lets just ignore that warning (which
is totally useless in its current form).
2015-02-24 16:02:32 +01:00
Martin Pitt a804d849b3 bootchart: fix default init path
Commit 6e1bf7ab99 used the wrong directory; we need rootlibexecdir, not
rootlibdir, as the latter is something like /lib/x86_64-linux-gnu/ on
multi-arch systems.

https://launchpad.net/bugs/1423867
2015-02-24 14:31:45 +01:00
Daniel Mack def3f524a1 sd-bus: test-bus-kernel-benchmark: don't rely on fixed unique names
The kernel part of kdbus does not allow userspace to make any assumption on
which unique address the first user on the bus will get.

Instead, use sd_bus_get_unique_name() to get the server's address.
2015-02-24 14:01:36 +01:00
Daniel Mack fdd30a1530 test-time: test "infinity" parsing in nanoseconds 2015-02-24 13:27:10 +01:00
Daniel Mack 8e8933ca0f shared/time-util: fix gcc5 warning
CC       src/shared/libsystemd_shared_la-time-util.lo
src/shared/time-util.c: In function 'parse_nsec':
src/shared/time-util.c:789:25: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
                 if (!*s != 0)
                         ^
2015-02-24 13:26:47 +01:00
Daniel Mack 6ad4a4fc43 sd-bus: sync kdbus.h
Follow two small changes in the kdbus API:

 * Flags are now returned in cmd->return_flags by KDBUS_CMD_NAME_ACQUIRE

 * struct kdbus_item_list has been dropped. The information stored in
   this struct was redundant since awhile already, as all commands
   report their returned slice size anyway.
2015-02-24 12:10:13 +01:00
Zbigniew Jędrzejewski-Szmek 8527b07be1 systemctl: support auditd.service better
We would print the filename header before trying to open the file. But since
the header was printed to stdout, and the error to stderr, the error would appear
on the terminal before the header. It is cleaner to open the file first, then
and only then print the header.

Also exit on first error. We shouldn't report success if we were unable to open
a file.
2015-02-23 23:38:31 -05:00
Zbigniew Jędrzejewski-Szmek d028e01814 systemctl: check validity of PID we received 2015-02-23 23:38:30 -05:00
Zbigniew Jędrzejewski-Szmek 657dbed29a resolved: use == for comparing unsigned against zero 2015-02-23 23:38:30 -05:00
Zbigniew Jędrzejewski-Szmek 1c73f3bc29 tmpfiles: avoid creating duplicate acl entries
https://bugs.freedesktop.org/show_bug.cgi?id=89202
https://bugs.debian.org/778656

Status quo ante can be restored with:
  getfacl -p /var/log/journal/`cat /etc/machine-id`|grep -v '^#'|sort -u|sudo setfacl --set-file=- /var/log/journal/`cat /etc/machine-id`
2015-02-23 23:34:06 -05:00
Zbigniew Jędrzejewski-Szmek e410b07d2a libsystemd: revert one hunk of duplicate ifdef removal
This change exposed a bug in kernel headers:

/usr/include/linux/if_bridge.h:184:20: error: field 'ip6' has incomplete type
    struct in6_addr ip6;
                    ^
/usr/include/linux/if_tunnel.h:76:19: error: field 'prefix' has incomplete type
  struct in6_addr  prefix;
                   ^
2015-02-23 20:08:05 -05:00
Zbigniew Jędrzejewski-Szmek 00c53f4283 man: explain time units in tmpfiles
https://bugzilla.redhat.com/show_bug.cgi?id=1195294
2015-02-23 20:08:05 -05:00
Daniel Mack 2c35d880de sd-bus, shared: fix includes
Include <sys/socket.h> from util.h and bus-message.h in order to
build errors like the ones below on kdbus enabled systems.

./src/shared/util.h:976:32: warning: its scope is only this definition or declaration, which is probably not what you want
In file included from src/libsystemd/sd-bus/bus-kernel.c:37:0:
./src/shared/util.h:1081:28: warning: 'struct msghdr' declared inside parameter list
 void cmsg_close_all(struct msghdr *mh);
                            ^
  CC       src/libsystemd/sd-bus/libsystemd_la-bus-creds.lo
In file included from src/libsystemd/sd-bus/bus-creds.c:25:0:
./src/shared/util.h:976:32: warning: 'struct ucred' declared inside parameter list
 int getpeercred(int fd, struct ucred *ucred);
                                ^
2015-02-24 00:42:13 +01:00
Thomas Hindoe Paaboel Andersen 2eec67acbb remove unused includes
This patch removes includes that are not used. The removals were found with
include-what-you-use which checks if any of the symbols from a header is
in use.
2015-02-23 23:53:42 +01:00
Jan Synacek 4aab5d0cbd nspawn: fix whitespace and typo in partition table blurb 2015-02-23 15:26:58 +01:00
Sylvain Plantefève d3ca673849 po: update French translation 2015-02-22 20:52:30 +01:00
Marcel Holtmann 563217eb9e build-sys: bootctl depends on HAVE_BLKID 2015-02-22 10:28:34 +01:00
Piotr Drąg 6be9b36068 logind: fix a typo in a polkit description 2015-02-21 14:02:23 +01:00
Peter Waller f4e5354a1d README: add pkg-config to required deps for autogen
Otherwise, several macros are undefined.
2015-02-20 15:38:54 -08:00
Chris Morin b44787bd43 man: make bootup graph consistent 2015-02-20 14:52:14 -08:00
Kay Sievers 11d63aea3a build-sys: update gitignore 2015-02-20 15:42:32 +01:00