Lennart Poettering 6c55f71
Name:             rtkit
Lennart Poettering f5521fd
Version:          0.11
174340c
# -b is needed because of https://pagure.io/fedora-infra/rpmautospec/issue/228
174340c
# Remove if the version is ever bumped (or rpmautospec fixed).
6d1164c
Release:          %autorelease -b17
Lennart Poettering 6c55f71
Summary:          Realtime Policy and Watchdog Daemon
14d5d86
# The daemon itself is GPLv3+, the reference implementation for the client MIT
14d5d86
# The LICENSE file incorrectly states that the client is under BSD.
14d5d86
License:          GPL-3.0-or-later AND MIT
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
94bd84e
BuildRequires:    systemd-rpm-macros
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
94bd84e
%{?sysusers_requires_compat}
Lennart Poettering f5521fd
Source0:          http://0pointer.de/public/%{name}-%{version}.tar.xz
94bd84e
Source1:          rtkit.sysusers
facd063
Patch:            rtkit-mq_getattr.patch
facd063
Patch:            0001-SECURITY-Pass-uid-of-caller-to-polkit.patch
facd063
Patch:            rtkit-controlgroup.patch
884bb79
09b7a3d
# Temporarily disable -Werror=format-security since it breaks the build
facd063
Patch:            format-security.patch
09b7a3d
facd063
Patch:            0001-Fix-borked-error-check.patch
facd063
Patch:            0001-systemd-update-sd-daemon.-ch.patch
facd063
Patch:            0002-Remove-bundled-copy-of-sd-daemon.-ch.patch
facd063
facd063
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
94bd84e
install -Dpm 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/rtkit.conf
884bb79
884bb79
%pre
94bd84e
%sysusers_create_compat %{SOURCE1}
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/*
94bd84e
%{_sysusersdir}/rtkit.conf
884bb79
884bb79
%changelog
fe9531d
%autochangelog