Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] knot-resolver: fix configfile location in runit service
@ 2023-07-23 19:37 MeganerdNL
  2023-07-23 19:42 ` classabbyamp
                   ` (24 more replies)
  0 siblings, 25 replies; 26+ messages in thread
From: MeganerdNL @ 2023-07-23 19:37 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MeganerdNL/void-packages knot-resolver-update
https://github.com/void-linux/void-packages/pull/45209

knot-resolver: fix configfile location in runit service
#### Testing the changes
- I tested the changes in this PR: **YES**

I noticed that in the default installation the default config file (/etc/knot-resolver/kresd.conf) was not read: so making changes to it, did nothing. If there is another solution to fix this properly, let me know.

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

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

From 1578974a1e333f4803e88014ab1ccb4bd63baa3e Mon Sep 17 00:00:00 2001
From: MeganerdNL <meganerd@meganerd.nl>
Date: Sun, 23 Jul 2023 21:31:32 +0200
Subject: [PATCH] knot-resolver: fix configfile location in runit service

---
 srcpkgs/knot-resolver/files/kresd/run | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/knot-resolver/files/kresd/run b/srcpkgs/knot-resolver/files/kresd/run
index 43b80cda27f2c..68b37b9ad67ea 100644
--- a/srcpkgs/knot-resolver/files/kresd/run
+++ b/srcpkgs/knot-resolver/files/kresd/run
@@ -2,4 +2,4 @@
 exec 2>&1
 [ -r ./conf ] && . ./conf
 install -d -m0755 -o _knot_resolver -g _knot_resolver /run/knot-resolver
-exec kresd ${OPTS:--f 1}
+exec kresd ${OPTS:--f 1 -c ${CONF_FILE:-/etc/knot-resolver/kresd.conf}}

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

* Re: knot-resolver: fix configfile location in runit service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
@ 2023-07-23 19:42 ` classabbyamp
  2023-07-23 21:00 ` MeganerdNL
                   ` (23 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: classabbyamp @ 2023-07-23 19:42 UTC (permalink / raw)
  To: ml

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

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/45209#issuecomment-1646943650

Comment:
```
       -c config, --config=<config>
              Set the config file with settings for kresd to read instead of
              reading the file at the default location (config).
```
would indicate that it should default to `/etc/knot-resolver/kresd.conf` when the option is unspecified, so maybe there's a bug the program?

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

* Re: knot-resolver: fix configfile location in runit service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
  2023-07-23 19:42 ` classabbyamp
@ 2023-07-23 21:00 ` MeganerdNL
  2023-07-23 21:07 ` [PR PATCH] [Updated] " MeganerdNL
                   ` (22 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: MeganerdNL @ 2023-07-23 21:00 UTC (permalink / raw)
  To: ml

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

New comment by MeganerdNL on void-packages repository

https://github.com/void-linux/void-packages/pull/45209#issuecomment-1646958088

Comment:
> ```
>        -c config, --config=<config>
>               Set the config file with settings for kresd to read instead of
>               reading the file at the default location (config).
> ```
> 
> would indicate that it should default to `/etc/knot-resolver/kresd.conf` when the option is unspecified, so maybe there's a bug the program?

I think it's not default. The man is a bit unclear, but when I look at the systemd unit file on gitlab: they provide the config file too: https://gitlab.nic.cz/knot/knot-resolver/-/blob/6.0/systemd/kresd@.service.in

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

* Re: [PR PATCH] [Updated] knot-resolver: fix configfile location in runit service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
  2023-07-23 19:42 ` classabbyamp
  2023-07-23 21:00 ` MeganerdNL
@ 2023-07-23 21:07 ` MeganerdNL
  2023-07-23 21:08 ` MeganerdNL
                   ` (21 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: MeganerdNL @ 2023-07-23 21:07 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MeganerdNL/void-packages knot-resolver-update
https://github.com/void-linux/void-packages/pull/45209

knot-resolver: fix configfile location in runit service
#### Testing the changes
- I tested the changes in this PR: **YES**

I noticed that in the default installation the default config file (/etc/knot-resolver/kresd.conf) was not read: so making changes to it, did nothing. If there is another solution to fix this properly, let me know.

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

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

From d68b66b69cae1cbc7b2883f48119ac0bd16e0931 Mon Sep 17 00:00:00 2001
From: MeganerdNL <meganerd@meganerd.nl>
Date: Sun, 23 Jul 2023 21:31:32 +0200
Subject: [PATCH] knot-resolver: fix configfile location in runit service

---
 srcpkgs/knot-resolver/files/kresd/run | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/knot-resolver/files/kresd/run b/srcpkgs/knot-resolver/files/kresd/run
index 43b80cda27f2c..f615ba18ed8f3 100644
--- a/srcpkgs/knot-resolver/files/kresd/run
+++ b/srcpkgs/knot-resolver/files/kresd/run
@@ -2,4 +2,4 @@
 exec 2>&1
 [ -r ./conf ] && . ./conf
 install -d -m0755 -o _knot_resolver -g _knot_resolver /run/knot-resolver
-exec kresd ${OPTS:--f 1}
+exec kresd ${OPTS:---noninteractive -c ${CONF_FILE:-/etc/knot-resolver/kresd.conf}}

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

* Re: knot-resolver: fix configfile location in runit service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
                   ` (2 preceding siblings ...)
  2023-07-23 21:07 ` [PR PATCH] [Updated] " MeganerdNL
@ 2023-07-23 21:08 ` MeganerdNL
  2023-07-23 21:09 ` MeganerdNL
                   ` (20 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: MeganerdNL @ 2023-07-23 21:08 UTC (permalink / raw)
  To: ml

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

New comment by MeganerdNL on void-packages repository

https://github.com/void-linux/void-packages/pull/45209#issuecomment-1646959807

Comment:
Changed _-f 1_ to _--interactive_, because _-f 1_ will be deprecated.

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

* Re: knot-resolver: fix configfile location in runit service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
                   ` (3 preceding siblings ...)
  2023-07-23 21:08 ` MeganerdNL
@ 2023-07-23 21:09 ` MeganerdNL
  2023-07-23 21:10 ` MeganerdNL
                   ` (19 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: MeganerdNL @ 2023-07-23 21:09 UTC (permalink / raw)
  To: ml

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

New comment by MeganerdNL on void-packages repository

https://github.com/void-linux/void-packages/pull/45209#issuecomment-1646959807

Comment:
Changed _-f 1_ to _--noninteractive_, because _-f 1_ will be deprecated.

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

* Re: knot-resolver: fix configfile location in runit service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
                   ` (4 preceding siblings ...)
  2023-07-23 21:09 ` MeganerdNL
@ 2023-07-23 21:10 ` MeganerdNL
  2023-07-23 21:10 ` MeganerdNL
                   ` (18 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: MeganerdNL @ 2023-07-23 21:10 UTC (permalink / raw)
  To: ml

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

New comment by MeganerdNL on void-packages repository

https://github.com/void-linux/void-packages/pull/45209#issuecomment-1646959807

Comment:
Changed 
```-f 1 
```
to
 
```
--noninteractive
```
because _-f 1_ will be deprecated.

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

* Re: knot-resolver: fix configfile location in runit service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
                   ` (5 preceding siblings ...)
  2023-07-23 21:10 ` MeganerdNL
@ 2023-07-23 21:10 ` MeganerdNL
  2023-07-24 14:09 ` MeganerdNL
                   ` (17 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: MeganerdNL @ 2023-07-23 21:10 UTC (permalink / raw)
  To: ml

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

New comment by MeganerdNL on void-packages repository

https://github.com/void-linux/void-packages/pull/45209#issuecomment-1646959807

Comment:
Changed 
```
-f 1 
```
to
 ```
--noninteractive
```
because _-f 1_ will be deprecated.

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

* Re: knot-resolver: fix configfile location in runit service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
                   ` (6 preceding siblings ...)
  2023-07-23 21:10 ` MeganerdNL
@ 2023-07-24 14:09 ` MeganerdNL
  2023-07-25  6:19 ` [PR PATCH] [Updated] " MeganerdNL
                   ` (16 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: MeganerdNL @ 2023-07-24 14:09 UTC (permalink / raw)
  To: ml

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

New comment by MeganerdNL on void-packages repository

https://github.com/void-linux/void-packages/pull/45209#issuecomment-1646959807

Comment:
Changed 
```
-f 1 
```
to
 ```
--noninteractive
```
because _-f 1_ will be deprecated.

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

* Re: [PR PATCH] [Updated] knot-resolver: fix configfile location in runit service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
                   ` (7 preceding siblings ...)
  2023-07-24 14:09 ` MeganerdNL
@ 2023-07-25  6:19 ` MeganerdNL
  2023-07-25  6:22 ` MeganerdNL
                   ` (15 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: MeganerdNL @ 2023-07-25  6:19 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MeganerdNL/void-packages knot-resolver-update
https://github.com/void-linux/void-packages/pull/45209

knot-resolver: fix configfile location in runit service
#### Testing the changes
- I tested the changes in this PR: **YES**

I noticed that in the default installation the default config file (/etc/knot-resolver/kresd.conf) was not read: so making changes to it, did nothing.

Per https://github.com/void-linux/void-packages/blob/master/Manual.md#writing_runit_services
you _could_ change CLI flags in **conf** file in the service directory, but I think this option should be enabled by default because the file /etc/knot-resolver/kresd.conf is also installed and otherwise it's confusing imho.

If there is another solution to fix this properly, let me know.

2nd change: in default CLI variable:

```
-f 1 
```
to
 ```
--noninteractive
```
because _-f 1_ will be deprecated per warning on command line.

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

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

From c7fa1fa0332e1286625e6142600a802b260dd5be Mon Sep 17 00:00:00 2001
From: MeganerdNL <meganerd@meganerd.nl>
Date: Sun, 23 Jul 2023 21:31:32 +0200
Subject: [PATCH] knot-resolver: fix configfile location in runit service

---
 srcpkgs/knot-resolver/files/kresd/run | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/knot-resolver/files/kresd/run b/srcpkgs/knot-resolver/files/kresd/run
index 43b80cda27f2c..f615ba18ed8f3 100644
--- a/srcpkgs/knot-resolver/files/kresd/run
+++ b/srcpkgs/knot-resolver/files/kresd/run
@@ -2,4 +2,4 @@
 exec 2>&1
 [ -r ./conf ] && . ./conf
 install -d -m0755 -o _knot_resolver -g _knot_resolver /run/knot-resolver
-exec kresd ${OPTS:--f 1}
+exec kresd ${OPTS:---noninteractive -c ${CONF_FILE:-/etc/knot-resolver/kresd.conf}}

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

* Re: [PR PATCH] [Updated] knot-resolver: fix configfile location in runit service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
                   ` (8 preceding siblings ...)
  2023-07-25  6:19 ` [PR PATCH] [Updated] " MeganerdNL
@ 2023-07-25  6:22 ` MeganerdNL
  2023-07-25  6:30 ` classabbyamp
                   ` (14 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: MeganerdNL @ 2023-07-25  6:22 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MeganerdNL/void-packages knot-resolver-update
https://github.com/void-linux/void-packages/pull/45209

knot-resolver: fix configfile location in runit service
#### Testing the changes
- I tested the changes in this PR: **YES**

I noticed that in the default installation the default config file (/etc/knot-resolver/kresd.conf) was not read: so making changes to it, did nothing.

Per https://github.com/void-linux/void-packages/blob/master/Manual.md#writing_runit_services
you _could_ change CLI flags in **conf** file in the service directory, but I think this option should be enabled by default because the file /etc/knot-resolver/kresd.conf is also installed and otherwise it's confusing imho.

If there is another solution to fix this properly, let me know.

2nd change: in default CLI variable:

```
-f 1 
```
to
 ```
--noninteractive
```
because _-f 1_ will be deprecated per warning on command line.

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

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

From eebf7061804b4253f8cb90aae1878c80b69ac9eb Mon Sep 17 00:00:00 2001
From: MeganerdNL <meganerd@meganerd.nl>
Date: Sun, 23 Jul 2023 21:31:32 +0200
Subject: [PATCH] knot-resolver: fix configfile location in runit service

---
 srcpkgs/knot-resolver/files/kresd/run | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/knot-resolver/files/kresd/run b/srcpkgs/knot-resolver/files/kresd/run
index 43b80cda27f2c..29ae45d39f528 100644
--- a/srcpkgs/knot-resolver/files/kresd/run
+++ b/srcpkgs/knot-resolver/files/kresd/run
@@ -2,4 +2,4 @@
 exec 2>&1
 [ -r ./conf ] && . ./conf
 install -d -m0755 -o _knot_resolver -g _knot_resolver /run/knot-resolver
-exec kresd ${OPTS:--f 1}
+exec kresd ${OPTS:- --noninteractive -c /etc/knot-resolver/kresd.conf}

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

* Re: knot-resolver: fix configfile location in runit service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
                   ` (9 preceding siblings ...)
  2023-07-25  6:22 ` MeganerdNL
@ 2023-07-25  6:30 ` classabbyamp
  2023-07-25  7:08 ` [PR PATCH] [Updated] " MeganerdNL
                   ` (13 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: classabbyamp @ 2023-07-25  6:30 UTC (permalink / raw)
  To: ml

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

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/45209#issuecomment-1649202448

Comment:
needs a revbump

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

* Re: [PR PATCH] [Updated] knot-resolver: fix configfile location in runit service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
                   ` (10 preceding siblings ...)
  2023-07-25  6:30 ` classabbyamp
@ 2023-07-25  7:08 ` MeganerdNL
  2023-07-25  7:08 ` MeganerdNL
                   ` (12 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: MeganerdNL @ 2023-07-25  7:08 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MeganerdNL/void-packages knot-resolver-update
https://github.com/void-linux/void-packages/pull/45209

knot-resolver: fix configfile location in runit service
#### Testing the changes
- I tested the changes in this PR: **YES**

I noticed that in the default installation the default config file (/etc/knot-resolver/kresd.conf) was not read: so making changes to it, did nothing.

Per https://github.com/void-linux/void-packages/blob/master/Manual.md#writing_runit_services
you _could_ change CLI flags in **conf** file in the service directory, but I think this option should be enabled by default because the file /etc/knot-resolver/kresd.conf is also installed and otherwise it's confusing imho.

If there is another solution to fix this properly, let me know.

2nd change: in default CLI variable:

```
-f 1 
```
to
 ```
--noninteractive
```
because _-f 1_ will be deprecated per warning on command line.

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

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

From db6de7ccaaf7b4ed96f34f65255bbeb142d85ec4 Mon Sep 17 00:00:00 2001
From: MeganerdNL <meganerd@meganerd.nl>
Date: Sun, 23 Jul 2023 21:31:32 +0200
Subject: [PATCH] knot-resolver: fix configfile location in runit service

---
 srcpkgs/knot-resolver/files/kresd/run | 2 +-
 srcpkgs/knot-resolver/template        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/knot-resolver/files/kresd/run b/srcpkgs/knot-resolver/files/kresd/run
index 43b80cda27f2c..29ae45d39f528 100644
--- a/srcpkgs/knot-resolver/files/kresd/run
+++ b/srcpkgs/knot-resolver/files/kresd/run
@@ -2,4 +2,4 @@
 exec 2>&1
 [ -r ./conf ] && . ./conf
 install -d -m0755 -o _knot_resolver -g _knot_resolver /run/knot-resolver
-exec kresd ${OPTS:--f 1}
+exec kresd ${OPTS:- --noninteractive -c /etc/knot-resolver/kresd.conf}
diff --git a/srcpkgs/knot-resolver/template b/srcpkgs/knot-resolver/template
index 25cefaf4ef395..05c8199df6062 100644
--- a/srcpkgs/knot-resolver/template
+++ b/srcpkgs/knot-resolver/template
@@ -1,7 +1,7 @@
 # Template file for 'knot-resolver'
 pkgname=knot-resolver
 version=5.6.0
-revision=1
+revision=2
 build_style=meson
 configure_args="
  -Dclient=enabled

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

* Re: knot-resolver: fix configfile location in runit service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
                   ` (11 preceding siblings ...)
  2023-07-25  7:08 ` [PR PATCH] [Updated] " MeganerdNL
@ 2023-07-25  7:08 ` MeganerdNL
  2023-07-25  7:08 ` MeganerdNL
                   ` (11 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: MeganerdNL @ 2023-07-25  7:08 UTC (permalink / raw)
  To: ml

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

New comment by MeganerdNL on void-packages repository

https://github.com/void-linux/void-packages/pull/45209#issuecomment-1649247832

Comment:
> needs a revbump

Fixex. Thanks.

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

* Re: knot-resolver: fix configfile location in runit service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
                   ` (12 preceding siblings ...)
  2023-07-25  7:08 ` MeganerdNL
@ 2023-07-25  7:08 ` MeganerdNL
  2023-07-25 20:48 ` [PR PATCH] [Updated] " MeganerdNL
                   ` (10 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: MeganerdNL @ 2023-07-25  7:08 UTC (permalink / raw)
  To: ml

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

New comment by MeganerdNL on void-packages repository

https://github.com/void-linux/void-packages/pull/45209#issuecomment-1649247832

Comment:
> needs a revbump

Fixed. Thanks.

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

* Re: [PR PATCH] [Updated] knot-resolver: fix configfile location in runit service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
                   ` (13 preceding siblings ...)
  2023-07-25  7:08 ` MeganerdNL
@ 2023-07-25 20:48 ` MeganerdNL
  2023-07-25 20:50 ` MeganerdNL
                   ` (9 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: MeganerdNL @ 2023-07-25 20:48 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MeganerdNL/void-packages knot-resolver-update
https://github.com/void-linux/void-packages/pull/45209

knot-resolver: fix configfile location in runit service
#### Testing the changes
- I tested the changes in this PR: **YES**

I noticed that in the default installation the default config file (/etc/knot-resolver/kresd.conf) was not read: so making changes to it, did nothing.

Per https://github.com/void-linux/void-packages/blob/master/Manual.md#writing_runit_services
you _could_ change CLI flags in **conf** file in the service directory, but I think this option should be enabled by default because the file /etc/knot-resolver/kresd.conf is also installed and otherwise it's confusing imho.

If there is another solution to fix this properly, let me know.

2nd change: in default CLI variable:

```
-f 1 
```
to
 ```
--noninteractive
```
because _-f 1_ will be deprecated per warning on command line.

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

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

From dd5d1ca99a4f231dcc9ba7194fb5a460449079c6 Mon Sep 17 00:00:00 2001
From: MeganerdNL <meganerd@meganerd.nl>
Date: Sun, 23 Jul 2023 21:31:32 +0200
Subject: [PATCH] knot-resolver: config fixes + add garbage collector service

---
 srcpkgs/knot-resolver/INSTALL                 |  3 +--
 srcpkgs/knot-resolver/files/kres-cache-gc/run | 23 +++++++++++++++++++
 srcpkgs/knot-resolver/files/kresd/run         |  3 +--
 srcpkgs/knot-resolver/template                |  3 ++-
 4 files changed, 27 insertions(+), 5 deletions(-)
 create mode 100755 srcpkgs/knot-resolver/files/kres-cache-gc/run
 mode change 100644 => 100755 srcpkgs/knot-resolver/files/kresd/run

diff --git a/srcpkgs/knot-resolver/INSTALL b/srcpkgs/knot-resolver/INSTALL
index 04f76a74cf7a5..1c4c306a08bd9 100644
--- a/srcpkgs/knot-resolver/INSTALL
+++ b/srcpkgs/knot-resolver/INSTALL
@@ -1,6 +1,5 @@
 case ${ACTION} in
 post)
-	chown -R _knot_resolver:_knot_resolver var/lib/knot-resolver
+	        chown -R _knot_resolver:_knot_resolver var/lib/knot-resolver
 	;;
 esac
-
diff --git a/srcpkgs/knot-resolver/files/kres-cache-gc/run b/srcpkgs/knot-resolver/files/kres-cache-gc/run
new file mode 100755
index 0000000000000..ba6f5b3a2dc9a
--- /dev/null
+++ b/srcpkgs/knot-resolver/files/kres-cache-gc/run
@@ -0,0 +1,23 @@
+#!/bin/sh
+exec 2>&1
+[ -r ./conf ] && . ./conf
+install -d -m0755 -o _knot_resolver -g _knot_resolver /run/knot-resolver
+
+# Do not change this file, as it will be overwritten when updated.
+# OPTS can optionally be changed in a file named 'conf' in this directory.
+#
+# It must at minimum contain the following 2 options for the service to run:
+# -d <garbage_interval(millis)> -c <resolver_cache>
+#
+# A 'conf' file will override both options, so add them both, even if you only change one.
+#
+# For example:
+#
+# OPTS="-d 1000 -c /run/knot-resolver"
+#
+# NOTE:
+# Resolver cache (-c <resolver_cache>) defaults to the working directory and MUST ALSO be changed in the
+# config file (default: /etc/knot-resolver/kresd.conf) via setting: cache.storage = 'lmdb:///your-dir'
+# This directory MUST exist. See knot-resolver documentation for more info.
+
+exec kres-cache-gc ${OPTS:- -d 1000 -c /run/knot-resolver}
diff --git a/srcpkgs/knot-resolver/files/kresd/run b/srcpkgs/knot-resolver/files/kresd/run
old mode 100644
new mode 100755
index 43b80cda27f2c..a88ce1ed59fe8
--- a/srcpkgs/knot-resolver/files/kresd/run
+++ b/srcpkgs/knot-resolver/files/kresd/run
@@ -1,5 +1,4 @@
 #!/bin/sh
-exec 2>&1
 [ -r ./conf ] && . ./conf
 install -d -m0755 -o _knot_resolver -g _knot_resolver /run/knot-resolver
-exec kresd ${OPTS:--f 1}
+exec kresd ${OPTS:- --noninteractive -c /etc/knot-resolver/kresd.conf /run/knot-resolver}
diff --git a/srcpkgs/knot-resolver/template b/srcpkgs/knot-resolver/template
index 25cefaf4ef395..a270ab0a9b1f8 100644
--- a/srcpkgs/knot-resolver/template
+++ b/srcpkgs/knot-resolver/template
@@ -1,7 +1,7 @@
 # Template file for 'knot-resolver'
 pkgname=knot-resolver
 version=5.6.0
-revision=1
+revision=2
 build_style=meson
 configure_args="
  -Dclient=enabled
@@ -36,6 +36,7 @@ post_install() {
 	vinstall etc/root.hints 644 var/lib/knot-resolver
 	vinstall etc/root.keys 644 var/lib/knot-resolver
 	vsv kresd
+        vsv kres-cache-gc
 }
 
 knot-resolver-devel_package() {

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

* Re: [PR PATCH] [Updated] knot-resolver: fix configfile location in runit service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
                   ` (14 preceding siblings ...)
  2023-07-25 20:48 ` [PR PATCH] [Updated] " MeganerdNL
@ 2023-07-25 20:50 ` MeganerdNL
  2023-07-25 20:50 ` MeganerdNL
                   ` (8 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: MeganerdNL @ 2023-07-25 20:50 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MeganerdNL/void-packages knot-resolver-update
https://github.com/void-linux/void-packages/pull/45209

knot-resolver: fix configfile location in runit service
#### Testing the changes
- I tested the changes in this PR: **YES**

I noticed that in the default installation the default config file (/etc/knot-resolver/kresd.conf) was not read: so making changes to it, did nothing.

Per https://github.com/void-linux/void-packages/blob/master/Manual.md#writing_runit_services
you _could_ change CLI flags in **conf** file in the service directory, but I think this option should be enabled by default because the file /etc/knot-resolver/kresd.conf is also installed and otherwise it's confusing imho.

If there is another solution to fix this properly, let me know.

2nd change: in default CLI variable:

```
-f 1 
```
to
 ```
--noninteractive
```
because _-f 1_ will be deprecated per warning on command line.

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

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

From aba5c57d599bfb466006f715ab942d9728c9919d Mon Sep 17 00:00:00 2001
From: MeganerdNL <meganerd@meganerd.nl>
Date: Sun, 23 Jul 2023 21:31:32 +0200
Subject: [PATCH] knot-resolver: config fixes + add garbage collector service

---
 srcpkgs/knot-resolver/INSTALL                 |  1 -
 srcpkgs/knot-resolver/files/kres-cache-gc/run | 23 +++++++++++++++++++
 srcpkgs/knot-resolver/files/kresd/run         |  3 +--
 srcpkgs/knot-resolver/template                |  3 ++-
 4 files changed, 26 insertions(+), 4 deletions(-)
 create mode 100755 srcpkgs/knot-resolver/files/kres-cache-gc/run
 mode change 100644 => 100755 srcpkgs/knot-resolver/files/kresd/run

diff --git a/srcpkgs/knot-resolver/INSTALL b/srcpkgs/knot-resolver/INSTALL
index 04f76a74cf7a5..c3d67e1a52ca8 100644
--- a/srcpkgs/knot-resolver/INSTALL
+++ b/srcpkgs/knot-resolver/INSTALL
@@ -3,4 +3,3 @@ post)
 	chown -R _knot_resolver:_knot_resolver var/lib/knot-resolver
 	;;
 esac
-
diff --git a/srcpkgs/knot-resolver/files/kres-cache-gc/run b/srcpkgs/knot-resolver/files/kres-cache-gc/run
new file mode 100755
index 0000000000000..ba6f5b3a2dc9a
--- /dev/null
+++ b/srcpkgs/knot-resolver/files/kres-cache-gc/run
@@ -0,0 +1,23 @@
+#!/bin/sh
+exec 2>&1
+[ -r ./conf ] && . ./conf
+install -d -m0755 -o _knot_resolver -g _knot_resolver /run/knot-resolver
+
+# Do not change this file, as it will be overwritten when updated.
+# OPTS can optionally be changed in a file named 'conf' in this directory.
+#
+# It must at minimum contain the following 2 options for the service to run:
+# -d <garbage_interval(millis)> -c <resolver_cache>
+#
+# A 'conf' file will override both options, so add them both, even if you only change one.
+#
+# For example:
+#
+# OPTS="-d 1000 -c /run/knot-resolver"
+#
+# NOTE:
+# Resolver cache (-c <resolver_cache>) defaults to the working directory and MUST ALSO be changed in the
+# config file (default: /etc/knot-resolver/kresd.conf) via setting: cache.storage = 'lmdb:///your-dir'
+# This directory MUST exist. See knot-resolver documentation for more info.
+
+exec kres-cache-gc ${OPTS:- -d 1000 -c /run/knot-resolver}
diff --git a/srcpkgs/knot-resolver/files/kresd/run b/srcpkgs/knot-resolver/files/kresd/run
old mode 100644
new mode 100755
index 43b80cda27f2c..a88ce1ed59fe8
--- a/srcpkgs/knot-resolver/files/kresd/run
+++ b/srcpkgs/knot-resolver/files/kresd/run
@@ -1,5 +1,4 @@
 #!/bin/sh
-exec 2>&1
 [ -r ./conf ] && . ./conf
 install -d -m0755 -o _knot_resolver -g _knot_resolver /run/knot-resolver
-exec kresd ${OPTS:--f 1}
+exec kresd ${OPTS:- --noninteractive -c /etc/knot-resolver/kresd.conf /run/knot-resolver}
diff --git a/srcpkgs/knot-resolver/template b/srcpkgs/knot-resolver/template
index 25cefaf4ef395..a270ab0a9b1f8 100644
--- a/srcpkgs/knot-resolver/template
+++ b/srcpkgs/knot-resolver/template
@@ -1,7 +1,7 @@
 # Template file for 'knot-resolver'
 pkgname=knot-resolver
 version=5.6.0
-revision=1
+revision=2
 build_style=meson
 configure_args="
  -Dclient=enabled
@@ -36,6 +36,7 @@ post_install() {
 	vinstall etc/root.hints 644 var/lib/knot-resolver
 	vinstall etc/root.keys 644 var/lib/knot-resolver
 	vsv kresd
+        vsv kres-cache-gc
 }
 
 knot-resolver-devel_package() {

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

* Re: [PR PATCH] [Updated] knot-resolver: fix configfile location in runit service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
                   ` (15 preceding siblings ...)
  2023-07-25 20:50 ` MeganerdNL
@ 2023-07-25 20:50 ` MeganerdNL
  2023-07-25 20:55 ` MeganerdNL
                   ` (7 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: MeganerdNL @ 2023-07-25 20:50 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MeganerdNL/void-packages knot-resolver-update
https://github.com/void-linux/void-packages/pull/45209

knot-resolver: fix configfile location in runit service
#### Testing the changes
- I tested the changes in this PR: **YES**

I noticed that in the default installation the default config file (/etc/knot-resolver/kresd.conf) was not read: so making changes to it, did nothing.

Per https://github.com/void-linux/void-packages/blob/master/Manual.md#writing_runit_services
you _could_ change CLI flags in **conf** file in the service directory, but I think this option should be enabled by default because the file /etc/knot-resolver/kresd.conf is also installed and otherwise it's confusing imho.

If there is another solution to fix this properly, let me know.

2nd change: in default CLI variable:

```
-f 1 
```
to
 ```
--noninteractive
```
because _-f 1_ will be deprecated per warning on command line.

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

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

From fbda7b752cd16a746de1c0ca353709bd3ddfa38f Mon Sep 17 00:00:00 2001
From: MeganerdNL <meganerd@meganerd.nl>
Date: Sun, 23 Jul 2023 21:31:32 +0200
Subject: [PATCH] knot-resolver: config fixes + add garbage collector service

---
 srcpkgs/knot-resolver/files/kres-cache-gc/run | 23 +++++++++++++++++++
 srcpkgs/knot-resolver/files/kresd/run         |  3 +--
 srcpkgs/knot-resolver/template                |  3 ++-
 3 files changed, 26 insertions(+), 3 deletions(-)
 create mode 100755 srcpkgs/knot-resolver/files/kres-cache-gc/run
 mode change 100644 => 100755 srcpkgs/knot-resolver/files/kresd/run

diff --git a/srcpkgs/knot-resolver/files/kres-cache-gc/run b/srcpkgs/knot-resolver/files/kres-cache-gc/run
new file mode 100755
index 0000000000000..ba6f5b3a2dc9a
--- /dev/null
+++ b/srcpkgs/knot-resolver/files/kres-cache-gc/run
@@ -0,0 +1,23 @@
+#!/bin/sh
+exec 2>&1
+[ -r ./conf ] && . ./conf
+install -d -m0755 -o _knot_resolver -g _knot_resolver /run/knot-resolver
+
+# Do not change this file, as it will be overwritten when updated.
+# OPTS can optionally be changed in a file named 'conf' in this directory.
+#
+# It must at minimum contain the following 2 options for the service to run:
+# -d <garbage_interval(millis)> -c <resolver_cache>
+#
+# A 'conf' file will override both options, so add them both, even if you only change one.
+#
+# For example:
+#
+# OPTS="-d 1000 -c /run/knot-resolver"
+#
+# NOTE:
+# Resolver cache (-c <resolver_cache>) defaults to the working directory and MUST ALSO be changed in the
+# config file (default: /etc/knot-resolver/kresd.conf) via setting: cache.storage = 'lmdb:///your-dir'
+# This directory MUST exist. See knot-resolver documentation for more info.
+
+exec kres-cache-gc ${OPTS:- -d 1000 -c /run/knot-resolver}
diff --git a/srcpkgs/knot-resolver/files/kresd/run b/srcpkgs/knot-resolver/files/kresd/run
old mode 100644
new mode 100755
index 43b80cda27f2c..a88ce1ed59fe8
--- a/srcpkgs/knot-resolver/files/kresd/run
+++ b/srcpkgs/knot-resolver/files/kresd/run
@@ -1,5 +1,4 @@
 #!/bin/sh
-exec 2>&1
 [ -r ./conf ] && . ./conf
 install -d -m0755 -o _knot_resolver -g _knot_resolver /run/knot-resolver
-exec kresd ${OPTS:--f 1}
+exec kresd ${OPTS:- --noninteractive -c /etc/knot-resolver/kresd.conf /run/knot-resolver}
diff --git a/srcpkgs/knot-resolver/template b/srcpkgs/knot-resolver/template
index 25cefaf4ef395..a270ab0a9b1f8 100644
--- a/srcpkgs/knot-resolver/template
+++ b/srcpkgs/knot-resolver/template
@@ -1,7 +1,7 @@
 # Template file for 'knot-resolver'
 pkgname=knot-resolver
 version=5.6.0
-revision=1
+revision=2
 build_style=meson
 configure_args="
  -Dclient=enabled
@@ -36,6 +36,7 @@ post_install() {
 	vinstall etc/root.hints 644 var/lib/knot-resolver
 	vinstall etc/root.keys 644 var/lib/knot-resolver
 	vsv kresd
+        vsv kres-cache-gc
 }
 
 knot-resolver-devel_package() {

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

* Re: [PR PATCH] [Updated] knot-resolver: fix configfile location in runit service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
                   ` (16 preceding siblings ...)
  2023-07-25 20:50 ` MeganerdNL
@ 2023-07-25 20:55 ` MeganerdNL
  2023-07-25 21:08 ` [PR PATCH] [Updated] knot-resolver: config fixes + add garbage collector service MeganerdNL
                   ` (6 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: MeganerdNL @ 2023-07-25 20:55 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MeganerdNL/void-packages knot-resolver-update
https://github.com/void-linux/void-packages/pull/45209

knot-resolver: fix configfile location in runit service
#### Testing the changes
- I tested the changes in this PR: **YES**

## First
In the default installation the default config file (/etc/knot-resolver/kresd.conf)  is not read: so making changes to it, did nothing.

Per https://github.com/void-linux/void-packages/blob/master/Manual.md#writing_runit_services
you _could_ change CLI flags in **conf** file in the service directory, but I think this option should be enabled by default because the file /etc/knot-resolver/kresd.conf is also installed and otherwise it's confusing.

## Second
change: in default CLI variable:

```
-f 1 
```
to
 ```
--noninteractive
```
because _-f 1_ will be deprecated per warning on command line.

## Third
knot-resolver comes with a garbage collector. I added a service file for it.

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

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

From 54b02159ccecaf69645a9b50d5040d3af9596023 Mon Sep 17 00:00:00 2001
From: MeganerdNL <meganerd@meganerd.nl>
Date: Sun, 23 Jul 2023 21:31:32 +0200
Subject: [PATCH] knot-resolver: config fixes + add garbage collector service

---
 srcpkgs/knot-resolver/files/kres-cache-gc/run | 23 +++++++++++++++++++
 srcpkgs/knot-resolver/files/kresd/run         |  3 +--
 srcpkgs/knot-resolver/template                |  3 ++-
 3 files changed, 26 insertions(+), 3 deletions(-)
 create mode 100755 srcpkgs/knot-resolver/files/kres-cache-gc/run
 mode change 100644 => 100755 srcpkgs/knot-resolver/files/kresd/run

diff --git a/srcpkgs/knot-resolver/files/kres-cache-gc/run b/srcpkgs/knot-resolver/files/kres-cache-gc/run
new file mode 100755
index 0000000000000..ba6f5b3a2dc9a
--- /dev/null
+++ b/srcpkgs/knot-resolver/files/kres-cache-gc/run
@@ -0,0 +1,23 @@
+#!/bin/sh
+exec 2>&1
+[ -r ./conf ] && . ./conf
+install -d -m0755 -o _knot_resolver -g _knot_resolver /run/knot-resolver
+
+# Do not change this file, as it will be overwritten when updated.
+# OPTS can optionally be changed in a file named 'conf' in this directory.
+#
+# It must at minimum contain the following 2 options for the service to run:
+# -d <garbage_interval(millis)> -c <resolver_cache>
+#
+# A 'conf' file will override both options, so add them both, even if you only change one.
+#
+# For example:
+#
+# OPTS="-d 1000 -c /run/knot-resolver"
+#
+# NOTE:
+# Resolver cache (-c <resolver_cache>) defaults to the working directory and MUST ALSO be changed in the
+# config file (default: /etc/knot-resolver/kresd.conf) via setting: cache.storage = 'lmdb:///your-dir'
+# This directory MUST exist. See knot-resolver documentation for more info.
+
+exec kres-cache-gc ${OPTS:- -d 1000 -c /run/knot-resolver}
diff --git a/srcpkgs/knot-resolver/files/kresd/run b/srcpkgs/knot-resolver/files/kresd/run
old mode 100644
new mode 100755
index 43b80cda27f2c..a88ce1ed59fe8
--- a/srcpkgs/knot-resolver/files/kresd/run
+++ b/srcpkgs/knot-resolver/files/kresd/run
@@ -1,5 +1,4 @@
 #!/bin/sh
-exec 2>&1
 [ -r ./conf ] && . ./conf
 install -d -m0755 -o _knot_resolver -g _knot_resolver /run/knot-resolver
-exec kresd ${OPTS:--f 1}
+exec kresd ${OPTS:- --noninteractive -c /etc/knot-resolver/kresd.conf /run/knot-resolver}
diff --git a/srcpkgs/knot-resolver/template b/srcpkgs/knot-resolver/template
index 25cefaf4ef395..527c4216854e8 100644
--- a/srcpkgs/knot-resolver/template
+++ b/srcpkgs/knot-resolver/template
@@ -1,7 +1,7 @@
 # Template file for 'knot-resolver'
 pkgname=knot-resolver
 version=5.6.0
-revision=1
+revision=2
 build_style=meson
 configure_args="
  -Dclient=enabled
@@ -36,6 +36,7 @@ post_install() {
 	vinstall etc/root.hints 644 var/lib/knot-resolver
 	vinstall etc/root.keys 644 var/lib/knot-resolver
 	vsv kresd
+	vsv kres-cache-gc
 }
 
 knot-resolver-devel_package() {

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

* Re: [PR PATCH] [Updated] knot-resolver: config fixes + add garbage collector service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
                   ` (17 preceding siblings ...)
  2023-07-25 20:55 ` MeganerdNL
@ 2023-07-25 21:08 ` MeganerdNL
  2023-07-25 21:14 ` Duncaen
                   ` (5 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: MeganerdNL @ 2023-07-25 21:08 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MeganerdNL/void-packages knot-resolver-update
https://github.com/void-linux/void-packages/pull/45209

knot-resolver: config fixes + add garbage collector service
#### Testing the changes
- I tested the changes in this PR: **YES**

## First
In the default installation the default config file (/etc/knot-resolver/kresd.conf)  is not read: so making changes to it, did nothing.

Per https://github.com/void-linux/void-packages/blob/master/Manual.md#writing_runit_services
you _could_ change CLI flags in **conf** file in the service directory, but I think this option should be enabled by default because the file /etc/knot-resolver/kresd.conf is also installed and otherwise it's confusing.

## Second
Added working directory to kresd service file, otherwise it uses the service directory itself.

## Third
change: in default CLI variable:

```
-f 1 
```
to
 ```
--noninteractive
```
because _-f 1_ will be deprecated per warning on command line.

## Fourth
knot-resolver comes with a garbage collector (kres-cache-gc).
I added a service file for it.

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

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

From 4da699938bf34fb2a8e601c406fd0ee01dc8c97d Mon Sep 17 00:00:00 2001
From: MeganerdNL <meganerd@meganerd.nl>
Date: Sun, 23 Jul 2023 21:31:32 +0200
Subject: [PATCH] knot-resolver: config fixes + add garbage collector service

---
 srcpkgs/knot-resolver/files/kres-cache-gc/run | 23 +++++++++++++++++++
 srcpkgs/knot-resolver/files/kresd/run         |  2 +-
 srcpkgs/knot-resolver/template                |  3 ++-
 3 files changed, 26 insertions(+), 2 deletions(-)
 create mode 100755 srcpkgs/knot-resolver/files/kres-cache-gc/run
 mode change 100644 => 100755 srcpkgs/knot-resolver/files/kresd/run

diff --git a/srcpkgs/knot-resolver/files/kres-cache-gc/run b/srcpkgs/knot-resolver/files/kres-cache-gc/run
new file mode 100755
index 0000000000000..ba6f5b3a2dc9a
--- /dev/null
+++ b/srcpkgs/knot-resolver/files/kres-cache-gc/run
@@ -0,0 +1,23 @@
+#!/bin/sh
+exec 2>&1
+[ -r ./conf ] && . ./conf
+install -d -m0755 -o _knot_resolver -g _knot_resolver /run/knot-resolver
+
+# Do not change this file, as it will be overwritten when updated.
+# OPTS can optionally be changed in a file named 'conf' in this directory.
+#
+# It must at minimum contain the following 2 options for the service to run:
+# -d <garbage_interval(millis)> -c <resolver_cache>
+#
+# A 'conf' file will override both options, so add them both, even if you only change one.
+#
+# For example:
+#
+# OPTS="-d 1000 -c /run/knot-resolver"
+#
+# NOTE:
+# Resolver cache (-c <resolver_cache>) defaults to the working directory and MUST ALSO be changed in the
+# config file (default: /etc/knot-resolver/kresd.conf) via setting: cache.storage = 'lmdb:///your-dir'
+# This directory MUST exist. See knot-resolver documentation for more info.
+
+exec kres-cache-gc ${OPTS:- -d 1000 -c /run/knot-resolver}
diff --git a/srcpkgs/knot-resolver/files/kresd/run b/srcpkgs/knot-resolver/files/kresd/run
old mode 100644
new mode 100755
index 43b80cda27f2c..c42e0849b8911
--- a/srcpkgs/knot-resolver/files/kresd/run
+++ b/srcpkgs/knot-resolver/files/kresd/run
@@ -2,4 +2,4 @@
 exec 2>&1
 [ -r ./conf ] && . ./conf
 install -d -m0755 -o _knot_resolver -g _knot_resolver /run/knot-resolver
-exec kresd ${OPTS:--f 1}
+exec kresd ${OPTS:- --noninteractive -c /etc/knot-resolver/kresd.conf /run/knot-resolver}
diff --git a/srcpkgs/knot-resolver/template b/srcpkgs/knot-resolver/template
index 25cefaf4ef395..527c4216854e8 100644
--- a/srcpkgs/knot-resolver/template
+++ b/srcpkgs/knot-resolver/template
@@ -1,7 +1,7 @@
 # Template file for 'knot-resolver'
 pkgname=knot-resolver
 version=5.6.0
-revision=1
+revision=2
 build_style=meson
 configure_args="
  -Dclient=enabled
@@ -36,6 +36,7 @@ post_install() {
 	vinstall etc/root.hints 644 var/lib/knot-resolver
 	vinstall etc/root.keys 644 var/lib/knot-resolver
 	vsv kresd
+	vsv kres-cache-gc
 }
 
 knot-resolver-devel_package() {

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

* Re: knot-resolver: config fixes + add garbage collector service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
                   ` (18 preceding siblings ...)
  2023-07-25 21:08 ` [PR PATCH] [Updated] knot-resolver: config fixes + add garbage collector service MeganerdNL
@ 2023-07-25 21:14 ` Duncaen
  2023-07-26  1:28 ` classabbyamp
                   ` (4 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Duncaen @ 2023-07-25 21:14 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/45209#issuecomment-1650568930

Comment:
Not a fan of trying to document a bunch of stuff in the service scripts, this is going to be hard to maintain and will probably result in outdated information at some point.

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

* Re: knot-resolver: config fixes + add garbage collector service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
                   ` (19 preceding siblings ...)
  2023-07-25 21:14 ` Duncaen
@ 2023-07-26  1:28 ` classabbyamp
  2023-07-26  5:22 ` [PR PATCH] [Updated] " MeganerdNL
                   ` (3 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: classabbyamp @ 2023-07-26  1:28 UTC (permalink / raw)
  To: ml

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

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/45209#issuecomment-1650828020

Comment:
+1 to duncaen, all those comments are either spelling out standard practice with void services, documented via the default valur of OPTS, or should be read in the upstream documentation by the user

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

* Re: [PR PATCH] [Updated] knot-resolver: config fixes + add garbage collector service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
                   ` (20 preceding siblings ...)
  2023-07-26  1:28 ` classabbyamp
@ 2023-07-26  5:22 ` MeganerdNL
  2023-07-26  5:25 ` MeganerdNL
                   ` (2 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: MeganerdNL @ 2023-07-26  5:22 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MeganerdNL/void-packages knot-resolver-update
https://github.com/void-linux/void-packages/pull/45209

knot-resolver: config fixes + add garbage collector service
#### Testing the changes
- I tested the changes in this PR: **YES**

## First
In the default installation the default config file (/etc/knot-resolver/kresd.conf)  is not read: so making changes to it, did nothing.

Per https://github.com/void-linux/void-packages/blob/master/Manual.md#writing_runit_services
you _could_ change CLI flags in **conf** file in the service directory, but I think this option should be enabled by default because the file /etc/knot-resolver/kresd.conf is also installed and otherwise it's confusing.

## Second
Added working directory to kresd service file, otherwise it uses the service directory itself.

## Third
change: in default CLI variable:

```
-f 1 
```
to
 ```
--noninteractive
```
because _-f 1_ will be deprecated per warning on command line.

## Fourth
knot-resolver comes with a garbage collector (kres-cache-gc).
I added a service file for it.

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

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

From 00a5803d89e462bf2a44bf7766b86c888806107a Mon Sep 17 00:00:00 2001
From: MeganerdNL <meganerd@meganerd.nl>
Date: Sun, 23 Jul 2023 21:31:32 +0200
Subject: [PATCH] knot-resolver: config fixes + add garbage collector service

---
 srcpkgs/knot-resolver/files/kres-cache-gc/run | 23 +++++++++++++++++++
 srcpkgs/knot-resolver/files/kresd/run         |  2 +-
 srcpkgs/knot-resolver/template                |  3 ++-
 3 files changed, 26 insertions(+), 2 deletions(-)
 create mode 100755 srcpkgs/knot-resolver/files/kres-cache-gc/run
 mode change 100644 => 100755 srcpkgs/knot-resolver/files/kresd/run

diff --git a/srcpkgs/knot-resolver/files/kres-cache-gc/run b/srcpkgs/knot-resolver/files/kres-cache-gc/run
new file mode 100755
index 0000000000000..ba6f5b3a2dc9a
--- /dev/null
+++ b/srcpkgs/knot-resolver/files/kres-cache-gc/run
@@ -0,0 +1,23 @@
+#!/bin/sh
+exec 2>&1
+[ -r ./conf ] && . ./conf
+install -d -m0755 -o _knot_resolver -g _knot_resolver /run/knot-resolver
+
+# Do not change this file, as it will be overwritten when updated.
+# OPTS can optionally be changed in a file named 'conf' in this directory.
+#
+# It must at minimum contain the following 2 options for the service to run:
+# -d <garbage_interval(millis)> -c <resolver_cache>
+#
+# A 'conf' file will override both options, so add them both, even if you only change one.
+#
+# For example:
+#
+# OPTS="-d 1000 -c /run/knot-resolver"
+#
+# NOTE:
+# Resolver cache (-c <resolver_cache>) defaults to the working directory and MUST ALSO be changed in the
+# config file (default: /etc/knot-resolver/kresd.conf) via setting: cache.storage = 'lmdb:///your-dir'
+# This directory MUST exist. See knot-resolver documentation for more info.
+
+exec kres-cache-gc ${OPTS:- -d 1000 -c /run/knot-resolver}
diff --git a/srcpkgs/knot-resolver/files/kresd/run b/srcpkgs/knot-resolver/files/kresd/run
old mode 100644
new mode 100755
index 43b80cda27f2c..c42e0849b8911
--- a/srcpkgs/knot-resolver/files/kresd/run
+++ b/srcpkgs/knot-resolver/files/kresd/run
@@ -2,4 +2,4 @@
 exec 2>&1
 [ -r ./conf ] && . ./conf
 install -d -m0755 -o _knot_resolver -g _knot_resolver /run/knot-resolver
-exec kresd ${OPTS:--f 1}
+exec kresd ${OPTS:- --noninteractive -c /etc/knot-resolver/kresd.conf /run/knot-resolver}
diff --git a/srcpkgs/knot-resolver/template b/srcpkgs/knot-resolver/template
index 25cefaf4ef395..527c4216854e8 100644
--- a/srcpkgs/knot-resolver/template
+++ b/srcpkgs/knot-resolver/template
@@ -1,7 +1,7 @@
 # Template file for 'knot-resolver'
 pkgname=knot-resolver
 version=5.6.0
-revision=1
+revision=2
 build_style=meson
 configure_args="
  -Dclient=enabled
@@ -36,6 +36,7 @@ post_install() {
 	vinstall etc/root.hints 644 var/lib/knot-resolver
 	vinstall etc/root.keys 644 var/lib/knot-resolver
 	vsv kresd
+	vsv kres-cache-gc
 }
 
 knot-resolver-devel_package() {

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

* Re: [PR PATCH] [Updated] knot-resolver: config fixes + add garbage collector service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
                   ` (21 preceding siblings ...)
  2023-07-26  5:22 ` [PR PATCH] [Updated] " MeganerdNL
@ 2023-07-26  5:25 ` MeganerdNL
  2023-07-26  5:30 ` MeganerdNL
  2023-07-28  4:42 ` [PR PATCH] [Merged]: " classabbyamp
  24 siblings, 0 replies; 26+ messages in thread
From: MeganerdNL @ 2023-07-26  5:25 UTC (permalink / raw)
  To: ml

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

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

https://github.com/MeganerdNL/void-packages knot-resolver-update
https://github.com/void-linux/void-packages/pull/45209

knot-resolver: config fixes + add garbage collector service
#### Testing the changes
- I tested the changes in this PR: **YES**

## First
In the default installation the default config file (/etc/knot-resolver/kresd.conf)  is not read: so making changes to it, did nothing.

Per https://github.com/void-linux/void-packages/blob/master/Manual.md#writing_runit_services
you _could_ change CLI flags in **conf** file in the service directory, but I think this option should be enabled by default because the file /etc/knot-resolver/kresd.conf is also installed and otherwise it's confusing.

## Second
Added working directory to kresd service file, otherwise it uses the service directory itself.

## Third
change: in default CLI variable:

```
-f 1 
```
to
 ```
--noninteractive
```
because _-f 1_ will be deprecated per warning on command line.

## Fourth
knot-resolver comes with a garbage collector (kres-cache-gc).
I added a service file for it.

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

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

From 867bc14615e46ac5c75e78e4ded0b55f2cf6364b Mon Sep 17 00:00:00 2001
From: MeganerdNL <meganerd@meganerd.nl>
Date: Sun, 23 Jul 2023 21:31:32 +0200
Subject: [PATCH] knot-resolver: config fixes + add garbage collector service

---
 srcpkgs/knot-resolver/files/kres-cache-gc/run | 5 +++++
 srcpkgs/knot-resolver/files/kresd/run         | 2 +-
 srcpkgs/knot-resolver/template                | 3 ++-
 3 files changed, 8 insertions(+), 2 deletions(-)
 create mode 100755 srcpkgs/knot-resolver/files/kres-cache-gc/run
 mode change 100644 => 100755 srcpkgs/knot-resolver/files/kresd/run

diff --git a/srcpkgs/knot-resolver/files/kres-cache-gc/run b/srcpkgs/knot-resolver/files/kres-cache-gc/run
new file mode 100755
index 0000000000000..ce9e5d6354b1f
--- /dev/null
+++ b/srcpkgs/knot-resolver/files/kres-cache-gc/run
@@ -0,0 +1,5 @@
+#!/bin/sh
+exec 2>&1
+[ -r ./conf ] && . ./conf
+install -d -m0755 -o _knot_resolver -g _knot_resolver /run/knot-resolver
+exec kres-cache-gc ${OPTS:- -d 1000 -c /run/knot-resolver}
diff --git a/srcpkgs/knot-resolver/files/kresd/run b/srcpkgs/knot-resolver/files/kresd/run
old mode 100644
new mode 100755
index 43b80cda27f2c..c42e0849b8911
--- a/srcpkgs/knot-resolver/files/kresd/run
+++ b/srcpkgs/knot-resolver/files/kresd/run
@@ -2,4 +2,4 @@
 exec 2>&1
 [ -r ./conf ] && . ./conf
 install -d -m0755 -o _knot_resolver -g _knot_resolver /run/knot-resolver
-exec kresd ${OPTS:--f 1}
+exec kresd ${OPTS:- --noninteractive -c /etc/knot-resolver/kresd.conf /run/knot-resolver}
diff --git a/srcpkgs/knot-resolver/template b/srcpkgs/knot-resolver/template
index 25cefaf4ef395..527c4216854e8 100644
--- a/srcpkgs/knot-resolver/template
+++ b/srcpkgs/knot-resolver/template
@@ -1,7 +1,7 @@
 # Template file for 'knot-resolver'
 pkgname=knot-resolver
 version=5.6.0
-revision=1
+revision=2
 build_style=meson
 configure_args="
  -Dclient=enabled
@@ -36,6 +36,7 @@ post_install() {
 	vinstall etc/root.hints 644 var/lib/knot-resolver
 	vinstall etc/root.keys 644 var/lib/knot-resolver
 	vsv kresd
+	vsv kres-cache-gc
 }
 
 knot-resolver-devel_package() {

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

* Re: knot-resolver: config fixes + add garbage collector service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
                   ` (22 preceding siblings ...)
  2023-07-26  5:25 ` MeganerdNL
@ 2023-07-26  5:30 ` MeganerdNL
  2023-07-28  4:42 ` [PR PATCH] [Merged]: " classabbyamp
  24 siblings, 0 replies; 26+ messages in thread
From: MeganerdNL @ 2023-07-26  5:30 UTC (permalink / raw)
  To: ml

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

New comment by MeganerdNL on void-packages repository

https://github.com/void-linux/void-packages/pull/45209#issuecomment-1651005310

Comment:
> Not a fan of trying to document a bunch of stuff in the service scripts, this is going to be hard to maintain and will probably result in outdated information at some point.

Yes, I must agree with you (and @classabbyamp). I was wording my own experience to get to this point. because the main program has no way to specify cache directory on command line and it's not in the default config file. But indeed, this _is_ in the documentation. Thanks.

It tidied up. How does this look?

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

* Re: [PR PATCH] [Merged]: knot-resolver: config fixes + add garbage collector service
  2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
                   ` (23 preceding siblings ...)
  2023-07-26  5:30 ` MeganerdNL
@ 2023-07-28  4:42 ` classabbyamp
  24 siblings, 0 replies; 26+ messages in thread
From: classabbyamp @ 2023-07-28  4:42 UTC (permalink / raw)
  To: ml

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

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

knot-resolver: config fixes + add garbage collector service
https://github.com/void-linux/void-packages/pull/45209

Description:
#### Testing the changes
- I tested the changes in this PR: **YES**

## First
In the default installation the default config file (/etc/knot-resolver/kresd.conf)  is not read: so making changes to it, did nothing.

Per https://github.com/void-linux/void-packages/blob/master/Manual.md#writing_runit_services
you _could_ change CLI flags in **conf** file in the service directory, but I think this option should be enabled by default because the file /etc/knot-resolver/kresd.conf is also installed and otherwise it's confusing.

## Second
Added working directory to kresd service file, otherwise it uses the service directory itself.

## Third
change: in default CLI variable:

```
-f 1 
```
to
 ```
--noninteractive
```
because _-f 1_ will be deprecated per warning on command line.

## Fourth
knot-resolver comes with a garbage collector (kres-cache-gc).
I added a service file for it.

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

end of thread, other threads:[~2023-07-28  4:42 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-23 19:37 [PR PATCH] knot-resolver: fix configfile location in runit service MeganerdNL
2023-07-23 19:42 ` classabbyamp
2023-07-23 21:00 ` MeganerdNL
2023-07-23 21:07 ` [PR PATCH] [Updated] " MeganerdNL
2023-07-23 21:08 ` MeganerdNL
2023-07-23 21:09 ` MeganerdNL
2023-07-23 21:10 ` MeganerdNL
2023-07-23 21:10 ` MeganerdNL
2023-07-24 14:09 ` MeganerdNL
2023-07-25  6:19 ` [PR PATCH] [Updated] " MeganerdNL
2023-07-25  6:22 ` MeganerdNL
2023-07-25  6:30 ` classabbyamp
2023-07-25  7:08 ` [PR PATCH] [Updated] " MeganerdNL
2023-07-25  7:08 ` MeganerdNL
2023-07-25  7:08 ` MeganerdNL
2023-07-25 20:48 ` [PR PATCH] [Updated] " MeganerdNL
2023-07-25 20:50 ` MeganerdNL
2023-07-25 20:50 ` MeganerdNL
2023-07-25 20:55 ` MeganerdNL
2023-07-25 21:08 ` [PR PATCH] [Updated] knot-resolver: config fixes + add garbage collector service MeganerdNL
2023-07-25 21:14 ` Duncaen
2023-07-26  1:28 ` classabbyamp
2023-07-26  5:22 ` [PR PATCH] [Updated] " MeganerdNL
2023-07-26  5:25 ` MeganerdNL
2023-07-26  5:30 ` MeganerdNL
2023-07-28  4:42 ` [PR PATCH] [Merged]: " classabbyamp

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