From 9a6e681c54eb02175de65e4fadd0ae78418f49e3 Mon Sep 17 00:00:00 2001 From: Manuel Friedli Date: Thu, 14 Nov 2019 22:22:27 +0100 Subject: [PATCH] app-metrics/apache_exporter: Add ebuild for version 0.7.0 of apache_exporter. Package-Manager: Portage-2.3.76, Repoman-2.3.16 --- app-metrics/apache_exporter/ChangeLog | 6 +++ app-metrics/apache_exporter/Manifest | 8 +++ .../apache_exporter-0.7.0.ebuild | 52 +++++++++++++++++++ .../files/apache_exporter.confd | 2 + .../files/apache_exporter.initd | 23 ++++++++ .../files/apache_exporter.service | 10 ++++ .../files/sysconfig.apache_exporter | 1 + app-metrics/apache_exporter/metadata.xml | 11 ++++ 8 files changed, 113 insertions(+) create mode 100644 app-metrics/apache_exporter/ChangeLog create mode 100644 app-metrics/apache_exporter/Manifest create mode 100644 app-metrics/apache_exporter/apache_exporter-0.7.0.ebuild create mode 100644 app-metrics/apache_exporter/files/apache_exporter.confd create mode 100644 app-metrics/apache_exporter/files/apache_exporter.initd create mode 100644 app-metrics/apache_exporter/files/apache_exporter.service create mode 100644 app-metrics/apache_exporter/files/sysconfig.apache_exporter create mode 100644 app-metrics/apache_exporter/metadata.xml diff --git a/app-metrics/apache_exporter/ChangeLog b/app-metrics/apache_exporter/ChangeLog new file mode 100644 index 0000000..e87627a --- /dev/null +++ b/app-metrics/apache_exporter/ChangeLog @@ -0,0 +1,6 @@ +*node_exporter-0.18.1 (10 Nov 2019) + + 10 Nov 2019; +files/node_exporter-0.18.1-systemd.patch, + +files/node_exporter-1.initd, +files/node_exporter.confd, +metadata.xml, + +node_exporter-0.18.1.ebuild: + app-metrics/node_exporter: Add systemd-patched ebuild fpr version 0.18.1. diff --git a/app-metrics/apache_exporter/Manifest b/app-metrics/apache_exporter/Manifest new file mode 100644 index 0000000..639cb98 --- /dev/null +++ b/app-metrics/apache_exporter/Manifest @@ -0,0 +1,8 @@ +AUX apache_exporter.confd 59 BLAKE2B 4466ae408352adc136fa882cf382c1562e8e0b6401edf8e5a8633d3736da20ecd3b2e10b0b2e6b2cbec30c74ea6aeac930863ff18568e2144544539306b79208 SHA512 eaf040d612155e8ed5359124283a591559b720170583a654a06d0b5e480cc9e99c1bcba97cffca03816f3c2b49d304e183f997067d325636ec71a33118a45df9 +AUX apache_exporter.initd 650 BLAKE2B 86d014a2bb4f98a54a5e98060884bb99d1ec4011ce028a981d9d39cc5a5292c39018a80df2a3f0ad4b97aa1a0da059e89ad151f0a0b3d13d6ba6386aa4a9d6d4 SHA512 42367bb35b79cb3c4946ae57e81fa918d94b9b5613469e1e070797ffc9ab7ae74aaa3ad244be35cef8fe5df043fb5e1a604449c3a416e01da7cb11ad95c2b5b1 +AUX apache_exporter.service 222 BLAKE2B 9f15ab491721873b60d75ea7e5fde68c4262cd56ee3b4b1b5b687cd7fe6f4b03c97ee96c863769985dd14ba4bb8f0047061d52b642e5fd9ca77ada18e8e17f6c SHA512 6f99413a18f6c5214fa6216399c249b80950e16277a91ccc9c1ef89c452efa806234dd3735e9110e26f9e110f1a2156fd5ab37b56107ba753daa16d9100156d6 +AUX sysconfig.apache_exporter 11 BLAKE2B e83c8a1c6cf0d2269d032d80bfb5f37969adce8655298d49f942e19318e1fcabe7f618514ce65d9e0209959d5ccb38141e81fcccd65a754584eaf2db3b4fbd03 SHA512 f4d982f86de30c5b52b04c201cd38fffa87f860bef18af6ab85e856ae2081b919256b918b5f4821ee2fc4da0548d1a95c2522b29cddca57f694e2f26c1b1b2b9 +DIST apache_exporter-0.7.0.tar.gz 987330 BLAKE2B 32bc61767a2b84630c63c5cab31bcec2446a508870334ef1d952a7cf6fd7e8e5868f1059972f9c3c8be2cdc93a3eef56a67814586e31bca7377237690fee7b5d SHA512 c4193bc665e7de292e208e2df8bdb1d261e06bd8e9dd8f9c8ca36928f90bdaa792e3e648955d68acc79502eaf0245e41d8a238d60c839bbd2a46ec928d114950 +EBUILD apache_exporter-0.7.0.ebuild 1403 BLAKE2B aa13362b23d0fb6e08c2523b4e97d54737f7e4bed0753de4c0ce85cb5996064c7e8b111fcf93d50586918a0b472b54993fe0cc4297dbd873601dd9597e5f50cf SHA512 27f3d0a1c8458cc035364ea53bbfebb7b6747dc0064eba4b1274525fdd010019bd920ba82e8ea4fdb5c2a7383e6c23fc8422720d402f04ae1e374a6a7f1b37dd +MISC ChangeLog 299 BLAKE2B 6c0510ec5b7739758aee9e21c3fc8344f4d48f3aa357af0c5f0ccb3698b6c0658faaa48860ee08e0550c1b72c52dd881637355f482dcdfd85c12847c80b155eb SHA512 e6b541e8d5c21adc241b02578552f73309d30d2fb6006fd70f16850fdeb18b9cf4b7dcd838295537f6eba318cddaaf05831a9db204f953e7bb86249a5a703753 +MISC metadata.xml 337 BLAKE2B bd72b6097fead5eaf80082790d3712ae0893b118140b62f58639f0e5c56bebf57dbd0ccd0ea19af82b2dce88c88c494d88290f98df4818e4fad3f4386398d171 SHA512 aee4825d8b90a8fd84fb558b9af4b7eb889fcf81bae6c7b317a9d69f62b06dd0f0bc2aa91aa2c32f10ff91fdbf64b341d7e5adc3c65a5225c7e0e92d7a6b7816 diff --git a/app-metrics/apache_exporter/apache_exporter-0.7.0.ebuild b/app-metrics/apache_exporter/apache_exporter-0.7.0.ebuild new file mode 100644 index 0000000..24080f4 --- /dev/null +++ b/app-metrics/apache_exporter/apache_exporter-0.7.0.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit user golang-build golang-vcs-snapshot systemd + +EGO_PN="github.com/Lusitaniae/apache_exporter" +EGIT_COMMIT="v${PV/_rc/-rc.}" +APACHE_EXPORTER_COMMIT="6195241" +ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" +KEYWORDS="~amd64" + +DESCRIPTION="Prometheus exporter for apache metrics" +HOMEPAGE="https://github.com/Lusitaniae/apache_exporter" +SRC_URI="${ARCHIVE_URI}" +LICENSE="MIT" +SLOT="0" +IUSE="" + +DEPEND=">=dev-lang/go-1.12 + >=dev-util/promu-0.3.0" + +pkg_setup() { +echo enewgroup ${PN} +echo enewuser ${PN} -1 -1 -1 ${PN} +} + +src_prepare() { + default + sed -i -e "s/{{.Revision}}/${APACHE_EXPORTER_COMMIT}/" src/${EGO_PN}/.promu.yml || die +} + +src_compile() { + pushd src/${EGO_PN} || die + mkdir -p bin || die + GO111MODULE=on GOPATH="${S}" GOCACHE="${T}"/go-cache promu build -v --prefix apache_exporter || die + popd || die +} + +src_install() { + pushd src/${EGO_PN} || die + dobin apache_exporter/apache_exporter + dodoc README.md + systemd_dounit "${FILESDIR}/${PN}.service" + insinto /etc/sysconfig/apache_exporter + doins "${FILESDIR}/sysconfig.apache_exporter" + popd || die + keepdir /var/log/apache_exporter +echo fowners ${PN}:${PN} /var/lib/apache_exporter /var/log/apache_exporter + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} +} diff --git a/app-metrics/apache_exporter/files/apache_exporter.confd b/app-metrics/apache_exporter/files/apache_exporter.confd new file mode 100644 index 0000000..63767d9 --- /dev/null +++ b/app-metrics/apache_exporter/files/apache_exporter.confd @@ -0,0 +1,2 @@ +# arguments for prometheus apache exporter +command_args="" diff --git a/app-metrics/apache_exporter/files/apache_exporter.initd b/app-metrics/apache_exporter/files/apache_exporter.initd new file mode 100644 index 0000000..fb7bf0a --- /dev/null +++ b/app-metrics/apache_exporter/files/apache_exporter.initd @@ -0,0 +1,23 @@ +#!/sbin/openrc-run +# Copyright 2016-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="Prometheus apache metrics exporter" +pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"} +user=${user:-${RC_SVCNAME}} +group=${group:-${RC_SVCNAME}} + +command="/usr/bin/apache_exporter" +command_args="${command_args:-}" +command_background="true" +start_stop_daemon_args="--user ${user} --group ${group} \ + --stdout /var/log/apache_exporter/${RC_SVCNAME}.log \ + --stderr /var/log/apache_exporter/${RC_SVCNAME}.log" + +depend() { + after net +} + +start_pre() { + checkpath -q -d -m 0755 -o ${user}:${group} /var/log/apache_exporter +} diff --git a/app-metrics/apache_exporter/files/apache_exporter.service b/app-metrics/apache_exporter/files/apache_exporter.service new file mode 100644 index 0000000..f8c9ed9 --- /dev/null +++ b/app-metrics/apache_exporter/files/apache_exporter.service @@ -0,0 +1,10 @@ +[Unit] +Description=Apache Exporter + +[Service] +User=apache_exporter +EnvironmentFile=/etc/sysconfig/apache_exporter/sysconfig.apache_exporter +ExecStart=/usr/bin/apache_exporter $OPTIONS + +[Install] +WantedBy=multi-user.target diff --git a/app-metrics/apache_exporter/files/sysconfig.apache_exporter b/app-metrics/apache_exporter/files/sysconfig.apache_exporter new file mode 100644 index 0000000..9186ef7 --- /dev/null +++ b/app-metrics/apache_exporter/files/sysconfig.apache_exporter @@ -0,0 +1 @@ +OPTIONS="" diff --git a/app-metrics/apache_exporter/metadata.xml b/app-metrics/apache_exporter/metadata.xml new file mode 100644 index 0000000..b92cc03 --- /dev/null +++ b/app-metrics/apache_exporter/metadata.xml @@ -0,0 +1,11 @@ + + + + + manuel@fritteli.ch + Manuel Friedli + + + prometheus/node_exporter + +