mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-16 14:29:05 -07:00
dev-db/etcd: Version bump to 3.7.1
The tests pass. The dependency tarball had exploded by 10x. I was able to avoid this by excluding some (unbuilt) tools, but I also figured out how to make a vendor tarball work, which is much smaller still. Signed-off-by: James Le Cuirot <chewi@gentoo.org>
This commit is contained in:
@@ -8,3 +8,5 @@ DIST etcd-3.6.11-deps.tar.xz 111959652 BLAKE2B bfe2bb60c5a0a428401333f5ee9f33c1c
|
||||
DIST etcd-3.6.11.tar.gz 7384738 BLAKE2B ba4730a1cdf31ae94365124a48aeb222a91b1df835e5b919dac15c3eceecf1165ac92ab2a19e70067be7ba8f42df59100e1679c5cee423fe86cd4aeea7d3efbd SHA512 56423c42443d9d1d2d06ff28aff389a381ed9b726cbee0d3523ac34fe2a8e22029377a42aa808077bb985f524a153c5fe63fd6166857749e8217b705fdf41910
|
||||
DIST etcd-3.6.14-deps.tar.xz 111593632 BLAKE2B cfc9e3474c75f2ba6b8f1601f6f2427a0542429cb495196915adbb79b0c5762ffcb5608965821d6cc5b12e7f8e08c249b70ceea61969b7422ffe3f2fad9faf6b SHA512 3cb35f8ac8d7c6c041f8951fd89ae415b256a940e818d3f8e713ffbcf19f85a09823d394d8f67fd6357c12ed3e117d713101c5d68fb167b7c9de975978256642
|
||||
DIST etcd-3.6.14.tar.gz 7389983 BLAKE2B 322637f55a33f103dde18ed35f0f9dd4176ecc31130c6860fef6260a70cee72cec6cb51fad2c7484449a04819e42413a23c46f0bf89801ef984ce476b9e6524c SHA512 4fa9ad2c3c06ef6364f040aad00aad5022f7a9cae8afc291c62b609a2dad27c57d8b7f8540ffd2e7d25638da8346ac7fa30e09ca681f1de280fa2b9a0064a3f4
|
||||
DIST etcd-3.7.1-vendor.tar.xz 3079016 BLAKE2B c75ca547d09d85a883a1480678ce2b73a5b1299084b979fa4c4f3e69117f49a407e3c993bc35be76bf508ee1e62ef5355e001300bfbc43d3eb56f2006703078d SHA512 ada23dcfffa32ecfeddf77de59eb63323f336e349a558703b101b934d00d99d9387b9830c9ad978b615a1f84bd56f2c2570c04f19492cc6765aecf04f8014923
|
||||
DIST etcd-3.7.1.tar.gz 7463252 BLAKE2B 7ed466a35b7a34860953f3fc0b18c6d202c8b01181b42b3bb483c8b6d4c044f163d7dc640f828f98a5d50ac3093f50497ec7342241a0ff2cd31dba4b7fe4945f SHA512 28cb8a5c29f81335de95946a2f974384b3b63f491601ebac67980ccef3a5acabc383c5027b0eed858b8fcddfe719c192086de48805d3e721e3d32f7b8cec85fd
|
||||
|
||||
92
dev-db/etcd/etcd-3.7.1.ebuild
Normal file
92
dev-db/etcd/etcd-3.7.1.ebuild
Normal file
@@ -0,0 +1,92 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
inherit go-module systemd tmpfiles
|
||||
GIT_COMMIT=5e7fd0de9
|
||||
|
||||
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/~chewi/distfiles/${P}-vendor.tar.xz"
|
||||
|
||||
# `go mod vendor` doesn't work but `go work vendor` does. Additional steps can
|
||||
# make the vendor tarball a bit smaller.
|
||||
#
|
||||
# P=etcd-3.X.Y
|
||||
# cd /var/tmp/portage/dev-db/${P}/work/${P}
|
||||
# sed -i "/\.\/tools\//d" go.work
|
||||
# go work vendor
|
||||
# tar --owner root --group root -Jcf /var/cache/distfiles/${P}-vendor.tar.xz -C .. ${P}/vendor ${P}/go.work
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
LICENSE+=" BSD BSD-2 MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 ~loong ~riscv"
|
||||
IUSE="doc +server"
|
||||
|
||||
COMMON_DEPEND="server? (
|
||||
acct-group/etcd
|
||||
acct-user/etcd
|
||||
)"
|
||||
DEPEND="${COMMON_DEPEND}"
|
||||
RDEPEND="${COMMON_DEPEND}"
|
||||
BDEPEND=">=dev-lang/go-1.26"
|
||||
|
||||
# Unit tests attempt to download go modules.
|
||||
PROPERTIES="test_network"
|
||||
RESTRICT="test"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-3.7.1-vendor.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
sed -i "s|GIT_SHA=.*|GIT_SHA=${GIT_COMMIT}|" scripts/build_lib.sh || die
|
||||
|
||||
# Don't test these as they are not built.
|
||||
find tools/ -name "*_test.go" -delete || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
export FORCE_HOST_GO=1 GO_BUILD_FLAGS="-v -x"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
scripts/build.sh || die
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# -buildmode=pie is incompatible with -race used by the tests.
|
||||
GOFLAGS=${GOFLAGS//-buildmode=pie} PASSES="unit" scripts/test.sh -v || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin bin/etcdctl
|
||||
dobin bin/etcdutl
|
||||
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
|
||||
}
|
||||
10
dev-db/etcd/files/etcd-3.7.1-vendor.patch
Normal file
10
dev-db/etcd/files/etcd-3.7.1-vendor.patch
Normal file
@@ -0,0 +1,10 @@
|
||||
--- a/scripts/test.sh
|
||||
+++ b/scripts/test.sh
|
||||
@@ -57,7 +57,6 @@
|
||||
# The test script is not supposed to make any changes to the files
|
||||
# e.g. add/update missing dependencies. Such divergences should be
|
||||
# detected and trigger a failure that needs explicit developer's action.
|
||||
-export GOFLAGS=-mod=readonly
|
||||
export ETCD_VERIFY=all
|
||||
|
||||
source ./scripts/test_lib.sh
|
||||
Reference in New Issue
Block a user