From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 14C9B158089 for ; Fri, 15 Sep 2023 06:42:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 485022BC01C; Fri, 15 Sep 2023 06:42:06 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 196022BC01C for ; Fri, 15 Sep 2023 06:42:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3DC08335D1B for ; Fri, 15 Sep 2023 06:42:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id ACFDF11AE for ; Fri, 15 Sep 2023 06:42:03 +0000 (UTC) From: "Arthur Zamarin" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arthur Zamarin" Message-ID: <1694759864.f03c9e3ab64eedcb5fa95275a110190d1031b319.arthurzam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/restart-services/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-admin/restart-services/restart-services-0.17.0-r1.ebuild X-VCS-Directories: app-admin/restart-services/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: f03c9e3ab64eedcb5fa95275a110190d1031b319 X-VCS-Branch: master Date: Fri, 15 Sep 2023 06:42:03 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b2c86978-6803-4adf-a708-5ce6bef6c397 X-Archives-Hash: a7954d567253b7ecba4e1275389c3a41 commit: f03c9e3ab64eedcb5fa95275a110190d1031b319 Author: Leonardo Hernández Hernández proton me> AuthorDate: Fri Sep 15 03:31:03 2023 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Fri Sep 15 06:37:44 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f03c9e3a app-admin/restart-services: update EAPI 6 -> 8 Signed-off-by: Leonardo Hernández Hernández proton.me> Signed-off-by: Arthur Zamarin gentoo.org> .../restart-services-0.17.0-r1.ebuild | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/app-admin/restart-services/restart-services-0.17.0-r1.ebuild b/app-admin/restart-services/restart-services-0.17.0-r1.ebuild new file mode 100644 index 000000000000..7baedbc6e948 --- /dev/null +++ b/app-admin/restart-services/restart-services-0.17.0-r1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Tool to manage OpenRC and systemd services that need to be restarted" +HOMEPAGE="https://dev.gentoo.org/~mschiff/restart-services/" +SRC_URI="https://dev.gentoo.org/~mschiff/src/${PN}/${P}.tgz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86" + +RDEPEND=" + app-admin/lib_users + app-portage/portage-utils + || ( sys-apps/openrc sys-apps/systemd ) +" + +src_install() { + dosbin restart-services + doman restart-services.1 + keepdir /etc/restart-services.d + insinto /etc + doins restart-services.conf + dodoc README CHANGES + + sed -i -e 's/^#include/include/' "${ED}"/etc/restart-services.conf || die + cat > "${ED}"/etc/restart-services.d/00-local.conf <<- EOF || die + # You may put your local changes here or in any other *.conf file + # in this directory so you can leave /etc/restart-services.conf as is. + # Example: + # *extend* SV_ALWAYS to match 'myservice' + # SV_ALWAYS+=( myservice ) + EOF +} + +pkg_postinst() { + # migrate config data for versions < 0.13.2 + if [[ -n ${REPLACING_VERSIONS} ]]; then + + if [[ $(ver_cut 1 ${REPLACING_VERSIONS}) -eq 0 ]] \ + && [[ $(ver_cut 2 ${REPLACING_VERSIONS}) -lt 14 ]]; then + local have_old_config=0 + ebegin "Checking for old config" + if [[ -f /etc/restart_services.conf ]]; then + have_old_config=1 + ewarn "Old config file found: /etc/restart_services.conf" + ewarn "It will be ignored so please migrate settings to a file in" + ewarn "/etc/restart-services.d/ and/or remove /etc/restart_services.conf" + fi + if [[ -d /etc/restart_services.d ]]; then + have_old_config=1 + ewarn "Old config directory found: /etc/restart_services.d" + ewarn "It will be ignored so please migrate files to /etc/restart-services.d" + ewarn "and/or remove /etc/restart_services.d" + fi + eend ${have_old_config} + fi + fi +}