summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2024-03-24 18:54:34 -0700
committerZac Medico <zmedico@gentoo.org>2024-03-24 18:57:14 -0700
commit0fca5ba6eefb64975aef368b4d6b3244b1e5066f (patch)
tree3d1932b8111ca2a32613f14c89e8f720e77d8030 /dev-db
parentapp-portage/mirrorselect: Switch to unittest framework (diff)
downloadgentoo-0fca5ba6eefb64975aef368b4d6b3244b1e5066f.tar.gz
gentoo-0fca5ba6eefb64975aef368b4d6b3244b1e5066f.tar.bz2
gentoo-0fca5ba6eefb64975aef368b4d6b3244b1e5066f.zip
dev-db/etcd: add 3.5.12
For the 3.5.12 dependency tarball I've reduced the size by using `go mod vendor` for most of the dependencies (I've been doing this since https://github.com/gentoo/gentoo/pull/35773) and then just using a go-mod directory created like this: GOMODCACHE="${PWD}/../go-mod" go mod download -modcacherw go.etcd.io/gofail@v0.1.0 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/etcd/Manifest2
-rw-r--r--dev-db/etcd/etcd-3.5.12.ebuild80
2 files changed, 82 insertions, 0 deletions
diff --git a/dev-db/etcd/Manifest b/dev-db/etcd/Manifest
index 1b1dbbe68100..70cde4974e13 100644
--- a/dev-db/etcd/Manifest
+++ b/dev-db/etcd/Manifest
@@ -4,3 +4,5 @@ DIST etcd-3.4.28-deps.tar.xz 66108144 BLAKE2B 81bef927202231a7b8a1856327d371060b
DIST etcd-3.4.28.tar.gz 6052858 BLAKE2B 8c6dbebf3570c88e53ff5d13b0192502bc93d50076b9b66bd3ef4a313e734a1dc630366203b8e5d22ce29e9e8498e5e9304a6b02973d2defd4b65425ee24becb SHA512 409f82c9979ee34327f0f1f6fd171ccbeb6a044ca4e1f137dd803172e2b79f5f14d68eea67b12c90401dc93fe830b7adf77f8c06c2730f3205d367a957fc43cc
DIST etcd-3.5.10-deps.tar.xz 95341332 BLAKE2B 45aed0b80e5c0b3100b870b3f663a09ca8998f52e462a5a618c871d9baed898bd7bf23d2d1f33ff6eb3ad40fcd6692d4c9e5501b27cdc93a4be23aea464ac769 SHA512 59acb7de1a89014c75054cd06659f3220fd0a361e16a26d7bb26c2177266493808f9817dd7393df04c4ab14d46ddfd9ec9a36442e9656cf871971034ff1c99ed
DIST etcd-3.5.10.tar.gz 4073085 BLAKE2B d6b6c60dee15ffc42e3510837eefc543d16bdbda532828cd6a846f9d12921e24df948b93b4951f8e660be9967e540f59ecba558094558f67ec5aa4059dee60de SHA512 965e8666653c6012643b01fd9e1bbd3b01294590985e91c54a81ea9f6940ebdf4d6c48f04b082a094e09b4959eba92e0bfed46d364ff54d8791ab7d42d2a725c
+DIST etcd-3.5.12-deps.tar.xz 3935756 BLAKE2B c043cc55f59549734f38b1a734106bd25a1bbeb47f84e00a6b4308bad6086a6f0e0f3dee151bf1708bac269be124c782ea48c3761ee5e1d130a002989f99f2d3 SHA512 caae360e315756fe933bd87a7ce543d904084a745b5e42844a293bbf17c121d245f9f3645cd9992de5203c9efe4efcd4226ba294afb5a3550c114de78dad3110
+DIST etcd-3.5.12.tar.gz 4083299 BLAKE2B 85615cf9095a440ef73aa59f5582293de543f7e473c8049712ff13646276c9441039c96c4e42aaedfddcfb3baede8d37f0ef68bb5ddabdb3f4833c8591ee1c8c SHA512 6fc8bd64ad63cff71c7645253273418fb3fa262c2da1742dc345576caa733af7cd75acad2f57610c5883e6bf16cffd36bc5a0c89cbbb0793c00c2a4db1c6d14b
diff --git a/dev-db/etcd/etcd-3.5.12.ebuild b/dev-db/etcd/etcd-3.5.12.ebuild
new file mode 100644
index 000000000000..926be7cb76f3
--- /dev/null
+++ b/dev-db/etcd/etcd-3.5.12.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit go-module systemd tmpfiles
+GIT_COMMIT=e7b3bb6cc
+
+DESCRIPTION="Highly-available key value store for shared configuration and service discovery"
+HOMEPAGE="https://github.com/etcd-io/etcd"
+SRC_URI="https://github.com/etcd-io/etcd/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz"
+
+LICENSE="Apache-2.0 BSD BSD-2 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~loong ~riscv"
+IUSE="doc +server"
+
+COMMON_DEPEND="server? (
+ acct-group/etcd
+ acct-user/etcd
+ )"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}"
+
+# Tests fail with this error:
+# fatal error: checkptr: unsafe pointer conversion
+RESTRICT="test"
+PATCHES=("${S}/go-mod-sum.patch")
+
+src_prepare() {
+ export GO_BUILD_FLAGS="-v -x"
+ default
+ sed -e "s|GIT_SHA=.*|GIT_SHA=${GIT_COMMIT}|" \
+ -i "${S}"/build.sh || die
+ sed -e 's:\(for p in \)shellcheck :\1 :' \
+ -e 's:^ gofmt \\$:\\:' \
+ -e 's:^ govet \\$:\\:' \
+ -e 's:^ govet_shadow \\$:\\:' \
+ -i "${S}"/test || die
+
+ sed -e "s|GO_BUILD_FLAGS=\"[^\"]*\"|GO_BUILD_FLAGS=\"${GO_BUILD_FLAGS}\"|" \
+ -e "s|go test |go test ${GO_BUILD_FLAGS} |" \
+ -i ./test || die
+}
+
+src_compile() {
+ ./build.sh || die
+}
+
+src_test() {
+ ./test || die
+}
+
+src_install() {
+ dobin bin/etcdctl
+ use doc && dodoc -r Documentation
+ if use server; then
+ insinto /etc/${PN}
+ sed -e 's|^data-dir:|\0 /var/lib/etcd|' -i etcd.conf.yml.sample || die
+ newins etcd.conf.yml.sample etcd.conf.yml
+ dobin bin/etcd
+ dodoc README.md
+ systemd_newunit "${FILESDIR}/${PN}.service-r1" "${PN}.service"
+ newtmpfiles "${FILESDIR}/${PN}.tmpfiles.d.conf" ${PN}.conf
+ newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd-r1 ${PN}
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotated" "${PN}"
+ keepdir /var/lib/${PN} /var/log/${PN}
+ fowners ${PN}:${PN} /var/lib/${PN} /var/log/${PN}
+ fperms 0700 /var/lib/${PN}
+ fperms 0755 /var/log/${PN}
+ fi
+}
+
+pkg_postinst() {
+ if use server; then
+ tmpfiles_process ${PN}.conf
+ fi
+}