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

solr: 4.10.3 -> 7.5.0, refactor service to reflect major changes in version bump #49283

Merged
merged 1 commit into from Nov 4, 2018

Conversation

aanderse
Copy link
Member

Fix for issue #33876 by updating solr from an ancient version to the most recent.

I have only tested that solr actually starts running, but I have not indexed anything yet. Looking for feedback from anyone who is familiar with solr. I'll be asking a colleague at work who is familiar with solr to test this out and then report back. Will be adding a NixOS test when I get a chance.

Motivation for this change

Security issues on ancient version of solr. Version bump to latest for fix.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

Copy link
Member

@andir andir left a comment

Choose a reason for hiding this comment

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

Overall it doesn't look bad but could you also add a nixos VM test verifying that this module works as expected?

nixos/modules/services/search/solr.nix Outdated Show resolved Hide resolved
nixos/modules/services/search/solr.nix Outdated Show resolved Hide resolved
pkgs/servers/search/solr/default.nix Outdated Show resolved Hide resolved
nixos/tests/solr.nix Show resolved Hide resolved
@andir
Copy link
Member

andir commented Oct 29, 2018

@domenkozar are you still using familiar with solr? This is trying to resurrect the whole thing with a test. If you have any input that would be appreciated.

@aanderse
Copy link
Member Author

@andir Given this entirely breaks compatibility with previous module/package, but previous module/package is now entirely unsupported by upstream (and has CVEs against it...) what is the plan as far as which versions of NixOS this will land in?

@andir
Copy link
Member

andir commented Oct 31, 2018

@aanderse I'd say master and then the next release until there is a good reason to replace the old (& broken) module on 18.09.

@aanderse
Copy link
Member Author

@andir sounds good.

@GrahamcOfBorg test solr

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: tests.solr

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: tests.solr

Partial log (click to expand)

machine: exit status 1
syncing
machine: running command: sync
machine: exit status 0
test script finished in 41.47s
cleaning up
killing machine (pid 597)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
/nix/store/hn8in1czvbr5j3qmzpz9n4h1r5gni6xf-vm-test-run-solr

@andir andir force-pushed the solr branch 2 times, most recently from b0111c4 to a7c5838 Compare October 31, 2018 13:06
@andir
Copy link
Member

andir commented Oct 31, 2018

@aanderse I did rebase, and moved a few changes around. I also had to bump the module id since something else was merged with 307 already.

@GrahamcOfBorg test solr

When the tests complete this is good for me.

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: tests.solr

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@andir andir changed the title WIP: solr: 4.10.3 -> 7.5.0, refactor service to reflect major changes in version bump solr: 4.10.3 -> 7.5.0, refactor service to reflect major changes in version bump Oct 31, 2018
@andir
Copy link
Member

andir commented Oct 31, 2018

@aanderse would you like writing a changelog entry for the (re-)introduction of solr? :)

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: tests.solr

Partial log (click to expand)

machine: exit status 1
syncing
machine: running command: sync
machine: exit status 0
test script finished in 36.85s
cleaning up
killing machine (pid 597)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
/nix/store/4piih9b917n00k6snghscz9v5ar9nb2k-vm-test-run-solr

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: solr

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: solr

Partial log (click to expand)

stripping (with command strip and flags -S) in /nix/store/8lmj2yjns5cpgjcdxckxia1jgf96xw8m-solr-7.5.0/bin
patching script interpreter paths in /nix/store/8lmj2yjns5cpgjcdxckxia1jgf96xw8m-solr-7.5.0
/nix/store/8lmj2yjns5cpgjcdxckxia1jgf96xw8m-solr-7.5.0/server/scripts/cloud-scripts/zkcli.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/r47p5pzx52m3n34vdgqpk5rvqgm0m24m-bash-4.4-p23/bin/bash"
/nix/store/8lmj2yjns5cpgjcdxckxia1jgf96xw8m-solr-7.5.0/server/scripts/cloud-scripts/snapshotscli.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/r47p5pzx52m3n34vdgqpk5rvqgm0m24m-bash-4.4-p23/bin/bash"
/nix/store/8lmj2yjns5cpgjcdxckxia1jgf96xw8m-solr-7.5.0/example/exampledocs/test_utf8.sh: interpreter directive changed from "/bin/sh" to "/nix/store/r47p5pzx52m3n34vdgqpk5rvqgm0m24m-bash-4.4-p23/bin/sh"
/nix/store/8lmj2yjns5cpgjcdxckxia1jgf96xw8m-solr-7.5.0/contrib/prometheus-exporter/bin/solr-exporter: interpreter directive changed from "/bin/sh" to "/nix/store/r47p5pzx52m3n34vdgqpk5rvqgm0m24m-bash-4.4-p23/bin/sh"
/nix/store/8lmj2yjns5cpgjcdxckxia1jgf96xw8m-solr-7.5.0/bin/.post-wrapped: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/r47p5pzx52m3n34vdgqpk5rvqgm0m24m-bash-4.4-p23/bin/bash"
/nix/store/8lmj2yjns5cpgjcdxckxia1jgf96xw8m-solr-7.5.0/bin/.solr-wrapped: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/r47p5pzx52m3n34vdgqpk5rvqgm0m24m-bash-4.4-p23/bin/bash"
checking for references to /build in /nix/store/8lmj2yjns5cpgjcdxckxia1jgf96xw8m-solr-7.5.0...
/nix/store/8lmj2yjns5cpgjcdxckxia1jgf96xw8m-solr-7.5.0

