Github messages for voidlinux
 help / color / mirror / Atom feed
From: TeddyDD <TeddyDD@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] goatcounter: update to 2.2.3.
Date: Sat, 02 Jul 2022 19:52:49 +0200	[thread overview]
Message-ID: <20220702175249.rEcnsmy4gmsCanCuo7W2FYU797GZqZ-PzxA3yxw4FCE@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-37803@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1291 bytes --]

There is an updated pull request by TeddyDD against master on the void-packages repository

https://github.com/TeddyDD/void-packages-1 update-goatcounter
https://github.com/void-linux/void-packages/pull/37803

goatcounter: update to 2.2.3.
<!-- Uncomment relevant sections and delete options which are not applicable -->

I added the service for convinience.

#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/37803.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-update-goatcounter-37803.patch --]
[-- Type: text/x-diff, Size: 3374 bytes --]

From 5c11f2102162c9ec30f8bd5bfb391ce0df72c611 Mon Sep 17 00:00:00 2001
From: Daniel Lewan <vision360.daniel@gmail.com>
Date: Sat, 2 Jul 2022 16:14:49 +0200
Subject: [PATCH] goatcounter: update to 2.2.3.

---
 srcpkgs/goatcounter/files/README.voidlinux    | 16 ++++++++++++++++
 srcpkgs/goatcounter/files/goatcounter/log/run |  2 ++
 srcpkgs/goatcounter/files/goatcounter/run     |  7 +++++++
 srcpkgs/goatcounter/template                  | 13 ++++++++++---
 4 files changed, 35 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/goatcounter/files/README.voidlinux
 create mode 100755 srcpkgs/goatcounter/files/goatcounter/log/run
 create mode 100755 srcpkgs/goatcounter/files/goatcounter/run

diff --git a/srcpkgs/goatcounter/files/README.voidlinux b/srcpkgs/goatcounter/files/README.voidlinux
new file mode 100644
index 000000000000..1aa1c94b83a3
--- /dev/null
+++ b/srcpkgs/goatcounter/files/README.voidlinux
@@ -0,0 +1,16 @@
+The system service /etc/sv/goatcounter runs goatcounter as system user _goatcounter.
+
+By default sqlite database is used. The database will be stored in
+/var/db/goatcounter/db.sqlite3.
+
+To initialize the database, make sure you run goatcounter as the _goatcounter user:
+
+$ sudo -u _goatcounter goatcounter db create site \
+    -user.email 'admin@domain.name' \
+    -vhost site.name \
+    -db sqlite+/var/db/goatcounter/db.sqlite3
+
+By default the service listens on 5000 port and does not use TLS. In production
+envirnment you must adjust service config by creating /var/goatcounter/conf
+
+OPTS=-listen ... -db ...
diff --git a/srcpkgs/goatcounter/files/goatcounter/log/run b/srcpkgs/goatcounter/files/goatcounter/log/run
new file mode 100755
index 000000000000..0713d90a612e
--- /dev/null
+++ b/srcpkgs/goatcounter/files/goatcounter/log/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec logger -p daemon.notice -t goatcounter
diff --git a/srcpkgs/goatcounter/files/goatcounter/run b/srcpkgs/goatcounter/files/goatcounter/run
new file mode 100755
index 000000000000..e8f78fc6360c
--- /dev/null
+++ b/srcpkgs/goatcounter/files/goatcounter/run
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+[ -r ./conf ] && . ./conf
+
+: "${OPTS:=-db sqlite+/var/db/goatcounter/db.sqlite3?_busy_timeout=200&_journal_mode=wal&cache=shared -listen :5000 -public-port 5000 -tls none}"
+
+exec chpst -u _goatcounter goatcounter serve ${OPTS}
diff --git a/srcpkgs/goatcounter/template b/srcpkgs/goatcounter/template
index 734920ce5987..9ba8c6fda1c7 100644
--- a/srcpkgs/goatcounter/template
+++ b/srcpkgs/goatcounter/template
@@ -1,9 +1,9 @@
 # Template file for 'goatcounter'
 pkgname=goatcounter
-version=2.0.3
+version=2.2.3
 revision=1
 build_style=go
-go_import_path=zgo.at/goatcounter
+go_import_path=zgo.at/goatcounter/v2
 go_package="${go_import_path}/cmd/goatcounter"
 go_ldflags="-X zgo.at/goatcounter.Version=${version}"
 depends="tzdata"
@@ -12,4 +12,11 @@ maintainer="Martin Tournoij <martin@arp242.net>"
 license="EUPL-1.2"
 homepage="https://www.goatcounter.com/"
 distfiles="https://github.com/zgoat/goatcounter/archive/v${version}.tar.gz"
-checksum=d7477240602c4d6522fb528276378879cda35dea0ba4b174143e36a410398023
+checksum=5b3b07afda42752d7c9600a8671bbb30e70a98c656505eda99a4e67b309a94fc
+system_accounts="_goatcounter"
+make_dirs="/var/db/goatcounter 0750 _goatcounter _goatcounter"
+
+post_install() {
+	vsv goatcounter
+	vdoc $FILESDIR/README.voidlinux
+}

  parent reply	other threads:[~2022-07-02 17:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-02 14:15 [PR PATCH] " TeddyDD
2022-07-02 16:11 ` [PR PATCH] [Updated] " TeddyDD
2022-07-02 17:52 ` TeddyDD [this message]
2022-07-02 17:53 ` TeddyDD
2022-07-03  9:55 ` [PR PATCH] [Merged]: goatcounter: update to 2.2.3, add service sgn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220702175249.rEcnsmy4gmsCanCuo7W2FYU797GZqZ-PzxA3yxw4FCE@z \
    --to=teddydd@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).