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