Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/portage-stable-packages-list
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ dev-cpp/gflags
dev-cpp/glog
dev-cpp/gtest

dev-db/etcd
dev-db/sqlite

dev-debug/gdb
Expand Down
1 change: 1 addition & 0 deletions changelog/updates/2025-12-11-etcdctl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- etcdctl ([3.5.18](https://github.com/etcd-io/etcd/blob/main/CHANGELOG/CHANGELOG-3.5.md#v3518-2025-01-24))
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ RDEPEND="${RDEPEND}
coreos-base/update-ssh-keys
coreos-base/update_engine
coreos-base/ue-rs
dev-db/etcdctl
dev-db/etcd
dev-debug/strace
dev-libs/libsodium
dev-libs/openssl
Expand Down
575 changes: 0 additions & 575 deletions sdk_container/src/third_party/coreos-overlay/dev-db/etcdctl/Manifest

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,6 @@ sys-apps/azure-vm-utils

=app-containers/containerd-2.1* ~amd64 ~arm64
=app-containers/runc-1.3* ~amd64 ~arm64

# Not stabilised for arm64 yet.
dev-db/etcd amd64
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,6 @@ sys-apps/gawk -mpfr
# We never had passwdqc stuff in old pam sys configs, so disable it
# for now. Maybe this is something to enable later.
sys-auth/pambase securetty -passwdqc

# We run the server in a container.
dev-db/etcd -server
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
DIST etcd-3.4.31-deps.tar.xz 2212704 BLAKE2B 8b30941eefdb3811fb331014b69eb8d5b9c691b8ace1004432e5b05bb787bb3ba3ce872f881af2a559d7b955fae890a4ec0e8b10daa06cf388447af1b6a92679 SHA512 85915f5738493bfe3c09208649e26cfdc612df900916686006a437c44aad5afb2ab69b0840550e37544a50b79d2d3718e2cbdfd037e47bcaa8e33a8a6a95105f
DIST etcd-3.4.31.tar.gz 6072806 BLAKE2B 30aa5b79d2fd0ba639bc766c104d5df28af50ae5398d860af3b3aff91c143ccd899538b341501386bac55dedc00086654de6e4ab9b237053b199a8de2fa509ec SHA512 4a7e366ced86ea86a324ab972ea47be56456c0aa8744e5ec07d499a56bdc9179ebc3bc2f33bd67c2d341181a5bcc703abc5a7c2e57879169a351457b4a0274f3
DIST etcd-3.5.18-deps.tar.xz 46453448 BLAKE2B 677370cb6d9064f8474adbfc5030b46f3367198cb8defc9242be00423c570f8c9bc5358d6dbe9d8cfee8e7797a2f8c93e7b4c8cbee4702c59287005cd7885fef SHA512 f1ed36d49f199fff4b0ee920870c3ac66dee0dcb5e92fa24a3861d841bdcfa99b210b292138116de9aafeec424c7663111f9bb0ad87910e1314031eb501f4aeb
DIST etcd-3.5.18.tar.gz 4128059 BLAKE2B 32f867170bf1195d019dcf562bff9104db00f6ccff6b91bf12a4c95a63a5d92dda6984437bed819240be7bd8d4e2b507904251f636e945c5847ef93e72f1dd63 SHA512 0d72c40d575997d70d9d4964e7ff4be75c77e13a40ea08fcc020fddc64dc420338f1853d5a51a2dbe3f4c2881ae196a7aa32565e4b41dbda77bc2b6ae2313104
DIST etcd-3.5.26-deps.tar.xz 48943308 BLAKE2B 6c5719f47ef4be8b98260ff8b1f4d09c25bf01eb830e8e7851793d617336df0556bf7010bd9b6dba611b017501bdda18541282363e275d3ecded6c25efa43c50 SHA512 e3544d6787800d734ec9e851ea4755f166e3eaf6e82c3353e172aa2f34336a312f97811e39aae4babc905d91627fa182aed007c450737194db937d4ba76dc8c9
DIST etcd-3.5.26.tar.gz 4145585 BLAKE2B e261a5ef3b629a69cc044b1a92ee6b3a2d56ee7e648b86036016c79b084bbb5dd748ecaf0214900b88c596b14f297815ab166e468c0fe84d63f46e6b51e867d5 SHA512 3a014d259725d8a116a3823fd921c6fa6cf9587c993038c12765085032610e997bf318d29ca2ae9ed34a55990cb500b61e2bc1f8151a80e200ec2299d918cf76
DIST etcd-3.6.7-deps.tar.xz 109371156 BLAKE2B 46f3d0cfed7ad1f9c799d569cd78d766266e8f33f3b2421011860443d644044cd46a58c67180ac7c15d63385b33ab18b9139dc0954a509898147e616f470e4e0 SHA512 711506c537d721a3c64466a7b57a5cc32f25a018947b232a9fc6b28f0faa1985c3f319161ba6ca20e7a909574fd5c4887a0cf0290461a97d713182a38f11f48c
DIST etcd-3.6.7.tar.gz 7379199 BLAKE2B 011a5fb132dbb3a5229d20f803df3ba8785c068e3ed38d14d8be798af74cf3895efe980be605014e648883903512f910129d5bb57600dd7f170361a1fb7c488b SHA512 05d85c127bf947799deccbf082bfb7e93c3a37378a13723d0cc925bec8fc153a2391b4d1be3cf9da46fc575ed45c3afbbdb143f227a163b37e92a27163f5a2e8
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# 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=950cd5fbe

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
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"

src_prepare() {
export GO_BUILD_FLAGS="-v -x"
default
sed -e "s|GIT_SHA=.*|GIT_SHA=${GIT_COMMIT}|"\
-i "${S}"/build || 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 || 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
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
inherit go-module systemd tmpfiles
GIT_COMMIT=5bca08ec1

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}"

# Unit tests attempt to download go modules.
RESTRICT="test"

src_prepare() {
export FORCE_HOST_GO=1 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:^ goword \\$:\\:' \
-e 's:^ gofmt \\$:\\:' \
-e 's:^ govet \\$:\\:' \
-e 's:^ revive \\$:\\:' \
-e 's:^ mod_tidy \\$:\\:' \
-e "s|GO_BUILD_FLAGS=\"[^\"]*\"|GO_BUILD_FLAGS=\"${GO_BUILD_FLAGS}\"|" \
-e "s|go test |go test ${GO_BUILD_FLAGS} |" \
-e 's|PASSES=${PASSES:-"fmt bom dep build unit"}|PASSES=${PASSES:-"fmt dep unit"}|' \
-i ./test.sh || die
}

src_compile() {
./build.sh || die
}

src_test() {
./test || 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
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# 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=65251b30e

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}-deps.tar.xz"

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}"

# Unit tests attempt to download go modules.
PROPERTIES="test_network"
RESTRICT="test"

src_prepare() {
default
sed -i "s|GIT_SHA=.*|GIT_SHA=${GIT_COMMIT}|" build.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() {
./build.sh || die
}

src_test() {
PASSES="unit" ./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
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# 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=e838ef116

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}-deps.tar.xz"

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}"

# Unit tests attempt to download go modules.
PROPERTIES="test_network"
RESTRICT="test"

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() {
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
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ETCD_OPTS="--config-file=/etc/etcd/etcd.conf.yml"
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/sbin/openrc-run
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

pidfile=/run/${RC_SVCNAME}.pid
LOGPATH=/var/log/${RC_SVCNAME}
command_user=${RC_SVCNAME}
command=/usr/bin/etcd
command_args="${ETCD_OPTS}"
command_background=true
start_stop_daemon_args="
-1 ${LOGPATH}/${RC_SVCNAME}.log
-2 ${LOGPATH}/${RC_SVCNAME}.err"

depend() {
need net
need localmount
after bootmisc
}

start() {
if [ ! -d "${LOGPATH}" ] ; then
mkdir -p "${LOGPATH}"
chown "${command_user}:${command_user}" "${LOGPATH}"
fi
default_start
}
Loading