From 0ff3ba6c828bedd0637cbddd6b08148c048c78f0 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Fri, 11 Jul 2014 16:44:55 -0400 Subject: [PATCH 01/11] fix license handling --- coreutils.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/coreutils.spec b/coreutils.spec index 0d202ff..442b99b 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,7 +1,7 @@ Summary: A set of basic GNU tools commonly used in shell scripts Name: coreutils Version: 8.22 -Release: 16%{?dist} +Release: 17%{?dist} License: GPLv3+ Group: System Environment/Base Url: http://www.gnu.org/software/coreutils/ @@ -269,7 +269,9 @@ fi %dir %{_datadir}/locale/*/LC_TIME %config(noreplace) %{_sysconfdir}/DIR_COLORS* %config(noreplace) %{_sysconfdir}/profile.d/* -%doc COPYING ABOUT-NLS ChangeLog.bz2 NEWS README THANKS TODO old/* +%doc ABOUT-NLS ChangeLog.bz2 NEWS README THANKS TODO old/* +%{!?_licensedir:%global license %%doc} +%license COPYING %{_bindir}/arch %{_bindir}/basename %{_bindir}/cat @@ -377,6 +379,9 @@ fi %{_sbindir}/chroot %changelog +* Fri Jul 11 2014 Tom Callaway - 8.22-17 +- fix license handling + * Mon Jun 23 2014 Jakub Čajka - 8.22-16 - fix failed tests on ppc(backport from gnulib upstream) From 24edf96ffec1393fd33897adfcbbc67a5bc0e1f7 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sat, 16 Aug 2014 01:18:32 +0000 Subject: [PATCH 02/11] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- coreutils.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/coreutils.spec b/coreutils.spec index 442b99b..004efe9 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,7 +1,7 @@ Summary: A set of basic GNU tools commonly used in shell scripts Name: coreutils Version: 8.22 -Release: 17%{?dist} +Release: 18%{?dist} License: GPLv3+ Group: System Environment/Base Url: http://www.gnu.org/software/coreutils/ @@ -379,6 +379,9 @@ fi %{_sbindir}/chroot %changelog +* Sat Aug 16 2014 Fedora Release Engineering - 8.22-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Fri Jul 11 2014 Tom Callaway - 8.22-17 - fix license handling From 954ad06ef8922d8d6125277d33514bf75bd0a338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Va=C5=A1=C3=ADk?= Date: Wed, 15 Oct 2014 09:39:58 +0200 Subject: [PATCH 03/11] handle situation with ro /tmp in colorls scripts (#1149761) --- coreutils-colorls.csh | 10 +++++++++- coreutils-colorls.sh | 17 +++++++++++------ coreutils.spec | 5 ++++- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/coreutils-colorls.csh b/coreutils-colorls.csh index 5ed0f68..a146dd1 100755 --- a/coreutils-colorls.csh +++ b/coreutils-colorls.csh @@ -34,7 +34,14 @@ set INCLUDE="`cat "$COLORS" | grep '^INCLUDE' | cut -d ' ' -f2-`" if ( ! -e "$COLORS" ) exit -set _tmp="`mktemp .colorlsXXX --tmpdir=/tmp`" +set _tmp="`mktemp .colorlsXXX -q --tmpdir=/tmp`" +#if mktemp fails, exit when include was active, otherwise use $COLORS file +if ( "$_tmp" == '' ) then + if ( "$INCLUDE" == '' ) then + eval "`dircolors -c $COLORS`" + endif + goto cleanup +endif if ( "$INCLUDE" != '' ) cat "$INCLUDE" >> $_tmp grep -v '^INCLUDE' "$COLORS" >> $_tmp @@ -44,6 +51,7 @@ eval "`dircolors -c $_tmp`" rm -f $_tmp if ( "$LS_COLORS" == '' ) exit +cleanup: set color_none=`sed -n '/^COLOR.*none/Ip' < $COLORS` if ( "$color_none" != '' ) then unset color_none diff --git a/coreutils-colorls.sh b/coreutils-colorls.sh index 1308da9..f9484b3 100755 --- a/coreutils-colorls.sh +++ b/coreutils-colorls.sh @@ -32,14 +32,19 @@ if [ -z "$USER_LS_COLORS" ]; then # Existence of $COLORS already checked above. [ -n "$COLORS" ] || return - TMP="`mktemp .colorlsXXX --tmpdir=/tmp`" + if [ -e "$INCLUDE" ]; + then + TMP="`mktemp .colorlsXXX -q --tmpdir=/tmp`" + [ -z "$TMP" ] && return - [ -e "$INCLUDE" ] && cat "$INCLUDE" >> $TMP - grep -v '^INCLUDE' "$COLORS" >> $TMP + cat "$INCLUDE" >> $TMP + grep -v '^INCLUDE' "$COLORS" >> $TMP - eval "`dircolors --sh $TMP 2>/dev/null`" - - rm -f $TMP + eval "`dircolors --sh $TMP 2>/dev/null`" + rm -f $TMP + else + eval "`dircolors --sh $COLORS 2>/dev/null`" + fi [ -z "$LS_COLORS" ] && return grep -qi "^COLOR.*none" $COLORS >/dev/null 2>/dev/null && return diff --git a/coreutils.spec b/coreutils.spec index 004efe9..582bed7 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,7 +1,7 @@ Summary: A set of basic GNU tools commonly used in shell scripts Name: coreutils Version: 8.22 -Release: 18%{?dist} +Release: 19%{?dist} License: GPLv3+ Group: System Environment/Base Url: http://www.gnu.org/software/coreutils/ @@ -379,6 +379,9 @@ fi %{_sbindir}/chroot %changelog +* Wed Oct 15 2014 Ondrej Vasik - 8.22-19 +- handle situation with ro /tmp in colorls scripts (#1149761) + * Sat Aug 16 2014 Fedora Release Engineering - 8.22-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From 363fbbced1ba03c4aa7761daf022a9009e4de96c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Va=C5=A1=C3=ADk?= Date: Wed, 15 Oct 2014 10:20:14 +0200 Subject: [PATCH 04/11] fix the sorting in multibyte locales (NUL-terminate sort keys) - patch by Andreas Schwab (#1146185) --- coreutils-i18n.patch | 38 ++++++++++++++++++++++++++++++++++---- coreutils.spec | 2 ++ 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index 467750d..2efe93e 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -3132,7 +3132,7 @@ diff -urNp coreutils-8.22-orig/src/sort.c coreutils-8.22/src/sort.c else if (key->random) diff = compare_random (ta, tlena, tb, tlenb); else if (key->version) -@@ -2695,6 +3135,191 @@ keycompare (struct line const *a, struct +@@ -2695,6 +3135,209 @@ keycompare (struct line const *a, struct return key->reverse ? -diff : diff; } @@ -3237,6 +3237,9 @@ diff -urNp coreutils-8.22-orig/src/sort.c coreutils-8.22/src/sort.c + size_t lena = lima <= texta ? 0 : lima - texta; + size_t lenb = limb <= textb ? 0 : limb - textb; + ++ char enda IF_LINT (= 0); ++ char endb IF_LINT (= 0); ++ + char const *translate = key->translate; + bool const *ignore = key->ignore; + @@ -3254,6 +3257,12 @@ diff -urNp coreutils-8.22-orig/src/sort.c coreutils-8.22/src/sort.c + texta = copy_a; textb = copy_b; + lena = new_len_a; lenb = new_len_b; + } ++ else ++ { ++ /* Use the keys in-place, temporarily null-terminated. */ ++ enda = texta[lena]; texta[lena] = '\0'; ++ endb = textb[lenb]; textb[lenb] = '\0'; ++ } + + if (key->random) + diff = compare_random (texta, lena, textb, lenb); @@ -3277,13 +3286,22 @@ diff -urNp coreutils-8.22-orig/src/sort.c coreutils-8.22/src/sort.c + diff = 1; + else if (hard_LC_COLLATE && !folding) + { -+ diff = xmemcoll0 (texta, lena, textb, lenb); ++ diff = xmemcoll0 (texta, lena + 1, textb, lenb + 1); + } + else -+ diff = memcmp (texta, textb, MIN (lena + 1,lenb + 1)); ++ { ++ diff = memcmp (texta, textb, MIN (lena, lenb)); ++ if (diff == 0) ++ diff = lena < lenb ? -1 : lena != lenb; ++ } + + if (ignore || translate) + free (texta); ++ else ++ { ++ texta[lena] = enda; ++ textb[lenb] = endb; ++ } + + if (diff) + goto not_equal; @@ -4440,7 +4458,18 @@ diff -urNp coreutils-8.22-orig/tests/misc/sort.pl coreutils-8.22/tests/misc/sort # Since each test is run with a file name and with redirected stdin, # the name in the diagnostic is either the file name or "-". # Normalize each diagnostic to use '-'. -@@ -415,6 +420,37 @@ foreach my $t (@Tests) +@@ -317,6 +322,10 @@ my @Tests = + ["22a", '-k 2,2fd -k 1,1r', {IN=>"3 b\n4 B\n"}, {OUT=>"4 B\n3 b\n"}], + ["22b", '-k 2,2d -k 1,1r', {IN=>"3 b\n4 b\n"}, {OUT=>"4 b\n3 b\n"}], + ++# This fails in Fedora 20, per Göran Uddeborg in: http://bugs.gnu.org/18540 ++["23", '-s -k1,1 -t/', {IN=>"a b/x\na-b-c/x\n"}, {OUT=>"a b/x\na-b-c/x\n"}, ++ {ENV => "LC_ALL=$mb_locale"}], ++ + ["no-file1", 'no-file', {EXIT=>2}, {ERR=>$no_file}], + # This test failed until 1.22f. Sort didn't give an error. + # From Will Edgington. +@@ -415,6 +420,38 @@ foreach my $t (@Tests) } } @@ -4470,6 +4499,7 @@ diff -urNp coreutils-8.22-orig/tests/misc/sort.pl coreutils-8.22/tests/misc/sort + #disable several failing tests until investigation, disable all tests with envvars set + next if (grep {ref $_ eq 'HASH' && exists $_->{ENV}} (@new_t)); + next if ($test_name =~ "18g" or $test_name =~ "sort-numeric" or $test_name =~ "08[ab]" or $test_name =~ "03[def]" or $test_name =~ "h4" or $test_name =~ "n1" or $test_name =~ "2[01]a"); ++ next if ($test_name =~ "11[ab]"); # avoid FP: expected result differs to MB result due to collation rules. + push @new, ["$test_name-mb", @new_t, {ENV => "LC_ALL=$mb_locale"}]; + } + push @Tests, @new; diff --git a/coreutils.spec b/coreutils.spec index 582bed7..df58d7a 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -381,6 +381,8 @@ fi %changelog * Wed Oct 15 2014 Ondrej Vasik - 8.22-19 - handle situation with ro /tmp in colorls scripts (#1149761) +- fix the sorting in multibyte locales (NUL-terminate sort keys) + - patch by Andreas Schwab (#1146185) * Sat Aug 16 2014 Fedora Release Engineering - 8.22-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From 84a4d406cbebc6affd06e7f69a52874340a11247 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 23 Oct 2014 14:59:55 -0700 Subject: [PATCH 05/11] don't build against openssl for now, dep issues (#1156198) --- coreutils.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/coreutils.spec b/coreutils.spec index df58d7a..0ba80c5 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,7 +1,7 @@ Summary: A set of basic GNU tools commonly used in shell scripts Name: coreutils Version: 8.22 -Release: 19%{?dist} +Release: 20%{?dist} License: GPLv3+ Group: System Environment/Base Url: http://www.gnu.org/software/coreutils/ @@ -94,7 +94,6 @@ BuildRequires: autoconf BuildRequires: automake BuildRequires: libcap-devel BuildRequires: libattr-devel -BuildRequires: openssl-devel BuildRequires: gmp-devel BuildRequires: attr BuildRequires: strace @@ -172,7 +171,6 @@ aclocal -I m4 autoconf --force automake --copy --add-missing %configure --enable-largefile \ - --with-openssl \ --enable-install-program=hostname,arch \ --with-tty-group \ DEFAULT_POSIX2_VERSION=200112 alternative=199209 || : @@ -379,6 +377,9 @@ fi %{_sbindir}/chroot %changelog +* Thu Oct 23 2014 Adam Williamson - 8.22-20 +- disable openssl support for now due to dep issues (#1156198) + * Wed Oct 15 2014 Ondrej Vasik - 8.22-19 - handle situation with ro /tmp in colorls scripts (#1149761) - fix the sorting in multibyte locales (NUL-terminate sort keys) From 1675992ad882271c4a665f1951ea7cc4f4a4b5fd Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 23 Oct 2014 16:28:31 -0700 Subject: [PATCH 06/11] revert openssl change again (turns out there's a better fix) --- coreutils.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/coreutils.spec b/coreutils.spec index 0ba80c5..55434fe 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,7 +1,7 @@ Summary: A set of basic GNU tools commonly used in shell scripts Name: coreutils Version: 8.22 -Release: 20%{?dist} +Release: 21%{?dist} License: GPLv3+ Group: System Environment/Base Url: http://www.gnu.org/software/coreutils/ @@ -94,6 +94,7 @@ BuildRequires: autoconf BuildRequires: automake BuildRequires: libcap-devel BuildRequires: libattr-devel +BuildRequires: openssl-devel BuildRequires: gmp-devel BuildRequires: attr BuildRequires: strace @@ -171,6 +172,7 @@ aclocal -I m4 autoconf --force automake --copy --add-missing %configure --enable-largefile \ + --with-openssl \ --enable-install-program=hostname,arch \ --with-tty-group \ DEFAULT_POSIX2_VERSION=200112 alternative=199209 || : @@ -377,6 +379,9 @@ fi %{_sbindir}/chroot %changelog +* Thu Oct 23 2014 Adam Williamson - 8.22-21 +- revert -20 change: turns out there's a better fix elsewhere + * Thu Oct 23 2014 Adam Williamson - 8.22-20 - disable openssl support for now due to dep issues (#1156198) From 264f71299b5f97784cc98c7c8143f37693a459bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Va=C5=A1=C3=ADk?= Date: Mon, 1 Dec 2014 11:59:25 +0100 Subject: [PATCH 07/11] have the LC_TIME subdirs with lang macro (#1169027) --- coreutils.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/coreutils.spec b/coreutils.spec index 55434fe..9a19668 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,7 +1,7 @@ Summary: A set of basic GNU tools commonly used in shell scripts Name: coreutils Version: 8.22 -Release: 21%{?dist} +Release: 22%{?dist} License: GPLv3+ Group: System Environment/Base Url: http://www.gnu.org/software/coreutils/ @@ -235,6 +235,8 @@ find %{buildroot}%{_datadir}/locale -type l | \ done) %find_lang %name +#Add the %lang(xyz) ownership for the LC_TIME dirs as well... +grep LC_TIME %name.lang | cut -d'/' -f1-6 | sed -e 's/) /) %%dir /g' >>%name.lang # (sb) Deal with Installed (but unpackaged) file(s) found rm -f $RPM_BUILD_ROOT%{_infodir}/dir @@ -266,7 +268,6 @@ fi %files -f %{name}.lang %defattr(-,root,root,-) -%dir %{_datadir}/locale/*/LC_TIME %config(noreplace) %{_sysconfdir}/DIR_COLORS* %config(noreplace) %{_sysconfdir}/profile.d/* %doc ABOUT-NLS ChangeLog.bz2 NEWS README THANKS TODO old/* @@ -379,6 +380,9 @@ fi %{_sbindir}/chroot %changelog +* Thu May 14 2015 Kamil Dudka - 8.22-22 +- have the LC_TIME subdirs with lang macro (#1169027) + * Thu Oct 23 2014 Adam Williamson - 8.22-21 - revert -20 change: turns out there's a better fix elsewhere From 7279d78c58d4f136ccfd1b18b9003ad447d6e2ae Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 22 Mar 2015 11:52:47 +0000 Subject: [PATCH 08/11] drop ChangeLog (covered in enough detail in news for averge users), drop ancient docs --- coreutils.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coreutils.spec b/coreutils.spec index 9a19668..7cdaa20 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -270,7 +270,7 @@ fi %defattr(-,root,root,-) %config(noreplace) %{_sysconfdir}/DIR_COLORS* %config(noreplace) %{_sysconfdir}/profile.d/* -%doc ABOUT-NLS ChangeLog.bz2 NEWS README THANKS TODO old/* +%doc ABOUT-NLS NEWS README THANKS TODO %{!?_licensedir:%global license %%doc} %license COPYING %{_bindir}/arch @@ -381,6 +381,7 @@ fi %changelog * Thu May 14 2015 Kamil Dudka - 8.22-22 +- Drop large ancient docs - have the LC_TIME subdirs with lang macro (#1169027) * Thu Oct 23 2014 Adam Williamson - 8.22-21 From c42ce62d972fa442ac5ef0cce75f2aa542df5a3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Mon, 20 Apr 2015 15:21:51 +0100 Subject: [PATCH 09/11] sync/adjust LS_COLORS * coreutils-DIR_COLORS: sync with upstream (remove old Xiph formats, add m4a audio format). * coreutils-DIR_COLORS.256color: Likewise. Also sync with 8 color mode above, by removing the specific MULTIHARDLINK coloring, and giving MISSING symlink targets a red background. Also lighten the DIR and EXEC color a little (as discussed in bug 1196642) * coreutils-DIR_COLORS.lightbgcolor: Sync terminal types with other 2 databases above. --- coreutils-DIR_COLORS | 9 +++-- coreutils-DIR_COLORS.256color | 13 ++++--- coreutils-DIR_COLORS.lightbgcolor | 57 ++++++++++++++++++++++--------- coreutils.spec | 1 + 4 files changed, 52 insertions(+), 28 deletions(-) diff --git a/coreutils-DIR_COLORS b/coreutils-DIR_COLORS index 6abc937..10ebf7a 100644 --- a/coreutils-DIR_COLORS +++ b/coreutils-DIR_COLORS @@ -84,11 +84,11 @@ EIGHTBIT 1 # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white #NORMAL 00 # no color code at all #FILE 00 # normal file, use no color at all -RESET 0 # reset to "normal" color +RESET 0 # reset to "normal" color DIR 01;34 # directory LINK 01;36 # 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 +MULTIHARDLINK 00 # regular file with more than one link FIFO 40;33 # pipe SOCK 01;35 # socket DOOR 01;35 # door @@ -209,8 +209,6 @@ EXEC 01;32 .emf 01;35 # http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions -.axv 01;35 -.anx 01;35 .ogv 01;35 .ogx 01;35 @@ -218,6 +216,7 @@ EXEC 01;32 .aac 01;36 .au 01;36 .flac 01;36 +.m4a 01;36 .mid 01;36 .midi 01;36 .mka 01;36 @@ -228,8 +227,8 @@ EXEC 01;32 .wav 01;36 # http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions -.axa 01;36 .oga 01;36 +.opus 01;36 .spx 01;36 .xspf 01;36 diff --git a/coreutils-DIR_COLORS.256color b/coreutils-DIR_COLORS.256color index 4efaca1..5290aea 100644 --- a/coreutils-DIR_COLORS.256color +++ b/coreutils-DIR_COLORS.256color @@ -55,17 +55,17 @@ EIGHTBIT 1 #NORMAL 00 # global default, no color code at all #FILE 00 # normal file, use no color at all RESET 0 # reset to "normal" color -DIR 38;5;27 # directory +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 44;38;5;15 # regular file with more than one link +MULTIHARDLINK 00 # regular file with more than one link 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 05;48;5;232;38;5;15 # ... and the files they point to +MISSING 01;05;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 @@ -74,7 +74,7 @@ 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 38;5;34 +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. @@ -179,8 +179,6 @@ EXEC 38;5;34 .emf 38;5;13 # http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions -.axv 38;5;13 -.anx 38;5;13 .ogv 38;5;13 .ogx 38;5;13 @@ -188,6 +186,7 @@ EXEC 38;5;34 .aac 38;5;45 .au 38;5;45 .flac 38;5;45 +.m4a 38;5;45 .mid 38;5;45 .midi 38;5;45 .mka 38;5;45 @@ -198,8 +197,8 @@ EXEC 38;5;34 .wav 38;5;45 # http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions -.axa 38;5;45 .oga 38;5;45 +.opus 38;5;45 .spx 38;5;45 .xspf 38;5;45 diff --git a/coreutils-DIR_COLORS.lightbgcolor b/coreutils-DIR_COLORS.lightbgcolor index 43820b2..bf3e5b3 100644 --- a/coreutils-DIR_COLORS.lightbgcolor +++ b/coreutils-DIR_COLORS.lightbgcolor @@ -1,4 +1,4 @@ -# Configuration file for the color ls utility - modified for gray backgrounds +# Configuration file for the color ls utility - modified for lighter backgrounds # Synchronized with coreutils 8.5 dircolors # 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 @@ -16,8 +16,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 @@ -29,20 +30,46 @@ TERM con80x43 TERM con80x50 TERM con80x60 TERM cons25 -TERM xterm -TERM xterm-16color -TERM xterm-88color -TERM xterm-256color +TERM console +TERM cygwin +TERM dtterm +TERM eterm-color +TERM gnome +TERM gnome-256color +TERM jfbterm +TERM konsole +TERM kterm +TERM linux +TERM linux-c +TERM mach-color +TERM mlterm +TERM putty +TERM putty-256color TERM rxvt TERM rxvt-256color +TERM rxvt-cygwin +TERM rxvt-cygwin-native TERM rxvt-unicode TERM rxvt-unicode-256color TERM rxvt-unicode256 -TERM xterm-color -TERM color-xterm +TERM screen +TERM screen-256color +TERM screen-256color-bce +TERM screen-bce +TERM screen-w +TERM screen.Eterm +TERM screen.rxvt +TERM screen.linux +TERM st +TERM st-256color +TERM terminator TERM vt100 -TERM dtterm -TERM color_xterm +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 @@ -57,7 +84,7 @@ EIGHTBIT 1 # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white #NORMAL 00 # no color code at all #FILE 00 # normal file, use no color at all -RESET 0 +RESET 0 # reset to "normal" color DIR 00;34 # directory LINK 00;36 # symbolic link (If you set this to 'target' instead of a # numerical value, the color is as for the file pointed to.) @@ -76,7 +103,6 @@ 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 - # This is for files with execute permission: EXEC 00;32 @@ -182,8 +208,6 @@ EXEC 00;32 .emf 00;35 # http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions -.axv 00;35 -.anx 00;35 .ogv 00;35 .ogx 00;35 @@ -191,6 +215,7 @@ EXEC 00;32 .aac 00;36 .au 00;36 .flac 00;36 +.m4a 00;36 .mid 00;36 .midi 00;36 .mka 00;36 @@ -201,8 +226,8 @@ EXEC 00;32 .wav 00;36 # http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions -.axa 00;36 .oga 00;36 +.opus 00;36 .spx 00;36 .xspf 00;36 diff --git a/coreutils.spec b/coreutils.spec index 7cdaa20..71d0880 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -381,6 +381,7 @@ fi %changelog * Thu May 14 2015 Kamil Dudka - 8.22-22 +- Adjust LS_COLORS in 256 color mode; brighten some, remove hardlink colors (#1196642) - Drop large ancient docs - have the LC_TIME subdirs with lang macro (#1169027) From 4aab0acf9f10d04d586b74a213e40b8a86d26bf4 Mon Sep 17 00:00:00 2001 From: Ondrej Oprala Date: Wed, 13 May 2015 10:53:55 +0200 Subject: [PATCH 10/11] sort - fix buffer overflow in some case conversions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - patch by Pádraig Brady --- coreutils-i18n.patch | 68 +++++++++++++++++++++++++++++++++----------- coreutils.spec | 2 ++ 2 files changed, 53 insertions(+), 17 deletions(-) diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index 2efe93e..a3c7b33 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -473,7 +473,7 @@ diff -urNp coreutils-8.22-orig/src/cut.c coreutils-8.22/src/cut.c } /* Process file FILE to standard output. -@@ -687,6 +1038,7 @@ main (int argc, char **argv) +@@ -687,6 +1042,7 @@ main (int argc, char **argv) bool ok; bool delim_specified = false; char *spec_list_string IF_LINT ( = NULL); @@ -481,7 +481,7 @@ diff -urNp coreutils-8.22-orig/src/cut.c coreutils-8.22/src/cut.c initialize_main (&argc, &argv); set_program_name (argv[0]); -@@ -709,7 +1061,6 @@ main (int argc, char **argv) +@@ -709,7 +1065,6 @@ main (int argc, char **argv) switch (optc) { case 'b': @@ -489,7 +489,7 @@ diff -urNp coreutils-8.22-orig/src/cut.c coreutils-8.22/src/cut.c /* Build the byte list. */ if (operating_mode != undefined_mode) FATAL_ERROR (_("only one type of list may be specified")); -@@ -717,6 +1068,14 @@ main (int argc, char **argv) +@@ -717,6 +1072,14 @@ main (int argc, char **argv) spec_list_string = optarg; break; @@ -504,7 +504,7 @@ diff -urNp coreutils-8.22-orig/src/cut.c coreutils-8.22/src/cut.c case 'f': /* Build the field list. */ if (operating_mode != undefined_mode) -@@ -728,10 +1087,38 @@ main (int argc, char **argv) +@@ -728,10 +1091,38 @@ main (int argc, char **argv) case 'd': /* New delimiter. */ /* Interpret -d '' to mean 'use the NUL byte as the delimiter.' */ @@ -547,7 +547,7 @@ diff -urNp coreutils-8.22-orig/src/cut.c coreutils-8.22/src/cut.c break; case OUTPUT_DELIMITER_OPTION: -@@ -744,6 +1131,7 @@ main (int argc, char **argv) +@@ -744,6 +1135,7 @@ main (int argc, char **argv) break; case 'n': @@ -555,7 +555,7 @@ diff -urNp coreutils-8.22-orig/src/cut.c coreutils-8.22/src/cut.c break; case 's': -@@ -783,15 +1171,34 @@ main (int argc, char **argv) +@@ -783,15 +1175,34 @@ main (int argc, char **argv) } if (!delim_specified) @@ -3245,8 +3245,8 @@ diff -urNp coreutils-8.22-orig/src/sort.c coreutils-8.22/src/sort.c + + if (ignore || translate) + { -+ char *copy_a = (char *) xmalloc (lena + 1 + lenb + 1); -+ char *copy_b = copy_a + lena + 1; ++ char *copy_a = (char *) xmalloc ((lena + lenb) * MB_CUR_MAX + 2); ++ char *copy_b = copy_a + lena * MB_CUR_MAX + 1; + size_t new_len_a, new_len_b; + size_t i, j; + @@ -3342,7 +3342,7 @@ diff -urNp coreutils-8.22-orig/src/sort.c coreutils-8.22/src/sort.c /* Compare two lines A and B, returning negative, zero, or positive depending on whether A compares less than, equal to, or greater than B. */ -@@ -2722,7 +3347,7 @@ compare (struct line const *a, struct li +@@ -2722,7 +3365,7 @@ compare (struct line const *a, struct li diff = - NONZERO (blen); else if (blen == 0) diff = 1; @@ -3351,7 +3351,7 @@ diff -urNp coreutils-8.22-orig/src/sort.c coreutils-8.22/src/sort.c { /* Note xmemcoll0 is a performance enhancement as it will not unconditionally write '\0' after the -@@ -4113,6 +4738,7 @@ set_ordering (char const *s, struct keyf +@@ -4113,6 +4756,7 @@ set_ordering (char const *s, struct keyf break; case 'f': key->translate = fold_toupper; @@ -3359,7 +3359,7 @@ diff -urNp coreutils-8.22-orig/src/sort.c coreutils-8.22/src/sort.c break; case 'g': key->general_numeric = true; -@@ -4190,7 +4816,7 @@ main (int argc, char **argv) +@@ -4190,7 +4834,7 @@ main (int argc, char **argv) initialize_exit_failure (SORT_FAILURE); hard_LC_COLLATE = hard_locale (LC_COLLATE); @@ -3368,7 +3368,7 @@ diff -urNp coreutils-8.22-orig/src/sort.c coreutils-8.22/src/sort.c hard_LC_TIME = hard_locale (LC_TIME); #endif -@@ -4211,6 +4837,29 @@ main (int argc, char **argv) +@@ -4211,6 +4855,29 @@ main (int argc, char **argv) thousands_sep = -1; } @@ -3398,7 +3398,7 @@ diff -urNp coreutils-8.22-orig/src/sort.c coreutils-8.22/src/sort.c have_read_stdin = false; inittables (); -@@ -4485,13 +5134,34 @@ main (int argc, char **argv) +@@ -4485,13 +5152,34 @@ main (int argc, char **argv) case 't': { @@ -3437,7 +3437,7 @@ diff -urNp coreutils-8.22-orig/src/sort.c coreutils-8.22/src/sort.c else { /* Provoke with 'sort -txx'. Complain about -@@ -4502,9 +5172,12 @@ main (int argc, char **argv) +@@ -4502,9 +5190,12 @@ main (int argc, char **argv) quote (optarg)); } } @@ -3452,6 +3452,39 @@ diff -urNp coreutils-8.22-orig/src/sort.c coreutils-8.22/src/sort.c } break; +diff -urNp coreutils-8.23-orig/tests/i18n/sort.sh coreutils-8.23/tests/i18n/sort.sh +--- coreutils-8.23-orig/tests/i18n/sort.sh 1970-01-01 01:00:00.000000000 +0100 ++++ coreutils-8.23/tests/i18n/sort.sh 2014-07-22 13:45:52.733652016 +0200 +@@ -0,0 +1,29 @@ ++#!/bin/sh ++# Verify sort's multi-byte support. ++ ++. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src ++print_ver_ sort ++ ++export LC_ALL=en_US.UTF-8 ++locale -k LC_CTYPE | grep -q "charmap.*UTF-8" \ ++ || skip_ "No UTF-8 locale available" ++ ++# Enable heap consistency checkng on older systems ++export MALLOC_CHECK_=2 ++ ++ ++# check buffer overflow issue due to ++# expanding multi-byte representation due to case conversion ++# https://bugzilla.suse.com/show_bug.cgi?id=928749 ++cat < exp ++. ++ɑ ++EOF ++cat < out || fail=1 ++. ++ɑ ++EOF ++compare exp out || { fail=1; cat out; } ++ ++ ++Exit $fail diff -urNp coreutils-8.22-orig/src/unexpand.c coreutils-8.22/src/unexpand.c --- coreutils-8.22-orig/src/unexpand.c 2013-12-04 15:48:30.000000000 +0100 +++ coreutils-8.22/src/unexpand.c 2014-01-08 13:55:56.126375271 +0100 @@ -4099,11 +4132,12 @@ diff -urNp coreutils-8.22-orig/src/uniq.c coreutils-8.22/src/uniq.c diff -urNp coreutils-8.22-orig/tests/local.mk coreutils-8.22/tests/local.mk --- coreutils-8.22-orig/tests/local.mk 2014-01-08 13:55:24.524683837 +0100 +++ coreutils-8.22/tests/local.mk 2014-01-08 13:55:56.129375241 +0100 -@@ -324,6 +324,7 @@ all_tests = \ +@@ -325,6 +325,8 @@ all_tests = \ tests/misc/sort-discrim.sh \ tests/misc/sort-files0-from.pl \ tests/misc/sort-float.sh \ + tests/misc/sort-mb-tests.sh \ ++ tests/i18n/sort.sh \ tests/misc/sort-merge.pl \ tests/misc/sort-merge-fdlimit.sh \ tests/misc/sort-month.sh \ @@ -4469,7 +4503,7 @@ diff -urNp coreutils-8.22-orig/tests/misc/sort.pl coreutils-8.22/tests/misc/sort ["no-file1", 'no-file', {EXIT=>2}, {ERR=>$no_file}], # This test failed until 1.22f. Sort didn't give an error. # From Will Edgington. -@@ -415,6 +420,38 @@ foreach my $t (@Tests) +@@ -415,6 +424,38 @@ foreach my $t (@Tests) } } @@ -4508,7 +4542,7 @@ diff -urNp coreutils-8.22-orig/tests/misc/sort.pl coreutils-8.22/tests/misc/sort @Tests = triple_test \@Tests; # Remember that triple_test creates from each test with exactly one "IN" -@@ -424,6 +460,7 @@ foreach my $t (@Tests) +@@ -424,6 +465,7 @@ foreach my $t (@Tests) # Remove the IN_PIPE version of the "output-is-input" test above. # The others aren't susceptible because they have three inputs each. @Tests = grep {$_->[0] ne 'output-is-input.p'} @Tests; diff --git a/coreutils.spec b/coreutils.spec index 71d0880..b797da9 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -381,6 +381,8 @@ fi %changelog * Thu May 14 2015 Kamil Dudka - 8.22-22 +- sort - fix buffer overflow in some case conversions + - patch by Pádraig Brady - Adjust LS_COLORS in 256 color mode; brighten some, remove hardlink colors (#1196642) - Drop large ancient docs - have the LC_TIME subdirs with lang macro (#1169027) From b0bffbf394f41852da212282437082e203a7eec8 Mon Sep 17 00:00:00 2001 From: Jaromir Capik Date: Thu, 11 Jun 2015 15:16:16 +0200 Subject: [PATCH 11/11] Adding STAGE1 bootstrap recipe --- STAGE1-coreutils | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 STAGE1-coreutils diff --git a/STAGE1-coreutils b/STAGE1-coreutils new file mode 100644 index 0000000..bfe73b5 --- /dev/null +++ b/STAGE1-coreutils @@ -0,0 +1,7 @@ +srpm coreutils +mcd $BUILDDIR/$1 +(cd $SRC/${1}-*/ ; autoreconf -vif) +$SRC/${1}-*/configure $TCONFIGARGS --disable-pam +notparallel +make $J man1_MANS= V=1 +make $J man1_MANS= install DESTDIR=${ROOTFS}