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

Installation manual: Update section "system-wide install" #33787

Closed
mkoeppe opened this issue May 2, 2022 · 26 comments
Closed

Installation manual: Update section "system-wide install" #33787

mkoeppe opened this issue May 2, 2022 · 26 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented May 2, 2022

(split out from #30207)

https://doc.sagemath.org/html/en/installation/source.html#installation-in-a-multiuser-environment should be updated:

  • Don't edit the script
  • Just symlink to the sage script in venv

We also add a link from the README to an optional step described only in the installation manual.

CC: @dimpase @jhpalmieri @slel

Component: documentation

Author: Matthias Koeppe

Branch/Commit: 7bc3394

Reviewer: John Palmieri

Issue created by migration from https://trac.sagemath.org/ticket/33787

@mkoeppe mkoeppe added this to the sage-9.7 milestone May 2, 2022
@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 2, 2022

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 2, 2022

Author: Matthias Koeppe

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 2, 2022

Commit: 60bcbec

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 2, 2022

New commits:

60bcbecREADME.md, src/doc/en/installation/source.rst: Update multi-user install

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 2, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

2116f9fREADME.md: Update final step 'symlink sage', add jupyter kernel step

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 2, 2022

Changed commit from 60bcbec to 2116f9f

@mkoeppe

This comment has been minimized.

@jhpalmieri
Copy link
Member

comment:6

The suggestion to use

$ sudo ln -s $(sage -sh -c 'ls $SAGE_ROOT/venv/bin/sage') /usr/local/bin

is not consistent with the top-level sage script, which has

if [ -x "$SAGE_ROOT/src/bin/sage" ]; then
    exec "$SAGE_ROOT/src/bin/sage" "$@"
elif [ -x "$SAGE_ROOT/local/bin/sage" ]; then # if in a stripped binary
    # Note in this case we assume that SAGE_LOCAL is the "local" subdirectory
    exec "$SAGE_ROOT/local/bin/sage" "$@"
else
    echo >&2 "$0: no Sage installation found in \$SAGE_ROOT=$SAGE_ROOT"
    exit 1
fi

(a) Should the Sage script look in venv/bin rather than local/bin? (b) Should the suggestion be to make a symlink to SAGE_ROOT/src/bin/sage?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 11, 2022

comment:7

The local/bin/sage could be changed to venv/bin/sage, yes. But this distinction only matters when configure --prefix is not in use because --prefix implies --without-sage-venv. (In Volker's binary build, --prefix is used.)

The "elif" branch is only relevant in binary builds that don't ship src. Do Volker's binary builds (which we no longer advertise) have src?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 11, 2022

comment:8

Do Volker's binary builds (which we no longer advertise) have src?

Actually, this turns out to be irrelevant - it looks like Volker stopped making these binaries altogether, the last one is 9.4 -http://files.sagemath.org/linux/64bit/index.html

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 11, 2022

comment:9

But for the record, http://files.sagemath.org/linux/64bit/sage-9.4-Ubuntu_20.04-x86_64.tar.bz2 does have src, but it does not have the symbolic link venv (that was introduced in 9.5)

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 11, 2022

comment:10

"stripped binary" might refer to what make micro_release creates. I have never used, but I think it is in use in the user-facing Docker containers somehow. It deletes a lot of stuff, but it does leave src/bin around.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 11, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

59877bdMakefile (micro_release): Fix typo in comment
e537bf3sage: Remove outdated check for SAGE_ROOT/local/bin/sage

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 11, 2022

Changed commit from 2116f9f to e537bf3

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 11, 2022

comment:12

So here's a simplification.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 11, 2022

comment:13

Replying to @jhpalmieri:

(b) Should the suggestion be to make a symlink to SAGE_ROOT/src/bin/sage?

No. SAGE_ROOT/sage uses src/bin/sage to allow for uses in unconfigured source trees.

After a build of Sage, using the installed version is more canonical.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 11, 2022

comment:14

Follow-up = #33841

@jhpalmieri
Copy link
Member

comment:15

How can you run

sudo ln -s $(sage -sh -c 'ls $SAGE_ROOT/venv/bin/sage') /usr/local/bin

is sage isn't already in your path?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 12, 2022

comment:16

Thanks for catching this

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 12, 2022

Changed commit from e537bf3 to 7bc3394

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 12, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

7bc3394README.md: Use ./sage in command line

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 12, 2022

comment:18

(I had copied this from similar invocations shown in src/doc/en/installation/launching.rst, which however start with "Assuming that SageMath can be invoked by typing sage"

@jhpalmieri
Copy link
Member

comment:19

Looks good to me.

@jhpalmieri
Copy link
Member

Reviewer: John Palmieri

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 13, 2022

comment:20

Thanks!

@vbraun
Copy link
Member

vbraun commented May 22, 2022

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