Commit graph

958 commits

Author SHA1 Message Date
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
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