Skip to content
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

GlobalProtect-OpenConnect: init at 1.2.6 #106465

Merged
merged 5 commits into from Jun 5, 2021

Conversation

jerith666
Copy link
Contributor

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@jerith666
Copy link
Contributor Author

cc openconnect maintainers @pradeepchhetri @tricktron

@jerith666
Copy link
Contributor Author

Thanks for the thorough review, @SuperSandro2000. I did some fetching and rebasing so I could be clear on which of your suggestions were semantic versus only formatting. I've included the semantic suggestions and the two fixes you suggested (OS = "Darwin" and passing the darwin PCSC framework individually) in this PR.

With regard to the formatting changes, I've put them on a separate branch: jerith666/nixpkgs@globalprotect-vpn...jerith666:globalprotect-vpn-formatting. Is there a style guide you're following that led you to these changes, which I could keep in mind for future work? Or are they more of your personal preference?

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Dec 11, 2020

Is there a style guide you're following that led you to these changes, which I could keep in mind for future work? Or are they more of your personal preference?

Not really. Normally things are defined in the order they are used at build time.

Also please fix the eval issue.

@jerith666 jerith666 force-pushed the globalprotect-vpn branch 2 times, most recently from 01d565d to a2171d5 Compare December 12, 2020 16:15
@jerith666
Copy link
Contributor Author

Whoops, missed the eval issue! (In fact there was a second one lurking behind the first ...) 🤦 Fixed now.

I've left the formatting changes on their own branch. IMO the code reads more clearly without them, but it's obviously a matter of opinion and I'm totally fine if you'd like to merge them (or probably better, squash-merge them). :)

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please squash the globalprotect-openconnect related commits into one init commit?


wrapProgram $out/bin/vpnc-script \
--set OS ${os} \
--prefix PATH : "${stdenv.lib.makeBinPath [ nettools gawk openresolv coreutils gnugrep ]}";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--prefix PATH : "${stdenv.lib.makeBinPath [ nettools gawk openresolv coreutils gnugrep ]}";
--prefix PATH : "${stdenv.lib.makeBinPath [ nettools gawk openresolv coreutils gnugrep]}";

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this and all other formatting suggestions are in the latest force-push.

@SuperSandro2000
Copy link
Member

@jerith666 I am not sure why this causes so many rebuilds but please target staging.

@SuperSandro2000
Copy link
Member

@ofborg eval

@jerith666
Copy link
Contributor Author

I was also surprised that this ended up rebuilding a bunch of stuff for me locally. One that I remember being surprised about is gnucash. So I used nix-store -q --graph to figure it out:

$ nix-store -q --graph $(nix-store -qd $(type -p gnucash)) | grep 'openconnect.*->'
"/nix/store/2p3w750xzn398kgl3hy0almaxf6i1w5f-openconnect-8.10.drv" -> "/nix/store/4hp0c8rhn57w7ylr8i61nasgfky3h75b-fix-paths.patch.drv" [color = "magenta"];
"/nix/store/bpgwzg2lb1id41v3kjlj0rid4zw86plb-openconnect-8.10.tar.gz.drv" -> "/nix/store/2p3w750xzn398kgl3hy0almaxf6i1w5f-openconnect-8.10.drv" [color = "green"];

$ nix-store -q --graph $(nix-store -qd $(type -p gnucash)) | grep '4hp0c.*->'
"/nix/store/4hp0c8rhn57w7ylr8i61nasgfky3h75b-fix-paths.patch.drv" -> "/nix/store/prv3bchmk48rvhfflznd496x9k2lbjkm-network-manager-1.26.0.drv" [color = "burlywood"];

$ nix-store -q --graph $(nix-store -qd $(type -p gnucash)) | grep 'prv3b.*->'
"/nix/store/prv3bchmk48rvhfflznd496x9k2lbjkm-network-manager-1.26.0.drv" -> "/nix/store/swgcbiq4rd9n69k6v4f17w0yv73mnkpp-libproxy-0.4.15.drv" [color = "blue"];

