Commit graph

1268 commits

Author SHA1 Message Date
Lennart Poettering 453a0c2946 bus: add support for adding memfds into message payload 2013-05-15 19:45:45 +02:00
Lennart Poettering ddeb424198 bus: add new API for kdbus memfd functionality 2013-05-10 14:37:05 +02:00
Zbigniew Jędrzejewski-Szmek a7739f8f97 build-sys: add convinience 'make python-shell'
This will launch $(PYTHON) with $LD_LIBRARY_PATH and $PYTHONPATH
as ./configure-d and DESTDIR-ed. Use as:
   make install DESTDIR=/var/tmp/inst python-shell
2013-05-09 18:13:33 -04:00
Lennart Poettering 606c24e3bd build-sys: prepare 204 2013-05-09 15:45:50 +02:00
Zbigniew Jędrzejewski-Szmek 539e0a4d58 systemd-python: add wrappers for easy functions in sd-login
sd_get_uids, sd_get_seats, sd_get_sessions, and sd_get_machine_names.
2013-05-08 21:35:03 -04:00
Zbigniew Jędrzejewski-Szmek 0b95a21bd7 build-sys: properly mkdir for GENERAL_ALIASES
Previous commit (20d408766) was broken. The problem is not connected
to DESTDIR being set or not, but to the fact that targets in
$GENERAL_ALIASES have directory components, so mkdir -p wasn't
recursing deep enough.
2013-05-07 14:41:07 -04:00
Zbigniew Jędrzejewski-Szmek 20d4087669 build-sys: properly mkdir with DESTDIR set
grawity> ln: failed to create symbolic link
‘/home/grawity/pkg/aur/systemd-git/pkg/systemd//etc/systemd/system/multi-user.target.wants/remote-fs.target’: No such file or directory
2013-05-07 14:17:18 -04:00
Lennart Poettering 2f3fcf85c5 build-sys: prepare new release 2013-05-06 23:43:59 +02:00
Zbigniew Jędrzejewski-Szmek 19adb8a320 systemd-sleep: add support for freeze and standby
A new config file /etc/systemd/sleep.conf is added.
It is parsed by systemd-sleep and logind. The strings written
to /sys/power/disk and /sys/power/state can be configured.
This allows people to use different modes of suspend on
systems with broken or special hardware.

Configuration is shared between systemd-sleep and logind
to enable logind to answer the question "can the system be
put to sleep" as correctly as possible without actually
invoking the action. If the user configured systemd-sleep
to only use 'freeze', but current kernel does not support it,
logind will properly report that the system cannot be put
to sleep.

https://bugs.freedesktop.org/show_bug.cgi?id=57793
https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=7e73c5ae6e7991a6c01f6d096ff8afaef4458c36
http://lists.freedesktop.org/archives/systemd-devel/2013-February/009238.html

SYSTEM_CONFIG_FILE and USER_CONFIG_FILE defines were removed
since they were used in only a few places and with the
addition of /etc/systemd/sleep.conf it becomes easier to just
append the name of each file to the dir name.
2013-05-06 22:51:57 +02:00
Lennart Poettering 8337416301 quota: use QUOTACHECK path correctly as tested in configure.ac
https://bugs.freedesktop.org/show_bug.cgi?id=63555
2013-05-06 21:15:38 +02:00
Harald Hoyer 8f51399e75 kernel-install: add default install scripts
Do the depmod in the kernel-install hooks, so hooks can produce/install
kernel modules and be part of the depmod.

Also move the basic boot loader entry creation and removal to a
plugin script.

If PRETTY_NAME is not defined in /etc/os-release, fallback to
PRETTY_NAME="Linux $KERNEL_VERSION".

Add documentation for everything in the man page.
2013-05-06 16:19:02 +02:00
Zbigniew Jędrzejewski-Szmek 202288be83 build-sys: tell rsync no to tranfer times and permissions
When rsyncing to fd.o, rsync would fail on symlinks in man/.
We don't care about the times too much anyway. rsync will
set times to "now", which is fine, since modification times
don't matter much outside of each uploader's machine anyway.

The point is to complete all steps of the transfer, so Python
documentation is properly updated.
2013-05-02 23:54:00 -04:00
Zbigniew Jędrzejewski-Szmek b5fafdf63f build-sys: "link" python _reader and pam_systemd against libsd-daemon-internal
The same old story as d3b9e0ff: those two use libsystemd-shared, and
in turn, some functions in libsystemd-shared use libsystemd-daemon.
The fact that *those* functions are used neither by the python modules
in question nor pam_systemd isn't always enough. Currently, I'm seeing
linking failures with -flto. The result of adding
libsystemd-daemon-internal to the list of linked libraries should be
harmless, with no change in size or final link requirements.
2013-05-02 22:55:38 -04:00
Daniel Buch 9341a4a167 test-hashmap.c: add unit-test for hashmap 2013-05-03 00:19:51 +02:00
Lennart Poettering 05947befce units: add an easy-to-use unit template file systemd-nspawn@.service for running containers as system services 2013-04-30 08:36:02 -03:00
Harald Hoyer 83cb95b530 add bash completion for systemd-analyze 2013-04-24 16:49:33 +02: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
Lennart Poettering ef3b524687 build-sys: prepare release 202 2013-04-19 00:41:24 +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
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
Zbigniew Jędrzejewski-Szmek a1c6506214 build-sys: make sure kdbus.h is part of tarball
Also fix 'update-man-list' rule and add rules for new man pages.
2013-04-17 00:09:16 -04:00
Auke Kok c4d58b0b6d bootchart: put the bootchart into the journal.
This bit of code is mostly stolen from coredump.c. We construct
a simple journal message and append the bootchart file in the
journal automatically.

You can extract the latest bootchart from the current boot with
something like:

$ journalctl -b MESSAGE_ID=9f26aa562cf440c2b16c773d0479b518 --field=BOOTCHART

which prints it to stdout.

None of the other logic is touched. The journal entry is created
even if bootchart was run manually, which is probably wrong.
2013-04-15 16:28:41 -07:00
Lennart Poettering a56f19c4f9 kdbus: generare bloom filters properly for messages we send 2013-04-14 17:49:18 +02:00
Tom Gundersen 8c11aac1d7 tmpfiles: create static device nodes before udev is started
Since v183, the contents of /usr/lib/udev/devices is no longer copied to /dev
on boot, rather systemd-tmpfiles should be used instead. However, as
systemd-tmpfiles --create is only ran long after udevd has been started, it is
no longer possible to use udev rules to assign permissions to the static nodes.

This calls systemd-tmpfiles --create early, before udev is started, and
restricts the call to /dev, which is known to be mounted already.

In the future, this could also take over the creation of static device nodes
from systemd-udevd.
2013-04-12 02:43:01 +02:00
Lennart Poettering dd418b9a69 bus: add kdbus test case 2013-04-12 00:26:12 +02:00
Lennart Poettering 6629161f82 bus: basic implementation of kdbus client side 2013-04-11 23:10:41 +02:00
Pali Rohar 72bd03c636 keymap: Add HP EliteBook 8460p
Taken from
https://code.launchpad.net/~pali/ubuntu/raring/udev/hp-elitebook-8460p/+merge/157420

Signed-off-by: Martin Pitt <martinpitt@gnome.org>
2013-04-09 15:32:22 +02:00
Lennart Poettering d3a86981d1 build-sys: prepare 201 2013-04-08 22:24:19 +02:00
Lennart Poettering 0c20f88d55 build-sys: libsystemd-daemon.so is no longer required for pam_systemd 2013-04-05 19:27:00 +02:00
Zbigniew Jędrzejewski-Szmek ac2b34e155 build-sys: use LN_S in Makefile.am
For consistency only. We're Linux only, so it really makes no
difference.

