diff options
Diffstat (limited to 'sys-auth/rtkit')
-rw-r--r-- | sys-auth/rtkit/Manifest | 9 | ||||
-rw-r--r-- | sys-auth/rtkit/files/rtkit-0.11-controlgroup.patch | 14 | ||||
-rw-r--r-- | sys-auth/rtkit/files/rtkit-0.11-gettime.patch | 21 | ||||
-rw-r--r-- | sys-auth/rtkit/files/rtkit-0.11-polkit.patch | 36 | ||||
-rw-r--r-- | sys-auth/rtkit/metadata.xml | 13 | ||||
-rw-r--r-- | sys-auth/rtkit/rtkit-0.11-r1.ebuild | 46 | ||||
-rw-r--r-- | sys-auth/rtkit/rtkit-0.11-r2.ebuild | 61 |
7 files changed, 200 insertions, 0 deletions
diff --git a/sys-auth/rtkit/Manifest b/sys-auth/rtkit/Manifest new file mode 100644 index 000000000000..cae06215d756 --- /dev/null +++ b/sys-auth/rtkit/Manifest @@ -0,0 +1,9 @@ +AUX rtkit-0.11-controlgroup.patch 528 SHA256 45049882dcfc7f6f0e29e1c720ff2cada6141f6df821721532f1570e06c21a65 SHA512 772504a9bd911189655bf7ec494ca954c5316357afd2599b1873e0525025fad77589edc965ff7a2b84365cf702ea9173a24ebe9e03f06d73f371bbe480e2b22e WHIRLPOOL 6887368704a6849d515c6e15f96fbe39c16f1427202b4d7fe98cd3c60f1a259ed967375cd294044b3bf159f1950f3a7cad51623445c967fc3db50a4bd2b5acbb +AUX rtkit-0.11-gettime.patch 744 SHA256 8e7f796228f334544544bf0bbd5db6095682a3776c5dbfd4a9a7565e866c6cd6 SHA512 b9207e1be512689e3896587105d135ab686d4eb1dd8c2e0feb62ca73eed2a8e1e473826e82b06bf240f26c64975b9793cd407cf6493a8f7eb6946da17198059c WHIRLPOOL d236a0695b2b1288e861be5a60ebc26af99d48727b05fb409ea3a49459d1dc5be0220f8c2335f3d7ead64e278bda36925d44ae23108dc72c8d81d39f374dee7f +AUX rtkit-0.11-polkit.patch 2074 SHA256 80f33894e4eb2130460d7160f1a309c3497a235a3ec6f9e5d088b00cb1667b11 SHA512 cc4cb9879235398f828c16951e380e0456c9e5bbd5acc2a0968153c5ce361fd1aceeeeac8ab873c21c0556c5d4677cdad8ed9e23dd3b9b5a8a73cf9264ee5a4b WHIRLPOOL 1a5170423876ccc178c99a959212a5a352d7fa92bae0c1e3e9f6bae6f5603cc6c6013bba681eb7d09fc1d825aea550417706cacef6499c9caac21c15e128caff +DIST rtkit-0.11.tar.xz 126748 SHA256 68859108cff6410901502b58365eb7607da37110a06b837762f771735f58acd0 SHA512 4641af965dc64c0f498ae469fbee1ceb337204fa7d778fbbb41f2b5c5e88947e633c7e9ad037274fdd778c3c097a4a1dbb0b2add287d74eccbcd2d357cb2da22 WHIRLPOOL 7036f2811aeef28dd7680f24fcf16e2cf8708937d86a0dfcd1411fcae469be3fe673b12dc640f9cda9be951ab2879f2b7ec2374577e7a0b532c59d8abde176b5 +EBUILD rtkit-0.11-r1.ebuild 950 SHA256 82eef9922d29e0ff309bd88b1d8d368e4d8bb9b59397629e4bd4237608e21687 SHA512 7ea241a9f99d42c0af9873b1c6549f9ac7f90076944f93734974d1c39dc9c1e96c09e70b8a1c1f3739352fefe4800ca626ac45cf7e8cf7f6d0bfe302ccdcbc0a WHIRLPOOL 7b4e294de64e5b40555d487f7e56afbd2eaa73e8192c0a2431f9bf2dd4b8a992df4c1af1d75c5dab8ef9d0122a6aa00b27a229e0be9cba4f3574f0cbb3942faa +EBUILD rtkit-0.11-r2.ebuild 1346 SHA256 718b86538687a11904f51afcee5f1a3126fb788407ab496d9fa2294610fed2d4 SHA512 e4d59e83254681f0813a8975d85267ae8c0dc33ccc22f7ab7f018a21fe935acc94658559aaba4fa6e2dbc65b8d072024158a7666bd02773f2e8746515b7ae424 WHIRLPOOL ef58dadb81a4eea89f6702f006496f6d0237977a3ad54ef9f06e3594f8d90743a3519c723510a9d60d0d953217d2f72be654101c4d481a93326359ffad2fd2a1 +MISC ChangeLog 4717 SHA256 827d03d004de1624a763e4acc1f777533a0a7354ab2e2af7449a857e5968556a SHA512 a5681594df5dcf6b87d7154c46830e823ad13deb49f4ff455df0fdb1b630eb237742f30dbe4536412545df64e3121b46ed35812f7856ea16ad2928e6805e8754 WHIRLPOOL 68ebdb11dde75b2e8d76a40eaa9d942d52ab7f7b15188a130ec1fb79ada0e300abee9385ab4ff1da3624463f96fa3e109adc600afeb7735447cb15efbdb0cd16 +MISC ChangeLog-2015 5449 SHA256 5bc415edbbb8a18930c939863de6212af6410d2df0041b931897369774c1e514 SHA512 2a6d476e1ad14b8681bf4ff7f997dfc4f934d07e28f8032705d5960325094dce09fea18b3bbc6566ebca7edb90bcbd19f03bc1daf938a3784dd5217d1b7a2099 WHIRLPOOL bab1e798b7b5ddce4e1d1562234130753168f29041ef627d366d70187935497e708bc1623571e6bce23304b1f987aa8607170a340b497c55c93846cf8c45c6d5 +MISC metadata.xml 455 SHA256 e9eb467895d6dd0a3d58f484f78acac159067e422beaea2304e381bd130a952a SHA512 90bde656e242fe6cd7b408671f419ee54f73a781b67ee9047c8cd06d7fb29fee2882aed7ab95b42f22fdb65570f389e04931f8fa24506307b1bc8387c213850e WHIRLPOOL abb79c949c97c96c63c27f835574cbdb166ca14b8e4cd321e6bd8cd50e1ee7962837f5509783b4bd0b7435824b78c17a17e893fbb42329fa81aee07ea98c2903 diff --git a/sys-auth/rtkit/files/rtkit-0.11-controlgroup.patch b/sys-auth/rtkit/files/rtkit-0.11-controlgroup.patch new file mode 100644 index 000000000000..7a36deeeae7b --- /dev/null +++ b/sys-auth/rtkit/files/rtkit-0.11-controlgroup.patch @@ -0,0 +1,14 @@ +diff --git rtkit-0.11/rtkit-daemon.service.in~ rtkit-0.11/rtkit-daemon.service.in +index 3dfefa6..d0dc786 100644 +--- rtkit-0.11/rtkit-daemon.service.in~ ++++ rtkit-0.11/rtkit-daemon.service.in +@@ -27,9 +27,5 @@ CapabilityBoundingSet=CAP_SYS_NICE CAP_DAC_READ_SEARCH CAP_SYS_PTRACE CAP_SYS_CH + PrivateTmp=yes + PrivateNetwork=yes + +-# Work around the fact that the Linux currently doesn't assign any RT +-# budget to CPU control groups that have none configured explicitly +-ControlGroup=cpu:/ +- + [Install] + WantedBy=graphical.target diff --git a/sys-auth/rtkit/files/rtkit-0.11-gettime.patch b/sys-auth/rtkit/files/rtkit-0.11-gettime.patch new file mode 100644 index 000000000000..43732081386e --- /dev/null +++ b/sys-auth/rtkit/files/rtkit-0.11-gettime.patch @@ -0,0 +1,21 @@ +From: Lennart Poettering <lennart@poettering.net> +Date: Thu, 26 Sep 2013 19:52:58 +0000 (+0200) +Subject: build-sys: since clock_gettime() moved to libc use mq_open to check for librt +X-Git-Url: http://git.0pointer.de/?p=rtkit.git;a=commitdiff_plain;h=d550837387e4185ebcde1023702580e35eb441e7 + +build-sys: since clock_gettime() moved to libc use mq_open to check for librt +--- + +diff --git a/configure.ac b/configure.ac +index 5a77363..62c17f5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -111,7 +111,7 @@ CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + CC="$PTHREAD_CC" + + AC_SEARCH_LIBS([sched_setscheduler], [rt]) +-AC_SEARCH_LIBS([clock_gettime], [rt]) ++AC_SEARCH_LIBS([mq_open], [rt]) + AC_SEARCH_LIBS([cap_init], [cap]) + + PKG_CHECK_MODULES(DBUS, dbus-1) diff --git a/sys-auth/rtkit/files/rtkit-0.11-polkit.patch b/sys-auth/rtkit/files/rtkit-0.11-polkit.patch new file mode 100644 index 000000000000..ad489c466184 --- /dev/null +++ b/sys-auth/rtkit/files/rtkit-0.11-polkit.patch @@ -0,0 +1,36 @@ +X-Git-Url: http://git.0pointer.de/?p=rtkit.git;a=blobdiff_plain;f=rtkit-daemon.c;h=3ecc1f7840a0d9bdd3af7f08933c4a62546094eb;hp=2ebe673309315f16bc2bc2e0c51a556fb215bc51;hb=88d4082ef6caf6b071d749dca1c50e7edde914cc;hpb=e86e04865ebc1a92c8fa3007843ebcf9c8fa4c05 + +diff --git a/rtkit-daemon.c b/rtkit-daemon.c +index 2ebe673..3ecc1f7 100644 +--- a/rtkit-daemon.c ++++ b/rtkit-daemon.c +@@ -1170,12 +1170,14 @@ static int verify_polkit(DBusConnection *c, struct rtkit_user *u, struct process + DBusMessage *m = NULL, *r = NULL; + const char *unix_process = "unix-process"; + const char *pid = "pid"; ++ const char *uid = "uid"; + const char *start_time = "start-time"; + const char *cancel_id = ""; + uint32_t flags = 0; + uint32_t pid_u32 = p->pid; +- uint64_t start_time_u64 = p->starttime; ++ uint32_t uid_u32 = (uint32_t)u->uid; + DBusMessageIter iter_msg, iter_struct, iter_array, iter_dict, iter_variant; ++ uint64_t start_time_u64 = p->starttime; + int ret; + dbus_bool_t authorized = FALSE; + +@@ -1206,6 +1208,13 @@ static int verify_polkit(DBusConnection *c, struct rtkit_user *u, struct process + assert_se(dbus_message_iter_close_container(&iter_dict, &iter_variant)); + assert_se(dbus_message_iter_close_container(&iter_array, &iter_dict)); + ++ assert_se(dbus_message_iter_open_container(&iter_array, DBUS_TYPE_DICT_ENTRY, NULL, &iter_dict)); ++ assert_se(dbus_message_iter_append_basic(&iter_dict, DBUS_TYPE_STRING, &uid)); ++ assert_se(dbus_message_iter_open_container(&iter_dict, DBUS_TYPE_VARIANT, "u", &iter_variant)); ++ assert_se(dbus_message_iter_append_basic(&iter_variant, DBUS_TYPE_UINT32, &uid_u32)); ++ assert_se(dbus_message_iter_close_container(&iter_dict, &iter_variant)); ++ assert_se(dbus_message_iter_close_container(&iter_array, &iter_dict)); ++ + assert_se(dbus_message_iter_close_container(&iter_struct, &iter_array)); + assert_se(dbus_message_iter_close_container(&iter_msg, &iter_struct)); + diff --git a/sys-auth/rtkit/metadata.xml b/sys-auth/rtkit/metadata.xml new file mode 100644 index 000000000000..7aca23bace0b --- /dev/null +++ b/sys-auth/rtkit/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>marecki@gentoo.org</email> + <name>Marek Szuba</name> + </maintainer> + <longdescription lang="en"> + RealtimeKit is a DBus service that provides applications with an interface + to escalate their priority to realtime, without any special setup in + rlimits, etc. + </longdescription> +</pkgmetadata> diff --git a/sys-auth/rtkit/rtkit-0.11-r1.ebuild b/sys-auth/rtkit/rtkit-0.11-r1.ebuild new file mode 100644 index 000000000000..dec2005a9526 --- /dev/null +++ b/sys-auth/rtkit/rtkit-0.11-r1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils systemd user autotools + +DESCRIPTION="Realtime Policy and Watchdog Daemon" +HOMEPAGE="http://0pointer.de/blog/projects/rtkit" +SRC_URI="http://0pointer.de/public/${P}.tar.xz" + +LICENSE="GPL-3 BSD" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~sh sparc x86" +IUSE="" + +RDEPEND=" + sys-apps/dbus + sys-auth/polkit + sys-libs/libcap +" +DEPEND="${RDEPEND}" + +pkg_setup() { + enewgroup rtkit + enewuser rtkit -1 -1 -1 "rtkit" +} + +src_prepare() { + # Fedora patches + epatch "${FILESDIR}"/${P}-polkit.patch + epatch "${FILESDIR}"/${P}-gettime.patch + epatch "${FILESDIR}"/${P}-controlgroup.patch + eautoreconf +} + +src_configure() { + econf $(systemd_with_unitdir) +} + +src_install() { + default + + ./rtkit-daemon --introspect > org.freedesktop.RealtimeKit1.xml + insinto /usr/share/dbus-1/interfaces + doins org.freedesktop.RealtimeKit1.xml +} diff --git a/sys-auth/rtkit/rtkit-0.11-r2.ebuild b/sys-auth/rtkit/rtkit-0.11-r2.ebuild new file mode 100644 index 000000000000..14157fe384cb --- /dev/null +++ b/sys-auth/rtkit/rtkit-0.11-r2.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils systemd user autotools linux-info + +DESCRIPTION="Realtime Policy and Watchdog Daemon" +HOMEPAGE="http://0pointer.de/blog/projects/rtkit" +SRC_URI="http://0pointer.de/public/${P}.tar.xz" + +LICENSE="GPL-3 BSD" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~ppc ~ppc64 ~sh ~sparc x86" +IUSE="" + +RDEPEND=" + sys-apps/dbus + sys-auth/polkit + sys-libs/libcap +" +DEPEND="${RDEPEND}" + +PATCHES=( + # Fedora patches + "${FILESDIR}/${P}-polkit.patch" + "${FILESDIR}/${P}-gettime.patch" + "${FILESDIR}/${P}-controlgroup.patch" +) + +pkg_pretend() { + if use kernel_linux; then + CONFIG_CHECK="~!RT_GROUP_SCHED" + ERROR_RT_GROUP_SCHED="CONFIG_RT_GROUP_SCHED is enabled. rtkit-daemon (or any other " + ERROR_RT_GROUP_SCHED+="real-time task) will not work unless run as root. Please consider " + ERROR_RT_GROUP_SCHED+="unsetting this option." + check_extra_config + fi +} + +pkg_setup() { + enewgroup rtkit + enewuser rtkit -1 -1 -1 "rtkit" +} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" +} + +src_install() { + default + + ./rtkit-daemon --introspect > org.freedesktop.RealtimeKit1.xml + insinto /usr/share/dbus-1/interfaces + doins org.freedesktop.RealtimeKit1.xml +} |