mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-21 06:21:08 +02:00
dev-db/etcd: use etcd-starter
This commit is contained in:
parent
81a5661450
commit
a1487bc1a6
@ -81,7 +81,7 @@ RDEPEND="${RDEPEND}
|
||||
# implementation based on whether protocol 2 is enabled or not.
|
||||
RDEPEND="${RDEPEND}
|
||||
etcd_protocols_1? (
|
||||
dev-db/etcd:1[etcd_protocols_2=]
|
||||
dev-db/etcd:1
|
||||
!etcd_protocols_2? ( dev-db/etcdctl )
|
||||
)
|
||||
etcd_protocols_2? ( dev-db/etcd:2 )
|
||||
@ -108,6 +108,7 @@ RDEPEND="${RDEPEND}
|
||||
coreos-base/coreos-init
|
||||
coreos-base/coreos-cloudinit
|
||||
coreos-base/coretest
|
||||
dev-db/etcd-starter
|
||||
net-analyzer/nmap
|
||||
net-firewall/ebtables
|
||||
net-firewall/ipset
|
||||
|
@ -8,7 +8,7 @@ EAPI=4
|
||||
CROS_WORKON_PROJECT="coreos/etcd"
|
||||
CROS_WORKON_LOCALNAME="etcd"
|
||||
CROS_WORKON_REPO="git://github.com"
|
||||
inherit coreos-doc toolchain-funcs cros-workon systemd
|
||||
inherit coreos-doc toolchain-funcs cros-workon
|
||||
|
||||
if [[ "${PV}" == 9999 ]]; then
|
||||
KEYWORDS="~amd64"
|
||||
@ -23,32 +23,17 @@ SRC_URI=""
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="1"
|
||||
IUSE="etcd_protocols_1 etcd_protocols_2"
|
||||
|
||||
# Sanity check that this version is indeed wanted!
|
||||
REQUIRED_USE="etcd_protocols_${SLOT}"
|
||||
|
||||
DEPEND=">=dev-lang/go-1.2"
|
||||
RDEPEND="!dev-db/etcd:0
|
||||
!etcd_protocols_2? ( !dev-db/etcd:2 )"
|
||||
RDEPEND="!dev-db/etcd:0"
|
||||
|
||||
src_compile() {
|
||||
./build
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local libexec="libexec/${PN}/internal_versions"
|
||||
local libexec="libexec/${PN}/internal_versions/${SLOT}"
|
||||
|
||||
exeinto "/usr/${libexec}"
|
||||
newexe "${S}/bin/${PN}" ${SLOT}
|
||||
|
||||
# protocol1 is default if protocol2 is disabled
|
||||
if ! use etcd_protocols_2; then
|
||||
dosym "../${libexec}/${SLOT}" /usr/bin/${PN}
|
||||
|
||||
systemd_dounit "${FILESDIR}"/${PN}.service
|
||||
systemd_dotmpfilesd "${FILESDIR}"/${PN}.conf
|
||||
|
||||
coreos-dodoc -r Documentation/*
|
||||
fi
|
||||
doexe "${S}/bin/${PN}"
|
||||
}
|
@ -9,7 +9,7 @@ CROS_WORKON_PROJECT="coreos/etcd"
|
||||
CROS_WORKON_LOCALNAME="etcd"
|
||||
CROS_WORKON_REPO="git://github.com"
|
||||
COREOS_GO_PACKAGE="github.com/coreos/etcd"
|
||||
inherit coreos-doc coreos-go toolchain-funcs cros-workon systemd
|
||||
inherit coreos-doc coreos-go toolchain-funcs cros-workon
|
||||
|
||||
if [[ "${PV}" == 9999 ]]; then
|
||||
KEYWORDS="~amd64"
|
||||
@ -38,18 +38,14 @@ src_compile() {
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local libexec="libexec/${PN}/internal_versions"
|
||||
local libexec="libexec/${PN}/internal_versions/${SLOT}"
|
||||
|
||||
dobin ${WORKDIR}/gopath/bin/etcdctl
|
||||
dobin ${WORKDIR}/gopath/bin/etcd-migrate
|
||||
dobin ${WORKDIR}/gopath/bin/etcd-dump-logs
|
||||
|
||||
exeinto "/usr/${libexec}"
|
||||
newexe "${WORKDIR}/gopath/bin/${PN}" ${SLOT}
|
||||
dosym "../${libexec}/${SLOT}" /usr/bin/${PN}
|
||||
|
||||
systemd_dounit "${FILESDIR}"/${PN}.service
|
||||
systemd_dotmpfilesd "${FILESDIR}"/${PN}.conf
|
||||
doexe "${WORKDIR}/gopath/bin/${PN}"
|
||||
|
||||
coreos-dodoc -r Documentation/*
|
||||
}
|
||||
|
@ -1,2 +0,0 @@
|
||||
d /var/lib/etcd 0755 etcd etcd - -
|
||||
d /var/run/etcd 0755 etcd etcd - -
|
@ -1,12 +0,0 @@
|
||||
[Unit]
|
||||
Description=etcd
|
||||
|
||||
[Service]
|
||||
User=etcd
|
||||
PermissionsStartOnly=true
|
||||
Environment=ETCD_DATA_DIR=/var/lib/etcd
|
||||
Environment=ETCD_NAME=%m
|
||||
ExecStart=/usr/bin/etcd
|
||||
Restart=always
|
||||
RestartSec=10s
|
||||
LimitNOFILE=40000
|
Loading…
x
Reference in New Issue
Block a user