https://bugs.freedesktop.org/show_bug.cgi?id=63036
2013-04-05 11:43:46 -04:00
Lennart Poettering cb0dac0548 time: add suppot for fractional time specifications
We can now parse "0.5s" as the same as "500ms". In fact, we can parse
"3.45years" correctly, too, and any other unit and fraction length.
2013-04-03 23:00:08 +02:00
Zbigniew Jędrzejewski-Szmek d3b9e0ff4e build-sys: "link" libsystemd-id128 against libsd-daemon-internal
georgem> libsystemd-id128.so: undefined reference to `sd_listen_fds'

In some toolchains (--as-needed not used or not working), the
toolchain doesn't drop this dependency. It is introduced because
sd-id128.so is linked against sd-shared.la, and some functions therein
use libsystemd-daemon, but libsd-id128 doesn't use any of those
functions.

This results in no change in libsystemd-id128.so when the unused
symbols are properly stripped.
2013-04-03 16:14:29 -04:00
Lennart Poettering f73141d765 shared: rework env file reader
Implement this with a proper state machine, so that newlines and
escaped chars can appear in string assignments. This should bring the
parser much closer to shell.
2013-04-03 20:12:57 +02:00
Lennart Poettering d51539b182 stdio-bridge: rework stdio bridge to use libsystemd-bus 2013-04-01 03:29:30 +02:00
Lennart Poettering 9ab32f9daa bus: reuse sd_is_socket() call 2013-04-01 03:29:29 +02:00
Lennart Poettering a7edaadd78 journal-gatewayd: query PID 1 for virtalization
Since journal-gatewayd is now running unprivileged, and detecting
virtalization requires privileges, query PID1 via D-Bus for the used
virtualization.

This is also the first time we use libsystemd-bus for more than just
testing.

https://bugs.freedesktop.org/show_bug.cgi?id=62173
2013-03-31 18:16:02 +02:00
Lennart Poettering 392d5b378c bus: parse matches locally and allow registration of callbacks for them
This includes code to parse and split up match strings which will also
be useful to calculate bloom filter masks when the time comes.
2013-03-31 16:16:37 +02:00
Lennart Poettering 2181a7f558 bus: implement server mode, and anonymous authentication 2013-03-30 15:21:55 +01:00
Zbigniew Jędrzejewski-Szmek 1a13e31d27 build-sys,man: use XML entities to substite strings
This makes it easier to add substitutions to man pages,
avoiding the separate transformation step.

mkdir -p's are removed from the rule, because xsltproc will
will create directories on it's own.

All in all, two or three forks per man page are avoided,
which should make things marginally faster.

Unfortunately python parsers must too be tweaked to handle
entities. This isn't particularly easy: with lxml a custom
Resolver can be used, but the stdlib etree doesn't support
external entities *at all*. So when running without lxml,
the entities are just removed. Right now it doesn't matter,
since the entities are not indexed anyway. But I intend to
add indexing of filenames in the near future, and then the
index generated without lxml might be missing a few lines.
Oh well.
2013-03-29 20:30:21 -04:00
Zbigniew Jędrzejewski-Szmek 4e7b3c20e0 build-sys: generate sed substitution from a list
I want to use the substitutions in different form for
xml entities.
2013-03-29 20:30:21 -04:00
Zbigniew Jędrzejewski-Szmek aa0bb9c2c4 Revert "build-sys: substitute strings in systemd.unit(5)"
This reverts commits c78ab91132
and 185c3be03c.

It is simpler to just use includes...
2013-03-29 20:30:21 -04:00
Zbigniew Jędrzejewski-Szmek 76877b46b6 tests: add some silly tests for path-util.c 2013-03-28 23:45:59 -04:00
Zbigniew Jędrzejewski-Szmek 844ec79b3c catalog: open up catalog internals
In order to write tests for the catalog functions, they
are made non-static and start taking a 'database' parameter,
which is the name of a file with the preprocessed catalog
entries.

This makes it possible to make test-catalog part of the
normal test suite, since it now only operates on files
in /tmp.

Some more tests are added.
2013-03-28 23:45:59 -04:00
Zbigniew Jędrzejewski-Szmek c8c9c69f39 build-sys: remove papersize option from sphinx
We don't use it currently for anything (no latex output),
but it was messing up stuff if /etc/papersize had comments.
2013-03-28 22:55:52 -04:00
Lennart Poettering 9ca3c17f20 build-sys: prepare release 200 2013-03-29 03:07:17 +01:00
Lennart Poettering 0c17fbce55 unit: replace remote-fs-setup.target by network-online.target
https://bugzilla.redhat.com/show_bug.cgi?id=787314
2013-03-29 03:07:17 +01:00
Auke Kok b0640287f7 readahead: cleanups
- check for OOM
- no need to use floats and round()
2013-03-26 11:35:27 -07:00
Auke Kok 94243ef299 readahead: chunk on spinning media
Readahead has all sorts of bad side effects depending on your
storage media. On rotating disks, it may be degrading startup
performance if enough requests are queued spanning linearly
over all blocks early at boot, and mount, blkid and friends
want to insert reads to the start of these block devices after.

The end result is that on spinning disks with ext3/4 that udev
and mounts take a very long time, and nothing really happens until
readahead is completely finished.

This has the net effect that the CPU is almost entirely idle
for the entire period that readahead is working. We could have
finished starting up quite a lot of services in this time if
we were smarter at how we do readahead.

This patch sorts all requests into 2 second "chunks" and sub-sorts
each chunk by block. This adds a single cross-drive seek per "chunk"
but has the benefit that we will have a lot of the blocks we need
early on in the boot sequence loaded into memory faster.

For a comparison of how before/after bootcharts look (ext4 on a
mobile 5400rpm 250GB drive) please look at:

    http://foo-projects.org/~sofar/blocked-tests/

There are bootcharts in the "before" and "after" folders where you
should be able to see that many low-level services finish 5-7
seconds earlier with the patch applied (after).
2013-03-26 10:32:32 -07:00
Lennart Poettering 03e1151676 build-sys: bump version and .so revisions 2013-03-26 15:43:43 +01:00
Lennart Poettering 810bc2e3d5 build-sys: ship missing unit file 2013-03-26 02:49:11 +01:00
Kay Sievers 06f4289808 build-sys: create kernel/install.d directories 2013-03-26 01:00:14 +01:00
Lennart Poettering e06e62f4a1 man: properly document the system targets that are also available for the user instance 2013-03-25 22:33:08 +01:00
Lennart Poettering e3d84721dc units: introduce new timers.target and paths.target to hook timer/path units into for boot 2013-03-25 21:28:30 +01:00
Kay Sievers 5ec6b15b65 build-sys: add missing sed substitution for DEBUGTTY 2013-03-25 19:28:00 +01:00
Lennart Poettering a7e3212d89 bus: split socket related code into bus-socket.[ch], to prepare for kdbus backend 2013-03-25 03:43:19 +01:00
Kay Sievers 1d09582ab9 hwdb: ID_PRODUCT_FROM_DATABASE --> ID_MODEL_FROM_DATABASE
With the conversion from pci-db + usb-db to hwdb, the property
got accitentially renamed.

Move the name back to the long established identifier *MODEL*
instead of *PRODUCT*.

  $ git grep -l ID_MODEL_FROM_DATABASE
  hwdb/20-pci-vendor-model.hwdb
  hwdb/20-usb-vendor-model.hwdb
  hwdb/ids-update.pl
  man/systemd.device.xml
  rules/78-sound-card.rules
  src/core/device.c
  src/cryptsetup/cryptsetup.c
2013-03-23 16:38:21 +01:00
Zbigniew Jędrzejewski-Szmek 478c82693c build-sys: move acl searching code into libsystemd-acl
This loop over acls is a bit too much to keep inside
of another loop.
2013-03-22 15:31:45 -04:00
Lennart Poettering e3017af973 bus: implement full method call timeout logic 2013-03-21 22:53:29 +01:00
Kay Sievers f5944e0fd6 MAkefile.am: whitespace cleanup 2013-03-21 22:16:55 +01:00
Michael Biebl b588b3c456 build-sys: include missing header in dist tarball 2013-03-21 11:05:43 +01:00
Lennart Poettering 30bdd69525 shared: add simple priority queue implementation 2013-03-21 02:54:47 +01:00
Lennart Poettering 89ffcd2ad5 bus: hook up client with socket communication 2013-03-20 23:00:10 +01:00
Lennart Poettering de1c301ed1 bus: add basic implementation of a native bus client library 2013-03-20 23:00:09 +01:00
Tom Gundersen a3bd8447be udev: make firmware loading optional and disable by default
Distros that whish to support old kernels should set
  --with-firmware-dirs="/usr/lib/firmware/updates:/usr/lib/firmware"
to retain the old behaviour.
2013-03-18 15:19:51 +01:00
Zbigniew Jędrzejewski-Szmek b04c8c83e8 systemd-python: add systemd.daemon wrapping sd-daemon
Please see the documentation (e.g. pydoc3 systemd.daemon) for full
description. As usual, systemd._daemon wraps the raw interface, while
systemd.daemon provides the more pythonic API. sd_listen_fds,
sd_booted, sd_is_fifo, sd_is_socket, sd_is_socket_unix,
sd_is_socket_inet, sd_is_mq, and SD_LISTEN_FDS_START are currently
wrapped.
2013-03-15 22:55:24 -04:00
Kay Sievers 8f27a2212e sysctl: add 50-default.conf 2013-03-15 16:37:58 +01:00
Kay Sievers 94c525f076 sysctl: coredump.conf -> 50-coredump.conf 2013-03-15 15:59:21 +01:00
Harald Hoyer 9e5f0f9291 Make initrd.target the default target in the initrd
First, rename root-fs.target to initrd-root-fs.target to clarify its usage.

Mount units with "x-initrd-rootfs.mount" are now ordered before
initrd-root-fs.target. As we sometimes construct /sysroot mounts in
/etc/fstab in the initrd, we want these to be mounted before the
initrd-root-fs.target is active.

initrd.target can be the default target in the initrd.

                             (normal startup)
                                    :
                                    :
                                    v
                              basic.target
                                    |
             ______________________/|
            /                       |
            |                  sysroot.mount
            |                       |
            |                       v
            |             initrd-root-fs.target
            |                       |
            |                       v
            |            initrd-parse-etc.service
(custom initrd services)            |
            |                       v
            |            (sysroot-usr.mount and
            |             various mounts marked
            |               with fstab option
            |                x-initrd.mount)
            |                       |
            |                       v
            |                initrd-fs.target
            |                       |
            \______________________ |
                                   \|
                                    v
                               initrd.target
                                    |
                                    v
                          initrd-cleanup.service
                               isolates to
                         initrd-switch-root.target
                                    |
                                    v
             ______________________/|
            /                       |
            |        initrd-udevadm-cleanup-db.service
            |                       |
(custom initrd services)            |
            |                       |
            \______________________ |
                                   \|
                                    v
                        initrd-switch-root.target
                                    |
                                    v
                        initrd-switch-root.service
                                    |
                                    v
                               switch-root
2013-03-15 00:49:37 +01:00
Zbigniew Jędrzejewski-Szmek d29dd03302 build-sys: link libsystemd-login also against libsystemd-daemon-internal
https://bugs.freedesktop.org/show_bug.cgi?id=62085

/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libsystemd-login.so:
undefined reference to `sd_listen_fds'

