- Removed unnecessary stuff in pre scriptlet (bug #225655).

- Prefix sources with 'coreutils-' (bug #225655).
This commit is contained in:
Tim Waugh 2007-02-14 12:33:54 +00:00
parent 5c114c6e46
commit 8eac3d1f21
8 changed files with 277 additions and 17 deletions

101
coreutils-DIR_COLORS Normal file
View File

@ -0,0 +1,101 @@
# Configuration file for the color ls utility
# This file goes in the /etc directory, and must be world readable.
# You can copy this file to .dir_colors in your $HOME directory to override
# the system defaults.
# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not
# pipes. 'all' adds color characters to all output. 'none' shuts colorization
# off.
COLOR tty
# Extra command line options for ls go here.
# Basically these ones are:
# -F = show '/' for dirs, '*' for executables, etc.
# -T 0 = don't trust tab spacing when formatting ls output.
OPTIONS -F -T 0
# Below, there should be one TERM entry for each termtype that is colorizable
TERM linux
TERM console
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM cons25
TERM xterm
TERM rxvt
TERM xterm-color
TERM color-xterm
TERM vt100
TERM dtterm
TERM color_xterm
TERM ansi
TERM screen
TERM screen.linux
TERM kon
TERM kterm
TERM gnome
TERM konsole
# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
EIGHTBIT 1
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
NORMAL 00 # global default, although everything should be something.
FILE 00 # normal file
DIR 01;34 # directory
LINK 01;36 # symbolic link
FIFO 40;33 # pipe
SOCK 01;35 # socket
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 01;05;37;41 # orphaned syminks
MISSING 01;05;37;41 # ... and the files they point to
# This is for files with execute permission:
EXEC 01;32
# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')
.cmd 01;32 # executables (bright green)
.exe 01;32
.com 01;32
.btm 01;32
.bat 01;32
.sh 01;32
.csh 01;32
.tar 01;31 # archives or compressed (bright red)
.tgz 01;31
.arj 01;31
.taz 01;31
.lzh 01;31
.zip 01;31
.z 01;31
.Z 01;31
.gz 01;31
.bz2 01;31
.bz 01;31
.tz 01;31
.rpm 01;31
.cpio 01;31
.jpg 01;35 # image formats
.gif 01;35
.bmp 01;35
.xbm 01;35
.xpm 01;35
.png 01;35
.tif 01;35

View File

@ -0,0 +1,94 @@
# Configuration file for the color ls utility
# This file goes in the /etc directory, and must be world readable.
# You can copy this file to .dir_colors in your $HOME directory to override
# the system defaults.
# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not
# pipes. 'all' adds color characters to all output. 'none' shuts colorization
# off.
COLOR tty
# Extra command line options for ls go here.
# Basically these ones are:
# -F = show '/' for dirs, '*' for executables, etc.
# -T 0 = don't trust tab spacing when formatting ls output.
OPTIONS -F -T 0
# Below, there should be one TERM entry for each termtype that is colorizable
TERM linux
TERM console
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM cons25
TERM xterm
TERM rxvt
TERM xterm-color
TERM color-xterm
TERM vt100
TERM dtterm
TERM color_xterm
# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
EIGHTBIT 1
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
NORMAL 00 # global default, although everything should be something.
FILE 00 # normal file
DIR 00;34 # directory
LINK 00;36 # symbolic link
FIFO 40;33 # pipe
SOCK 00;35 # socket
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 01;05;37;41 # orphaned syminks
MISSING 01;05;37;41 # ... and the files they point to
# This is for files with execute permission:
EXEC 00;32
# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')
.cmd 00;32 # executables (green)
.exe 00;32
.com 00;32
.btm 00;32
.bat 00;32
.sh 00;32
.csh 00;32
.tar 00;31 # archives or compressed (red)
.tgz 00;31
.arj 00;31
.taz 00;31
.lzh 00;31
.zip 00;31
.z 00;31
.Z 00;31
.gz 00;31
.bz2 00;31
.bz 00;31
.tz 00;31
.rpm 00;31
.cpio 00;31
.jpg 00;35 # image formats
.gif 00;35
.bmp 00;35
.xbm 00;35
.xpm 00;35
.png 00;35
.tif 00;35

32
coreutils-colorls.csh Executable file
View File

@ -0,0 +1,32 @@
# color-ls initialization
alias ll 'ls -l'
alias l. 'ls -d .*'
set COLORS=/etc/DIR_COLORS
if ($?TERM) then
if ( -e "/etc/DIR_COLORS.$TERM" ) set COLORS="/etc/DIR_COLORS.$TERM"
endif
if ( -f ~/.dircolors ) set COLORS=~/.dircolors
if ($?TERM) then
if ( -f ~/.dircolors."$TERM" ) set COLORS=~/.dircolors."$TERM"
endif
if ( -f ~/.dir_colors ) set COLORS=~/.dir_colors
if ($?TERM) then
if ( -f ~/.dir_colors."$TERM" ) set COLORS=~/.dir_colors."$TERM"
endif
if ( ! -e "$COLORS" ) exit
eval `dircolors -c $COLORS`
if ( "$LS_COLORS" == '' ) then
exit
endif
set color_none=`sed -n '/^COLOR.*none/Ip' < $COLORS`
if ( "$color_none" == '' ) then
alias ll 'ls -l --color=tty'
alias l. 'ls -d .* --color=tty'
alias ls 'ls --color=tty'
endif
unset color_none

21
coreutils-colorls.sh Executable file
View File

@ -0,0 +1,21 @@
# color-ls initialization
alias ll='ls -l' 2>/dev/null
alias l.='ls -d .*' 2>/dev/null
COLORS=/etc/DIR_COLORS
[ -e "/etc/DIR_COLORS.$TERM" ] && COLORS="/etc/DIR_COLORS.$TERM"
[ -e "$HOME/.dircolors" ] && COLORS="$HOME/.dircolors"
[ -e "$HOME/.dircolors.$TERM" ] && COLORS="$HOME/.dircolors.$TERM"
[ -e "$HOME/.dir_colors" ] && COLORS="$HOME/.dir_colors"
[ -e "$HOME/.dir_colors.$TERM" ] && COLORS="$HOME/.dir_colors.$TERM"
[ -e "$COLORS" ] || return
eval `dircolors --sh "$COLORS"`
[ -z "$LS_COLORS" ] && return
if ! egrep -qi "^COLOR.*none" $COLORS >/dev/null 2>/dev/null ; then
alias ll='ls -l --color=tty' 2>/dev/null
alias l.='ls -d .* --color=tty' 2>/dev/null
alias ls='ls --color=tty' 2>/dev/null
fi

4
coreutils-runuser-l.pamd Normal file
View File

@ -0,0 +1,4 @@
#%PAM-1.0
auth include runuser
session optional pam_keyinit.so force revoke
session include runuser

5
coreutils-runuser.pamd Normal file
View File

@ -0,0 +1,5 @@
#%PAM-1.0
auth sufficient pam_rootok.so
session optional pam_keyinit.so revoke
session required pam_limits.so
session required pam_unix.so

6
coreutils-su-l.pamd Normal file
View File

@ -0,0 +1,6 @@
#%PAM-1.0
auth include su
account include su
password include su
session optional pam_keyinit.so force revoke
session include su

View File

@ -7,14 +7,14 @@ Group: System Environment/Base
Url: http://www.gnu.org/software/coreutils/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.bz2
Source101: DIR_COLORS
Source102: DIR_COLORS.xterm
Source105: colorls.sh
Source106: colorls.csh
Source200: su.pamd
Source201: runuser.pamd
Source202: su-l.pamd
Source203: runuser-l.pamd
Source101: coreutils-DIR_COLORS
Source102: coreutils-DIR_COLORS.xterm
Source105: coreutils-colorls.sh
Source106: coreutils-colorls.csh
Source200: coreutils-su.pamd
Source201: coreutils-runuser.pamd
Source202: coreutils-su-l.pamd
Source203: coreutils-runuser-l.pamd
# From upstream
@ -188,18 +188,13 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
rm -rf $RPM_BUILD_ROOT
%pre
# Remove these old glibc files on upgrade (bug #84090).
for file in $(find %{_datadir}/locale -type f -name LC_TIME); do
[ -x /bin/rm ] && /bin/rm -f "$file"
done
# We must desinstall theses info files since they're merged in
# coreutils.info. else their postun'll be runned too last
# and install-info'll faill badly because of doubles
# We must deinstall these info files since they're merged in
# coreutils.info. else their postun'll be run too late
# and install-info will fail badly because of duplicates
for file in sh-utils.info textutils.info fileutils.info; do
if [ -f %{_infodir}/$file.bz2 ]; then
/sbin/install-info %{_infodir}/$file.bz2 --dir=%{_infodir}/dir --remove &> /dev/null || :
fi
fi
done
%preun
@ -266,6 +261,8 @@ fi
%changelog
* Wed Feb 14 2007 Tim Waugh <twaugh@redhat.com>
- Removed unnecessary stuff in pre scriptlet (bug #225655).
- Prefix sources with 'coreutils-' (bug #225655).
- Avoid %%makeinstall (bug #225655).
* Tue Feb 13 2007 Tim Waugh <twaugh@redhat.com> 6.7-4