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 |
|
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
geoserverwith extensions. This is achieved by adding the functiongeoserver.[passthru.]withExtensionsthat expects aselectorfunction that selects extensions among a given list and returns ageoserverderivation with the selected extensions installed. Example:All extensions are listed in a new file
geoserver/extensions.nix. They are fed towithExtensionsupon 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$outinto 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.shscript has been added to automatically update bothgeoserveras 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.updateScriptis set to this new script and things should work as intended (see Nixpkgs manual section onpassthru.updateScript)nixos/tests/geoserver.nixhas 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 = relaxedsandbox = truenix-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.