In ee465038ce 'build-sys: break dependency loop between
libsystemd-id128.la and -shared.la', a partial fix was applied, and
the use of functions from libsystemd-id128 was removed from
libsystemd-shared. Nevertheless, fdset.c was still using sd_listen_fds,
so libsystemd-login should be linked against libysystemd-daemon
or libsystemd-daemon-internal.

Tested-by: Elias Probst <mail@eliasprobst.eu>
2013-03-13 22:20:51 -04:00
Zbigniew Jędrzejewski-Szmek 4afb5c73a2 build-sys: add two new files to EXTRA_DIST
Also move custom-*.xsl EXTRA_DIST additions closer to where
they are used.
2013-03-13 13:24:14 -04:00
Hannes Reinecke 946f182575 libudev: implement udev_device_set_attribute_value() 2013-03-13 17:44:45 +01:00
Harald Hoyer 700e07ffd5 add initrd-fs.target and root-fs.target
Instead of using local-fs*.target in the initrd, use root-fs.target for
sysroot.mount and initrd-fs.target for /sysroot/usr and friends.

Using local-fs.target would mean to carry over the activated
local-fs.target to the isolated initrd-switch-root.target and thus in
the real root. Having local-fs.target already active after
deserialization causes ordering problems with the real root services and
targets.

We better isolate to targets for initrd-switch-root.target, which are
only available in the initrd.
2013-03-13 08:11:17 +01:00
Zbigniew Jędrzejewski-Szmek 783162123d build-sys: use -f with ln -s
Parallel builds would sometimes try to recreate the link,
and fail since 'ln -s' would refuse to overwrite.
2013-03-13 00:55:45 -04:00
Zbigniew Jędrzejewski-Szmek 702f64b93c man,html: say 'systemd 198' in the header
This should help readers of the man or HTML pages know if the documentation
is out of date. An alternative to use a date generated from 'git log' was
considered, but since we try to keep user visible documentation up to date,
showing the project version should be enough.
2013-03-12 23:57:46 -04:00
Zbigniew Jędrzejewski-Szmek a0b8045be2 man: strip the comments in man page headers
They contained the date, which creates a problem with multiarch
packages, since the generated file would be different each time.
2013-03-12 23:57:46 -04:00
Zbigniew Jędrzejewski-Szmek ee465038ce build-sys: break dependency loop between libsystemd-id128.la and -shared.la
The loop was added in d848b9cbfa 'Move generic specifier functions to shared'.
2013-03-12 23:05:53 -04:00
Lennart Poettering 6d031c0b60 bootchart: various superficial cleanups
Let's update bootchar to share the coding style a bit more with the rest
of the package.

- Some tabs/spaces fixes

- add #pragma to header

- split up header so that we have a 1:1 relation between .c and .h files
  like everywhere else

- Prefix user command line arguments/configuration settings with "arg_".

- other coding style fixes
2013-03-11 22:47:58 +01:00
Lennart Poettering e75dcf5737 bootchart: rename log.c to store.c to aovid confusion with src/shared/log.c 2013-03-11 19:18:53 +01:00
Michael Biebl f432bb9144 Move udevadm to rootbindir
The udevadm utility is needed during early boot, so move it to
rootbindir to support split-/usr configurations.
2013-03-11 07:18:33 +01:00
Zbigniew Jędrzejewski-Szmek 082cca735b python/docs: use the same links on top as in man pages
I forgot to commit the layout file, because it was gitignored.
Fixed now.
2013-03-09 09:56:19 -05:00
Zbigniew Jędrzejewski-Szmek 9f06e912f6 systemd-python: provide version info to sphinx 2013-03-09 08:47:50 -05:00
Zbigniew Jędrzejewski-Szmek 87cfe600c7 build-sys: generate links for html alias pages 2013-03-09 08:47:50 -05:00
Zbigniew Jędrzejewski-Szmek 9b2810721d build-sys: assemble HTML in docs/html
The goal is to be able to preview how the documenation
will look when uploaded. Just point your browser at
   docs/html/man/index.html.
