commit:     54dea0df66ba2fd29542d6fb59aff5afaf034eb3
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 16 20:33:26 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Mon Apr 16 20:33:26 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54dea0df

sys-apps/init-system-helpers: Revbump to remove OpenRC symlink mgmt

This function is just insane letting a script try to manage started
instead of letting the init system handle it

Closes: https://bugs.gentoo.org/641836
Closes: https://bugs.gentoo.org/649014
Package-Manager: Portage-2.3.28, Repoman-2.3.9

 .../files/revert-openrc-management.patch           | 32 ++++++++++++++++++++++
 .../init-system-helpers-1.49-r1.ebuild             | 29 ++++++++++++++++++++
 2 files changed, 61 insertions(+)

diff --git a/sys-apps/init-system-helpers/files/revert-openrc-management.patch 
b/sys-apps/init-system-helpers/files/revert-openrc-management.patch
new file mode 100644
index 00000000000..49b4916fab3
--- /dev/null
+++ b/sys-apps/init-system-helpers/files/revert-openrc-management.patch
@@ -0,0 +1,32 @@
+--- a/script/service
++++ b/script/service
+@@ -159,23 +160,6 @@ run_via_sysvinit() {
+    fi
+ }
+ 
+-update_openrc_started_symlinks() {
+-   # maintain the symlinks of /run/openrc/started so that
+-   # rc-status works with the service command as well
+-   if [ -d /run/openrc/started ] ; then
+-      case "${ACTION}" in
+-      start)
+-         if [ ! -h /run/openrc/started/$SERVICE ] ; then
+-            ln -s $SERVICEDIR/$SERVICE /run/openrc/started/$SERVICE || true
+-         fi
+-      ;;
+-      stop)
+-         rm /run/openrc/started/$SERVICE || true
+-      ;;
+-      esac
+-   fi
+-}
+-
+ # When this machine is running systemd, standard service calls are turned into
+ # systemctl calls.
+ if [ -n "$is_systemd" ]
+@@ -210,5 +228,4 @@ then
+    esac
+ fi
+ 
+-update_openrc_started_symlinks
+ run_via_sysvinit

diff --git a/sys-apps/init-system-helpers/init-system-helpers-1.49-r1.ebuild 
b/sys-apps/init-system-helpers/init-system-helpers-1.49-r1.ebuild
new file mode 100644
index 00000000000..23885a965ed
--- /dev/null
+++ b/sys-apps/init-system-helpers/init-system-helpers-1.49-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Helper scripts useful for both OpenRC and systemd"
+HOMEPAGE="https://packages.debian.org/sid/init-system-helpers";
+# git repo: https://anonscm.debian.org/git/collab-maint/init-system-helpers.git
+SRC_URI="http://http.debian.net/debian/pool/main/i/${PN}/${PN}_${PV}.tar.xz";
+
+LICENSE="BSD GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="!<sys-apps/openrc-0.33"
+
+PATCHES=( "${FILESDIR}/revert-openrc-management.patch" )
+
+src_install() {
+       # We only care about 'service' script/manpage:
+       exeinto /sbin/
+       doexe script/service
+
+       # FIXME: need to patch to remove *rc.d references, which we don't ship
+       # And should probably add a list of supported options (e.g., 
start/stop/etc.)
+       doman man8/service.8
+}

Reply via email to