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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
geoserver: add extensions and update script #281739
Conversation
2979d2e
to
7160597
Compare
541c243
to
ecacf26
Compare
b339653
to
d836af2
Compare
Looks like a good job @rollf ! I'll review it soon. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/week-in-geospatial-team/37035/7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to build the package with and without extensions, tried to run update script and checked the code. I like the usage of the geoserver.[passthru.]withExtensions
.
Looks good OK to me. Thank you @rollf .
Okay, thank you @imincik . I had seen before the label |
With the release of |
|
Can you try to force-push to this PR ? It might help to restart eval. |
Oh, I missed this command. I think we shouldn't use new/experimental CLI in nixpkgs. I suggest to replace it with |
d836af2
to
3ac4399
Compare
@rollf , thanks for your work ! |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/week-in-geospatial-team/37035/8 |
Description of changes
This PR adds the possibility to run
geoserver
with extensions. This is achieved by adding the functiongeoserver.[passthru.]withExtensions
that expects aselector
function that selects extensions among a given list and returns ageoserver
derivation with the selected extensions installed. Example:All extensions are listed in a new file
geoserver/extensions.nix
. They are fed towithExtensions
upon invocation. The standard procedure to install extensions is followed (i.e. unpack extension content intogeoserver/webapps/geoserver/WEB-INF/lib
). My initial implementation usedsymlinkJoin
. While the server starts, trying to access it results injava.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/dispatcher-servlet.xml]
. Besides, the wrappers (geoserver-startup
,geoserver-shutdown
) would have to be rewritten. So the current implementation copies the files from the extension's$out
into geoserver's$out
. Some extensions have dependencies. This is coped with. Some extensions do not work currently. Those are commented out for now.Since there are >50 extensions, an
update.sh
script has been added to automatically update bothgeoserver
as well as all extensions. The script is designed to work by either fetching the latest Geoserver version from GitHub or by providing specific versions. Example:passthru.updateScript
is set to this new script and things should work as intended (see Nixpkgs manual section onpassthru.updateScript
)nixos/tests/geoserver.nix
has been adapted to test several geoserver installations. Crucially, a test is run with (nearly) all extensions enabled. This test checks for known issues in the log file.I think there is room for improvement in this PR and I'm happy to work in comments. Overall, I think the approach is sound.
ToDos:
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 馃憤 reaction to pull requests you find important.