$ nix-store -q --graph $(nix-store -qd $(type -p gnucash)) | grep 'swgcb.*->'
"/nix/store/swgcbiq4rd9n69k6v4f17w0yv73mnkpp-libproxy-0.4.15.drv" -> "/nix/store/adc29252yixs60q7c5mjx5qv5sihy290-glib-networking-2.66.0.drv" [color = "red"];

$ nix-store -q --graph $(nix-store -qd $(type -p gnucash)) | grep 'adc292.*->'
"/nix/store/adc29252yixs60q7c5mjx5qv5sihy290-glib-networking-2.66.0.drv" -> "/nix/store/12q49n28niihvdcsc37z11llwp97cds7-geoclue-2.5.6.drv" [color = "burlywood"];

$ nix-store -q --graph $(nix-store -qd $(type -p gnucash)) | grep '12q49n.*->'
"/nix/store/12q49n28niihvdcsc37z11llwp97cds7-geoclue-2.5.6.drv" -> "/nix/store/7rnb1lz0aybng93lb6mpvsw7vbfhf2df-webkitgtk-2.30.1.drv" [color = "red"];

$ nix-store -q --graph $(nix-store -qd $(type -p gnucash)) | grep '7rnb1l.*->'
"/nix/store/7rnb1lz0aybng93lb6mpvsw7vbfhf2df-webkitgtk-2.30.1.drv" -> "/nix/store/3b1p0n2vi651q1nf510va24j5cqgla3q-gnucash-4.2.drv" [color = "red"];

Nothing in that chain seems obviously wrong to me, so I'll re-target to staging.

@jerith666 jerith666 changed the base branch from master to staging December 21, 2020 21:42
Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix the merge conflict

pkgs/tools/networking/openconnect/default.nix Outdated Show resolved Hide resolved
@jerith666
Copy link
Contributor Author

Just pinging this, I think all the requested changes have been made and it's okay to merge?

Copy link
Member

@tricktron tricktron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jerith666 Works on my Mac with Big Sur 11.4 and looks good to me.

@SuperSandro2000 Ready to merge?

.version Outdated Show resolved Hide resolved
Copy link
Member

@tricktron tricktron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jerith666 approved.
@SuperSandro2000 Next try: Ready to merge😃?

@veprbl
Copy link
Member

veprbl commented Jun 2, 2021

Merge remote-tracking branch 'origin/nixos-unstable' into globalprotect-vpn

We don't really allow merging PRs that contain merge commits.

@veprbl
Copy link
Member

veprbl commented Jun 2, 2021

Please rebase.

@tricktron
Copy link
Member

@veprbl Good spotting, thanks.

@jerith666 Ready for another (hopefully the last) round😄? Could you remove the merge commit and rebase it onto master?

@adisbladis adisbladis removed their request for review June 2, 2021 16:22
@jerith666
Copy link
Contributor Author

Rebased without the merge commit. The only outstanding issue is the LANG in the systemd service definition, I believe.

@ofborg ofborg bot requested a review from tricktron June 2, 2021 22:56
@sternenseemann
Copy link
Member

Rebased without the merge commit. The only outstanding issue is the LANG in the systemd service definition, I believe.

Have you tested the service without it?

jerith666 and others added 2 commits June 2, 2021 19:22
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

Co-authored-by: sterni <sternenseemann@systemli.org>
adds resolvectl support; as suggested by @liff
@jerith666
Copy link
Contributor Author

Tested without the LANG setting, it works; new version force-pushed just now. Maybe it's finally ready? 🤞 😄

Copy link
Member

@tricktron tricktron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still working on my Mac.

@SuperSandro2000 Next try: Ready to merge?

@SuperSandro2000 SuperSandro2000 merged commit ef45f53 into NixOS:staging Jun 5, 2021
@tricktron
Copy link
Member

@jerith666 Congrats, you did it😃!

@jerith666
Copy link
Contributor Author

Awesome, thanks everyone! Hopefully my machine won't be too bored now that all these rebuilds will be cached ... ;-)

@lopsided98
Copy link
Contributor

lopsided98 commented Jun 28, 2021

The NixOS module is missing mkIf cfg.enable, so it is always enabled.

@jerith666
Copy link
Contributor Author

Gack -- whoops, good catch! Fix is in #128473.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants