summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Kojevnikov2016-09-29 11:56:39 +0000
committerAndrey Kojevnikov2016-09-29 11:56:39 +0000
commit42d12e274e86fddaae8341b8fec1ae9a3b9acabb (patch)
tree50d635625c4047d6af0b6f942b82f82c123f18fb
parent6f8f1c686c3285a92b8fc18d368f2846d0fa549e (diff)
downloadaur-42d12e274e86fddaae8341b8fec1ae9a3b9acabb.tar.gz
3.0.10
-rw-r--r--.SRCINFO15
-rw-r--r--10-EnvironmentFile.conf2
-rw-r--r--PKGBUILD33
-rw-r--r--etcd.env (renamed from etcd.conf)0
-rw-r--r--etcd.install10
-rw-r--r--etcd.service17
6 files changed, 34 insertions, 43 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 951f0de2a3e8..746532e03903 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by mksrcinfo v8
-# Wed Apr 13 06:43:03 UTC 2016
+# Thu Sep 29 11:53:50 UTC 2016
pkgbase = etcd
pkgdesc = A highly-available key value store for shared configuration and service discovery.
- pkgver = 2.3.1
+ pkgver = 3.0.10
pkgrel = 1
url = https://github.com/coreos/etcd
install = etcd.install
@@ -13,12 +13,11 @@ pkgbase = etcd
license = Apache
makedepends = go
backup = etc/conf.d/etcd
- backup = usr/lib/systemd/system/etcd.service
- source = etcd-2.3.1.tar.gz::https://github.com/coreos/etcd/archive/v2.3.1.tar.gz
- source = etcd.service
- source = etcd.conf
- md5sums = 451c988edd824367b6063e2c4f734d3c
- md5sums = 1ccf13f8b80f10e21e92361a4dea1a44
+ source = etcd-3.0.10.tar.gz::https://github.com/coreos/etcd/archive/v3.0.10.tar.gz
+ source = 10-EnvironmentFile.conf
+ source = etcd.env
+ md5sums = 311b0d32742f69636cd8f813bad63ab6
+ md5sums = 2e4f384ae0e21c26459deef6255fbf26
md5sums = bd315606b36e519c578db34722b57622
pkgname = etcd
diff --git a/10-EnvironmentFile.conf b/10-EnvironmentFile.conf
new file mode 100644
index 000000000000..eda8a23a6729
--- /dev/null
+++ b/10-EnvironmentFile.conf
@@ -0,0 +1,2 @@
+[Service]
+EnvironmentFile=-/etc/conf.d/etcd
diff --git a/PKGBUILD b/PKGBUILD
index e7074d3289b9..25325a322f31 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,35 +3,48 @@
# Contributor: codekoala <codekoala at gmail dot com>
pkgname=etcd
-pkgver=2.3.1
+pkgver=3.0.10
pkgrel=1
pkgdesc='A highly-available key value store for shared configuration and service discovery.'
arch=('x86_64' 'i686' 'armv6h' 'armv7h')
url='https://github.com/coreos/etcd'
license=('Apache')
makedepends=('go')
-backup=('etc/conf.d/etcd' 'usr/lib/systemd/system/etcd.service')
+backup=('etc/conf.d/etcd')
install="${pkgname}.install"
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/coreos/${pkgname}/archive/v${pkgver}.tar.gz"
- "${pkgname}.service"
- "${pkgname}.conf")
-md5sums=('451c988edd824367b6063e2c4f734d3c'
- '1ccf13f8b80f10e21e92361a4dea1a44'
+ '10-EnvironmentFile.conf'
+ 'etcd.env')
+md5sums=('311b0d32742f69636cd8f813bad63ab6'
+ '2e4f384ae0e21c26459deef6255fbf26'
'bd315606b36e519c578db34722b57622')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
- ./build
+ export GOPATH="$(pwd)/_gopath"
+ _coreos="${GOPATH}/src/github.com/coreos"
+ mkdir -vp ${_coreos}
+ ln -vsf ${srcdir}/${pkgname}-${pkgver} ${_coreos}/${pkgname}
+ # Note: this script may produce no output
+ bash -x ./build
}
package() {
- install -Dm644 ${srcdir}/${pkgname}.conf ${pkgdir}/etc/conf.d/${pkgname}
- install -Dm644 ${srcdir}/${pkgname}.service ${pkgdir}/usr/lib/systemd/system/${pkgname}.service
+ # binaries
install -Dm755 ${srcdir}/${pkgname}-${pkgver}/bin/etcd ${pkgdir}/usr/bin/etcd
install -Dm755 ${srcdir}/${pkgname}-${pkgver}/bin/etcdctl ${pkgdir}/usr/bin/etcdctl
+ # Upstream systemd unit
+ install -Dm644 ${srcdir}/${pkgname}-${pkgver}/contrib/systemd/etcd.service ${pkgdir}/usr/lib/systemd/system/${pkgname}.service
+ # Adding 'EnvironmentFile=-/etc/conf.d/etcd' option to the unit
+ install -Dm644 ${srcdir}/10-EnvironmentFile.conf ${pkgdir}/etc/systemd/system/${pkgname}.service.d/10-EnvironmentFile.conf
+ # env file itself
+ install -Dm644 ${srcdir}/etcd.env ${pkgdir}/etc/conf.d/${pkgname}
+ # License
install -Dm644 ${srcdir}/${pkgname}-${pkgver}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ # Docs
install -dm755 ${pkgdir}/usr/share/doc/${pkgname}
- install -m644 ${srcdir}/${pkgname}-${pkgver}/Documentation/*.md -t ${pkgdir}/usr/share/doc/${pkgname}
+ cp -r ${srcdir}/${pkgname}-${pkgver}/Documentation/* ${pkgdir}/usr/share/doc/${pkgname}/
+ install -m644 ${srcdir}/${pkgname}-${pkgver}/${pkgname}.conf.yml.sample ${pkgdir}/usr/share/doc/${pkgname}
}
# vim:set ts=2 sw=2 et:
diff --git a/etcd.conf b/etcd.env
index 023129b0e075..023129b0e075 100644
--- a/etcd.conf
+++ b/etcd.env
diff --git a/etcd.install b/etcd.install
index da8cd7b58c7e..941baa79a090 100644
--- a/etcd.install
+++ b/etcd.install
@@ -2,21 +2,15 @@ ETCD_DATA_DIR="/var/lib/etcd"
pre_upgrade() {
cat << EOF
- To upgrade an existing etcd deployment to 2.2, you must be running 2.1.
- If you’re running a version of etcd before 2.1, you must upgrade to 2.1 before upgrading to 2.2.
- And you should, probably, read the following:
- /usr/share/doc/etcd/04_to_2_snapshot_migration.md
- /usr/share/doc/etcd/upgrade_2_1.md
- /usr/share/doc/etcd/upgrade_2_2.md
+ To upgrade an existing v2 etcd deployment to 3.0 you must be running 2.3
+ And you should read the docs: /usr/share/doc/etcd/upgrades/
EOF
}
post_install() {
mkdir -p "${ETCD_DATA_DIR}"
-
# create an etcd user
id -u etcd &>/dev/null || useradd -r -M -U -d /dev/null -s /bin/nologin etcd
-
chown -R etcd:etcd "${ETCD_DATA_DIR}"
}
diff --git a/etcd.service b/etcd.service
deleted file mode 100644
index 567f490c98cc..000000000000
--- a/etcd.service
+++ /dev/null
@@ -1,17 +0,0 @@
-[Unit]
-Description=etcd key-value store
-Documentation=https://github.com/coreos/etcd
-
-[Service]
-User=etcd
-Type=notify
-Environment=ETCD_DATA_DIR=/var/lib/etcd
-Environment=ETCD_NAME=%m
-EnvironmentFile=-/etc/conf.d/etcd
-ExecStart=/usr/bin/etcd
-Restart=always
-RestartSec=10s
-LimitNOFILE=40000
-
-[Install]
-WantedBy=multi-user.target