public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/runit/
Date: Fri, 23 Aug 2024 07:28:09 +0000 (UTC)	[thread overview]
Message-ID: <1724398068.882bdce53c742f514ef027966c206a6c83a0e7a4.sam@gentoo> (raw)

commit:     882bdce53c742f514ef027966c206a6c83a0e7a4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 23 07:26:39 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Aug 23 07:27:48 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=882bdce5

sys-process/runit: naive EAPI 8 port

... without fixing anything else other than ebuild QA issues, as we
want to allow the EAPI 6 banning to go ahead in a few days.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...runit-2.1.2-r1.ebuild => runit-2.1.2-r4.ebuild} | 52 +++++++++++-----------
 1 file changed, 25 insertions(+), 27 deletions(-)

diff --git a/sys-process/runit/runit-2.1.2-r1.ebuild b/sys-process/runit/runit-2.1.2-r4.ebuild
similarity index 67%
rename from sys-process/runit/runit-2.1.2-r1.ebuild
rename to sys-process/runit/runit-2.1.2-r4.ebuild
index 2250a85f21de..9cf5b122ca2e 100644
--- a/sys-process/runit/runit-2.1.2-r1.ebuild
+++ b/sys-process/runit/runit-2.1.2-r4.ebuild
@@ -1,13 +1,14 @@
 # Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=8
 
 inherit toolchain-funcs flag-o-matic
 
 DESCRIPTION="A UNIX init scheme with service supervision"
 HOMEPAGE="http://smarden.org/runit/"
 SRC_URI="http://smarden.org/runit/${P}.tar.gz"
+S=${WORKDIR}/admin/${P}/src
 
 LICENSE="BSD"
 SLOT="0"
@@ -16,13 +17,11 @@ IUSE="static"
 
 RDEPEND="sys-apps/openrc"
 
