Commit Graph

1584 Commits

Author SHA1 Message Date
Kay Sievers 5870f79a0b build-sys: add "make check-broken" to find limited-toolchain link errors 2014-03-26 01:36:57 +01:00
Kay Sievers 2fa495c8a4 build-sys: fix library link order 2014-03-25 23:29:43 +01:00
Kay Sievers 307e6d8304 build-sys: split-off internal libsystemd-resolve 2014-03-25 23:29:43 +01:00
Lennart Poettering 3b5b000fbc build-sys: prepare 212 2014-03-25 20:22:41 +01:00
Susant Sahani 9a6704a81f sd-rtnl: add support for tunnel attributes
Added support for tunneling netlink attrributes (ipip, gre, sit).
These works with kernel module ipip, gre and sit . The test cases are
moved to a separate file and manual test as well because they require
respective kernel modules as well.
2014-03-25 14:44:33 +01:00
Lennart Poettering 7f8aa67131 core: remove tcpwrap support
tcpwrap is legacy code, that is barely maintained upstream. It's APIs
are awful, and the feature set it exposes (such as DNS and IDENT
access control) questionnable. We should not support this natively in
systemd.

Hence, let's remove the code. If people want to continue making use of
this, they can do so by plugging in "tcpd" for the processes they start.
With that scheme things are as well or badly supported as they were from
traditional inetd, hence no functionality is really lost.
2014-03-24 20:07:42 +01:00
Tom Gundersen c6f7c917a1 libsystemd-network: move network-utils from src/shared
This does not belong in shared as it is mostly a detail of our networking subsystem.

Moreover, now we can use libudev here, which will simplify things.
2014-03-21 21:54:37 +01:00
Daniel Mack 5892a914d1 busname: introduce Activating directive
Add a new config 'Activating' directive which denotes whether a busname
is actually registered on the bus. It defaults to 'yes'.

If set to 'no', the .busname unit only uploads policy, which will remain
active as long as the unit is running.
2014-03-19 02:25:36 +01:00
Lennart Poettering 58dfc42ecf build-sys: move sd-login src/login → src/libsystemd/sd-login
After all, it is ultimately linked to libsystems.so anyway, thus belongs
there and shares very little with the rest of logind, hence let's move
this away.
2014-03-17 18:35:48 +01:00
Zbigniew Jędrzejewski-Szmek cc64d0175a journal-remote: HTTP(s) support
The whole tool is made dependent on µhttpd availability. It should be
easy to make the µhttpd parts conditional, but since transfer over
HTTP seems to be the primary use case, currently this is not done.

Current implementation uses nested epoll loops: sd-event is used for
the external event loop, and µhttpd uses epoll in its own
loop. Unfortunately µhttpd does not expose enough information to add
the descriptors it uses to the external event loop. This means that
starvation of other events is possible, if one of the inner µhttpd
loops is constantly busy. This means that µhttpd servers should not
be mixed with other sources.

The TLS authentication parts haven't been really tested properly, and
should not be take too seriously.
2014-03-17 01:55:48 -04:00
Zbigniew Jędrzejewski-Szmek fdfccdbc98 journal-remote: tool to receive messages over the network 2014-03-17 01:55:48 -04:00
Zbigniew Jędrzejewski-Szmek cafc7f9130 journal-gatewayd: log to journal from gnutls
Prefix "gnutls: " is added. Some semi-random mapping of gnutls levels
to syslog levels is done, but since gnutls levels seem to be used
rather loosely, most end up as debug.
2014-03-17 01:55:48 -04:00
Wieland Hoffmann d895500c47 zsh completion: Install _sd_machines with _machinectl
_machinectl uses _sd_machines to provide a list of all available
machines.
2014-03-15 00:32:06 -04:00
Sebastian Thorarensen 40b71e89ba journald: add support for wall forwarding
This will let journald forward logs as messages sent to all logged in
users (like wall).

Two options are added:
 * ForwardToWall (default yes)
 * MaxLevelWall (default emerg)
'ForwardToWall' is overridable by kernel command line option
'systemd.journald.forward_to_wall'.

This is used to emulate the traditional syslogd behaviour of sending
emergency messages to all logged in users.
2014-03-14 22:05:25 +01:00
Lennart Poettering 66cdd0f2d0 logind: automatically remove SysV + POSIX IPC objects when the users owning them fully log out 2014-03-14 01:49:44 +01:00
Kay Sievers bcdbbd7ee1 timedated: add SNTP client/query hookup (unused for now) 2014-03-14 00:38:03 +01:00
Zbigniew Jędrzejewski-Szmek a878789268 build-sys: make sure we rebuild manpages when doing releases
https://bugs.freedesktop.org/show_bug.cgi?id=76056
2014-03-12 21:39:35 -04:00
Mike Gilbert 0ce91e4e3b build-sys: Fix move-to-rootlibdir
Since we now use ln -s --relative, using this sed statement is redundant
and causes broken symlinks to be installed.
2014-03-11 23:58:00 +01:00
Kay Sievers 4ef0809c22 build-sys: add libsystemd-label to network/dhcp users 2014-03-11 22:11:39 +01:00
Lennart Poettering 223763f580 build-sys: we still want to rebuild the tarball though on upload 2014-03-11 20:57:17 +01:00
Lennart Poettering 9f19a44770 build-sys: when I upload the tarball, don't run the whole distcheck thing again
I run this anyway, and given how slow it is now due to -flto, let's make
my workflow a bit faster...
2014-03-11 20:45:47 +01:00
Lennart Poettering 6bf6f402b6 build-sys: prepare release 211 2014-03-11 20:25:00 +01:00
Zbigniew Jędrzejewski-Szmek 7a249d0c1b build-sys: sign releases 2014-03-11 12:55:17 -04:00
Lennart Poettering 1b9e5b1263 nspawn: add --image= switch to boot GPT disk images that follow the Discoverable Partitions Specification 2014-03-10 20:35:52 +01:00
Armin K e2eb18d56b build-sys: Don't distribute generated udev rule
It contains hardcoded path to systemd-sysctl executable which
is /usr/lib/systemd/systemd-sysctl on latest stable release and
as such it will complain at runtime if rootprefix != prefix