2013-03-09 08:47:50 -05:00
Zbigniew Jędrzejewski-Szmek 86b4547712 build-sys: clean up make clean 2013-03-09 08:47:50 -05:00
Zbigniew Jędrzejewski-Szmek f6354e8c11 build-sys: fix distcheck 2013-03-09 08:47:50 -05:00
Michael Biebl 7b40ce553f build-sys: don't hard-code binary paths in initrd-*.service
Instead use @bindir@ for udevadm and @rootbindir@ for systemctl.
2013-03-09 10:05:01 +01:00
Lennart Poettering 01ec23582d build-sys: bump release and sonames 2013-03-07 21:53:53 +01:00
Zbigniew Jędrzejewski-Szmek e91fb201c7 build-sys: move sphinx output to docs/python-systemd
And on fd.o it goes into a dir parallel to man/.
2013-03-07 15:35:49 -05:00
Nathaniel Chen ffbd2c4d45 core: mount and initialize Smack
SMACK is the Simple Mandatory Access Control Kernel, a minimal
approach to Access Control implemented as a kernel LSM.

The kernel exposes the smackfs filesystem API through which access
rules can be loaded. At boot time, we want to load the access rules
as early as possible to ensure all early boot steps are checked by Smack.

This patch mounts smackfs at the new location at /sys/fs/smackfs for
kernels 3.8 and above. The /smack mountpoint is not supported.
After mounting smackfs, rules are loaded from the usual location.

For more information about Smack see:
  http://www.kernel.org/doc/Documentation/security/Smack.txt
2013-03-07 20:53:14 +01:00
Zbigniew Jędrzejewski-Szmek 17edd81a9d build-sys: force creation of symlink
For some reason make sometimes wants to rerun this, and
ln would refuse to recreate the link.
2013-03-07 11:29:08 -05:00
Zbigniew Jędrzejewski-Szmek 9304ef91c5 libsystemd-journal: export new function, increase library version
Since sd_journal_reliable_fd wasn't exported before, it is as if
it was added now. Library "current" number must be bumped.

michich> Someone links with the fixed version and produces a RPM with
         his program. The RPM will happily install on a system with an
         old systemd version (the deps will appear fine), but the
         program will fail to run.
2013-03-06 14:15:09 -05:00
Zbigniew Jędrzejewski-Szmek e76d2e20a5 build-sys: add missing $
Fixup for 25ee45f99.
2013-03-06 12:02:50 -05:00
Harald Hoyer 7fdf51751c Revert "add initrd-fs.target and initrd-fs-pre.target"
This reverts commit 39b83cdab3.
2013-03-06 11:03:39 +01:00
Lennart Poettering a24c64f03f journald: introduce new "systemd-journal" group and make it own the journal files
Previously all journal files were owned by "adm". In order to allow
specific users to read the journal files without granting it access to
the full "adm" powers, introduce a new specific group for this.

"systemd-journal" has to be created by the packaging scripts manually at
installation time. It's a good idea to assign a static UID/GID to this
group, since /var/log/journal might be shared across machines via NFS.

This commit also grants read access to the journal files by default to
members of the "wheel" and "adm" groups via file system ACLs, since
these "almost-root" groups should be able to see what's going on on the
system. These ACLs are created by "make install". Packagers probably
need to duplicate this logic in their postinst scripts.

This also adds documentation how to grant access to the journal to
additional users or groups via fs ACLs.
2013-03-05 18:59:03 +01:00
Michael Biebl d51167c626 build-sys: build and install systemd-coredumpctl conditionally
If coredump support is disabled via --disable-coredump, do not build and
install the systemd-coredumpctl binary and man page.
2013-03-04 23:23:06 +01:00
Harald Hoyer 39b83cdab3 add initrd-fs.target and initrd-fs-pre.target 2013-03-04 19:33:50 +01:00
Michael Biebl 25ee45f995 build-sys: replace backticks `` with $()
for consistencies sake use $() everywhere
2013-03-04 01:46:03 +01:00
Michael Biebl db059f1b03 build-sys: don't hard code bash-completion directory 2013-03-04 00:10:38 +01:00
Michael Biebl d611dadcc7 bash-completion: split completions and move to new location
Split the large bash completion script into separate, smaller files each
named after the binary it is used for and move the files to
/usr/share/bash-completion/completions. This way the completions can be
loaded on demand and we only install the completions for the tools we
actually build. The old path /etc/bash_completion.d/ is deprecated and
will disappear in the future.
2013-03-03 14:39:51 +01:00
Tom Gundersen cf84347794 initrd: add unit files needed for basic systemd-in-initrd support
This will:
 * mount all configured filesystems (typically the rootfs on /sysroot)
 * reload the configuration to pick up anything from the mounted fs (typically
   /sysroot/etc/fstab)
 * mount any newly configured filesystems (typically /usr on /sysroot/usr, if
   applicable)
 * shut-down and clean-up any daemons running in the initramfs (typically udevd)
 * switch-root to /sysroot and start the real init

For an example of what files should be included in an initramfs based on this
see
<https://mailman.archlinux.org/pipermail/arch-projects/2013-February/003628.html>.

Cc: Harald Hoyer <harald.hoyer@gmail.com>
Cc: Dave Reisner <d@falconindy.com>
2013-03-01 22:52:36 +01:00
Zbigniew Jędrzejewski-Szmek 37d3ab1b7e Merge branch 'python-systemd-reader'
* python-systemd-reader:
  python-systemd: rename Journal to Reader
  build-sys: upload python documentation to freedesktop.org
  systemd-python: add Journal class for reading journal
  python: build html docs using sphinx
  journalct: also print Python code in --new-id
  python: utilize uuid.UUID in logging
  python: add systemd.id128 module
  ... and 34 other commits

In short: python module systemd.id128 is added, and existing
systemd.journal gains a new class systemd.journal.Reader, which can be
used to iterate over journal entries. Documentation is provided, and
accessible under e.g.
    pydoc3 systemd.journal.Reader
or
    firefox http://www.freedesktop.org/software/systemd/man/python-systemd/
2013-02-28 20:05:12 -05:00
Zbigniew Jędrzejewski-Szmek 6a6633a16a python-systemd: check all errors and use automatic cleanup
__REALTIME_TIMESTAMP and __MONOTONIC_TIMESTAMP return ints.
It doesn't make sense to convert to string, just to convert
back to a number later on.

Also try to follow systemd rules for indentation.
2013-02-28 20:04:17 -05:00
Zbigniew Jędrzejewski-Szmek d426d8c863 build-sys: upload python documentation to freedesktop.org 2013-02-28 20:04:17 -05:00
Zbigniew Jędrzejewski-Szmek 603c0b7b14 build-sys: make sphinx support uncoditional
It needs to be invoked explicitly, so there's no need to check
explicitly.
2013-02-28 20:04:17 -05:00
Zbigniew Jędrzejewski-Szmek 2ca0435be9 systemd-activate: add a socket-activation test tool 2013-02-27 22:10:14 -05:00
Zbigniew Jędrzejewski-Szmek 185c3be03c build-sys: fix update-man-rules for vpath builds 2013-02-27 21:55:00 -05:00
Zbigniew Jędrzejewski-Szmek fcc43d0158 build-sys: tell Makefile.am to distribute kernel-install 2013-02-27 21:54:59 -05:00
Lennart Poettering 26d04f86a3 unit: rework resource management API
This introduces a new static list of known attributes and their special
semantics. This means that cgroup attribute values can now be
automatically translated from user to kernel notation for command line
set settings, too.

This also adds proper support for multi-line attributes.
2013-02-27 18:50:41 +01:00
Harald Hoyer 81516adcb7 kernel-install: add kernel-install tool 2013-02-25 18:58:06 +01:00
Dave Reisner 855f6f07fe build: remove explicit -shared in LDFLAGS
This doesn't need to be passed, as it's handled by libtool. Since the
default for autoconf is --disable-static, this change is effectively a
noop. It only matters if you pass --enable-static, in which case the
static libs for systemd libraries will actually be built.

Nitpicky, but this only affects systemd libs. The override for the
other libs remains since these libs are always loaded dynamically and
never compiled staticly.
2013-02-24 16:46:02 -05:00
Kay Sievers f948423bb5 build-sys: move systemd-analyze to /usr/bin 2013-02-22 17:02:41 +01:00
Steven Hiscocks c4e9b5b557 systemd-python: add Journal class for reading journal 2013-02-22 16:57:43 +01:00
Zbigniew Jędrzejewski-Szmek 9015fa646e python: build html docs using sphinx
Build instructions:
   make
   make DESTIDIR=/tmp/... install
   make DESTIDIR=/tmp/... sphinx-html sphinx-man sphinx-epub ...
