-
-
Notifications
You must be signed in to change notification settings - Fork 13.2k
knot-resolver6 6.0.17 (new formula) #257735
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
base: main
Are you sure you want to change the base?
Conversation
| assert_path_exists var/"knot-resolver" | ||
| assert_path_exists var/"cache/knot-resolver" | ||
| system bin/"kresctl", "--version" | ||
| system bin/"knot-resolver", "--version" |
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 know the current formula uses this test but I'd prefer to add more. See Formula Cookbook:
We want tests that don’t require any user input and test the basic functionality of the application. For example
foo build-foo input.foois a good test and (despite their widespread use)foo --versionandfoo --helpare bad tests. However, a bad test is better than no test at all.
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.
Unfortunately, I need a running service to properly test it, but maybe I'll think of something else.
| (bin/"knot-resolver").unlink if (bin/"knot-resolver").exist? | ||
| (bin/"knot-resolver").write_env_script libexec/"bin/knot-resolver", | ||
| PATH: "#{libexec}/bin:$PATH" | ||
|
|
||
| (bin/"kresctl").unlink if (bin/"kresctl").exist? | ||
| (bin/"kresctl").write_env_script libexec/"bin/kresctl", | ||
| ARGS: "--socket #{var}/knot-resolver/kres-api.sock" |
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.
| (bin/"knot-resolver").unlink if (bin/"knot-resolver").exist? | |
| (bin/"knot-resolver").write_env_script libexec/"bin/knot-resolver", | |
| PATH: "#{libexec}/bin:$PATH" | |
| (bin/"kresctl").unlink if (bin/"kresctl").exist? | |
| (bin/"kresctl").write_env_script libexec/"bin/kresctl", | |
| ARGS: "--socket #{var}/knot-resolver/kres-api.sock" | |
| (bin/"knot-resolver").write_env_script libexec/"bin/knot-resolver", | |
| PATH: "#{libexec}/bin:$PATH" | |
| (bin/"kresctl").write_env_script libexec/"bin/kresctl", | |
| ARGS: "--socket #{var}/knot-resolver/kres-api.sock" |
Or remove if modifiers
Formula/k/knot-resolver6.rb
Outdated
| <<~EOS | ||
| workers: 1 | ||
| rundir: #{var}/knot-resolver | ||
| network: | ||
| listen: | ||
| - interface: | ||
| - 127.0.0.1@53 | ||
| - ::1@53 | ||
| cache: | ||
| storage: #{var}/cache/knot-resolver | ||
| management: | ||
| unix-socket: #{var}/knot-resolver/kres-api.sock | ||
| EOS |
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.
| <<~EOS | |
| workers: 1 | |
| rundir: #{var}/knot-resolver | |
| network: | |
| listen: | |
| - interface: | |
| - 127.0.0.1@53 | |
| - ::1@53 | |
| cache: | |
| storage: #{var}/cache/knot-resolver | |
| management: | |
| unix-socket: #{var}/knot-resolver/kres-api.sock | |
| EOS | |
| <<~YAML | |
| workers: 1 | |
| rundir: #{var}/knot-resolver | |
| network: | |
| listen: | |
| - interface: | |
| - 127.0.0.1@53 | |
| - ::1@53 | |
| cache: | |
| storage: #{var}/cache/knot-resolver | |
| management: | |
| unix-socket: #{var}/knot-resolver/kres-api.sock | |
| YAML |
And it would be nicer to either move config_yaml definition before def install block or just have
file.write <<~YAML
workers: 1
rundir: #{var}/knot-resolver
network:
listen:
- interface:
- 127.0.0.1@53
- ::1@53
cache:
storage: #{var}/cache/knot-resolver
management:
unix-socket: #{var}/knot-resolver/kres-api.sock
YAMLwhere it is needed
| depends_on "lmdb" | ||
| depends_on "luajit" | ||
| depends_on "protobuf-c" | ||
| depends_on "[email protected]" |
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.
why not the latest python?
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 latest python version (3.14) is not yet supported in 6.0.17 release. Support was added just today.
| (var/"knot-resolver").mkpath | ||
| (var/"cache/knot-resolver").mkpath |
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.
Move it to def install block
Formula/k/knot-resolver6.rb
Outdated
| (buildpath/"config.yaml").write(config_yaml) | ||
| (etc/"knot-resolver").install "config.yaml" |
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.
| (buildpath/"config.yaml").write(config_yaml) | |
| (etc/"knot-resolver").install "config.yaml" | |
| (etc/"knot-resolver/config.yaml").write(config_yaml) |
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'm getting an error with this suggestion:
Error: An exception occurred within a child process:
RuntimeError: Will not overwrite /opt/homebrew/Cellar/knot-resolver6/6.0.17/bin/knot-resolver
|
Please use head install, I don't think non-stable version is suitable for a versioned formula. |
|
Would it be better to rename existing formula to legacy format |
|
If v6 is stable, yes that is better but it doesn't. |
Version 6 is basically stable and runs in several large production deployments. Unfortunately, we haven't officially released it yet. Version 6.1 will be released soon, which should be officially stable/latest whatever.
This is something we want in the future, here and on other Linux distributions. For now, we want to keep Perhaps, if you think it would be better, we can wait for the release of version 6.1 with this formula. |
aafe8fb to
5589665
Compare
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where<formula>is the name of the formula you're submitting?brew test <formula>, where<formula>is the name of the formula you're submitting?brew audit --strict <formula>(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it passbrew audit --new <formula>?Knot Resolver version 6 (knot-resolver6) is an actively developed version of the resolver, unlike the older version 5 (knot-resolver), where only security updates are maintained.