Merge pull request 'feature/update' (#54) from feature/update into master
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #54
This commit is contained in:
commit
fb50fa6bfc
5 changed files with 114 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
steps:
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
*mysqld_exporter-0.12.1_p20200622 (27 Sep 2020)
|
||||
|
||||
27 Sep 2020; Manuel Friedli <manuel@gentoo.org>
|
||||
+files/mysqld_exporter-0.12.1-skip-tests.patch,
|
||||
+mysqld_exporter-0.12.1_p20200622.ebuild:
|
||||
app-metrics/mysqld_exporter: Add new ebuild.
|
||||
|
||||
*mysqld_exporter-0.11.0 (11 Nov 2019)
|
||||
|
||||
11 Nov 2019; <manuel@gentoo.org> +files/mysqld_exporter-r1.confd,
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
AUX mysqld_exporter-0.12.1-skip-tests.patch 545 BLAKE2B 02e01f23cb302dd128d47f48f9b20ded113ff37f2053e932b3d0ab510a22b14be6cb80779d2d545e774285d9772f8a6f7313c5a0c251d734e194fac992994185 SHA512 c4c808bae622797e47261824c8bfca7f7f8b04771c047440eb9ea923f45517ccc49f53cf71c7b51e3af8cd5b9c99911d80fce66e12487d87dc9d242381550cbc
|
||||
AUX mysqld_exporter-r1.confd 893 BLAKE2B bebec4ba675a5f7bfec52f0c1ad3b824f032258397dc9386892daa4d93ca1f7134c85e92c7662f9bd5b34d86478e2b3be2fc5b4adfb6fa1ece8d901ae530ec3e SHA512 3291e96479ece4f99de2c26e127469349f6197bc2764691fb4bffe5729fc9ce625fa84e2859649f0495260b339afa20edaa7bd2af99e6f161e6e6bbb153eee39
|
||||
AUX mysqld_exporter-r1.initd 2050 BLAKE2B f36d0d954e577f939f613887f86952ebf2460237df487b376237045bf1f0fae76ca0c1c7ba6359d2e702a817ff0b581984244c2263019b2f89d6d938e4b329eb SHA512 4b69f492cb240797247549f02f12577146d8df219ff51c92a494f126e0fc2382de4b1d92807669e7f2f385bff38009db0b117fe9c2c88da48e875452e35a404c
|
||||
AUX mysqld_exporter.confd 891 BLAKE2B 340b8d6b5f3fdc0a52851197cfd94b1d9d20fa3cda349c581a016c6cc7edd53cb7d86b634487551f916fd5c84294add402397cb9bf0fc2efb211b589dd571dd2 SHA512 ed4f949c8f5f88ad54c536342adf90be5d74922b54c383735a957e571aba341057830c7e8cdc0e45b53e439c5297d3ad70ba7bd178f77d10615787ed51bcc03f
|
||||
AUX mysqld_exporter.logrotate 68 BLAKE2B 04a9a0df5dae2a2afd3374cd6f6fd5d04df7629bc85ed63792ecc9e2b4772668d1f5b1fe4baf14b17c26a495ffa1ed3a7d748719db9a72f427587243505158d1 SHA512 3eb2e6bfa0eae0847c0b1e2e7fd990068cb0ad570d14463c88a8860d70ebc378b2e3bc4141f0a98e95304c972c765ae48dbff726b208ba825fe1f4e58765e462
|
||||
AUX mysqld_exporter.service 200 BLAKE2B 1053fe71dd3a1066ad5512f8ad2b40e34411365816b40f9c8f79b49a125099d0dc479c8cafce4ef4a5ca214859100324d04a1d429403dd08c4107e013f221acf SHA512 aaf7d1eb499aea03b435be24c0949f503f69759ce3507ccf08b81136ccde19d7720f42892924a701931a5ce8fdf297bf889725b789a538fed5e2f87568a95e38
|
||||
DIST mysqld_exporter-0.11.0.tar.gz 1393809 BLAKE2B ac6b04d2ad24f1c083c411f10bbb6724c2458be357ff60e1950aa624955497432295726e7f739dff03aa1ed8290d852a9511e01893f5a2b293e79b3214270578 SHA512 69f39ecc1b17bfcfd3acdad9d92a70c1daf3f0c9690770fa390a818bd29f43a98bfe4856f22b48e9d2d9945ce98ded0ea54c95010755a85ebc3ebfdc353d0c24
|
||||
DIST mysqld_exporter-0.12.1_p20200622.tar.gz 1640334 BLAKE2B fa52fd7474af548bc9429026d7c92bc543cff7f2e2f5e17007a52adc647d6d022a4ec9d099376cc469b4fdc8bab285e0e699a1b10938fc6b7a6704dcc1466a50 SHA512 ccac9a718214c9ab82362deeb81949cecaa6c2fc6567ef7e3d099ca2dbf8385cb9c498837e41ad0bcdf5ec2c9d82fd159792245b97e53c182a30917e80a20cf1
|
||||
EBUILD mysqld_exporter-0.11.0.ebuild 1958 BLAKE2B ecced5032743230e246b8813579106a1ba8099ba179261e6322d45a1bc7081c48b2e844c915fc1d6b1bffb9473967aa0821826c9558fdd79ae87043d302c4676 SHA512 5f54025d4e9e6893361eb2c5ae19fc83102ab67187fefe1a310545b2a8e799bea9666d55ff9a8dffa6941a8698f78b2160d908ef5e37495308ab4ce1ac6cbf47
|
||||
MISC ChangeLog 359 BLAKE2B fe52cf4b121f0771017562b127a49960ebad5f927776daa2d29b39933c31339f8147b45a30e2b623de534ebf828827d022b2a1405ba903e8b3c583752473af0f SHA512 28b7b9e9df366ce4563a8a6cc635fd1b85b0351f61c7a057f99c9d6d4102ba13aa4e78c1f664ac308b45529948cbe11a74f626970c0f769aadf369c05b43f10d
|
||||
EBUILD mysqld_exporter-0.12.1_p20200622.ebuild 2123 BLAKE2B a7913fac6a7893882e865c995d5f12e33c8dd43a188f7becce4d521ea674ceb8e65cd722597e38dc54ee42e73e973141ef138fd5ba5bb834040cbcc505e6c349 SHA512 983a5e9902162e3e720bb8231d03d6a2b235853e2fdbaba61ea50d5fbc2fa65a3f7d25234ea9052266c1eb6e0f4b68abe02faf04a97ef0b521b492ba2b94c360
|
||||
MISC ChangeLog 600 BLAKE2B eb783d6ba02c590b3333bae248e0f05e1ab0540dc0210078dc913c690d8dc6fed84bb224d82a8a8778600deeeae493a17bda71ce53beec9afed32b81dee0eea8 SHA512 ded63a7b722348c6afa350f0bc4a28e28871bad168a7d4243f9268add956269d010f2e9a8b17b1b14a65caa0a754e3ac54e0b9205d5bea0c5521df563fe00bbf
|
||||
MISC metadata.xml 339 BLAKE2B cc95303dfddecf9c81e77995bca8719a87cc74b9c3a95142bea4bc13d9fba4767ea7d5bdc56731e45f59a27a66dfd1e7ecb6924c737961ff30cd690c9ab250b5 SHA512 21cf66c2810306d975812118206a29d21f8ae3ed887c41c43fc66603a5901e261fe86d80e04160a7a31eaceec759f128e09b127a7c885fea0a3d06415743d022
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
--- a/collector/exporter_test.go
|
||||
+++ b/collector/exporter_test.go
|
||||
@@ -71,6 +71,8 @@ func TestExporter(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetMySQLVersion(t *testing.T) {
|
||||
+ t.Skip("Test requires running mysqld")
|
||||
+
|
||||
if testing.Short() {
|
||||
t.Skip("-short is passed, skipping test")
|
||||
}
|
||||
--- a/mysqld_exporter_test.go
|
||||
+++ b/mysqld_exporter_test.go
|
||||
@@ -142,6 +142,8 @@ type bin struct {
|
||||
|
||||
// TestBin builds, runs and tests binary.
|
||||
func TestBin(t *testing.T) {
|
||||
+ t.Skip("Test requires network access")
|
||||
+
|
||||
var err error
|
||||
binName := "mysqld_exporter"
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
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=f5d5289f7627016d8b53b0b3fa7615da8a73b56a
|
||||
MYSQLD_EXPORTER_COMMIT=f5d5289f
|
||||
|
||||
DESCRIPTION="Prometheus exporter for MySQL server metrics"
|
||||
HOMEPAGE="https://github.com/prometheus/mysqld_exporter"
|
||||
SRC_URI="https://github.com/prometheus/mysqld_exporter/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
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
|
||||
|
||||
sed -i -e "s/{{.Revision}}/${MYSQLD_EXPORTER_COMMIT}/" .promu.yml || die
|
||||
}
|
||||
|
||||
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
|
||||
}
|
Loading…
Reference in a new issue