-
-
Notifications
You must be signed in to change notification settings - Fork 660
Closed
Closed
Copy link
Milestone
Description
Here's a new attempt toward #21537 that is perhaps more elegant.
Let's change build/bin/sage-spkg
as follows:
- If
spkg-build
exists, call that, followed by$SAGE_SUDO spkg-install
. - Otherwise, just call
spkg-install
(withOUT $SAGE_SUDO). (Such packages cannot be installed into a SAGE_ROOT that is only root-writable, unless they use $SAGE_SUDO themselves.)
The patch changes two example packages, to demonstrate this: 4ti2
and lcalc
.
Before the patch:
$ rm -Rf local/share/4ti2
$ mkdir local/share/4ti2
$ sudo chown root local/share/4ti2
$ ./sage -f 4ti2
[...]
[4ti2-1.6.7] mkdir: /Users/mkoeppe/s/sage/sage-rebasing/local/share/4ti2/doc: Permission denied
[4ti2-1.6.7] make[4]: *** [install-docDATA] Error 1
[...]
$ sudo chown root local/bin/ local/bin/lcalc
$ ./sage -f lcalc
[...]
[lcalc-1.23.p14] cp -f lcalc /Users/mkoeppe/s/sage/sage-rebasing/local//bin/.
[lcalc-1.23.p14] cp: /Users/mkoeppe/s/sage/sage-rebasing/local//bin/./lcalc: Permission denied
[...]
Then, after the patch:
$ export SAGE_SUDO="sudo -E"
$ ./sage -f 4ti2 lcalc # succeeds
Other packages will be handled in follow-up tickets.
See also:
- Update developer manual regarding spkg-build, spkg-install, SAGE_SUDO #21844: Update developer manual regarding spkg-build, spkg-install, SAGE_SUDO
- Task ticket: If $SAGE_SUDO is set, use it whenever we do "make install" of a package. #21537
CC: @jdemeyer @kiwifb @embray @vbraun @dimpase @tscrim
Component: build
Author: Matthias Koeppe
Branch: 48053d0
Reviewer: Erik Bray
Issue created by migration from https://trac.sagemath.org/ticket/21726