1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 11:55:44 +03:00
Commit Graph

13996 Commits

Author SHA1 Message Date
Martin Pitt
7b36bf82c4 keymap: Add Sony Vaio VGN-FW250
https://launchpad.net/bugs/1271163
2014-01-28 18:14:18 +01:00
Martin Pitt
1e091c1285 keymap: Add release quirk for Acer AOA switchvideomode key
https://launchpad.net/bugs/1272658
2014-01-28 18:10:12 +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
Lennart Poettering
2d5bdf5bc0 always use the same code for creating temporary files
Let's unify our code here, and also always specifiy O_CLOEXEC.
2014-01-28 13:47:35 +01:00
Lennart Poettering
7736202ce9 util: pick slightly safer open() flags when creating temporary files 2014-01-28 13:26:48 +01:00
Lennart Poettering
c09918f97a util: define O_TMPFILE on x86/x86-64, where the generic value is used
On other archs we'll not define it so that open_tmpfile() falls back to
unguessable name + unlink.
2014-01-28 13:25:51 +01:00
Lennart Poettering
a6afc4aeaa util: pass original flags value to mkostemp(), in open_tmpfile() 2014-01-28 13:09:14 +01:00
Lennart Poettering
d37a91e860 util: simplify mkostemp_safe()
Make it use dev_urandom() and endswith().
2014-01-28 13:08:34 +01:00
Lennart Poettering
b89446bb33 util: introduce new dev_urandom() call that is like random_bytes() but doesn't fall back to PRNG 2014-01-28 13:07:28 +01:00
Lennart Poettering
7d5dd5e0cf util: modernize loop_read() and loop_write() a bit
Let's make use of fd_wait_for_event() here, instead of rolling our own.
2014-01-28 13:06:44 +01:00
Lennart Poettering
69727e6dc6 bus: reorder a few things 2014-01-28 12:33:40 +01:00
Kay Sievers
cbe72e30eb bus: update kdbus.h (ABI break) 2014-01-28 12:07:20 +01:00
Kay Sievers
28c758de94 Revert "manager: print ephemeral information about running jobs' timeouts"
This reverts commit 2cba2e0352.

It breaks bootup with dracut, the transition to the real rootfs fails.
2014-01-28 12:03:23 +01:00
Zbigniew Jędrzejewski-Szmek
cb8ccb2271 manager: also turn on output on unit failure 2014-01-27 23:17:03 -05:00
Zbigniew Jędrzejewski-Szmek
d450b6f2a9 manager: add systemd.show_status=auto mode
When set to auto, status will shown when the first ephemeral message
is shown (a job has been running for five seconds). Then until the
boot or shutdown ends, status messages will be shown.

No indication about the switch is done: I think it should be clear
for the user that first the cylon eye and the ephemeral messages appear,
and afterwards messages are displayed.

The initial arming of the event source was still wrong, but now should
really be fixed.
2014-01-27 23:17:03 -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
8e33886ec5 Replace mkostemp+unlink with open(O_TMPFILE)
This will only work on Linux >= 3.11, and probably not on all
filesystems. Fallback code is provided.
2014-01-27 23:17:02 -05:00
Lennart Poettering
847657c769 bus: update bloom filter description a bit 2014-01-28 01:05:32 +01:00
Lennart Poettering
b28ff39f42 bus: rework bloom filter logic to operate with variable bloom filter
sizes and numbers of hash functions

In order to make the bloom filter logic more future proof communicate
bloom filter parameters from the original bus creator to the clients,
and allow them to be variable within certain ranges.
2014-01-28 00:57:38 +01:00
Lennart Poettering
af08d2f9cd bus: add API calls for connecting to starter bus
Add new calls sd_bus_open() and sd_bus_default() for connecting to the
starter bus a service was invoked for, or -- if the process is not a
bus-activated service -- the appropriate bus for the scope the process
has been started in.
2014-01-27 21:34:54 +01:00
Lennart Poettering
968d3d242c resolve: update sd-resolve to match the other APIs in style and functionality 2014-01-27 20:12:59 +01:00
Lennart Poettering
ff975efb2e bus: when we cannot bus activate a service because we go down, drop one
message from the queue
2014-01-27 20:12:59 +01:00
Martin Pitt
82cd413782 keymap: Add HP Chromebook 14 (Falco)
Thanks to Stefan Nagy <public@stefan-nagy.at>.
2014-01-27 09:05:35 +01:00
Zbigniew Jędrzejewski-Szmek
36be24c8f8 core: require mounts for the root and working directories
We know that launching a unit will fail if some required directories
haven't been mounted yet. There's no point in starting it just to
have it fail even before it gets a chance to run.
2014-01-27 01:23:41 -05:00
Zbigniew Jędrzejewski-Szmek
70b64bd356 core: simplify check for path absoluteness
Just a microopt.
2014-01-27 01:23:16 -05:00
Zbigniew Jędrzejewski-Szmek
fd08a8403f manager: rearm jobs timer
It would fire just once.

Also fix units from sec to usec as appropriate.

Decrease the switching interval to 1/3 s, so that when the time
remaining is displayed with 1s precision, it doesn't jump by 2s every
once in a while. Also, the system is feels noticably faster when the
status changes couple of times per second instead of every few
seconds.
2014-01-27 01:23:16 -05:00
Zbigniew Jędrzejewski-Szmek
2cba2e0352 manager: print ephemeral information about running jobs' timeouts
Produces output like:
[  *** ] (1 of 2) A start job is running for slow.service (33s / 1min 30s)

The first nubmer is the time since job start, the second is the job timeout.
2014-01-27 01:23:16 -05:00
Zbigniew Jędrzejewski-Szmek
68db7a3bd9 core: add function to tell when job will time out
Things will continue when either the job timeout
or the unit timeout is reached. Add functionality to
access that info.
2014-01-27 01:23:16 -05:00
Matthew Monaco
d7353ef609 pam_systemd: Ignore vtnr when seat != seat0
logind considers it an error for a seat other than seat0 to have a
non-zero vtnr for CreateSession
2014-01-26 12:25:21 -05:00
Kay Sievers
62cfb98add dbus1-generator: use XDG_RUNTIME_DIR instead of /run/user/%lu/ 2014-01-26 18:09:24 +01: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
Christian Seiler
b4a11878f2 cryptsetup: Support key-slot option
Debian recently introduced the option key-slot to /etc/crypttab to
specify the LUKS key slot to be used for decrypting the device. On
systems where a keyfile is used and the key is not in the first slot,
this can speed up the boot process quite a bit, since cryptsetup does
not need to try all of the slots sequentially. (Unsuccessfully testing
a key slot typically takes up to about 1 second.)

This patch makes systemd aware of this option.

Debian bug that introduced the feature:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=704470
2014-01-26 13:24:01 +01:00
Zbigniew Jędrzejewski-Szmek
0a75bc612d build-sys: update .pc.in files 2014-01-25 18:55:58 -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
Zbigniew Jędrzejewski-Szmek
39c4ead232 build-sys: default to gold linker
gold doesn't exhibit the problems with linking of compatibility
libraries.

It is also slightly faster:

make clean && make -j5   bfd       gold

real                   34.885s     33.707s
user                   34.486s     32.189s
sys                    9.929s      10.845s

real                   35.128s     33.508s
user                   34.660s     31.858s
sys                    10.798s     10.341s

real                   35.405s     33.748s
user                   34.765s     32.384s
sys                    11.635s     10.998s

real                   35.250s     33.795s
user                   34.704s     32.253s
sys                    11.220s     11.469s

touch src/libsystemd/sd-bus.c && make -j5
                        bfd        gold

real                   10.224s      9.030s
user                   11.664s      9.877s
sys                    3.431s       2.878s

real                   10.021s      9.165s
user                   11.526s      9.990s
sys                    3.061s       3.015s

real                   10.233s      8.961s
user                   11.657s      9.973s
sys                    3.467s       2.202s

real                   10.160s      9.086s
user                   11.637s      9.950s
sys                    3.188s       2.859s
2014-01-25 18:10:08 -05:00
Kay Sievers
7a821bfec1 dbus1-generator: add missing "path=" and "unix:*" to DBUS environment variables
This works around the goa daemon crash:
  Jan 25 20:54:24 lon goa[1363]: goa-daemon version 3.10.2 starting [main.c:117, main()]
  Jan 25 20:54:24 lon systemd[424]: Starting Legacy D-Bus Protocol Compatibility Daemon (PID 1363/UID 2702)...
  Jan 25 20:54:24 lon systemd[424]: Started Legacy D-Bus Protocol Compatibility Daemon (PID 1363/UID 2702).
  Jan 25 20:54:24 lon kernel: goa-daemon[1363]: segfault at 20 ip 00007f46914b26d5 sp 00007fff1ae6d9a0 error 4 in libtelepathy-glib.so.0.80.1[7f469144f000+228000]
  Jan 25 20:54:24 lon systemd-coredump[1368]: Process 1363 (goa-daemon) dumped core.
  Jan 25 20:54:32 lon goa[1375]: goa-daemon version 3.10.2 starting [main.c:117, main()]
2014-01-25 21:08:36 +01:00
Tom Gundersen
c9ccc19f9e networkd: improve logging a bit
Fix/add some structured logging messages, and be uniform about when we WARN and ERR.
2014-01-25 11:39:22 +01:00
Tom Gundersen
54abf461d6 networkd: add basic VLAN support 2014-01-25 11:25:17 +01:00
Tom Gundersen
168a3f602f sd-rtnl: extend tests a bit 2014-01-25 01:22:54 +01:00
Tom Gundersen
e5c4350b0d sd-rtnl: add support for reading containers
Also insist on messages being sealed before reading them. In other
words we don't allow interleaving of reading and appending to messages.
2014-01-24 22:20:34 +01:00
Kay Sievers
1fa132931a bus: bump memfd vs. copy limit to 512k to reflect recent benchmarks 2014-01-24 21:16:37 +01:00
Tom Gundersen
5a081409c5 sd-rtnl: add support for nested containers 2014-01-24 19:56:01 +01:00
Kay Sievers
c552d2e18b bus: update kdbus.h (ABI break) 2014-01-24 19:26:16 +01:00
Michal Sekletar
040975bd3e TODO: update
ps can display slice unit for a process.

93e7872995
2014-01-24 17:53:53 +01:00
Kay Sievers
18a281479d bus: update kdbus.h (ABI break) 2014-01-24 17:49:32 +01:00
Lennart Poettering
eee9ec0e28 bus: change API to expose "inverted" no_reply and no_auto_start message flags non-inverted 2014-01-22 20:45:05 +01:00