Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: soju-0.2.1
@ 2021-10-03 21:43 flupe
  2021-10-03 22:52 ` Vaelatern
                   ` (29 more replies)
  0 siblings, 30 replies; 31+ messages in thread
From: flupe @ 2021-10-03 21:43 UTC (permalink / raw)
  To: ml

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

There is a new pull request by flupe against master on the void-packages repository

https://github.com/flupe/void-packages master
https://github.com/void-linux/void-packages/pull/33302

New package: soju-0.2.1
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (ARCH-LIBC)


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

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

From 495653097d8e90a7378bb752580954af33104fa3 Mon Sep 17 00:00:00 2001
From: flupe <lucas@escot.me>
Date: Sun, 3 Oct 2021 23:37:05 +0200
Subject: [PATCH] New package: soju-0.2.1

---
 srcpkgs/soju/files/soju/run |  6 ++++++
 srcpkgs/soju/template       | 31 +++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100755 srcpkgs/soju/files/soju/run
 create mode 100644 srcpkgs/soju/template

diff --git a/srcpkgs/soju/files/soju/run b/srcpkgs/soju/files/soju/run
new file mode 100755
index 000000000000..fba505701928
--- /dev/null
+++ b/srcpkgs/soju/files/soju/run
@@ -0,0 +1,6 @@
+#!/bin/sh
+if [ -f /etc/soju/config ]; then
+  CONF="-config /etc/soju/config"
+fi
+[ -r conf ] && . ./conf
+exec chpst -u soju:soju soju $CONF 2>&1
diff --git a/srcpkgs/soju/template b/srcpkgs/soju/template
new file mode 100644
index 000000000000..58d254d89229
--- /dev/null
+++ b/srcpkgs/soju/template
@@ -0,0 +1,31 @@
+# Template file for 'soju'
+pkgname=soju
+version=0.2.1
+revision=1
+build_style=gnu-makefile
+makedepends="go scdoc"
+short_desc="A user-friendly IRC bouncer"
+maintainer="flupe <lucas@escot.me>"
+license="AGPL-3.0-or-later"
+homepage="https://git.sr.ht/~emersion/soju"
+distfiles="${homepage}/refs/download/v${version}/${pkgname}-${version}.tar.gz"
+changelog="${homepage}/refs/v${version}"
+checksum=3558db9f78da3d0311b45e42307ef01af3218156b0370d85a1d7eef4d2811559
+conf_files="/etc/soju/config"
+system_accounts="soju"
+soju_homedir="/var/lib/soju"
+make_dirs="/var/lib/soju 0755 soju soju"
+
+do_build() {
+  export CGO_CPPFLAGS="${CPPFLAGS}"
+  export CGO_CFLAGS="${CFLAGS}"
+  export CGO_CXXFLAGS="${CXXFLAGS}"
+  export CGO_LDFLAGS="${LDFLAGS}"
+  GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+  make ${makejobs} PREFIX="${DESTDIR}"/usr GOFLAGS="${GOFLAGS}"
+}
+
+post_install() {
+  vlicense LICENSE
+  vsv soju
+}

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
@ 2021-10-03 22:52 ` Vaelatern
  2021-10-04  8:12 ` [PR PATCH] [Updated] " flupe
                   ` (28 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Vaelatern @ 2021-10-03 22:52 UTC (permalink / raw)
  To: ml

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

New comment by Vaelatern on void-packages repository

https://github.com/void-linux/void-packages/pull/33302#issuecomment-933038690

Comment:
```
srcpkgs/soju/template: Place distfiles= after changelog=
srcpkgs/soju/template:7: short_desc should not start with an article
srcpkgs/soju/template:20: please indent with tabs
```

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PR PATCH] [Updated] New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
  2021-10-03 22:52 ` Vaelatern