[zj: readd the file to nodist_udevrules_DATA]
2014-03-07 00:17:18 -05:00
Lennart Poettering e48fdd8443 generators: rework mount generators
- Add support for finding and mounting /srv based on GPT data, similar
  to how we already handly /home.

- Share the fsck logic between GPT, EFI and fstab generators

- Make sure we never run the EFI generator inside containers

- Drop DefaultDependencies=no from EFI mount units

- Other fixes
2014-03-06 04:00:41 +01:00
Thomas Hindoe Paaboel Andersen 207017017d add bash completion for systemd-cat 2014-03-04 23:17:07 +01:00
Lennart Poettering 5e11d962c0 build-sys: work around broken ln --relative -s -f
As it appears "ln -s --relative" in conjunction with "-f" is broken,
let's work around that by explicitly remove the destination of the
symlink before we create it.

https://bugzilla.redhat.com/show_bug.cgi?id=1072103
2014-03-03 23:48:57 +01:00
Umut Tezduyar Lindskog 5c1d3fc93d sd-network: IPv4 link-local support [v2]
Implements IPv4LL with respect to RFC 3927
(http://tools.ietf.org/rfc/rfc3927.txt) and integrates it
with networkd. Majority of the IPv4LL state machine is
taken from avahi (http://avahi.org/) project's autoip.

IPv4LL can be enabled by IPv4LL=yes under [Network]
section of .network file.

IPv4LL works independent of DHCP but if DHCP lease is
aquired, then LL address will be dropped.

[tomegun: removed a trailing newline and a compiler warning]
2014-03-03 23:24:34 +01:00
Thomas Hindoe Paaboel Andersen 3bfe58cbd4 add bash completion for systemd-detect-virt 2014-03-03 22:18:37 +01:00
Lennart Poettering 4d7213b274 core: move ShowStatus type into the core
Let's make the scope of the show-status stuff a bit smaller, and make it
private to the core, rather than shared API in shared/.
2014-03-03 21:23:12 +01:00
Lennart Poettering e2438b7a32 build-sys: prefer using ln --relative -s where appropriate
By using --relative symlinks look nicer when dealing with OS image trees
that are placed in arbitrary places of the OS.
2014-03-03 17:55:32 +01:00
Mike Gilbert 8100c1a8f5 Fix systemd-stdio-bridge symlink
The symlink is created in bindir (/usr/bin), and points to a binary
which lives in rootlibexecdir (/lib/systemd or /usr/lib/systemd). A
relative symlink does not work here.
2014-03-03 06:27:10 +01:00
Lennart Poettering 8f8f05a919 bus: add sd_bus_track object for tracking peers, and port core over to it
This is primarily useful for services that need to track clients which
reference certain objects they maintain, or which explicitly want to
subscribe to certain events. Something like this is done in a large
number of services, and not trivial to do. Hence, let's unify this at
one place.

This also ports over PID 1 to use this to ensure that subscriptions to
job and manager events are correctly tracked. As a side-effect this
makes sure we properly serialize and restore the track list across
daemon reexec/reload, which didn't work correctly before.

This also simplifies how we distribute messages to broadcast to the
direct busses: we only track subscriptions for the API bus and
implicitly assume that all direct busses are subscribed. This should be
a pretty OK simplification since clients connected via direct bus
connections are shortlived anyway.
2014-03-03 02:34:13 +01:00
Thomas Hindoe Paaboel Andersen d9256bac4d add bash completion for systemd-cgtop 2014-03-02 23:07:35 +01:00
Zbigniew Jędrzejewski-Szmek 5f8fd969bd build-sys: fix location of network-util.h 2014-03-01 21:45:48 -05:00
Thomas Hindoe Paaboel Andersen e1528e085c networkd-wait-online: use automatic cleanup 2014-03-01 23:16:55 +01:00
Thomas Hindoe Paaboel Andersen abdab4f602 add bash completion for systemd-cgls 2014-03-01 23:10:38 +01:00
Zbigniew Jędrzejewski-Szmek 88ce2902ca build-sys: distribute kdbus documentation 2014-03-01 07:45:07 -05:00
Thomas Andersen 0d6883b6a8 bash: add completion for systemd-nspawn 2014-03-01 03:30:41 +01:00
Tom Gundersen 020d59000f networkd: add networkd-wait-online
This is mostly a proof of concept to try sd-network, so we don't
hook it up with a .service file quite yet. We probably want it to
be more clever about deciding when we are 'online'.

The binary  will wait for at least one network managed by networkd,
and until all networks managed by networkd are configured.
2014-02-28 01:17:38 +01:00
Tom Gundersen fe8db0c5ee sd-network: add new library
This is similar to sd-login, but exposes the state of networkd rather than logind.

Include it in libsystemd-dhcp and rename it to libsystemd-network.
2014-02-28 01:01:13 +01:00
Armin K 2141e47892 build-sys: Do not distribute generated udev service files
They are already in nodist_systemunit_DATA and if they are
shipped, they contain hardcoded paths to udevadm and
systemd-udevd which will cause them to fail to start when
rootprefix != prefix and rootlibdir != libdir.
2014-02-27 01:11:59 -05:00
Tom Gundersen 911f4d4d60 build-sys: networkd - simplify makefile fragment 2014-02-26 23:16:34 +01:00
Lennart Poettering 4298d0b512 core: add new RestrictAddressFamilies= switch
This new unit settings allows restricting which address families are
available to processes. This is an effective way to minimize the attack
surface of services, by turning off entire network stacks for them.

This is based on seccomp, and does not work on x86-32, since seccomp
cannot filter socketcall() syscalls on that platform.
2014-02-26 02:19:28 +01:00
Lennart Poettering 62ca29b81b build-sys: bump revisions and version 2014-02-24 19:25:00 +01:00
Lennart Poettering 43c71255b3 NEWS: prepare for release of 210 2014-02-24 18:34:12 +01:00
Kay Sievers f01de9656d src/shared/ cannot reference symbols from libraries
../src/shared/unit-name.c:462: error: undefined reference to 'sd_bus_label_escape'
../src/shared/unit-name.c:477: error: undefined reference to 'sd_bus_label_unescape'
collect2: error: ld returned 1 exit status
2014-02-23 01:53:40 +01:00
Kay Sievers 03e37dd767 build-sys: build compat libs from sources, avoiding the not generally available ifunc wrapping 2014-02-22 21:28:55 +01:00
Kay Sievers 41fd4c4c15 build-sys: add seccomp includes where needed 2014-02-22 18:48:01 +01:00
Tom Gundersen dd4d2c1cd1 networkd/nspawn: enable dhcp client on veth device created in guest
When starting systemd-nspawn with --network-veth, we create a veth device called
host0 in the guest. Pick up on this and start a dhcp client on it. We will also
pick up host0 netdevs created by other containers should they chose to use the
same name.
2014-02-22 18:29:43 +01:00
Kay Sievers 0031ccd306 build-sys: create /var/log/journal/ in journald section 2014-02-22 18:12:39 +01:00
Armin K df40be6a14 build-sys: Also move libsystemd-journal to rootlibdir 2014-02-22 17:12:46 +01:00
Thomas Hindoe Paaboel Andersen f0329635f8 Makefile: fix build on clang
needed after libsystemd-daemon was merged into libsystemd in
0ebee88184
2014-02-21 22:24:47 +01:00
Jason A. Donenfeld a2fef7701b install: networkd.service depend on !--disable
It doesn't make any sense to symlink this unit file into /etc when the
unit file itself isn't even installed, with --disable-networkd. This
moves the GENERAL_ALIASES logic into the right "if" block.
2014-02-21 19:24:17 +01:00
Samuli Suominen 74fae4240f build-sys: make network files respect --rootprefix
With --rootprefix= systemd-udevd gets installed to /lib/systemd, and since
the network configuration is also required during early boot, it should be
available there with it. Using --prefix= is not an option since it would
put everything, including pkg-config files, man pages, documentation, to /
which is not wanted. This commit puts 99-default.link to
/lib/systemd/network/ when required.
2014-02-21 16:05:02 +01:00
Tom Gundersen ca1a384769 install: enable networkd by default
This treats it similarly to getty@tty1.service and remote-fs.target, which can be
enabled/disabled, but defaults to enabled.
2014-02-21 14:38:04 +01:00
Jason A. Donenfeld c4a0b20c7a install: do not statically enable systemd-networkd
[tomegun: pruned the commit message as not to contradict the follow-up commit]
2014-02-21 14:37:53 +01:00
Zbigniew Jędrzejewski-Szmek 7c071fda94 build-sys: add conditionals and regenerate manpage list
The list of man pages is auto generated, based on conditonal='...'
attributes in the man page itself.
2014-02-20 22:43:27 -05:00
Michael Scherer eef65bf3ee core: Add AppArmor profile switching
This permit to switch to a specific apparmor profile when starting a daemon. This
will result in a non operation if apparmor is disabled.
It also add a new build requirement on libapparmor for using this feature.
2014-02-21 03:44:20 +01:00
Michael Scherer 8eea53dd45 build-sys: Fix compilation of nspawn when seccomp is not enabled 2014-02-21 03:10:09 +01:00
Lennart Poettering 099524d7b0 core: add new ConditionArchitecture() that checks the architecture returned by uname()'s machine field. 2014-02-21 02:43:14 +01:00
Thomas Hindoe Paaboel Andersen 95fe27d930 bootctl: add bash completion 2014-02-20 23:13:11 +01:00
Tom Gundersen c0dda18697 networkd: netdev - allow filtering on kernel cmdline, host and virt 2014-02-20 22:12:25 +01:00
Tom Gundersen b77c08e06b condition: split out most of condition handling into libsystemd-shard
The parts that require linknig to libcap, libselinux and friends stays in libsystemd-core.
2014-02-20 20:14:33 +01:00
Lennart Poettering f0f2e63bb2 macro: introduce nice macro for disabling -Wmissing-prototypes warnigs 2014-02-20 18:47:33 +01:00
Dave Reisner e288d6a81a readd journald.so install hooks under libsystemd.so
Inadvertently removed in add00dfd1f.
2014-02-20 09:05:59 -05:00
Lennart Poettering 24442f3b25 build-sys: missing EXTRA_DIST 2014-02-20 01:22:12 +01:00
Lennart Poettering 3d3143b44f build-sys: install compat .pc file 2014-02-20 00:54:42 +01:00
Lennart Poettering 62ae6dd4fa build-sys: add linkwarning.h to tarball 2014-02-20 00:25:37 +01:00
Tom Gundersen e51660ae56 udev: net-config - allow interface names to be set from the hwdb 2014-02-19 23:29:51 +01:00
Kay Sievers b20e61f436 build-sys: enable compat-libs for distcheck 2014-02-19 20:53:18 +01:00
Kay Sievers 2b0a23e864 build-sys: export experimental symbols only with --enable-kdbus 2014-02-19 20:53:18 +01:00
Kay Sievers 4a8cf55467 build-sys: add gcrypt CFLAGS 2014-02-19 18:46:27 +01:00
Kay Sievers add00dfd1f build-sys: merge libsystemd-journal into libsystemd 2014-02-19 18:12:58 +01:00
Thomas Hindoe Paaboel Andersen 51f6888bfc busctl: install bash completion 2014-02-19 18:05:07 +01:00
Zbigniew Jędrzejewski-Szmek 49a356c258 build-sys: fixups for libsystemd-daemon merge 2014-02-18 20:32:40 -05:00
Kay Sievers be4b47cb52 build-sys: install headers with --enable-kdbus 2014-02-19 02:24:57 +01:00
Kay Sievers 0ebee88184 build-sys: merge libsystemd-daemon into libsystemd 2014-02-19 01:09:19 +01:00
Thomas Hindoe Paaboel Andersen 0bc8e31b35 delta: add bash completion 2014-02-18 22:34:59 +01:00
Lennart Poettering e9642be2cc seccomp: add helper call to add all secondary archs to a seccomp filter
And make use of it where appropriate for executing services and for
nspawn.
2014-02-18 22:14:00 +01:00
Thomas Hindoe Paaboel Andersen e56056e93d machinectl: add bash completion 2014-02-18 21:14:30 +01:00
Cristian Rodríguez 0b7005eb0a fix SECCOMP_CFLAGS usage
SECCOMP_CFLAGS must be in the global CFLAGS as <seccomp.h> is
included in core/execute.h. when seccomp.h is not in the standard
path.(i.e openSUSE has it in /usr/include/pkg/libseccomp/, precisely to
catch this kind of bugs) compiling systemd fails.
2014-02-18 09:27:19 -05:00
Simon Peeters 9f137db070 build-sys: fix for "recipe for target 'dbus1-generator-install-hook' failed" 2014-02-14 01:52:40 +01:00
Lennart Poettering 24fb111207 nspawn: make socket(AF_NETLINK, *, NETLINK_AUDIT) fail with EAFNOTSUPPORT in containers
The kernel still doesn't support audit in containers, so let's make use
of seccomp and simply turn it off entirely. We can get rid of this big
as soon as the kernel is fixed again.
2014-02-13 20:30:02 +01:00
Lennart Poettering 7e2270246b nspawn: check with udev before we take possession of an interface 2014-02-13 14:38:02 +01:00
Lennart Poettering 57183d117a core: add SystemCallArchitectures= unit setting to allow disabling of non-native
architecture support for system calls

Also, turn system call filter bus properties into complex types instead
of concatenated strings.
2014-02-13 00:24:00 +01:00
Ronny Chevalier c0467cf387 syscallfilter: port to libseccomp 2014-02-12 18:30:36 +01:00
Zbigniew Jędrzejewski-Szmek feef0842cf build-sys: add less-variables.xml to EXTRA_DIST 2014-02-12 03:01:59 -05:00
Zbigniew Jędrzejewski-Szmek 21ac6ff143 man: use xinclude to de-deduplicate common text
I only tested with python-lxml. I'm not sure if xml.etree should be
deprecated.
2014-02-12 01:10:31 -05:00
Tom Gundersen cf597f650a sd-dhcp: split out packet handling from client 2014-02-11 16:24:23 +01:00
Karel Zak 3c3e5f4276 build-sys: move python helpers to tools directory
Note that make-man-rules.py is missing in EXTRA_DIST=, this patch
fixes this mistake too.
2014-02-10 13:02:34 +01:00
Karel Zak bfb35cfda1 build-sys: add check-includes build target and script 2014-02-10 13:00:19 +01:00
Tom Gundersen a6cc569e33 sd-dhcp-client: split sd_dhcp_lease from sd_dhcp_client
This allows us users of the library to keep copies of old leases. This is
used by networkd to know what addresses to drop (if any) when the lease
expires.

In the future this may be used by DNAv4 and sd-dhcp-server.
2014-02-07 15:48:35 +01:00
Tom Gundersen e59749b1f8 build-sys: move -lresolv out of CFLAGS
Thomas H.P. Andersen <phomes@gmail.com> wrote:
> Does -lresolv belong in libsystemd_la_CFLAGS? I would have thought
> that it should be in LIBADD for the lib and LDADD for the test.
2014-02-03 15:25:45 +01:00
Zbigniew Jędrzejewski-Szmek 3320e22a5d build-sys: disable lto also for libsystemd-id128
Another instance of https://sourceware.org/bugzilla/show_bug.cgi?id=16504.
2014-01-28 10:40:41 -05:00
Zbigniew Jędrzejewski-Szmek 65b3903ff5 journal: guarantee async-signal-safety in sd_journald_sendv
signal(7) provides a list of functions which may be called from a
signal handler. Other functions, which only call those functions and
don't access global memory and are reentrant are also safe.
sd_j_sendv was mostly OK, but would call mkostemp and writev in a
fallback path, which are unsafe.

Being able to call sd_j_sendv in a async-signal-safe way is important
because it allows it be used in signal handlers.

Safety is achieved by replacing mkostemp with open(O_TMPFILE) and an
open-coded writev replacement which uses write. Unfortunately,
O_TMPFILE is only available on kernels >= 3.11. When O_TMPFILE is
unavailable, an open-coded mkostemp is used.

https://bugzilla.gnome.org/show_bug.cgi?id=722889
2014-01-27 23:17:02 -05:00
Zbigniew Jędrzejewski-Szmek 9f70075586 build-sys: expose more phony targets 2014-01-26 11:44:09 -05:00
Elia Pinto bd390ae7c7 build-sys: add a phony target for cppcheck
The cppcheck target was introduced by commit 16f4efb415
"build-sys: add cppcheck target". But it is preferable to use a make phony target
for it, as this patch does.

There are two general reasons to use a phony target: to avoid a
conflict with a file of the same name, and to improve performance. In
this case the first reason is obvious, and the second is that make
skips the implicit rule search for phony targets, since it knows that
phony targets do not name actual files that could be remade from other
files (as described in the "Gnu Make" Manual).
2014-01-26 11:44:09 -05:00
Zbigniew Jędrzejewski-Szmek be12791331 build-sys: merge libsystemd-id128 into libsystemd 2014-01-25 18:10:08 -05:00
Zbigniew Jędrzejewski-Szmek 53e856e16a build-sys: create "compatibility libraries" section
Compat stuff is moved to src/compat-libs/.
Warnings are issued when programs are linked with the deprecated library.
2014-01-25 18:10:08 -05:00
Zbigniew Jędrzejewski-Szmek 242465b5bf build-sys: disable lto for compatibility libraries
https://sourceware.org/bugzilla/show_bug.cgi?id=16504
2014-01-25 18:10:08 -05:00
Zbigniew Jędrzejewski-Szmek 0bba8d6eb7 build-sys: merge libsystemd-login into libsystemd
A compatibility libsystemd-login library is created which uses
.symver and ifunc magic proposed by Lennart to make programs linked
to the old library name continue to work seamlessly.

Unfortunately the bfd linker crashes:
  https://sourceware.org/bugzilla/show_bug.cgi?id=16467
This will be fixed in binutils 2.25.

As a work-around, gold can be used:
  LDFLAGS=-Wl,-fuse-ld=gold

Unfortunately the switch to pick the linker appeared in gcc 4.8.

This also doesn't work with LLVM:
  http://llvm.org/bugs/show_bug.cgi?id=11897
2014-01-25 18:10:08 -05:00
Tom Gundersen 52433f6b65 networkd: add basic bonding support
Refactor bridging support to be generic netdev support and extend it to
cover bonding as well.
2014-01-22 17:56:49 +01:00
Tom Gundersen 607553f930 libsystemd: split up into subdirs
We still only produce on .so, but let's keep the sources separate to make things a bit
less messy.
2014-01-21 14:41:35 +01:00
Tom Gundersen c61be55d23 libsystemd-dhcp: revert merge into libsystemd
Unlike the other merged libs, the rest of libsystemd will never depend on
sd-dhcp-client, so there is no reason not to keep it separate.
2014-01-21 00:04:53 +01:00
Umut Tezduyar Lindskog fece63b86e build: Skip .busname generator when kdbus is off 2014-01-17 19:17:38 +01:00
Tom Gundersen b4b5212d31 libsystemd: rename LIBSYSTEMD_BUS to LIBSYSTEMD 2014-01-17 13:53:05 +01:00
Zbigniew Jędrzejewski-Szmek 235ee2134f build-sys: increase valgrind stack limit so all tests pass again 2014-01-16 00:16:02 -05:00
Zbigniew Jędrzejewski-Szmek b7fc42e03a bus: break reference cycle between bus and messages
Previously (6ee4f99 bus: break reference cycle between bus and
messages) I committed the test code, but not the actual fix :)
2014-01-16 00:16:02 -05:00
Tom Gundersen 3bedba4ae1 sd-resolv: rename to sd-resolve
Lennart pointed out that we were misspelling 'resolve'. Let's not repeat the mistakes of 'umount'
and 'resolv.conf'.
2014-01-14 18:25:16 +01:00
Tom Gundersen 5681d7fb8b libsystemd-dns: merge into libsystemd
Also rename sd-dns -> sd-resolv.
2014-01-13 21:06:13 +01:00
Tom Gundersen 0b54473e9b libsystemd-rtnl: merge into libsystemd 2014-01-13 21:06:13 +01:00
Tom Gundersen c813ca40c8 libsystemd-dhcp: merge into libsystemd 2014-01-13 21:06:08 +01:00
Tom Gundersen 6bb648a16a libsystemd-bus: rename to libsystemd
Documentation was updated to refer to either 'libsystemd' or 'sd-bus' in place
of libsystemd-bus.
2014-01-13 18:54:19 +01:00
Tom Gundersen 3bef724f7e networkd: generate resolv.conf
This adds support to generate a basic resolv.conf in /run/systemd/network.
This file will not take any effect unless a symlink is created from
/etc/resolv.conf.

Nameservers received over DHCP takes precedence over statically configured ones.

Note: /etc/resolv.conf is severely limited, so in the future we will likely
rather provide a much more powerfull nss plugin (or something to that effect),
but this should allow current users to function without any loss of
functionality.
2014-01-12 15:37:21 +01:00
Dave Reisner 0d8efe3535 ycm: autocompose flags from the Makefile
This should hopefully be self-maintaining.
2014-01-11 13:35:43 -05:00
Daniel Buch e963e3ada1 sd-dns: initial commit
Origin: <http://0pointer.de/lennart/projects/libasyncns/>

[tomegun: renamed some more files asyncns -> sd-dns and moved to libsystemd-bus as
requested by Lennart]
2014-01-11 15:03:25 +00:00
Zbigniew Jędrzejewski-Szmek 58742b06bd build-sys: fix distcheck 2014-01-08 22:34:59 -05:00
Kay Sievers 2b197ae21c dbus1-generator: install user version 2014-01-08 18:11:37 +08:00
Kay Sievers 8b255ecd99 pam_systemd: export DBUS_SESSION_BUS_ADDRESS 2014-01-08 18:11:37 +08:00
Kay Sievers 54142c6af1 bus-driverd: support user mode 2014-01-08 08:38:39 +08:00
Kay Sievers 7ca7b61f70 bus-proxyd: support --user bus address 2014-01-08 08:38:39 +08:00
Kay Sievers fccd44ec3a core: --user -- add basic.target an sort against it like --system does 2014-01-07 01:35:25 +08:00
Zbigniew Jędrzejewski-Szmek a0846368c8 build-sys: make valgrind-tests target output nicer 2014-01-02 19:45:47 -05:00
Tom Gundersen f5be560181 networkd: add DHCPv4 support
This adds basic DHCPv4 support. Link-sense is enabled unconditionally,
but the plan is to make that configurable.

I tested this in a VM with lots of NICs and over wifi in the various
coffee shops I found this Christmas, but more testing would definitely
be appreciated.
2014-01-01 16:26:27 +01:00
Zbigniew Jędrzejewski-Szmek 9b55cd5665 build-sys: make test output a bit nicer 2013-12-31 13:00:57 -05:00
Zbigniew Jędrzejewski-Szmek aa9ed65389 build-sys: make test-dhcp-* statically linked
This makes them behave like everything else following
48d7417d3 'build-sys: link most internal libraries statically'.
2013-12-31 13:00:57 -05:00
Zbigniew Jędrzejewski-Szmek 8f8770706e build-sys: fix systemd-stdio-bridge link to work with split /usr
shumski> there seems to be slight error in systemd git master Makefile.am
2013-12-30 12:11:13 -05:00
Lennart Poettering 08bcebf36e shared: add simplistic XML parser for usage in the D-Bus policy language compat parser 2013-12-28 03:04:29 +01:00
Zbigniew Jędrzejewski-Szmek 4acbce7979 build-sys: fix generation of user@.service 2013-12-27 12:12:41 -05:00
Lennart Poettering 43a99a7afe build-sys: minor fixes found with cppcheck 2013-12-25 19:00:38 +01:00
Zbigniew Jędrzejewski-Szmek c4708f1323 tmpfiles: introduce the concept of unsafe operations
Various operations done by systemd-tmpfiles may only be safely done at
boot (e.g. removal of X lockfiles in /tmp, creation of /run/nologin).
Other operations may be done at any point in time (e.g. setting the
ownership on /{run,var}/log/journal). This distinction is largely
orthogonal to the type of operation.

A new switch --unsafe is added, and operations which should only be
executed during bootup are marked with an exclamation mark in the
configuration files. systemd-tmpfiles.service is modified to use this
switch, and guards are added so it is hard to re-start it by mistake.

If we install a new version of systemd, we actually want to enforce
some changes to tmpfiles configuration immediately. This should now be
possible to do safely, so distribution packages can be modified to
execute the "safe" subset at package installation time.

/run/nologin creation is split out into a separate service, to make it
easy to override.

https://bugzilla.redhat.com/show_bug.cgi?id=1043212
https://bugzilla.redhat.com/show_bug.cgi?id=1045849
2013-12-24 15:48:06 -05:00
Lennart Poettering b67f541f13 bus: switch kdbus bloom filter over to SipHash (from MurmurHash3)
Let's try to standardize on a single non-cryptographic hash algorithm,
and for that SipHash appears to be the best answer.

With this change there are two other hash functions left in systemd: an
older version of MurmurHash embedded into libudev for the bloom filters
in udev messages (which is hard to update, given that the we probably
should stay compatible with older versions of the library). And lookup3
in the journal files (which we could replace for new files, but which is
probably not worth the work).
2013-12-23 04:20:55 +01:00
Kay Sievers 57d0e6b273 libudev: ship the original MurmurHash2.[ch] file 2013-12-23 02:55:06 +01:00
Lennart Poettering 9bf3b53533 shared: switch our hash table implementation over to SipHash
SipHash appears to be the new gold standard for hashing smaller strings
for hashtables these days, so let's make use of it.
2013-12-22 21:12:25 +01:00
Marcel Holtmann d5f7759a98 hwddb: Add database for SDIO vendor and class information 2013-12-22 10:21:20 -08:00
Lennart Poettering 15e913230c bus: install unit files for new driver service 2013-12-17 15:42:33 +01:00
Zbigniew Jędrzejewski-Szmek e7335f5491 build-sys: fix distcheck 2013-12-16 23:59:07 -05:00
Zbigniew Jędrzejewski-Szmek 0b6c04bb45 bus: use gperf to map error string to errno 2013-12-16 23:21:50 -05:00
Lennart Poettering cd49e2f664 build-sys: build bus-driverd if kdbus support is enabled 2013-12-17 01:36:59 +01:00
Daniel Mack 294c866023 Add bus-driverd
systemd-bus-driverd is a small daemon that connects to kdbus and
implements the org.freedesktop.DBus interface. IOW, it provides the bus
functions  traditionally taken care for by dbus-daemon.

Calls are proxied to kdbus, either via libsystemd-bus (were applicable)
or with the open-coded use of ioctl().

Note that the implementation is not yet finished as the functions to
add and remove matches and to start services by name are still missing.
2013-12-16 22:34:48 +01:00
Lennart Poettering 16f4efb415 build-sys: add cppcheck target
This uses --enable=all mode. Should be taken with a grain of salt
though. While many recommendations make sense we should probably keep
"int r" always on function scope, and many of the portability warnings
really don't matter to us because we only care for Linux/glibc.
2013-12-16 00:06:07 +01:00
Lennart Poettering 7c9a6f9063 bus: install systemd-bus-proxyd unit files for compatibility with dbus1 2013-12-13 20:49:57 +01:00
Zbigniew Jędrzejewski-Szmek 189b2384d6 build-sys: use internal library for dhcp client tests
Also clean up AM_CFLAGS in a few places.
2013-12-12 11:43:34 -05:00
Patrik Flykt 117539f8b7 build: Add dependency on libsystemd-bus needed for main loop 2013-12-12 11:43:34 -05:00
Patrik Flykt 290c7324ca dhcp: Add test for discover DHCP packet creation
Set a fake MAC address and emulate raw packet sending. When the buffer
containing the Discover message is received, check selected IP and
UDP headers and compute IP header and UDP message checksums. Also
send the DHCP message for option parsing and expect a successful
outcome.
2013-12-12 11:43:34 -05:00
Patrik Flykt e1c244dea0 build: Add libsystemd-dhcp 2013-12-12 11:43:34 -05:00
Patrik Flykt 78628cd273 build: Add DHCP option test 2013-12-12 11:43:33 -05:00
Patrik Flykt b5d01d174c build: Add initial build support
The client test program is the only one to be built so far.
2013-12-12 11:43:33 -05:00
Lennart Poettering f9a810beda journald: port to sd-event and enable watchdog support 2013-12-11 20:55:09 +01:00
Lennart Poettering cde93897cd event: hook up sd-event with the service watchdog logic
Adds a new call sd_event_set_watchdog() that can be used to hook up the
event loop with the watchdog supervision logic of systemd. If enabled
and $WATCHDOG_USEC is set the event loop will ping the invoking systemd
daemon right after coming back from epoll_wait() but not more often than
$WATCHDOG_USEC/4. The epoll_wait() will sleep no longer than
$WATCHDOG_USEC/4*3, to make sure the service manager is called in time.

This means that setting WatchdogSec= in a .service file and calling
sd_event_set_watchdog() in your daemon is enough to hook it up with the
watchdog logic.
2013-12-11 18:20:09 +01:00
Thomas Hindoe Paaboel Andersen 96115cdfe0 fix scan-build issues
The static analyzer scan-build had a few issues with analysing
parts of systemd.

gpt-auto-generator.c:
scan-build could not find blkid.h. Whether it should be blkid.h or
blkid/blkid.h seems to depend on the version used. We already use
blkid/blkid.h in udev-builtin-blkid.c so it seems safe to use that
here too.

Makefile.am:
Moved some -D's from CFLAGS to CPPFLAGS. I also simplified them a
bit and got rid of a left over DBUS_CFLAGS.

test-cgroup-mask.c/test-sched-prio.c
A variable was added to store the replaced TEST_DIR. When wrapped
in an assert_se TEST_DIR was not replaced in the logged error.
While not an issue introduced in this patch we might as well fix
it up while we are here.
2013-12-10 22:30:46 +01:00
Lennart Poettering 6647dc6659 bus: demarshal gvariant 2013-12-09 23:04:49 +01:00
Lennart Poettering bc25a2fb66 bus: start maintaining a list of difference between kdbus/dbus1 2013-12-05 03:19:18 +01:00
Lennart Poettering c1b9d93572 bus: add support for serializing to gvariant
(deserialization is still missing, hence this is not hooked up to kdbus)
2013-12-05 02:47:36 +01:00
Lennart Poettering 0461f8cdc1 bus: internalize a lot of protocol definitions
We shouldn export what isn't necessary or useful to clients, so let's
add the protocol definitions we only need internally into a private
header.
2013-12-03 18:14:50 +01:00
Lennart Poettering cde360cd5d units: ship busname units for the bus activated services we ship 2013-12-03 04:28:02 +01:00
Zbigniew Jędrzejewski-Szmek a6e9f2b911 catalog: rename files to specify language in the filename 2013-12-02 22:12:02 -05:00
Lennart Poettering dca409bf96 units: create busnames.target for user sessions too 2013-12-03 01:44:24 +01:00
Lennart Poettering 1b16c75cd2 units: install busnames.target by default 2013-12-03 01:18:26 +01:00
Lennart Poettering 674eb68520 bus: add generator that turns old dbus1 activation files into .busname + .service units 2013-12-03 01:13:48 +01:00
Lennart Poettering e821075a23 bus: add .busname unit type to implement kdbus-style bus activation 2013-12-02 23:32:34 +01:00
Marcel Holtmann e4afbb3eac build-sys: allow building systemctl with --disable-logind
When logind is disabled, do not attempt to link against the non-existing
libsystemd-login-internal.la library.
2013-12-01 12:28:32 -08:00
Daniele Medri 917c03718c catalog,po: add Italian translation 2013-12-01 11:28:04 -05:00
Lennart Poettering dff55e5db3 build-sys: no longer rebuild various bits and pieces such as man pages each time the Makefile changes
We don't do this for .c files either, even they are also influence quite
a bit by makefile settings. Given that XSLT is a lot slower then the
rest of the build let's make our build a bit faster if people end up
touching the Makefile.
2013-11-30 00:21:06 +01:00
Kay Sievers f252ff1742 rename stdio-bridge to bus-proxyd 2013-11-29 22:12:59 +01:00
Zbigniew Jędrzejewski-Szmek bd441fa27a build-sys: make multi-seat-x optional
At some point it should become disabled by default.

http://lists.freedesktop.org/archives/systemd-devel/2013-November/014869.html
2013-11-28 14:37:11 -05:00
Lennart Poettering 5b12334d35 bus: add new sd_bus_creds object to encapsulate process credentials
This way we can unify handling of credentials that are attached to
messages, or can be queried for bus name owners or connection peers.

This also adds the ability to extend incomplete credential information
with data from /proc,

Also, provide a convenience call that will automatically determine the
most appropriate credential object for an incoming message, by using the
the attached information if possible, the sending name information if
available and otherwise the peer's credentials.
2013-11-28 18:42:18 +01:00
Sergey Ptashnick 247913054e catalog,po: add Russian translation 2013-11-28 03:43:07 -05:00
Lennart Poettering d0767ffd08 journal: add a test case for flushing messages out of a series of journal files into a single new one 2013-11-27 01:01:53 +01:00
Tom Gundersen 02b59d57e0 networkd: add bridge support
A bridge is specified in a .netdev file with a section [Bridge]
and at least the entry Name=.

A link may be joined to a bridge if the .network applied to it has
a Bridge= entry giving the name of the bridge in its [Network] section.

We eagerly create all bridges on startup, and links are added to
bridges as soon as they both appear.
2013-11-26 01:32:25 +01:00
Tom Gundersen a553fd32d1 networkd: fix build
Forgot to 'git add'...
2013-11-23 02:47:12 +01:00
David Strauss 21acf11d40 cgroups: Fix test service inclusion in Makefile 2013-11-23 02:49:05 +10:00
Lennart Poettering baabc57764 build-sys: move more files from core/ to share/ that are generic enough 2013-11-22 16:31:40 +01:00
Lennart Poettering 780896a4f1 bus: rework sd_bus_error APIs
All calls that set a sd_bus_error structure will now return the same
error converted to a negative errno. This may be used as syntactic sugar
to return from a function and setting a bus_error structure in one go.

Also, translate all Linux Exyz (EIO, EINVAL, EUCLEAN, EPIPE, ...)
automatically into counterparts in the (new) "Posix.Error." namespace.

If we fail to allocate memory for the components of a sd_bus_error
automatically reset it to an OOM error which we always can write.
2013-11-22 04:23:22 +01:00
David Strauss 6414b7c981 cgroups: Cache controller masks and optimize queues. 2013-11-22 11:22:47 +10:00
Lennart Poettering 718db96199 core: convert PID 1 to libsystemd-bus
This patch converts PID 1 to libsystemd-bus and thus drops the
dependency on libdbus. The only remaining code using libdbus is a test
case that validates our bus marshalling against libdbus' marshalling,
and this dependency can be turned off.

This patch also adds a couple of things to libsystem-bus, that are
necessary to make the port work:

- Synthesizing of "Disconnected" messages when bus connections are
  severed.

- Support for attaching multiple vtables for the same interface on the
  same path.

This patch also fixes the SetDefaultTarget() and GetDefaultTarget() bus
calls which used an inappropriate signature.

As a side effect we will now generate PropertiesChanged messages which
carry property contents, rather than just invalidation information.
2013-11-20 20:52:36 +01:00
Sylvain Plantefeve 0571a6b0a9 catalog: add French translation 2013-11-17 11:56:19 -05:00
Zbigniew Jędrzejewski-Szmek 952d97ed2b random-seed: improve debugging messages a bit 2013-11-15 22:53:14 -05:00
Dave Reisner 4e1b76c214 build: use printf to generate symbol tests
echo is basically unportable, so use printf instead.
2013-11-15 22:44:02 -05:00
Tom Gundersen b5643a8b1b build-sys: don't mix dynamic and static libs 2013-11-15 14:00:24 +01:00
Tom Gundersen b4f2a5b197 rtnl: add event loop integration 2013-11-14 23:22:58 +01:00
Tom Gundersen 81eca919f7 loopback-setup: move to rtnl
This should be equivalent to the old behavior.
2013-11-14 15:11:15 +01:00
Marko Myllynen 51d0f1c9f6 zsh-completion: add bootctl 2013-11-13 23:02:23 -05:00
Kay Sievers 64a9e4d763 libsystemd-id128: statically include sd_listen_fds() 2013-11-13 02:47:25 +01:00
Zbigniew Jędrzejewski-Szmek 9173a3082f build-sys: parallelize 'exported' target 2013-11-12 19:02:28 -05:00
Zbigniew Jędrzejewski-Szmek dc579853d4 build-sys: make public libraries depend on .sym files
This way modyfing the .sym file causes a rebuild.
2013-11-12 19:00:23 -05:00
Zbigniew Jędrzejewski-Szmek f1e0c18340 build-sys: add a link test for exported symbols
I know that this is a pretty big net to catch some small fish,
but we *do* regularly forget to properly export symbols that
were supposed to be exported.

This time sd_bus_get_current and some renamed symbols are caught.
2013-11-12 18:58:34 -05:00
Colin Walters 3c9317d2d9 build-sys: Add --disable-networkd option
For GNOME (Continuous), we are unlikely to require or want
systemd-networkd in the near term future; all of the tools and code
are targeting NetworkManager.

The long term story is still an open question of course, but for now,
there's no reason for gnome-continuous to build or ship this.
2013-11-12 22:38:08 +01:00
Lennart Poettering 2b5c5383e4 bus: beautify bus_message_dump() output a bit 2013-11-12 00:12:44 +01:00
Lennart Poettering d23284faa9 build-sys: subtract list of exported symbols from "check-api-unused" list 2013-11-10 23:54:55 +01:00
Zbigniew Jędrzejewski-Szmek 39da205fbb build-sys: simplify defined/undefined definition 2013-11-09 19:02:53 -05:00
Tom Gundersen f579559b3a networkd: add a basic network daemon
This daemon listens for and configures network devices tagged with
'systemd-networkd'. By default, no devices are tagged so this daemon
can safely run in parallel with existing network daemons/scripts.

Networks are configured in /etc/systemd/network/*.network. The first .network
file that matches a given link is applied. The matching logic is similar to
the one for .link files, but additionally supports matching on interface name.

The mid-term aim is to provide an alternative to ad-hoc scripts currently used
in initrd's and for wired setups that don't change much (e.g., as seen on
servers/and some embedded systems).

Currently, static addresses and a gateway can be configured.

Example .network file:

[Match]
Name=wlp2s0

[Network]
Description=My Network
Gateway=192.168.1.1
Address=192.168.1.23/24
Address=fe80::9aee:94ff:fe3f:c618/64
2013-11-09 23:41:17 +01:00
Lennart Poettering f842cd74ea build-sys: fix rule for generating undefined list 2013-11-08 18:12:45 +01:00
Lennart Poettering 9070a9c103 build-sys: add make check-api-unused 2013-11-08 16:53:29 +01:00
Lennart Poettering 862e8bf8c6 build-sys: install busctl 2013-11-08 16:53:28 +01:00
Marc-Antoine Perennou f459b6025f systemctl: port to libsystemd-bus 2013-11-08 14:07:27 +01:00
Simon Peeters f8f14b3654 loginctl: convert to sd-bus
NOTE: the show-* subcommands do not print some properties:
  this are those with types like (so), a(so), (uo),...
  we need to fix this, but I'm not sure how
2013-11-07 21:01:48 +01:00
Lennart Poettering fa57130d35 man: add docs for sd_is_special() and some man page symlinks 2013-11-07 17:51:09 +01:00