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

Upgrade alpine and remove customisation for JNA in the fits image. #215

Closed
nigelgbanks opened this issue May 11, 2022 · 9 comments
Closed

Comments

@nigelgbanks
Copy link
Contributor

nigelgbanks commented May 11, 2022

The following has been merged in aports:

https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/34087

Which should fix the issue where we had to have customisation to the jna packages for fits to support arm builds.

After upgrading to 3.15.5 when it releases we should be able to cleanup:

RUN --mount=type=bind,from=build,source=/packages,target=/packages \
--mount=type=bind,from=build,source=/etc/apk/keys,target=/etc/apk/keys \
apk add /packages/java-jna-*.apk && \
cleanup.sh
COPY --from=download --chown=tomcat:tomcat /opt/tomcat /opt/tomcat
COPY --from=download --chown=tomcat:tomcat /opt/fits /opt/fits
# Replace linux shared libraries with ones that target muslibc and are platform specific.
# Also add perl for exiftool, and platform specific jna so native libs can be loaded.
RUN --mount=type=cache,id=fits-apk,sharing=locked,from=cache,target=/var/cache/apk \
apk add \
file \
libmediainfo \
libzen \
perl \
&& \
cp $(realpath /usr/share/java/jna.jar) /opt/fits/lib && \
cleanup.sh

And remove the custom build: https://github.com/Islandora-Devops/isle-buildkit/tree/main/fits/build.

This will require testing on arm to validate that fits is working properly when calling out to native code.

@nigelgbanks nigelgbanks self-assigned this May 11, 2022
@nigelgbanks
Copy link
Contributor Author

nigelgbanks commented Aug 4, 2022

Need to wait on this getting in to be able to use php 8:

roblib/CrayFits#10

@g7morris
Copy link
Contributor

g7morris commented Sep 6, 2022

@nigelgbanks Do you want to schedule a Zoom call re this task or talk in Slack sometime this week to divvy up next steps between the two of us?

@nigelgbanks
Copy link
Contributor Author

Linking the existing work here: #238

@nigelgbanks
Copy link
Contributor Author

@g7morris I'll ping ya on slack.

@rosiel
Copy link
Contributor

rosiel commented Sep 7, 2022

Discussed briefly in the Tech call today; looks like you have a solid plan for this. let us know if you need more community input.

@nigelgbanks
Copy link
Contributor Author

Even though they added jna back in for aarch64, we can't use it as it's compiled against a newer version of java, so we will have to continue using our own build package.

@nigelgbanks
Copy link
Contributor Author

Upgraded to JDK 17 (The new LTS for JDK) to get around problems with Fcrepo deadlocking when receiving a SIGTERM. Might work now.

@nigelgbanks
Copy link
Contributor Author

Yup that worked.

@nigelgbanks
Copy link
Contributor Author

DOne under #238

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants