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

hostapd-2.6: libressl patches. #23067

Merged
merged 1 commit into from
Feb 25, 2017
Merged

hostapd-2.6: libressl patches. #23067

merged 1 commit into from
Feb 25, 2017

Conversation

mrobbetts
Copy link
Contributor

@mrobbetts mrobbetts commented Feb 22, 2017

Motivation for this change

Since updating to v2.6, hostapd has not been willing to build against libressl.

I have cherry-picked the libressl support commits from the upstream hostapd repo:
http://w1.fi/cgit/hostap/commit/?id=0d42179e1246f996d334c8bd18deca469fdb1add
http://w1.fi/cgit/hostap/commit/?id=df426738fb212d62b132d9bb447f0128194e00ab
http://w1.fi/cgit/hostap/commit/?id=b70d508c50e8e2d2b8fb96ae44ae10f84cf0c1ae

and added them to the patches list. This allows the build to complete, and the resulting build seems to work perfectly.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@mrobbetts, thanks for your PR! By analyzing the history of the files in this pull request, we identified @wkennington, @globin and @Krofek to be potential reviewers.

@fpletz
Copy link
Member

fpletz commented Feb 22, 2017

At least one of the hashes seems to be wrong:

output path ‘/nix/store/ibdifh4g0nwp1g4cnjal9qch613dvngd-?id=0d42179e1246f996d334c8bd18deca469fdb1add’ has sha256 hash ‘1d7ki0hmmxpj4qnc0svz0m6rx8s5yj39d1khcx8hjw8hvhqmhz3w’ when ‘0w5n3ypwavq5zlyfxpcyvbaf96g59xkwbw9xwpjyzb7h5j264615’ was expected

@mrobbetts
Copy link
Contributor Author

I... really? It builds fine on my machine :/

I just re-did a quick nix-prefetch-url on the three patch paths and get the same sha256 results as in the PR. Is there any mechanism (geography?) by which we could get different hashes?

The commit pages have links to a direct patch page (which is what I'm linking to now), but also to .zip and .tar versions. Might those be better?

@fpletz
Copy link
Member

fpletz commented Feb 22, 2017

Ah, fetchpach does some normalization of the patches before hashing the content. It is intended for urls where patches can change slightly. If you provide the hash you got from nix-prefetch-url, the file has already been put into the nix store and due to the fact that fetchpatch (and also fetchurl) is a fixed output derivation, the content for the hash in the nix store is used instead of fetching and normalizing the patch. It fails on my machine because I didn't run nix-prefetch-url before.

Two solutions:

  1. Change the hash slightly and rebuild to get an error with the correct hash
  2. Use fetchurl instead of fetchpatch (preferred, hashes will stay the same and the patch shouldn't change because it comes from git)

@mrobbetts
Copy link
Contributor Author

Oh! I had no idea. There are a lot of different fetchers :)

I've pushed the change to use fetchurl (and by adding a temporary a = "blah"; line to the package, verified that it still builds for me).

@mrobbetts
Copy link
Contributor Author

(just squashed the commits together)

@fpletz
Copy link
Member

fpletz commented Feb 25, 2017

Tested build with openssl & libressl. Thanks! 🍻

@fpletz fpletz merged commit b941809 into NixOS:master Feb 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants