Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] dnscrypt-proxy: put config in subdirectory of etc/.
@ 2021-12-13 20:36 TinfoilSubmarine
  2022-01-02 18:47 ` cinerea0
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: TinfoilSubmarine @ 2021-12-13 20:36 UTC (permalink / raw)
  To: ml

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

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

https://github.com/TinfoilSubmarine/void-packages dnscrypt
https://github.com/void-linux/void-packages/pull/34517

dnscrypt-proxy: put config in subdirectory of etc/.
this change prevents dnscrypt-proxy from polluting etc/ with lists of relays, resolvers, etc.

After enabling the service, I was seeing these files show up in etc/:
```
public-resolvers.md
public-resolvers.md.minisig
relays.md
relays.md.minisig
```

Not sure how it should notify that the config location has moved. Should there be an `INSTALL.msg`, or should the config be moved in post in an `INSTALL`?

<!-- Uncomment relevant sections and delete options which are not applicable -->

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

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

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


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

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

From b7c61914b2532fbef865b78a95e065c2a50b9795 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Mon, 13 Dec 2021 15:22:51 -0500
Subject: [PATCH] dnscrypt-proxy: put config in subdirectory of etc/.

this change prevents dnscrypt-proxy from polluting etc/ with lists of
relays, resolvers, etc.
---
 srcpkgs/dnscrypt-proxy/files/dnscrypt-proxy/run | 2 +-
 srcpkgs/dnscrypt-proxy/template                 | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/dnscrypt-proxy/files/dnscrypt-proxy/run b/srcpkgs/dnscrypt-proxy/files/dnscrypt-proxy/run
index 6e240fb488e2..3f0cd6172435 100755
--- a/srcpkgs/dnscrypt-proxy/files/dnscrypt-proxy/run
+++ b/srcpkgs/dnscrypt-proxy/files/dnscrypt-proxy/run
@@ -1,3 +1,3 @@
 #!/bin/sh
 exec 2>&1
-exec dnscrypt-proxy -config /etc/dnscrypt-proxy.toml
+exec dnscrypt-proxy -config /etc/dnscrypt-proxy/dnscrypt-proxy.toml
diff --git a/srcpkgs/dnscrypt-proxy/template b/srcpkgs/dnscrypt-proxy/template
index 6b1ee815c75b..0869755308f8 100644
--- a/srcpkgs/dnscrypt-proxy/template
+++ b/srcpkgs/dnscrypt-proxy/template
@@ -1,7 +1,7 @@
 # Template file for 'dnscrypt-proxy'
 pkgname=dnscrypt-proxy
 version=2.1.1
-revision=1
+revision=2
 build_style=go
 go_import_path=github.com/dnscrypt/dnscrypt-proxy
 go_package="${go_import_path}/dnscrypt-proxy"
@@ -12,12 +12,13 @@ homepage="https://github.com/DNSCrypt/dnscrypt-proxy"
 changelog="https://raw.githubusercontent.com/DNSCrypt/dnscrypt-proxy/master/ChangeLog"
 distfiles="https://github.com/DNSCrypt/dnscrypt-proxy/archive/${version}.tar.gz"
 checksum=cc4a2f274ce48c3731ff981e940e6475d912fb356a80481e91725e81d67bde14
-conf_files="/etc/dnscrypt-proxy.toml"
+conf_files="/etc/dnscrypt-proxy/dnscrypt-proxy.toml"
 system_accounts="dnscrypt_proxy"
 make_dirs="/var/log/dnscrypt-proxy 0750 dnscrypt_proxy dnscrypt_proxy"
 
 post_install() {
-	vconf dnscrypt-proxy/example-dnscrypt-proxy.toml dnscrypt-proxy.toml
+	vmkdir etc/dnscrypt-proxy
+	vcopy dnscrypt-proxy/example-dnscrypt-proxy.toml etc/dnscrypt-proxy/dnscrypt-proxy.toml
 	vlicense LICENSE
 	vsv dnscrypt-proxy
 }

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

* Re: dnscrypt-proxy: put config in subdirectory of etc/.
  2021-12-13 20:36 [PR PATCH] dnscrypt-proxy: put config in subdirectory of etc/ TinfoilSubmarine
@ 2022-01-02 18:47 ` cinerea0
  2022-01-13 18:22 ` [PR PATCH] [Updated] " TinfoilSubmarine
  2022-01-13 18:25 ` TinfoilSubmarine
  2 siblings, 0 replies; 4+ messages in thread
From: cinerea0 @ 2022-01-02 18:47 UTC (permalink / raw)
  To: ml

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

New comment by cinerea0 on void-packages repository

https://github.com/void-linux/void-packages/pull/34517#issuecomment-1003758534

Comment:
After the recent revbump to dnscrypt-proxy, you should increase the revision number on this PR to 3. Also, I can't say for certain, but my guess is that the maintainers would prefer an `INSTALL.msg` file as opposed to moving things around without the user's knowledge in an `INSTALL` script.

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

* Re: [PR PATCH] [Updated] dnscrypt-proxy: put config in subdirectory of etc/.
  2021-12-13 20:36 [PR PATCH] dnscrypt-proxy: put config in subdirectory of etc/ TinfoilSubmarine
  2022-01-02 18:47 ` cinerea0
@ 2022-01-13 18:22 ` TinfoilSubmarine
  2022-01-13 18:25 ` TinfoilSubmarine
  2 siblings, 0 replies; 4+ messages in thread
From: TinfoilSubmarine @ 2022-01-13 18:22 UTC (permalink / raw)
  To: ml

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

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

https://github.com/TinfoilSubmarine/void-packages dnscrypt
https://github.com/void-linux/void-packages/pull/34517

dnscrypt-proxy: put config in subdirectory of etc/.
this change prevents dnscrypt-proxy from polluting etc/ with lists of relays, resolvers, etc.

After enabling the service, I was seeing these files show up in etc/:
```
public-resolvers.md
public-resolvers.md.minisig
relays.md
relays.md.minisig
```

Not sure how it should notify that the config location has moved. Should there be an `INSTALL.msg`, or should the config be moved in post in an `INSTALL`?

<!-- Uncomment relevant sections and delete options which are not applicable -->

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

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

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


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

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

From b59b24704487ec967b56fc6582d3966d626ed830 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
Date: Mon, 13 Dec 2021 15:22:51 -0500
Subject: [PATCH] dnscrypt-proxy: put config in subdirectory of etc/.

this change prevents dnscrypt-proxy from polluting etc/ with lists of
relays, resolvers, etc.
---
 srcpkgs/dnscrypt-proxy/INSTALL.msg              | 3 +++
 srcpkgs/dnscrypt-proxy/files/dnscrypt-proxy/run | 2 +-
 srcpkgs/dnscrypt-proxy/template                 | 6 +++---
 3 files changed, 7 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/dnscrypt-proxy/INSTALL.msg

diff --git a/srcpkgs/dnscrypt-proxy/INSTALL.msg b/srcpkgs/dnscrypt-proxy/INSTALL.msg
new file mode 100644
index 000000000000..8f58dfe306ce
--- /dev/null
+++ b/srcpkgs/dnscrypt-proxy/INSTALL.msg
@@ -0,0 +1,3 @@
+The dnscrypt-proxy service now installs and looks for the config file in
+/etc/dnscrypt-proxy/dnscrypt-proxy.toml. Any previous configuration will
+need to be moved into this directory manually.
diff --git a/srcpkgs/dnscrypt-proxy/files/dnscrypt-proxy/run b/srcpkgs/dnscrypt-proxy/files/dnscrypt-proxy/run
index 6e240fb488e2..3f0cd6172435 100755
--- a/srcpkgs/dnscrypt-proxy/files/dnscrypt-proxy/run
+++ b/srcpkgs/dnscrypt-proxy/files/dnscrypt-proxy/run
@@ -1,3 +1,3 @@
 #!/bin/sh
 exec 2>&1
-exec dnscrypt-proxy -config /etc/dnscrypt-proxy.toml
+exec dnscrypt-proxy -config /etc/dnscrypt-proxy/dnscrypt-proxy.toml
diff --git a/srcpkgs/dnscrypt-proxy/template b/srcpkgs/dnscrypt-proxy/template
index 0fdaa9769b3a..1e97041154c6 100644
--- a/srcpkgs/dnscrypt-proxy/template
+++ b/srcpkgs/dnscrypt-proxy/template
@@ -1,7 +1,7 @@
 # Template file for 'dnscrypt-proxy'
 pkgname=dnscrypt-proxy
 version=2.1.1
-revision=2
+revision=3
 build_style=go
 go_import_path=github.com/dnscrypt/dnscrypt-proxy
 go_package="${go_import_path}/dnscrypt-proxy"
@@ -12,12 +12,12 @@ homepage="https://github.com/DNSCrypt/dnscrypt-proxy"
 changelog="https://raw.githubusercontent.com/DNSCrypt/dnscrypt-proxy/master/ChangeLog"
 distfiles="https://github.com/DNSCrypt/dnscrypt-proxy/archive/${version}.tar.gz"
 checksum=cc4a2f274ce48c3731ff981e940e6475d912fb356a80481e91725e81d67bde14
-conf_files="/etc/dnscrypt-proxy.toml"
+conf_files="/etc/dnscrypt-proxy/dnscrypt-proxy.toml"
 system_accounts="dnscrypt_proxy"
 make_dirs="/var/log/dnscrypt-proxy 0750 dnscrypt_proxy dnscrypt_proxy"
 
 post_install() {
-	vconf dnscrypt-proxy/example-dnscrypt-proxy.toml dnscrypt-proxy.toml
+	vinstall dnscrypt-proxy/example-dnscrypt-proxy.toml 644 /etc/dnscrypt-proxy dnscrypt-proxy.toml
 	vlicense LICENSE
 	vsv dnscrypt-proxy
 	for example in dnscrypt-proxy/example*txt; do

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

* Re: dnscrypt-proxy: put config in subdirectory of etc/.
  2021-12-13 20:36 [PR PATCH] dnscrypt-proxy: put config in subdirectory of etc/ TinfoilSubmarine
  2022-01-02 18:47 ` cinerea0
  2022-01-13 18:22 ` [PR PATCH] [Updated] " TinfoilSubmarine
@ 2022-01-13 18:25 ` TinfoilSubmarine
  2 siblings, 0 replies; 4+ messages in thread
From: TinfoilSubmarine @ 2022-01-13 18:25 UTC (permalink / raw)
  To: ml

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

New comment by TinfoilSubmarine on void-packages repository

https://github.com/void-linux/void-packages/pull/34517#issuecomment-1012396087

Comment:
Added INSTALL.msg notifying the user of the change and bumped revision up.

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

end of thread, other threads:[~2022-01-13 18:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13 20:36 [PR PATCH] dnscrypt-proxy: put config in subdirectory of etc/ TinfoilSubmarine
2022-01-02 18:47 ` cinerea0
2022-01-13 18:22 ` [PR PATCH] [Updated] " TinfoilSubmarine
2022-01-13 18:25 ` TinfoilSubmarine

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