@ 2021-10-04  8:12 ` flupe
  2021-10-04  8:14 ` flupe
                   ` (27 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: flupe @ 2021-10-04  8:12 UTC (permalink / raw)
  To: ml

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

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

https://github.com/flupe/void-packages master
https://github.com/void-linux/void-packages/pull/33302

New package: soju-0.2.1
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (ARCH-LIBC)


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

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

From 6214cfcb8efdd68422120d1b21814d1b60285efb Mon Sep 17 00:00:00 2001
From: flupe <lucas@escot.me>
Date: Sun, 3 Oct 2021 23:37:05 +0200
Subject: [PATCH] New package: soju-0.2.1

---
 srcpkgs/soju/files/soju/run |  6 ++++++
 srcpkgs/soju/template       | 31 +++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100755 srcpkgs/soju/files/soju/run
 create mode 100644 srcpkgs/soju/template

diff --git a/srcpkgs/soju/files/soju/run b/srcpkgs/soju/files/soju/run
new file mode 100755
index 000000000000..fba505701928
--- /dev/null
+++ b/srcpkgs/soju/files/soju/run
@@ -0,0 +1,6 @@
+#!/bin/sh
+if [ -f /etc/soju/config ]; then
+  CONF="-config /etc/soju/config"
+fi
+[ -r conf ] && . ./conf
+exec chpst -u soju:soju soju $CONF 2>&1
diff --git a/srcpkgs/soju/template b/srcpkgs/soju/template
new file mode 100644
index 000000000000..9b66f2d764c6
--- /dev/null
+++ b/srcpkgs/soju/template
@@ -0,0 +1,31 @@
+# Template file for 'soju'
+pkgname=soju
+version=0.2.1
+revision=1
+build_style=gnu-makefile
+hostmakedepends="go scdoc"
+short_desc="User-friendly IRC bouncer"
+maintainer="flupe <lucas@escot.me>"
+license="AGPL-3.0-or-later"
+homepage="https://git.sr.ht/~emersion/soju"
+changelog="${homepage}/refs/v${version}"
+distfiles="${homepage}/refs/download/v${version}/${pkgname}-${version}.tar.gz"
+checksum=3558db9f78da3d0311b45e42307ef01af3218156b0370d85a1d7eef4d2811559
+conf_files="/etc/soju/config"
+system_accounts="soju"
+soju_homedir="/var/lib/soju"
+make_dirs="/var/lib/soju 0755 soju soju"
+
+do_build() {
+	export CGO_CPPFLAGS="${CPPFLAGS}"
+	export CGO_CFLAGS="${CFLAGS}"
+	export CGO_CXXFLAGS="${CXXFLAGS}"
+	export CGO_LDFLAGS="${LDFLAGS}"
+	GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+	make ${makejobs} PREFIX="${DESTDIR}"/usr GOFLAGS="${GOFLAGS}"
+}
+
+post_install() {
+	vlicense LICENSE
+	vsv soju
+}

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
  2021-10-03 22:52 ` Vaelatern
  2021-10-04  8:12 ` [PR PATCH] [Updated] " flupe
@ 2021-10-04  8:14 ` flupe
  2021-10-04 11:14 ` [PR REVIEW] " flupe
                   ` (26 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: flupe @ 2021-10-04  8:14 UTC (permalink / raw)
  To: ml

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

New comment by flupe on void-packages repository

https://github.com/void-linux/void-packages/pull/33302#issuecomment-933251040

Comment:
Thanks, my bad I forgot to run `xlint` before submitting a PR.
I moved `go` and `scdoc` to `makehostdepends`, however it's unclear to me whether `scdoc` must be here or in `makedepends`.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PR REVIEW] New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (2 preceding siblings ...)
  2021-10-04  8:14 ` flupe
@ 2021-10-04 11:14 ` flupe
  2021-10-04 11:24 ` paper42
                   ` (25 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: flupe @ 2021-10-04 11:14 UTC (permalink / raw)
  To: ml

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

New review comment by flupe on void-packages repository

https://github.com/void-linux/void-packages/pull/33302#discussion_r721264679

Comment:
Thanks for the comment.
Is it usually how go packages are built, even if developers provide a Makefile?
Does this mean I should ignore the flags recommend [here](https://wiki.archlinux.org/title/Go_package_guidelines) for packaging go applications?

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PR REVIEW] New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (3 preceding siblings ...)
  2021-10-04 11:14 ` [PR REVIEW] " flupe
@ 2021-10-04 11:24 ` paper42
  2021-10-04 11:27 ` paper42
                   ` (24 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: paper42 @ 2021-10-04 11:24 UTC (permalink / raw)
  To: ml

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

New review comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/33302#discussion_r721271017

Comment:
> Is it usually how go packages are built, even if developers provide a Makefile?

If you use the makefile, you will have to make sure it cross compiles properly and applies the correct flags which is not worth the added complexity. Not using the makefile is better, but not ideal. Some projects have a target in the makefile which doesn't touch the go part and installs only the config file, manpage etc.

> Does this mean I should ignore the flags recommend here for packaging go applications?

That's a guide for Arch Linux, I don't see why this is relevant here. The go build style will apply the flags we want.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PR REVIEW] New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (4 preceding siblings ...)
  2021-10-04 11:24 ` paper42
@ 2021-10-04 11:27 ` paper42
  2021-10-04 12:41 ` [PR PATCH] [Updated] " flupe
                   ` (23 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: paper42 @ 2021-10-04 11:27 UTC (permalink / raw)
  To: ml

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

New review comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/33302#discussion_r721273000

Comment:
```suggestion
homepage="https://soju.im/"
changelog="https://git.sr.ht/~emersion/soju/refs/v${version}"
distfiles="https://git.sr.ht/~emersion/soju/refs/download/v${version}/soju-${version}.tar.gz"
```

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PR PATCH] [Updated] New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (5 preceding siblings ...)
  2021-10-04 11:27 ` paper42
@ 2021-10-04 12:41 ` flupe
  2021-10-04 12:47 ` flupe
                   ` (22 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: flupe @ 2021-10-04 12:41 UTC (permalink / raw)
  To: ml

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

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

https://github.com/flupe/void-packages master
https://github.com/void-linux/void-packages/pull/33302

New package: soju-0.2.1
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (ARCH-LIBC)


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

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

From 10d5c83448be1f8f549cc63fc1a99cd89c1e7170 Mon Sep 17 00:00:00 2001
From: flupe <lucas@escot.me>
Date: Sun, 3 Oct 2021 23:37:05 +0200
Subject: [PATCH] New package: soju-0.2.1

---
 srcpkgs/soju/files/soju/run |  3 +++
 srcpkgs/soju/template       | 26 ++++++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100755 srcpkgs/soju/files/soju/run
 create mode 100644 srcpkgs/soju/template

diff --git a/srcpkgs/soju/files/soju/run b/srcpkgs/soju/files/soju/run
new file mode 100755
index 000000000000..03a9b727d81f
--- /dev/null
+++ b/srcpkgs/soju/files/soju/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+[ -r conf ] && . ./conf
+exec soju ${OPTS:- -config /etc/soju/config}
diff --git a/srcpkgs/soju/template b/srcpkgs/soju/template
new file mode 100644
index 000000000000..adaf5318da63
--- /dev/null
+++ b/srcpkgs/soju/template
@@ -0,0 +1,26 @@
+# Template file for 'soju'
+pkgname=soju
+version=0.2.1
+revision=1
+build_style=go
+go_import_path="git.sr.ht/~emersion/soju"
+go_package="./cmd/soju ./cmd/sojuctl"
+hostmakedepends="scdoc"
+short_desc="User-friendly IRC bouncer"
+maintainer="flupe <lucas@escot.me>"
+license="AGPL-3.0-or-later"
+homepage="https://soju.im"
+changelog="https://git.sr.ht/~emersion/soju/refs/v${version}"
+distfiles="https://git.sr.ht/~emersion/soju/refs/download/v${version}/soju-${version}.tar.gz"
+checksum=3558db9f78da3d0311b45e42307ef01af3218156b0370d85a1d7eef4d2811559
+conf_files="/etc/soju/config"
+make_dirs="/var/lib/soju 0755 root root
+ /etc/soju 0755 root root"
+
+post_install() {
+	make doc/soju.1
+	vman doc/soju.1
+	vlicense LICENSE
+	vinstall config.in 644 etc/soju config
+	vsv soju
+}

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (6 preceding siblings ...)
  2021-10-04 12:41 ` [PR PATCH] [Updated] " flupe
@ 2021-10-04 12:47 ` flupe
  2021-10-04 16:31 ` Duncaen
                   ` (21 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: flupe @ 2021-10-04 12:47 UTC (permalink / raw)
  To: ml

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

New comment by flupe on void-packages repository

https://github.com/void-linux/void-packages/pull/33302#issuecomment-933448925

Comment:
Thanks for the review, I made the recommended changes. Uses the `go` build-style now.
Also removed the `soju` system user as it looked like more work than necessary.
I think I made the mistake of doing `make doc/soju.1` rather than using `scdoc` in `post_install()`, but other than that I think it's done.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (7 preceding siblings ...)
  2021-10-04 12:47 ` flupe
@ 2021-10-04 16:31 ` Duncaen
  2021-10-04 16:32 ` Duncaen
                   ` (20 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Duncaen @ 2021-10-04 16:31 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/33302#issuecomment-933652886

Comment:
This should use a separate user, there is no reason to run an irc bouncer as root.

```
system_accounts="_soju"
```

and `exec chpst -u _soju soju ...` in the run file.

I also switched the log and database directories, not sure if this would make sense:
```
make_dirs="/var/db/soju/ 750 _soju _soju
  /var/log/soju/ 750 _soju _soju"
```

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (8 preceding siblings ...)
  2021-10-04 16:31 ` Duncaen
@ 2021-10-04 16:32 ` Duncaen
  2021-10-04 18:13 ` flupe
                   ` (19 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Duncaen @ 2021-10-04 16:32 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/33302#issuecomment-933652886

Comment:
This should use a separate user, there is no reason to run an irc bouncer as root.

```
system_accounts="_soju"
```

and `exec chpst -u _soju soju ...` in the run file.

I also switched the log and database directories, not sure if this would make sense:
```
make_dirs="/var/db/soju/ 750 _soju _soju
  /var/log/soju/ 750 _soju _soju"
```
And then chaning the default configuration to use those instead of `/var/lib/soju`.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (9 preceding siblings ...)
  2021-10-04 16:32 ` Duncaen
@ 2021-10-04 18:13 ` flupe
  2021-10-04 18:49 ` flupe
                   ` (18 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: flupe @ 2021-10-04 18:13 UTC (permalink / raw)
  To: ml

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

New comment by flupe on void-packages repository

https://github.com/void-linux/void-packages/pull/33302#issuecomment-933731857

Comment:
@Duncaen 

> This should use a separate user, there is no reason to run an irc bouncer as root.

I completely agree with this statement. My only gripe was that the database is only created when running `sojuctl`:

```
sojuctl -config /etc/soju/config create-user username -admin
```

And users would have to make sure it is ran as `_soju` so that the service can read it. Is there a way to document this?
Also, is there a naming convention for system users on void, why `_soju` rather than `soju`?

> I also switched the log and database directories, not sure if this would make sense:

Yes, makes a lot of sense. On it.


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (10 preceding siblings ...)
  2021-10-04 18:13 ` flupe
@ 2021-10-04 18:49 ` flupe
  2021-10-04 19:28 ` [PR PATCH] [Updated] " flupe
                   ` (17 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: flupe @ 2021-10-04 18:49 UTC (permalink / raw)
  To: ml

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

New comment by flupe on void-packages repository

https://github.com/void-linux/void-packages/pull/33302#issuecomment-933731857

Comment:
@Duncaen 

> This should use a separate user, there is no reason to run an irc bouncer as root.

I completely agree with this statement. My only gripe was that the database is only created when running `sojuctl`:

```
sojuctl -config /etc/soju/config create-user username -admin
```

And users would have to make sure it is ran as `_soju` so that the service can read it. Is there a way to document this?
~~Also, is there a naming convention for system users on void, why `_soju` rather than `soju`?~~ (Ah, found it on the manual)

> I also switched the log and database directories, not sure if this would make sense:

Yes, makes a lot of sense. On it.


^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PR PATCH] [Updated] New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (11 preceding siblings ...)
  2021-10-04 18:49 ` flupe
@ 2021-10-04 19:28 ` flupe
  2021-10-04 19:30 ` flupe
                   ` (16 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: flupe @ 2021-10-04 19:28 UTC (permalink / raw)
  To: ml

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

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

https://github.com/flupe/void-packages master
https://github.com/void-linux/void-packages/pull/33302

New package: soju-0.2.1
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (ARCH-LIBC)


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

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

From efa20f1cf7652553bae5c085b322cd5946424abe Mon Sep 17 00:00:00 2001
From: flupe <lucas@escot.me>
Date: Sun, 3 Oct 2021 23:37:05 +0200
Subject: [PATCH] New package: soju-0.2.1

---
 srcpkgs/soju/files/config   |  2 ++
 srcpkgs/soju/files/soju/run |  3 +++
 srcpkgs/soju/template       | 28 ++++++++++++++++++++++++++++
 3 files changed, 33 insertions(+)
 create mode 100644 srcpkgs/soju/files/config
 create mode 100755 srcpkgs/soju/files/soju/run
 create mode 100644 srcpkgs/soju/template

diff --git a/srcpkgs/soju/files/config b/srcpkgs/soju/files/config
new file mode 100644
index 000000000000..55781d839402
--- /dev/null
+++ b/srcpkgs/soju/files/config
@@ -0,0 +1,2 @@
+db sqlite3 /var/db/soju/main.db
+log fs /var/log/soju/
diff --git a/srcpkgs/soju/files/soju/run b/srcpkgs/soju/files/soju/run
new file mode 100755
index 000000000000..3b00ad02fb07
--- /dev/null
+++ b/srcpkgs/soju/files/soju/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+[ -r conf ] && . ./conf
+exec chpst -u _soju soju ${OPTS:- -config /etc/soju/config}
diff --git a/srcpkgs/soju/template b/srcpkgs/soju/template
new file mode 100644
index 000000000000..fc63691e93f5
--- /dev/null
+++ b/srcpkgs/soju/template
@@ -0,0 +1,28 @@
+# Template file for 'soju'
+pkgname=soju
+version=0.2.1
+revision=1
+build_style=go
+go_import_path="git.sr.ht/~emersion/soju"
+go_package="./cmd/soju ./cmd/sojuctl"
+hostmakedepends="scdoc"
+short_desc="User-friendly IRC bouncer"
+maintainer="flupe <lucas@escot.me>"
+license="AGPL-3.0-or-later"
+homepage="https://soju.im"
+changelog="https://git.sr.ht/~emersion/soju/refs/v${version}"
+distfiles="https://git.sr.ht/~emersion/soju/refs/download/v${version}/soju-${version}.tar.gz"
+checksum=3558db9f78da3d0311b45e42307ef01af3218156b0370d85a1d7eef4d2811559
+conf_files="/etc/soju/config"
+system_accounts="_soju"
+make_dirs="/var/db/soju 0750 _soju _soju
+ /var/log/soju 0750 _soju _soju
+ /etc/soju 0755 root root"
+
+post_install() {
+	scdoc <doc/soju.1.scd >doc/soju.1
+	vman doc/soju.1
+	vlicense LICENSE
+	vinstall $FILESDIR/config 644 etc/soju
+	vsv soju
+}

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (12 preceding siblings ...)
  2021-10-04 19:28 ` [PR PATCH] [Updated] " flupe
@ 2021-10-04 19:30 ` flupe
  2021-10-04 19:39 ` Duncaen
                   ` (15 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: flupe @ 2021-10-04 19:30 UTC (permalink / raw)
  To: ml

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

New comment by flupe on void-packages repository

https://github.com/void-linux/void-packages/pull/33302#issuecomment-933789923

Comment:
Did all the recommended changes. Defining a `_soju` system user, providing an alternative default config using `/var/log/soju` and `/var/db/soju`.
Everything seems to work fine now.

Thank you all, sorry for the tedious process, it's my first template. Slowly getting used to the void process.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (13 preceding siblings ...)
  2021-10-04 19:30 ` flupe
@ 2021-10-04 19:39 ` Duncaen
  2021-10-04 21:25 ` [PR PATCH] [Updated] " flupe
                   ` (14 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Duncaen @ 2021-10-04 19:39 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/33302#issuecomment-933795547

Comment:
Some packages have a void specific readme, this would be a good case for that. This is done by adding a `README.voidlinux` into files and installing it with `vdoc "${FILESDIR}/README.voidlinux"`.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PR PATCH] [Updated] New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (14 preceding siblings ...)
  2021-10-04 19:39 ` Duncaen
@ 2021-10-04 21:25 ` flupe
  2021-10-04 21:26 ` flupe
                   ` (13 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: flupe @ 2021-10-04 21:25 UTC (permalink / raw)
  To: ml

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

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

https://github.com/flupe/void-packages master
https://github.com/void-linux/void-packages/pull/33302

New package: soju-0.2.1
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (ARCH-LIBC)


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

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

From 4e8f3944e40037ee29d19c2fa4b4c810da08d7fe Mon Sep 17 00:00:00 2001
From: flupe <lucas@escot.me>
Date: Sun, 3 Oct 2021 23:37:05 +0200
Subject: [PATCH] New package: soju-0.2.1

---
 srcpkgs/soju/files/README.voidlinux |  9 +++++++++
 srcpkgs/soju/files/config           |  2 ++
 srcpkgs/soju/files/soju/run         |  3 +++
 srcpkgs/soju/template               | 29 +++++++++++++++++++++++++++++
 4 files changed, 43 insertions(+)
 create mode 100644 srcpkgs/soju/files/README.voidlinux
 create mode 100644 srcpkgs/soju/files/config
 create mode 100755 srcpkgs/soju/files/soju/run
 create mode 100644 srcpkgs/soju/template

diff --git a/srcpkgs/soju/files/README.voidlinux b/srcpkgs/soju/files/README.voidlinux
new file mode 100644
index 000000000000..623aadffade3
--- /dev/null
+++ b/srcpkgs/soju/files/README.voidlinux
@@ -0,0 +1,9 @@
+The system service /etc/sv/soju runs soju as system user _soju.
+
+By default, the database will be stored in /var/db/soju/ and logs will be in
+/var/log/soju/. Both directories are owned by user _soju.
+
+To initialize the database, make sure you run sojuctl as the _soju user:
+
+$ sudo su -s /bin/sh - _soju
+$ sojuctl -config /etc/soju/config create-user <username> -admin
diff --git a/srcpkgs/soju/files/config b/srcpkgs/soju/files/config
new file mode 100644
index 000000000000..55781d839402
--- /dev/null
+++ b/srcpkgs/soju/files/config
@@ -0,0 +1,2 @@
+db sqlite3 /var/db/soju/main.db
+log fs /var/log/soju/
diff --git a/srcpkgs/soju/files/soju/run b/srcpkgs/soju/files/soju/run
new file mode 100755
index 000000000000..3b00ad02fb07
--- /dev/null
+++ b/srcpkgs/soju/files/soju/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+[ -r conf ] && . ./conf
+exec chpst -u _soju soju ${OPTS:- -config /etc/soju/config}
diff --git a/srcpkgs/soju/template b/srcpkgs/soju/template
new file mode 100644
index 000000000000..71bfe685c831
--- /dev/null
+++ b/srcpkgs/soju/template
@@ -0,0 +1,29 @@
+# Template file for 'soju'
+pkgname=soju
+version=0.2.1
+revision=1
+build_style=go
+go_import_path="git.sr.ht/~emersion/soju"
+go_package="./cmd/soju ./cmd/sojuctl"
+hostmakedepends="scdoc"
+short_desc="User-friendly IRC bouncer"
+maintainer="flupe <lucas@escot.me>"
+license="AGPL-3.0-or-later"
+homepage="https://soju.im"
+changelog="https://git.sr.ht/~emersion/soju/refs/v${version}"
+distfiles="https://git.sr.ht/~emersion/soju/refs/download/v${version}/soju-${version}.tar.gz"
+checksum=3558db9f78da3d0311b45e42307ef01af3218156b0370d85a1d7eef4d2811559
+conf_files="/etc/soju/config"
+system_accounts="_soju"
+make_dirs="/var/db/soju 0750 _soju _soju
+ /var/log/soju 0750 _soju _soju
+ /etc/soju 0755 root root"
+
+post_install() {
+	scdoc <doc/soju.1.scd >doc/soju.1
+	vman doc/soju.1
+	vlicense LICENSE
+	vinstall $FILESDIR/config 644 etc/soju
+	vdoc $FILESDIR/README.voidlinux
+	vsv soju
+}

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (15 preceding siblings ...)
  2021-10-04 21:25 ` [PR PATCH] [Updated] " flupe
@ 2021-10-04 21:26 ` flupe
  2021-10-04 21:50 ` [PR REVIEW] " Duncaen
                   ` (12 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: flupe @ 2021-10-04 21:26 UTC (permalink / raw)
  To: ml

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

New comment by flupe on void-packages repository

https://github.com/void-linux/void-packages/pull/33302#issuecomment-933868608

Comment:
Added a `README.voidlinux`.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PR REVIEW] New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (16 preceding siblings ...)
  2021-10-04 21:26 ` flupe
@ 2021-10-04 21:50 ` Duncaen
  2021-10-04 22:52 ` flupe
                   ` (11 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Duncaen @ 2021-10-04 21:50 UTC (permalink / raw)
  To: ml

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

New review comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/33302#discussion_r721741529

Comment:
Any reason to use `sudo su -s` instead of `sudo -u _soju -s` or just `sudo -u sojuctl ...`? Would probably make sense to also disable the shell for the `_soju` user if its not required.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PR REVIEW] New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (17 preceding siblings ...)
  2021-10-04 21:50 ` [PR REVIEW] " Duncaen
@ 2021-10-04 22:52 ` flupe
  2021-10-04 22:58 ` [PR PATCH] [Updated] " flupe
                   ` (10 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: flupe @ 2021-10-04 22:52 UTC (permalink / raw)
  To: ml

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

New review comment by flupe on void-packages repository

https://github.com/void-linux/void-packages/pull/33302#discussion_r721769855

Comment:
`sudo su -s` instead of `sudo -u _soju -s` is my mistake, and my bad reason for doing this instead of `sudo -u sojuctl ...` was to split the command in two, making shorter lines and the `sojuctl` call on its own. But indeed, latter is better.

> Would probably make sense to also disable the shell for the _soju user if its not required.

Isn't this the default when defining a system user from a template? That is, setting the shell to `/sbin/nologin`.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PR PATCH] [Updated] New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (18 preceding siblings ...)
  2021-10-04 22:52 ` flupe
@ 2021-10-04 22:58 ` flupe
  2021-10-04 23:33 ` [PR REVIEW] " Duncaen
                   ` (9 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: flupe @ 2021-10-04 22:58 UTC (permalink / raw)
  To: ml

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

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

https://github.com/flupe/void-packages master
https://github.com/void-linux/void-packages/pull/33302

New package: soju-0.2.1
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (ARCH-LIBC)


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

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

From 253fe4c359abf738d4fd2afb3a6763587dc1f044 Mon Sep 17 00:00:00 2001
From: flupe <lucas@escot.me>
Date: Sun, 3 Oct 2021 23:37:05 +0200
Subject: [PATCH] New package: soju-0.2.1

---
 srcpkgs/soju/files/README.voidlinux |  8 ++++++++
 srcpkgs/soju/files/config           |  2 ++
 srcpkgs/soju/files/soju/run         |  3 +++
 srcpkgs/soju/template               | 29 +++++++++++++++++++++++++++++
 4 files changed, 42 insertions(+)
 create mode 100644 srcpkgs/soju/files/README.voidlinux
 create mode 100644 srcpkgs/soju/files/config
 create mode 100755 srcpkgs/soju/files/soju/run
 create mode 100644 srcpkgs/soju/template

diff --git a/srcpkgs/soju/files/README.voidlinux b/srcpkgs/soju/files/README.voidlinux
new file mode 100644
index 000000000000..2d93e22a3903
--- /dev/null
+++ b/srcpkgs/soju/files/README.voidlinux
@@ -0,0 +1,8 @@
+The system service /etc/sv/soju runs soju as system user _soju.
+
+By default, the database will be stored in /var/db/soju/ and logs will be in
+/var/log/soju/. Both directories are owned by user _soju.
+
+To initialize the database, make sure you run sojuctl as the _soju user:
+
+$ sudo -u _soju sojuctl -config /etc/soju/config create-user <username> -admin
diff --git a/srcpkgs/soju/files/config b/srcpkgs/soju/files/config
new file mode 100644
index 000000000000..55781d839402
--- /dev/null
+++ b/srcpkgs/soju/files/config
@@ -0,0 +1,2 @@
+db sqlite3 /var/db/soju/main.db
+log fs /var/log/soju/
diff --git a/srcpkgs/soju/files/soju/run b/srcpkgs/soju/files/soju/run
new file mode 100755
index 000000000000..3b00ad02fb07
--- /dev/null
+++ b/srcpkgs/soju/files/soju/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+[ -r conf ] && . ./conf
+exec chpst -u _soju soju ${OPTS:- -config /etc/soju/config}
diff --git a/srcpkgs/soju/template b/srcpkgs/soju/template
new file mode 100644
index 000000000000..71bfe685c831
--- /dev/null
+++ b/srcpkgs/soju/template
@@ -0,0 +1,29 @@
+# Template file for 'soju'
+pkgname=soju
+version=0.2.1
+revision=1
+build_style=go
+go_import_path="git.sr.ht/~emersion/soju"
+go_package="./cmd/soju ./cmd/sojuctl"
+hostmakedepends="scdoc"
+short_desc="User-friendly IRC bouncer"
+maintainer="flupe <lucas@escot.me>"
+license="AGPL-3.0-or-later"
+homepage="https://soju.im"
+changelog="https://git.sr.ht/~emersion/soju/refs/v${version}"
+distfiles="https://git.sr.ht/~emersion/soju/refs/download/v${version}/soju-${version}.tar.gz"
+checksum=3558db9f78da3d0311b45e42307ef01af3218156b0370d85a1d7eef4d2811559
+conf_files="/etc/soju/config"
+system_accounts="_soju"
+make_dirs="/var/db/soju 0750 _soju _soju
+ /var/log/soju 0750 _soju _soju
+ /etc/soju 0755 root root"
+
+post_install() {
+	scdoc <doc/soju.1.scd >doc/soju.1
+	vman doc/soju.1
+	vlicense LICENSE
+	vinstall $FILESDIR/config 644 etc/soju
+	vdoc $FILESDIR/README.voidlinux
+	vsv soju
+}

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PR REVIEW] New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (19 preceding siblings ...)
  2021-10-04 22:58 ` [PR PATCH] [Updated] " flupe
@ 2021-10-04 23:33 ` Duncaen
  2021-10-04 23:35 ` Duncaen
                   ` (8 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Duncaen @ 2021-10-04 23:33 UTC (permalink / raw)
  To: ml

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

New review comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/33302#discussion_r721785517

Comment:
> Isn't this the default when defining a system user from a template? 

Ah yes, was just somewhat expecting that `-s` would not work without a valid shell set, but makes sense that it works for non login scenarios.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PR REVIEW] New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (20 preceding siblings ...)
  2021-10-04 23:33 ` [PR REVIEW] " Duncaen
@ 2021-10-04 23:35 ` Duncaen
  2021-10-04 23:35 ` Duncaen
                   ` (7 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Duncaen @ 2021-10-04 23:35 UTC (permalink / raw)
  To: ml

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

New review comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/33302#discussion_r721786126

Comment:
Since we ship a file in the `/etc/soju/` directory and its owned by root, adding it to `make_dirs`.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PR REVIEW] New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (21 preceding siblings ...)
  2021-10-04 23:35 ` Duncaen
@ 2021-10-04 23:35 ` Duncaen
  2021-10-05 10:26 ` [PR PATCH] [Updated] " flupe
                   ` (6 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Duncaen @ 2021-10-04 23:35 UTC (permalink / raw)
  To: ml

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

New review comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/33302#discussion_r721786126

Comment:
Since we ship a file in the `/etc/soju/` directory and its owned by root, adding it to `make_dirs` is not required.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PR PATCH] [Updated] New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (22 preceding siblings ...)
  2021-10-04 23:35 ` Duncaen
@ 2021-10-05 10:26 ` flupe
  2021-11-20 22:57 ` Duncaen
                   ` (5 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: flupe @ 2021-10-05 10:26 UTC (permalink / raw)
  To: ml

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

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

https://github.com/flupe/void-packages master
https://github.com/void-linux/void-packages/pull/33302

New package: soju-0.2.1
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (ARCH-LIBC)


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

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

From cbd7d5cd676e890db47d99f0a216e662a0a3e38b Mon Sep 17 00:00:00 2001
From: flupe <lucas@escot.me>
Date: Sun, 3 Oct 2021 23:37:05 +0200
Subject: [PATCH] New package: soju-0.2.1

---
 srcpkgs/soju/files/README.voidlinux |  8 ++++++++
 srcpkgs/soju/files/config           |  2 ++
 srcpkgs/soju/files/soju/run         |  3 +++
 srcpkgs/soju/template               | 28 ++++++++++++++++++++++++++++
 4 files changed, 41 insertions(+)
 create mode 100644 srcpkgs/soju/files/README.voidlinux
 create mode 100644 srcpkgs/soju/files/config
 create mode 100755 srcpkgs/soju/files/soju/run
 create mode 100644 srcpkgs/soju/template

diff --git a/srcpkgs/soju/files/README.voidlinux b/srcpkgs/soju/files/README.voidlinux
new file mode 100644
index 000000000000..2d93e22a3903
--- /dev/null
+++ b/srcpkgs/soju/files/README.voidlinux
@@ -0,0 +1,8 @@
+The system service /etc/sv/soju runs soju as system user _soju.
+
+By default, the database will be stored in /var/db/soju/ and logs will be in
+/var/log/soju/. Both directories are owned by user _soju.
+
+To initialize the database, make sure you run sojuctl as the _soju user:
+
+$ sudo -u _soju sojuctl -config /etc/soju/config create-user <username> -admin
diff --git a/srcpkgs/soju/files/config b/srcpkgs/soju/files/config
new file mode 100644
index 000000000000..55781d839402
--- /dev/null
+++ b/srcpkgs/soju/files/config
@@ -0,0 +1,2 @@
+db sqlite3 /var/db/soju/main.db
+log fs /var/log/soju/
diff --git a/srcpkgs/soju/files/soju/run b/srcpkgs/soju/files/soju/run
new file mode 100755
index 000000000000..3b00ad02fb07
--- /dev/null
+++ b/srcpkgs/soju/files/soju/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+[ -r conf ] && . ./conf
+exec chpst -u _soju soju ${OPTS:- -config /etc/soju/config}
diff --git a/srcpkgs/soju/template b/srcpkgs/soju/template
new file mode 100644
index 000000000000..ecc69f842612
--- /dev/null
+++ b/srcpkgs/soju/template
@@ -0,0 +1,28 @@
+# Template file for 'soju'
+pkgname=soju
+version=0.2.1
+revision=1
+build_style=go
+go_import_path="git.sr.ht/~emersion/soju"
+go_package="./cmd/soju ./cmd/sojuctl"
+hostmakedepends="scdoc"
+short_desc="User-friendly IRC bouncer"
+maintainer="flupe <lucas@escot.me>"
+license="AGPL-3.0-or-later"
+homepage="https://soju.im"
+changelog="https://git.sr.ht/~emersion/soju/refs/v${version}"
+distfiles="https://git.sr.ht/~emersion/soju/refs/download/v${version}/soju-${version}.tar.gz"
+checksum=3558db9f78da3d0311b45e42307ef01af3218156b0370d85a1d7eef4d2811559
+conf_files="/etc/soju/config"
+system_accounts="_soju"
+make_dirs="/var/db/soju 0750 _soju _soju
+ /var/log/soju 0750 _soju _soju"
+
+post_install() {
+	scdoc <doc/soju.1.scd >doc/soju.1
+	vman doc/soju.1
+	vlicense LICENSE
+	vinstall $FILESDIR/config 644 etc/soju
+	vdoc $FILESDIR/README.voidlinux
+	vsv soju
+}

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (23 preceding siblings ...)
  2021-10-05 10:26 ` [PR PATCH] [Updated] " flupe
@ 2021-11-20 22:57 ` Duncaen
  2021-11-20 22:58 ` Duncaen
                   ` (4 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Duncaen @ 2021-11-20 22:57 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/33302#issuecomment-974723283

Comment:
Do you mind updating this to 0.3.0, this has been sitting a while and I don't see anything else blocking.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (24 preceding siblings ...)
  2021-11-20 22:57 ` Duncaen
@ 2021-11-20 22:58 ` Duncaen
  2021-11-21  8:42 ` [PR PATCH] [Updated] " flupe
                   ` (3 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Duncaen @ 2021-11-20 22:58 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/33302#issuecomment-974723283

Comment:
Do you mind updating this to 0.3.0, this has been sitting a while and I don't see anything else blocking a merge.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PR PATCH] [Updated] New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (25 preceding siblings ...)
  2021-11-20 22:58 ` Duncaen
@ 2021-11-21  8:42 ` flupe
  2021-11-21  8:48 ` flupe
                   ` (2 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: flupe @ 2021-11-21  8:42 UTC (permalink / raw)
  To: ml

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

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

https://github.com/flupe/void-packages master
https://github.com/void-linux/void-packages/pull/33302

New package: soju-0.2.1
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (ARCH-LIBC)


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

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

From 9386ca06e0a38a017ab252cc867870d332d15d07 Mon Sep 17 00:00:00 2001
From: flupe <lucas@escot.me>
Date: Sun, 3 Oct 2021 23:37:05 +0200
Subject: [PATCH] New package: soju-0.2.1

---
 srcpkgs/soju/files/README.voidlinux |  8 ++++++++
 srcpkgs/soju/files/config           |  2 ++
 srcpkgs/soju/files/soju/run         |  3 +++
 srcpkgs/soju/template               | 28 ++++++++++++++++++++++++++++
 4 files changed, 41 insertions(+)
 create mode 100644 srcpkgs/soju/files/README.voidlinux
 create mode 100644 srcpkgs/soju/files/config
 create mode 100755 srcpkgs/soju/files/soju/run
 create mode 100644 srcpkgs/soju/template

diff --git a/srcpkgs/soju/files/README.voidlinux b/srcpkgs/soju/files/README.voidlinux
new file mode 100644
index 000000000000..2d93e22a3903
--- /dev/null
+++ b/srcpkgs/soju/files/README.voidlinux
@@ -0,0 +1,8 @@
+The system service /etc/sv/soju runs soju as system user _soju.
+
+By default, the database will be stored in /var/db/soju/ and logs will be in
+/var/log/soju/. Both directories are owned by user _soju.
+
+To initialize the database, make sure you run sojuctl as the _soju user:
+
+$ sudo -u _soju sojuctl -config /etc/soju/config create-user <username> -admin
diff --git a/srcpkgs/soju/files/config b/srcpkgs/soju/files/config
new file mode 100644
index 000000000000..55781d839402
--- /dev/null
+++ b/srcpkgs/soju/files/config
@@ -0,0 +1,2 @@
+db sqlite3 /var/db/soju/main.db
+log fs /var/log/soju/
diff --git a/srcpkgs/soju/files/soju/run b/srcpkgs/soju/files/soju/run
new file mode 100755
index 000000000000..3b00ad02fb07
--- /dev/null
+++ b/srcpkgs/soju/files/soju/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+[ -r conf ] && . ./conf
+exec chpst -u _soju soju ${OPTS:- -config /etc/soju/config}
diff --git a/srcpkgs/soju/template b/srcpkgs/soju/template
new file mode 100644
index 000000000000..ecc69f842612
--- /dev/null
+++ b/srcpkgs/soju/template
@@ -0,0 +1,28 @@
+# Template file for 'soju'
+pkgname=soju
+version=0.2.1
+revision=1
+build_style=go
+go_import_path="git.sr.ht/~emersion/soju"
+go_package="./cmd/soju ./cmd/sojuctl"
+hostmakedepends="scdoc"
+short_desc="User-friendly IRC bouncer"
+maintainer="flupe <lucas@escot.me>"
+license="AGPL-3.0-or-later"
+homepage="https://soju.im"
+changelog="https://git.sr.ht/~emersion/soju/refs/v${version}"
+distfiles="https://git.sr.ht/~emersion/soju/refs/download/v${version}/soju-${version}.tar.gz"
+checksum=3558db9f78da3d0311b45e42307ef01af3218156b0370d85a1d7eef4d2811559
+conf_files="/etc/soju/config"
+system_accounts="_soju"
+make_dirs="/var/db/soju 0750 _soju _soju
+ /var/log/soju 0750 _soju _soju"
+
+post_install() {
+	scdoc <doc/soju.1.scd >doc/soju.1
+	vman doc/soju.1
+	vlicense LICENSE
+	vinstall $FILESDIR/config 644 etc/soju
+	vdoc $FILESDIR/README.voidlinux
+	vsv soju
+}

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PR PATCH] [Updated] New package: soju-0.2.1
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (26 preceding siblings ...)
  2021-11-21  8:42 ` [PR PATCH] [Updated] " flupe
@ 2021-11-21  8:48 ` flupe
  2021-11-21  8:53 ` New package: soju-0.3.0 flupe
  2021-11-21 17:35 ` [PR PATCH] [Merged]: " Vaelatern
  29 siblings, 0 replies; 31+ messages in thread
From: flupe @ 2021-11-21  8:48 UTC (permalink / raw)
  To: ml

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

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

https://github.com/flupe/void-packages master
https://github.com/void-linux/void-packages/pull/33302

New package: soju-0.2.1
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (ARCH-LIBC)


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

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

From e2b27e414138a1f63ba7d38e23c5d1dd75ea7b83 Mon Sep 17 00:00:00 2001
From: flupe <lucas@escot.me>
Date: Sun, 3 Oct 2021 23:37:05 +0200
Subject: [PATCH] New package: soju-0.3.0

---
 srcpkgs/soju/files/README.voidlinux |  8 ++++++++
 srcpkgs/soju/files/config           |  2 ++
 srcpkgs/soju/files/soju/run         |  3 +++
 srcpkgs/soju/template               | 28 ++++++++++++++++++++++++++++
 4 files changed, 41 insertions(+)
 create mode 100644 srcpkgs/soju/files/README.voidlinux
 create mode 100644 srcpkgs/soju/files/config
 create mode 100755 srcpkgs/soju/files/soju/run
 create mode 100644 srcpkgs/soju/template

diff --git a/srcpkgs/soju/files/README.voidlinux b/srcpkgs/soju/files/README.voidlinux
new file mode 100644
index 000000000000..2d93e22a3903
--- /dev/null
+++ b/srcpkgs/soju/files/README.voidlinux
@@ -0,0 +1,8 @@
+The system service /etc/sv/soju runs soju as system user _soju.
+
+By default, the database will be stored in /var/db/soju/ and logs will be in
+/var/log/soju/. Both directories are owned by user _soju.
+
+To initialize the database, make sure you run sojuctl as the _soju user:
+
+$ sudo -u _soju sojuctl -config /etc/soju/config create-user <username> -admin
diff --git a/srcpkgs/soju/files/config b/srcpkgs/soju/files/config
new file mode 100644
index 000000000000..55781d839402
--- /dev/null
+++ b/srcpkgs/soju/files/config
@@ -0,0 +1,2 @@
+db sqlite3 /var/db/soju/main.db
+log fs /var/log/soju/
diff --git a/srcpkgs/soju/files/soju/run b/srcpkgs/soju/files/soju/run
new file mode 100755
index 000000000000..3b00ad02fb07
--- /dev/null
+++ b/srcpkgs/soju/files/soju/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+[ -r conf ] && . ./conf
+exec chpst -u _soju soju ${OPTS:- -config /etc/soju/config}
diff --git a/srcpkgs/soju/template b/srcpkgs/soju/template
new file mode 100644
index 000000000000..9d3eddfea050
--- /dev/null
+++ b/srcpkgs/soju/template
@@ -0,0 +1,28 @@
+# Template file for 'soju'
+pkgname=soju
+version=0.3.0
+revision=1
+build_style=go
+go_import_path="git.sr.ht/~emersion/soju"
+go_package="./cmd/soju ./cmd/sojuctl"
+hostmakedepends="scdoc"
+short_desc="User-friendly IRC bouncer"
+maintainer="flupe <lucas@escot.me>"
+license="AGPL-3.0-or-later"
+homepage="https://soju.im"
+changelog="https://git.sr.ht/~emersion/soju/refs/v${version}"
+distfiles="https://git.sr.ht/~emersion/soju/refs/download/v${version}/soju-${version}.tar.gz"
+checksum=c1b77e87e42eb12bdc57a8c308b0d0f2b3dd367a2a8f9093a3983fa692c6aa01
+conf_files="/etc/soju/config"
+system_accounts="_soju"
+make_dirs="/var/db/soju 0750 _soju _soju
+ /var/log/soju 0750 _soju _soju"
+
+post_install() {
+	scdoc <doc/soju.1.scd >doc/soju.1
+	vman doc/soju.1
+	vlicense LICENSE
+	vinstall $FILESDIR/config 644 etc/soju
+	vdoc $FILESDIR/README.voidlinux
+	vsv soju
+}

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: New package: soju-0.3.0
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (27 preceding siblings ...)
  2021-11-21  8:48 ` flupe
@ 2021-11-21  8:53 ` flupe
  2021-11-21 17:35 ` [PR PATCH] [Merged]: " Vaelatern
  29 siblings, 0 replies; 31+ messages in thread
From: flupe @ 2021-11-21  8:53 UTC (permalink / raw)
  To: ml

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

New comment by flupe on void-packages repository

https://github.com/void-linux/void-packages/pull/33302#issuecomment-974777956

Comment:
Done!

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PR PATCH] [Merged]: New package: soju-0.3.0
  2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
                   ` (28 preceding siblings ...)
  2021-11-21  8:53 ` New package: soju-0.3.0 flupe
@ 2021-11-21 17:35 ` Vaelatern
  29 siblings, 0 replies; 31+ messages in thread
From: Vaelatern @ 2021-11-21 17:35 UTC (permalink / raw)
  To: ml

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

There's a merged pull request on the void-packages repository

New package: soju-0.3.0
https://github.com/void-linux/void-packages/pull/33302

Description:
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (ARCH-LIBC)


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2021-11-21 17:35 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-03 21:43 [PR PATCH] New package: soju-0.2.1 flupe
2021-10-03 22:52 ` Vaelatern
2021-10-04  8:12 ` [PR PATCH] [Updated] " flupe
2021-10-04  8:14 ` flupe
2021-10-04 11:14 ` [PR REVIEW] " flupe
2021-10-04 11:24 ` paper42
2021-10-04 11:27 ` paper42
2021-10-04 12:41 ` [PR PATCH] [Updated] " flupe
2021-10-04 12:47 ` flupe
2021-10-04 16:31 ` Duncaen
2021-10-04 16:32 ` Duncaen
2021-10-04 18:13 ` flupe
2021-10-04 18:49 ` flupe
2021-10-04 19:28 ` [PR PATCH] [Updated] " flupe
2021-10-04 19:30 ` flupe
2021-10-04 19:39 ` Duncaen
2021-10-04 21:25 ` [PR PATCH] [Updated] " flupe
2021-10-04 21:26 ` flupe
2021-10-04 21:50 ` [PR REVIEW] " Duncaen
2021-10-04 22:52 ` flupe
2021-10-04 22:58 ` [PR PATCH] [Updated] " flupe
2021-10-04 23:33 ` [PR REVIEW] " Duncaen
2021-10-04 23:35 ` Duncaen
2021-10-04 23:35 ` Duncaen
2021-10-05 10:26 ` [PR PATCH] [Updated] " flupe
2021-11-20 22:57 ` Duncaen
2021-11-20 22:58 ` Duncaen
2021-11-21  8:42 ` [PR PATCH] [Updated] " flupe
2021-11-21  8:48 ` flupe
2021-11-21  8:53 ` New package: soju-0.3.0 flupe
2021-11-21 17:35 ` [PR PATCH] [Merged]: " Vaelatern

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).