1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 17:51:22 +03:00
Commit Graph

9648 Commits

Author SHA1 Message Date
Lennart Poettering
2d27a19d92 man: link up journalctl man page with developer documenation 2012-11-16 03:04:08 +01:00
Lennart Poettering
95ec8647c7 journal: recommend journalctl -x more often 2012-11-16 03:03:54 +01:00
Lennart Poettering
6f9e5c9619 update TODO 2012-11-16 03:03:30 +01:00
Lennart Poettering
5d6a86d7a0 catalog: add catalog entries for all of systemd's own journal messages 2012-11-16 03:03:22 +01:00
Lennart Poettering
e6c6e7afff update TODO 2012-11-16 01:36:29 +01:00
Lennart Poettering
83f6936a01 journal: extend catalog header to 64bit for all fields, just to be safe and follow the rest of the file formats 2012-11-16 01:35:11 +01:00
Lennart Poettering
0049f05a8b shutdown: readd explicit sync() when shutting down
As it turns out reboot() doesn't actually imply a file system sync, but
only a disk sync. Accordingly, readd explicit sync() invocations
immediately before we invoke reboot().

This is much less dramatic than it might sounds as we umount all
disks/read-only remount them anyway before going down.
2012-11-16 01:35:11 +01:00
Anders Olofsson
f553b3b107 udev: make blkid optional
I'm building systemd for an embedded system and we would prefer not having
to include the entire util-linux package just to get a libblkid whose
functionality we don't need.
2012-11-16 01:17:18 +01:00
Lennart Poettering
d4205751d4 journal: implement message catalog
The message catalog can be used to attach short help texts to log lines,
keyed by their MESSAGE_ID= fields. This is useful to help the
administrator understand the context and cause of a message, find
possible solutions and find further related documentation.

Since this is keyed off MESSAGE_ID= this will only work for native
journal messages.

The message catalog supports i18n, and is useful to augment english
language system messages with explanations in the local language.

This commit only includes short explanatory messages for a few example
message IDs, we'll add more complete documentation for the relevant
systemd messages later on.
2012-11-15 23:09:07 +01:00
Lennart Poettering
59f432ea6d hostnamectl: fix parsing of --no-ask-password 2012-11-15 23:07:25 +01:00
Lennart Poettering
8e6054f732 Update TODO 2012-11-15 23:07:25 +01:00
Lennart Poettering
8885064fd0 polkit: if PK is not around, consider this a permission denied error
Uninstalling PK should cleanly disable PK authorization but not result
in further runtime errors.
2012-11-15 23:07:25 +01:00
Kay Sievers
33c770b174 udev: hwdb - properly handle a missing database
On Thu, Nov 15, 2012 at 5:05 PM, Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> wrote:
> Something like this appeared with latest git:
>
> Nov 15 16:55:46 fedora-15 systemd-udevd[334]: worker [364] terminated by signal 11 (Segmentation fault)
> Nov 15 16:55:46 fedora-15 [387]: Process 364 (systemd-udevd) dumped core.
> Nov 15 16:55:46 fedora-15 systemd-udevd[334]: worker [364] failed while handling '/devices/virtual/net/lo'
> Nov 15 16:55:46 fedora-15 systemd-udevd[334]: worker [360] terminated by signal 11 (Segmentation fault)
> Nov 15 16:55:46 fedora-15 systemd-udevd[334]: worker [360] failed while handling '/devices/pci0000:00/0000:00:03.0/virtio0/net
> Nov 15 16:55:46 fedora-15 [389]: Process 360 (systemd-udevd) dumped core.
>
> Core was generated by usr/lib/systemd/systemd-udevd'.
> Program terminated with signal 11, Segmentation fault.
> #0  0x0000000000423c87 in udev_hwdb_get_properties_list_entry (hwdb=0x0, modalias=0x7fffbcd155f0
2012-11-15 17:30:03 +01:00
Zbigniew Jędrzejewski-Szmek
f72daa64dc dbus-manager: modernize style 2012-11-15 16:30:24 +01:00
Eelco Dolstra
645a9e5a2b dbus-manager: fix a fatal dbus abort in bus_manager_message_handler()
If ListUnitFiles fails, or an OOM occurs, then dbus_message_unref()
will be called twice on "reply", causing systemd to crash.  So remove
the call to dbus_message_unref(); it is unnecessary because of
the cleanup attribute on "reply".

