-
-
Notifications
You must be signed in to change notification settings - Fork 480
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 packages in temporary root before copying to $SAGE_LOCAL #22509
Comments
This comment has been minimized.
This comment has been minimized.
Author: Erik Bray |
Dependencies: #23096 |
Commit: |
Branch: u/embray/build/destdir |
comment:3
Started work on this, and converted I think all standard packages to work with a staged installation (install first to a temporary directory, then copy from the temp directory into As I wrote in the description, most packages are easy--either they use automake, or at least a Makefile that's compatible with the This is currently implemented in such a way that if a package doesn't yet support staged install, it will still install just fine. The only major downside is that the installed files are not recorded yet, so they wouldn't be able to take advantage of improved uninstall. That said, I'm going to continue converting the remaining packages. My only question is whether to continue work in this ticket, or separate the general changes (i.e. to Last 10 new commits:
|
comment:5
By way of explanation, the idea here is that there is a variable exported by Of course, if we take this approach, the developer docs will also need to be updated with some guidance on how to implement staged installation for new packages. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
|
comment:13
This already fails on the first package...
|
comment:110
Tickets still needing working or clarification should be moved to the next release milestone at the soonest (please feel free to revert if you think the ticket is close to being resolved). |
comment:111
Ticket retargeted after milestone closed |
comment:112
I suggest to close this ticket because its goals have been achieved and the remaining tasks seem to be covered by #24024. |
Currently we build packages, in most cases, by setting
--prefix=$SAGE_LOCAL
(in./configure
, or the equivalent in non-autoconf packages), and then installing directly to that prefix.This is fine to keep as is. But with automake packages we can also set
DESTDIR
(https://www.gnu.org/software/automake/manual/html_node/DESTDIR.html#DESTDIR) to an alternative (typically temporary) directory into which to install. This has a couple advantages:Although it's not as usual for
make install
to fail after a successfulmake
, it can happen. This prevents messy partial installs in the case of a failedmake install
run.It gives us the opportunity to make an exact list of the files that were installed. This is a prerequisite to improving package uninstallation/reinstallation in sage-dist (see Enhanced package uninstallation for Sage spkgs #22510).
This is also standard operating procedure in most other packaging systems, so it would be good for Sage to adopt too. The general approach is the same as that used for converting an arbitrary Makefile to support this convention--everywhere a file is installed, prefix the installation path with
$(DESTDIR)
(or in this case a variable we'll call$SAGE_DESTDIR
).For packages that already support the
DESTDIR
convention, then, we passDESTDIR=$SAGE_DESTDIR
tomake install
. It is also already possible for Python packages (e.g.pip install --root
).Since the introduction of the build helper scripts in #23160, it makes the most sense to make these changes directly in the helper scripts, and then update more packages to use those helper scripts where possible.
Dependent tickets:
sage-spkg
spkg-build/install
scripts to use thesdh_
helper functions, since that is the fastest way to addDESTDIR
support for many packages.--root=${SAGE_DESTDIR}
to Python spkgs$SAGE_LOCAL
, rather than through a standard installerDepends on #23059
Depends on #23096
Depends on #23160
Depends on #23781
CC: @mkoeppe
Component: build
Author: Erik Bray
Branch/Commit: u/embray/build/destdir @
c1d5453
Issue created by migration from https://trac.sagemath.org/ticket/22509
The text was updated successfully, but these errors were encountered: