Tuesday, April 30, 2024

unbreak net/dino

since kn@ reported dino build issue upstream, a fix was released

I adapted the fix to work on latest release because it was done
on a file that does not exist yet in the tarball (got renamed?)

tested on amd64, works fine again

make update-patches insisted to add the "No newline at end of file",
I'm not happy about it but I guess it's better to include it?

diff --git a/net/dino/Makefile b/net/dino/Makefile
index 2ca126f6482..abc2a214758 100644
--- a/net/dino/Makefile
+++ b/net/dino/Makefile
@@ -1,5 +1,3 @@
-BROKEN= build failure with vala-0.56.17 https://github.com/dino/dino/issues/1576
-
COMMENT= XMPP desktop client
VERSION= 0.4.3
DISTNAME= dino-${VERSION}
diff --git a/net/dino/patches/patch-plugins_gpgme-vala_vapi_gpgme_public_vapi b/net/dino/patches/patch-plugins_gpgme-vala_vapi_gpgme_public_vapi
new file mode 100644
index 00000000000..c72bc260f95
--- /dev/null
+++ b/net/dino/patches/patch-plugins_gpgme-vala_vapi_gpgme_public_vapi
@@ -0,0 +1,25 @@
+Fix to build dino since vala-c 0.56.17
+https://github.com/dino/dino/issues/1576
+
+Index: plugins/gpgme-vala/vapi/gpgme_public.vapi
+--- plugins/gpgme-vala/vapi/gpgme_public.vapi.orig
++++ plugins/gpgme-vala/vapi/gpgme_public.vapi
+@@ -22,9 +22,9 @@ public class Key {
+ public string issuer_name;
+ public string chain_id;
+ public Validity owner_trust;
+- [CCode(array_null_terminated = true)]
++ [CCode(array_length = false, array_null_terminated = true)]
+ public SubKey[] subkeys;
+- [CCode(array_null_terminated = true)]
++ [CCode(array_length = false, array_null_terminated = true)]
+ public UserID[] uids;
+ public KeylistMode keylist_mode;
+ // public string fpr; // requires gpgme >= 1.7.0
+@@ -159,4 +159,4 @@ public enum Validity {
+ ULTIMATE
+ }
+
+-}
+\ No newline at end of file
++}

Re: Caddy webserver is not in the ports tree

On Tue Apr 30, 2024 at 1:24 PM BST, Stuart Henderson wrote:
> On 2024-04-30, Souji Thenria <mail@souji-thenria.net> wrote:
> > Hi everyone,
> >
> > In the last couple of days, I played with the webserver Caddy [1] and
> > would like to use it for some of my web applications. However, the
> > webserver is currently not in the ports tree. Is there a specific reason
> > for that, or has no one wanted to create and maintain
> > the port yet?
> >
> > If it's the latter, I might try to do it.
> >
> > [1] https://caddyserver.com/
>
> It's a bit of a pain, there's no privdrop code so in order to provide
> service on the standard http/https port numbers you either need to run
> as route or use PF or something else to redirect/proxy the connections.
> On Linux they use setcap to allow non-privileged processes to bind to
> privileged ports but that's not really desirable and is not possible
> with OpenBSD.
>
> In general go ports are a total pain as well.
>
> A basic port would look something like https://junkpile.org/caddy.tgz

True, running the webserver as root is quite the problem.

Could you elaborate on your point that Go ports are a pain?
I thought a port written in Go would probably be easier to maintain
because no additional libraries are needed to run the program, and
cross-compilation is relatively easy, too.

Thank you!

Regards,
Souji