~alpine/aports

3 2

[alpine-aports] [PATCH 1/2] testing/glock: new aport

Christian Kampka <christian@kampka.net>
Details
Message ID
<1438899666-12217-1-git-send-email-christian@kampka.net>
Sender timestamp
1438899665
DKIM signature
missing
Download raw message
Patch: +70 -0
https://github.com/robfig/glock

Glock is a command-line tool to lock dependencies to specific revisions,
using a version control hook to keep those revisions in sync across a team.
---
 testing/glock/APKBUILD | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)
 create mode 100644 testing/glock/APKBUILD

diff --git a/testing/glock/APKBUILD b/testing/glock/APKBUILD
new file mode 100644
index 0000000..6883197
--- /dev/null
+++ b/testing/glock/APKBUILD
@@ -0,0 +1,70 @@
# Maintainer: Chritsian Kampka <christian at kampka dot net>
pkgname=glock
pkgver=0.0.20150806
pkgrel=0
pkgdesc="A command-line tool to lock dependencies to specific revisions"
url="https://github.com/robfig/glock/"
arch="x86_64"
license="MIT"
makedepends="git go"
options="!strip"
source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz"

_giturl="git://github.com/robfig/${pkgname}.git"
_disturl="dev.alpinelinux.org:/archive/$pkgname/"
_commit="cb3c3ec56de988289cab7bbd284eddc04dfee6c9"

snapshot() {
	local _date=$(date +%Y%m%d)
	local _ver=0.0.$_date
	local _pkg=$pkgname-$_ver.tar.gz

	abuild clean
	abuild deps
	abuild fetch

	mkdir -p "$srcdir"
	cd "$srcdir"
	msg "Creating snapshot: $_pkg"
	export GOPATH="${srcdir}/$pkgname"
	git clone -q ${_giturl} || return 1
	cd $pkgname
	git checkout ${_commit} || return 1
	go get -v -d || return 1
	cd $srcdir
	tar zcf $pkgname-$pkgver.tar.gz $pkgname || return 1
	rsync --progress -La $pkgname-${_ver}.tar.gz \
		$_disturl || return 1
	cd $startdir
	sed -i -e "s/^pkgver=.*/pkgver=$_ver/" APKBUILD || return 1
	abuild checksum
	abuild undeps
}

_builddir="${srcdir}/${pkgname}"


prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	export GOPATH="$_builddir"
	go build
}

package() {
	cd "$_builddir"
	install -Dm755 ${_builddir}/glock \
	"$pkgdir"/usr/bin/glock
}
md5sums="a8b3524a646d73c56026d849f90f8f73  glock-0.0.20150806.tar.gz"
sha256sums="a71ed55108b93831c3a42e607e50573957963b9f195ed8412206307b582f44a2  glock-0.0.20150806.tar.gz"
sha512sums="3726f1c271a39e9e24e808793ea9e7d549c1f32a9840176045d027ef6cf6c36d86ff4a9cad2e10477746e39a0fbc92d7a0fbd10a23c2d6219a5fd8a07b7e671e  glock-0.0.20150806.tar.gz"
-- 
2.5.0



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---

[alpine-aports] [PATCH 2/2] testing/dockerize: new aport

Christian Kampka <christian@kampka.net>
Details
Message ID
<1438899666-12217-2-git-send-email-christian@kampka.net>
In-Reply-To
<1438899666-12217-1-git-send-email-christian@kampka.net> (view parent)
Sender timestamp
1438899666
DKIM signature
missing
Download raw message
Patch: +65 -0
https://github.com/jwilder/dockerize
Utility to simplify running applications in docker containers.
---
 testing/dockerize/APKBUILD | 65 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)
 create mode 100644 testing/dockerize/APKBUILD

diff --git a/testing/dockerize/APKBUILD b/testing/dockerize/APKBUILD
new file mode 100644
index 0000000..350b12e
--- /dev/null
+++ b/testing/dockerize/APKBUILD
@@ -0,0 +1,65 @@
# Maintainer: Chritsian Kampka <christian at kampka dot net>
pkgname=dockerize
pkgver=0.0.2
pkgrel=0
pkgdesc="Utility to simplify running applications in docker containers."
url="https://github.com/jwilder/dockerize"
arch="x86_64"
license="MIT"
makedepends="git go glock"
options="!strip"
source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz"

_giturl="git://github.com/jwilder/${pkgname}.git"
_disturl="dev.alpinelinux.org:/archive/$pkgname/"


snapshot() {
	abuild clean
	abuild deps
	abuild fetch

	mkdir -p "$srcdir"
	cd "$srcdir"
	msg "Creating snapshot: $_pkg"
	export GOPATH="${srcdir}/$pkgname"
	git clone -q ${_giturl} ${pkgname}|| return 1
	cd $pkgname
	git checkout v${pkgver} || return 1
	glock sync ../ || return 1
	cd $srcdir
	tar zcf $pkgname-$pkgver.tar.gz $pkgname || return 1
	rsync --progress -La $pkgname-${pkgver}.tar.gz \
		$_disturl || return 1
	cd $startdir
	abuild checksum
	abuild undeps
}

_builddir="${srcdir}/${pkgname}"

prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	export GOPATH="$_builddir"
	make dist
}