-S=${WORKDIR}/admin/${P}/src
-
 src_prepare() {
 	default
 
-	# we either build everything or nothing static
-	sed -i -e 's:-static: :' Makefile
+	# We either build everything or nothing static
+	sed -i -e 's:-static: :' Makefile || die
 
 	# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=726008
 	[[ ${COMPILER} == "diet" ]] &&
@@ -33,8 +32,8 @@ src_prepare() {
 src_configure() {
 	use static && append-ldflags -static
 
-	echo "$(tc-getCC) ${CFLAGS}"  > conf-cc
-	echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
+	echo "$(tc-getCC) ${CFLAGS}"  > conf-cc || die
+	echo "$(tc-getCC) ${LDFLAGS}" > conf-ld || die
 }
 
 src_install() {
@@ -49,7 +48,6 @@ src_install() {
 	einstalldocs
 	doman ../man/*.[18]
 
-	dodir /etc/runit
 	exeinto /etc/runit
 	doexe "${FILESDIR}"/ctrlaltdel
 	newexe "${FILESDIR}"/1-${PV} 1
@@ -74,11 +72,11 @@ src_install() {
 }
 
 default_config() {
-	local sv="${EROOT}"etc/sv
-	local service="${EROOT}"etc/service
+	local sv="${EROOT}"/etc/sv
+	local service="${EROOT}"/etc/service
 	mkdir -p "${service}" || die
 	for x in tty1 tty2 tty3 tty4 tty5 tty6; do
-	ln -sf "${sv}"/getty-$x "${service}"/getty-$x || die
+		ln -sf "${sv}"/getty-$x "${service}"/getty-$x || die
 	done
 	einfo "The links to services runit will supervise are installed"
 	einfo "in $service."
@@ -89,12 +87,12 @@ default_config() {
 
 migrate_from_211() {
 	# Create /etc/service and /var/service if requested
-	if [ -e "${T}"/make_var_service ]; then
-		ln -sf "${EROOT}"etc/runit/runsvdir/current "${EROOT}"etc/service || die
-		ln -sf "${EROOT}"etc/runit/runsvdir/current "${EROOT}"var/service || die
+	if [[ -e "${T}"/make_var_service ]]; then
+		ln -sf "${EROOT}"/etc/runit/runsvdir/current "${EROOT}"/etc/service || die
+		ln -sf "${EROOT}"/etc/runit/runsvdir/current "${EROOT}"/var/service || die
 	fi
-	if [ -d "${T}"/runsvdir ]; then
-		cp -a "${T}"/runsvdir "${EROOT}"etc/runit || die
+	if [[ -d "${T}"/runsvdir ]]; then
+		cp -a "${T}"/runsvdir "${EROOT}"/etc/runit || die
 	fi
 	return 0
 }
@@ -106,9 +104,9 @@ pkg_preinst() {
 }
 
 pkg_postinst() {
-	if [[ -z $REPLACING_VERSIONS ]]; then
+	if [[ -z ${REPLACING_VERSIONS} ]]; then
 		default_config
-	elif [[ -n $pre_212 ]]; then
+	elif [[ -n ${pre_212} ]]; then
 		migrate_from_211
 	fi
 
@@ -118,20 +116,20 @@ pkg_postinst() {
 	ewarn "source /etc/profile"
 	ewarn
 
-	if [ -L "${EROOT}"var/service ]; then
+	if [[ -L "${EROOT}"/var/service ]]; then
 		ewarn "Once this version of runit is active, please remove the"
-		ewarn "compatibility symbolic link at ${EROOT}var/service"
-		ewarn "The correct path now is ${EROOT}etc/service"
+		ewarn "compatibility symbolic link at ${EROOT}/var/service"
+		ewarn "The correct path now is ${EROOT}/etc/service"
 		ewarn
 	fi
 
-	if [ -L "${EROOT}"etc/runit/runsvdir/all ]; then
-		ewarn "${EROOT}etc/runit/runsvdir/all has moved to"
-		iewarn "${EROOT}etc/sv."
-		ewarn "Any symbolic links under ${EROOT}etc/runit/runsvdir"
+	if [[ -L "${EROOT}"/etc/runit/runsvdir/all ]]; then
+		ewarn "${EROOT}/etc/runit/runsvdir/all has moved to"
+		ewarn "${EROOT}/etc/sv."
+		ewarn "Any symbolic links under ${EROOT}/etc/runit/runsvdir"
 		ewarn "which point to services through ../all should be updated to"
-		ewarn "point to them through ${EROOT}etc/sv."
-		ewarn "Once that is done, ${EROOT}etc/runit/runsvdir/all should be"
+		ewarn "point to them through ${EROOT}/etc/sv."
+		ewarn "Once that is done, ${EROOT}/etc/runit/runsvdir/all should be"
 		ewarn "removed."
 		ewarn
 	fi


             reply	other threads:[~2024-08-23  7:28 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-23  7:28 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-05 14:42 [gentoo-commits] repo/gentoo:master commit in: sys-process/runit/ Mike Gilbert
2024-09-05 14:42 Mike Gilbert
2024-08-23  7:33 Ulrich Müller
2024-08-23  7:28 Sam James
2024-08-22 14:35 Mike Gilbert
2024-08-22 14:06 Mike Gilbert
2024-07-21  0:31 Sam James
2024-06-21 18:58 Arthur Zamarin
2024-06-21 18:58 Arthur Zamarin
2024-06-21 18:58 Arthur Zamarin
2024-06-21 18:58 Arthur Zamarin
2024-06-21 18:27 Arthur Zamarin
2024-06-21 18:27 Arthur Zamarin
2024-06-21 18:27 Arthur Zamarin
2024-06-21 18:27 Arthur Zamarin
2024-06-16  6:07 Robin H. Johnson
2024-01-12 16:41 Ionen Wolkens
2024-01-12 16:31 William Hubbs
2022-08-01  2:33 Sam James
2022-02-13 21:08 Conrad Kostecki
2021-05-14  9:35 Agostino Sarubbo
2021-05-13 21:17 Sam James
2021-05-13 21:17 Sam James
2021-05-13 21:16 Sam James
2021-05-13 21:15 Sam James
2021-05-13 21:15 Sam James
2021-05-13 21:15 Sam James
2018-05-20  0:20 William Hubbs
2018-05-20  0:18 William Hubbs
2016-11-15  3:47 Mike Frysinger
2016-11-14 14:50 Mike Frysinger
2016-11-11 18:52 William Hubbs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1724398068.882bdce53c742f514ef027966c206a6c83a0e7a4.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox