Add latest version of mysqld_exporter.
Signed-off-by: Manuel Friedli <manuel@fritteli.ch>
This commit is contained in:
parent
be9c6d9676
commit
f99f128d05
3 changed files with 114 additions and 0 deletions
|
@ -5,6 +5,9 @@ AUX mysqld_exporter.confd 891 BLAKE2B 340b8d6b5f3fdc0a52851197cfd94b1d9d20fa3cda
|
||||||
AUX mysqld_exporter.logrotate 68 BLAKE2B 04a9a0df5dae2a2afd3374cd6f6fd5d04df7629bc85ed63792ecc9e2b4772668d1f5b1fe4baf14b17c26a495ffa1ed3a7d748719db9a72f427587243505158d1 SHA512 3eb2e6bfa0eae0847c0b1e2e7fd990068cb0ad570d14463c88a8860d70ebc378b2e3bc4141f0a98e95304c972c765ae48dbff726b208ba825fe1f4e58765e462
|
AUX mysqld_exporter.logrotate 68 BLAKE2B 04a9a0df5dae2a2afd3374cd6f6fd5d04df7629bc85ed63792ecc9e2b4772668d1f5b1fe4baf14b17c26a495ffa1ed3a7d748719db9a72f427587243505158d1 SHA512 3eb2e6bfa0eae0847c0b1e2e7fd990068cb0ad570d14463c88a8860d70ebc378b2e3bc4141f0a98e95304c972c765ae48dbff726b208ba825fe1f4e58765e462
|
||||||
AUX mysqld_exporter.service 200 BLAKE2B 1053fe71dd3a1066ad5512f8ad2b40e34411365816b40f9c8f79b49a125099d0dc479c8cafce4ef4a5ca214859100324d04a1d429403dd08c4107e013f221acf SHA512 aaf7d1eb499aea03b435be24c0949f503f69759ce3507ccf08b81136ccde19d7720f42892924a701931a5ce8fdf297bf889725b789a538fed5e2f87568a95e38
|
AUX mysqld_exporter.service 200 BLAKE2B 1053fe71dd3a1066ad5512f8ad2b40e34411365816b40f9c8f79b49a125099d0dc479c8cafce4ef4a5ca214859100324d04a1d429403dd08c4107e013f221acf SHA512 aaf7d1eb499aea03b435be24c0949f503f69759ce3507ccf08b81136ccde19d7720f42892924a701931a5ce8fdf297bf889725b789a538fed5e2f87568a95e38
|
||||||
DIST mysqld_exporter-0.12.1_p20200622.tar.gz 1640334 BLAKE2B fa52fd7474af548bc9429026d7c92bc543cff7f2e2f5e17007a52adc647d6d022a4ec9d099376cc469b4fdc8bab285e0e699a1b10938fc6b7a6704dcc1466a50 SHA512 ccac9a718214c9ab82362deeb81949cecaa6c2fc6567ef7e3d099ca2dbf8385cb9c498837e41ad0bcdf5ec2c9d82fd159792245b97e53c182a30917e80a20cf1
|
DIST mysqld_exporter-0.12.1_p20200622.tar.gz 1640334 BLAKE2B fa52fd7474af548bc9429026d7c92bc543cff7f2e2f5e17007a52adc647d6d022a4ec9d099376cc469b4fdc8bab285e0e699a1b10938fc6b7a6704dcc1466a50 SHA512 ccac9a718214c9ab82362deeb81949cecaa6c2fc6567ef7e3d099ca2dbf8385cb9c498837e41ad0bcdf5ec2c9d82fd159792245b97e53c182a30917e80a20cf1
|
||||||
|
DIST mysqld_exporter-0.14.0_p20230328.tar.gz 92865 BLAKE2B 490219444b14006a356fa423b21c851693cf97f9aa6a9d20e8ee732ae8af5aed07aeda04a3419aebe26051f00c60f5655c3479c4ec3d5a2c9c18b44218cdc3b4 SHA512 a12aeb676ba81732310599344292f8cd5680abd14d8b380ae2d57198530de1969a5712619eca195e5d7b65abf518de7877789f494a9a4fbcebf42e3c8e35dac8
|
||||||
|
DIST mysqld_exporter-fad2c0ccd8c0df8fed91a81463e930e4485fdfee-vendor.tar.xz 1473744 BLAKE2B 64f4f9dfee04522dbebdc9682c2619cc0f5c63b0835cfca50a37d0cce542e6a926968e23fe94a13d2e76cfbf931026cdcff74823c6c464b1b2f551bf0c70a5cf SHA512 aa10101fd5bc5a2fdef367c855f85d10ebb38b8a92969c5ebf786f011a287f9992559805b8ed24ea39da4db8aedbaf12893a2c6049ea7e90e989adf1ed13d79f
|
||||||
EBUILD mysqld_exporter-0.12.1_p20200622-r1.ebuild 2124 BLAKE2B 3f562674f8fced90187c842a37c9693679a381aa287d4e2f318cbf98a3728410e4d68cf17a0c55bc2b7e1adf9803f73373fe03ca91d0f49f593285de2ecf69c6 SHA512 6933c29436c2f0ea48b5e58608c9b5d8a7de7f7bf7c10d17ef4c6380844ca82faa7ef301d2dc596deb1070494dc43225d309fe32955e32accd04965804a86c70
|
EBUILD mysqld_exporter-0.12.1_p20200622-r1.ebuild 2124 BLAKE2B 3f562674f8fced90187c842a37c9693679a381aa287d4e2f318cbf98a3728410e4d68cf17a0c55bc2b7e1adf9803f73373fe03ca91d0f49f593285de2ecf69c6 SHA512 6933c29436c2f0ea48b5e58608c9b5d8a7de7f7bf7c10d17ef4c6380844ca82faa7ef301d2dc596deb1070494dc43225d309fe32955e32accd04965804a86c70
|
||||||
|
EBUILD mysqld_exporter-0.14.0_p20230328.ebuild 2589 BLAKE2B 439197edcf1c0d9df088a27a05950f5a6073052eae709442feacb2249e75975aa529cc8e402cfd94527995945965e123cf436ecc88dedbe58adbf8b08e1707c2 SHA512 20322795b40814972ddc6a57515251f3b358fb84886b60f44d973315a453d05c460cb5d118948e5f5ceb4db1b7d034110a54f16a3e996a003756af811b56010c
|
||||||
MISC ChangeLog 733 BLAKE2B f524170f97aac958542aa79a0c383e2d018bb8aa7a886f34b8f801bd95199e6fec3d065b53ad91b793d48979fc33a8915a3d499eed52e3ea82fa2ae0ad1422d1 SHA512 9eb13634368e353219cf63f07167fb5841bd90041e6d2e1bb1026a37cb6dd141f016c07442547a1a3d79b290e478f27f80a8238725f92988e752342a58561da6
|
MISC ChangeLog 733 BLAKE2B f524170f97aac958542aa79a0c383e2d018bb8aa7a886f34b8f801bd95199e6fec3d065b53ad91b793d48979fc33a8915a3d499eed52e3ea82fa2ae0ad1422d1 SHA512 9eb13634368e353219cf63f07167fb5841bd90041e6d2e1bb1026a37cb6dd141f016c07442547a1a3d79b290e478f27f80a8238725f92988e752342a58561da6
|
||||||
MISC metadata.xml 339 BLAKE2B cc95303dfddecf9c81e77995bca8719a87cc74b9c3a95142bea4bc13d9fba4767ea7d5bdc56731e45f59a27a66dfd1e7ecb6924c737961ff30cd690c9ab250b5 SHA512 21cf66c2810306d975812118206a29d21f8ae3ed887c41c43fc66603a5901e261fe86d80e04160a7a31eaceec759f128e09b127a7c885fea0a3d06415743d022
|
MISC metadata.xml 339 BLAKE2B cc95303dfddecf9c81e77995bca8719a87cc74b9c3a95142bea4bc13d9fba4767ea7d5bdc56731e45f59a27a66dfd1e7ecb6924c737961ff30cd690c9ab250b5 SHA512 21cf66c2810306d975812118206a29d21f8ae3ed887c41c43fc66603a5901e261fe86d80e04160a7a31eaceec759f128e09b127a7c885fea0a3d06415743d022
|
||||||
|
|
|
@ -0,0 +1,96 @@
|
||||||
|
# Copyright 1999-2022 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
inherit go-module systemd
|
||||||
|
# uncomment the first setting of MY_PV for a normal release
|
||||||
|
# MY_PV="v${PV/_rc/-rc.}"
|
||||||
|
# set MY_PV to the full commit hash for a snapshot release
|
||||||
|
MY_PV_HASH=fad2c0ccd8c0df8fed91a81463e930e4485fdfee
|
||||||
|
: ${MY_PV_HASH_FOR_VENDOR:=${MY_PV_HASH}}
|
||||||
|
if [[ -n "${MY_PV_HASH}" ]]; then
|
||||||
|
MY_PV=${MY_PV_HASH}
|
||||||
|
MYSQLD_EXPORTER_COMMIT=${MY_PV_HASH:0:8}
|
||||||
|
SRC_URI_UPSTREAM="https://github.com/prometheus/mysqld_exporter/archive/${MY_PV}.tar.gz"
|
||||||
|
else
|
||||||
|
MY_PV=$PV
|
||||||
|
MYSQLD_EXPORTER_COMMIT=
|
||||||
|
SRC_URI_UPSTREAM="https://github.com/prometheus/mysqld_exporter/archive/refs/tags/v${PV}.tar.gz"
|
||||||
|
fi
|
||||||
|
MY_P=${PN}-${MY_PV}
|
||||||
|
SRC_URI_VENDOR="https://dev.gentoo.org/~robbat2/distfiles/${MY_P}-vendor.tar.xz"
|
||||||
|
|
||||||
|
DESCRIPTION="Prometheus exporter for MySQL server metrics"
|
||||||
|
HOMEPAGE="https://github.com/prometheus/mysqld_exporter"
|
||||||
|
SRC_URI="
|
||||||
|
${SRC_URI_UPSTREAM} -> ${P}.tar.gz
|
||||||
|
${SRC_URI_VENDOR}
|
||||||
|
"
|
||||||
|
|
||||||
|
LICENSE="Apache-2.0 BSD BSD-2 MIT MPL-2.0"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64"
|
||||||
|
IUSE=""
|
||||||
|
|
||||||
|
BDEPEND="dev-util/promu"
|
||||||
|
|
||||||
|
DEPEND="acct-group/mysqld_exporter
|
||||||
|
acct-user/mysqld_exporter"
|
||||||
|
|
||||||
|
RDEPEND="${DEPEND}"
|
||||||
|
|
||||||
|
# Comment this for a normal release.
|
||||||
|
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||||
|
|
||||||
|
PATCHES=( "${FILESDIR}"/${PN}-0.12.1-skip-tests.patch )
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
|
||||||
|
if [[ -n $MYSQLD_EXPORTER_COMMIT ]]; then
|
||||||
|
sed -i -e "s/{{.Revision}}/${MYSQLD_EXPORTER_COMMIT}/" .promu.yml || die
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
mkdir -p bin || die
|
||||||
|
|
||||||
|
promu build --prefix bin || die
|
||||||
|
|
||||||
|
# comment this for a normal release.
|
||||||
|
mv bin/${PN}-${MY_PV} bin/${PN} || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
dobin bin/*
|
||||||
|
dodoc {README,CHANGELOG,CONTRIBUTING}.md
|
||||||
|
|
||||||
|
keepdir /var/lib/mysqld_exporter /var/log/mysqld_exporter
|
||||||
|
fowners ${PN}:${PN} /var/lib/mysqld_exporter /var/log/mysqld_exporter
|
||||||
|
fperms 0770 /var/lib/mysqld_exporter
|
||||||
|
|
||||||
|
newinitd "${FILESDIR}"/${PN}-r1.initd ${PN}
|
||||||
|
newconfd "${FILESDIR}"/${PN}-r1.confd ${PN}
|
||||||
|
|
||||||
|
systemd_dounit "${FILESDIR}"/${PN}.service
|
||||||
|
|
||||||
|
insinto /etc/logrotate.d/
|
||||||
|
newins "${FILESDIR}"/${PN}.logrotate ${PN}
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
if [[ -z "${REPLACING_VERSIONS}" ]]; then
|
||||||
|
# This is a new installation
|
||||||
|
elog "Create \"${EROOT}/var/lib/mysqld_exporter/.my.cnf\" to read MySQL credentials from file."
|
||||||
|
else
|
||||||
|
local _replacing_version=
|
||||||
|
for _replacing_version in ${REPLACING_VERSIONS}; do
|
||||||
|
if ! ver_test "${_replacing_version}" -ge "0.11.0"; then
|
||||||
|
elog "Starting with ${PN}-0.11.0, command-line flags will require double dashes (--)."
|
||||||
|
elog "You must update your configuration or ${PN} won't start."
|
||||||
|
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
BDEPEND=dev-util/promu >=dev-lang/go-1.18 app-arch/unzip virtual/pkgconfig
|
||||||
|
DEFINED_PHASES=compile install postinst prepare unpack
|
||||||
|
DEPEND=acct-group/mysqld_exporter acct-user/mysqld_exporter
|
||||||
|
DESCRIPTION=Prometheus exporter for MySQL server metrics
|
||||||
|
EAPI=8
|
||||||
|
HOMEPAGE=https://github.com/prometheus/mysqld_exporter
|
||||||
|
INHERIT=go-module systemd
|
||||||
|
KEYWORDS=~amd64
|
||||||
|
LICENSE=Apache-2.0 BSD BSD-2 MIT MPL-2.0
|
||||||
|
RDEPEND=acct-group/mysqld_exporter acct-user/mysqld_exporter
|
||||||
|
RESTRICT=strip
|
||||||
|
SLOT=0
|
||||||
|
SRC_URI=https://github.com/prometheus/mysqld_exporter/archive/fad2c0ccd8c0df8fed91a81463e930e4485fdfee.tar.gz -> mysqld_exporter-0.14.0_p20230328.tar.gz https://dev.gentoo.org/~robbat2/distfiles/mysqld_exporter-fad2c0ccd8c0df8fed91a81463e930e4485fdfee-vendor.tar.xz
|
||||||
|
_eclasses_=multiprocessing b4e253ab22cef7b1085e9b67c7a3b730 toolchain-funcs 14a8ae365191b518fad51caad7a08f3e multilib 104e1332efb829e2f7cbf89307a474f1 go-module 9c75e51a48520b2f01471c1f91762882 systemd 5f4bb0758df2e483babf68cd517078ca
|
||||||
|
_md5_=3ff4c2be3ebc2f673a7e8c96c4a51bb7
|
Loading…
Reference in a new issue