[zj: modified to leave one dbus_message_unref() alone, per Colin
Walters' comment.]
2012-11-15 16:29:53 +01:00
Holger Hans Peter Freyther
bb11271068 sched: Only setting CPUSchedulingPriority=rr doesn't work
A service that only sets the scheduling policy to round-robin
fails to be started. This is because the cpu_sched_priority is
initialized to 0 and is not adjusted when the policy is changed.

Clamp the cpu_sched_priority when the scheduler policy is set. Use
the current policy to validate the new priority.

Change the manual page to state that the given range only applies
to the real-time scheduling policies.

Add a testcase that verifies this change:

$ make test-sched-prio; ./test-sched-prio
[test/sched_idle_bad.service:6] CPU scheduling priority is out of range, ignoring: 1
[test/sched_rr_bad.service:7] CPU scheduling priority is out of range, ignoring: 0
[test/sched_rr_bad.service:8] CPU scheduling priority is out of range, ignoring: 100
2012-11-15 16:16:45 +01:00
Lekensteyn
71c0159692 journalctl: require argument for --priority
This fixes a segfault due to a missing value for --priority. -p is
unaffected because it is specified in the getopt_long parameter list.
2012-11-15 16:09:02 +01:00
Zbigniew Jędrzejewski-Szmek
2480f0c677 man: update description of ExecStart and friends
Semicolon separated lines are supported for all those commands,
and semicolons can now be escaped.
2012-11-15 16:01:22 +01:00
Zbigniew Jędrzejewski-Szmek
0f67f1efae core: lift restriction on order of - and @ in ExecStart 2012-11-15 16:01:22 +01:00
Oleksii Shevchuk
7e1a84f552 core: interpret \; token in ExecStart as escaped ;
Some commands (like 'find') take a semicolon as separate arg. With
current parser implementation there is no way to pass one.

Patch adds token \;
2012-11-15 16:01:10 +01:00
Zbigniew Jędrzejewski-Szmek
2c5417ade0 tests: add tests for config_parse_exec 2012-11-15 16:00:45 +01:00
Oleksii Shevchuk
a66f3bea8b core/load-fragment-gperf: add missing CONDITION_FILE_NOT_EMPTY
Unit files couldn't be properly parsed, because of
absent ConditionFileNotEmpty in load-fragment table.
2012-11-15 16:00:03 +01:00
Oleksii Shevchuk
774de5a97f core: fix %h, %s, %p handling in templates in user session 2012-11-15 15:59:50 +01:00
Olivier Brunel
f09a7d2554 systemd: highlight ordering cycle deletions
Having unit(s) removed/not started, even if it solved the issue and allowed
to boot successfully, should still be considered an error, as something
clearly isn't right.

This patch elevates the log message from warning to error, and adds a status
message to make things more obvious.
2012-11-15 15:59:39 +01:00
Zbigniew Jędrzejewski-Szmek
45c0c61df3 systemctl: add help for --type/-t
The list of types and load states if lengthy, so a little reminder
can be sometimes useful.
2012-11-15 11:54:57 +01:00
Zbigniew Jędrzejewski-Szmek
48c2826b4e systemctl: remove empty line in case of no units 2012-11-15 11:39:23 +01:00
Zbigniew Jędrzejewski-Szmek
d025f1e4dc build-sys: store journald code in a noinst library
The point is to allow the use of journald functions by other binaries.
Before, journald code was split into multiple files (journald-*.[ch]),
but all those files all required functions from journald.c. And
journald.c has its own main(). Now, it is possible to link against
those functions, e.g. from test binaries.

This constitutes a fix for https://bugzilla.redhat.com/show_bug.cgi?id=872638.

The patch does the following:
1. rename journald.h to journald-server.h and move corresponding code
   to journald-server.c.
2. add journald-server.c and other journald-*.c parts to
   libsystemd-journal-internal.
3. remove journald-syslog.c from test_journal_syslog_SOURCES, since
   it is now contained in libsystemd-journal-internal.
There are no code changes, apart from the removal of a few static's,
to allow function calls between files.
2012-11-14 23:39:53 +01:00
Zbigniew Jędrzejewski-Szmek
be1015dd34 man: throw in an example of timedatectl output
timedatectl is too cool not to advertise it a bit.
2012-11-14 23:25:22 +01:00
Zbigniew Jędrzejewski-Szmek
fea05a40ff timedatectl: break line to not exceed 80 columns 2012-11-14 22:49:29 +01:00
Zbigniew Jędrzejewski-Szmek
e7098b699a lawyerese: add header to make-directive-index 2012-11-14 22:49:29 +01:00
Lennart Poettering
e673ad0415 update TODO 2012-11-14 22:21:16 +01:00
Lennart Poettering
6e6fb527f9 shared: add API for replacing @FOO@ style variables in strings 2012-11-14 22:21:16 +01:00
Lennart Poettering
409bc9c33e util: add strreplace() to replace a substring by another string 2012-11-14 22:21:16 +01:00
Lennart Poettering
7ae03f3697 specifier: minor modernizations 2012-11-14 22:21:16 +01:00
Lennart Poettering
0290296582 polkit: fix type on comparison 2012-11-14 22:21:16 +01:00
Lennart Poettering
7361c3b4e1 TODO 2012-11-14 22:21:16 +01:00
Lennart Poettering
b603662c41 README: don't list libgcrypt twice as dep 2012-11-14 22:21:16 +01:00
Michal Schmidt
e17187091d configure.ac: fix FTBFS with new glibc
glibc moved clock_* functions from librt to the core libc. As a result,
clock_gettime is no more a suitable symbol to use when finding librt.
Look for mq_open instead.
Reference:
http://www.sourceware.org/git/gitweb.cgi?p=glibc.git&h=6e6249d0b461b952d0f544792372663feb6d792a

Fixes a FTBFS in Fedora Rawhide.
2012-11-14 14:46:15 +01:00
Thomas Hindoe Paaboel Andersen
377ec8bf19 delta.c: fix option '-t'
Both the help and man page claims that it accepts -t with an argument
so let's do that.
2012-11-14 00:18:02 +01:00
Thomas Hindoe Paaboel Andersen
e26970a82c delta.c: use _cleanup_ 2012-11-13 23:45:41 +01:00
Marti Raudsepp
73c0495f68 python: add journal backend for the logging framework
Supports Python versions 2.6 through 3.3 (tested on 2.7 and 3.2).
See JournalHandler docstring for usage details.

[zj: - use send() instead of using sendv() directly
     - do exception handling like in the logging module
     - bumped min version to python2.6, since the module
       does not work with python2.5 anyway ]
2012-11-13 11:13:52 +01:00
Zbigniew Jędrzejewski-Szmek
568c7e0237 systemd-python: use python${PYTHON_VERSION}-config as python-config
This is the usual setup, where pythonX.Y and pythonX.Y-config go
together. Using python-config with python3 will only lead to
confusion.

--libs is changed to --ldflags, since the latter also includes other
required flags like -L<dir>.

The tests for HAVE_PYTHON and HAVE_PYTHON_DEVEL are separated. It is
possible to have python development libraries installed without the
binary (or to want to build python modules without using python during
the build).

A line is added to the output, to show what flags will be used for
python.
2012-11-13 02:32:56 +01:00
Zbigniew Jędrzejewski-Szmek
0c0271841a systemd-analyze: use argparse instead of getopt
Makes the output way nicer with shorter code. Also brings
systemd-analyze behaviour more in line with other systemd-programs.

Argparse is in Python since 2.6, and is available as a package for
previous versions, if someone is stuck with very old Python.
2012-11-13 02:23:02 +01:00
Zbigniew Jędrzejewski-Szmek
c94f4b8b53 systemd-python: fix nesting of #ifs and #pragmas 2012-11-13 02:23:02 +01:00
Zbigniew Jędrzejewski-Szmek
6b6ed3e3eb shared/socket-util: kill gcc warning about uninitialized variable
The warning was invalid, but distracting.
2012-11-13 02:23:02 +01:00
Kay Sievers
bf9d233f78 udev: properly handle symlink removal by 'change' event
If a 'change' event is supposed to remove created symlinks, we create
a new device structure from the sysfs device and fill it with the list
of links, to compute the delta of the old and new list of links to apply.
If the device is already 'remove'd by the kernel though, udev fails to
create the device structure, so the links are not removed properly.

> From: Neil Brown <nfbrown@suse.com>
> Date: Thu, 8 Nov 2012 10:39:06 +0100
> Subject: [PATCH] If a 'change' event does not get handled by udev until
> after the device has subsequently disappeared, udev mis-handles
> it. This can happen with 'md' devices which emit a change
> event and then a remove event when they are stopped. It is
> normally only noticed if udev is very busy (lots of arrays
> being stopped at once) or the machine is otherwise loaded
> and reponding slowly.
>
> There are two problems.
>
> 1/ udev_device_new_from_syspath() will refuse to create the device
>    structure if the device does not exist in /sys, and particularly if
>    the uevent file does not exist.
>    If a 'db' file does exist, that is sufficient evidence that the device
>    is genuine and should be created.  Equally if we have just received an
>    event from the kernel about the device, it must be real.
>
>    This patch just disabled the test for the 'uevent' file, it doesn't
>    try imposing any other tests - it isn't clear that they are really
>    needed.
>
> 2/ udev_event_execute_rules() calls udev_device_read_db() on a 'device'
>    structure that is largely uninitialised and in particular does not
>    have the 'subsystem' set.  udev_device_read_db() needs the subsystem
>    so it tries to read the 'subsystem' symlink out of sysfs.  If the
>    device is already deleted, this naturally fails.
>    udev_event_execute_rules() knows the subsystem (as it was in the
>    event message) so this patch simply sets the subsystem for the device
>    structure to be loaded to match the subsystem of the device structure
>    that is handling the event.
>
> With these two changes, deleted handling of change events will still
> correctly remove any symlinks that are not needed any more.

Use udev_device_new() instead of allowing udev_device_new_from_syspath()
to proceed without a sysfs device.
2012-11-13 02:14:17 +01:00
Mauro Dreissig
cf2292f5ac libudev: avoid leak during realloc failure 2012-11-13 01:59:33 +01:00
Thomas Hindoe Paaboel Andersen
33b4055123 remove duplicate semicolons 2012-11-12 22:38:44 +01:00
Thomas Hindoe Paaboel Andersen
0c77310d39 systemd-delta.xml: document default value for --diff 2012-11-12 22:38:44 +01:00
Michal Schmidt
45a5ff0de7 util: nicer tree drawings
Draw trees more similar to pstree/findmnt/lsblk/...
2012-11-12 22:27:48 +01:00