Commit f7a74f65 authored by Leo's avatar Leo Committed by Francesco Colista

testing/etcd: upgrade to 3.3.14

parent 4b0e3d45
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=etcd
pkgver=3.3.13
pkgrel=1
pkgver=3.3.14
pkgrel=0
pkgdesc="A highly-available key value store for shared configuration and service discovery"
url="https://github.com/coreos/etcd"
arch="x86_64 ppc64le"
......@@ -15,24 +15,24 @@ subpackages="$pkgname-doc $pkgname-ctl $pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/coreos/etcd/archive/v$pkgver.tar.gz
$pkgname.yaml::https://raw.githubusercontent.com/etcd-io/etcd/release-3.3/etcd.conf.yml.sample
$pkgname.confd
$pkgname.initd"
builddir="$srcdir"/$pkgname-$pkgver
$pkgname.initd
"
export CGO_ENABLED=0
prepare() {
default_prepare
export GOPATH="$(pwd)/_gopath"
_coreos="${GOPATH}/src/github.com/coreos"
mkdir -vp ${_coreos}
ln -vsf ${srcdir}/${pkgname}-${pkgver} ${_coreos}/${pkgname}
_coreos="$GOPATH/src/github.com/coreos"
mkdir -vp $_coreos
ln -vsf $srcdir/$pkgname-${pkgver} $_coreos/$pkgname
}
build() {
cd "$builddir"
bash -x ./build
}
package() {
cd "$builddir"
mkdir -p "$pkgdir"/var/lib/$pkgname
chown -R $pkgusers:$pkggroups "$pkgdir"/var/lib/$pkgname
install -Dm755 bin/etcd "$pkgdir"/usr/bin/etcd
......@@ -42,12 +42,17 @@ package() {
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
cleanup_srcdir() {
go clean -modcache
default_cleanup_srcdir
}
ctl() {
pkgdesc="A command-line client for etcd"
install -Dm755 "$builddir"/bin/etcdctl "$subpkgdir"/usr/bin/etcdctl
}
sha512sums="5b8cf9d8d8b0afd1551f414480f04837668729c10d5d81c5e9ffba3392bd2567f3798267c5e4dbe60f49dbdd859f668c6fe0d7924e0fd65f918ab3bd01d5751a etcd-3.3.13.tar.gz
sha512sums="76c8147168030310f0e4fa0c22670fd73369795ab6d98c0632c87b5947acf10af4adae58b46f042a482dc7a002044cfbdfbec962517018e2fdf211c381281dae etcd-3.3.14.tar.gz
1fd53fccc524ab07f2780039d8155ef66af7fb23e13783ac24ab47e7841f417ac98973e7e6eaa6424c4122a9a6826cb0e20f453e02492c789514f096f0243d87 etcd.yaml
bd385f6eddd88e7bef77470c5f19f1bea839c3cfcbb08679037d2d7d1f761249430d1eee70dab62ca00c5f2c361f5aa0b0b0435b02aba72c62cd9e06aacf8a7b etcd.confd
b86181b6dc4e9336c533086e80f88b28e7c3af2a9415a21cfde058ece11419e93f36664592f762785db3c64a41b79e1e372dc794d649927394b5644630d53cb5 etcd.initd"
e2c178b376dc05de7daee6ca3b38cc289e7c73106055dcccde08fe36a392224edf9f98203d50f14c7abeea74552675ff73a061ba20c56628eb657fa15dcd8942 etcd.confd
c251f63cbaee2d5edaed3f82b4d0b8918ecee977ee459b59f0b9fef02cfe69f0de997e9a59ad29732c58782c224591b0d27378b24435f1bac0e77a35d8886bba etcd.initd"
SVCNAME=etcd
PIDPATH=/var/run/${SVCNAME}
PIDFILE=${PIDPATH}/${SVCNAME}.pid
LOGPATH=/var/log/${SVCNAME}
USER=$SVCNAME
LOGPATH=/var/log/${RC_SVCNAME}
USER=$RC_SVCNAME
ETCD_CONFIG=/etc/etcd/conf.yml
......
......@@ -2,35 +2,23 @@
# Copyright 2016 Alpine Linux
# Distributed under the terms of the GNU General Public License v2
# $Id$
supervisor=supervise-daemon
name="$RC_SVCNAME"
description="Highly-available key-value store"
command=/usr/bin/etcd
command_args="--config-file=$ETCD_CONFIG --data-dir=$ETCD_DATA_DIR $ETCD_OPTS"
command_user="$USER:$USER"
supervise_daemon_args="--chdir $ETCD_DATA_DIR"
depend() {
need net
}
start_pre() {
checkpath -d -m 0775 -o $USER:$USER $PIDPATH
checkpath -d -m 0775 -o $USER:$USER $LOGPATH
checkpath -d -m 0775 -o $USER:$USER $ETCD_DATA_DIR
}
start() {
ebegin "Starting $SVCNAME"
start-stop-daemon --start \
--pidfile "$PIDFILE" \
--user $USER \
--chdir "$ETCD_DATA_DIR" \
--background \
--make-pidfile \
--exec /usr/bin/etcd -- \
--config-file=$ETCD_CONFIG \
--data-dir="$ETCD_DATA_DIR" \
$ETCD_OPTS
eend $? "Failed to start $SVCNAME"
}
stop() {
ebegin "Stopping $SVCNAME"
start-stop-daemon --stop --pidfile $PIDFILE
eend $? "Failed to stop $SVCNAME"
rm -f "$PIDFILE"
checkpath -d -m 0775 -o "$command_user" "$LOGPATH"
checkpath -d -m 0775 -o "$command_user" "$ETCD_DATA_DIR"
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment