Lennart Poettering 6c55f71
Name:             rtkit
Lennart Poettering f5521fd
Version:          0.11
736d796
# -b is needed because of https://pagure.io/fedora-infra/rpmautospec/issue/228
736d796
# Remove if the version is ever bumped (or rpmautospec fixed).
7cd76a2
Release:          %autorelease -b18
Lennart Poettering 6c55f71
Summary:          Realtime Policy and Watchdog Daemon
884bb79
# The daemon itself is GPLv3+, the reference implementation for the client BSD
Lennart Poettering 6c55f71
License:          GPLv3+ and BSD
a6d4701
URL:              http://git.0pointer.net/rtkit.git/
Lennart Poettering 6c55f71
Requires:         dbus
Lennart Poettering 6c55f71
Requires:         polkit
3631c04
BuildRequires:    make
3631c04
BuildRequires:    systemd-devel
Lennart Poettering 6c55f71
BuildRequires:    dbus-devel >= 1.2
Lennart Poettering 6c55f71
BuildRequires:    libcap-devel
Lennart Poettering 6c55f71
BuildRequires:    polkit-devel
Colin Walters 718384f
BuildRequires:    autoconf automake libtool
Lennart Poettering f5521fd
Source0:          http://0pointer.de/public/%{name}-%{version}.tar.xz
4b4a0a5
Patch:            rtkit-mq_getattr.patch
4b4a0a5
Patch:            0001-SECURITY-Pass-uid-of-caller-to-polkit.patch
4b4a0a5
Patch:            rtkit-controlgroup.patch
884bb79
09b7a3d
# Temporarily disable -Werror=format-security since it breaks the build
4b4a0a5
Patch:            format-security.patch
09b7a3d
4b4a0a5
Patch:            0001-Fix-borked-error-check.patch
4b4a0a5
Patch:            0001-systemd-update-sd-daemon.-ch.patch
4b4a0a5
Patch:            0002-Remove-bundled-copy-of-sd-daemon.-ch.patch
4b4a0a5
4b4a0a5
Patch:            remove-debug-messages.patch
df3e998
884bb79
%description
884bb79
RealtimeKit is a D-Bus system service that changes the
884bb79
scheduling policy of user processes/threads to SCHED_RR (i.e. realtime
884bb79
scheduling mode) on request. It is intended to be used as a secure
884bb79
mechanism to allow real-time scheduling to be used by normal user
884bb79
processes.
884bb79
884bb79
%prep
df3e998
%autosetup -p1
884bb79
884bb79
%build
Colin Walters 718384f
autoreconf -fvi
3631c04
%configure --with-systemdsystemunitdir=%{_unitdir}
3631c04
%make_build
884bb79
./rtkit-daemon --introspect > org.freedesktop.RealtimeKit1.xml
884bb79
884bb79
%install
ea580e4
%make_install
ea580e4
install -Dm0644 org.freedesktop.RealtimeKit1.xml %{buildroot}%{_datadir}/dbus-1/interfaces/org.freedesktop.RealtimeKit1.xml
884bb79
884bb79
%pre
b17c07c
getent group rtkit >/dev/null 2>&1 || groupadd \
b17c07c
        -r \
Lennart Poettering 6c55f71
        -g 172 \
Lennart Poettering 6c55f71
        rtkit
b17c07c
getent passwd rtkit >/dev/null 2>&1 || useradd \
b17c07c
        -r -l \
Lennart Poettering 6c55f71
        -u 172 \
Lennart Poettering 6c55f71
        -g rtkit \
b17c07c
        -d /proc \
Lennart Poettering 6c55f71
        -s /sbin/nologin \
b17c07c
        -c "RealtimeKit" \
Lennart Poettering 6c55f71
        rtkit
b17c07c
:;
884bb79
884bb79
%post
Lennart Poettering b3931dc
%systemd_post rtkit-daemon.service
884bb79
dbus-send --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig >/dev/null 2>&1 || :
cc8ec4c
cc8ec4c
%preun
Lennart Poettering b3931dc
%systemd_preun rtkit-daemon.service
884bb79
Lennart Poettering 6c55f71
%postun
f43504e
%systemd_postun_with_restart rtkit-daemon.service
Lennart Poettering 6c55f71
884bb79
%files
884bb79
%doc README GPL LICENSE rtkit.c rtkit.h
884bb79
%attr(0755,root,root) %{_sbindir}/rtkitctl
884bb79
%attr(0755,root,root) %{_libexecdir}/rtkit-daemon
884bb79
%{_datadir}/dbus-1/system-services/org.freedesktop.RealtimeKit1.service
884bb79
%{_datadir}/dbus-1/interfaces/org.freedesktop.RealtimeKit1.xml
884bb79
%{_datadir}/polkit-1/actions/org.freedesktop.RealtimeKit1.policy
b17c07c
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.RealtimeKit1.conf
Lennart Poettering f5521fd
%{_prefix}/lib/systemd/system/rtkit-daemon.service
b17c07c
%{_mandir}/man8/*
884bb79
884bb79
%changelog
b62d8bb
%autochangelog