1 |
commit: a170fd4cf31784d50244f78639dc800b09ad0071 |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 3 18:00:08 2022 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 3 18:01:03 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a170fd4c |
7 |
|
8 |
sys-apps/openrc: add 0.45.2 |
9 |
|
10 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
11 |
|
12 |
sys-apps/openrc/Manifest | 1 + |
13 |
sys-apps/openrc/openrc-0.45.2.ebuild | 164 +++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 165 insertions(+) |
15 |
|
16 |
diff --git a/sys-apps/openrc/Manifest b/sys-apps/openrc/Manifest |
17 |
index 8d4639b0a8ba..9cf5ccd34c33 100644 |
18 |
--- a/sys-apps/openrc/Manifest |
19 |
+++ b/sys-apps/openrc/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
DIST openrc-0.44.10.tar.gz 254298 BLAKE2B 3cfecc27b560b8bb60d2104ab3dcf176b98677b65b829fa403ad2eb0e2e8bb0d586d374c336328a07c2f35e3abcb3f897cf5df142540a60fc09883aabd0ac79d SHA512 0e41f5268c6b8c325a6773511ca58c38ba52a1987aa47165794df8a99359bd1bfcb99d30e0d129b9242a2661663234f6f85c92c55c891dbb6c5b8a11d93edea4 |
22 |
DIST openrc-0.45.1.tar.gz 246503 BLAKE2B 28ed668b1da7bc3d22de1f7b22b6d10ecd1c789eb5c017803754fa8f6197ee4a7b179728064fa31d4b9dd0d15e3332c4bb839bd56ac5abb39b5b772b53394e8a SHA512 340661c6f8fc60dd7fbbe4a84aaeb0a9a7337577e6d98698c34db3c160890780376587ca6f803563fec53e852593265a28c307fa38a5f71a3e48c62cd63611a1 |
23 |
+DIST openrc-0.45.2.tar.gz 246515 BLAKE2B bb7d52b183612eb8924a2d0f9ec63eea88253d8d83964d6341a4715a6cdc372b3fd99ad0f972f4f539da9d741548777dabf4ced86fd20be741a89a69ffe2ff01 SHA512 ca2958772240f6e5037e39db1ee62a81091a2efa654da967f68e03a721868c6c0a41d32a2bddf55c8eadbc9bf5837b710cc2e4564844a7fbc0e585366da4fdf9 |
24 |
|
25 |
diff --git a/sys-apps/openrc/openrc-0.45.2.ebuild b/sys-apps/openrc/openrc-0.45.2.ebuild |
26 |
new file mode 100644 |
27 |
index 000000000000..c76771b7efea |
28 |
--- /dev/null |
29 |
+++ b/sys-apps/openrc/openrc-0.45.2.ebuild |
30 |
@@ -0,0 +1,164 @@ |
31 |
+# Copyright 1999-2022 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=8 |
35 |
+ |
36 |
+inherit meson pam |
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 ~loong ~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 |
+ selinux? ( |
59 |
+ sys-apps/policycoreutils |
60 |
+ >=sys-libs/libselinux-2.6 |
61 |
+ )" |
62 |
+DEPEND="${COMMON_DEPEND} |
63 |
+ virtual/os-headers |
64 |
+ ncurses? ( virtual/pkgconfig )" |
65 |
+RDEPEND="${COMMON_DEPEND} |
66 |
+ bash? ( app-shells/bash ) |
67 |
+ !prefix? ( |
68 |
+ sysv-utils? ( |
69 |
+ !sys-apps/systemd[sysv-utils(-)] |
70 |
+ !sys-apps/sysvinit |
71 |
+ ) |
72 |
+ !sysv-utils? ( >=sys-apps/sysvinit-2.86-r6[selinux?] ) |
73 |
+ virtual/tmpfiles |
74 |
+ ) |
75 |
+ selinux? ( |
76 |
+ >=sec-policy/selinux-base-policy-2.20170204-r4 |
77 |
+ >=sec-policy/selinux-openrc-2.20170204-r4 |
78 |
+ ) |
79 |
+" |
80 |
+ |
81 |
+PDEPEND="netifrc? ( net-misc/netifrc )" |
82 |
+ |
83 |
+src_configure() { |
84 |
+ local emesonargs=( |
85 |
+ $(meson_feature audit) |
86 |
+ "-Dbranding=\"Gentoo Linux\"" |
87 |
+ $(meson_use newnet) |
88 |
+ -Dos=Linux |
89 |
+ $(meson_use pam) |
90 |
+ $(meson_feature selinux) |
91 |
+ -Drootprefix="${EPREFIX}" |
92 |
+ -Dshell=$(usex bash /bin/bash /bin/sh) |
93 |
+ $(meson_use sysv-utils sysvinit) |
94 |
+ -Dtermcap=$(usev ncurses) |
95 |
+ ) |
96 |
+ # export DEBUG=$(usev debug) |
97 |
+ meson_src_configure |
98 |
+} |
99 |
+ |
100 |
+# set_config <file> <option name> <yes value> <no value> test |
101 |
+# a value of "#" will just comment out the option |
102 |
+set_config() { |
103 |
+ local file="${ED}/$1" var=$2 val com |
104 |
+ eval "${@:5}" && val=$3 || val=$4 |
105 |
+ [[ ${val} == "#" ]] && com="#" && val='\2' |
106 |
+ sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}" |
107 |
+} |
108 |
+ |
109 |
+set_config_yes_no() { |
110 |
+ set_config "$1" "$2" YES NO "${@:3}" |
111 |
+} |
112 |
+ |
113 |
+src_install() { |
114 |
+ meson_install |
115 |
+ |
116 |
+ keepdir /lib/rc/tmp |
117 |
+ |
118 |
+ # Setup unicode defaults for silly unicode users |
119 |
+ set_config_yes_no /etc/rc.conf unicode use unicode |
120 |
+ |
121 |
+ # Cater to the norm |
122 |
+ set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')' |
123 |
+ |
124 |
+ # On HPPA, do not run consolefont by default (bug #222889) |
125 |
+ if use hppa; then |
126 |
+ rm -f "${ED}"/etc/runlevels/boot/consolefont |
127 |
+ fi |
128 |
+ |
129 |
+ # Support for logfile rotation |
130 |
+ insinto /etc/logrotate.d |
131 |
+ newins "${FILESDIR}"/openrc.logrotate openrc |
132 |
+ |
133 |
+ if use pam; then |
134 |
+ # install gentoo pam.d files |
135 |
+ newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon |
136 |
+ newpamd "${FILESDIR}"/start-stop-daemon.pam supervise-daemon |
137 |
+ fi |
138 |
+ |
139 |
+ # install documentation |
140 |
+ dodoc *.md |
141 |
+} |
142 |
+ |
143 |
+pkg_preinst() { |
144 |
+ # avoid default thrashing in conf.d files when possible #295406 |
145 |
+ if [[ -e "${EROOT}"/etc/conf.d/hostname ]] ; then |
146 |
+ ( |
147 |
+ unset hostname HOSTNAME |
148 |
+ source "${EROOT}"/etc/conf.d/hostname |
149 |
+ : ${hostname:=${HOSTNAME}} |
150 |
+ [[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}" |
151 |
+ ) |
152 |
+ fi |
153 |
+ |
154 |
+ # set default interactive shell to sulogin if it exists |
155 |
+ set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin |
156 |
+ return 0 |
157 |
+} |
158 |
+ |
159 |
+pkg_postinst() { |
160 |
+ if use hppa; then |
161 |
+ elog "Setting the console font does not work on all HPPA consoles." |
162 |
+ elog "You can still enable it by running:" |
163 |
+ elog "# rc-update add consolefont boot" |
164 |
+ fi |
165 |
+ |
166 |
+ if ! use newnet && ! use netifrc; then |
167 |
+ ewarn "You have emerged OpenRc without network support. This" |
168 |
+ ewarn "means you need to SET UP a network manager such as" |
169 |
+ ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/connman," |
170 |
+ ewarn " net-misc/NetworkManager, or net-vpn/badvpn." |
171 |
+ ewarn "Or, you have the option of emerging openrc with the newnet" |
172 |
+ ewarn "use flag and configuring /etc/conf.d/network and" |
173 |
+ ewarn "/etc/conf.d/staticroute if you only use static interfaces." |
174 |
+ ewarn |
175 |
+ fi |
176 |
+ |
177 |
+ if use newnet && [ ! -e "${EROOT}"/etc/runlevels/boot/network ]; then |
178 |
+ ewarn "Please add the network service to your boot runlevel" |
179 |
+ ewarn "as soon as possible. Not doing so could leave you with a system" |
180 |
+ ewarn "without networking." |
181 |
+ ewarn |
182 |
+ fi |
183 |
+ |
184 |
+ # added for 0.45 to handle seedrng/urandom switching (2022-06-07) |
185 |
+ for v in ${REPLACING_VERSIONS}; do |
186 |
+ [[ -x $(type rc-update) ]] || continue |
187 |
+ if ver_test $v -lt 0.45; then |
188 |
+ if rc-update show boot | grep -q urandom; then |
189 |
+ rc-update del urandom boot |
190 |
+ rc-update add seedrng boot |
191 |
+ fi |
192 |
+ fi |
193 |
+ done |
194 |
+} |