package() {
	cd "$_builddir"
	GOARCH=$(go env | grep GOARCH | cut -d'=' -f 2 | xargs echo -n)
	install -Dm755 ${_builddir}/dist/linux/$GOARCH/dockerize \
	"$pkgdir"/usr/bin/dockerize
}
md5sums="2e09e544f4192fb528a686fa162cb077  dockerize-0.0.2.tar.gz"
sha256sums="e0af863ddafa75b46f72a8a5bedc37fe340f599f42f88c42c8af63610ac93b87  dockerize-0.0.2.tar.gz"
sha512sums="108baf88186d24f30c66b924eeb24174f7f06e765c3487de513f5450e988246e2a67bb5c61348473da79f18ecaae056f3b5d562c8b9c265afceb3c78fa321fe9  dockerize-0.0.2.tar.gz"
-- 
2.5.0



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Christian Kampka <christian@kampka.net>
Details
Message ID
<CADq4isQEV8Ywfe5kz=M7ymuq97_BH76B18zvxO+VPp9SvwMZaw@mail.gmail.com>
In-Reply-To
<e35ea1f95c1837aef7ee52057757daaa@bsod.eu> (view parent)
Sender timestamp
1438939985
DKIM signature
missing
Download raw message
Hi Francesco,

the buildin snapshot function does not provide a complete and working
tarball, therefore the build rolls is own.
This seems to be a common problem for many go packages in aports.

As to why the upload to dev.alpinelinux.org is not working I cannot say as
I do not have upload permissions to that location.
If you need me to modify the patch, please provide me with the necessary
debug output showing the problem you are experiencing.

Cheers,
Christian



Francesco Colista <fcolista@alpinelinux.org> schrieb am Fr., 7. Aug. 2015
um 10:25 Uhr:

> Il 2015-08-07 00:21 Christian Kampka ha scritto:
> > https://github.com/robfig/glock
> >
> > Glock is a command-line tool to lock dependencies to specific
> > revisions,
> > using a version control hook to keep those revisions in sync across a
> > team.
> > ---
>
> > +snapshot() {
> > +     local _date=$(date +%Y%m%d)
> > +     local _ver=0.0.$_date
> > +     local _pkg=$pkgname-$_ver.tar.gz
> > +
> > +     abuild clean
> > +     abuild deps
> > +     abuild fetch
> > +
> > +     mkdir -p "$srcdir"
> > +     cd "$srcdir"
> > +     msg "Creating snapshot: $_pkg"
> > +     export GOPATH="${srcdir}/$pkgname"
> > +     git clone -q ${_giturl} || return 1
> > +     cd $pkgname
> > +     git checkout ${_commit} || return 1
> > +     go get -v -d || return 1
> > +     cd $srcdir
> > +     tar zcf $pkgname-$pkgver.tar.gz $pkgname || return 1
> > +     rsync --progress -La $pkgname-${_ver}.tar.gz \
> > +             $_disturl || return 1
> > +     cd $startdir
> > +     sed -i -e "s/^pkgver=.*/pkgver=$_ver/" APKBUILD || return 1
> > +     abuild checksum
> > +     abuild undeps
> > +}
> > +
>
> Hi Christian.
> Rather than implementing a snapshot() function, you can use the buildin
> abuild snaphsot who proves to be reliable so far.
> Please note: http://wiki.alpinelinux.org/wiki/Include:Abuild
> This patch applies, but doesn't build because the .tar.gz upload on
> dev.alpinelinux.org fails.
> Thanks.
>
> --
> :: Francesco Colista
> :: Alpine Linux Infrstraucture
> :: http://www.alpinelinux.org
>
Francesco Colista <fcolista@alpinelinux.org>
Details
Message ID
<e35ea1f95c1837aef7ee52057757daaa@bsod.eu>
In-Reply-To
<1438899666-12217-1-git-send-email-christian@kampka.net> (view parent)
Sender timestamp
1438935903
DKIM signature
missing
Download raw message
Il 2015-08-07 00:21 Christian Kampka ha scritto:
> https://github.com/robfig/glock
> 
> Glock is a command-line tool to lock dependencies to specific 
> revisions,
> using a version control hook to keep those revisions in sync across a 
> team.
> ---

> +snapshot() {
> +	local _date=$(date +%Y%m%d)
> +	local _ver=0.0.$_date
> +	local _pkg=$pkgname-$_ver.tar.gz
> +
> +	abuild clean
> +	abuild deps
> +	abuild fetch
> +
> +	mkdir -p "$srcdir"
> +	cd "$srcdir"
> +	msg "Creating snapshot: $_pkg"
> +	export GOPATH="${srcdir}/$pkgname"
> +	git clone -q ${_giturl} || return 1
> +	cd $pkgname
> +	git checkout ${_commit} || return 1
> +	go get -v -d || return 1
> +	cd $srcdir
> +	tar zcf $pkgname-$pkgver.tar.gz $pkgname || return 1
> +	rsync --progress -La $pkgname-${_ver}.tar.gz \
> +		$_disturl || return 1
> +	cd $startdir
> +	sed -i -e "s/^pkgver=.*/pkgver=$_ver/" APKBUILD || return 1
> +	abuild checksum
> +	abuild undeps
> +}
> +

Hi Christian.
Rather than implementing a snapshot() function, you can use the buildin 
abuild snaphsot who proves to be reliable so far.
Please note: http://wiki.alpinelinux.org/wiki/Include:Abuild
This patch applies, but doesn't build because the .tar.gz upload on 
dev.alpinelinux.org fails.
Thanks.

-- 
:: Francesco Colista
:: Alpine Linux Infrstraucture
:: http://www.alpinelinux.org


---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)