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