Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. 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#4766 - /etc/profile shouldn't contain bash specific statements

Attached to Project: Arch Linux
Opened by Simon Morgan (sjmorgan) - Friday, 02 June 2006, 15:24 GMT-4
Last edited by Roman Kyrylych (Romashka) - Saturday, 09 February 2008, 10:06 GMT-4
Task Type Bug Report
Category System
Status Closed
Assigned To Aaron Griffin (phrakture)
Operating System All
Severity Low
Priority Normal
Reported Version 0.7.2 Gimmick
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

/etc/profile is sourced by a lot of shells so putting bash specific statements in it such as:

export PS1='[\u@\h \W]\$ '

makes no sense. For instance try installing zsh and logging back in.
This task depends upon

View Dependency Graph

Closed by  Roman Kyrylych (Romashka)
Saturday, 09 February 2008, 10:06 GMT-4
Reason for closing:  Fixed
Comment by Roman Kyrylych (Romashka) - Saturday, 03 June 2006, 08:54 GMT-4
Currently, /etc/profile is owned by bash package, so other shells should have their own /etc/profile.

I suggest the following:
1) move /etc/skel/.bashrc and /etc/skel/.bash_profile from filesystem package into bash package
2) move these lines from /etc/profile to /etc/skel/.bash_profile:
export PS1='[\u@\h \W]\$ '
export PS2='> '
if [ "$TERM" = "xterm" -o "$TERM" = "xterm-color" -o "$TERM" = "rxvt" -o "$TERM" = "xterm-xfree86" ]; then
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
fi
3) move /etc/profile to filesystem package
Comment by Roman Kyrylych (Romashka) - Saturday, 03 June 2006, 08:58 GMT-4
The same for /root/.bashrc and /root/.bash_profile
Comment by Roman Kyrylych (Romashka) - Saturday, 08 July 2006, 06:08 GMT-4
Status?
Will this be changed?
Comment by Judd Vinet (judd) - Tuesday, 25 July 2006, 18:42 GMT-4
Which other shells try to run /etc/profile?

Isn't "export" itself a bash-specific statement? Or bourne-specific, anyway?
Comment by Roman Kyrylych (Romashka) - Wednesday, 26 July 2006, 02:02 GMT-4
What "dot" files do the various shells use?
http://www.faqs.org/faqs/unix-faq/faq/part5/section-6.html

ksh uses /etc/profile and .profile
Maybe newer versions of other shells too, I don't know.

Anyway I find moving all bash dot-files from filesystem to bash package more logical.


P.S.: What about LANG in /etc/profile? (I wrote about it in my last e-mail message to you)
Comment by Simon Morgan (sjmorgan) - Wednesday, 26 July 2006, 06:44 GMT-4
As I stated in my original message, zsh also uses /etc/profile. Although that page fails to mention it.
Comment by Andrea Garbarini (garba) - Saturday, 23 December 2006, 09:22 GMT-4
and what about simply telling the user "it's up to you to properly amend /etc/profile depending on the shells you are gonna install at your site"? :) the less /etc/ stuff comes with a package, the better, IMO
Comment by Andrea Garbarini (garba) - Saturday, 23 December 2006, 09:24 GMT-4
sorry i meant "the less the /etc stuff that comes..."
Comment by Holger Jorra (Trac3R) - Monday, 12 February 2007, 14:22 GMT-4
Well, look how Suse does it (attached). It looks like, /etc/profile is being read by many shells.
By the way, the /etc/inputrc should also include more stuff (commented maybe, so you can uncomment it if you want) and maybe there should also be a working history where every command is saved only one time. Otherwise the history is pretty unusable since half of the ~/.bash_history file is full of "su -" "ls" and "cd". Only FreeBSD's history is worse... I don't believe that this is against the K.I.S.S. principle.

I wanted to write a feature request now, but I think it also fits in here.
   profile (7.4 KiB)
   inputrc (5.1 KiB)
Comment by Roman Kyrylych (Romashka) - Sunday, 13 May 2007, 08:13 GMT-4
phrakture: i saw you already did some filesystem/bash/xorg-init cleanup. Please fix this one too.
Comment by Aaron Griffin (phrakture) - Monday, 14 May 2007, 12:20 GMT-4
Roman: I'll try. This one is far more complex, and requires lots more testing - but I'll get to it at some point - the other packages were tested by myself, dan, and maybe some other people for a few weeks before I made the move.
Comment by Grigorios Bouzakis (dolby) - Wednesday, 09 January 2008, 21:34 GMT-4
what will happen when new bash enters core? is there gonna be an /etc/profile package provided by any other package?
i am asking cause /etc/profile now provides much more than the /etc/profile.bash from bash in testing.
especially sourcing the /etc/profile.d files. the one in testing doesnt have that at all
Comment by Roman Kyrylych (Romashka) - Thursday, 10 January 2008, 05:19 GMT-4
shell-independent /etc/profile is provided by the filesystem package
Comment by Aaron Griffin (phrakture) - Thursday, 10 January 2008, 12:06 GMT-4
@dolby: It is in the filesystem package, but is pending the pacman 3.1 release. There was an issue with pacman 3.0's backup handling when backup files change hands.

Loading...