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.
|
# implementation based on whether protocol 2 is enabled or not.
|
||||||
RDEPEND="${RDEPEND}
|
RDEPEND="${RDEPEND}
|
||||||
etcd_protocols_1? (
|
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/etcdctl )
|
||||||
)
|
)
|
||||||
etcd_protocols_2? ( dev-db/etcd:2 )
|
etcd_protocols_2? ( dev-db/etcd:2 )
|
||||||
@ -108,6 +108,7 @@ RDEPEND="${RDEPEND}
|
|||||||
coreos-base/coreos-init
|
coreos-base/coreos-init
|
||||||
coreos-base/coreos-cloudinit
|
coreos-base/coreos-cloudinit
|
||||||
coreos-base/coretest
|
coreos-base/coretest
|
||||||
|
dev-db/etcd-starter
|
||||||
net-analyzer/nmap
|
net-analyzer/nmap
|
||||||
net-firewall/ebtables
|
net-firewall/ebtables
|
||||||
net-firewall/ipset
|
net-firewall/ipset
|
||||||
|
@ -8,7 +8,7 @@ EAPI=4
|
|||||||
CROS_WORKON_PROJECT="coreos/etcd"
|
CROS_WORKON_PROJECT="coreos/etcd"
|
||||||
CROS_WORKON_LOCALNAME="etcd"
|
CROS_WORKON_LOCALNAME="etcd"
|
||||||
CROS_WORKON_REPO="git://github.com"
|
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
|
if [[ "${PV}" == 9999 ]]; then
|
||||||
KEYWORDS="~amd64"
|
KEYWORDS="~amd64"
|
||||||
@ -23,32 +23,17 @@ SRC_URI=""
|
|||||||
|
|
||||||
LICENSE="Apache-2.0"
|
LICENSE="Apache-2.0"
|
||||||
SLOT="1"
|
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"
|
DEPEND=">=dev-lang/go-1.2"
|
||||||
RDEPEND="!dev-db/etcd:0
|
RDEPEND="!dev-db/etcd:0"
|
||||||
!etcd_protocols_2? ( !dev-db/etcd:2 )"
|
|
||||||
|
|
||||||
src_compile() {
|
src_compile() {
|
||||||
./build
|
./build
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
local libexec="libexec/${PN}/internal_versions"
|
local libexec="libexec/${PN}/internal_versions/${SLOT}"
|
||||||
|
|
||||||
exeinto "/usr/${libexec}"
|
exeinto "/usr/${libexec}"
|
||||||
newexe "${S}/bin/${PN}" ${SLOT}
|
doexe "${S}/bin/${PN}"
|
||||||
|
|
||||||
# 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
|
|
||||||
}
|
}
|
@ -9,7 +9,7 @@ CROS_WORKON_PROJECT="coreos/etcd"
|
|||||||
CROS_WORKON_LOCALNAME="etcd"
|
CROS_WORKON_LOCALNAME="etcd"
|
||||||
CROS_WORKON_REPO="git://github.com"
|
CROS_WORKON_REPO="git://github.com"
|
||||||
COREOS_GO_PACKAGE="github.com/coreos/etcd"
|
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
|
if [[ "${PV}" == 9999 ]]; then
|
||||||
KEYWORDS="~amd64"
|
KEYWORDS="~amd64"
|
||||||
@ -38,18 +38,14 @@ src_compile() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
local libexec="libexec/${PN}/internal_versions"
|
local libexec="libexec/${PN}/internal_versions/${SLOT}"
|
||||||
|
|
||||||
dobin ${WORKDIR}/gopath/bin/etcdctl
|
dobin ${WORKDIR}/gopath/bin/etcdctl
|
||||||
dobin ${WORKDIR}/gopath/bin/etcd-migrate
|
dobin ${WORKDIR}/gopath/bin/etcd-migrate
|
||||||
dobin ${WORKDIR}/gopath/bin/etcd-dump-logs
|
dobin ${WORKDIR}/gopath/bin/etcd-dump-logs
|
||||||
|
|
||||||
exeinto "/usr/${libexec}"
|
exeinto "/usr/${libexec}"
|
||||||
newexe "${WORKDIR}/gopath/bin/${PN}" ${SLOT}
|
doexe "${WORKDIR}/gopath/bin/${PN}"
|
||||||
dosym "../${libexec}/${SLOT}" /usr/bin/${PN}
|
|
||||||
|
|
||||||
systemd_dounit "${FILESDIR}"/${PN}.service
|
|
||||||
systemd_dotmpfilesd "${FILESDIR}"/${PN}.conf
|
|
||||||
|
|
||||||
coreos-dodoc -r Documentation/*
|
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