Gentoo Archives: gentoo-commits

From: Marc Schiffbauer <mschiff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/restart-services/
Date: Wed, 07 Oct 2020 23:20:31
Message-Id: 1602112804.1e4287bad250023635809ee2f9a960728cea0c92.mschiff@gentoo
1 commit: 1e4287bad250023635809ee2f9a960728cea0c92
2 Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 7 23:20:04 2020 +0000
4 Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 7 23:20:04 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e4287ba
7
8 app-admin/restart-services: add new version 0.16.1
9
10 Package-Manager: Portage-3.0.4, Repoman-3.0.1
11 Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org>
12
13 app-admin/restart-services/Manifest | 1 +
14 .../restart-services-0.16.1.ebuild | 63 ++++++++++++++++++++++
15 2 files changed, 64 insertions(+)
16
17 diff --git a/app-admin/restart-services/Manifest b/app-admin/restart-services/Manifest
18 index 52ddca91c89..c0262fe38f5 100644
19 --- a/app-admin/restart-services/Manifest
20 +++ b/app-admin/restart-services/Manifest
21 @@ -1,2 +1,3 @@
22 DIST restart-services-0.15.2.tgz 23688 BLAKE2B e043b872d55109ad176a6437006cf581a993e72e460bb034625ed612f9ceca85ef91a20e90f23bcecc964caa527cfa4bc39d97c52487b7bf92eec21dc2e35c48 SHA512 afe7c96aabf61d664460d5d68447df09b3d9a54098887727db796821220f5ddd5a3b5030d995d5a6c3128e4a2b8494b9a0a3b86b5c805d56c0e201058ad04327
23 DIST restart-services-0.16.0.tgz 24531 BLAKE2B fea233755d214a502096551226078a7fe15a75ccf937bbf8a75c78b7a294b5977da453f54f37e3d7e65f131e49e018bf08bec6245a3aa46ec6c3bec94019f5ad SHA512 57b3514132c02839cafbfd9152445a6482cf3591e22d18436a4d894061b59d2495863a912a87495559e9945a39715e7e798dca44dafd52c26b5412d749f37cc2
24 +DIST restart-services-0.16.1.tgz 24569 BLAKE2B 210ffebf321d9524ee3176ac8d56e2579c9e1686bd11d484be02600aab70347c522d5e7f8826b103ebd37f3e21c11130e0717f033ac0af3e938c4cece1a036bb SHA512 d4657120860ec26a2d9e6cdd935d720dac2bff50131fc9e8efd69b4768a5fd9afa4ee24b367a002122f3e1b335e9c99cc6b41c801c0285252e6f5e701d027de1
25
26 diff --git a/app-admin/restart-services/restart-services-0.16.1.ebuild b/app-admin/restart-services/restart-services-0.16.1.ebuild
27 new file mode 100644
28 index 00000000000..874ac8f3552
29 --- /dev/null
30 +++ b/app-admin/restart-services/restart-services-0.16.1.ebuild
31 @@ -0,0 +1,63 @@
32 +# Copyright 1999-2020 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=6
36 +
37 +DESCRIPTION="Tool to manage OpenRC services that need to be restarted"
38 +HOMEPAGE="https://dev.gentoo.org/~mschiff/restart-services/"
39 +SRC_URI="https://dev.gentoo.org/~mschiff/src/${PN}/${P}.tgz"
40 +
41 +LICENSE="GPL-3"
42 +SLOT="0"
43 +KEYWORDS="~amd64 ~x86"
44 +IUSE=""
45 +
46 +DEPEND=""
47 +RDEPEND="
48 + app-admin/lib_users
49 + sys-apps/openrc
50 + app-portage/portage-utils
51 +"
52 +
53 +src_install() {
54 + dosbin restart-services
55 + doman restart-services.1
56 + keepdir /etc/restart-services.d
57 + insinto /etc
58 + doins restart-services.conf
59 + dodoc README CHANGES
60 +
61 + sed -i 's/^#include/include/' "${D}"/etc/restart-services.conf
62 + cat>"${D}"/etc/restart-services.d/00-local.conf<<-EOF
63 + # You may put your local changes here or in any other *.conf file
64 + # in this directory so you can leave /etc/restart-services.conf as is.
65 + # Example:
66 + # *extend* SV_ALWAYS to match 'myservice'
67 + # SV_ALWAYS+=( myservice )
68 + EOF
69 +}
70 +
71 +pkg_postinst() {
72 + local MAJOR MINOR
73 + # migrate config data for versions < 0.13.2
74 + if [[ $REPLACING_VERSIONS ]]; then
75 + MAJOR=${REPLACING_VERSIONS%%.*}
76 + MINOR=${REPLACING_VERSIONS%.*}
77 + MINOR=${MINOR#*.}
78 +
79 + if [[ $MAJOR -eq 0 && $MINOR -lt 14 ]]; then
80 + einfo "Checking for old config"
81 + if [[ -f /etc/restart_services.conf ]]; then
82 + ewarn "Old config file found: /etc/restart_services.conf"
83 + ewarn "It will be ignored so please migrate settings to a file in"
84 + ewarn "/etc/restart-services.d/ and/or remove /etc/restart_services.conf"
85 + fi
86 + if [[ -d /etc/restart_services.d ]]; then
87 + ewarn "Old config directory found: /etc/restart_services.d"
88 + ewarn "It will be ignored so please migrate files to /etc/restart-services.d"
89 + ewarn "and/or remove /etc/restart_services.d"
90 + fi
91 + einfo "done"
92 + fi
93 + fi
94 +}