diff options
Diffstat (limited to 'sys-apps/openrc-navi')
-rw-r--r-- | sys-apps/openrc-navi/Manifest | 6 | ||||
-rw-r--r-- | sys-apps/openrc-navi/files/openrc.logrotate | 4 | ||||
-rw-r--r-- | sys-apps/openrc-navi/files/start-stop-daemon.pam | 2 | ||||
-rw-r--r-- | sys-apps/openrc-navi/metadata.xml | 27 | ||||
-rw-r--r-- | sys-apps/openrc-navi/openrc-navi-0.60_beta.ebuild | 161 | ||||
-rw-r--r-- | sys-apps/openrc-navi/openrc-navi-9999.ebuild | 161 |
6 files changed, 361 insertions, 0 deletions
diff --git a/sys-apps/openrc-navi/Manifest b/sys-apps/openrc-navi/Manifest new file mode 100644 index 000000000000..66daaf793587 --- /dev/null +++ b/sys-apps/openrc-navi/Manifest @@ -0,0 +1,6 @@ +AUX openrc.logrotate 43 BLAKE2B 0587cd211767937fd6273e6b159271490443a94d80a54b5a20ef625a1959e77dbf38cd1756838337fb39a061c4ee19a39cccd2f5867fab9f04fb916a74029aaa SHA512 12bb6354e808fbf47bbab963de55ee7901738b4a912659982c57ef2777fff9a670e867fcb8ec316a76b151032c92dc89a950d7d1d835ef53f753a8f3b41d2cec +AUX start-stop-daemon.pam 63 BLAKE2B df39a1a12fe09dbbc0746eac67035d9e6d4a63323f6c937ef3888c70787354128e415b3c1c8bccccec0c987b3e789711cd1ddaba55e9b53a7f67b332c4ca9d5b SHA512 85cf440611b8f87f51bf24bdd9fa03639a75b950f00096d81b8826c21ae85ff9784b8c56b8ddb482e70f08bce933d4561b30750346d51fb2cef3be34acc065cb +DIST openrc-navi-0.60_beta.tar.gz 254765 BLAKE2B ee06b9ed1a0242f048c8f362ebcd6ec0cdf5a568afe0d5dfc2603f774a2b46c3bcf43ddb2935f31ae3bd10bff31f826caca61705c83449ba5aecd9b9d3569c18 SHA512 b7946872cd42eb1ac941f123bb9820c977064826dc47b29aa72b32cc702e2a3c5066e4027a87416ff4d0164c0180eaf4a02d733072b21d24805a2335b3483080 +EBUILD openrc-navi-0.60_beta.ebuild 4455 BLAKE2B 69ee0257a512db84c1ae35f5d0b734b49bdfc480a1f74ee77f8398920f304f4100a2ba33eee60753c6224bc99aed2b6b159351c3d1190263bc79fd136cafa7e7 SHA512 a87663dd6f938c46346f730a4422bbc29ef9ac44d9cd43ba4378aa07db6688c73c20fe8dc260c36a43b233f2d52d30a452e385936f956d05ea26f3e65582639a +EBUILD openrc-navi-9999.ebuild 4455 BLAKE2B 69ee0257a512db84c1ae35f5d0b734b49bdfc480a1f74ee77f8398920f304f4100a2ba33eee60753c6224bc99aed2b6b159351c3d1190263bc79fd136cafa7e7 SHA512 a87663dd6f938c46346f730a4422bbc29ef9ac44d9cd43ba4378aa07db6688c73c20fe8dc260c36a43b233f2d52d30a452e385936f956d05ea26f3e65582639a +MISC metadata.xml 994 BLAKE2B e484e753aa7405c53d0f3f59f4c4f898714a1ffaa800fc4e03d5989464f0366011d16f1231ce83dda0f662457e8f52fdb042a14bf6c5fa6eec4326133595ffd6 SHA512 dd416b0a6cf5223dcc9e151a32cd2f1fa66ac1e73f1a46bd4f131a538bc2d2f71cdd584afba6eea222024dd02c3b64b1668a95d961c4bfd40fc969fa537329b6 diff --git a/sys-apps/openrc-navi/files/openrc.logrotate b/sys-apps/openrc-navi/files/openrc.logrotate new file mode 100644 index 000000000000..5e5e64b9b191 --- /dev/null +++ b/sys-apps/openrc-navi/files/openrc.logrotate @@ -0,0 +1,4 @@ +/var/log/rc.log { + missingok + notifempty +} diff --git a/sys-apps/openrc-navi/files/start-stop-daemon.pam b/sys-apps/openrc-navi/files/start-stop-daemon.pam new file mode 100644 index 000000000000..2127f6a70d57 --- /dev/null +++ b/sys-apps/openrc-navi/files/start-stop-daemon.pam @@ -0,0 +1,2 @@ +account required pam_permit.so +session include system-services diff --git a/sys-apps/openrc-navi/metadata.xml b/sys-apps/openrc-navi/metadata.xml new file mode 100644 index 000000000000..1496e79219d4 --- /dev/null +++ b/sys-apps/openrc-navi/metadata.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>navi@vlhl.dev</email> + <name>Anna (navi) Figueiredo Gomes</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <use> + <flag name="bash"> + enable the use of bash in service scripts (experimental) + </flag> + <flag name="netifrc">enable Gentoo's network stack (net.* scripts)</flag> + <flag name="newnet">enable the new network stack (experimental)</flag> + <flag name="s6">install s6-linux-init</flag> + <flag name="sysv-utils">Install sysvinit compatibility scripts for halt, init, poweroff, reboot and shutdown</flag> + <flag name="sysvinit"> + control the dependency on sysvinit (experimental) + </flag> + </use> + <upstream> + <remote-id type="github">navi-desu/openrc</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-apps/openrc-navi/openrc-navi-0.60_beta.ebuild b/sys-apps/openrc-navi/openrc-navi-0.60_beta.ebuild new file mode 100644 index 000000000000..536afa285068 --- /dev/null +++ b/sys-apps/openrc-navi/openrc-navi-0.60_beta.ebuild @@ -0,0 +1,161 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit meson pam + +DESCRIPTION="OpenRC fork with user services support" +HOMEPAGE="https://github.com/navi-desu/openrc/" + +if [[ ${PV} =~ ^9{4,}$ ]]; then + EGIT_REPO_URI="https://github.com/navi-desu/openrc.git" + inherit git-r3 +else + SRC_URI="https://github.com/navi-desu/openrc/archive/${PV/_/-}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + S="${WORKDIR}/openrc-${PV/_/-}" +fi + +LICENSE="BSD-2" +SLOT="0" +IUSE="audit bash caps debug pam newnet +netifrc selinux s6 +sysvinit sysv-utils unicode" + +COMMON_DEPEND=" + pam? ( sys-libs/pam ) + audit? ( sys-process/audit ) + caps? ( sys-libs/libcap ) + sys-process/psmisc + selinux? ( + sys-apps/policycoreutils + >=sys-libs/libselinux-2.6 + )" +DEPEND="${COMMON_DEPEND} + virtual/os-headers" +RDEPEND="${COMMON_DEPEND} + !sys-apps/openrc + bash? ( app-shells/bash ) + sysv-utils? ( + !sys-apps/systemd[sysv-utils(-)] + !sys-apps/sysvinit + ) + !sysv-utils? ( + sysvinit? ( >=sys-apps/sysvinit-2.86-r6[selinux?] ) + s6? ( sys-apps/s6-linux-init[sysv-utils(-)] ) + ) + virtual/tmpfiles + selinux? ( + >=sec-policy/selinux-base-policy-2.20170204-r4 + >=sec-policy/selinux-openrc-2.20170204-r4 + ) +" + +PDEPEND="netifrc? ( net-misc/netifrc )" + +src_configure() { + local emesonargs=( + $(meson_feature audit) + "-Dbranding=\"Gentoo Linux\"" + $(meson_feature caps capabilities) + $(meson_use newnet) + -Dos=Linux + $(meson_use pam) + $(meson_feature selinux) + -Drootprefix="${EPREFIX}" + -Dshell=$(usex bash /bin/bash /bin/sh) + $(meson_use sysv-utils sysvinit) + ) + # export DEBUG=$(usev debug) + meson_src_configure +} + +# set_config <file> <option name> <yes value> <no value> test +# a value of "#" will just comment out the option +set_config() { + local file="${ED}/$1" var=$2 val com + eval "${@:5}" && val=$3 || val=$4 + [[ ${val} == "#" ]] && com="#" && val='\2' + sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}" +} + +set_config_yes_no() { + set_config "$1" "$2" YES NO "${@:3}" +} + +src_install() { + meson_install + + keepdir /lib/rc/tmp + + # Setup unicode defaults for silly unicode users + set_config_yes_no /etc/rc.conf unicode use unicode + + # Cater to the norm + set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')' + + # On HPPA, do not run consolefont by default (bug #222889) + if use hppa; then + rm -f "${ED}"/etc/runlevels/boot/consolefont + fi + + # Support for logfile rotation + insinto /etc/logrotate.d + newins "${FILESDIR}"/openrc.logrotate openrc + + if use pam; then + # install gentoo pam.d files + newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon + newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon + fi + + # install documentation + dodoc *.md +} + +pkg_preinst() { + # avoid default thrashing in conf.d files when possible #295406 + if [[ -e "${EROOT}"/etc/conf.d/hostname ]] ; then + ( + unset hostname HOSTNAME + source "${EROOT}"/etc/conf.d/hostname + : ${hostname:=${HOSTNAME}} + [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}" + ) + fi + + # set default interactive shell to sulogin if it exists + set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin + return 0 +} + +pkg_postinst() { + if use hppa; then + elog "Setting the console font does not work on all HPPA consoles." + elog "You can still enable it by running:" + elog "# rc-update add consolefont boot" + fi + + if ! use newnet && ! use netifrc; then + ewarn "You have emerged OpenRc without network support. This" + ewarn "means you need to SET UP a network manager such as" + ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/connman," + ewarn " net-misc/NetworkManager, or net-vpn/badvpn." + ewarn "Or, you have the option of emerging openrc with the newnet" + ewarn "use flag and configuring /etc/conf.d/network and" + ewarn "/etc/conf.d/staticroute if you only use static interfaces." + ewarn + fi + + if use newnet && [ ! -e "${EROOT}"/etc/runlevels/boot/network ]; then + ewarn "Please add the network service to your boot runlevel" + ewarn "as soon as possible. Not doing so could leave you with a system" + ewarn "without networking." + ewarn + fi + + if [[ -z ${REPLACING_VERSIONS} ]]; then + ewarn "To support starting user services automatically, please append" + ewarn "'-session optional pam_openrc.so' to /etc/pam.d/system-login" + ewarn + fi +} diff --git a/sys-apps/openrc-navi/openrc-navi-9999.ebuild b/sys-apps/openrc-navi/openrc-navi-9999.ebuild new file mode 100644 index 000000000000..536afa285068 --- /dev/null +++ b/sys-apps/openrc-navi/openrc-navi-9999.ebuild @@ -0,0 +1,161 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit meson pam + +DESCRIPTION="OpenRC fork with user services support" +HOMEPAGE="https://github.com/navi-desu/openrc/" + +if [[ ${PV} =~ ^9{4,}$ ]]; then + EGIT_REPO_URI="https://github.com/navi-desu/openrc.git" + inherit git-r3 +else + SRC_URI="https://github.com/navi-desu/openrc/archive/${PV/_/-}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + S="${WORKDIR}/openrc-${PV/_/-}" +fi + +LICENSE="BSD-2" +SLOT="0" +IUSE="audit bash caps debug pam newnet +netifrc selinux s6 +sysvinit sysv-utils unicode" + +COMMON_DEPEND=" + pam? ( sys-libs/pam ) + audit? ( sys-process/audit ) + caps? ( sys-libs/libcap ) + sys-process/psmisc + selinux? ( + sys-apps/policycoreutils + >=sys-libs/libselinux-2.6 + )" +DEPEND="${COMMON_DEPEND} + virtual/os-headers" +RDEPEND="${COMMON_DEPEND} + !sys-apps/openrc + bash? ( app-shells/bash ) + sysv-utils? ( + !sys-apps/systemd[sysv-utils(-)] + !sys-apps/sysvinit + ) + !sysv-utils? ( + sysvinit? ( >=sys-apps/sysvinit-2.86-r6[selinux?] ) + s6? ( sys-apps/s6-linux-init[sysv-utils(-)] ) + ) + virtual/tmpfiles + selinux? ( + >=sec-policy/selinux-base-policy-2.20170204-r4 + >=sec-policy/selinux-openrc-2.20170204-r4 + ) +" + +PDEPEND="netifrc? ( net-misc/netifrc )" + +src_configure() { + local emesonargs=( + $(meson_feature audit) + "-Dbranding=\"Gentoo Linux\"" + $(meson_feature caps capabilities) + $(meson_use newnet) + -Dos=Linux + $(meson_use pam) + $(meson_feature selinux) + -Drootprefix="${EPREFIX}" + -Dshell=$(usex bash /bin/bash /bin/sh) + $(meson_use sysv-utils sysvinit) + ) + # export DEBUG=$(usev debug) + meson_src_configure +} + +# set_config <file> <option name> <yes value> <no value> test +# a value of "#" will just comment out the option +set_config() { + local file="${ED}/$1" var=$2 val com + eval "${@:5}" && val=$3 || val=$4 + [[ ${val} == "#" ]] && com="#" && val='\2' + sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}" +} + +set_config_yes_no() { + set_config "$1" "$2" YES NO "${@:3}" +} + +src_install() { + meson_install + + keepdir /lib/rc/tmp + + # Setup unicode defaults for silly unicode users + set_config_yes_no /etc/rc.conf unicode use unicode + + # Cater to the norm + set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')' + + # On HPPA, do not run consolefont by default (bug #222889) + if use hppa; then + rm -f "${ED}"/etc/runlevels/boot/consolefont + fi + + # Support for logfile rotation + insinto /etc/logrotate.d + newins "${FILESDIR}"/openrc.logrotate openrc + + if use pam; then + # install gentoo pam.d files + newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon + newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon + fi + + # install documentation + dodoc *.md +} + +pkg_preinst() { + # avoid default thrashing in conf.d files when possible #295406 + if [[ -e "${EROOT}"/etc/conf.d/hostname ]] ; then + ( + unset hostname HOSTNAME + source "${EROOT}"/etc/conf.d/hostname + : ${hostname:=${HOSTNAME}} + [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}" + ) + fi + + # set default interactive shell to sulogin if it exists + set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin + return 0 +} + +pkg_postinst() { + if use hppa; then + elog "Setting the console font does not work on all HPPA consoles." + elog "You can still enable it by running:" + elog "# rc-update add consolefont boot" + fi + + if ! use newnet && ! use netifrc; then + ewarn "You have emerged OpenRc without network support. This" + ewarn "means you need to SET UP a network manager such as" + ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/connman," + ewarn " net-misc/NetworkManager, or net-vpn/badvpn." + ewarn "Or, you have the option of emerging openrc with the newnet" + ewarn "use flag and configuring /etc/conf.d/network and" + ewarn "/etc/conf.d/staticroute if you only use static interfaces." + ewarn + fi + + if use newnet && [ ! -e "${EROOT}"/etc/runlevels/boot/network ]; then + ewarn "Please add the network service to your boot runlevel" + ewarn "as soon as possible. Not doing so could leave you with a system" + ewarn "without networking." + ewarn + fi + + if [[ -z ${REPLACING_VERSIONS} ]]; then + ewarn "To support starting user services automatically, please append" + ewarn "'-session optional pam_openrc.so' to /etc/pam.d/system-login" + ewarn + fi +} |