commit:     ff000cacf061b745739cc93ce117c79b869c265a
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 14 23:46:19 2024 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Apr 14 23:47:18 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff000cac

dev-db/etcd: add 3.5.13

Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 dev-db/etcd/Manifest           |  2 ++
 dev-db/etcd/etcd-3.5.13.ebuild | 81 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 83 insertions(+)

diff --git a/dev-db/etcd/Manifest b/dev-db/etcd/Manifest
index 106cc6f5dc79..a66e5e34c31e 100644
--- a/dev-db/etcd/Manifest
+++ b/dev-db/etcd/Manifest
@@ -4,3 +4,5 @@ DIST etcd-3.4.31-deps.tar.xz 2212704 BLAKE2B 
8b30941eefdb3811fb331014b69eb8d5b9c
 DIST etcd-3.4.31.tar.gz 6072806 BLAKE2B 
30aa5b79d2fd0ba639bc766c104d5df28af50ae5398d860af3b3aff91c143ccd899538b341501386bac55dedc00086654de6e4ab9b237053b199a8de2fa509ec
 SHA512 
4a7e366ced86ea86a324ab972ea47be56456c0aa8744e5ec07d499a56bdc9179ebc3bc2f33bd67c2d341181a5bcc703abc5a7c2e57879169a351457b4a0274f3
 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
+DIST etcd-3.5.13-deps.tar.xz 5004004 BLAKE2B 
effc3c3fb8e6fff789f96030e485fb887b0f973e5943e66f744ce2d41c65c0756a81850be8f8cca96f50214a59e0eeac694c4669d809ddcee0771acc1703d9ff
 SHA512 
ed80d70a14cf049e3af22757ad5cc4abd1ce563e00e0d422d38c82d66fe4381822ef1344de3ef803dedc2bfc038dabb520ad58fd489b8916529d24357628f002
+DIST etcd-3.5.13.tar.gz 4089792 BLAKE2B 
be7a46af3978108b7e25adabe736ac111a01ab7fcb8e142b75c0c87aa33905d42d10b721ebc982e834110388669d028e6a612c9745e2f5c93210dd05ffccba7d
 SHA512 
dc85d80079b61e96eb06eb573d41d8972060392e49140a2414c283ea9edfef7b01d5554e50c7ab37c6ad079b373ae12a1b84dbcc533addc1d4d30a2a5abf7b7b

diff --git a/dev-db/etcd/etcd-3.5.13.ebuild b/dev-db/etcd/etcd-3.5.13.ebuild
new file mode 100644
index 000000000000..77d02b80751b
--- /dev/null
+++ b/dev-db/etcd/etcd-3.5.13.ebuild
@@ -0,0 +1,81 @@
+# 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=c9063a0dc
+
+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"
+LICENSE+=" 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
+}

Reply via email to