Bug 674426

Summary: at jobs always run in the login shell now, but used to use $SHELL
Product: [Fedora] Fedora Reporter: Martin Simmons <martin>
Component: atAssignee: Marcela Mašláňová <mmaslano>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 14CC: mmaslano
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: at-3.1.12-9.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-20 11:13:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Martin Simmons 2011-02-01 20:44:32 UTC
Description of problem:
at jobs always run in the login shell now, even though at generates a command file that uses $SHELL.  In older versions of Fedora (see Additional info), at took the value of $SHELL from the environment where at is run.  This allows e.g. csh users to submit inline at jobs with sh syntax, making build scripts more robust.


Version-Release number of selected component (if applicable):
3.1.12-5.fc14.x86_64

How reproducible:
100%

Steps to Reproduce:
1.As a csh user, run an at job like this:
env SHELL=/bin/sh at now+1minute <<END
echo output of set
set
echo output of env
env
END
  
Actual results:
The script was run using csh (the set command shows shell variables rather than environment variables).
SHELL is missing from the output of env.

Expected results:
SHELL should be present and should be used to run the script.

Additional info:

This was implemented in Fedora 3 and 7 at least by a patch called at-3.1.8-fix_no_export.patch, which fixed an unrelated bug in the filtering of the SHELLOPTIONS environment variable (all environment variables which are a prefix of SHELLOPTIONS are removed, not just SHELL).  According the rpm changelog, this was to fix bug 131510 which I don't have permission to view.

According to the git logs, at-3.1.8-fix_no_export.patch was merged into at-3.1.8-t_option.patch (tag at-3_1_10-12_fc8).  That patch was later removed (tag at-3_1_11-1_fc13).

FWIW, Solaris uses $SHELL.

Comment 1 Marcela Mašláňová 2011-06-10 12:30:31 UTC
Looks like I dropped this patch, when I was updating to at-3.10. I'll look at it if it's possible to re-add it without harm.

Comment 2 Marcela Mašláňová 2011-06-10 12:53:13 UTC
You could test this scratch build if it's doing what is expected:
http://koji.fedoraproject.org/koji/taskinfo?taskID=3123467

Comment 3 Martin Simmons 2011-06-16 12:26:20 UTC
Thanks, that scratch build works for me.

Comment 4 Marcela Mašláňová 2011-06-16 12:54:41 UTC
I have more bugs to fix, so I'll prepare update later.

Comment 5 Fedora Update System 2011-07-20 11:15:36 UTC
at-3.1.12-6.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/at-3.1.12-6.fc14

Comment 6 Fedora Update System 2011-07-20 11:35:05 UTC
at-3.1.12-9.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/at-3.1.12-9.fc15

Comment 7 Fedora Update System 2011-07-31 03:42:28 UTC
at-3.1.12-9.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2011-08-31 01:22:18 UTC
at-3.1.12-6.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.