1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-07 09:56:51 +03:00
Commit Graph

11 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
7c67f0f71a rpm: add user macros 2014-10-27 22:34:09 -04:00
Lennart Poettering
0e77023ea0 sysusers: add a new RPM macro for creating users directly from data passed in via stdin
This allows encoding users to create directly in %pre, which is
necessary so that files owned by the RPM can be assigned to the right
users/groups.

This new macro does create a redundancy, as user definitions for all
users that shall own files need to to be listed twice, once with this
new macro, and then secondly, in the sysusers file shipped with the
package. But there's little way around that, as the users of this type
need to exist before we install the first file, but we actually want to
ship the user information in a file.
2014-08-19 02:16:27 +02:00
Lennart Poettering
b532bdeae9 rpm: add RPM macros to apply sysusers, sysctl, and binfmt drop-ins
With this in place RPMs can make sure that whatever they drop in is
immeidately applied, and not delayed until next reboot.

This also moves systemd-sysusers back to /usr/bin, since hardcoding the
path to /usr/lib in the macros would mean compatibility breaks in
future, should we turn sysusers into a command that is actually OK for
people to call directly. And given that that is quite likely to happen
(since it is useful to prepare images with its --root= switch), let's
just prepare for it.
2014-06-13 20:11:59 +02:00
Lennart Poettering
8cf7c96517 rpm: don't hardcode the binary paths in the macros, rely on $PATH
this gives us a little bit more freedom to move things around later on,
as we don't hardcode the systemd paths in old RPMs that shall work with
new systemds.
2014-06-13 20:11:59 +02:00
Lennart Poettering
042e33ae3a rpm: add RPM macro for creating tmpfiles entries after package installation 2013-07-16 18:54:03 +02:00
Lennart Poettering
ed8086d119 rpm: define a %_userunitdir macro 2013-06-17 18:37:25 +02:00
Michael Biebl
f432bb9144 Move udevadm to rootbindir
The udevadm utility is needed during early boot, so move it to
rootbindir to support split-/usr configurations.
2013-03-11 07:18:33 +01:00
Zbigniew Jędrzejewski-Szmek
0a496c9836 rpm: udevadm is actually in bindir 2012-11-16 23:29:56 +01:00
Lennart Poettering
1b0fcd7411 rpm: update RPM macros to include definitions for more drop-in directories and for reloading/rebuilding configuration
More specifically this adds a number of macros that resolve to
directories for udev rules, hwdb entries, tmpfiles and sysctl.

Thsi also includes three new macros for rebuilding the hwbd/catalog
index when a package drops in new files
2012-11-16 20:07:14 +01:00
Lennart Poettering
a1d41e17a5 rpm: expose preset dir as rpm macro and in systemd.pc 2012-09-13 22:17:46 +02:00
Lennart Poettering
590f18a27c rpm: include RPM macro definition for .spec snippets
Let's try to standardize a bit the RPM macros used for
installing/uninstalling services.

This only covers the non-SysV compat bits, since that tends to vary
widely between the various distros.

Usage:

Add %{?systemd_requires} to the header of the spec file. And then:

%post
%systemd_post foobar.service

%preun
%systemd_preun foobar.service

%postun
%systemd_postun foobar.service

And, instead of the latter, in case the service shall be restarted on updates:

%postun
%systemd_postun_restart foobar.service
2012-06-21 22:14:17 +02:00