commit: 8f8e9edcf9e2fe40aef8246bee1ada6b979a96bc Author: Craig Andrews <candrews <AT> gentoo <DOT> org> AuthorDate: Sun May 13 01:51:07 2018 +0000 Commit: Craig Andrews <candrews <AT> gentoo <DOT> org> CommitDate: Sun May 13 01:51:43 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f8e9edc
app-admin/needrestart: Fix detection of Gentoo kernels https://github.com/liske/needrestart/pull/113 Closes: https://bugs.gentoo.org/654958 Package-Manager: Portage-2.3.36, Repoman-2.3.9 .../needrestart-3.1-gentoo-kernel-detection.patch | 24 ++++++++++++ app-admin/needrestart/needrestart-3.1-r1.ebuild | 45 ++++++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/app-admin/needrestart/files/needrestart-3.1-gentoo-kernel-detection.patch b/app-admin/needrestart/files/needrestart-3.1-gentoo-kernel-detection.patch new file mode 100644 index 00000000000..6b8c221098b --- /dev/null +++ b/app-admin/needrestart/files/needrestart-3.1-gentoo-kernel-detection.patch @@ -0,0 +1,24 @@ +From bbd98c32fb5d33f42d1b9257f55a07d62b8de164 Mon Sep 17 00:00:00 2001 +From: Craig Andrews <candr...@integralblue.com> +Date: Mon, 7 May 2018 11:28:33 -0400 +Subject: [PATCH] [Kernel] Include /boot/kernel* while looking for linux kernel + images + +Fixes kernel detection on Gentoo +--- + perl/lib/NeedRestart/Kernel/Linux.pm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/perl/lib/NeedRestart/Kernel/Linux.pm b/perl/lib/NeedRestart/Kernel/Linux.pm +index 6f284f3..69a919c 100644 +--- a/perl/lib/NeedRestart/Kernel/Linux.pm ++++ b/perl/lib/NeedRestart/Kernel/Linux.pm +@@ -131,7 +131,7 @@ sub nr_kernel_check_real($$) { + } grep { + # filter initrd images + (!m@^/boot/init@); +- } (</boot/vmlinu*>, </boot/*.img>); ++ } (</boot/vmlinu*>, </boot/*.img>, </boot/kernel*>); + + $ui->progress_prep(scalar keys %kfiles, __ 'Scanning linux images...'); + diff --git a/app-admin/needrestart/needrestart-3.1-r1.ebuild b/app-admin/needrestart/needrestart-3.1-r1.ebuild new file mode 100644 index 00000000000..d3e017750bd --- /dev/null +++ b/app-admin/needrestart/needrestart-3.1-r1.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/liske/${PN}.git" + inherit git-r3 + SRC_URI="" + KEYWORDS="" +else + SRC_URI="https://github.com/liske/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="Restart daemons after library updates" +HOMEPAGE="https://fiasko-nw.net/~thomas/tag/needrestart.html https://github.com/liske/needrestart" + +SLOT="0" +LICENSE="GPL-2+" + +RDEPEND=" + >=sys-apps/sed-4.2.2 + dev-lang/perl:= + dev-perl/libintl-perl + dev-perl/Module-Find + dev-perl/Module-ScanDeps + dev-perl/Proc-ProcessTable + dev-perl/Sort-Naturally + dev-perl/TermReadKey + sys-apps/init-system-helpers +" +DEPEND="${RDEPEND} + sys-devel/gettext +" + +PATCHES=( + "${FILESDIR}/${P}-gentoo-kernel-detection.patch" +) + +src_install() { + default + doman man/*.1 + dodoc -r ex +}