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

scripts: apply realpath for $0 #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

scripts: apply realpath for $0 #31

wants to merge 1 commit into from

Conversation

jengelh
Copy link
Contributor

@jengelh jengelh commented Jul 1, 2021

When $0 is a symlink, program execution would fail to find the right
directory. Fix that up.

The 4ti2 program names are quite generic (e.g. "output"), and hence
openSUSE has relegated them to /usr/libexec/4ti2, offering instead
prefixed symlinks in /usr/bin, e.g. /usr/bin/4ti2_groebner ->
/usr/libexec/4ti2/groebner.

When $0 is a symlink, program execution would fail to find the right
directory. Fix that up.

The 4ti2 program names are quite generic (e.g. "output"), and hence
openSUSE has relegated them to /usr/libexec/4ti2, offering instead
prefixed symlinks in /usr/bin, e.g. /usr/bin/4ti2_groebner ->
/usr/libexec/4ti2/groebner.
@mkoeppe
Copy link
Contributor

mkoeppe commented Jul 1, 2021

The 4ti2 program names are quite generic (e.g. "output"), and hence
openSUSE has relegated them to /usr/libexec/4ti2, offering instead
prefixed symlinks in /usr/bin, e.g. /usr/bin/4ti2_groebner ->
/usr/libexec/4ti2/groebner.

Note that Debian uses 4ti2-groebner (dash, not underscore) -- perhaps you can follow their naming?

@jengelh
Copy link
Contributor Author

jengelh commented Jul 1, 2021

This PR is independent of the particular symlink names used on a given system; the use of realpath is valid for all scenarios, including non-symlinked cases.

Since the symlinking in distros is a hack of sorts, the only comfortable change would be if the naming is changed by the 4ti2 project itself, and globally for all its users (cf. issue #22).

@mkoeppe
Copy link
Contributor

mkoeppe commented Jul 1, 2021

Does ./configure --program-prefix=4ti2_ not work?

@jengelh
Copy link
Contributor Author

jengelh commented Jul 1, 2021

  1. 4ti2gmp would be installed as /usr/bin/4ti2_4ti2gmp (double prefix of sorts)
  2. zsolve would be installed as /usr/bin/4ti2_zsolve, but the /usr/bin/4ti2_graver script would still try to execute zsolve.
    So no, --program-prefix is not yet a working route.

@mkoeppe mkoeppe reopened this Jul 5, 2022
@mkoeppe
Copy link
Contributor

mkoeppe commented Jul 5, 2022

I tend to issues on a schedule that I set

@jengelh
Copy link
Contributor Author

jengelh commented Jul 5, 2022

Github autoclosed the ticket when the source repo is removed (even though the ref might survive in the target repo so that merging remains possible) and attributes it to the original opener.

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.

None yet

3 participants