2013-02-22 16:57:43 +01:00
Zbigniew Jędrzejewski-Szmek 927e96326c python: add systemd.id128 module
uuid.UUIDs are utilized to hold UUID values.
2013-02-22 16:57:43 +01:00
Harald Hoyer a5c32cff1f honor SELinux labels, when creating and writing config files
Also split out some fileio functions to fileio.c and provide a SELinux
aware pendant in fileio-label.c

see https://bugzilla.redhat.com/show_bug.cgi?id=881577
2013-02-14 16:19:38 +01:00
Simon Peeters 2265fbf7e5 systemd-analyze: rewrite in C.
Written by Peeters Simon <peeters.simon@gmail.com>.
Makefile stuff and cleaned up a bit by Auke Kok <auke-jan.h.kok@intel.com>.
Some code inspired by Marc-Antoine Perennou <Marc-Antoine@Perennou.com>.
2013-02-13 14:46:50 -08:00
Lennart Poettering b872e9a059 build-sys: make EFI support build-time optional 2013-02-13 23:08:25 +01:00
Lennart Poettering 46ba8aae2b build-sys: make PolicyKit support compile-time optional (was runtime-optional already) 2013-02-13 23:08:25 +01:00
Zbigniew Jędrzejewski-Szmek 5322bdd4cc build-sys: fix build without -Wl,--gc-sections
bootctl needs libsystemd-daemon.la too.
2013-02-13 16:15:20 -05:00
Kay Sievers 7b4d7cc082 bootctl: add boot loader and firmware interface tool 2013-02-11 19:35:52 +01:00
Lennart Poettering 4d1a690438 env: considerably beef up environment cleaning logic
Now, actually check if the environment variable names and values used
are valid, before accepting them. With this in place are at some places
more rigid than POSIX, and less rigid at others. For example, this code
allows lower-case environment variables (which POSIX suggests not to
use), but it will not allow non-UTF8 variable values.

All in all this should be a good middle ground of what to allow and what
not to allow as environment variables.

(This also splits out all environment related calls into env-util.[ch])
2013-02-11 03:54:50 +01:00
Thomas Hindoe Paaboel Andersen c62c294fd5 tests: add tests of strxcpyx
also fix a bad indentation in test-strbug.c
2013-02-10 23:06:16 +01:00
Lennart Poettering c65eb83653 shutdown: issue a sync() as soon as shutdown.target is queued 2013-02-09 02:20:42 +01:00
Thomas Hindoe Paaboel Andersen 97b5f60818 tests: add test of strbuf 2013-02-09 01:40:52 +01:00
Kay Sievers 3d85f7e02a build-sys: link libudev against the internal sd-daemon lib, not the source file 2013-02-08 13:25:26 +01:00
Zbigniew Jędrzejewski-Szmek 9d6cbf7871 build-sys: fix build without -Wl,--gc-sections
In 8d81eb8e the new library was added for libudev, use it for
libsystemd-journal too.
2013-02-07 16:26:09 -05:00
Kay Sievers beb23689e3 udev: remove HWDB_BIN 2013-02-07 21:54:49 +01:00
Kay Sievers 8d81eb8e24 build-sys: at least for now, never link libudev against systemd's shared libraries 2013-02-07 14:35:20 +01:00
David Strauss 78c55e2155 build-sys: add libsystemd-id128 as libudev dependency
After d848b9cbfa 'Move generic specifier functions to shared' libudev
depends (through) libsystemd-shared.la on libsystemd-id128.so.  The
problem only appears when the linker does not support --gc-sections
and manifests itself as the inability to resolve sd_id128_get_machine
and other libsystemd-id128 functions, which aren't really used.
2013-02-07 01:28:16 -05:00
Zbigniew Jędrzejewski-Szmek 42007a09f3 build-sys: restore man/index.html as link to systemd.index.html
It got lost in the transformation to XML generation.
2013-02-07 01:16:30 -05:00
Zbigniew Jędrzejewski-Szmek 13219b7f74 man: describe unit load path in systemd.unit(5)
In other cases where multiple directories are searched for unit files,
the list of directories is described in the man page describing the
format. I think this makes sense too in case of systemd directories,
since the systemd(1) manpage already has an overview of many different
topics.
2013-02-07 01:00:10 -05:00
Zbigniew Jędrzejewski-Szmek c78ab91132 build-sys: substitute strings in systemd.unit(5)
Makefile.am is updated to deal with .xml.in sources.  Nothing in the
output is really changed yet, this is just preparation.
2013-02-06 23:16:17 -05:00
Zbigniew Jędrzejewski-Szmek 56ba3c78ae build-sys: create Makefile-man.am automatically
man rules were repeating the same information in too many places,
which was error prone. Those rules can be easily generated from .xml
files. For efficiency and because python is not a required dependency,
Makefile-man.am is only regenerated when requested with

  make update-man-list

