progrium / entrykit

Entrypoint tools for elegant, programmable containers
443 stars 29 forks source link

alpine package #3

Closed progrium closed 3 years ago

progrium commented 8 years ago

Entrykit works great with Alpine and it's a bit cumbersome to set up Entrykit. curl .. | tar .. and then entrykit --symlink. If made an Alpine package it could be as simple as apk-install entrykit.

tilgovi commented 8 years ago

:heart:

tilgovi commented 8 years ago

For anyone interested finding this, saved you a search: http://wiki.alpinelinux.org/wiki/Creating_an_Alpine_package

tilgovi commented 8 years ago

Here is a working APKBUILD.

I opted not to install the symlinks because I haven't figured out how to easily make sure these get uninstalled correctly. We may want a --unlink before we do that, because entrykit itself is the source of truth for the list of commands.

Having never packaged for alpine before, do we maintain this in tree, in a branch, in a separate repo, ...?

# Contributor: Randall Leeds <randall@bleeds.info>
# Maintainer: Randall Leeds <randall@bleeds.info>
pkgname=entrykit
pkgver=0.4.0
pkgrel=0
pkgdesc="Entrypoint tools for elegant, programmable containers"
url="https://github.com/progrium/entrykit"
arch="x86_64"
license="MIT"
depends=""
depends_dev=""
makedepends="go"
install=""
subpackages=""
source="$pkgname-$pkgver.tar.gz::https://github.com/progrium/$pkgname/archive/v$pkgver.tar.gz"

_builddir="$srcdir"/$pkgname-$pkgver
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"
    go build -a -ldflags "-X main.Version=$pkgver" -o $pkgname ./cmd
}

package() {
    cd "$_builddir"
    mkdir -p "$pkgdir"/usr/bin
    cp $pkgname "$pkgdir"/usr/bin
}

md5sums="10d9189782ca67a2a7de963ef05dd861  entrykit-0.4.0.tar.gz"
sha256sums="89a35754ff0a9beba3a6d2eb34bc6048476409536586908cf3e2c6afdb503463  entrykit-0.4.0.tar.gz"
sha512sums="79097b090af7bcaed31587d7ea81776698ac1bfa75defb4269e02da3f282d109fa1b68b3e8aca4351a3eb1fe1c0128c26853174f398b8d015b16a51a131ca6ca  entrykit-0.4.0.tar.gz"
tilgovi commented 8 years ago

Okay. I did more reading and see now the process is to submit it as a patch to the aports repo. I'll do this now!! :)

progrium commented 8 years ago

Update?

tilgovi commented 8 years ago

Should I submit it to community or testing?

progrium commented 8 years ago

Not sure. @andyshinn do you know what would be best?

andyshinn commented 8 years ago

Submit it to testing first.

tilgovi commented 8 years ago

Thanks to help from @mattaitchison, we have mattaitchison/entrykit-apk now and I'm waiting to submit the 0.4.0r1 to alpine testing, but there are DNS issues currently.

We can close this.

tilgovi commented 8 years ago

Successfully, I think, submitted it to the alpine-aports list. Haven't received a bounce/spam notification this time, at least :). We'll see if it pops up in the archives later.

andyshinn commented 8 years ago

They have a patchwork program that grabs patches for review. You can use it to verify stuff got through. In this case, yes it did: http://patchwork.alpinelinux.org/patch/1779/.

tilgovi commented 8 years ago

Thanks, @andyshinn!

tilgovi commented 8 years ago

Published in testing. Done.

tilgovi commented 7 years ago

Can be closed.