From 09e6575b72d2b8bb8948feb0bbdcfd47eddb903b Mon Sep 17 00:00:00 2001 From: Sam James Date: Sat, 3 Dec 2022 12:16:46 +0000 Subject: sys-apps/openrc: backport grep 3.8 warning fix Closes: https://bugs.gentoo.org/875557 Signed-off-by: Sam James --- sys-apps/openrc/files/openrc-0.45.2-grep-3.8.patch | 35 +++++ sys-apps/openrc/openrc-0.45.2-r1.ebuild | 169 -------------------- sys-apps/openrc/openrc-0.45.2-r2.ebuild | 173 +++++++++++++++++++++ 3 files changed, 208 insertions(+), 169 deletions(-) create mode 100644 sys-apps/openrc/files/openrc-0.45.2-grep-3.8.patch delete mode 100644 sys-apps/openrc/openrc-0.45.2-r1.ebuild create mode 100644 sys-apps/openrc/openrc-0.45.2-r2.ebuild (limited to 'sys-apps/openrc') diff --git a/sys-apps/openrc/files/openrc-0.45.2-grep-3.8.patch b/sys-apps/openrc/files/openrc-0.45.2-grep-3.8.patch new file mode 100644 index 000000000000..c6eddeec9048 --- /dev/null +++ b/sys-apps/openrc/files/openrc-0.45.2-grep-3.8.patch @@ -0,0 +1,35 @@ +https://bugs.gentoo.org/875557 +https://github.com/OpenRC/openrc/issues/548 +https://github.com/OpenRC/openrc/commit/9380347f042f7d294317f4420b648422817eb75a + +From 9380347f042f7d294317f4420b648422817eb75a Mon Sep 17 00:00:00 2001 +From: Stefan Linke +Date: Wed, 7 Sep 2022 17:18:09 +0200 +Subject: [PATCH] Avoid warning on grep 3.8 in hwclock + +Starting with grep version 3.8, the hwclock init script logs warnings +about stray backslashes: + +> hwclock | * Setting system clock using the hardware clock [UTC] ... +> hwclock |grep: warning: stray \ before - +> hwclock |grep: warning: stray \ before - + +This is caused by the check for existence of the `--noadjfile` argument +in function `get_noadjfile()`. + +Replacing the affected logic with an explicit argument denoting the +pattern as such resolves the issue. + +Fixes #548 +--- a/init.d/hwclock.in ++++ b/init.d/hwclock.in +@@ -72,7 +72,7 @@ get_noadjfile() + { + if ! yesno $clock_adjfile; then + # Some implementations don't handle adjustments +- if LC_ALL=C hwclock --help 2>&1 | grep -q "\-\-noadjfile"; then ++ if LC_ALL=C hwclock --help 2>&1 | grep -q -e "--noadjfile"; then + echo --noadjfile + fi + fi + diff --git a/sys-apps/openrc/openrc-0.45.2-r1.ebuild b/sys-apps/openrc/openrc-0.45.2-r1.ebuild deleted file mode 100644 index 806d414f6ac0..000000000000 --- a/sys-apps/openrc/openrc-0.45.2-r1.ebuild +++ /dev/null @@ -1,169 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit meson pam - -DESCRIPTION="OpenRC manages the services, startup and shutdown of a host" -HOMEPAGE="https://github.com/openrc/openrc/" - -if [[ ${PV} =~ ^9{4,}$ ]]; then - EGIT_REPO_URI="https://github.com/OpenRC/${PN}.git" - inherit git-r3 -else - SRC_URI="https://github.com/OpenRC/openrc/archive/${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -fi - -LICENSE="BSD-2" -SLOT="0" -IUSE="audit bash debug ncurses pam newnet +netifrc selinux sysv-utils unicode" - -COMMON_DEPEND=" - ncurses? ( sys-libs/ncurses:0= ) - pam? ( sys-libs/pam ) - audit? ( sys-process/audit ) - sys-process/psmisc - selinux? ( - sys-apps/policycoreutils - >=sys-libs/libselinux-2.6 - )" -DEPEND="${COMMON_DEPEND} - virtual/os-headers - ncurses? ( virtual/pkgconfig )" -RDEPEND="${COMMON_DEPEND} - bash? ( app-shells/bash ) - !prefix? ( - sysv-utils? ( - !sys-apps/systemd[sysv-utils(-)] - !sys-apps/sysvinit - ) - !sysv-utils? ( - || ( - >=sys-apps/sysvinit-2.86-r6[selinux?] - sys-apps/s6-linux-init[sysv-utils(-)] - ) - ) - virtual/tmpfiles - ) - selinux? ( - >=sec-policy/selinux-base-policy-2.20170204-r4 - >=sec-policy/selinux-openrc-2.20170204-r4 - ) -" - -PDEPEND="netifrc? ( net-misc/netifrc )" - -src_configure() { - local emesonargs=( - $(meson_feature audit) - "-Dbranding=\"Gentoo Linux\"" - $(meson_use newnet) - -Dos=Linux - $(meson_use pam) - $(meson_feature selinux) - -Drootprefix="${EPREFIX}" - -Dshell=$(usex bash /bin/bash /bin/sh) - $(meson_use sysv-utils sysvinit) - -Dtermcap=$(usev ncurses) - ) - # export DEBUG=$(usev debug) - meson_src_configure -} - -# set_config