1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 10:51:20 +03:00
Commit Graph

11513 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
afba41995d systemctl: show reverse dependencies or before/after ordering
Also update completion scripts a bit.
2013-04-24 00:25:04 -04:00
Zbigniew Jędrzejewski-Szmek
a6b26d9011 Small cleanup 2013-04-24 00:25:04 -04:00
Zbigniew Jędrzejewski-Szmek
90ae6c0b82 readahead: be more verbose about creation failures
systemd-readahead reports "Failed to create shared memory segment:
No such file or directory", but it's unclear how it can happen. Be
more verbose about failures.
2013-04-24 00:25:04 -04:00
Zbigniew Jędrzejewski-Szmek
ef42202ac8 Add set_consume which always takes ownership
Freeing in error path is the common pattern with set_put().
2013-04-24 00:25:04 -04:00
Zbigniew Jędrzejewski-Szmek
c79bb9e4e2 Standarize on one spelling of symlink error message
It's polite to print the name of the link that wasn't created,
and it makes little sense to print the target.
2013-04-24 00:25:04 -04:00
Zbigniew Jędrzejewski-Szmek
fff87a35d9 test: make it easier to override kernel version 2013-04-24 00:25:04 -04:00
Zbigniew Jędrzejewski-Szmek
0ee679580e systemd: fall back to mounting /sys/fs/cgroup sans xattr
xattrs on cgroup fs were added back in v3.6-rc3-3-g03b1cde. But we
support kernels >= 2.6.39, and we should also support kernels compiled
w/o xattr support, even if systemd is compiled with xattr support.
Fall back to mounting without xattr support.

Tested-by: Colin Walters <walters@verbum.org>
2013-04-24 00:25:04 -04:00
Kay Sievers
2e3ffafcab kdbus: update kdbus.h from upstream 2013-04-24 05:20:20 +02:00
Lennart Poettering
e41e194340 timer: make sure we restart timers even if units are still running or if one of their conditions fails 2013-04-23 17:42:31 -03:00
Lennart Poettering
0e99f1d6f8 update TODO 2013-04-23 16:00:32 -03:00
Lennart Poettering
3ecaa09bcc unit: rework trigger dependency logic
Instead of having explicit type-specific callbacks that inform the
triggering unit when a triggered unit changes state, make this generic
so that state changes are forwarded betwee any triggered and triggering
unit.

Also, get rid of UnitRef references from automount, timer, path units,
to the units they trigger and rely exclsuively on UNIT_TRIGGER type
dendencies.
2013-04-23 16:00:32 -03:00
Lennart Poettering
a34cb32e54 units: update user@.service to reflect new user cgroup paths 2013-04-23 16:00:32 -03:00
Lennart Poettering
7066618570 bus: add cal to determine machine id of an owner of a service 2013-04-23 16:00:32 -03:00
Umut Tezduyar
195f8e3612 man: link systemd-tmpfiles-setup-dev.service 2013-04-23 12:55:44 +02:00
Lennart Poettering
102ea8e4f2 bus: parse capability kdbus meta data of messages 2013-04-23 00:14:30 -03:00
Lennart Poettering
120f919e70 bus: parse audit metadata from kdbus messages 2013-04-22 23:38:38 -03:00
Lennart Poettering
bc7f3beb30 bus: parse owner uid from cgroup path, too 2013-04-22 23:27:38 -03:00
Lennart Poettering
ae018d9bc9 cgroup: make sure all our cgroup objects have a suffix and are properly escaped
Session objects will now get the .session suffix, user objects the .user
suffix, nspawn containers the .nspawn suffix.

This also changes the user cgroups to be named after the numeric UID
rather than the username, since this allows us the parse these paths
standalone without requiring access to the cgroup file system.

This also changes the mapping of instanced units to cgroups. Instead of
mapping foo@bar.service to the cgroup path /user/foo@.service/bar we
will now map it to /user/foo@.service/foo@bar.service, in order to
ensure that all our objects are properly suffixed in the tree.
2013-04-22 23:14:12 -03:00
Lennart Poettering
cd8f53ab16 core: there's no point to complain so loudly about non-isolatable boot targets 2013-04-22 23:14:12 -03:00
Lennart Poettering
aff38e74bd nspawn: suffix the nspawn cgroups with ".nspawn"
As discussed with Dan Berrange it's a good idea to suffix all objects in
the cgroup tree with ".something", so that when the system is
partitioned using a resource management tool we can drop objects of
different types into the same partition directory without generate
namespace conflicts.

