New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New package: nextdns-1.6.4 #20022
New package: nextdns-1.6.4 #20022
Conversation
This looks good. Can any of the maintainers review this? |
srcpkgs/nextdns/files/nextdns_conf
Outdated
|
||
# NextDNS custom configuration id | ||
# change id with your NextDNS id | ||
config id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this file be extracted from the download tarball?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
this file doesn't exist in tarball.
Nextdns doesn't work with Void out of the box because it doesn't support runit system, yet. Nextdns has commands:
Usage: nextdns <command> [arguments]
The commands are:
install install service on the system
uninstall uninstall service from the system
start start installed service
stop stop installed service
restart restart installed service
status return service status
log show service logs
run run the daemon
config manage configuration
activate setup the system to use NextDNS as a resolver
deactivate restore the resolver configuration
version show current version
That interact directly with systemd
or upstart
or sysv
, etc, but not runit
But it's easy to configure it to work with Void, user only have to configure config file manually and run the only NextDNS commands that work: nextdns run
so you can start it with something similar:
sudo nextdns run \
-config <your config id> ...
In order to use it with Void as system service, you have to put your configuration in
/etc/nextdns/nextdns_conf file
and symlink /etc/sv/nextdnsd
to /var/service
To setup the system to use NextDNS as a dns resolver, un-comment the last line in /etc/resolvconf.conf
to name_servers=127.0.0.1
and restart resolvconf with resolvconf -u
now NextDNS should be used as dns resolver
srcpkgs/nextdns/files/nextdnsd/run
Outdated
@@ -0,0 +1,2 @@ | |||
#!/bin/sh | |||
exec /usr/bin/nextdns run -config-file /etc/nextdns/nextdns_conf 2>&1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exec nextdns run -config-file /etc/nextdns/nextdns_conf 2>&1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, done
srcpkgs/nextdns/template
Outdated
homepage="https://nextdns.io/" | ||
distfiles="https://github.com/${pkgname}/${pkgname}/archive/v${version}.tar.gz" | ||
checksum=7a7c0829ca52a711f6fc813e6d913577670c95ddd8b3ab5d17da2b69440a3edc | ||
conf_files="/etc/nextdns/nextdns_conf" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason this is not .conf? Does upstream prefer _conf ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. The upstream accepts arbitrary file names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The upstream config file is created with the nextdns
commands and stored internally somewhere, so I don't know its name exactly
Other than the small issues above, this seems reasonable |
srcpkgs/nextdns/template
Outdated
@@ -0,0 +1,19 @@ | |||
# Template file for 'nextdns' | |||
pkgname=nextdns | |||
version=1.4.35 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version=1.4.35 | |
version=1.6.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
srcpkgs/nextdns/template
Outdated
homepage="https://nextdns.io/" | ||
distfiles="https://github.com/${pkgname}/${pkgname}/archive/v${version}.tar.gz" | ||
checksum=7a7c0829ca52a711f6fc813e6d913577670c95ddd8b3ab5d17da2b69440a3edc | ||
conf_files="/etc/nextdns/nextdns_conf" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
conf_files="/etc/nextdns/nextdns_conf" | |
conf_files="/etc/nextdns/nextdns.conf" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
srcpkgs/nextdns/files/nextdnsd/run
Outdated
@@ -0,0 +1,2 @@ | |||
#!/bin/sh | |||
exec /usr/bin/nextdns run -config-file /etc/nextdns/nextdns_conf 2>&1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exec /usr/bin/nextdns run -config-file /etc/nextdns/nextdns_conf 2>&1 | |
exec nextdns run -config-file /etc/nextdns/nextdns_conf 2>&1 |
Thanks @gspe! |
srcpkgs/nextdns/files/nextdns.conf
Outdated
|
||
# NextDNS custom configuration id | ||
# change id with your NextDNS id | ||
config id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't like having this config file in our tree. Is there any way around this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CC: @rs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would be your recommendation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Vaelatern there are two solutions:
- remove this config file from package and tell users to create one them self
- add runit support in nextdns, this would be quite easy task since runit is very simple init system to deal with. But some one have to do this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If upstream does not ship with a configuration file, neither do we.
It's ok for the runit script to not work out of the box, and require further reading to get it working. People are expected to be able to read their runit scripts and upstream documentation and make things work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as of latest commit is not removed from conf_files or otherwise removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not done
https://files.catbox.moe/m1irr6.png
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without an example of runit and how to write a config file that runit use this software doesn't work!
So why do you want to include a non working software in the void repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simply put because it's not helpful. If you want to know more, read upstream's docs on getting started. Or read the runit script and figure out what you need. Problem solved.
Example packages that use this model:
- hooktftp
- tgt
- autox
- nomad
- consul
- seaweedfs
- netauth
are all packages we have where you really should go read upstream's documentation on how to get started. This is a good thing because it means there is less effort necessary to maintain these packages. Lower effort per package means more can be done with our lives, and that's a good thing.
441b2b8
to
b70eb11
Compare
|
||
post_install() { | ||
vsv nextdnsd | ||
vdoc ${FILESDIR}/nextdns.conf.example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vdoc
or vsconf
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or total removal. I like total removal.
@@ -0,0 +1,2 @@ | |||
#!/bin/sh | |||
exec nextdns run -config-file /etc/nextdns/nextdns.conf 2>&1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can add a comment above this line, like # See https://example.com/doc for example configuration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There isn't a clear documentation about config file, the only helpful link is this https://github.com/nextdns/nextdns/wiki/Configuration-File-Format but it doesn't explain that you have to use your config id etc...
So I think that the best thing to do is to provide an example config-file in doc dir, so users are free to use it or do more research them self.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gspe: The best thing to do in this case is to ask upstream to improve their documentation, in the form of a well-commented example config file[1]. Upstream knows the software best, and can make sure such a file is properly maintained and contains the correct information. We shouldn't be trying to take on that task.
[1] Cf. e.g. the extensively-commented sample wpa_supplicant.conf
file provided by upstream.
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it. |
Close #19905