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

9623 Commits

Author SHA1 Message Date
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
Dave Reisner
a9cdc94f7f enable localization for common *ctl commands 2012-11-12 14:16:07 -05:00
Kay Sievers
1298001ec5 use the same email address everywhere 2012-11-12 19:47:43 +01:00
Kay Sievers
88a6477ef3 libudev: update copyright headers 2012-11-12 17:50:33 +01:00
Kay Sievers
35ec16ea8a TODO: update 2012-11-12 01:03:14 +01:00
Kay Sievers
40fe8b11be udev: use usec_t and now() 2012-11-12 01:03:14 +01:00
Holger Hans Peter Freyther
1707b36c6d man/sd-id128.xml: typo fix 2012-11-11 21:36:21 +01:00
Kay Sievers
2311eb2ff0 timedatectl: properly print 30 minutes DST transitions 2012-11-11 16:55:25 +01:00
Dave Reisner
ef216ca3d7 coredumpctl: add missing -F, --field option to help 2012-11-09 14:14:53 -05:00
Dave Reisner
253a87510b bash-completion: add 'gdb' verb for coredumpctl
This also fixes value completion for journal fields, as the completion
for the RHS of the '=' was missing when it was borrowed from journalctl.
2012-11-09 14:12:36 -05:00
Dave Reisner
584f587295 systemd-coredumpctl: add 'gdb' to usage output 2012-11-09 10:04:08 -05:00
Lennart Poettering
bece1f5215 dbus: when verifying PK privs, bypass PK if uid=0 of client
This reduces the number of roundtrips when the client is privileged and
makes the PK dep optional for root clients.
2012-11-09 15:55:36 +01:00
Tom Gundersen
43f9cc65c2 hwdb: change pci.ids location
According to pciutils' TODO, the sourceforge location is scheduled for
removal, use the new one instead.
2012-11-09 15:36:25 +01:00
Kay Sievers
09d8f5d757 udev: hwdb - update usb class descriptions 2012-11-09 15:23:41 +01:00
Kay Sievers
8db6dcfd3c udev: hwdb - add usb class descriptions 2012-11-09 15:02:58 +01:00
Kay Sievers
cf7ebcea78 udev: hwdb - add pci class descriptions 2012-11-09 14:29:10 +01:00
Kay Sievers
a660c63c55 udev: net_id - add builtin to retrieve data for network devices 2012-11-09 13:05:19 +01:00
Kay Sievers
59803c380d udev: hwdb - search parents for 'modalias' and data 2012-11-09 13:05:11 +01:00
Kay Sievers
c3cfed0d6c udev: update file headers 2012-11-09 12:39:27 +01:00
Kay Sievers
87281abdf3 hwdb: OUI - use ID_OUI_FROM_DATABASE= 2012-11-09 12:39:27 +01:00
Michal Schmidt
40b8acd039 fstab-generator: more specific error messages 2012-11-09 12:00:46 +01:00
Kay Sievers
448004c340 hwdb: add IEEE OUI data 2012-11-07 14:23:05 +01:00
Kay Sievers
c67fbe4c71 hwdb: update pci data 2012-11-07 14:06:29 +01:00
Kay Sievers
f6113d42d0 TODO: update 2012-11-07 14:06:29 +01:00
Thomas Hindoe Paaboel Andersen
5a5c72ca6e man: typo fixes for new files in 195 2012-11-06 20:27:38 +01:00
Dave Reisner
8db9d8c2a4 cryptsetup: fix inverted comparison in pass_volume_key 2012-11-06 10:18:10 -05:00