Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/openrc/
Date: Tue, 07 Sep 2021 21:23:37
Message-Id: 1631049801.dea18a5625aa714d12420fb4808e3b7d56a63373.williamh@gentoo
1 commit: dea18a5625aa714d12420fb4808e3b7d56a63373
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 7 21:22:32 2021 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 7 21:23:21 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dea18a56
7
8 sys-apps/openrc: 0.44 bump
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.3
11 Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
12
13 sys-apps/openrc/Manifest | 1 +
14 sys-apps/openrc/openrc-0.44.ebuild | 164 +++++++++++++++++++++++++++++++++++++
15 2 files changed, 165 insertions(+)
16
17 diff --git a/sys-apps/openrc/Manifest b/sys-apps/openrc/Manifest
18 index 20b88cbaae8..d96343678d9 100644
19 --- a/sys-apps/openrc/Manifest
20 +++ b/sys-apps/openrc/Manifest
21 @@ -1 +1,2 @@
22 DIST openrc-0.43.5.tar.gz 242146 BLAKE2B 993d3895588e8f1383049006834f944faaae0f889d3afcae5bff697db9f26383712f18aba52ce07d835f1d2bbe8ef19ef116ad60141d1eb0650767430d1d9967 SHA512 680c1549a8a37eb3a719f3e026888d045d26c98357d6e6eaf09069a23a001272deaca8cac4a9b8fd79f489c4cfb4fe2c7b5d481d1469798a8f5ec470d0cadbe3
23 +DIST openrc-0.44.tar.gz 251376 BLAKE2B 48efa0ba18f07f720013e3118e5ec98e1c544e838cfef590bf3890c81b4e21e9330a7b8a10ad77f7bccc4e7760b35a0a2c04e8354989b0200a994d7429f6ee67 SHA512 1d013f844681e18bca4ffdb2821884103b2d03fcf6eeadef0f828dc5c06c7ebf0e9583d0d0163b30c64f4ca5ae79db29ba05a98563118ecca0c28bbd64c6b858
24
25 diff --git a/sys-apps/openrc/openrc-0.44.ebuild b/sys-apps/openrc/openrc-0.44.ebuild
26 new file mode 100644
27 index 00000000000..2c2da59b749
28 --- /dev/null
29 +++ b/sys-apps/openrc/openrc-0.44.ebuild
30 @@ -0,0 +1,164 @@
31 +# Copyright 1999-2021 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=7
35 +
36 +inherit flag-o-matic meson pam toolchain-funcs
37 +
38 +DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
39 +HOMEPAGE="https://github.com/openrc/openrc/"
40 +
41 +if [[ ${PV} =~ ^9{4,}$ ]]; then
42 + EGIT_REPO_URI="https://github.com/OpenRC/${PN}.git"
43 + inherit git-r3
44 +else
45 + SRC_URI="https://github.com/OpenRC/openrc/archive/${PV}.tar.gz -> ${P}.tar.gz"
46 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
47 +fi
48 +
49 +LICENSE="BSD-2"
50 +SLOT="0"
51 +IUSE="audit bash debug ncurses pam newnet +netifrc selinux sysv-utils unicode"
52 +
53 +COMMON_DEPEND="
54 + ncurses? ( sys-libs/ncurses:0= )
55 + pam? ( sys-libs/pam )
56 + audit? ( sys-process/audit )
57 + sys-process/psmisc
58 + !<sys-process/procps-3.3.9-r2
59 + selinux? (
60 + sys-apps/policycoreutils
61 + >=sys-libs/libselinux-2.6
62 + )
63 + !<sys-apps/baselayout-2.1-r1
64 + !<sys-fs/udev-init-scripts-27"
65 +DEPEND="${COMMON_DEPEND}
66 + virtual/os-headers
67 + ncurses? ( virtual/pkgconfig )"
68 +RDEPEND="${COMMON_DEPEND}
69 + bash? ( app-shells/bash )
70 + !prefix? (
71 + sysv-utils? (
72 + !sys-apps/systemd[sysv-utils(-)]
73 + !sys-apps/sysvinit
74 + )
75 + !sysv-utils? ( >=sys-apps/sysvinit-2.86-r6[selinux?] )
76 + virtual/tmpfiles
77 + )
78 + selinux? (
79 + >=sec-policy/selinux-base-policy-2.20170204-r4
80 + >=sec-policy/selinux-openrc-2.20170204-r4
81 + )
82 + !<app-shells/gentoo-bashcomp-20180302
83 + !<app-shells/gentoo-zsh-completions-20180228
84 +"
85 +
86 +PDEPEND="netifrc? ( net-misc/netifrc )"
87 +
88 +src_configure() {
89 + local emesonargs=(
90 + $(meson_feature audit)
91 + "-Dbranding=\"Gentoo Linux\""
92 + $(meson_use newnet)
93 + -Dos=Linux
94 + $(meson_use pam)
95 + $(meson_feature selinux)
96 + -Dshell=$(usex bash /bin/bash /bin/sh)
97 + $(meson_use sysv-utils sysvinit)
98 + -Dtermcap=$(usev ncurses)
99 + )
100 + # export DEBUG=$(usev debug)
101 + meson_src_configure
102 +}
103 +
104 +# set_config <file> <option name> <yes value> <no value> test
105 +# a value of "#" will just comment out the option
106 +set_config() {
107 + local file="${ED}/$1" var=$2 val com
108 + eval "${@:5}" && val=$3 || val=$4
109 + [[ ${val} == "#" ]] && com="#" && val='\2'
110 + sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}"
111 +}
112 +
113 +set_config_yes_no() {
114 + set_config "$1" "$2" YES NO "${@:3}"
115 +}
116 +
117 +src_install() {
118 + meson_install
119 +
120 + keepdir /lib/rc/tmp
121 +
122 + # Setup unicode defaults for silly unicode users
123 + set_config_yes_no /etc/rc.conf unicode use unicode
124 +
125 + # Cater to the norm
126 + set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')'
127 +
128 + # On HPPA, do not run consolefont by default (bug #222889)
129 + if use hppa; then
130 + rm -f "${ED}"/etc/runlevels/boot/consolefont
131 + fi
132 +
133 + # Support for logfile rotation
134 + insinto /etc/logrotate.d
135 + newins "${FILESDIR}"/openrc.logrotate openrc
136 +
137 + if use pam; then
138 + # install gentoo pam.d files
139 + newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
140 + newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon
141 + fi
142 +
143 + # install documentation
144 + dodoc ChangeLog *.md
145 +}
146 +
147 +pkg_preinst() {
148 + # avoid default thrashing in conf.d files when possible #295406
149 + if [[ -e "${EROOT}"/etc/conf.d/hostname ]] ; then
150 + (
151 + unset hostname HOSTNAME
152 + source "${EROOT}"/etc/conf.d/hostname
153 + : ${hostname:=${HOSTNAME}}
154 + [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}"
155 + )
156 + fi
157 +
158 + # set default interactive shell to sulogin if it exists
159 + set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin
160 + return 0
161 +}
162 +
163 +pkg_postinst() {
164 + if use hppa; then
165 + elog "Setting the console font does not work on all HPPA consoles."
166 + elog "You can still enable it by running:"
167 + elog "# rc-update add consolefont boot"
168 + fi
169 +
170 + # Added for 0.35.
171 + if [[ ! -h "${EROOT}"/lib ]]; then
172 + if [[ -d "${EROOT}/$(get_libdir)"/rc ]]; then
173 + cp -RPp "${EROOT}/$(get_libdir)/rc" "${EROOT}"/lib
174 + fi
175 + fi
176 +
177 + if ! use newnet && ! use netifrc; then
178 + ewarn "You have emerged OpenRc without network support. This"
179 + ewarn "means you need to SET UP a network manager such as"
180 + ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/connman,"
181 + ewarn " net-misc/NetworkManager, or net-vpn/badvpn."
182 + ewarn "Or, you have the option of emerging openrc with the newnet"
183 + ewarn "use flag and configuring /etc/conf.d/network and"
184 + ewarn "/etc/conf.d/staticroute if you only use static interfaces."
185 + ewarn
186 + fi
187 +
188 + if use newnet && [ ! -e "${EROOT}"/etc/runlevels/boot/network ]; then
189 + ewarn "Please add the network service to your boot runlevel"
190 + ewarn "as soon as possible. Not doing so could leave you with a system"
191 + ewarn "without networking."
192 + ewarn
193 + fi
194 +}