@aanderse
Copy link
Member Author

aanderse commented Nov 3, 2018

@andir I hope this entry will suffice. If not please let me know. Thank you.

@andir
Copy link
Member

andir commented Nov 3, 2018

Can you cleanup the git history a bit like I did a few days before you pushed your latest changes. I think the merge of master should go away and also a few of those commits should be stashed together.

@GrahamcOfBorg GrahamcOfBorg added 6.topic: xfce The Xfce Desktop Environment and removed 6.topic: xfce The Xfce Desktop Environment 2.status: merge conflict labels Nov 3, 2018
@aanderse
Copy link
Member Author

aanderse commented Nov 3, 2018

@andir Sorry for the problems, have studied up on my git history rewriting enough to accomplish as requested.

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: solr

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: solr

Partial log (click to expand)

stripping (with command strip and flags -S) in /nix/store/d2kgqgl08navv2npc2fw2p5s55lcbq61-solr-7.5.0/bin
patching script interpreter paths in /nix/store/d2kgqgl08navv2npc2fw2p5s55lcbq61-solr-7.5.0
/nix/store/d2kgqgl08navv2npc2fw2p5s55lcbq61-solr-7.5.0/server/scripts/cloud-scripts/snapshotscli.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/r47p5pzx52m3n34vdgqpk5rvqgm0m24m-bash-4.4-p23/bin/bash"
/nix/store/d2kgqgl08navv2npc2fw2p5s55lcbq61-solr-7.5.0/server/scripts/cloud-scripts/zkcli.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/r47p5pzx52m3n34vdgqpk5rvqgm0m24m-bash-4.4-p23/bin/bash"
/nix/store/d2kgqgl08navv2npc2fw2p5s55lcbq61-solr-7.5.0/bin/.post-wrapped: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/r47p5pzx52m3n34vdgqpk5rvqgm0m24m-bash-4.4-p23/bin/bash"
/nix/store/d2kgqgl08navv2npc2fw2p5s55lcbq61-solr-7.5.0/bin/.solr-wrapped: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/r47p5pzx52m3n34vdgqpk5rvqgm0m24m-bash-4.4-p23/bin/bash"
/nix/store/d2kgqgl08navv2npc2fw2p5s55lcbq61-solr-7.5.0/example/exampledocs/test_utf8.sh: interpreter directive changed from "/bin/sh" to "/nix/store/r47p5pzx52m3n34vdgqpk5rvqgm0m24m-bash-4.4-p23/bin/sh"
/nix/store/d2kgqgl08navv2npc2fw2p5s55lcbq61-solr-7.5.0/contrib/prometheus-exporter/bin/solr-exporter: interpreter directive changed from "/bin/sh" to "/nix/store/r47p5pzx52m3n34vdgqpk5rvqgm0m24m-bash-4.4-p23/bin/sh"
checking for references to /build in /nix/store/d2kgqgl08navv2npc2fw2p5s55lcbq61-solr-7.5.0...
/nix/store/d2kgqgl08navv2npc2fw2p5s55lcbq61-solr-7.5.0

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: solr

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@aanderse
Copy link
Member Author

aanderse commented Nov 3, 2018

Just to be sure after rewriting history... @GrahamcOfBorg test solr

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: solr

Partial log (click to expand)

/nix/store/d2kgqgl08navv2npc2fw2p5s55lcbq61-solr-7.5.0

@andir andir merged commit c891dac into NixOS:master Nov 4, 2018
@aanderse aanderse deleted the solr branch November 4, 2018 13:48
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

3 participants