summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Schiffbauer <mschiff@gentoo.org>2018-02-02 01:07:13 +0100
committerMarc Schiffbauer <mschiff@gentoo.org>2018-02-02 02:18:30 +0100
commit84f352d07fee751f00dc1492d939eb3559b9015a (patch)
treefdbcd910291c5cea5de01f45f1bad781d0485d75 /app-admin
parenteclass/toolchain.eclass: die early in case of EAPI < 5 (diff)
downloadgentoo-84f352d07fee751f00dc1492d939eb3559b9015a.tar.gz
gentoo-84f352d07fee751f00dc1492d939eb3559b9015a.tar.bz2
gentoo-84f352d07fee751f00dc1492d939eb3559b9015a.zip
app-admin/restart_services: moved, bumped
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/restart-services/Manifest1
-rw-r--r--app-admin/restart-services/metadata.xml (renamed from app-admin/restart_services/metadata.xml)0
-rw-r--r--app-admin/restart-services/restart-services-0.14.0.ebuild83
-rw-r--r--app-admin/restart_services/Manifest2
-rw-r--r--app-admin/restart_services/restart_services-0.13.0-r1.ebuild37
-rw-r--r--app-admin/restart_services/restart_services-0.13.1.ebuild37
6 files changed, 84 insertions, 76 deletions
diff --git a/app-admin/restart-services/Manifest b/app-admin/restart-services/Manifest
new file mode 100644
index 000000000000..db36b3b4aa7c
--- /dev/null
+++ b/app-admin/restart-services/Manifest
@@ -0,0 +1 @@
+DIST restart-services-0.14.0.tgz 20896 BLAKE2B e5f2d425659d81d75d7e030e42b582275595cbf9cd35dc85d8d1656792088b27156a2b5f44959966cc034242e03f20a79df6837a30d426b630410987762c97ab SHA512 20fe1750682bdd1e1566b60e80bd099351ae2ff49fb74f138879a7035078dd9b2ddfd79f6c16c3822f8e7eb702d4ab98719e7ca79a3e007b8b547243f9d1a364
diff --git a/app-admin/restart_services/metadata.xml b/app-admin/restart-services/metadata.xml
index ea6b59e79026..ea6b59e79026 100644
--- a/app-admin/restart_services/metadata.xml
+++ b/app-admin/restart-services/metadata.xml
diff --git a/app-admin/restart-services/restart-services-0.14.0.ebuild b/app-admin/restart-services/restart-services-0.14.0.ebuild
new file mode 100644
index 000000000000..3f78f2850aa3
--- /dev/null
+++ b/app-admin/restart-services/restart-services-0.14.0.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="Tool to manage OpenRC 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 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="
+ app-admin/lib_users
+ sys-apps/openrc
+"
+
+src_install() {
+ dosbin restart-services
+ doman restart-services.1
+ keepdir /etc/restart-services.d
+ insinto /etc
+ doins restart-services.conf
+ dodoc README CHANGES
+
+ # remove after 2018/07/01
+ dosym restart-services /usr/sbin/restart_services
+
+ sed -i 's/^#include/include/' "${D}"/etc/restart-services.conf
+ cat>"${D}"/etc/restart-services.d/00-local.conf<<-EOF
+ # 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() {
+ local MAJOR MINOR
+ # migrate config data for versions < 0.13.2
+ if [[ $REPLACING_VERSIONS ]]; then
+ MAJOR=${REPLACING_VERSIONS%%.*}
+ MINOR=${REPLACING_VERSIONS%.*}
+ MINOR=${MINOR#*.}
+
+ if [[ $MAJOR -eq 0 && $MINOR -lt 14 ]]; then
+ einfo "Migrating config"
+ if [[ -e /etc/restart-services.d ]]; then
+ error "/etc/restart-services.d alrayd exists?!"
+ die
+ fi
+ if [[ -e /etc/restart-services.conf ]]; then
+ error "/etc/restart-services.conf alrayd exists?!"
+ die
+ fi
+
+ if [[ -f /etc/restart_services.d/00-local.conf ]]; then
+ sed -i 's/restart_services/restart-services/g' \
+ /etc/restart_services.d/00-local.conf
+ fi
+ if [[ $(ls /etc/restart_services.d/) ]]; then
+ mv -v /etc/restart_services.d/* /etc/restart-services.d/
+ fi
+ if [[ -f /etc/restart_services.d/.keep_app-admin_restart_services-0 ]]; then
+ rm -v /etc/restart_services.d/.keep_app-admin_restart_services-0
+ fi
+ if [[ -d /etc/restart_services.d ]]; then
+ rmdir -v /etc/restart_services.d
+ fi
+
+ if [[ -f /etc/restart_services.conf ]]; then
+ sed -i 's/restart_services/restart-services/g' \
+ /etc/restart_services.conf
+ mv /etc/restart_services.conf /etc/restart-services.conf
+ fi
+ einfo "done"
+ fi
+ fi
+}
diff --git a/app-admin/restart_services/Manifest b/app-admin/restart_services/Manifest
deleted file mode 100644
index 3eaf79102ecf..000000000000
--- a/app-admin/restart_services/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST restart_services-0.13.0.tgz 20790 BLAKE2B 67ec5d4f32ae0c521ccea2cd13525b930ebfb96c5a4b5385ac9f24ea538cb04017550bad15116a93bbe844fd2f879dccb4f4ba28818a2ca5662018d36c68083b SHA512 778139f724f0e8f5f5a4a146ea19808f1d58717e2158570e829ed15950cf4394ecce1c2d3fe7afd6c9324b255186b9d740928c973a48aafeb4df3a38faa814ba
-DIST restart_services-0.13.1.tgz 20860 BLAKE2B 48aa801fe473fc5bd9c903a4f4b20ff71c524021aa46b517ac2d8aef3921ed3dc079ee6d477da0588772af7fd7e459ef4890d746720f553fe84b29379647715f SHA512 29983382ddf217865b4e2cde62caaba4f6a54ac20223a1fe8019e39ad0fdb61c491013444a684a0a5941965417b87abf1c25f52036649205cb16a0f12bf397ef
diff --git a/app-admin/restart_services/restart_services-0.13.0-r1.ebuild b/app-admin/restart_services/restart_services-0.13.0-r1.ebuild
deleted file mode 100644
index 02d25b888c71..000000000000
--- a/app-admin/restart_services/restart_services-0.13.0-r1.ebuild
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-DESCRIPTION="Tool to manage OpenRC 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 ~x86"
-IUSE=""
-
-DEPEND=""
-RDEPEND="
- app-admin/lib_users
- sys-apps/openrc
-"
-
-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 's/^#include/include/' "${D}"/etc/restart_services.conf
- cat>"${D}"/etc/restart_services.d/00-local.conf<<-EOF
- # 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
-}
diff --git a/app-admin/restart_services/restart_services-0.13.1.ebuild b/app-admin/restart_services/restart_services-0.13.1.ebuild
deleted file mode 100644
index 02d25b888c71..000000000000
--- a/app-admin/restart_services/restart_services-0.13.1.ebuild
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-DESCRIPTION="Tool to manage OpenRC 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 ~x86"
-IUSE=""
-
-DEPEND=""
-RDEPEND="
- app-admin/lib_users
- sys-apps/openrc
-"
-
-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 's/^#include/include/' "${D}"/etc/restart_services.conf
- cat>"${D}"/etc/restart_services.d/00-local.conf<<-EOF
- # 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
-}