If no metadata in man/*.xml changed, this file should not change. So
only when a new man page or a new alias is added, this file should
show up in 'git diff'. The change should then be committed.

If the support for building from git without python was dropped, we
could drop Makefile-man.am from version control. This would also
increase the partial build time (since more stuff would be rebuild
whenever sources in man/*.xml would be modified), so it would probably
wouldn't be worth it.
2013-02-06 23:16:16 -05:00
Zbigniew Jędrzejewski-Szmek 823eb4e64e build-sys: split man alias rules into separate file
There shouldn't be any functional change. This is an 'automake include',
so the generated Makefile is the same (apart from ordering).
2013-02-06 23:16:16 -05:00
Zbigniew Jędrzejewski-Szmek 63ed840e59 build-sys: replace one last mkdir hook with list item
Previously, errors would be ignored. Now they are not. But I don't see
how we could fail to create the directory, so I don't think that it
matters.
2013-02-06 23:16:03 -05:00
Thomas Hindoe Paaboel Andersen 539ad707db test: add a few tests and tidy up
adds test of:
strv_find
strv_find_prefix
strv_overlap
strv_sort
streq_ptr
first_word

Splits tests of util.c into own file to avoid clutter as we add more.

Removed a few prints and uses _cleanup_free_ to make the tests more focused.
2013-02-06 21:15:23 +01:00
Kay Sievers 2a4b7e7bf2 build-sys: fix empty lines 2013-01-30 18:14:44 +01:00
Kay Sievers 4caf4ac142 build-sys: move HAVE_MICROHTTPD HAVE_MYHOSTNAME to their own sections 2013-01-30 18:01:23 +01:00
Kay Sievers aa59024107 build-sys: move most of HAVE_KMOD into one section 2013-01-30 17:50:55 +01:00
Kay Sievers 4584651afd build-sys: add intermediate files to CLEANFILES to fix distcheck 2013-01-30 17:32:02 +01:00
Zbigniew Jędrzejewski-Szmek 06637f8bd1 build-sys: add rules for sd_journal_{get,set}_data_threshold(3)
Fixup for 350b6a65.
2013-01-29 23:01:01 -05:00
Zbigniew Jędrzejewski-Szmek 38936e3cfa build-sys: inline two definitions which were only used in one place 2013-01-29 21:18:19 -05:00
Zbigniew Jędrzejewski-Szmek 652e737517 build-sys: keep intermediate files
Sometimes it is useful to look at them, and they don't take
up any significant amount of space. Keeping them also avoids
the message about files being removed at the end of make
run.
2013-01-29 21:17:40 -05:00
Zbigniew Jędrzejewski-Szmek 1682ff6011 tests: add test for unit name printing 2013-01-29 19:01:41 -05:00
Zbigniew Jędrzejewski-Szmek 7584d236ea install: allow specifiers in WantedBy/RequiredBy/Alias
This allows one templated unit to refer to another templated unit
at installation time.

Examples:

> grep WantedBy ~/.config/systemd/user/mpop@.timer
WantedBy=services@%i.target

> srv disable mpop@iit.timer
rm '/home/alxchk/.config/systemd/user/services@iit.target.wants/mpop@iit.timer'
> srv enable mpop@iit.timer
ln -s '/home/alxchk/.config/systemd/user/mpop@.timer' '/home/alxchk/.config/systemd/user/services@iit.target.wants/mpop@iit.timer'

Based-on-patch-by: Oleksii Shevchuk <alxchk@gmail.com>
2013-01-29 19:01:41 -05:00
Martin Pitt 4dbcb1b3ba keymap: Add HP HDX 9494NR
Add touchpad and www keys.

https://bugzilla.redhat.com/show_bug.cgi?id=757928
2013-01-28 07:41:36 +01:00
Zbigniew Jędrzejewski-Szmek 350b6a6560 build-sys: install two more man aliases 2013-01-27 23:47:18 -05:00
Zbigniew Jędrzejewski-Szmek ccc9a4f9ff man: extend systemd.directives(7) to all manual pages
New sections are added: PAM options, crypttab options, commandline
options, miscellaneous. The last category will be used for all
untagged <varname> elements.

Commandline options sections is meant to be a developer tool: when
adding an option it is sometimes useful to be able to check if
similarly named options exist elsewhere.
2013-01-26 11:36:53 -05:00
Zbigniew Jędrzejewski-Szmek e985665d2d Add _cleanup_pclose_ and fix mismatching pipe close opened by popen()
Based-on-patch-by: Thomas Jarosch <thomas.jarosch@intra2net.com>

cppcheck reported:
[src/bootchart/svg.c:791]: (error) Mismatching allocation and deallocation: f
2013-01-25 10:38:42 -05:00
Zbigniew Jędrzejewski-Szmek c8503a3e16 build-sys: add silent rules for gperf generation 2013-01-24 16:25:36 -05:00
Zbigniew Jędrzejewski-Szmek 5b40782c8d build-sys: add silent rules for xslt processing 2013-01-24 16:25:36 -05:00
Zbigniew Jędrzejewski-Szmek ebea41b8d2 build-sys: add silent rule for m4 processing
Using custom prefixes makes the whole build process a bit more
readable.
2013-01-24 16:25:36 -05:00
Zbigniew Jędrzejewski-Szmek 245d345f75 build-sys: link runlevel targets on install only if sysv compat is enabled 2013-01-24 16:25:36 -05:00
Zbigniew Jędrzejewski-Szmek 91e8651b6e build-sys: add variables to collect unit aliases 2013-01-24 16:25:36 -05:00
Zbigniew Jędrzejewski-Szmek 6ff392416e build-sys: add a variable to collect .wants links
The idea is to make Makefile.am more declarative and avoid
repetitions. Redeclaring unit links as variables also makes
it easier to conditionally install only some of them.
2013-01-24 16:25:36 -05:00
Lennart Poettering f4ce2b3e5c efi: add efi boot generator that automatically mounts the ESP to /boot 2013-01-21 01:04:16 +01:00
Jonathan Callen 843fc7f7f2 execute: Fix seccomp support on x32
In the x32 ABI, syscall numbers start at 0x40000000.  Mask that bit on
x32 for lookups in the syscall_names array and syscall_filter and ensure
that syscall.h is parsed correctly.

[zj: added SYSCALL_TO_INDEX, INDEX_TO_SYSCALL macros.]
2013-01-19 12:03:06 -05:00
Lennart Poettering 2e3d069236 core: if the bootloader supports it, determine firmware and boot loader delay
This allows us to print simple performance data of all parts of the boot now:

- firmware
- boot loader
- kernel
- initrd
- userspace

This only works for bootloaders which support passing TSC data via EFI
variables. As of now that's only gummiboot.
2013-01-19 04:22:09 +01:00
Lennart Poettering 0fa57908e1 build-sys: prune the list of directories we create on install 2013-01-19 01:02:30 +01:00
Zbigniew Jędrzejewski-Szmek 96cde13ace core/cgroup-util: simplify functions and add tests 2013-01-18 11:14:00 -05:00
Zbigniew Jędrzejewski-Szmek e64690a857 journal-gatewayd: redirect microhttpd messages to journal
A prefix ("microhttpd: ") is added to the log lines to make it easy to
distinguish the source.
2013-01-18 01:15:54 -05:00
Zbigniew Jędrzejewski-Szmek a6c4586586 build-sys: keep noninstallable tests in noinst_tests
Repeating all tests in noinst_PROGRAMS and TESTS is pointless.
This way it is also clearer which noinst_PROGRAMs are not
part of the test suite.
2013-01-18 00:39:20 -05:00
Lennart Poettering 5d4caf5654 service: ignore dependencies on $syslog and $local_fs in LSB scripts
We no longer allow early-boot init scripts, however in late boot the
syslog socket and local mounts are established anyway, so let's simplify
our dep graph a bit.

If $syslog doesn't resolve to syslog.target anymore there's no reason to
keep syslog.target around anymore. Let's remove it.

Note that many 3rd party service unit files order themselves after
syslog.target. These will be dangling dependencies now, which should be
unproblematic, however.
2013-01-16 21:34:09 +01:00
Lukas Nykryn 9bdbc2e2ec systemctl,loginctl,cgls: do not ellipsize cgroup members when --full is specified
New file output.h with output flags and modes.

--full parameter also for cgls and loginctl.

Include 'all' parameter in flags (show_cgroup_by_path, show_cgroup,
show_cgroup_and_extra, show_cgroup_and_extra_by_spec).

get_process_cmdline with max_length == 0 will not ellipsize output.

Replace LINE_MAX with 0 in some calls of get_process_cmdline.

[zj: Default to --full when under pager for clgs.
     Drop '-f' since it wasn't documented and didn't actually work.
     Reindent a bit.
]
2013-01-16 12:11:47 -05:00
Kay Sievers 3f141375cb service: sysv - remove distribution specific targets
Systemd should not introduce any new facilities. Distributions which still
need to support their non-standard/legacy facilities should add them as
patches to their packaging.

The following facilities are no longer recognized:
  $x-display-manager
  $mail-transfer-agent
  $mail-transport-agent
  $mail-transfer-agent
  $smtp
  $null

This target is no longer available:
  mail-transfer-agent.target
2013-01-16 04:26:49 +01:00
Zbigniew Jędrzejewski-Szmek f6b6728d1d man: generate xml not html for index
This way we also get a man page. The output is not as polished.
I hope that it doesn't matter too much.

index.html is not generated now, the page is called
systemd.index.html. If necessary, an install hook should be added.
2013-01-15 11:30:42 -05:00
Zbigniew Jędrzejewski-Szmek 9cc2c8b763 man: add links to directive index to see-alsos
systemd.directives(5) is renamed to systemd.directives(7).
Section 7 is "Miscellaneous".
2013-01-15 11:30:42 -05:00
Zbigniew Jędrzejewski-Szmek 08177c85ef make-directive-index: link to systemd options 2013-01-15 11:30:42 -05:00
Zbigniew Jędrzejewski-Szmek 4a431c9ab1 man: add bootchart.conf to directives index 2013-01-15 11:30:41 -05:00
Lennart Poettering c84f5e4a82 login: introduce sd_session_get_tty() 2013-01-15 03:01:35 +01:00
Zbigniew Jędrzejewski-Szmek d354315ff7 build-sys: do not install to / in 'make distcheck' 2013-01-10 15:43:20 -05:00
Zbigniew Jędrzejewski-Szmek 52edb22835 build-sys: fix 'make distcheck' w/o sysvinit compat
EXTRA_DIST must unconditionally contain all source files.
2013-01-10 15:42:31 -05:00
Kay Sievers d5a89d7dc1 udev: move string copy functions to shared/ 2013-01-09 19:06:46 +01:00
Umut Tezduyar 5088d19fa5 bootchart: install missing man page and config file 2013-01-08 16:55:55 +01:00
Lennart Poettering dee4c24425 build-sys: fix spelling of sysvrcndir 2013-01-08 02:37:37 +01:00
Lennart Poettering 71c474864c build-sys: bump version and so revisions 2013-01-08 01:42:41 +01:00
Lennart Poettering 6ee667aeeb analyze: add emacs mode header 2013-01-08 01:27:18 +01:00
Kay Sievers ddcbd96ae6 Revert "build-sys: remove .la files after installation"
"make distcheck" fails with:
  ERROR: files left after uninstall:
  ./usr/lib64/security/pam_systemd.so
  ./lib/libnss_myhostname.so.2
  ./lib64/python2.7/site-packages/systemd/_journal.so

This reverts commit ca25fde748.
2013-01-07 23:48:43 +01:00
Auke Kok 83fdc450aa bootchart: merge bootchart
Bootchart is renamed to 'systemd-bootchart' and installed as
/usr/lib/systemd/systemd-bootchart. The configuration file
will reside in /etc/systemd/bootchart.conf.
2013-01-07 23:48:43 +01:00
Zbigniew Jędrzejewski-Szmek ca25fde748 build-sys: remove .la files after installation
Define KEEP_LA_FILES to keep them.

The hook is repeated because both install-exec-hook and
install-data-hook can install libraries and with parallel make
it's not possible to predict which one will run first.

http://lists.freedesktop.org/archives/systemd-devel/2013-January/008016.html
tl;dr: Libtool .la files are not very useful for linking linux
libraries.
2013-01-07 13:45:12 -05:00
Tom Gundersen 16eb4da97e nss-myhostname: integrate documentation
Converted from html to xml and changed the style to fit into the other
manpages.
2013-01-07 15:15:57 +01:00
Tom Gundersen d562955eac nss-myhostname: integrate into systemd buildsystem
Note that there are still some rome for cleanups. In particular,
the .la files are now installed, which we probably don't want; and
some of the macros in Makefile.am are likely redundan.
2013-01-07 15:15:57 +01:00
Michael Biebl d7ae18eea5 build: Drop "=" from move-to-rootlibdir define
The variable assignment operator was introduced in make 3.82 and thus
breaks "make install" with older versions of make. Since "=" is optional
in make 3.82 it is safe to drop.
2013-01-06 21:52:44 +01:00
Zbigniew Jędrzejewski-Szmek 24fdc23004 build-sys: use recipe for moving libs
Just avoids repeating the same code a few times.
The way that hooks are named is standardized.
No functional change.
2013-01-06 13:52:47 -05:00
Kay Sievers 394e2938ff udev: enable persistent network device naming 2013-01-06 16:17:33 +01:00
Zbigniew Jędrzejewski-Szmek c4eb236a2c build-sys: invoke scripts with $PYTHON during build
Python binary to be used during compilation can be set with
./configure PYTHON=...

The she-bang line is removed, since it is not used anymore.
2013-01-04 22:22:21 -05:00
Zbigniew Jędrzejewski-Szmek 2f4da3e6c2 systemd-analyze: use specified binary, add --version
Python binary used in the she-bang line in installed
scripts can be set with ./configure PYTHON_BINARY=...
Defaults to the same path as python used during compilation.

Adding --version makes systemd-analyze behave consistently with the
rest of installed programs.

The lines in ./configure output are reordered to keep all yes/no lines
separate.  I think that this makes the output clearer.
2013-01-04 22:20:35 -05:00
Zbigniew Jędrzejewski-Szmek bbed6c0d4b systemd-analyze: pipe through SED_PROCESS
To be able to add --version and change python binary.
2013-01-04 21:57:55 -05:00
Zbigniew Jędrzejewski-Szmek 7f8e692bb2 build-sys: allow update-hwdb with seperate build dir 2013-01-04 21:57:55 -05:00
Zbigniew Jędrzejewski-Szmek e241dd66f1 build-sys: drop unused $RUNTIME_DIR 2013-01-04 21:13:16 -05:00
Lennart Poettering bc2708414b build-sys: drop all distribution specfic checks
Yay, we now have a completely generic systemd. No distribution specific checks anymore!
2013-01-04 23:26:21 +01:00
Lennart Poettering a382332eed build-sys: make path of loadkeys/setfont configurable in configure 2013-01-04 23:26:21 +01:00
Lennart Poettering b1c4ca25bf build-sys: make rc-local support part of SYSV compat
This also drops automatic selection of the rc local scripts
based on the local distro. Distributions now should specify the paths
of the rc-local and halt-local scripts on the configure command line.
2013-01-04 23:26:20 +01:00
Marcel Holtmann 94f5bbc626 hwdb: Add database for Bluetooth company identifiers 2012-12-31 04:50:28 +01:00
Lennart Poettering 23406ce58a logind: add support for automatic suspend/hibernate/shutdown on idle 2012-12-24 00:29:40 +01:00
Colin Walters 81dc4bde12 build-sys: Make libsystemd-shared link to libsystemd-daemon
Commit f934051c4d broke the build
because it made libsystemd-shared call sd_listen_fds() which is
defined in libsystemd-daemon.

This is a bit of a contortion because libsystemd-shared.la is a
noinst_LTLIBRARY, but libtool should do the right thing here and emit
DT_NEEDED on libsystemd-daemon.so for things that consume
libsystemd-shared.la.
2012-12-23 16:25:24 +01:00
Lennart Poettering f934051c4d shared: move fdset.c from core/ to shared/ since it is used by more than the core now 2012-12-23 11:28:14 +01:00
Lennart Poettering e8bc0ea2b1 journalctl: strip TABs and ANSI color sequences from log messages when displaying them 2012-12-23 11:28:14 +01:00
Lennart Poettering 842f3b0fc9 nspawn: allow passing socket activation fds through nspawn 2012-12-22 22:17:58 +01:00
Tollef Fog Heen 7a14d67f76 Remove frugalware display-manager.service
Frugalware are shipping their own .service file now, so stop shipping
it here.

This effectively reverts 196e3fa74a
2012-12-14 09:17:14 +01:00
Kay Sievers f3ffced541 build-sys: add libsystemd-daemon.la to libsystemd-core.la
https://bugs.freedesktop.org/show_bug.cgi?id=57900
2012-12-05 02:08:49 +01:00
Tom Gundersen 5fe25affc0 hwdb: add IAB to the OUI database
The individual address block is a poor man's organizationally unique
identifier.

Perhaps we should change the udev key from ID_OUI_FROM_DATABASE to
something like ID_IEEE_VENDOR_FROM_DATABASE?

Suggested-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
2012-12-04 02:11:37 +01:00
Zbigniew Jędrzejewski-Szmek b5a223bfcf build-sys: use parallel tests driver
This saves test output to individual .log files.

The driver is only used in /Makefile.am, not in
/docs/*udev/Makefile.am because the latter don't seem to work with
this driver. They don't produce much output anyway.

.gitignore is alphabetized, and .log files are added to it.
Generated files from /build-aux are removed from the list.
2012-12-01 16:38:39 +01:00
Zbigniew Jędrzejewski-Szmek 47cd54a994 build-sys: color test results 2012-12-01 16:38:37 +01:00
Alessandro Crismani 68c77c2f61 keymap: Update the list of Samsung Series 9 models
Currently, keymaps are provided only for the NP90X3A laptop. Samsung
introduced updated models, codenamed 900X3B, 900X3C, 900X4B, 900X4C,
which are currently not matched by udev rules. This patch includes the
newer modules in udev rules and move the samsung-n90x3a file defining
keys to a more generic samsung-series-9 file.

The patch was tested on a 900X4C laptop, and other people reported
that the rules also work for 900X3B and 900X3C ones.
2012-11-28 21:27:03 +01:00
Zbigniew Jędrzejewski-Szmek ee7c77db55 man: add systemd-journal-gatewayd page 2012-11-25 18:04:03 +01:00
Lennart Poettering 7a529f63e6 man: document calendar timers 2012-11-24 00:24:46 +01:00
Lennart Poettering 0979f2855c build-sys: drop TARGET_UBUNTU
TARGET_UBUNTU is effectively the same as TARGET_DEBIAN. Given the Ubuntu
is unlikely to use systemd anytime soon there's no point in keeping this
separate.
2012-11-24 00:24:46 +01:00
Lennart Poettering 9a98c7a156 util: split off time related calls from util.[ch] into time-util.[ch] 2012-11-23 22:07:24 +01:00
Lennart Poettering 36697dc019 timer: implement calendar time events 2012-11-23 21:37:58 +01:00
Lennart Poettering 555d5c0cb5 build-sys: add zsh completion bits to EXTRA_DIST 2012-11-21 02:19:20 +01:00
Lennart Poettering 0428ddb729 build-sys: prepare 196 2012-11-21 01:37:11 +01:00
Lennart Poettering f2cf0403c9 journal: document new catalog APIs 2012-11-20 22:09:09 +01:00
Tom Gundersen e30431623a build-sys: make loadable module support optional
kmod is unecessary if loadable module support is disabled in the kernel,
so make the dependency optional.
2012-11-20 19:35:27 +01:00
Tom Gundersen 1d0b59f932 build-sys: fix sysvcompat handling in distcheck
Distcheck would fail due to sysvinit dir being set,
but not sysvrcnd dir:

 # ./configure --enable-gtk-doc --with-sysvrcd-path=/etc/rc.d
 # --with-sysvinit-path=/etc/rc.d
 # make distcheck
 ...
 configure: error: *** You need both --with-sysvinit-path=PATH and
--with-sysvrcd-path=PATH to enable SysV compatibility support, or both
empty to disable it.
make: *** [distcheck] Error 1

This also allows sysvcompat support to be disabled from distcheck.
2012-11-20 19:35:27 +01:00
Zbigniew Jędrzejewski-Szmek 1e1954f533 hwdb: revert hwdb.bin back to /etc/udev
> Kay:
udev is early boot without /var. /var is entirely taboo for udev.

This partially reverts commit ee623f0d0c
(moving hwdb.bin is reverted, but the uninstall hook and cosmetic
changes remain).
2012-11-17 01:55:35 +01:00
Zbigniew Jędrzejewski-Szmek ee623f0d0c hwdb: use $(localstatedir)/lib/udev/hwdb.bin for the binary database
It's not configuration, so it doesn't belong in udev.

Also, remove the catalog when uninstalling udev.
2012-11-16 23:29:56 +01:00
Zbigniew Jędrzejewski-Szmek 4ec24515da journal: use $(localstatedir)/lib/systemd/catalog for the catalog
The path doesn't change in the standard configuration.

Also, give full path to the journalctl binary in the hook,
since it might be installed outside of $PATH.

Also, add uninstall hook to remove the binary catalog.
2012-11-16 23:29:18 +01:00
Lennart Poettering 1b0fcd7411 rpm: update RPM macros to include definitions for more drop-in directories and for reloading/rebuilding configuration
More specifically this adds a number of macros that resolve to
directories for udev rules, hwdb entries, tmpfiles and sysctl.

Thsi also includes three new macros for rebuilding the hwbd/catalog
index when a package drops in new files
2012-11-16 20:07:14 +01:00
Kay Sievers c4eb3681c7 build-sys: udev - create hwdb with make install 2012-11-16 17:58:31 +01:00
Zbigniew Jędrzejewski-Szmek f975e76c0b build-sys: fix catalog-update-hook with older systemd
The hook would fail if preexisting journalctl doesn't support
--update-catalog. Also, the catalog would be updated before new
catalog files were installed. Both issues are fixed by moving to
INSTALL_DATA_HOOK instead of INSTALL_EXEC_HOOK, since the hook is now
executed after both journalctl and catalog files are installed.
2012-11-16 14:05:17 +01:00
Zbigniew Jędrzejewski-Szmek e2bb347f85 build-sys: update catalog on installation 2012-11-16 11:00:49 +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
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
Zbigniew Jędrzejewski-Szmek 2c5417ade0 tests: add tests for config_parse_exec 2012-11-15 16:00:45 +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
Lennart Poettering 6e6fb527f9 shared: add API for replacing @FOO@ style variables in strings 2012-11-14 22:21:16 +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 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 87281abdf3 hwdb: OUI - use ID_OUI_FROM_DATABASE= 2012-11-09 12:39:27 +01:00
Kay Sievers 448004c340 hwdb: add IEEE OUI data 2012-11-07 14:23:05 +01:00
Kay Sievers bd49c40537 bash-completion > shell-completion 2012-11-03 22:10:32 +01:00
Kay Sievers b7f1542c8b shared: add timer_get_dst() 2012-11-02 00:44:23 +01:00
Lennart Poettering 669b04a492 service: drop special HTTP server target, as it is a bad idea anf Fedora specific
This was premarily intended to support the LSB facility $httpd which is
only known by Fedora, and a bad idea since it lacks any real-life
usecase.

Similar, drop support for some other old Fedora-specific facilities.

Also, document the rules for introduction of new facilities, to clarify
the situation for the future.
2012-10-31 02:55:04 +01:00
Kay Sievers ff944daa01 udev: get rid of SYSCONFDIR 2012-10-28 04:04:22 +01:00
Lennart Poettering 6524990fdc logind: support for hybrid sleep (i.e. suspend+hibernate at the same time) 2012-10-28 00:50:35 +02:00
Kay Sievers 2001208c2a libudev: import hwdb and export lookup interface 2012-10-27 23:39:41 +02:00
Lennart Poettering 85210bffd8 journal: provide an API that allows client to figure out whether they need to recheck the journal manually for changes in regular intervals
Network file systems generally do not offer inotify() that would work
across the network. We hence cannot rely on inotify() exclusiely in
those case. Provide an API to determine these cases, and suggest doing
manual regular rechecks.

Note that this is not complete yet, as we need to rescan journal dirs on
network file systems explicitly to find new/removed files
2012-10-26 20:07:33 +02:00
Martin Pitt 221a6c2a26 keymap: Add HP EliteBook 8440p
Thanks to Glen Ditchfield <gjditchfield@acm.org>!

https://launchpad.net/bugs/1071579
2012-10-26 06:31:14 +02:00
Lennart Poettering a4bcff5ba3 journal: introduce entry array chain cache
When traversing entry array chains for a bisection or for retrieving an
item by index we previously always started at the beginning of the
chain. Since we tend to look at the same chains repeatedly, let's cache
where we have been the last time, and maybe we can skip ahead with this
the next time.

This turns most bisections and index lookups from O(log(n)*log(n)) into
O(log(n)). More importantly however, we seek around on disk much less,
which is good to reduce buffer cache and seek times on rotational disks.
2012-10-26 03:24:03 +02:00
Kay Sievers 0380748b55 udev: hwdb: add acpi/pnp vendor description file 2012-10-25 21:44:23 +02:00
Kay Sievers 796b06c21b udev: add hardware database support 2012-10-23 16:43:32 +02:00
Lennart Poettering 139ee8cc31 build-sys: prepare 195 2012-10-23 00:12:33 +02:00
Kay Sievers 3c62146280 shared: move sparse-endian.h from journal 2012-10-22 18:08:48 +02:00
Kay Sievers 5b4882b6aa build-sys: fix distcheck 2012-10-22 17:20:18 +02:00
Kay Sievers 955bd501c2 shared: strbuf - add string de-duplication facility 2012-10-22 16:27:00 +02:00
Lennart Poettering 7cd28a8a2f man: add man page for localectl 2012-10-21 03:35:54 +02:00