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

Install the SPARQLProg package system-wide. #1135

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

gouttegd
Copy link
Contributor

When installing the SPARQLProg package using SWIPL, we must install make sure that the package is installed in a system-wide directory (under /usr/local) rather than the home directory of the running user (root). Otherwise only root would be able to use the package.

This PR does that by setting the global option to true when calling SWIPL’s pack_install function. Then we update the running PATH to include the /usr/local/share/swi-prolog/pack/sparqlprog/bin directory. And we add SPARQLProg’s pl2sparql program to the list of programs to check after a build.

closes #1134

When installing the SPARQLProg package using SWIPL, make sure the
package is installed in a system-wide directory (under /usr/local)
rather than the home directory of the running user (root). Otherwise
only root would be able to use the package.

closes #1134
@gouttegd gouttegd self-assigned this Nov 22, 2024
@gouttegd gouttegd merged commit bdc5975 into master Nov 22, 2024
1 check passed
@gouttegd gouttegd deleted the fix-sparqlprog-under-non-root branch November 22, 2024 19:35
gouttegd added a commit that referenced this pull request Nov 22, 2024
When installing the SPARQLProg package using SWIPL, make sure the
package is installed in a system-wide directory (under /usr/local)
rather than the home directory of the running user (root). Otherwise
only root would be able to use the package.
@@ -4,7 +4,7 @@ ARG ODKLITE_TAG=latest
FROM obolibrary/odklite:${ODKLITE_TAG}
LABEL maintainer="[email protected]"

ENV PATH="/tools/apache-jena/bin:/tools/sparqlprog/bin:$PATH"
ENV PATH "/tools/apache-jena/bin:/usr/local/share/swi-prolog/pack/sparqlprog/bin:$PATH"
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doh!

So what probably happened is that I started fixing this issue while I was on the 1.5 maintenance branch (where your fix for the ENV declaration is not present), and then when I realized that I switched over to the master branch -- and in the process, I ported back to the master branch the old ENV declaration.

My bad.

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

Successfully merging this pull request may close these issues.

SPARQLProg tools are unusable in ODK 1.5 under a non-root user
2 participants