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

20589 Commits

Author SHA1 Message Date
Filipe Brandenburger
e013d21b62 build-sys: Work around --with-rootprefix= (empty) not producing /
Since we introduced AX_NORMALIZE_PATH, using --with-rootprefix=/ does
produce an empty string, but using --with-rootprefix= (empty) now
produces "." instead which is wrong.

Work around it until we can find a better solution for AX_NORMALIZE_PATH
upstream at autoconf-archive.

Bug: https://github.com/systemd/systemd/issues/54
2015-06-03 07:34:42 -07:00
Filipe Brandenburger
759b98c568 build-sys: Recommend --with-rootprefix=/ for split-usr
Since we started using AX_NORMALIZE_PATH, that is a valid supported
setup and is more explicit than --with-rootprefix= (empty) which is
actually currently broken.

Let's advocate for it in the ./configure suggestion from autogen.sh.
2015-06-03 07:34:42 -07:00
Harald Hoyer
ea344aec10 Merge pull request #51 from zonque/unquote
util: fix another cunescape() regression



compiled and test-util exited with 0
2015-06-03 15:55:28 +02:00
Kay Sievers
1a435084b7 configure.ac: add missing komma 2015-06-03 14:50:58 +02:00
Kay Sievers
29d01b7064 point to github issues instead of freedesktop bugzilla 2015-06-03 14:48:55 +02:00
Kay Sievers
4142554fcd build-sys: split off libsystemd-machine convenience lib
Break the link order cycle by splitting off the machine parts which
use sd-bus but live in shared/.
2015-06-03 14:46:11 +02:00
Kay Sievers
42fcc4d258 build-sys: merge libsystemd-label convenience lib
Stop to pretend that we can split selinux related code from other.
We have too many cross-references and it breaks all the time and
I am no longer willing to maintain that mess for no real benefit.

We currently have cyclic dependencies which are only resolved on
machines with gc-sections toolchains. We need a simpler and at the
same time more strict model to manage our convenienc libraries and
linking.

The first thing to give up is the "optimization" of not linking
libselinux for a very few tools. If that is an issue, please fix
the mess that libselinux creates in selinux itself, and do not ask
consumers to work around it.
2015-06-03 14:23:03 +02:00
Michael Biebl
9391a1c3d6 systemctl: Use /usr/bin/editor if available
If the EDITOR environment variable is not set, the Debian policy
recommends to use the /usr/bin/editor program as default editor.
This file is managed via the dpkg alternatives mechanism and typically
used in Debian/Ubuntu and derivatives to configure the default editor.

See section 11.4 of the Debian policy [1].

Therefor prefer /usr/bin/editor over specific editors if available.

