Ticket #3122 (closed defect: fixed)

Opened 7 months ago

Last modified 8 hours ago

[with patch, positive review] after make install, sage tries to write in /usr/local

Reported by: zimmerma Assigned to: mabshoff
Priority: blocker Milestone: sage-3.2.1
Component: relocation Keywords:
Cc:

Description

I compiled sage-3.0 on the machines of my lab, and installed it under /usr/local/sage-3.0 with make install DESTDIR=/usr/local/sage-3.0. I am the Unix owner of the files under /usr/local/sage-3.0. When I run sage myself, it is ok. However, when other people in my lab run it, they get:

< bissogae@hector:~$ sage
< ----------------------------------------------------------------------
< | SAGE Version 3.0, Release Date: 2008-04-23                         |
< | Type notebook() for the GUI, and license() for information.        |
< ----------------------------------------------------------------------
< Traceback (most recent call last):
<   File "/usr/local/sage-3.0/sage/local/bin/sage-location", line 66, in <module>
<     t, R = install_moved()
<   File "/usr/local/sage-3.0/sage/local/bin/sage-location", line 11, in install_moved
<     O = open(location_file,'w')
< IOError: [Errno 13] Permission denied: '/usr/local/sage-3.0/sage/local/lib/sage-current-location.txt'
<
< sage:

I'm not sure it is ok that SAGE writes in /usr/local...

Attachments

trac_3122.patch (374 bytes) - added by mabshoff on 12/01/2008 12:44:39 AM.
This patch is to the main makefile and is a classic patch, i.e. no hg here

Change History

05/07/2008 05:51:07 AM changed by mabshoff

  • owner changed from cwitty to mabshoff.
  • priority changed from minor to blocker.
  • status changed from new to assigned.

Hi Paul,

I am curious if you started Sage after running "make install". Starting Sage once after running the make install is needed so that the pyc files are recreated. After that Sage should not need to have write access to anything outside ~/.sage. So I consider this a blocker. We must make the deployment of Sage as simple as possible and this includes having Sage in multi user environments.

Cheers,

Michael

08/16/2008 04:48:21 PM changed by malb

It seems the touching /usr/local is caused by the "Sage moved" script, so I assume that the best "fix" is to print a better error message?

09/14/2008 09:49:02 PM changed by mabshoff

I agree this issue seems closely related to #1830. So fixing this issue will also likely solve that ticket.

Cheers,

Michael

10/30/2008 01:31:58 AM changed by mabshoff

  • milestone changed from sage-3.2.1 to sage-3.2.

11/29/2008 02:20:31 AM changed by mabshoff

  • milestone changed from sage-3.2.2 to sage-3.2.1.

12/01/2008 12:44:39 AM changed by mabshoff

  • attachment trac_3122.patch added.

This patch is to the main makefile and is a classic patch, i.e. no hg here

12/01/2008 12:45:19 AM changed by mabshoff

  • summary changed from after make install, sage tries to write in /usr/local to [with patch, needs review] after make install, sage tries to write in /usr/local.

The hopefully final patch for 3.2.1.rc1 :)

Cheers,

Michael

12/01/2008 12:51:14 AM changed by was

  • summary changed from [with patch, needs review] after make install, sage tries to write in /usr/local to [with patch, positive review] after make install, sage tries to write in /usr/local.

12/01/2008 12:54:34 AM changed by mabshoff

  • status changed from assigned to closed.
  • resolution set to fixed.

Merged in Sage 3.2.1.rc1

12/01/2008 01:30:24 AM changed by mabshoff

Looking at the problem again it seems that there might be another problem here. Several possibilities

  • other people ran sage before Paul did, hence sage-location was executed. We fixed that bug
  • somebody else has mounted the directory with sage in a different location than Paul in which case sage_location will cause the above error. There is nothing we can do in that case since the pyc files have to be recreated

Paul: If this is still a problem please let us know and open a new ticket with specific steps to reproduce and plenty of information.

Cheers,

Michael