Resolves: #1830318 - do not install /etc/DIR_COLORS.256color

This commit is contained in:
Kamil Dudka 2020-08-17 12:46:51 +02:00
parent 5d08d14bbc
commit 441f1d7519
2 changed files with 9 additions and 122 deletions

View File

@ -4,10 +4,9 @@ Date: Fri, 17 Jun 2016 16:58:18 +0200
Subject: [PATCH] downstream changes to default DIR_COLORS Subject: [PATCH] downstream changes to default DIR_COLORS
--- ---
DIR_COLORS | 9 ++++- DIR_COLORS | 9 ++++++++-
DIR_COLORS.256color | 78 ++++++++++++++++++++--------------------- DIR_COLORS.lightbgcolor | 21 +++++++++++++++------
DIR_COLORS.lightbgcolor | 21 +++++++---- 2 files changed, 23 insertions(+), 7 deletions(-)
3 files changed, 61 insertions(+), 47 deletions(-)
diff --git a/DIR_COLORS b/DIR_COLORS diff --git a/DIR_COLORS b/DIR_COLORS
index bd5df23..84f2417 100644 index bd5df23..84f2417 100644
@ -40,115 +39,6 @@ index bd5df23..84f2417 100644
SETUID 37;41 # file that is setuid (u+s) SETUID 37;41 # file that is setuid (u+s)
SETGID 30;43 # file that is setgid (g+s) SETGID 30;43 # file that is setgid (g+s)
CAPABILITY 30;41 # file with capability CAPABILITY 30;41 # file with capability
diff --git a/DIR_COLORS.256color b/DIR_COLORS.256color
index 85bd28d..7f6d4c8 100644
--- a/DIR_COLORS.256color
+++ b/DIR_COLORS.256color
@@ -1,3 +1,9 @@
+# Configuration file for the 256color 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.
+
# Configuration file for dircolors, a utility to help you set the
# LS_COLORS environment variable used by GNU ls with the --color option.
@@ -8,32 +14,13 @@
# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
# slackware version of dircolors) are recognized but ignored.
+# For compatibility, the pattern "^COLOR.*none" is recognized as a way to
+# disable colorization. See https://bugzilla.redhat.com/1349579 for details.
+
# Below are TERM entries, which can be a glob patterns, to match
# against the TERM environment variable to determine if it is colorizable.
-TERM Eterm
-TERM ansi
-TERM *color*
-TERM con[0-9]*x[0-9]*
-TERM cons25
-TERM console
-TERM cygwin
-TERM dtterm
-TERM gnome
-TERM hurd
-TERM jfbterm
-TERM konsole
-TERM kterm
-TERM linux
-TERM linux-c
-TERM mlterm
-TERM putty
-TERM rxvt*
-TERM screen*
-TERM st
-TERM terminator
-TERM tmux*
-TERM vt100
-TERM xterm*
+TERM *256color*
+TERM rxvt-unicode256
# Below are the color init strings for the basic file types.
# One can use codes for 256 or more colors supported by modern terminals.
@@ -45,29 +32,40 @@ TERM xterm*
# 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
+# Text color(256 colors mode) codes:
+# Valid syntax for text 256color is 38;5;<color number> , where color number
+# is number between 0 and 255.
+# You may find following command useful to search the best one for you:
+# for ((x=0; x<=255; x++));do echo -e "${x}:\033[38;5;${x}mcolor\033[000m";done
+# Background color(256 colors mode) codes:
+# Valid syntax for background 256color is 48;5;<color number> , where
+# color number is number between 0 and 255.
+# You may find following command useful to search the best one for you:
+# for ((x=0; x<=255; x++));do echo -e "${x}:\033[48;5;${x}mcolor\033[000m";done
+
#NORMAL 00 # no color code at all
#FILE 00 # regular file: use no color at all
RESET 0 # reset to "normal" color
-DIR 01;34 # directory
-LINK 01;36 # symbolic link. (If you set this to 'target' instead of a
+DIR 38;5;33 # directory
+LINK 38;5;51 # symbolic link. (If you set this to 'target' instead of a
# numerical value, the color is as for the file pointed to.)
MULTIHARDLINK 00 # regular file with more than one link
-FIFO 40;33 # pipe
-SOCK 01;35 # socket
-DOOR 01;35 # door
-BLK 40;33;01 # block device driver
-CHR 40;33;01 # character device driver
-ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file ...
-MISSING 00 # ... and the files they point to
-SETUID 37;41 # file that is setuid (u+s)
-SETGID 30;43 # file that is setgid (g+s)
-CAPABILITY 30;41 # file with capability
-STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)
-OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
-STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
+FIFO 40;38;5;11 # pipe
+SOCK 38;5;13 # socket
+DOOR 38;5;5 # door
+BLK 48;5;232;38;5;11 # block device driver
+CHR 48;5;232;38;5;3 # character device driver
+ORPHAN 48;5;232;38;5;9 # symlink to nonexistent file, or non-stat'able file ...
+MISSING 01;37;41 # ... and the files they point to
+SETUID 48;5;196;38;5;15 # file that is setuid (u+s)
+SETGID 48;5;11;38;5;16 # file that is setgid (g+s)
+CAPABILITY 48;5;196;38;5;226 # file with capability
+STICKY_OTHER_WRITABLE 48;5;10;38;5;16 # dir that is sticky and other-writable (+t,o+w)
+OTHER_WRITABLE 48;5;10;38;5;21 # dir that is other-writable (o+w) and not sticky
+STICKY 48;5;21;38;5;15 # dir with the sticky bit set (+t) and not other-writable
# This is for files with execute permission:
-EXEC 01;32
+EXEC 38;5;40
# 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.
diff --git a/DIR_COLORS.lightbgcolor b/DIR_COLORS.lightbgcolor diff --git a/DIR_COLORS.lightbgcolor b/DIR_COLORS.lightbgcolor
index 4316832..6402854 100644 index 4316832..6402854 100644
--- a/DIR_COLORS.lightbgcolor --- a/DIR_COLORS.lightbgcolor

View File

@ -1,7 +1,7 @@
Summary: A set of basic GNU tools commonly used in shell scripts Summary: A set of basic GNU tools commonly used in shell scripts
Name: coreutils Name: coreutils
Version: 8.32 Version: 8.32
Release: 11%{?dist} Release: 12%{?dist}
License: GPLv3+ License: GPLv3+
Url: https://www.gnu.org/software/coreutils/ Url: https://www.gnu.org/software/coreutils/
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
@ -140,17 +140,12 @@ including documentation and translations.
sed src/dircolors.hin \ sed src/dircolors.hin \
-e 's| 00;36$| 01;36|' \ -e 's| 00;36$| 01;36|' \
> DIR_COLORS > DIR_COLORS
sed src/dircolors.hin \
-e 's| 01;31$| 38;5;9|' \
-e 's| 01;35$| 38;5;13|' \
-e 's| 01;36$| 38;5;45|' \
> DIR_COLORS.256color
sed src/dircolors.hin \ sed src/dircolors.hin \
-e 's| 01;31$| 00;31|' \ -e 's| 01;31$| 00;31|' \
-e 's| 01;35$| 00;35|' \ -e 's| 01;35$| 00;35|' \
> DIR_COLORS.lightbgcolor > DIR_COLORS.lightbgcolor
# git add DIR_COLORS{,.256color,.lightbgcolor} # git add DIR_COLORS{,.lightbgcolor}
# git commit -m "clone DIR_COLORS before patching" # git commit -m "clone DIR_COLORS before patching"
# apply all patches # apply all patches
@ -242,8 +237,7 @@ for type in separate single; do
done done
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
install -p -c -m644 DIR_COLORS{,.256color,.lightbgcolor} \ install -p -c -m644 DIR_COLORS{,.lightbgcolor} $RPM_BUILD_ROOT%{_sysconfdir}
$RPM_BUILD_ROOT%{_sysconfdir}
install -p -c -m644 %SOURCE105 $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/colorls.sh install -p -c -m644 %SOURCE105 $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/colorls.sh
install -p -c -m644 %SOURCE106 $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/colorls.csh install -p -c -m644 %SOURCE106 $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/colorls.csh
@ -278,6 +272,9 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
%license COPYING %license COPYING
%changelog %changelog
* Mon Aug 17 2020 Kamil Dudka <kdudka@redhat.com> - 8.32-12
- do not install /etc/DIR_COLORS.256color (#1830318)
* Thu Jul 30 2020 Kamil Dudka <kdudka@redhat.com> - 8.32-11 * Thu Jul 30 2020 Kamil Dudka <kdudka@redhat.com> - 8.32-11
- cp: default to --reflink=auto (#1861108) - cp: default to --reflink=auto (#1861108)