summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-auth/rtkit
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-auth/rtkit')
-rw-r--r--sys-auth/rtkit/Manifest1
-rw-r--r--sys-auth/rtkit/files/rtkit-0.11-controlgroup.patch14
-rw-r--r--sys-auth/rtkit/files/rtkit-0.11-gettime.patch21
-rw-r--r--sys-auth/rtkit/files/rtkit-0.11-polkit.patch36
-rw-r--r--sys-auth/rtkit/metadata.xml12
-rw-r--r--sys-auth/rtkit/rtkit-0.11-r1.ebuild49
6 files changed, 133 insertions, 0 deletions
diff --git a/sys-auth/rtkit/Manifest b/sys-auth/rtkit/Manifest
new file mode 100644
index 000000000000..fa3e050092d3
--- /dev/null
+++ b/sys-auth/rtkit/Manifest
@@ -0,0 +1 @@
+DIST rtkit-0.11.tar.xz 126748 SHA256 68859108cff6410901502b58365eb7607da37110a06b837762f771735f58acd0 SHA512 4641af965dc64c0f498ae469fbee1ceb337204fa7d778fbbb41f2b5c5e88947e633c7e9ad037274fdd778c3c097a4a1dbb0b2add287d74eccbcd2d357cb2da22 WHIRLPOOL 7036f2811aeef28dd7680f24fcf16e2cf8708937d86a0dfcd1411fcae469be3fe673b12dc640f9cda9be951ab2879f2b7ec2374577e7a0b532c59d8abde176b5
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..ec4b7a19ff7d
--- /dev/null
+++ b/sys-auth/rtkit/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </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..b75139a48e9a
--- /dev/null
+++ b/sys-auth/rtkit/rtkit-0.11-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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="${DEPEND}
+ app-arch/xz-utils
+"
+
+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
+}