-
-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
openvpn3: v20 -> v22_dev #326623
base: master
Are you sure you want to change the base?
openvpn3: v20 -> v22_dev #326623
Conversation
66f102a
to
ac170ae
Compare
f5431df
to
cf87dd1
Compare
cf87dd1
to
7ad804c
Compare
a184703
to
adbbffd
Compare
@SCOTT-HAMILTON, @KFearsoff, hi there! Since modules allow |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/4300 |
adbbffd
to
8b96e12
Compare
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.
Thank you for your contribution! I'm truly grateful for your effort, since my schedule and burnout made updating the package hard, and having it not been updated was a lot of psychological pressure. This is also why it took me a while to review, but I digress; excellent work here!
And the technical part is excellent. The Nixpkgs APIs are very well-researched, and the decisions made are rock solid. I couldn't find anything I disagree with, just a few small questions.
Happy to say: LGTM!
pkgs/by-name/op/openvpn3/patches/0001-customizable-asio-path.patch
Outdated
Show resolved
Hide resolved
@KFearsoff, thanks a lot for your review and the nice words! Hope you are fine and will defeat the burnout! It was thanks to @CertainLach who led me through accurately packaging the app and updating the module (it was an external chat with him), so a lot of credits go to him. The best of luck to you! |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-already-reviewed/2617/1846 |
8b96e12
to
641d1d9
Compare
@KFearsoff, could you please re-approve? -echo '#define PACKAGE_GUIVERSION "${builtins.replaceStrings ["_"] [":"] version}_{unknown}__s"' >> ./src/build-version.h
+echo '#define PACKAGE_GUIVERSION "${builtins.replaceStrings ["_"] [":"] version}_unknown__s"' >> ./src/build-version.h |
Thanks! |
# NOTE: Can be replaced with install_emptydir() when Meson 0.60 or newer | ||
# is available on all supported distros | ||
-meson.add_install_script('sh','-c', 'mkdir -p $DESTDIR@0@'.format(openvpn3_statedir / 'configs')) | ||
+# meson.add_install_script('sh','-c', 'mkdir -p $DESTDIR@0@'.format(openvpn3_statedir / 'configs')) |
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.
please delete lines in patches instead of commenting them
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.
All done
pkgs/by-name/op/openvpn3/package.nix
Outdated
maintainers = [ | ||
lib.maintainers.shamilton | ||
lib.maintainers.kfears | ||
lib.maintainers.progrm_jarvis | ||
]; |
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.
maintainers = [ | |
lib.maintainers.shamilton | |
lib.maintainers.kfears | |
lib.maintainers.progrm_jarvis | |
]; | |
maintainers = with lib.maintainers; [ | |
shamilton | |
kfears | |
progrm_jarvis | |
]; |
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.
Thanks, done
pkgs/by-name/op/openvpn3/package.nix
Outdated
glib.dev | ||
jsoncpp.dev | ||
libcap_ng.dev | ||
libnl.dev | ||
libuuid.dev | ||
lz4.dev | ||
openssl.dev |
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 dev output should be choosen automatically
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.
Fair enough, done
pkgs/by-name/op/openvpn3/package.nix
Outdated
python3.pkgs.jinja2 | ||
python3.pkgs.dbus-python | ||
wrapGAppsHook3 | ||
gobject-introspection.dev |
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.
gobject-introspection.dev | |
gobject-introspection |
this is likely wrong or in the wrong input
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.
Removed .dev
, yet it is consciously on nativeBuildInputs
pkgs/by-name/op/openvpn3/package.nix
Outdated
echo '#define PACKAGE_GUIVERSION "${builtins.replaceStrings ["_"] [":"] version}_unknown__s"' >> ./src/build-version.h | ||
echo '#define PACKAGE_NAME "openvpn3-linux"' >> ./src/build-version.h | ||
|
||
patchShebangs ** /*.py ** /*.sh \ |
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.
patchShebangs ** /*.py ** /*.sh \ | |
patchShebangs **/*.py **/*.sh \ |
do you mean 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.
This was part of the original openvpn3
(when it rested in pkgs/tools
) thus I have kept it as-is, but I will do a re-check.
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.
UPD: I've actualized the call to patchShebangs
, now only patches files which actually need it
pkgs/by-name/op/openvpn3/package.nix
Outdated
echo '#define OPENVPN_VERSION "3.git:unknown:unknown"' > ./src/build-version.h | ||
echo '#define PACKAGE_GUIVERSION "${builtins.replaceStrings ["_"] [":"] version}_unknown__s"' >> ./src/build-version.h | ||
echo '#define PACKAGE_NAME "openvpn3-linux"' >> ./src/build-version.h |
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.
echo '#define OPENVPN_VERSION "3.git:unknown:unknown"' > ./src/build-version.h | |
echo '#define PACKAGE_GUIVERSION "${builtins.replaceStrings ["_"] [":"] version}_unknown__s"' >> ./src/build-version.h | |
echo '#define PACKAGE_NAME "openvpn3-linux"' >> ./src/build-version.h | |
echo '#define OPENVPN_VERSION "3.git:unknown:unknown" | |
#define PACKAGE_GUIVERSION "${builtins.replaceStrings ["_"] [":"] version}_unknown__s" | |
#define PACKAGE_NAME "openvpn3-linux" | |
' > ./src/build-version.h |
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.
True, thanks!
description = | ||
"Options stored in {file}`/etc/openvpn3/log-service.json` configuration file"; |
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.
description = | |
"Options stored in {file}`/etc/openvpn3/log-service.json` configuration file"; | |
description = "Options stored in {file}`/etc/openvpn3/log-service.json` configuration file"; |
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.
This is (and the following) formatting is by nixfmt-rfc-style
which is specified by default.nix
so I am unsure if I should manually rollback the lines (given that it would move them back again). Correct me if I am wrong
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.
Let's follow the nixfmt-rfc-style
defaultText = | ||
literalExpression "config.services.resolved.enable"; |
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.
defaultText = | |
literalExpression "config.services.resolved.enable"; | |
defaultText = literalExpression "config.services.resolved.enable"; |
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.
(see note above about nixfmt-rfc-style
)
description = | ||
"Options stored in {file}`/etc/openvpn3/netcfg.json` configuration file"; |
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.
description = | |
"Options stored in {file}`/etc/openvpn3/netcfg.json` configuration file"; | |
description = "Options stored in {file}`/etc/openvpn3/netcfg.json` configuration file"; |
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.
(see note above about nixfmt-rfc-style
)
in { | ||
options.programs.openvpn3 = let | ||
inherit (lib) | ||
mkEnableOption mkPackageOption mkOption literalExpression max options | ||
lists; | ||
inherit (lib.types) bool submodule ints; | ||
in { |
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.
in { | |
options.programs.openvpn3 = let | |
inherit (lib) | |
mkEnableOption mkPackageOption mkOption literalExpression max options | |
lists; | |
inherit (lib.types) bool submodule ints; | |
in { | |
in { | |
options.programs.openvpn3 = { |
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.
(see note below about imports' scope)
let | ||
json = pkgs.formats.json { }; | ||
cfg = config.programs.openvpn3; |
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.
cfg = config.programs.openvpn3; | |
cfg = config.programs.openvpn3; | |
inherit (lib) mkEnableOption mkPackageOption mkOption literalExpression max options lists; | |
inherit (lib.types) bool submodule ints; |
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.
Given that all of this imports are specific to building module options, is it worth importing them for the whole module?
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 think using imports for the entire module is more readable, because you don't use nested let statements. It's also easier to understand - I mean, you don't usually scope the stdlib to module options, so choosing to do that raises some questions.
1591f71
to
2f3ccd9
Compare
@SuperSandro2000, thanks for the detailed review! I've fixed most of the reported issues with the exception of a few specific ones (referenced in the comments). As for the formatting, should I use |
2f3ccd9
to
a650770
Compare
a650770
to
a36182a
Compare
Co-authored-by: Yaroslav Bolyukin <iam@lach.pw>
a36182a
to
ed9d9eb
Compare
Description of changes
This updates
openvpn3
fromv20
tov22_dev
.Considering that
v20
andv21
currently don't work due to glib problems (see #235986 for details) it is worth jumping to_dev
version for now (worth noting that Aur already uses this version).This PR also adds the
gdbuspp
module which is aD-Bus
library developed by OpenVPN team now used byopenvpn3-linux
.Also, the corresponding NixOS module now generates the
openvpn3
configs in/etc
with the settings exposed via module's configuration.I've tested the changes on my setup and they seem to fix issues previously observed on
v20
.cc @dsommers as suggested by my colleague.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.