Merge updates from master

This commit is contained in:
Repository mirror & CI
2024-06-16 23:18:46 +00:00
7 changed files with 37 additions and 243 deletions
-3
View File
@@ -1,5 +1,2 @@
DIST redis_exporter-1.38.0-deps.tar.xz 103185452 BLAKE2B a144d70cd20887dca660fc4f4d2d2ce16dc8463ef0906499c730acb11d717d5c5cf8ab9985ffafd4f9c0cf93c677b2e98895a3b48e9f2e1a2813de96e536d89d SHA512 31927c0dfc4c960ad3a91be387fa6b7b2603a6b9c9927b9d50ae9986beae866eb1c04cbcb2699265fecf201bda83e16746e4c8991b8f4560248c19d17c2744e4
DIST redis_exporter-1.40.0.tar.gz 188796 BLAKE2B f2bb4d05129f4644d58fae005c13737f76222d32c08b9938a4b4fbb8c5000a6a00529204d839b96ae53f489183caf01ecb113535648cd80b0e9d3872ad35a8b1 SHA512 0909f71b32434bd2b47db505cd48cd5d34c4c7cfa04b513ff53c265bbd6b91c15f4e7bcf18e4b4e1c52940dafe53eed43ab9ae4db33071cd827a6d798878736b
DIST redis_exporter-1.43.0.tar.gz 189579 BLAKE2B 9340ed4710c8d3277bdd562555269b18fd2691b669f507c2306534848815edda8730e0aa718c6b159ba83b91fc89f99dc4480380e950c5f8e662931621a413d3 SHA512 3d2b6d5b58347ddf826de06d60571ef8962078c8ab03647b8f1a91fcdbe2b7e9be015335d09109b21471ee06a59d5e1ad947d9e1bbc681e430c270dc01ae48f2
DIST redis_exporter-1.44.0-deps.tar.xz 103514884 BLAKE2B 14531f87fa3c19ab791b77b39687534b66da199012337b72817f2624a7a679424f1a279a3b888eacb34c0cd7a5d0d51cc8fe3c63c92036cbc320b7e9d9d70c7c SHA512 ee8ceb663c15e18991903dab3b4a5dbf2981e040694e02bcd0ff81e5690a8fbdefb775e4ccc2bfcbb7bf757f5023f3ed5ae0c918779682c55ef4d9e11181da55
DIST redis_exporter-1.44.0.tar.gz 190542 BLAKE2B 29228825e796def0bfe54ece2e09277fbdb614171e90f02b11b904a14a114aafe6f6810fafad19b2d56749f2edcab13bf03a0ed376310c39a5855715bfef2d53 SHA512 29dd210c23258c896e227d373b2c380a61b6a031f919b3da40ba2fb926f3fa534a2b1478e064b19496675935772bdad8ff490485625c1de4d470f377293efafb
@@ -1,55 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit go-module systemd
EGIT_COMMIT=3a743038c6c5a80d10ce45a3fbd49412262c300b
DESCRIPTION="Prometheus Exporter for Redis Metrics. Supports Redis 2.x, 3.x and 4.x"
HOMEPAGE="https://github.com/oliver006/redis_exporter"
SRC_URI="https://github.com/oliver006/redis_exporter/archive/v${PV}.tar.gz -> ${P}.tar.gz
https://dev.gentoo.org/~zmedico/dist/redis_exporter-1.38.0-deps.tar.xz"
LICENSE="MIT Apache-2.0 BSD"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""
RDEPEND="
acct-user/redis_exporter
acct-group/redis_exporter"
DEPEND="${RDEPEND}"
RESTRICT+=" test"
src_prepare() {
default
sed -e "s|\(^[[:space:]]*VERSION[[:space:]]*=[[:space:]]*\).*|\1\"${PV}\"|" \
-e "s|\(^[[:space:]]*BUILD_DATE[[:space:]]*=[[:space:]]*\).*|\1\"$(LC_ALL=C date -u)\"|" \
-e "s|\(^[[:space:]]*COMMIT_SHA1[[:space:]]*=[[:space:]]*\).*|\1\"${EGIT_COMMIT}\"|" \
-i main.go || die
}
src_compile() {
export GOBIN="${S}/bin"
go install \
-ldflags="-X main.BuildVersion=${PV} -X main.BuildCommitSha=${EGIT_COMMIT} -X main.BuildDate=$(date +%F-%T)" \
./... || die
}
src_test() {
go test -work ./... || die
}
src_install() {
dobin "${GOBIN}/redis_exporter"
dodoc README.md
local dir
for dir in /var/{lib,log}/${PN}; do
keepdir "${dir}"
fowners ${PN}:${PN} "${dir}"
done
newinitd "${FILESDIR}"/${PN}.initd ${PN}
newconfd "${FILESDIR}"/${PN}.confd ${PN}
insinto /etc/logrotate.d
newins "${FILESDIR}/${PN}.logrotated" "${PN}"
systemd_dounit "${FILESDIR}/${PN}.service"
}
@@ -1,55 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit go-module systemd
EGIT_COMMIT=980a9741e77c4e065faba80805f93d4694d71d67
DESCRIPTION="Prometheus Exporter for Redis Metrics. Supports Redis 2.x, 3.x and 4.x"
HOMEPAGE="https://github.com/oliver006/redis_exporter"
SRC_URI="https://github.com/oliver006/redis_exporter/archive/v${PV}.tar.gz -> ${P}.tar.gz
https://dev.gentoo.org/~zmedico/dist/redis_exporter-1.38.0-deps.tar.xz"
LICENSE="MIT Apache-2.0 BSD"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""
RDEPEND="
acct-user/redis_exporter
acct-group/redis_exporter"
DEPEND="${RDEPEND}"
RESTRICT+=" test"
src_prepare() {
default
sed -e "s|\(^[[:space:]]*VERSION[[:space:]]*=[[:space:]]*\).*|\1\"${PV}\"|" \
-e "s|\(^[[:space:]]*BUILD_DATE[[:space:]]*=[[:space:]]*\).*|\1\"$(LC_ALL=C date -u)\"|" \
-e "s|\(^[[:space:]]*COMMIT_SHA1[[:space:]]*=[[:space:]]*\).*|\1\"${EGIT_COMMIT}\"|" \
-i main.go || die
}
src_compile() {
export GOBIN="${S}/bin"
go install \
-ldflags="-X main.BuildVersion=${PV} -X main.BuildCommitSha=${EGIT_COMMIT} -X main.BuildDate=$(date +%F-%T)" \
./... || die
}
src_test() {
go test -work ./... || die
}
src_install() {
dobin "${GOBIN}/redis_exporter"
dodoc README.md
local dir
for dir in /var/{lib,log}/${PN}; do
keepdir "${dir}"
fowners ${PN}:${PN} "${dir}"
done
newinitd "${FILESDIR}"/${PN}.initd ${PN}
newconfd "${FILESDIR}"/${PN}.confd ${PN}
insinto /etc/logrotate.d
newins "${FILESDIR}/${PN}.logrotated" "${PN}"
systemd_dounit "${FILESDIR}/${PN}.service"
}
+2
View File
@@ -1,2 +1,4 @@
DIST yq-4.44.1-deps.tar.xz 1359068 BLAKE2B 5db0af65b75dab0148e6167d9264e7601e3f07f26d16d63387820c96d9ac28d91a57c81b300d4dd225f0a4941ce43dde4c5e27391ea9603f6862a9cf8c6564f5 SHA512 1670aa675e1776d2ed761c482e29920e1d200bd612e68dd22b62c6d93c8c188ef88ca35262d1f21423924d1337260991e815e332f6af312ea474c5f61226bbff
DIST yq-4.44.1.tar.gz 296499 BLAKE2B 6cbcc69acead2ae471e91baccc3fcc3853bba0ade0e707307c9fb724bafc1c51905a9cefb86d7d09b056b01b2c404bc30692f47e293df0894ad3b32ad67c22dd SHA512 afcec4e6f99f38a342a91aff34823823e32df0498c8e617314945a00d2161d28bfcc603dcaac2eb95d510bc57fe63ca2aebf1966b7420536be42f8102564314f
DIST yq-4.44.2-deps.tar.xz 1376032 BLAKE2B ddb988d0eea1aa444ad952ee0aa57d54a6276c7f4a1c5113aa85f1793789efcdb818d0d06a4def1d66e013f1351dfb430a3013770032abd453737cc7e7455540 SHA512 459e45068e8048a0ca14a024d3114260437f20426b30351c80e9ee4877dd7ef175c52e54a63dc9e131aaad6a3eac8b7777361b23f0f06e7257f8b45f20c5dda0
DIST yq-4.44.2.tar.gz 297469 BLAKE2B 912436af43b94cd5dc12ac5a9ff04071f35123632b950da1c5324e9ccc4b931815da92f75067055041f9dbe02a3948f716655e7dfe3feb9cab2969ee52f69fc2 SHA512 8b81c617dde83487445b8a85f34bb28a363238f58b6b06d7e4b5c3becdafde8f62702acd71ed33eb85601f66e2abec80edbbf1490df90eb67ece55948254c263
+35
View File
@@ -0,0 +1,35 @@
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module
DESCRIPTION="yq is a lightweight and portable command-line YAML, JSON and XML processor"
HOMEPAGE="https://github.com/mikefarah/yq"
SRC_URI="https://github.com/mikefarah/yq/archive/refs/tags/v${PV}.tar.gz -> ${P/-go/}.tar.gz
https://dev.gentoo.org/~zmedico/dist/${P/-go/}-deps.tar.xz"
S=${WORKDIR}/${P/-go/}
LICENSE="MIT"
LICENSE+=" Apache-2.0 BSD BSD-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE="+yq-symlink"
DOCS=(README.md)
RDEPEND="yq-symlink? ( !app-misc/yq[yq-symlink(+)] )"
src_compile() {
CGO_ENABLED=0 ego build -ldflags "-X main.GitDescribe=v${PV} -s -w"
}
src_install() {
einstalldocs
newbin yq yq-go
if use yq-symlink; then
dosym yq-go /usr/bin/yq
fi
}
src_test() {
./scripts/test.sh || die
}
-1
View File
@@ -1,5 +1,4 @@
DIST caddy-2.7.6-docs.tar.gz 24583 BLAKE2B d3dbbb701d86cbfaf538f10911fdd3613b8c3c0f49ef9e229487d2a4fcef9eff79b56e9852d5c1ccd5a8d1d1898861fc8183c343c129901562b03a9092af9e61 SHA512 62e534d41e714b47265fd8089ad9e03a1a89903460976d8af27fa5f71173e076bab8574282213595e495be701b769e1a70ff9e7ec9576fbf8e821e672207faa5
DIST caddy-2.7.6-r1-deps.tar.xz 129331604 BLAKE2B 50b83c012c70637936c83ec765758cdcd80014ca224d76a746de8640a6b36ae15ce11ec57d9fdb20a5f7b3add946209c6dde7bb4e4bd4a47ffe3ffc8971725db SHA512 a4bc56de4f7ec8e9967dde3d7ca4cbb74cba9ce0b8906ffe16f8dae3f52fff1164827942df8154eadbae80cce3ee603535b9135cf8a5126d84a9017e8aece078
DIST caddy-2.7.6-r2-deps.tar.xz 8511804 BLAKE2B ad3c78ee483474754ad83284fabf249c376423217c2929740cd171446d0e755f121e380130c80f291422d39ca69ea7e6ac52f5ce5cdec740616099b665cef5af SHA512 c48d299d9a0b27ebe467f64dc433625de26293674d8153122ad6798a6b95ed4fe55f764a18d3e9211a8e2f966724d20996f1789e2e84dbb0181cfcf5340303fb
DIST caddy-2.7.6.tar.gz 606077 BLAKE2B 1237edc164ec6095c9dff27c332925c4ce9d91a60e629770463bbffb1503b8b11e36033e852df3eb5bb69ffa448833b6ee2891dc0ba6dc9b43b6cce27d492179 SHA512 ef0cb6fd7f6f2a296290b4bb520300e043ad31cc612e734632ffa25cdaa23fd7d601ac4ceaa1c76285d54a07ee773360f795103ef3c2ec79516a4f18a5e844b5
DIST caddy-2.8.0_beta2-deps.tar.xz 9983432 BLAKE2B 5ce369219b03688a18f01d7e0f14158a4831bdb02f90c9d4cd2554c8a516f8575155473134197c58c6b65b8752b2fc6a2cdf56b4eaacde20a01233c3f5b1dd38 SHA512 e4fd9432adb4cc98b1f765d5b7f3920030fc433e838a5b7f388f8ba220fe0f23e0c0ce5da01507e3241d03f3e7f010a49dde6ba49402f363fb005bb879c2c1a6
-129
View File
@@ -1,129 +0,0 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit fcaps go-module systemd shell-completion
DESCRIPTION="Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS"
HOMEPAGE="https://caddyserver.com"
if [[ "${PV}" == 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/caddyserver/caddy.git"
else
SRC_URI="
https://github.com/caddyserver/caddy/archive/v${PV}.tar.gz -> ${P}.tar.gz
https://dev.gentoo.org/~zmedico/dist/${PF}-deps.tar.xz
https://github.com/caddyserver/dist/archive/refs/tags/v${PV}.tar.gz -> ${P}-docs.tar.gz
"
KEYWORDS="amd64 arm64 ~loong ~riscv"
fi
# MAIN
LICENSE="Apache-2.0"
# deps
LICENSE+=" BSD ECL-2.0 MIT CC0-1.0"
SLOT="0"
IUSE='events-handlers-exec'
RESTRICT="test"
RDEPEND="
acct-user/http
acct-group/http"
DEPEND="${RDEPEND}"
FILECAPS=(
-m 755 'cap_net_bind_service=+ep' usr/bin/"${PN}"
)
PATCHES=(
"${FILESDIR}"/remove-binary-altering-commands-2.7.5.patch
)
# takes a module as an only arg
add_custom_module() {
local LINE_NO=$(grep -n 'plug in Caddy modules here' cmd/caddy/main.go | awk -F: '{print $1;}')
sed -i -e "${LINE_NO:?}a \ _ \"$1\"" cmd/caddy/main.go || die
}
src_unpack() {
if [[ "${PV}" == 9999* ]]; then
# clone main git repo
git-r3_src_unpack
# get extra modules
if use events-handlers-exec; then
pushd "${P}"
add_custom_module 'github.com/mholt/caddy-events-exec' || die
ego get github.com/mholt/caddy-events-exec
popd
fi
# clone dist repo (docs and misc)
EGIT_REPO_URI="https://github.com/caddyserver/dist.git"
EGIT_CHECKOUT_DIR="${WORKDIR}/dist-${PV}"
git-r3_src_unpack
go-module_live_vendor
else
go-module_src_unpack
fi
}
src_prepare() {
default
sed -i -e "s|User=caddy|User=http|g;s|Group=caddy|Group=http|g;" ../dist-"${PV}"/init/*service || die
if use events-handlers-exec && [[ "${PV}" != 9999* ]]; then
add_custom_module 'github.com/mholt/caddy-events-exec' || die
cat <<-EOF >> go.sum || die
github.com/mholt/caddy-events-exec v0.0.0-20231121214933-055bfd2e8b82 h1:uRsPaFNQJRDrYcSsgnH0hFhCWFXfgB8QVH8yjX+u154=
github.com/mholt/caddy-events-exec v0.0.0-20231121214933-055bfd2e8b82/go.mod h1:Y9JjT8YLxpmk7PeUkvsWAhzzRdC6rXP7QjAHiwmvjD0=
EOF
cat <<-EOF >> go.mod || die
require (
github.com/mholt/caddy-events-exec v0.0.0-20231121214933-055bfd2e8b82 // indirect
)
EOF
fi
}
src_compile() {
# https://github.com/caddyserver/caddy/blob/master/caddy.go#L843
if [[ ${PV} == 9999* ]]; then
local CUSTOM_VER="git-$(git rev-parse --short HEAD)"
else
local CUSTOM_VER="${PV}"
fi
ego build -ldflags "-X github.com/caddyserver/caddy/v2.CustomVersion=${CUSTOM_VER}" ./cmd/caddy
local sh
for sh in bash fish zsh; do
./caddy completion "${sh}" > completion."${sh}" || die
done
./caddy manpage -o manpages || die
}
src_install() {
default
dobin "${PN}"
insinto /etc/"${PN}"
doins ../dist-"${PV}"/config/Caddyfile
systemd_dounit ../dist-"${PV}"/init/*.service
newinitd "${FILESDIR}"/initd-2.7.5 "${PN}"
newconfd "${FILESDIR}"/confd-2.7.5 "${PN}"
insinto /etc/logrotate.d
newins "${FILESDIR}/logrotated" "${PN}"
insinto /usr/share/"${PN}"
doins ../dist-"${PV}"/welcome/index.html
newbashcomp completion.bash "${PN}"
newfishcomp completion.fish "${PN}".fish
newzshcomp completion.zsh _"${PN}"
newdoc ../dist-"${PV}"/init/README.md systemd-services-README.md
doman manpages/*
}