Fixes dependency error while building search-guard:
Exception in thread "main" java.lang.IllegalArgumentException: Missing plugin [lang-painless], dependency of [search-guard-7]
The options as specified were not a coherent set. There were three
things to consider: autoPatchelfHook, the regular rpath
fixup (controlled by dontPatchELF) and the elf interpreter rewrite in
the postFixup hook.
The autoPatchelfHook will set the interpreter, so the explicit
invocation of patchelf to do so in postFixup should not be required.
The autoPatchelfHook will rewrite rpaths entirely, so disabling the
rpath minimizing via dontPatchELF should have no effect.
Previously this was done rather hackily using substituteInPlace in
postFetch, however I've since found out that the way goreleaser does it
is actually quite accessible, since it just calls go with the
appropriate -X flags.
To avoid having to call git in the build to obtain the values and to not
rely on leaveDotGit, we can use the JSON populated by nix-prefetch-git
which contains the extra information we need: the commit hash and the
date.
The parentheses prevent the `continue` line from working by running the
enclosed in a subshell -- I noticed that ZFS would start asking me for
my password to encrypted child datasets, even though they were not
specified in `requestEncryptionCredentials`. The following logs would
also be present in the import unit's journal:
Oct 31 22:13:17 host systemd[1]: Starting Import ZFS pool "pool"...
Oct 31 22:13:44 host zfs-import-pool-start[3711]: importing ZFS pool "pool"...
Oct 31 22:13:44 host zfs-import-pool-start[4017]:pool/nix/store/39zij3xcxn4w38v6x8f88bx8y91nv0rm-unit-script-zfs-import-pool-start/bin/zfs-import-pool-start: line 31: continue: only meaningful in a `for', `while', or `until' loop
Oct 31 22:13:44 host zfs-import-pool-start[4020]:pool/nix/store/39zij3xcxn4w38v6x8f88bx8y91nv0rm-unit-script-zfs-import-pool-start/bin/zfs-import-pool-start: line 31: continue: only meaningful in a `for', `while', or `until' loop
Oct 31 22:15:14 host zfs-import-pool-start[4023]: Failed to query password: Timer expired
Oct 31 22:15:14 host zfs-import-pool-start[4024]: Key load error: encryption failure
Oct 31 22:15:14 host systemd[1]: zfs-import-pool.service: Main process exited, code=exited, status=255/EXCEPTION
Oct 31 22:15:14 host systemd[1]: zfs-import-pool.service: Failed with result 'exit-code'.
Oct 31 22:15:14 host systemd[1]: Failed to start Import ZFS pool "pool".
While at it:
- updated package description (and mention DEPRECATED upstream status)
- switched to .xz tarball
- dropped upstreamed patch
- dropped explicit checks for build result as upstream fixed it.