Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#43370 - [sage-notebook] 0.11.1-1 shadow service fails because '/opt/sage' does not exist

Attached to Project: Community Packages
Opened by Óscar Pereira (gauthma) - Wednesday, 07 January 2015, 16:31 GMT
Last edited by Antonio Rojas (arojas) - Monday, 12 January 2015, 00:43 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Antonio Rojas (arojas)
Evgeniy Alexeev (arcan1s)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: From the forum thread where I originally asked about this problem [1]:

"So SAGE changed locations (no longer in /opt/sage), but its user ("sage") was not told of the change. Thus, the shadow service fails"

As mentioned in that thread, I only have sage-mathematics (and not sage-notebook) installed. But the forum moderator arojas tells me that the sagemath user handling is now the responsibility of sage-notebook, thus I opened the but mentioning that package.

If such is indeed the case, then perhaps sage-notebook should be a dependency of sage-mathematics? (or no sagemath user should exist if sage-notebook is not installed?)


Additional info:
* I have installed sage-mathematics version 6.4.1-4

Steps to reproduce:

1. Install sage-mathematics, but not sage-notebook.
2. run # systemctl restart shadow
3. The above command will fail, and # journalctl -xe will show:

Unit shadow.service entered failed state.
shadow.service failed.
user 'sagemath': directory '/opt/sage' does not exist
pwck: no changes


[1]: https://bbs.archlinux.org/viewtopic.php?id=191965
This task depends upon

Closed by  Antonio Rojas (arojas)
Monday, 12 January 2015, 00:43 GMT
Reason for closing:  Fixed
Additional comments about closing:  sage-notebook 0.11.1-3
Comment by Óscar Pereira (gauthma) - Wednesday, 07 January 2015, 16:36 GMT
Installing sage-notebook does nothing: the problem remains as described.

In a offline remark, arojas is actually a Trusted User, not a forum mod -- apologies for the switch.
Comment by Doug Newgard (Scimmia) - Friday, 09 January 2015, 07:30 GMT
Adding arcan1s at the request of arojas.
Comment by Antonio Rojas (arojas) - Friday, 09 January 2015, 07:37 GMT
IMO we should just remove the sagemath user. I asked td123 and he doesn't remember why it was added. Sage can't run as a nologin user anyway, since it will interactively ask for an admin password on first run so it will crash if there is no shell available. If someone wants to run a sage daemon under a system account they should set up everything manually, including the system user. Otherwise we have the systemd user unit session to run the daemon as a user.

@arcan1s: is that ok with you?
Comment by Evgeniy Alexeev (arcan1s) - Friday, 09 January 2015, 16:47 GMT
IMO if user want to start sage as user they should use user service. As far as I understand the current user/group policy dates back to the times when we used sysvinit. In other hand the current realization with /var/lib/sage may be more comfortable on multi user system.

Can we provide both system wide and user only services?

Comment by Antonio Rojas (arojas) - Friday, 09 January 2015, 18:27 GMT
I tried to write a service unit that runs under the sagemath user, but as I said it just crashes because it tries to ask for the admininstrator password in a shell and sagemath is not a shell account. There is no way to override that and set the password in the sage command line that I know of. So one would need to make sagemath a shell user, run sage manually first to set the password, and then run the daemon. Since there is manual intervention required anyway, we may leave the user creation also to the users that know what they're doing. I'm afraid that if we provide the system service people will start reporting that it doesn't work. We can maybe post a system unit and instructions on the wiki for now and revisit the issue when upstream provides a sane way to run a Sage server (http://trac.sagemath.org/ticket/7893)
Comment by Evgeniy Alexeev (arcan1s) - Saturday, 10 January 2015, 20:19 GMT
oh, ok, I see (have tried to setup system-wide sage just now). So, yeah, I agree, user sagemath may be removed since seems there is no way to create system service w\o some workarounds.
Comment by Antonio Rojas (arojas) - Sunday, 11 January 2015, 10:39 GMT
Fixed in sage-notebook 0.11.1-3, the sagemath user will be removed on upgrade (also on install for users who still haven't updated from the monolithic package). I'm not sure if it's worth to add an install file to the sage-mathematics package for users (like the OP) who don't use the notebook, for now the sagemath user can be safely removed manually.

Loading...