summaryrefslogtreecommitdiff
path: root/sys-process
diff options
context:
space:
mode:
Diffstat (limited to 'sys-process')
-rw-r--r--sys-process/Manifest.gzbin10296 -> 10296 bytes
-rw-r--r--sys-process/runit/Manifest20
-rw-r--r--sys-process/runit/files/1-r1 (renamed from sys-process/runit/files/1-2.1.2)0
-rw-r--r--sys-process/runit/files/1-r211
-rw-r--r--sys-process/runit/files/1.openrc.example6
-rw-r--r--sys-process/runit/files/2-r1 (renamed from sys-process/runit/files/2-2.1.2)0
-rw-r--r--sys-process/runit/files/3-r1 (renamed from sys-process/runit/files/3-2.1.2)0
-rw-r--r--sys-process/runit/files/3-r215
-rw-r--r--sys-process/runit/files/3.openrc.example7
-rw-r--r--sys-process/runit/files/rc.sh16
-rw-r--r--sys-process/runit/files/run.getty (renamed from sys-process/runit/files/run.getty-2.1.2)0
-rw-r--r--sys-process/runit/metadata.xml3
-rw-r--r--sys-process/runit/runit-2.1.2-r6.ebuild8
-rw-r--r--sys-process/runit/runit-2.1.2-r7.ebuild169
-rw-r--r--sys-process/runit/runit-2.2.0-r1.ebuild (renamed from sys-process/runit/runit-2.2.0.ebuild)44
15 files changed, 272 insertions, 27 deletions
diff --git a/sys-process/Manifest.gz b/sys-process/Manifest.gz
index e58459e1dffa..051afbdf8c1a 100644
--- a/sys-process/Manifest.gz
+++ b/sys-process/Manifest.gz
Binary files differ
diff --git a/sys-process/runit/Manifest b/sys-process/runit/Manifest
index 871b01047e3f..451a513a63c9 100644
--- a/sys-process/runit/Manifest
+++ b/sys-process/runit/Manifest
@@ -1,12 +1,18 @@
-AUX 1-2.1.2 183 BLAKE2B 4b7dd07662e21d8ff7f898f36979237b2ee2b18d019fd31222dfb910107c196bb813ad7bc0cffb54f90b4796a4de26d9523bdb250b9cd41d3baf1a84838364a7 SHA512 813b83675fc71522a6469c9c391d87219da43896ecb702a957ad2a9a6f8c4d0d59e4ab784b50de288c7e98efd2a8fd26aa5a1fbb8376f7c24226a97fee49d87a
-AUX 2-2.1.2 554 BLAKE2B e3680bd4333c784054991209c2b9749daa8e56adf70b0bac29752c0e63883a0ecab5d5405f55dc2628522cc4b60c17232829c6150a65b7dc07b42d7a780019b1 SHA512 d21f6877f459b3c4b93049f6d342e48715ce7b762f6c5d858ad26ada07e66fe6f56ebb095083c7f153091fcb8ef877dc2b7c1738daeeacd6e04c70e3753682a5
-AUX 3-2.1.2 388 BLAKE2B ee8d2db23ea43694a614f918d02af34db4bbe6a207eadead0cc668bf5ae113a7c49a351c8026326a773d2e4027caf89e2802494ccc68e734aa0223015175fcba SHA512 47256f52367c7f1af5d2b435550e5d4786e056c3a43138fd472d6bc48093a07c36a5e1bdafd4235e0c1299579c100f9d97190424cf2bd114ec29956f3c9991f5
+AUX 1-r1 183 BLAKE2B 4b7dd07662e21d8ff7f898f36979237b2ee2b18d019fd31222dfb910107c196bb813ad7bc0cffb54f90b4796a4de26d9523bdb250b9cd41d3baf1a84838364a7 SHA512 813b83675fc71522a6469c9c391d87219da43896ecb702a957ad2a9a6f8c4d0d59e4ab784b50de288c7e98efd2a8fd26aa5a1fbb8376f7c24226a97fee49d87a
+AUX 1-r2 159 BLAKE2B 01d8b1c773831258a03f2a401c67195b2daac33dd1abfed5471ea1bb1afadbd388099c5ff46446f9422ffd0373b17229e6043616f3c1bf1b6001445aa7103d0b SHA512 6d5a5b51ed1196e8e56641d53ad02ef10abfbf8a02379b91a9f19dba519fb12f14e188c9233786745de109863c02b3b12bd46248ce474b5d501d14232a454975
+AUX 1.openrc.example 149 BLAKE2B 9a902748ad02e70d8cb0449d517ecd866cb985f64ebd27f63f9c1dc24b2c5a5d3b99ae79a4c0ec2f5a121f0219e91fcb43ceff6a66d50c7a05003c69674de90d SHA512 92a757d5fab68dcba70633e7c5765f18be622ff8222c4797a73bdb3cd4d8f0dd9a5194be0e6babfc45c33dac851036ebb6d45695f84c683cc429396c63846da1
+AUX 2-r1 554 BLAKE2B e3680bd4333c784054991209c2b9749daa8e56adf70b0bac29752c0e63883a0ecab5d5405f55dc2628522cc4b60c17232829c6150a65b7dc07b42d7a780019b1 SHA512 d21f6877f459b3c4b93049f6d342e48715ce7b762f6c5d858ad26ada07e66fe6f56ebb095083c7f153091fcb8ef877dc2b7c1738daeeacd6e04c70e3753682a5
+AUX 3-r1 388 BLAKE2B ee8d2db23ea43694a614f918d02af34db4bbe6a207eadead0cc668bf5ae113a7c49a351c8026326a773d2e4027caf89e2802494ccc68e734aa0223015175fcba SHA512 47256f52367c7f1af5d2b435550e5d4786e056c3a43138fd472d6bc48093a07c36a5e1bdafd4235e0c1299579c100f9d97190424cf2bd114ec29956f3c9991f5
+AUX 3-r2 291 BLAKE2B 615adeaff3e1a08fa6dff41f684a4087b8e9df9919ca71ac2e41ebc081dadfd13468e7700a779ff3466b7445f6dda72e6dddc81b15d9acc753f9174c38c039da SHA512 d60c462a56e7c5fd09d43263d67ed1f4669d5273ebb6fce4241bf7e2aa169d094340f21bd4a7df3a392af681aa8746607a2438545e4f5100be3ad49af7ed5a4c
+AUX 3.openrc.example 223 BLAKE2B 1f782397d08935fe09c550c6e7fe9f817e47063011971ea0bd54371ce881508f19ffb6fa16251c09118c0cc03e3622e3501f55891ec2b0c60b2100fb55406cf0 SHA512 e2dee665bee0fd770a354fbb4cb4a6583f3bac5dacf2848f4435302c4e26b81cc442f43e10b817b3aafa22dfb4370d1e7298aa90fba72b084fce9f94273f17ba
AUX ctrlaltdel 189 BLAKE2B 07b6936a7ae54a69227f794068cf41dfc2e54ba6ba032a7c1a58c5bcbf6567221e2e21afc5b8768742e63ce9e131841d8336c2cd081991c9e9d91f5d86f274c6 SHA512 a0980e1dbcd2c591997e62e3e1b8ab660c36f007d12f6dd3eb6607d286c0056eb96c40b997b2c9569a7e3a6bf9a2a39d8050c31aa09a9c0ba6eb931183049b1b
AUX finish.getty 30 BLAKE2B 97dec53a513713c68febd68177227e165ed3bdee28d3db4f57b671e93dbf3e9cf233e92dd2c0a47fe4e0bec0fd13d994893f95914f19cb5f9dfa78b915857bc4 SHA512 122a4ab21dbd5e6b77e0225bda48f813ec680c85767fdc917933bd1a88d854b6714809ebd63d0fa6b81c25c5e0a9de224aa920565e8d197556e7d99c5836681d
-AUX run.getty-2.1.2 44 BLAKE2B 38b80fc06bb53a06a6dd2ebeb6f5c320c73c9d3e928c5dbfeaad2fa0a19e1bdeaa28cf6fe61fcdd46406c0f1f4a05113b8b2cdb652bcac3d6560e0af0f5d521c SHA512 c23aa0ba79043a5717e5567f39bb714154f68c1e417538013943a65de5584b775c265423dd5d47c52027a1be1621f8fb017b115d75d127a31b2ef7cae3ed9eea
+AUX rc.sh 369 BLAKE2B c78c6244ecae6f3929811302cde54e5a60b7672a40352801dda43e78172970595685c2b2bd712b8e7c98a3d3a5eeb50d748e7afa2da94fb263f771b98abba749 SHA512 b9e061a8575477b86f82500fbaf1fb5088bf40c95632aae5acc9398a85de9ca8702bbbaf9ebd98d4d8e2c10b48edfc96f11cc33557219faca48a7959d54b3d19
+AUX run.getty 44 BLAKE2B 38b80fc06bb53a06a6dd2ebeb6f5c320c73c9d3e928c5dbfeaad2fa0a19e1bdeaa28cf6fe61fcdd46406c0f1f4a05113b8b2cdb652bcac3d6560e0af0f5d521c SHA512 c23aa0ba79043a5717e5567f39bb714154f68c1e417538013943a65de5584b775c265423dd5d47c52027a1be1621f8fb017b115d75d127a31b2ef7cae3ed9eea
DIST runit-2.1.2-patches-20240905.tar.xz 20104 BLAKE2B ebdc123ea722f223eec3ad5d63a4c3e7c4ef771592796f2d5624f4308c1d08eede7d4fa0c2a9fdd23dbf74be6135c69bae495d89cf582678b9308b1d146ef883 SHA512 15c5acd865ecc7f6c3b9b1fc94dc00bc44ceefd1c0ca6b53963d94338712cd716ad961826cccd065029ee67464dc288428952004ffcec3a1a97a058696f4f233
DIST runit-2.1.2.tar.gz 110916 BLAKE2B 101e514aeed282685ebe636f401ca6f94d157281d08a3ac487340aebe945b82d2ee01d41e9917446f4ebd7b27fe9fd18ba4ad55739ab1b62a0e59e1c438b55e9 SHA512 a18773ebf1aa22305dd89ed67363165b9fcf86c192b2be4e268d08005dd82d51265160c637abe072f2f2e378c4b315a75bd3d3e602c3e75bdd451a3b0190f8cf
DIST runit-2.2.0.tar.gz 111395 BLAKE2B 46a4b91cf180694a69ade3cabaddb35a89db516ef75e9fc69b8091a5c3570079796b8a4cf227edc74938e182833edcce7af40f01d5cb1b4032993fb094459ede SHA512 cedfe6d3505aca754ff11d791055f023a7be42e2fbdd2e4964b3460692474371a72363cf181ae2dfae5c02df45ebf568cdab72a5000d1b48e26e12217d4e9a3d
-EBUILD runit-2.1.2-r6.ebuild 4116 BLAKE2B a1169945c1e5c07a7307ea7c3d44afe54b3745e59f04c80079c9bf28995da7b5e4758e27d633e9c997f1459330b82797b392c22774cf3bf5f21b73fc4e4063e8 SHA512 ecc020cdaff91490f796117e2d48fc66096f2b897c76bc4aeffb44221a837dd74775839df522cf3ac64c77944516e55535102e510695edd6a38ec4e86bc55857
-EBUILD runit-2.2.0.ebuild 3992 BLAKE2B 70cb7f32158b56321a8f4e6a2c95b01e4abd23ba9c4b336e4486c8f8c7c483741a9923970ec62a7eb0755ad467f67571d796f3ddb8ad72ce222f306792bcc2e3 SHA512 860f17f80bcc668a20769f8d3648ec97a9b7dbe20132ae46ed3f1e0abef8658615af9f568e12e177096571869afcb9a960984bf1f93376f1d620a5c46bc9ff73
-MISC metadata.xml 480 BLAKE2B 03c67b9377e4dae4a777b363e128fc758cbd92d0ed6060d1036a6209184d518d59d6a98bfc731e0fa95151c0925195a1c512c2cfe46ddba1c964b66510f3bbba SHA512 71d359e43329f0b0561f01b132067c359e70af27868cc586beb96d5b9a0a1661eb122e0afcf90c5fb4f713b1e25d5e8072e4618143702bc1be063f2e194b211a
+EBUILD runit-2.1.2-r6.ebuild 4101 BLAKE2B 41bf39b67912819fcc308a6fffc8e84e1f2c6a5b8d8e3e78f72e0e6a8bce76fe5c41429f2ffe7b2f0a6c4b88cf3f6a213a17373c33915380cb844f135e3611d5 SHA512 7d41069857b61384bb97bfffb216185b0f9ad1008b7d7a66ca7c1f4592bcf18f45e9a8c52d0efc511010ae81beff83c8d87815ea0bfc55332fd22ad11d9c6999
+EBUILD runit-2.1.2-r7.ebuild 4768 BLAKE2B d37c87968e21eccd183d8ea759436497f24bf9a14ab7d58bfbca03110fd4499229029f8fe491426b5a03d95d06e2d5d5377889fcf8e88daceb9cdb6d782cbefe SHA512 6fcdfd4c92245e935877562823328aed61765449ab9579983b8ddc655acc23d5742d3367ebd436cde0dd34ebfd3f4d05f2c63f1e657b17301e20a52e87e660cf
+EBUILD runit-2.2.0-r1.ebuild 4539 BLAKE2B 14d1c137bf360bb81501a818e51b6311ef125e40538157d46af5bdcf15eaefd3a1a067c6f52d682c906aad89ba8e9d46c4a132ca6280ab838f59c4fb71847d6e SHA512 4706f3b2ad4c60865397c10177011fa5d70e19f43c500e2a30ca6c428f0b90152a39bbf751a747349564fc3671970d8427cae1285e1ea04b384a7c45f83139be
+MISC metadata.xml 568 BLAKE2B a7a700f2cd566b190a83f9087b12f72bc5a97d5f20a09088c88861aa9284024de3da60350fa609b9d72ec45c7a853d23a95ea05d17b4288c318e8745d4949e88 SHA512 95ed4a0c8ee69f84bc63c15310aeaccb83f66c8757e49f9fb93a1e4eb3a84d8b3cafb2181f9814779664e272987713fd82f801fff1d23af18b4968fa37c33bc3
diff --git a/sys-process/runit/files/1-2.1.2 b/sys-process/runit/files/1-r1
index 9761472ac739..9761472ac739 100644
--- a/sys-process/runit/files/1-2.1.2
+++ b/sys-process/runit/files/1-r1
diff --git a/sys-process/runit/files/1-r2 b/sys-process/runit/files/1-r2
new file mode 100644
index 000000000000..0ca4cc880e91
--- /dev/null
+++ b/sys-process/runit/files/1-r2
@@ -0,0 +1,11 @@
+#!/bin/bash
+# system one time tasks
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+. /etc/runit/rc.sh
+
+run_rc_stage 1
+
+touch /etc/runit/stopit
+chmod 0 /etc/runit/stopit
diff --git a/sys-process/runit/files/1.openrc.example b/sys-process/runit/files/1.openrc.example
new file mode 100644
index 000000000000..816c33d26372
--- /dev/null
+++ b/sys-process/runit/files/1.openrc.example
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# example script in stage 1 using openrc, sys-apps/openrc must be installed
+
+RUNLEVEL=S /sbin/openrc sysinit
+RUNLEVEL=S /sbin/openrc boot
diff --git a/sys-process/runit/files/2-2.1.2 b/sys-process/runit/files/2-r1
index a63a1b2d269d..a63a1b2d269d 100644
--- a/sys-process/runit/files/2-2.1.2
+++ b/sys-process/runit/files/2-r1
diff --git a/sys-process/runit/files/3-2.1.2 b/sys-process/runit/files/3-r1
index 30e602cdae96..30e602cdae96 100644
--- a/sys-process/runit/files/3-2.1.2
+++ b/sys-process/runit/files/3-r1
diff --git a/sys-process/runit/files/3-r2 b/sys-process/runit/files/3-r2
new file mode 100644
index 000000000000..0b757c01fe22
--- /dev/null
+++ b/sys-process/runit/files/3-r2
@@ -0,0 +1,15 @@
+#!/bin/bash
+exec >/dev/console 2>&1
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+echo 'Waiting for getties to stop...'
+sv -w 10 force-shutdown /etc/service/getty-*
+
+echo 'Waiting for services to stop...'
+sv -w 300 force-shutdown /etc/service/*
+
+echo 'Shutdown...'
+
+. /etc/runit/rc.sh
+
+run_rc_stage 3
diff --git a/sys-process/runit/files/3.openrc.example b/sys-process/runit/files/3.openrc.example
new file mode 100644
index 000000000000..2e4cb44f08ef
--- /dev/null
+++ b/sys-process/runit/files/3.openrc.example
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# example script in stage 3 using openrc, sys-apps/openrc must be installed
+
+test -x /etc/runit/reboot && LAST=6 || LAST=0
+test -x /etc/runit/reboot && RC=reboot || RC=shutdown
+RUNLEVEL=$LAST /sbin/openrc $RC
diff --git a/sys-process/runit/files/rc.sh b/sys-process/runit/files/rc.sh
new file mode 100644
index 000000000000..6e382ff9b712
--- /dev/null
+++ b/sys-process/runit/files/rc.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# run script(s) at /etc/runit/rc/, suffix must be .sh, prefix
+# must be [1|3] which denote stage 1 or 3.
+run_rc_stage() {
+ local prefix="${1}"
+ local prev_opt=$(shopt -p nullglob)
+ shopt -s nullglob
+ for file in /etc/runit/rc/"${prefix}".*.sh; do
+ if [[ ! -x "${file}" ]] || [[ ! -s "${file}" ]] ; then
+ continue
+ fi
+ . "${file}"
+ done
+ ${prev_opt}
+}
diff --git a/sys-process/runit/files/run.getty-2.1.2 b/sys-process/runit/files/run.getty
index ab6f9543fe97..ab6f9543fe97 100644
--- a/sys-process/runit/files/run.getty-2.1.2
+++ b/sys-process/runit/files/run.getty
diff --git a/sys-process/runit/metadata.xml b/sys-process/runit/metadata.xml
index 73e765e89483..b959aa013a8b 100644
--- a/sys-process/runit/metadata.xml
+++ b/sys-process/runit/metadata.xml
@@ -12,4 +12,7 @@
<upstream>
<remote-id type="github">clan/runit</remote-id>
</upstream>
+ <use>
+ <flag name="scripts">Install boot scripts into /etc/runit/.</flag>
+ </use>
</pkgmetadata>
diff --git a/sys-process/runit/runit-2.1.2-r6.ebuild b/sys-process/runit/runit-2.1.2-r6.ebuild
index 3cc37408a6ee..2e67b0119a0d 100644
--- a/sys-process/runit/runit-2.1.2-r6.ebuild
+++ b/sys-process/runit/runit-2.1.2-r6.ebuild
@@ -69,15 +69,15 @@ src_install() {
exeinto /etc/runit
doexe "${FILESDIR}"/ctrlaltdel
- newexe "${FILESDIR}"/1-${PV} 1
- newexe "${FILESDIR}"/2-${PV} 2
- newexe "${FILESDIR}"/3-${PV} 3
+ newexe "${FILESDIR}"/1-r1 1
+ newexe "${FILESDIR}"/2-r1 2
+ newexe "${FILESDIR}"/3-r1 3
dodir /etc/sv
for tty in tty1 tty2 tty3 tty4 tty5 tty6; do
exeinto /etc/sv/getty-$tty/
newexe "${FILESDIR}"/finish.getty finish
- newexe "${FILESDIR}"/run.getty-${PV} run
+ newexe "${FILESDIR}"/run.getty run
for script in finish run; do
sed -i -e "s:TTY:${tty}:g" "${ED}"/etc/sv/getty-$tty/$script
done
diff --git a/sys-process/runit/runit-2.1.2-r7.ebuild b/sys-process/runit/runit-2.1.2-r7.ebuild
new file mode 100644
index 000000000000..1ef4c5e2877d
--- /dev/null
+++ b/sys-process/runit/runit-2.1.2-r7.ebuild
@@ -0,0 +1,169 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="A UNIX init scheme with service supervision"
+HOMEPAGE="https://smarden.org/runit/"
+PATCH_VER=20240905
+SRC_URI="
+ https://smarden.org/runit/${P}.tar.gz
+ https://github.com/clan/runit/releases/download/${PV}-r5/${P}-patches-${PATCH_VER}.tar.xz
+"
+S=${WORKDIR}/admin/${P}/src
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="+scripts split-usr static"
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ unpack ${P}-patches-${PATCH_VER}.tar.xz
+}
+
+src_prepare() {
+ default
+
+ cd "${S}"/.. || die
+ eapply -p3 "${WORKDIR}"/patches
+ cd "${S}" || die
+
+ # 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" ]] &&
+ use ppc &&
+ filter-flags "-mpowerpc-gpopt"
+}
+
+src_configure() {
+ use static && append-ldflags -static
+
+ append-flags -std=gnu17 # XXX https://bugs.gentoo.org/946137, workaround for gcc15
+ echo "$(tc-getCC) ${CFLAGS}" > conf-cc || die
+ echo "$(tc-getCC) ${LDFLAGS}" > conf-ld || die
+ sed -i -e "s:ar cr:$(tc-getAR) cr:" print-ar.sh || die
+ sed -i -e "s:ranlib :$(tc-getRANLIB) :" print-ar.sh || die
+}
+
+src_install() {
+ dobin $(<../package/commands)
+ dodir /sbin
+ mv "${ED}"/usr/bin/{runit-init,runit,utmpset} "${ED}"/sbin/ || die "dosbin"
+ if use split-usr ; then
+ dosym ../etc/runit/2 /sbin/runsvdir-start
+ else
+ dosym ../../etc/runit/2 /sbin/runsvdir-start
+ fi
+
+ DOCS=( ../package/{CHANGES,README,THANKS,TODO} )
+ HTML_DOCS=( ../doc/*.html )
+ einstalldocs
+ doman ../man/*.[18]
+
+ if use scripts ; then
+ exeinto /etc/runit
+ doexe "${FILESDIR}"/ctrlaltdel
+ newexe "${FILESDIR}"/1-r2 1
+ newexe "${FILESDIR}"/2-r1 2
+ newexe "${FILESDIR}"/3-r2 3
+ doexe "${FILESDIR}"/rc.sh
+ insinto /etc/runit/rc
+ doins "${FILESDIR}"/1.openrc.example
+ doins "${FILESDIR}"/3.openrc.example
+ fi
+
+ dodir /etc/sv
+ for tty in tty1 tty2 tty3 tty4 tty5 tty6; do
+ exeinto /etc/sv/getty-$tty/
+ newexe "${FILESDIR}"/finish.getty finish
+ newexe "${FILESDIR}"/run.getty run
+ for script in finish run; do
+ sed -i -e "s:TTY:${tty}:g" "${ED}"/etc/sv/getty-$tty/$script
+ done
+ done
+
+ # make sv command work
+ newenvd - 20runit <<- EOF
+ #/etc/env.d/20runit
+ SVDIR="/etc/service/"
+ EOF
+}
+
+default_config() {
+ 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
+ done
+ einfo "The links to services runit will supervise are installed"
+ einfo "in $service."
+ einfo "If you need multiple runlevels, please see the documentation"
+ einfo "for how to set them up."
+ einfo
+}
+
+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
+ fi
+ if [[ -d "${T}"/runsvdir ]]; then
+ cp -a "${T}"/runsvdir "${EROOT}"/etc/runit || die
+ fi
+ return 0
+}
+
+pkg_preinst() {
+ if has_version '<sys-process/runit-2.1.2'; then
+ pre_212=yes
+ fi
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ default_config
+ elif [[ -n ${pre_212} ]]; then
+ migrate_from_211
+ fi
+
+ if use scripts; then
+ ewarn "To make sure sv works correctly in your currently open"
+ ewarn "shells, please run the following command:"
+ ewarn
+ ewarn "source /etc/profile"
+ ewarn
+ ewarn "Currently, no task(s) will run in stage 1 & 3, you're on your own"
+ ewarn "to put script(s) into /etc/runit/rc/, please see /etc/runit/rc.sh"
+ ewarn "for name in different stages."
+ else
+ ewarn "This build with USE=\"-scripts\" doesn\'t include any boot scripts"
+ ewarn "into /etc/runit, you are on your own to put the scripts."
+ ewarn "Also, /sbin/runsvdir-start is a broken symlink to /etc/runit/2, you will"
+ ewarn "need to create script /etc/runit/2 before use it."
+ fi
+
+ 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
+ fi
+
+ 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 "removed."
+ ewarn
+ fi
+}
diff --git a/sys-process/runit/runit-2.2.0.ebuild b/sys-process/runit/runit-2.2.0-r1.ebuild
index 5f369e745738..5a77acc25416 100644
--- a/sys-process/runit/runit-2.2.0.ebuild
+++ b/sys-process/runit/runit-2.2.0-r1.ebuild
@@ -16,9 +16,7 @@ S=${WORKDIR}/admin/${P}/src
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
-IUSE="split-usr static"
-
-RDEPEND="sys-apps/openrc"
+IUSE="+scripts split-usr static"
src_prepare() {
default
@@ -45,8 +43,6 @@ src_configure() {
}
src_install() {
- local ver_runit_cfg="2.1.2" # use files from 2.1.2
-
dobin $(<../package/commands)
dodir /sbin
mv "${ED}"/usr/bin/{runit-init,runit,utmpset} "${ED}"/sbin/ || die "dosbin"
@@ -61,17 +57,23 @@ src_install() {
einstalldocs
doman ../man/*.[18]
- exeinto /etc/runit
- doexe "${FILESDIR}"/ctrlaltdel
- newexe "${FILESDIR}"/1-${ver_runit_cfg} 1
- newexe "${FILESDIR}"/2-${ver_runit_cfg} 2
- newexe "${FILESDIR}"/3-${ver_runit_cfg} 3
+ if use scripts ; then
+ exeinto /etc/runit
+ doexe "${FILESDIR}"/ctrlaltdel
+ newexe "${FILESDIR}"/1-r2 1
+ newexe "${FILESDIR}"/2-r1 2
+ newexe "${FILESDIR}"/3-r2 3
+ doexe "${FILESDIR}"/rc.sh
+ insinto /etc/runit/rc
+ doins "${FILESDIR}"/1.openrc.example
+ doins "${FILESDIR}"/3.openrc.example
+ fi
dodir /etc/sv
for tty in tty1 tty2 tty3 tty4 tty5 tty6; do
exeinto /etc/sv/getty-$tty/
newexe "${FILESDIR}"/finish.getty finish
- newexe "${FILESDIR}"/run.getty-${ver_runit_cfg} run
+ newexe "${FILESDIR}"/run.getty run
for script in finish run; do
sed -i -e "s:TTY:${tty}:g" "${ED}"/etc/sv/getty-$tty/$script
done
@@ -123,11 +125,21 @@ pkg_postinst() {
migrate_from_211
fi
- ewarn "To make sure sv works correctly in your currently open"
- ewarn "shells, please run the following command:"
- ewarn
- ewarn "source /etc/profile"
- ewarn
+ if use scripts; then
+ ewarn "To make sure sv works correctly in your currently open"
+ ewarn "shells, please run the following command:"
+ ewarn
+ ewarn "source /etc/profile"
+ ewarn
+ ewarn "Currently, no task(s) will run in stage 1 & 3, you're on your own"
+ ewarn "to put script(s) into /etc/runit/rc/, please see /etc/runit/rc.sh"
+ ewarn "for name in different stages."
+ else
+ ewarn "This build with USE=\"-scripts\" doesn\'t include any boot scripts"
+ ewarn "into /etc/runit, you are on your own to put the scripts."
+ ewarn "Also, /sbin/runsvdir-start is a broken symlink to /etc/runit/2, you will"
+ ewarn "need to create script /etc/runit/2 before use it."
+ fi
if [[ -L "${EROOT}"/var/service ]]; then
ewarn "Once this version of runit is active, please remove the"