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: Wed, 08 Sep 2021 19:03:10
Message-Id: 1631127720.008f4306d80f59f9988bc5f048a28b23b69e15be.williamh@gentoo
1 commit: 008f4306d80f59f9988bc5f048a28b23b69e15be
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 8 19:00:46 2021 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 8 19:02:00 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=008f4306
7
8 sys-apps/openrc: 0.44.1 bump
9
10 Added without keywords temporarily.
11
12 Closes: https://bugs.gentoo.org/812158
13 Closes: https://bugs.gentoo.org/812167
14 Package-Manager: Portage-3.0.20, Repoman-3.0.3
15 Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
16
17 sys-apps/openrc/Manifest | 1 +
18 sys-apps/openrc/openrc-0.44.1.ebuild | 164 +++++++++++++++++++++++++++++++++++
19 2 files changed, 165 insertions(+)
20
21 diff --git a/sys-apps/openrc/Manifest b/sys-apps/openrc/Manifest
22 index d96343678d9..08bc96333c7 100644
23 --- a/sys-apps/openrc/Manifest
24 +++ b/sys-apps/openrc/Manifest
25 @@ -1,2 +1,3 @@
26 DIST openrc-0.43.5.tar.gz 242146 BLAKE2B 993d3895588e8f1383049006834f944faaae0f889d3afcae5bff697db9f26383712f18aba52ce07d835f1d2bbe8ef19ef116ad60141d1eb0650767430d1d9967 SHA512 680c1549a8a37eb3a719f3e026888d045d26c98357d6e6eaf09069a23a001272deaca8cac4a9b8fd79f489c4cfb4fe2c7b5d481d1469798a8f5ec470d0cadbe3
27 +DIST openrc-0.44.1.tar.gz 251662 BLAKE2B 53af6372289dfa80de98ba0685699d22f0fddcbd55b972a5878f519411e867ab31193a37ddfe3f26e68cf14a54171f8b074f466c3da3e4a6a6dd899980a1717f SHA512 6514f997b18fb320289ddf41f417cea5192fd25c81f32fa5a44ef867d0cd649d3d242621d247bda61da3dfa60f5fde312310bd405241bcdbd420ded69c6f875d
28 DIST openrc-0.44.tar.gz 251376 BLAKE2B 48efa0ba18f07f720013e3118e5ec98e1c544e838cfef590bf3890c81b4e21e9330a7b8a10ad77f7bccc4e7760b35a0a2c04e8354989b0200a994d7429f6ee67 SHA512 1d013f844681e18bca4ffdb2821884103b2d03fcf6eeadef0f828dc5c06c7ebf0e9583d0d0163b30c64f4ca5ae79db29ba05a98563118ecca0c28bbd64c6b858
29
30 diff --git a/sys-apps/openrc/openrc-0.44.1.ebuild b/sys-apps/openrc/openrc-0.44.1.ebuild
31 new file mode 100644
32 index 00000000000..c53c141b2d9
33 --- /dev/null
34 +++ b/sys-apps/openrc/openrc-0.44.1.ebuild
35 @@ -0,0 +1,164 @@
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 + # Added for 0.35.
176 + if [[ ! -h "${EROOT}"/lib ]]; then
177 + if [[ -d "${EROOT}/$(get_libdir)"/rc ]]; then
178 + cp -RPp "${EROOT}/$(get_libdir)/rc" "${EROOT}"/lib
179 + fi
180 + fi
181 +
182 + if ! use newnet && ! use netifrc; then
183 + ewarn "You have emerged OpenRc without network support. This"
184 + ewarn "means you need to SET UP a network manager such as"
185 + ewarn " net-misc/netifrc, net-misc/dhcpcd, net-misc/connman,"
186 + ewarn " net-misc/NetworkManager, or net-vpn/badvpn."
187 + ewarn "Or, you have the option of emerging openrc with the newnet"
188 + ewarn "use flag and configuring /etc/conf.d/network and"
189 + ewarn "/etc/conf.d/staticroute if you only use static interfaces."
190 + ewarn
191 + fi
192 +
193 + if use newnet && [ ! -e "${EROOT}"/etc/runlevels/boot/network ]; then
194 + ewarn "Please add the network service to your boot runlevel"
195 + ewarn "as soon as possible. Not doing so could leave you with a system"
196 + ewarn "without networking."
197 + ewarn
198 + fi
199 +}