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

yara: 3.10.0 -> 3.11.0, fix build #73164

Merged
merged 1 commit into from Nov 12, 2019
Merged

yara: 3.10.0 -> 3.11.0, fix build #73164

merged 1 commit into from Nov 12, 2019

Conversation

judaew
Copy link
Contributor

@judaew judaew commented Nov 10, 2019

Motivation for this change

Update YARA 3.10.0 -> 3.11.0

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 nix-review --run "nix-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.
Notify maintainers

cc @

@judaew
Copy link
Contributor Author

judaew commented Nov 10, 2019

We have build problems again:

make[1]: *** No rule to make target 'libyara/.libs/libyara.a', needed by 'yara'.  Stop.
make[1]: Leaving directory '/build/source'
make: *** [Makefile:1062: all-recursive] Error 1

I could use the patch that was used before, but I don’t think this is the best idea based on this issue: out-of-bounds read, write in yr_execute_code.

What are some ideas for update this package?

@judaew
Copy link
Contributor Author

judaew commented Nov 11, 2019

@worldofpeace

@worldofpeace
Copy link
Contributor

We have build problems again:

make[1]: *** No rule to make target 'libyara/.libs/libyara.a', needed by 'yara'.  Stop.
make[1]: Leaving directory '/build/source'
make: *** [Makefile:1062: all-recursive] Error 1

I could use the patch that was used before, but I don’t think this is the best idea based on this issue: out-of-bounds read, write in yr_execute_code.

What are some ideas for update this package?

You could reuse the patch, but I think this would be simpler

and hopefully upstream can fix VirusTotal/yara#1036.

@judaew
Copy link
Contributor Author

judaew commented Nov 12, 2019

Thank you so much!

@worldofpeace
Copy link
Contributor

worldofpeace commented Nov 12, 2019

Thank you so much!

Ooh, it looks like some magic happened and upstream acted pretty quick

Perhaps you could try the above patch and see if it makes worldofpeace@7d0dd7b unneeded.

# TODO: This patch should not be necessary in the next release
patches = [
(substituteAll {
src = ./fix-issue-1036.patch;
Copy link
Contributor

Choose a reason for hiding this comment

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

Github has a pretty cool feature, you can get a generated patch from a url

(fetchpatch {
  url = "https://github.com/VirusTotal/yara/commit/04df811fa61fa54390b274bfcf56d7403c184404.patch";
  sha256 = stdenv.lib.fakeSha256; # replace
})

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wow! Thanks, you surprised me!

@judaew
Copy link
Contributor Author

judaew commented Nov 12, 2019

I was a little wrong with the hash for the patch. All is well now.

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

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

LGTM, builds. Thanks 🌟

@worldofpeace worldofpeace changed the title YARA 3.10.0 -> 3.11.0 yara: 3.10.0 -> 3.11.0, fix build Nov 12, 2019
@worldofpeace worldofpeace merged commit 5d2dc6f into NixOS:master Nov 12, 2019
@judaew judaew deleted the yara-update branch November 12, 2019 21:15
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

2 participants