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

ursadb: init at v1.2.0 #83905

Merged
merged 1 commit into from Apr 14, 2020
Merged

ursadb: init at v1.2.0 #83905

merged 1 commit into from Apr 14, 2020

Conversation

msm-code
Copy link
Contributor

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux) (AFAIU it's the default on nixos)
  • 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" (n/a - no packages are dependent on this yet. Tried it, "No diff detected, stopping review..."?)
  • 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.

@Emantor
Copy link
Member

Emantor commented Apr 2, 2020

Throws an error when I try to run it:

nix-shell:~/.cache/nixpkgs-review/pr-83905/results/ursadb/bin]$ ./ursadb_new ~/tmp/mydb

[nix-shell:~/.cache/nixpkgs-review/pr-83905/results/ursadb/bin]$ ./ursadb ~/tmp/mydb 2048
terminate called after throwing an instance of 'zmq::error_t'
  what():  Invalid argument
Aborted (core dumped)

@msm-code
Copy link
Contributor Author

msm-code commented Apr 2, 2020

Hi,

thanks for input, If I knew anyone will test it I'd add more detailed instructions .

Looks like you've addded one parameter too much (if you want to specify the bind address you can do it like tcp://127.0.0.1:9281 - the error message could've been clearer i guess).

msm@scourge ~/P/nixpkgs> nix-build -A ursadb
/nix/store/8xlnxlm8q8y5bilzwkxviaxzi8cgya1h-ursadb
msm@scourge ~/P/nixpkgs> ./result/bin/ursadb_new /tmp/ursa/test.db
msm@scourge ~/P/nixpkgs> ./result/bin/ursadb /tmp/ursa/test.db

And there should be a process listening on :9281 (default bind address)

I use https://github.com/CERT-Polska/ursadb-cli and https://github.com/CERT-Polska/mquery for testing (and on production), though they're not on nixpkgs (yet?).

@Emantor
Copy link
Member

Emantor commented Apr 2, 2020

Hi,

thanks for input, If I knew anyone will test it I'd add more detailed instructions .

Looks like you've addded one parameter too much (if you want to specify the bind address you can do it like tcp://127.0.0.1:9281 - the error message could've been clearer i guess).

msm@scourge ~/P/nixpkgs> nix-build -A ursadb
/nix/store/8xlnxlm8q8y5bilzwkxviaxzi8cgya1h-ursadb
msm@scourge ~/P/nixpkgs> ./result/bin/ursadb_new /tmp/ursa/test.db
msm@scourge ~/P/nixpkgs> ./result/bin/ursadb /tmp/ursa/test.db

And there should be a process listening on :9281

Indeed, somehow I got [bind_address] confused with [socket] and supplied only a number. With your instructions it starts correctly.

I use https://github.com/CERT-Polska/ursadb-cli and https://github.com/CERT-Polska/mquery for testing (and on production), though they're not on nixpkgs (yet?).

Future packaging opportunity? 😁

@msm-code
Copy link
Contributor Author

msm-code commented Apr 2, 2020

Future packaging opportunity?

I'm very much happy to to this in the future (though this service is the core so prerequisite for the others).

Maybe not ursadb-cli (I've noticed python package maintainers don't like too niche packages due to maintenance burden), but certainly mquery (right now the only supported installation method is docker, which is very meh).

pkgs/servers/ursadb/default.nix Show resolved Hide resolved
pkgs/servers/ursadb/default.nix Outdated Show resolved Hide resolved
pkgs/servers/ursadb/default.nix Outdated Show resolved Hide resolved
@Emantor
Copy link
Member

Emantor commented Apr 3, 2020

Would you kindly squash down the review commits into the init at commit? Than this should be ready to go.

@msm-code
Copy link
Contributor Author

msm-code commented Apr 3, 2020

Thanks for your suggestions! The url thing was accidental, I didn't even know that I can have strings without quotes (I assumed that quotes make a string, no quotes but slash == path, variable otherwise).

@msm-code
Copy link
Contributor Author

msm-code commented Apr 3, 2020

Sure, I was not sure if I was supposed to squash it or leave as it is

@Emantor
Copy link
Member

Emantor commented Apr 3, 2020

Sure, I was not sure if I was supposed to squash it or leave as it is

The submission guidelines mention that review fixes should be squashed.

@msm-code
Copy link
Contributor Author

msm-code commented Apr 3, 2020

You're right, I missed that. FWIW I squashed my changes before the first push. Thanks for clarifying!

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/135

mkdir -p $out/bin
cp ursadb $out/bin/
cp ursadb_new $out/bin/
cp ursadb_trim $out/bin/
Copy link
Contributor

Choose a reason for hiding this comment

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

You could do this on one like, e.g.

cp ursadb ursadb_new ursadb_trim $out/bin/

@bhipple
Copy link
Contributor

bhipple commented Apr 14, 2020

Result of nixpkgs-review pr 83905 1

1 package built:
- ursadb

@bhipple bhipple merged commit 1ca2475 into NixOS:master Apr 14, 2020
@msm-code msm-code deleted the feature/init-ursadb branch April 14, 2020 23:30
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

5 participants