We'l add this to the Pax Control Group document as soon as write access
to the fdo wiki is restored.
2013-04-22 23:14:12 -03:00
Lennart Poettering
dc2c75602d nspawn: always use cg_get_path() to determine fs path for a cgroup 2013-04-22 23:14:12 -03:00
Lennart Poettering
8fc66914c0 update TODO 2013-04-22 23:14:11 -03:00
Tom Gundersen
3e8037f17c units: rename systemd-static-nodes -> systemd-tmpfiles-setup-dev
This is really just a special case of systemd-tmpfiles-setup, moreover it could easily create more than static nodes.
2013-04-22 21:57:39 +02:00
Harald Hoyer
bf83067c1d shell-completion: add shell completion for "systemctl help" 2013-04-22 11:39:19 +02:00
Zbigniew Jędrzejewski-Szmek
a383724e42 systemd,nspawn: use extended attributes to store metadata
All attributes are stored as text, since root_directory is already
text, and it seems easier to have all of them in text format.

Attributes are written in the trusted. namespace, because the kernel
currently does not allow user. attributes on cgroups. This is a PITA,
and CAP_SYS_ADMIN is required to *read* the attributes. Alas.

A second pipe is opened for the child to signal the parent that the
cgroup hierarchy has been set up.
2013-04-21 21:43:43 -04:00
Lennart Poettering
9097fe299f bus: implement client logic for fd passing 2013-04-21 22:24:50 -03:00
Kay Sievers
fcdfc15924 TODO: remove dbus items which we will not touch anymore 2013-04-20 19:26:28 +02:00
Josh Triplett
601d9d6fb3 TODO: journal enhancements 2013-04-20 19:24:33 +02:00
Kay Sievers
de7a659c05 hwdb: update 2013-04-20 18:41:57 +02:00
Evangelos Foutras
9d2d0fe1e3 build-sys: prevent library underlinking
Underlinking can cause subtle bugs like the recent issue with
libnss_myhostname (which was fixed in commit 1e335af7).
2013-04-19 18:15:45 -04:00
Dave Reisner
1e335af70f nss-myhostname: ensure that glibc's assert is used 2013-04-19 16:31:52 -04:00
Lukas Nykryn
7f6437976d logind-dbus: initialize result variable 2013-04-19 10:10:41 -04:00
Lukas Nykryn
5a8e217859 crypt-setup-generator: correctly check return of strdup 2013-04-19 10:10:41 -04:00
Zbigniew Jędrzejewski-Szmek
31885cd5e3 core/killall: use procfs_file_alloca 2013-04-19 10:10:41 -04:00
Harald Hoyer
bdd29249a8 Reintroduce f_type comparison macro
This reverts commit 4826f0b7b5.

Because statfs.t_type can be int on some architecures, we have to cast
the const magic to the type, otherwise the compiler warns about
signed/unsigned comparison, because the magic can be 32 bit unsigned.

statfs(2) man page is also wrong on some systems, because
f_type is not __SWORD_TYPE on some architecures.

The following program:

int main(int argc, char**argv)
{
        struct statfs s;
        statfs(argv[1], &s);

	printf("sizeof(f_type) = %d\n", sizeof(s.f_type));
	printf("sizeof(__SWORD_TYPE) = %d\n", sizeof(__SWORD_TYPE));
	printf("sizeof(long) = %d\n", sizeof(long));
	printf("sizeof(int) = %d\n", sizeof(int));
	if (sizeof(s.f_type) == sizeof(int)) {
		printf("f_type = 0x%x\n", s.f_type);
	} else {
                printf("f_type = 0x%lx\n", s.f_type);
	}
        return 0;
}

executed on s390x gives for a btrfs:

sizeof(f_type) = 4
sizeof(__SWORD_TYPE) = 8
sizeof(long) = 8
sizeof(int) = 4
f_type = 0x9123683e
2013-04-19 13:59:07 +02:00
Zbigniew Jędrzejewski-Szmek
cbeabcfbc5 Update NEWS 2013-04-18 19:59:12 -04:00
Zbigniew Jędrzejewski-Szmek
7f876bc428 systemd-python: wrap sd_journal_add_conjunction 2013-04-18 19:38:28 -04:00
Zbigniew Jędrzejewski-Szmek
f333fbb1ef nspawn: create empty /etc/resolv.conf if necessary
nspawn will overmount resolv.conf if it exists. Since e.g.
default install with yum doesn't create /etc/resolv.conf,
a container created with yum will not have network. This
seems undesirable, and since we overmount the file anyway,
let's create it too.

Also, mounting a read-write /etc/resolv.conf in the container
is treated as a failure, since it makes it possible to
modify hosts /etc/resolv.conf from inside the container.
2013-04-18 19:38:28 -04:00
Lennart Poettering
7c04ad2da1 build-sys: run 'make update-man-list' 2013-04-19 01:11:38 +02:00
Lennart Poettering
ef3b524687 build-sys: prepare release 202 2013-04-19 00:41:24 +02:00
Marius Vollmer
a3e6f050de journal: when iterating through a file we might lose messages when changing direction.
https://bugs.freedesktop.org/show_bug.cgi?id=63672
2013-04-18 22:34:36 +02:00
Lennart Poettering
cc400110ff man: document the new login class 'background' 2013-04-18 22:20:56 +02:00
Lennart Poettering
461bd8e47c update TODO 2013-04-18 22:19:33 +02:00
Harald Hoyer
8d768d9962 cryptsetup: ask for password, if key file cannot be accessed
If the key file cannot be accessed, we can at least ask for the
password.
2013-04-18 22:17:13 +02:00
Josh Triplett
4befe2eba0 systemd-logind: Fix linking by reordering libraries in LDADD
libsystemd-audit needs functions from libsystemd-shared, so
libsystemd-audit needs to appear first.  Otherwise:

  CCLD   systemd-logind
./.libs/libsystemd-audit.a(audit.o): In function `audit_session_from_pid':
/home/josh/src/systemd/src/shared/audit.c:50: undefined reference to `detect_container'
2013-04-18 20:33:26 +02:00
Kay Sievers
b030d1f864 bus: test - add hack to receive messages 2013-04-18 19:05:10 +02:00
Kay Sievers
a2cef833cf bus: catch up with kernel changes 2013-04-18 18:54:17 +02:00
Henrik Grindal Bakken
cee22bd3cb buildsys: Add --disable-tests to avoid building tests
This patch adds --disable-tests to configure.  It is based on a patch
posted by Thierry Reding in 2010.  The motivation for adding it is that
some tests fail link-time when cross-compiling.

The patch adds a new Makefile variable -- manual_tests -- and uses
that instead of noinst_PROGRAMS.  However, if ENABLE_TESTS is true,
the former is added to the latter.  It also renames noinst_tests to
simply tests.
2013-04-18 17:15:59 +02:00
Harald Hoyer
4826f0b7b5 Revert f_type fixups
This reverts commit a858b64ddd.
This reverts commit aea275c431.
This reverts commit fc6e6d245e.
This reverts commit c4073a27c5.
This reverts commit cddf148028.
This reverts commit 8c68a70170.

The constants are now casted to __SWORD_TYPE, which should resolve the
compiler warnings about signed vs unsigned.

After talking to Kay, we concluded:

This should be fixed in the kernel, not worked around in userspace tools.

Architectures cannot use int and expect magic constants lager than INT_MAX
to work correctly. The kernel header needs to be fixed.

Even coreutils cannot handle it:
  #define RAMFS_MAGIC  0x858458f6
  # stat -f -c%t /
  ffffffff858458f6

  #define BTRFS_SUPER_MAGIC 0x9123683E
  # stat -f -c%t /mnt
  ffffffff9123683e

Although I found the perfect working macro to fix the thing :)

        __extension__ ({                                                \
                        bool _ret = false;                              \
                        switch(f) { case c: _ret=true; };               \
                        ( _ret );                                       \
                })
2013-04-18 15:01:55 +02:00
Harald Hoyer
a858b64ddd macro.h: let F_TYPE_CMP() macro fail to compile, if second parameter is not const
If the magic parameter is not a const, then the macro does not work, so
better fail to compile, than be surprised afterwards.
2013-04-18 12:05:41 +02:00