diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2018-12-25 21:49:36 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2018-12-25 22:23:20 +0100 |
commit | 9c90a731e9a00e9af8c86331a45e0348babfde7c (patch) | |
tree | 4bbdc8c36eb91fa8d98524e9e7937dce1a047c91 /kde-frameworks/kinit | |
parent | kde-apps/libkexiv2: Fix build with >=exiv2-0.27 (diff) | |
download | gentoo-9c90a731e9a00e9af8c86331a45e0348babfde7c.tar.gz gentoo-9c90a731e9a00e9af8c86331a45e0348babfde7c.tar.bz2 gentoo-9c90a731e9a00e9af8c86331a45e0348babfde7c.zip |
kde-frameworks/kinit: Fix startup delay w/ systemd-240
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-frameworks/kinit')
-rw-r--r-- | kde-frameworks/kinit/files/kinit-5.53.0-systemd-240-soft-rlimit.patch | 27 | ||||
-rw-r--r-- | kde-frameworks/kinit/kinit-5.53.0-r1.ebuild | 47 |
2 files changed, 74 insertions, 0 deletions
diff --git a/kde-frameworks/kinit/files/kinit-5.53.0-systemd-240-soft-rlimit.patch b/kde-frameworks/kinit/files/kinit-5.53.0-systemd-240-soft-rlimit.patch new file mode 100644 index 000000000000..3f8823d5b2d5 --- /dev/null +++ b/kde-frameworks/kinit/files/kinit-5.53.0-systemd-240-soft-rlimit.patch @@ -0,0 +1,27 @@ +From 26620aef0bd6d01b543e7523dd15dddc1bb871df Mon Sep 17 00:00:00 2001 +From: Oswald Buddenhagen <ossi@kde.org> +Date: Mon, 24 Dec 2018 14:43:23 +0100 +Subject: use soft rlimit for number of open handles + +systemd 240 bumped the hard limit from the previous 4k (?) to 1G, which +makes kdeinit essentially lock up at startup. +to get around that, use the soft limit, which matches fd_setsize (1k). +--- + src/kdeinit/kinit.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/kdeinit/kinit.cpp b/src/kdeinit/kinit.cpp +index 748bfca..02ab794 100644 +--- a/src/kdeinit/kinit.cpp ++++ b/src/kdeinit/kinit.cpp +@@ -165,7 +165,7 @@ static void cleanup_fds() + int maxfd = FD_SETSIZE; + struct rlimit rl; + if (getrlimit(RLIMIT_NOFILE, &rl) == 0) { +- maxfd = rl.rlim_max; ++ maxfd = rl.rlim_cur; + } + for (int fd = 3; fd < maxfd; ++fd) { + #if KDEINIT_OOM_PROTECT +-- +cgit v1.1 diff --git a/kde-frameworks/kinit/kinit-5.53.0-r1.ebuild b/kde-frameworks/kinit/kinit-5.53.0-r1.ebuild new file mode 100644 index 000000000000..910c3df5286b --- /dev/null +++ b/kde-frameworks/kinit/kinit-5.53.0-r1.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +KDE_QTHELP="false" +KDE_TEST="false" +inherit kde5 + +DESCRIPTION="Helper library to speed up start of applications on KDE work spaces" +LICENSE="LGPL-2+" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" +IUSE="+caps +man X" + +RDEPEND=" + $(add_frameworks_dep kconfig) + $(add_frameworks_dep kcoreaddons) + $(add_frameworks_dep kcrash) + $(add_frameworks_dep ki18n) + $(add_frameworks_dep kio) + $(add_frameworks_dep kservice) + $(add_frameworks_dep kwindowsystem) + $(add_qt_dep qtdbus) + $(add_qt_dep qtgui) + caps? ( sys-libs/libcap ) + X? ( + x11-libs/libX11 + x11-libs/libxcb + ) +" +DEPEND="${RDEPEND} + man? ( $(add_frameworks_dep kdoctools) ) + X? ( x11-base/xorg-proto ) +" + +PATCHES=( "${FILESDIR}/${P}-systemd-240-soft-rlimit.patch" ) + +src_configure() { + local mycmakeargs=( + $(cmake-utils_use_find_package caps Libcap) + $(cmake-utils_use_find_package man KF5DocTools) + $(cmake-utils_use_find_package X X11) + $(cmake-utils_use_find_package X XCB) + ) + + kde5_src_configure +} |