use default security context in install(#319231) + some colorls sh/csh
optimalizations(#433189, #433190)
This commit is contained in:
parent
af063ec155
commit
6feaf70251
@ -40,6 +40,6 @@ endif
|
||||
unset color_none
|
||||
|
||||
finish:
|
||||
alias ll 'ls -l --color=tty'
|
||||
alias l. 'ls -d .* --color=tty'
|
||||
alias ls 'ls --color=tty'
|
||||
alias ll 'ls -l --color=auto'
|
||||
alias l. 'ls -d .* --color=auto'
|
||||
alias ls 'ls --color=auto'
|
||||
|
@ -1,25 +1,40 @@
|
||||
# color-ls initialization
|
||||
|
||||
#do not override user LS_COLORS, but use them.
|
||||
if [ -z "$LS_COLORS" ]; then
|
||||
#do not override user LS_COLORS, so perform only for zero sized LS_COLORS
|
||||
|
||||
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 "/etc/DIR_COLORS.256color" ] && \
|
||||
[ "`tput colors 2>/dev/null`" == "256" ] && \
|
||||
COLORS="/etc/DIR_COLORS.256color"
|
||||
[ -e "$HOME/.dircolors" ] && COLORS="$HOME/.dircolors"
|
||||
[ -e "$HOME/.dir_colors" ] && COLORS="$HOME/.dir_colors"
|
||||
[ -e "$HOME/.dircolors.$TERM" ] && COLORS="$HOME/.dircolors.$TERM"
|
||||
[ -e "$HOME/.dir_colors.$TERM" ] && COLORS="$HOME/.dir_colors.$TERM"
|
||||
[ -e "$COLORS" ] || return
|
||||
|
||||
# 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
|
||||
|
||||
[ -z "$COLORS" ] && [ -e "/etc/DIR_COLORS.256color" ] && \
|
||||
[ "`tput colors 2>/dev/null`" == "256" ] && \
|
||||
COLORS="/etc/DIR_COLORS.256color"
|
||||
|
||||
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=tty' 2>/dev/null
|
||||
alias l.='ls -d .* --color=tty' 2>/dev/null
|
||||
alias ls='ls --color=tty' 2>/dev/null
|
||||
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
|
||||
|
@ -489,6 +489,37 @@ diff -urp coreutils-6.10-orig/src/install.c coreutils-6.10/src/install.c
|
||||
x->recursive = false;
|
||||
x->sparse_mode = SPARSE_AUTO;
|
||||
x->symbolic_link = false;
|
||||
@@ -199,7 +199,6 @@ cp_option_init (struct cp_options *x)
|
||||
x->src_info = NULL;
|
||||
}
|
||||
|
||||
-#ifdef ENABLE_WHEN_MATCHPATHCON_IS_MORE_EFFICIENT
|
||||
/* Modify file context to match the specified policy.
|
||||
If an error occurs the file will remain with the default directory
|
||||
context. */
|
||||
@@ -266,13 +265,6 @@ setdefaultfilecon (char const *file)
|
||||
freecon (scontext);
|
||||
return;
|
||||
}
|
||||
-#else
|
||||
-static void
|
||||
-setdefaultfilecon (char const *file)
|
||||
-{
|
||||
- (void) file;
|
||||
-}
|
||||
-#endif
|
||||
|
||||
/* FILE is the last operand of this command. Return true if FILE is a
|
||||
directory. But report an error there is a problem accessing FILE,
|
||||
@@ -346,7 +338,7 @@ main (int argc, char **argv)
|
||||
we'll actually use backup_suffix_string. */
|
||||
backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
|
||||
|
||||
- while ((optc = getopt_long (argc, argv, "bcsDdg:m:o:pt:TvS:Z:", long_options,
|
||||
+ while ((optc = getopt_long (argc, argv, "bcsDdg:m:o:pPt:TvS:Z:", long_options,
|
||||
NULL)) != -1)
|
||||
{
|
||||
switch (optc)
|
||||
@@ -408,6 +409,7 @@ main (int argc, char **argv)
|
||||
no_target_directory = true;
|
||||
break;
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: The GNU core utilities: a set of tools commonly used in shell scripts
|
||||
Name: coreutils
|
||||
Version: 6.10
|
||||
Release: 7%{?dist}
|
||||
Release: 8%{?dist}
|
||||
License: GPLv3+
|
||||
Group: System Environment/Base
|
||||
Url: http://www.gnu.org/software/coreutils/
|
||||
@ -291,6 +291,12 @@ fi
|
||||
/sbin/runuser
|
||||
|
||||
%changelog
|
||||
* Mon Feb 18 2008 Ondrej Vasik <ovasik@redhat.com> - 6.10-8
|
||||
- use default security context in install - broken by
|
||||
coreutils-6.10 update(#319231)
|
||||
- some sh/csh scripts optimalizations(by ville.skytta@iki.fi,
|
||||
- #433189, #433190)
|
||||
|
||||
* Mon Feb 11 2008 Ondrej Vasik <ovasik@redhat.com> - 6.10-7
|
||||
- keep old csh/sh usermodified colorls shell scripts
|
||||
but use the new ones(#432154)
|
||||
|
Loading…
Reference in New Issue
Block a user