From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BA65215852A for ; Thu, 22 Aug 2024 14:35:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EDDC22BC025; Thu, 22 Aug 2024 14:35:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D342E2BC025 for ; Thu, 22 Aug 2024 14:35:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0ED0733BF41 for ; Thu, 22 Aug 2024 14:35:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2FFFA1EF0 for ; Thu, 22 Aug 2024 14:35:11 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1724337193.9646b294a24fa9b7a6a89ba54e9ece4947635046.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/runit/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-process/runit/runit-2.1.2-r1.ebuild X-VCS-Directories: sys-process/runit/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: 9646b294a24fa9b7a6a89ba54e9ece4947635046 X-VCS-Branch: master Date: Thu, 22 Aug 2024 14:35:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 38ef53b6-227e-421d-bc44-6b54296c6832 X-Archives-Hash: 79a3a71677c521783a90b9febf21c57b commit: 9646b294a24fa9b7a6a89ba54e9ece4947635046 Author: Mike Gilbert gentoo org> AuthorDate: Thu Aug 22 14:33:13 2024 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Thu Aug 22 14:33:13 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9646b294 sys-process/runit: restore 2.1.2-r1 Allow users to downgrade to avoid reboot regression. Bug: https://bugs.gentoo.org/938262 Signed-off-by: Mike Gilbert gentoo.org> sys-process/runit/runit-2.1.2-r1.ebuild | 138 ++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) diff --git a/sys-process/runit/runit-2.1.2-r1.ebuild b/sys-process/runit/runit-2.1.2-r1.ebuild new file mode 100644 index 000000000000..2250a85f21de --- /dev/null +++ b/sys-process/runit/runit-2.1.2-r1.ebuild @@ -0,0 +1,138 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +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" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86" +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 + + # 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 + + echo "$(tc-getCC) ${CFLAGS}" > conf-cc + echo "$(tc-getCC) ${LDFLAGS}" > conf-ld +} + +src_install() { + into / + dobin $(<../package/commands) + dodir /sbin + mv "${ED}"/bin/{runit-init,runit,utmpset} "${ED}"/sbin/ || die "dosbin" + dosym ../etc/runit/2 /sbin/runsvdir-start + + DOCS=( ../package/{CHANGES,README,THANKS,TODO} ) + HTML_DOCS=( ../doc/*.html ) + einstalldocs + doman ../man/*.[18] + + dodir /etc/runit + exeinto /etc/runit + doexe "${FILESDIR}"/ctrlaltdel + newexe "${FILESDIR}"/1-${PV} 1 + newexe "${FILESDIR}"/2-${PV} 2 + newexe "${FILESDIR}"/3-${PV} 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 + 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 '