[1] https://www.debian.org/doc/debian-policy/ch-customized-programs.html
2015-06-03 14:14:42 +02:00
Daniel Mack
3b51f8ddd5 util: fix another cunescape() regression
Fix a regression caused by 4034a06d ("util: rework word parsing and c
unescaping code") which broke octal escape sequences.

The reason for this breakage is that cunescape_one() expects 4 characters
in an octal encoding, which is a stray left-over from the old code which
operated on different variables to make the length check.

While at it, add a test case to prevent the same thing from happening
again.
2015-06-03 13:54:21 +02:00
Kay Sievers
36f5e964de build-sys: disable gc-sections for distcheck
We cannot rely on gc-sections to fix dependency cycles in our linking
setup. Disable it for distcheck to let it fail and find these bugs
earlier.
2015-06-03 03:17:01 +02:00
Kay Sievers
1635b34e15 Merge pull request #43 from teg/udev-forking-rework
udev forking/socket-passing rework
2015-06-03 02:39:07 +02:00
Kay Sievers
7a17c2cc40 build-sys: remove left-over gtk-doc 2015-06-03 02:36:40 +02:00
Tom Gundersen
11b1dd8cec udevd: merge manager_new() and manager_listen() again
Now that listen_fds() have been split out, we can safely move the allocation
of the manager object after doing the forking (the fork is done to notify legcay
init-systems that the fds are ready).

Subsequently, we can merge manager_listen() back into managre_new().

This entails a minor behaviour change: the application of permissions to
static device nodes now happens after the fork (but still before notifying
systemd about being ready).
2015-06-03 02:10:58 +02:00
Tom Gundersen
7500cd5e96 udevd: make sd_notify independent of forknig/notify mode
This will simply silently fail on non-systemd systems, so there is no reason
to make it conditional.

Also make it clear that we notify systemd about being ready as the last step
before starting the event loop, whereas the forking might need to happen
earlier.
2015-06-03 02:03:17 +02:00
Tom Gundersen
b7f74dd48f udevd: manager - split listen_fds() out of manager_new()
This will allow us in a follow-up commit to listen to fds before forking and
still allocate the manager only after the fork.
2015-06-03 02:03:15 +02:00
Tom Gundersen
f59118ec79 udevd: unify fd handling in forking/notify modes
Hide the differenec in listen_fds, by simply opening the fds
here in case they are not passed in.
2015-06-03 02:01:46 +02:00
Tom Gundersen
44daf75d98 libudev: monitor - set nl_pid when reusing fd in udev_monitor_new_from_netlink_fd
This allows a fd to be created and configured as part of one monitor, to be passed in
to create a second monitor without having to redo any of the configuration.
2015-06-03 01:54:16 +02:00
Tom Gundersen
c26d1879c7 udevd: make cgroup logic independent of socket passing
This should have no behavioural change, but it is odd to tie the cgroup cleaning to
whether or not we are passed sockets.

The point really is if we are guaranteed to be in a dedicated cgroup, so instead
check for our parent being PID1 (we already implicitly only do this on systemd
systems).
2015-06-03 01:53:26 +02:00
Tom Gundersen
bf6871639e udevd: only bind ctrl and netlink sockets when we open them
If they are passed from PID1 this is not necessary.
2015-06-03 01:41:35 +02:00
Tom Gundersen
fcff1e7241 udevd: rename systemd_fds to listen_fds 2015-06-03 01:41:35 +02:00
Tom Gundersen
8314de1d81 udevd: simplify signal mask handling
We used to block all signals, and restore the original signal mask before exec'ing
external processes.

Now we just block the signals we care about and unconditionally unblock all signals
before exec'ing.
2015-06-03 01:41:34 +02:00
Tom Gundersen
a39423c2ef Merge pull request #42 from jonboulle/master
README: update links to reference new home (GitHub)
2015-06-03 01:03:54 +02:00
Tom Gundersen
cfe907ab6e Merge pull request #41 from mischief/ipforwarding
networkd: create "kernel" setting for IPForwarding
2015-06-03 01:02:51 +02:00
Jonathan Boulle
eb0914fc85 README: update links to reference new home (GitHub) 2015-06-02 15:57:50 -07:00
Nick Owens
3ed7e9c735 man: document IPForward=kernel option 2015-06-02 15:42:21 -07:00
Nick Owens
a70ec7f19f networkd: create "kernel" setting for IPForwarding
In 5a8bcb674f, IPForwarding was introduced
to set forwarding flags on interfaces in .network files. networkd sets
forwarding options regardless of the previous setting, even if it was
set by e.g. sysctl. This commit creates a new option for IPForwarding,
"kernel", that preserves the sysctl settings rather than always setting
them.

See https://bugs.freedesktop.org/show_bug.cgi?id=89509 for the initial
bug report.
2015-06-02 15:31:48 -07:00
Andreas Pokorny
495968cf4e udev: input_id - use ABS_MT_SLOT{-1} to exclude non touch screen devices
Peek at the ABS_MT_SLOT-1 axis. Expect that touch screens only
have axes inside the MT range.
2015-06-03 08:31:02 +10:00
Andreas Pokorny
fa5a113d11 udev: input_id - use direct property and mt axis for touch screen detection
A lot of touch screens use INPUT_PROP_DIRECT to indicate that touch input
maps directly to the underlying screen, while the BTN_TOUCH bit might not be
set.
2015-06-03 08:31:02 +10:00
Andreas Pokorny
15264e5aee udev: input_id - refactor device detection
This change switches to bools and separates bit flag evaluation from
decision making and application of udev properties, while hopefully
keeping the same semantics. Apart from using BTN_LEFT instead of BTN_MOUSE
for mouse detection.
2015-06-03 08:31:02 +10:00
Kay Sievers
2375607039 remove gudev and gtk-doc
The library moved to:
  https://git.gnome.org/browse/libgudev/
2015-06-03 00:22:53 +02:00
Thomas Hindoe Paaboel Andersen
7e518afab9 fix double semicolon typo 2015-06-02 23:29:20 +02:00
Kay Sievers
b30e7a269d hwdb: update 2015-06-02 20:19:31 +02:00
Marcel Holtmann
2fd51106ee hwdb: Update database of Bluetooth company identifiers 2015-06-02 19:04:11 +02:00
Tom Gundersen
8066f9e66b Merge pull request #12 from systemd-mailing-devs/1433236104-9967-1-git-send-email-m.olbrich@pengutronix.de
missing: add more btrfs defines
2015-06-02 18:45:16 +02:00
Tom Gundersen
28541a3d7c udev-builtin: path_id - don't pass NULL to udev_device_get_parent()
Being explicit about this makes the code easier to follow IMHO.
2015-06-02 18:12:47 +02:00
Tom Gundersen
3b64e4d4f4 udev: add some asserts
Mostly for documentation purposes.
2015-06-02 18:12:47 +02:00
Tom Gundersen
7283a80d10 sd-device: get_driver - remember if a device does not have a driver
Don't try to read it again.
2015-06-02 18:12:47 +02:00
Tom Gundersen
4189708ad0 sd-device: get_subsystem - don't complain if a device does not have a subsystem 2015-06-02 18:12:47 +02:00
Daniel Mack
d4cb023490 Merge pull request #5 from systemd-mailing-devs/1432910411-14517-1-git-send-email-llua@gmx.com
zsh-completion: a more style/tag aware _systemctl
2015-06-02 17:57:43 +02:00
Daniel Mack
ad2274289b Merge pull request #4 from systemd-mailing-devs/1431989131-25145-1-git-send-email-llua@gmx.com
zsh-completion: fix completion of --user services
2015-06-02 17:43:29 +02:00
Tom Gundersen
ea3db01418 Merge pull request #34 from systemd-mailing-devs/1432619328-32030-1-git-send-email-m.olbrich@pengutronix.de
missing: add more IFLA_VXLAN_* defines
2015-06-02 17:29:52 +02:00
Martin Pitt
9e89eb2478 Merge pull request #8 from systemd-mailing-devs/1433236059-9824-1-git-send-email-m.olbrich@pengutronix.de
random-util: guard including sys/auxv.h with the corresponding ifdef …
2015-06-02 17:24:34 +02:00
Daniel Mack
361d5b41a5 Merge pull request #39 from filbranden/manpages_rootprefix
Manpages rootprefix
2015-06-02 17:22:06 +02:00
Michael Biebl
dd33485025 build-sys: Normalize paths of configure options
Strip trailing slashes from options such as --with-rootprefix, so that building
with rootprefix="/" results in paths like "/lib" instead of "//lib".

Also handle paths such as "/usr/" gracefully.

Use m4/ax_normalize_path.m4 from the autoconf-archive project, which is now
included in our tree as per usual practices in using autoconf-archive macros.

Tested with the following configure options:
  ./configure \
        --with-rootprefix=/ \
        --with-rootlibdir=/lib64/ \
        --prefix=/usr/ \
        --libdir=/lib/ \
        --with-bashcompletiondir=/bash-completion/completions/

(The "prefix" and "libdir" are already automatically normalized by Autoconf,
this command is testing the others.)

Compared the config.log and resulting trees (in particular man pages) to
confirm double slashes were not present in the latter.

Also tested that a configuration using default options is not affected and that
`make distcheck` still works as expected.
2015-06-02 07:54:51 -07:00
Daniel Mack
7d2e33a416 man: replace hard-coded /usr/lib
Replace some /usr/lib occurences in man/ with &rootprefix;/lib.
2015-06-02 07:54:51 -07:00
Philip Withnall
ed817cd4e5 logind: Add a udev rule to tag all DRM cards with master-of-seat
This is needed for generic DRM devices like the VirtualBox vboxvideo
driver, which exposes itself as a generic, ID-less DRM device at
/dev/dri/card0 (after applying this commit):
   $ udevadm info --query=all --path \
      /sys/devices/pci0000:00/0000:00:02.0/drm/card0
   P: /devices/pci0000:00/0000:00:02.0/drm/card0
   N: dri/card0
   E: DEVNAME=/dev/dri/card0
   E: DEVPATH=/devices/pci0000:00/0000:00:02.0/drm/card0
   E: DEVTYPE=drm_minor
   E: ID_FOR_SEAT=drm-pci-0000_00_02_0
   E: ID_PATH=pci-0000:00:02.0
   E: ID_PATH_TAG=pci-0000_00_02_0
   E: MAJOR=226
   E: MINOR=0
   E: SUBSYSTEM=drm
   E: TAGS=:master-of-seat:seat:uaccess:
   E: USEC_INITIALIZED=59893

Without this patch, the capabilities for a seat on a VirtualBox
installation of systemd v219 incorrectly show it as non-graphical, even
though I can type these commands from an xterm:
   $ loginctl show-seat seat0
   Id=seat0
   CanMultiSession=yes
   CanTTY=yes
   CanGraphical=no
   …

https://bugs.freedesktop.org/show_bug.cgi?id=90822
2015-06-02 15:51:40 +01:00
Kay Sievers
12e55c7a60 Merge pull request #37 from haraldh/boot-options
90-loaderentry.install: fixup BOOT_OPTIONS
2015-06-02 16:28:28 +02:00
Harald Hoyer
6fd2ccc957 90-loaderentry.install: fixup BOOT_OPTIONS
better use "read -r -d '' -a" to read in the array. It handles multiple
lines and missing newline at the EOF.
2015-06-02 16:10:06 +02:00
Philip Withnall
41dfeaa194 logind: Save the user’s state when a session enters SESSION_ACTIVE
When (for example) switching from X11 to a new VT and logging in there,
creating a new session, the user state file (/run/systemd/users/$uid) is
not updated after the session becomes active. The latest time it is
saved is when the session is in SESSION_OPENING.

This results in a /run/systemd/users/$uid file which contains
STATE=online for the current user on the current active VT, which is
obviously wrong.

As functions like sd_uid_get_state() use this file to get the user’s
state, this could result in things like PolicyKit making incorrect
decisions about the user’s state. (See
https://bugs.freedesktop.org/show_bug.cgi?id=76358.)

Fix this by re-saving the state for a session’s user after completing
the state_job for that session.

https://bugs.freedesktop.org/show_bug.cgi?id=90818
2015-06-02 14:24:46 +01:00
Pablo Lezaeta Reyes [pˈaβ̞lo lˌe̞θaˈeta rˈejɛ]
6f54f5373a Separate the % sign from the number
In spanish the % sign is supposed to be separated from the number [1 and 2 both in spanish] so I separated the %% that draw the percentage sign from the number.

[1] http://www.fundeu.es/recomendacion/el-se-escribe-separado-de-la-cifra-a-la-que-acompana-802/
[2] http://aplica.rae.es/orweb/cgi-bin/v.cgi?i=QGkHLBzKcEgZrQyD

PD: I know that probably this is not the propper place but I don't know where submit the fix or if I do it right
2015-06-02 15:07:18 +02:00