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

linux-wifi-hotspot: remove TKIP usage in create_ap #251191

Closed
wants to merge 2 commits into from

Conversation

ARizzo35
Copy link

Description of changes

Since TKIP is now deprecated in hostapd, the create_ap script in linux-wifi-hotspot needs to be updated to not use it.

Things done

Changes were built and tested on aarch64-linux.

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@ARizzo35
Copy link
Author

@onny

Copy link
Contributor

@Majiir Majiir left a comment

Choose a reason for hiding this comment

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

What breaks when this patch isn't applied?

@@ -61,6 +61,13 @@ stdenv.mkDerivation rec {
--replace "/usr" "$out"
'';

# Since TKIP is deprecated in hostapd, we need to modify create_ap to not use it
# See: https://github.com/NixOS/nixpkgs/commit/4bec3f204362fa22a0740c8a572ffef3b322596d
preBuild = ''
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Why preBuild and not postPatch?

@oddlama
Copy link
Contributor

oddlama commented Aug 25, 2023

What breaks when this patch isn't applied?

Most likely hostapd will not start. Since this is generally an issue with linux-wifi-hotspot I've opened lakinduakash/linux-wifi-hotspot#342 to track this upstream.

@ARizzo35 can you update this to use patches = [(fetchpatch {...})] to pull this in?

@ARizzo35
Copy link
Author

What breaks when this patch isn't applied?

Most likely hostapd will not start. Since this is generally an issue with linux-wifi-hotspot I've opened lakinduakash/linux-wifi-hotspot#342 to track this upstream.

@ARizzo35 can you update this to use patches = [(fetchpatch {...})] to pull this in?

Yes, hostapd fails to start stating invalid cipher name 'TKIP CCMP'. I'll update this to use the upstream patch.

@ARizzo35
Copy link
Author

       error: URL literals are disabled

       at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/ofborg-evaluator-1/pkgs/os-specific/linux/linux-wifi-hotspot/default.nix:58:13:

           57|     (fetchpatch {
           58|       url = https://github.com/lakinduakash/linux-wifi-hotspot/commit/32fdb2bf2d3a34847270598682dec57cc3caf424.patch;
             |             ^
           59|       hash = "sha256-HUuJLOk7luQQ6xU5XKfGlV+YtLfYnFx2P6ZJF/1M7VE=";

@oddlama it looks like URL literals are disabled...should I add the patch as a file instead?

@Majiir
Copy link
Contributor

Majiir commented Aug 25, 2023

@ARizzo35 Wrap the URL in double quotes so that it's a string literal rather than a URL literal.

@ARizzo35 ARizzo35 force-pushed the fix/linux-wifi-hotspot branch from 8183fbb to 8df6374 Compare August 25, 2023 17:22
Copy link
Contributor

@oddlama oddlama left a comment

Choose a reason for hiding this comment

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

LGTM

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Sep 6, 2023
@pbsds
Copy link
Member

pbsds commented Dec 2, 2023

Result of nixpkgs-review pr 251191 run on x86_64-linux 1

1 package failed to build:
  • linux-wifi-hotspot
linux-wifi-hotspot> building '/nix/store/p05aslisk861xkks609wwi8xmp8z2i7d-linux-wifi-hotspot-4.6.0.drv'
linux-wifi-hotspot> unpacking sources
linux-wifi-hotspot> unpacking source archive /nix/store/7frg7g8qxim5qckdzj8z8d7dadgrh76i-source
linux-wifi-hotspot> source root is source
linux-wifi-hotspot> patching sources
linux-wifi-hotspot> applying patch /nix/store/niz8il406j5nvrxfl38ijxivrl7zlxxc-32fdb2bf2d3a34847270598682dec57cc3caf424.patch
linux-wifi-hotspot> patching file src/scripts/create_ap
linux-wifi-hotspot> Reversed (or previously applied) patch detected!  Assume -R? [n] 
linux-wifi-hotspot> Apply anyway? [n] 
linux-wifi-hotspot> Skipping patch.
linux-wifi-hotspot> 1 out of 1 hunk ignored -- saving rejects to file src/scripts/create_ap.rej

@onny
Copy link
Contributor

onny commented Dec 2, 2023

this might be already fixed upstream?

@pbsds
Copy link
Member

pbsds commented Dec 3, 2023

Seems the patch was tagged in 4.6.0 which got merged in #266989

@pbsds pbsds closed this Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 10.rebuild-linux: 1 12.approvals: 1 This PR was reviewed and approved by one reputable person 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants