-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
Create a new option: "sage -strip" which deletes things that aren't needed for a binary distribution of sage, or for people that will never develop or upgrade #10801
Comments
comment:1
It seems like the LiveCD folks have also worked on stuff like this... |
comment:2
If we mount a sage source installation with mount option strictatime or relatime we can just touch all the files to have an access time in the deep past (with something like |
This comment has been minimized.
This comment has been minimized.
comment:4
if you're using linux, take a look at inotify-tools which has nice and clean command line tools, as it will give you a more fine-grained and realtime sense of what files are being used as they are accessed/modified to track down what's being used by which calls/tests/parts of sage. |
comment:5
We can probably remove any Mercurial repositories. |
comment:7
Here's some data I collected about what files are used and what files aren't, in sage 4.7.alpha3. Surprisingly many aren't, but come to think of it there's going to be a lot of stuff that users would want which isn't used by any doctest. I guess one should think of this data as a lower bound... |
comment:8
Why is it OK to delete SAGE_ROOT/local/bin/gfan? |
comment:9
Not delete, but strip. This removes debug symbols. |
comment:10
Slightly related: Note that we already have a few I personally wouldn't use |
comment:11
After a long discussion, Keshav and I came up with:
since this is a lot like "make release" with other software.... |
comment:12
Replying to @sagetrac-mhampton:
I didn't suggest deleting gfan, but stripping it. |
Attachment: trac_10801-root_repo.patch.gz apply to the repo in $SAGE_ROOT |
comment:13
Here's how I'm testing this:
|
comment:14
ptestlong passes. W00t. |
comment:15
Some thoughts:
Going a bit farther, considering the target users will never develop or upgrade,
|
comment:16
Replying to @kini:
LATER: This could be added, but can we do it later in a future ticket. It would be good if the first version of this patch is quite safe. Hey, it already saves 1 GB as is!
OK: I'll fix the patch right now.
NO: Pointless, and scary in that it would break functionality, which is probably a bad idea. Good point about the size. I must have been testing something with some optional fonts installed.
FUTURE: Yes, but in a future version of this?
FUTURE: It's safer to put a small string in each, to avoid confusion. This happens automatically when you build a binary with "sage -bdist". Anyway, this is something that could be added later. |
Reviewer: Benjamin Jones |
comment:17
Tested the patches on sage.math and fresh build of Sage-4.7.1:
So it saved 0.5 GB which is not the 1.0 GB observed by William above. Did you remove stuff by hand in that session that the script doesn't touch? Or maybe because I built the install from source instead of using a binary distribution? I'm running |
comment:18
After producing the micro release,
Subsequently by hand:
|
comment:19
Ben:
|
Changed keywords from none to sd32 |
Changed reviewer from Benjamin Jones to Benjamin Jones, Keshav Kini |
comment:21
William: OK, sounds good. I'll make a ticket. Sounds like we're good to go here, no? Positive review from me. |
comment:22
OK, I checked on OSX 10.6.8 binary install and I get results simular to William's. Looks good here too. Positive review from me as well. |
comment:23
New ticket is #11743. |
comment:24
Martin Albrecht pointed out that deleting .a files could make it so users can't compile certain Cython programs, maybe. I'm not sure if we should care though, given the goal of this ticket ('never develop or upgrade'). |
comment:25
Hm. If that includes |
comment:26
Yes, I'm concerned. I'll simply comment out the line that deletes the .a files, and repost the patch. |
replacing the patch by one that doesn't delete .a files. |
comment:27
Attachment: trac_10801-local_bin_repo.patch.gz Fair enough. Sadly this reduces our space savings by more than 200 MB. (I'm putting myself as an author on this ticket because I seem to be listed as one the patch...) |
Author: William Stein, Keshav Kini |
This comment has been minimized.
This comment has been minimized.
Merged: sage-4.7.2.alpha3 |
This is a frequently requested feature. We should start with some little script that does this, and build on it. I tried all the following, and ran the test suite and it worked fine.
The patches below actually provide a new
make
target, "micro_release
", rather than adding a new option tosage
.Apply attachment: trac_10801-root_repo.patch to the Sage root repository.
Apply attachment: trac_10801-local_bin_repo.patch to the Sage scripts repository.
CC: @jasongrout @kcrisman
Component: packages: standard
Keywords: sd32
Author: William Stein, Keshav Kini
Reviewer: Benjamin Jones, Keshav Kini
Merged: sage-4.7.2.alpha3
Issue created by migration from https://trac.sagemath.org/ticket/10801
The text was updated successfully, but these errors were encountered: