Received: from vps892.directvps.nl (ikke.info [178.21.113.177]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 74079780FCB for <~alpine/aports@lists.alpinelinux.org>; Sun, 28 Mar 2021 12:50:13 +0000 (UTC) Received: by vps892.directvps.nl (Postfix, from userid 1008) id 44CFA440149; Sun, 28 Mar 2021 14:50:12 +0200 (CEST) Date: Sun, 28 Mar 2021 14:50:12 +0200 From: Kevin Daudt To: Pedro Lucas Porcellis Cc: ~alpine/aports@lists.alpinelinux.org Subject: Re: [PATCH] testing/satellite: new aport Message-ID: References: <20210328031709.14220-1-porcellis@eletrotupi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210328031709.14220-1-porcellis@eletrotupi.com> On Sun, Mar 28, 2021 at 12:17:09AM -0300, Pedro Lucas Porcellis wrote: > url: https://git.sr.ht/~gsthnz/satellite > pkgdesc: Satellite is a small Gemini server for serving static files > --- > testing/satellite/APKBUILD | 41 +++++++++++++++++++++++++ > testing/satellite/satellite.confd | 1 + > testing/satellite/satellite.initd | 17 ++++++++++ > testing/satellite/satellite.pre-install | 7 +++++ > 4 files changed, 66 insertions(+) > create mode 100644 testing/satellite/APKBUILD > create mode 100644 testing/satellite/satellite.confd > create mode 100644 testing/satellite/satellite.initd > create mode 100644 testing/satellite/satellite.pre-install > > diff --git a/testing/satellite/APKBUILD b/testing/satellite/APKBUILD > new file mode 100644 > index 0000000000..e78f602503 > --- /dev/null > +++ b/testing/satellite/APKBUILD > @@ -0,0 +1,41 @@ > +# Maintainer: Pedro Lucas Porcellis > +pkgname=satellite > +pkgver=1.0.0 > +pkgrel=1 `pkgrel` starts at 0. > +pkgdesc="Satellite is a small Gemini server for serving static files" > +url="https://git.sr.ht/~gsthnz/satellite" > +arch="all" > +license="AGPLv3" We use [SPDX identifiers][0] for licenses. So that means it would be either 'AGPL-3.0-or-later' or 'AGPL-3.0-only'. > +subpackages="$pkgname-openrc" > +makedepends="go scdoc" > +install="$pkgname.pre-install" > +source=" > + $pkgname-$pkgver.tar.gz::https://git.sr.ht/~gsthnz/$pkgname/archive/v$pkgver.tar.gz > + $pkgname.initd > + $pkgname.confd > +" > +pkggroups="satellite" > +builddir="$srcdir/$pkgname-v$pkgver" > + > +build() { > + make > +} > + > +check() { > + go test ./... > +} > + > +package() { > + install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname > + install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname > + install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname > + > + install -Dm640 -o root -g satellite "$builddir"/$pkgname.toml \ > + "$pkgdir"/etc/$pkgname.toml > + > + install -Dm644 doc/satellite.1 "$builddir"/usr/share/man/man1/satellite.1 > + install -Dm644 doc/satellite.toml.5 "$builddir"/usr/share/man/man5/satellite.toml.5 > +} > +sha512sums="2b14e6bd7a1b33a0b4cf402e64585f9f87d2491709bd2f383ec0777b24a372fa7360ca7da96d21e61790095554c8029b07cdddc7a23688465ee77f7854beea48 satellite-1.0.0.tar.gz > +dcf84f7f09651426189280df73ce683b5a88bc40764e1ae5e0993fe2d9a796e36437c5f064fae120d749f8fd0151ef11296210556408a04441fc01e571f8f6cb satellite.initd > +f20f287640743ede9139a12fb7cbbcc9f2f51bc179322e04253e236daf55090aa043e9e01ec7f29cadc965cdb73bbaa86080072840913c88503138df8a04e443 satellite.confd" > diff --git a/testing/satellite/satellite.confd b/testing/satellite/satellite.confd > new file mode 100644 > index 0000000000..4a0e714c53 > --- /dev/null > +++ b/testing/satellite/satellite.confd > @@ -0,0 +1 @@ > +satellite_log_file="/var/log/satellite.log" > diff --git a/testing/satellite/satellite.initd b/testing/satellite/satellite.initd > new file mode 100644 > index 0000000000..431408940a > --- /dev/null > +++ b/testing/satellite/satellite.initd > @@ -0,0 +1,17 @@ > +#!/sbin/openrc-run > +name="satellite" > +description="satellite gemini service" > +supervisor=supervise-daemon > +command="/usr/bin/$name" > +command_user="satellite:satellite" > +pidfile="/run/$name.pid" > +start_stop_daemon_args="--stdout $satellite_log_file --stderr $satellite_log_file" > + > +depend() { > + need net > + after firewall > +} > + > +start_pre() { > + checkpath -f -m 0644 -o ${SVCNAME}:${SVCNAME} "$satellite_log_file" > +} > diff --git a/testing/satellite/satellite.pre-install b/testing/satellite/satellite.pre-install > new file mode 100644 > index 0000000000..1fd6912d5a > --- /dev/null > +++ b/testing/satellite/satellite.pre-install > @@ -0,0 +1,7 @@ > +#!/bin/sh > + > +addgroup -S satellite 2>/dev/null > +adduser -S -D -H -h /var/empty -s /sbin/nologin -G satellite -g satellite satellite 2>/dev/null > + > +exit 0 > + > -- > 2.30.2 > Thanks, just a few remarks that I mentioned in-line. See [MR19831][1] for the CI pipeline. [0]:https://spdx.org/licenses/ [1]:https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/19831 [