1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 10:25:37 +03:00
Commit Graph

1017 Commits

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