From 8eac3d1f21d7184ac3fb5337df5f2986415d4c33 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Feb 14 2007 12:33:54 +0000 Subject: - Removed unnecessary stuff in pre scriptlet (bug #225655). - Prefix sources with 'coreutils-' (bug #225655). --- diff --git a/coreutils-DIR_COLORS b/coreutils-DIR_COLORS new file mode 100644 index 0000000..317c0e0 --- /dev/null +++ b/coreutils-DIR_COLORS @@ -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 diff --git a/coreutils-DIR_COLORS.xterm b/coreutils-DIR_COLORS.xterm new file mode 100644 index 0000000..3fa9828 --- /dev/null +++ b/coreutils-DIR_COLORS.xterm @@ -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 diff --git a/coreutils-colorls.csh b/coreutils-colorls.csh new file mode 100755 index 0000000..f2e9b12 --- /dev/null +++ b/coreutils-colorls.csh @@ -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 diff --git a/coreutils-colorls.sh b/coreutils-colorls.sh new file mode 100755 index 0000000..ff9ac6a --- /dev/null +++ b/coreutils-colorls.sh @@ -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 diff --git a/coreutils-runuser-l.pamd b/coreutils-runuser-l.pamd new file mode 100644 index 0000000..fa1e4d8 --- /dev/null +++ b/coreutils-runuser-l.pamd @@ -0,0 +1,4 @@ +#%PAM-1.0 +auth include runuser +session optional pam_keyinit.so force revoke +session include runuser diff --git a/coreutils-runuser.pamd b/coreutils-runuser.pamd new file mode 100644 index 0000000..37f0e84 --- /dev/null +++ b/coreutils-runuser.pamd @@ -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 diff --git a/coreutils-su-l.pamd b/coreutils-su-l.pamd new file mode 100644 index 0000000..656a139 --- /dev/null +++ b/coreutils-su-l.pamd @@ -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 diff --git a/coreutils.spec b/coreutils.spec index b9c5c9b..dc0aeb4 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -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 +- Removed unnecessary stuff in pre scriptlet (bug #225655). +- Prefix sources with 'coreutils-' (bug #225655). - Avoid %%makeinstall (bug #225655). * Tue Feb 13 2007 Tim Waugh 6.7-4