Subject: [alpine-aports] [PATCH] testing/vault-client: new aport

From: Jean-Louis Fuchs <[email-masked]>
Date: Fri, 7 Jul 2017 12:23:16 +0200

---
 testing/vault-client/APKBUILD | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 testing/vault-client/APKBUILD

diff --git a/testing/vault-client/APKBUILD b/testing/vault-client/APKBUILD
new file mode 100644
index 0000000000..650f15b49d
--- /dev/null
+++ b/testing/vault-client/APKBUILD
@@ -0,0 +1,36 @@
+# Contributor: Jean-Louis Fuchs <[email-masked]>
+# Maintainer: Jean-Louis Fuchs <[email-masked]>
+pkgname=vault-client
+pkgver=1.1.2
+pkgrel=0
+pkgdesc="Vault-Client is a command-line interface to HashiCorp's Vault inspired by pass."
+url="https://github.com/adfinis-sygroup/vault-client.git"
+arch="all"
+license="GPL"
+options="!check"
+makedepends="go"
+subpackages="$pkgname-bash-completion:bashcomp:noarch"
+source="vault-client-$pkgver.tar.gz::https://github.com/adfinis-sygroup/vault-client/archive/v$pkgver.tar.gz"
+builddir="$srcdir/vault-client-$pkgver"
+
+build() {
+	cd "$builddir"
+	make build
+}
+
+package() {
+	cd "$builddir"
+	make DESTDIR="$pkgdir/usr" install
+}
+
+bashcomp() {
+	depends="bash"
+	pkgdesc="Bash completions for $pkgname"
+	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
+
+	mkdir -p "$subpkgdir"/usr/share/bash-completion/completions
+	mv "$pkgdir"/usr/share/bash-completion/completions/* \
+		"$subpkgdir"/usr/share/bash-completion/completions/
+}
+
+sha512sums="8eafd9d75055e584cea3fa1626b92b5a4b23d320e3968545f4a1d925f220eba8048c3fc713a34e71dbf6397d4584df6c854f823bf4dd46ee16dcb034435754ec  vault-client-1.1.2.tar.gz"
-- 
2.13.0

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Jean-Louis Fuchs <[email-masked]>
Date: Tue, 29 Aug 2017 21:18:15 +0200

Hi

>  create mode 100644 testing/vault-client/APKBUILD

Could somebody have a look at this? Thank you.

Best,
    Jean-Louis

---

---

From: Timo Teras <[email-masked]>
Date: Wed, 30 Aug 2017 13:34:58 +0300

On Tue, 29 Aug 2017 21:18:15 +0200
Jean-Louis Fuchs <[email-masked]> wrote:

> >  testing/vault-client/APKBUILD | 36
> > ++++++++++++++++++++++++++++++++++++ 1 file changed, 36
> > insertions(+) create mode 100644 testing/vault-client/APKBUILD  
> 

Seems it wants to download stuff from the internet during build.

$ abuild rootbld
<snip>
>>> vault-client: Checking sha512sums...
vault-client-1.1.2.tar.gz: OK
>>> vault-client: Unpacking /var/cache/distfiles/vault-client-1.1.2.tar.gz...
for dep in gopkg.in/yaml.v2 github.com/hashicorp/vault/api github.com/mitchellh/cli github.com/fatih/color; do \
	GOPATH=$(pwd) go get $dep; \
done
package gopkg.in/yaml.v2: unrecognized import path "gopkg.in/yaml.v2" (https fetch: Get https://gopkg.in/yaml.v2?go-get=1: dial tcp: lookup gopkg.in on [::1]:53: read udp [::1]:39502->[::1]:53: read: connection refused)
# cd .; git clone https://github.com/hashicorp/vault /home/tteras/aports/testing/vault-client/src/vault-client-1.1.2/src/github.com/hashicorp/vault
Cloning into '/home/tteras/aports/testing/vault-client/src/vault-client-1.1.2/src/github.com/hashicorp/vault'...
fatal: unable to access 'https://github.com/hashicorp/vault/': Could not resolve host: github.com
package github.com/hashicorp/vault/api: exit status 128
# cd .; git clone https://github.com/mitchellh/cli /home/tteras/aports/testing/vault-client/src/vault-client-1.1.2/src/github.com/mitchellh/cli
Cloning into '/home/tteras/aports/testing/vault-client/src/vault-client-1.1.2/src/github.com/mitchellh/cli'...
fatal: unable to access 'https://github.com/mitchellh/cli/': Could not resolve host: github.com
package github.com/mitchellh/cli: exit status 128

It's probably trying to get latest dependency packages. This is not
supported (yes, there might have few packages slipped in that do this,
but we get to those too).

The good Go software is packaged with dependencies in source tarball.
Perhaps with https://github.com/Masterminds/glide.

Timo

---