diff --git a/coreutils-5.2.1-runuser.patch b/coreutils-5.2.1-runuser.patch index b64dbfe..88b1db1 100644 --- a/coreutils-5.2.1-runuser.patch +++ b/coreutils-5.2.1-runuser.patch @@ -330,7 +330,7 @@ +to set user ID, the command will fail. +.TP +-, \fB\-l\fR, \fB\-\-login\fR -+make the shell a login shell ++make the shell a login shell, uses runuser-l PAM file instead of default one. +.TP +\fB\-c\fR, \fB\-\-commmand\fR=\fICOMMAND\fR +pass a single COMMAND to the shell with \fB\-c\fR diff --git a/coreutils-6.9-longoptions.patch b/coreutils-6.9-longoptions.patch new file mode 100644 index 0000000..f66b96d --- /dev/null +++ b/coreutils-6.9-longoptions.patch @@ -0,0 +1,27 @@ +diff -urp coreutils-6.9-orig/src/echo.c coreutils-6.9/src/echo.c +--- coreutils-6.9-orig/src/echo.c ++++ coreutils-6.9/src/echo.c +@@ -163,6 +163,10 @@ main (int argc, char **argv) + { + case 'e': case 'E': case 'n': + break; ++ case '-': ++ /* end of short options(allows to print -n,-e or -E) */ ++ argc--; ++ argv++; + default: + goto just_echo; + } +diff -urp coreutils-6.9-orig/lib/long-options.c coreutils-6.9/lib/long-options.c +--- coreutils-6.9-orig/lib/long-options.c ++++ coreutils-6.9/lib/long-options.c +@@ -57,8 +57,7 @@ parse_long_options (int argc, + /* Don't print an error message for unrecognized options. */ + opterr = 0; + +- if (argc == 2 +- && (c = getopt_long (argc, argv, "+", long_options, NULL)) != -1) ++ while ((c = getopt_long (argc, argv, "+", long_options, NULL)) != -1) + { + switch (c) + { diff --git a/coreutils-DIR_COLORS b/coreutils-DIR_COLORS index 317c0e0..179b5e3 100644 --- a/coreutils-DIR_COLORS +++ b/coreutils-DIR_COLORS @@ -15,8 +15,9 @@ COLOR tty OPTIONS -F -T 0 # Below, there should be one TERM entry for each termtype that is colorizable -TERM linux -TERM console +TERM Eterm +TERM ansi +TERM color-xterm TERM con132x25 TERM con132x30 TERM con132x43 @@ -28,20 +29,34 @@ TERM con80x43 TERM con80x50 TERM con80x60 TERM cons25 -TERM xterm -TERM rxvt -TERM xterm-color -TERM color-xterm -TERM vt100 +TERM console +TERM cygwin TERM dtterm -TERM color_xterm -TERM ansi -TERM screen -TERM screen.linux -TERM kon -TERM kterm +TERM eterm-color TERM gnome TERM konsole +TERM kterm +TERM linux +TERM linux-c +TERM mach-color +TERM mlterm +TERM putty +TERM rxvt +TERM rxvt-cygwin +TERM rxvt-cygwin-native +TERM rxvt-unicode +TERM screen +TERM screen-256color +TERM screen-bce +TERM screen-w +TERM screen.linux +TERM vt100 +TERM xterm +TERM xterm-16color +TERM xterm-256color +TERM xterm-88color +TERM xterm-color +TERM xterm-debian # EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output) EIGHTBIT 1 @@ -78,24 +93,71 @@ EXEC 01;32 .bat 01;32 .sh 01;32 .csh 01;32 -.tar 01;31 # archives or compressed (bright red) +# archives or compressed (bright red) +.tar 01;31 .tgz 01;31 +.svgz 01;31 .arj 01;31 .taz 01;31 .lzh 01;31 +.lzma 01;31 .zip 01;31 .z 01;31 .Z 01;31 +.dz 01;31 .gz 01;31 .bz2 01;31 +.tbz2 01;31 .bz 01;31 .tz 01;31 +.deb 01;31 .rpm 01;31 +.jar 01;31 +.rar 01;31 +.ace 01;31 +.zoo 01;31 .cpio 01;31 -.jpg 01;35 # image formats +.7z 01;31 +.rz 01;31 +# image formats (magenta) +.jpg 01;35 +.jpeg 01;35 .gif 01;35 .bmp 01;35 +.pbm 01;35 +.pgm 01;35 +.ppm 01;35 +.tga 01;35 .xbm 01;35 .xpm 01;35 -.png 01;35 .tif 01;35 +.tiff 01;35 +.png 01;35 +.mng 01;35 +.pcx 01;35 +.mov 01;35 +.mpg 01;35 +.mpeg 01;35 +.m2v 01;35 +.mkv 01;35 +.ogm 01;35 +.mp4 01;35 +.m4v 01;35 +.mp4v 01;35 +.vob 01;35 +.qt 01;35 +.nuv 01;35 +.wmv 01;35 +.asf 01;35 +.rm 01;35 +.rmvb 01;35 +.flc 01;35 +.avi 01;35 +.fli 01;35 +.gl 01;35 +.dl 01;35 +.xcf 01;35 +.xwd 01;35 +.yuv 01;35 +.svg 01;35 + diff --git a/coreutils-DIR_COLORS.xterm b/coreutils-DIR_COLORS.xterm index 3fa9828..ae0f386 100644 --- a/coreutils-DIR_COLORS.xterm +++ b/coreutils-DIR_COLORS.xterm @@ -29,7 +29,11 @@ TERM con80x50 TERM con80x60 TERM cons25 TERM xterm +TERM xterm-16color +TERM xterm-88color +TERM xterm-256color TERM rxvt +TERM rxvt-unicode TERM xterm-color TERM color-xterm TERM vt100 @@ -71,24 +75,70 @@ EXEC 00;32 .bat 00;32 .sh 00;32 .csh 00;32 -.tar 00;31 # archives or compressed (red) +# archives or compressed (red) +.tar 00;31 .tgz 00;31 +.svgz 00;31 .arj 00;31 .taz 00;31 .lzh 00;31 +.lzma 00;31 .zip 00;31 .z 00;31 .Z 00;31 +.dz 00;31 .gz 00;31 .bz2 00;31 +.tbz2 00;31 .bz 00;31 .tz 00;31 +.deb 00;31 .rpm 00;31 +.jar 00;31 +.rar 00;31 +.ace 00;31 +.zoo 00;31 .cpio 00;31 -.jpg 00;35 # image formats +.7z 00;31 +.rz 00;31 +# image formats +.jpg 00;35 +.jpeg 00;35 .gif 00;35 .bmp 00;35 +.pbm 00;35 +.pgm 00;35 +.ppm 00;35 +.tga 00;35 .xbm 00;35 .xpm 00;35 -.png 00;35 .tif 00;35 +.tiff 00;35 +.png 00;35 +.mng 00;35 +.pcx 00;35 +.mov 00;35 +.mpg 00;35 +.mpeg 00;35 +.m2v 00;35 +.mkv 00;35 +.ogm 00;35 +.mp4 00;35 +.m4v 00;35 +.mp4v 00;35 +.vob 00;35 +.qt 00;35 +.nuv 00;35 +.wmv 00;35 +.asf 00;35 +.rm 00;35 +.rmvb 00;35 +.flc 00;35 +.avi 00;35 +.fli 00;35 +.gl 00;35 +.dl 00;35 +.xcf 00;35 +.xwd 00;35 +.yuv 00;35 +.svg 00;35 diff --git a/coreutils-colorls.csh b/coreutils-colorls.csh index f2e9b12..ea2be8b 100755 --- a/coreutils-colorls.csh +++ b/coreutils-colorls.csh @@ -1,4 +1,11 @@ # color-ls initialization +if ( $?LS_COLORS ) then + if ( "$LS_COLORS" != "" ) then + #do not override user specified LS_COLORS and use them + goto finish + endif +endif + alias ll 'ls -l' alias l. 'ls -d .*' @@ -7,11 +14,9 @@ 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 ~/.dircolors."$TERM" ) set COLORS=~/.dircolors."$TERM" if ( -f ~/.dir_colors."$TERM" ) set COLORS=~/.dir_colors."$TERM" endif @@ -19,14 +24,16 @@ if ( ! -e "$COLORS" ) exit eval `dircolors -c $COLORS` -if ( "$LS_COLORS" == '' ) then - exit -endif +if ( "$LS_COLORS" == '' ) exit 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' +if ( "$color_none" != '' ) then + unset color_none + exit endif unset color_none + +finish: +alias ll 'ls -l --color=auto' +alias l. 'ls -d .* --color=auto' +alias ls 'ls --color=auto' diff --git a/coreutils-colorls.sh b/coreutils-colorls.sh index ff9ac6a..ed8a365 100755 --- a/coreutils-colorls.sh +++ b/coreutils-colorls.sh @@ -1,21 +1,36 @@ # 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 +#do not override user LS_COLORS, but use them. +if [ -z "$LS_COLORS" ]; then + + alias ll='ls -l' 2>/dev/null + alias l.='ls -d .*' 2>/dev/null + + + # Skip the rest for noninteractive shells. + [ -z "$PS1" ] && return + + COLORS= + + for colors in "$HOME/.dir_colors.$TERM" "$HOME/.dircolors.$TERM" \ + "$HOME/.dir_colors" "$HOME/.dircolors"; do + [ -e "$colors" ] && COLORS="$colors" && break + done + + if [ -z "$COLORS" ]; then + for colors in "/etc/DIR_COLORS.$TERM" "/etc/DIR_COLORS" ; do + [ -e "$colors" ] && COLORS="$colors" && break + done + fi + + # Existence of $COLORS already checked above. + [ -n "$COLORS" ] || return + + eval `dircolors --sh "$COLORS" 2>/dev/null` + [ -z "$LS_COLORS" ] && return + egrep -qi "^COLOR.*none" $COLORS >/dev/null 2>/dev/null && return fi + +alias ll='ls -l --color=auto' 2>/dev/null +alias l.='ls -d .* --color=auto' 2>/dev/null +alias ls='ls --color=auto' 2>/dev/null diff --git a/coreutils-split-pam.patch b/coreutils-split-pam.patch index 4d36447..f8596b4 100644 --- a/coreutils-split-pam.patch +++ b/coreutils-split-pam.patch @@ -28,3 +28,30 @@ diff -uNrp -x '*~' coreutils-5.97-orig/src/su.c coreutils-5.97/src/su.c PAM_BAIL_P; #ifndef RUNUSER +diff -urp coreutils-6.9-orig/doc/coreutils.info coreutils-6.10/doc/coreutils.info +--- coreutils-6.9-orig/doc/coreutils.info ++++ coreutils-6.9/doc/coreutils.info +@@ -11006,7 +11006,8 @@ options::. + set, even for the super-user, as described above), and set `PATH' + to a compiled-in default value. Change to USER's home directory. + Prepend `-' to the shell's name, intended to make it read its +- login startup file(s). ++ login startup file(s). When this option is given, /etc/pam.d/su-l ++ PAM file is used instead of the default one. + + `-m' + `-p' +diff -urp coreutils-6.10-orig/doc/coreutils.texi coreutils-6.10/doc/coreutils.texi +--- coreutils-6.9-orig/doc/coreutils.texi ++++ coreutils-6.9/doc/coreutils.texi +@@ -13670,7 +13670,9 @@ the exit status of @var{command} otherwi + + @command{su} allows one user to temporarily become another user. It runs a + command (often an interactive shell) with the real and effective user +-ID, group ID, and supplemental groups of a given @var{user}. Synopsis: ++ID, group ID, and supplemental groups of a given @var{user}. When the -l ++option is given, the su-l PAM file is used instead of the default su PAM file. ++Synopsis: + + @example + su [@var{option}]@dots{} [@var{user} [@var{arg}]@dots{}] diff --git a/coreutils.spec b/coreutils.spec index 54ef673..336d1db 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,7 +1,7 @@ Summary: The GNU core utilities: a set of tools commonly used in shell scripts Name: coreutils Version: 6.9 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2+ Group: System Environment/Base Url: http://www.gnu.org/software/coreutils/ @@ -25,6 +25,7 @@ Patch4: coreutils-6.9-du-ls-upstream.patch # Our patches Patch100: coreutils-chgrp.patch Patch101: coreutils-getdateYYYYMMDD.patch +Patch102: coreutils-6.9-longoptions.patch # sh-utils Patch703: sh-utils-2.0.11-dateman.patch @@ -98,6 +99,7 @@ the old GNU fileutils, sh-utils, and textutils packages. # Our patches %patch100 -p1 -b .chgrp %patch101 -p1 -b .getdate +%patch102 -p1 -b .longopts # sh-utils %patch703 -p1 -b .dateman @@ -283,6 +285,19 @@ fi /sbin/runuser %changelog +* Tue Mar 04 2008 Ondrej Vasik 6.9-7 +- su-l/runuser-l pam file usage a bit documented(#368721) +- added several missing colored TERMS(#239266) +- added several missing image/compressed file extensions +- some optimalizations of colorls.sh + (#430813, #430827, #430823, #430189, #433190) +- fix unability of echo to display certain strings( + added -- separator, #431005) , do not require only one + long_opt for certain commands like sleep, yes - but + use first usable (#431005) +- keep old csh/sh usermodified colorls shell scripts + (#432154) + * Wed Dec 05 2007 Ondrej Vasik 6.9-6 - fixed bug in handling YYYYMMDD date format with relative signed offset(#377821)