Compare commits
No commits in common. 'c9' and 'i8c' have entirely different histories.
@ -1 +1 @@
|
|||||||
b2b12195e276c64c8e850cf40ea2cff9b3aa53f6 SOURCES/coreutils-8.32.tar.xz
|
bd5d495c162730873a2774acd1c5091fbf0c55a4 SOURCES/coreutils-8.30.tar.xz
|
||||||
|
@ -1 +1 @@
|
|||||||
SOURCES/coreutils-8.32.tar.xz
|
SOURCES/coreutils-8.30.tar.xz
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
From c6418e3a5cb3a65af79117162a93a66026cc8c36 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kamil Dudka <kdudka@redhat.com>
|
||||||
|
Date: Thu, 6 Dec 2018 14:28:00 +0100
|
||||||
|
Subject: [PATCH] doc: improve wording of the --kibibytes option description
|
||||||
|
|
||||||
|
Bug: https://bugzilla.redhat.com/1527391
|
||||||
|
---
|
||||||
|
doc/coreutils.texi | 8 +++++---
|
||||||
|
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
|
||||||
|
index 88d6506..772aab6 100644
|
||||||
|
--- a/doc/coreutils.texi
|
||||||
|
+++ b/doc/coreutils.texi
|
||||||
|
@@ -7615,9 +7615,11 @@ Append @samp{*} for executable regular files, otherwise behave as for
|
||||||
|
@opindex --kibibytes
|
||||||
|
Set the default block size to its normal value of 1024 bytes,
|
||||||
|
overriding any contrary specification in environment variables
|
||||||
|
-(@pxref{Block size}). This option is in turn overridden by the
|
||||||
|
-@option{--block-size}, @option{-h} or @option{--human-readable}, and
|
||||||
|
-@option{--si} options.
|
||||||
|
+(@pxref{Block size}). If @option{--block-size}, @option{-h},
|
||||||
|
+@option{--human-readable}, or @option{--si} options are used,
|
||||||
|
+they take precedence over @option{-k} or @option{--kibibytes}
|
||||||
|
+even if @option{-k} or @option{--kibibytes} is placed after
|
||||||
|
+the other options.
|
||||||
|
|
||||||
|
The @option{-k} or @option{--kibibytes} option affects the
|
||||||
|
per-directory block count written by the @option{-l} and similar
|
||||||
|
--
|
||||||
|
2.17.2
|
||||||
|
|
@ -0,0 +1,686 @@
|
|||||||
|
From a13bc34f1eeebdf8b87e4b5a570341bb77a62f76 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kamil Dudka <kdudka@redhat.com>
|
||||||
|
Date: Fri, 17 Jun 2016 16:58:18 +0200
|
||||||
|
Subject: [PATCH] downstream changes to default DIR_COLORS
|
||||||
|
|
||||||
|
---
|
||||||
|
DIR_COLORS | 41 ++++---
|
||||||
|
DIR_COLORS.256color | 300 ++++++++++++++++++++++++------------------------
|
||||||
|
DIR_COLORS.lightbgcolor | 211 ++++++++++++++++++----------------
|
||||||
|
3 files changed, 283 insertions(+), 269 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/DIR_COLORS b/DIR_COLORS
|
||||||
|
index d2ea453..27af9d7 100644
|
||||||
|
--- a/DIR_COLORS
|
||||||
|
+++ b/DIR_COLORS
|
||||||
|
@@ -1,6 +1,10 @@
|
||||||
|
# Configuration file for dircolors, a utility to help you set the
|
||||||
|
# LS_COLORS environment variable used by GNU ls with the --color option.
|
||||||
|
|
||||||
|
+# 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.
|
||||||
|
+
|
||||||
|
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
||||||
|
# Copying and distribution of this file, with or without modification,
|
||||||
|
# are permitted provided the copyright notice and this notice are preserved.
|
||||||
|
@@ -8,6 +12,9 @@
|
||||||
|
# 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
|
||||||
|
@@ -56,7 +63,7 @@ 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
|
||||||
|
+MISSING 01;05;37;41 # ... 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
|
||||||
|
@@ -184,21 +191,21 @@ EXEC 01;32
|
||||||
|
.ogx 01;35
|
||||||
|
|
||||||
|
# audio formats
|
||||||
|
-.aac 00;36
|
||||||
|
-.au 00;36
|
||||||
|
-.flac 00;36
|
||||||
|
-.m4a 00;36
|
||||||
|
-.mid 00;36
|
||||||
|
-.midi 00;36
|
||||||
|
-.mka 00;36
|
||||||
|
-.mp3 00;36
|
||||||
|
-.mpc 00;36
|
||||||
|
-.ogg 00;36
|
||||||
|
-.ra 00;36
|
||||||
|
-.wav 00;36
|
||||||
|
+.aac 01;36
|
||||||
|
+.au 01;36
|
||||||
|
+.flac 01;36
|
||||||
|
+.m4a 01;36
|
||||||
|
+.mid 01;36
|
||||||
|
+.midi 01;36
|
||||||
|
+.mka 01;36
|
||||||
|
+.mp3 01;36
|
||||||
|
+.mpc 01;36
|
||||||
|
+.ogg 01;36
|
||||||
|
+.ra 01;36
|
||||||
|
+.wav 01;36
|
||||||
|
|
||||||
|
# https://wiki.xiph.org/MIME_Types_and_File_Extensions
|
||||||
|
-.oga 00;36
|
||||||
|
-.opus 00;36
|
||||||
|
-.spx 00;36
|
||||||
|
-.xspf 00;36
|
||||||
|
+.oga 01;36
|
||||||
|
+.opus 01;36
|
||||||
|
+.spx 01;36
|
||||||
|
+.xspf 01;36
|
||||||
|
diff --git a/DIR_COLORS.256color b/DIR_COLORS.256color
|
||||||
|
index d2ea453..74c34ba 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. A color init
|
||||||
|
# string consists of one or more of the following numeric codes:
|
||||||
|
@@ -43,29 +30,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;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
|
||||||
|
+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.
|
||||||
|
@@ -83,122 +81,122 @@ EXEC 01;32
|
||||||
|
#.csh 01;32
|
||||||
|
|
||||||
|
# archives or compressed (bright red)
|
||||||
|
-.tar 01;31
|
||||||
|
-.tgz 01;31
|
||||||
|
-.arc 01;31
|
||||||
|
-.arj 01;31
|
||||||
|
-.taz 01;31
|
||||||
|
-.lha 01;31
|
||||||
|
-.lz4 01;31
|
||||||
|
-.lzh 01;31
|
||||||
|
-.lzma 01;31
|
||||||
|
-.tlz 01;31
|
||||||
|
-.txz 01;31
|
||||||
|
-.tzo 01;31
|
||||||
|
-.t7z 01;31
|
||||||
|
-.zip 01;31
|
||||||
|
-.z 01;31
|
||||||
|
-.dz 01;31
|
||||||
|
-.gz 01;31
|
||||||
|
-.lrz 01;31
|
||||||
|
-.lz 01;31
|
||||||
|
-.lzo 01;31
|
||||||
|
-.xz 01;31
|
||||||
|
-.zst 01;31
|
||||||
|
-.tzst 01;31
|
||||||
|
-.bz2 01;31
|
||||||
|
-.bz 01;31
|
||||||
|
-.tbz 01;31
|
||||||
|
-.tbz2 01;31
|
||||||
|
-.tz 01;31
|
||||||
|
-.deb 01;31
|
||||||
|
-.rpm 01;31
|
||||||
|
-.jar 01;31
|
||||||
|
-.war 01;31
|
||||||
|
-.ear 01;31
|
||||||
|
-.sar 01;31
|
||||||
|
-.rar 01;31
|
||||||
|
-.alz 01;31
|
||||||
|
-.ace 01;31
|
||||||
|
-.zoo 01;31
|
||||||
|
-.cpio 01;31
|
||||||
|
-.7z 01;31
|
||||||
|
-.rz 01;31
|
||||||
|
-.cab 01;31
|
||||||
|
-.wim 01;31
|
||||||
|
-.swm 01;31
|
||||||
|
-.dwm 01;31
|
||||||
|
-.esd 01;31
|
||||||
|
+.tar 38;5;9
|
||||||
|
+.tgz 38;5;9
|
||||||
|
+.arc 38;5;9
|
||||||
|
+.arj 38;5;9
|
||||||
|
+.taz 38;5;9
|
||||||
|
+.lha 38;5;9
|
||||||
|
+.lz4 38;5;9
|
||||||
|
+.lzh 38;5;9
|
||||||
|
+.lzma 38;5;9
|
||||||
|
+.tlz 38;5;9
|
||||||
|
+.txz 38;5;9
|
||||||
|
+.tzo 38;5;9
|
||||||
|
+.t7z 38;5;9
|
||||||
|
+.zip 38;5;9
|
||||||
|
+.z 38;5;9
|
||||||
|
+.dz 38;5;9
|
||||||
|
+.gz 38;5;9
|
||||||
|
+.lrz 38;5;9
|
||||||
|
+.lz 38;5;9
|
||||||
|
+.lzo 38;5;9
|
||||||
|
+.xz 38;5;9
|
||||||
|
+.zst 38;5;9
|
||||||
|
+.tzst 38;5;9
|
||||||
|
+.bz2 38;5;9
|
||||||
|
+.bz 38;5;9
|
||||||
|
+.tbz 38;5;9
|
||||||
|
+.tbz2 38;5;9
|
||||||
|
+.tz 38;5;9
|
||||||
|
+.deb 38;5;9
|
||||||
|
+.rpm 38;5;9
|
||||||
|
+.jar 38;5;9
|
||||||
|
+.war 38;5;9
|
||||||
|
+.ear 38;5;9
|
||||||
|
+.sar 38;5;9
|
||||||
|
+.rar 38;5;9
|
||||||
|
+.alz 38;5;9
|
||||||
|
+.ace 38;5;9
|
||||||
|
+.zoo 38;5;9
|
||||||
|
+.cpio 38;5;9
|
||||||
|
+.7z 38;5;9
|
||||||
|
+.rz 38;5;9
|
||||||
|
+.cab 38;5;9
|
||||||
|
+.wim 38;5;9
|
||||||
|
+.swm 38;5;9
|
||||||
|
+.dwm 38;5;9
|
||||||
|
+.esd 38;5;9
|
||||||
|
|
||||||
|
# image formats
|
||||||
|
-.jpg 01;35
|
||||||
|
-.jpeg 01;35
|
||||||
|
-.mjpg 01;35
|
||||||
|
-.mjpeg 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
|
||||||
|
-.tif 01;35
|
||||||
|
-.tiff 01;35
|
||||||
|
-.png 01;35
|
||||||
|
-.svg 01;35
|
||||||
|
-.svgz 01;35
|
||||||
|
-.mng 01;35
|
||||||
|
-.pcx 01;35
|
||||||
|
-.mov 01;35
|
||||||
|
-.mpg 01;35
|
||||||
|
-.mpeg 01;35
|
||||||
|
-.m2v 01;35
|
||||||
|
-.mkv 01;35
|
||||||
|
-.webm 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
|
||||||
|
-.flv 01;35
|
||||||
|
-.gl 01;35
|
||||||
|
-.dl 01;35
|
||||||
|
-.xcf 01;35
|
||||||
|
-.xwd 01;35
|
||||||
|
-.yuv 01;35
|
||||||
|
-.cgm 01;35
|
||||||
|
-.emf 01;35
|
||||||
|
+.jpg 38;5;13
|
||||||
|
+.jpeg 38;5;13
|
||||||
|
+.mjpg 38;5;13
|
||||||
|
+.mjpeg 38;5;13
|
||||||
|
+.gif 38;5;13
|
||||||
|
+.bmp 38;5;13
|
||||||
|
+.pbm 38;5;13
|
||||||
|
+.pgm 38;5;13
|
||||||
|
+.ppm 38;5;13
|
||||||
|
+.tga 38;5;13
|
||||||
|
+.xbm 38;5;13
|
||||||
|
+.xpm 38;5;13
|
||||||
|
+.tif 38;5;13
|
||||||
|
+.tiff 38;5;13
|
||||||
|
+.png 38;5;13
|
||||||
|
+.svg 38;5;13
|
||||||
|
+.svgz 38;5;13
|
||||||
|
+.mng 38;5;13
|
||||||
|
+.pcx 38;5;13
|
||||||
|
+.mov 38;5;13
|
||||||
|
+.mpg 38;5;13
|
||||||
|
+.mpeg 38;5;13
|
||||||
|
+.m2v 38;5;13
|
||||||
|
+.mkv 38;5;13
|
||||||
|
+.webm 38;5;13
|
||||||
|
+.ogm 38;5;13
|
||||||
|
+.mp4 38;5;13
|
||||||
|
+.m4v 38;5;13
|
||||||
|
+.mp4v 38;5;13
|
||||||
|
+.vob 38;5;13
|
||||||
|
+.qt 38;5;13
|
||||||
|
+.nuv 38;5;13
|
||||||
|
+.wmv 38;5;13
|
||||||
|
+.asf 38;5;13
|
||||||
|
+.rm 38;5;13
|
||||||
|
+.rmvb 38;5;13
|
||||||
|
+.flc 38;5;13
|
||||||
|
+.avi 38;5;13
|
||||||
|
+.fli 38;5;13
|
||||||
|
+.flv 38;5;13
|
||||||
|
+.gl 38;5;13
|
||||||
|
+.dl 38;5;13
|
||||||
|
+.xcf 38;5;13
|
||||||
|
+.xwd 38;5;13
|
||||||
|
+.yuv 38;5;13
|
||||||
|
+.cgm 38;5;13
|
||||||
|
+.emf 38;5;13
|
||||||
|
|
||||||
|
# https://wiki.xiph.org/MIME_Types_and_File_Extensions
|
||||||
|
-.ogv 01;35
|
||||||
|
-.ogx 01;35
|
||||||
|
+.ogv 38;5;13
|
||||||
|
+.ogx 38;5;13
|
||||||
|
|
||||||
|
# audio formats
|
||||||
|
-.aac 00;36
|
||||||
|
-.au 00;36
|
||||||
|
-.flac 00;36
|
||||||
|
-.m4a 00;36
|
||||||
|
-.mid 00;36
|
||||||
|
-.midi 00;36
|
||||||
|
-.mka 00;36
|
||||||
|
-.mp3 00;36
|
||||||
|
-.mpc 00;36
|
||||||
|
-.ogg 00;36
|
||||||
|
-.ra 00;36
|
||||||
|
-.wav 00;36
|
||||||
|
+.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
|
||||||
|
+.mp3 38;5;45
|
||||||
|
+.mpc 38;5;45
|
||||||
|
+.ogg 38;5;45
|
||||||
|
+.ra 38;5;45
|
||||||
|
+.wav 38;5;45
|
||||||
|
|
||||||
|
# https://wiki.xiph.org/MIME_Types_and_File_Extensions
|
||||||
|
-.oga 00;36
|
||||||
|
-.opus 00;36
|
||||||
|
-.spx 00;36
|
||||||
|
-.xspf 00;36
|
||||||
|
+.oga 38;5;45
|
||||||
|
+.opus 38;5;45
|
||||||
|
+.spx 38;5;45
|
||||||
|
+.xspf 38;5;45
|
||||||
|
diff --git a/DIR_COLORS.lightbgcolor b/DIR_COLORS.lightbgcolor
|
||||||
|
index d2ea453..95d6879 100644
|
||||||
|
--- a/DIR_COLORS.lightbgcolor
|
||||||
|
+++ b/DIR_COLORS.lightbgcolor
|
||||||
|
@@ -1,3 +1,9 @@
|
||||||
|
+# Configuration file for the color ls utility - modified for lighter backgrounds
|
||||||
|
+
|
||||||
|
+# 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,6 +14,9 @@
|
||||||
|
# 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
|
||||||
|
@@ -46,17 +55,17 @@ TERM xterm*
|
||||||
|
#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 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.)
|
||||||
|
MULTIHARDLINK 00 # regular file with more than one link
|
||||||
|
FIFO 40;33 # pipe
|
||||||
|
-SOCK 01;35 # socket
|
||||||
|
-DOOR 01;35 # door
|
||||||
|
+SOCK 00;35 # socket
|
||||||
|
+DOOR 00;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
|
||||||
|
+MISSING 01;05;37;41 # ... 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
|
||||||
|
@@ -65,7 +74,7 @@ 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 01;32
|
||||||
|
+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.
|
||||||
|
@@ -83,105 +92,105 @@ EXEC 01;32
|
||||||
|
#.csh 01;32
|
||||||
|
|
||||||
|
# archives or compressed (bright red)
|
||||||
|
-.tar 01;31
|
||||||
|
-.tgz 01;31
|
||||||
|
-.arc 01;31
|
||||||
|
-.arj 01;31
|
||||||
|
-.taz 01;31
|
||||||
|
-.lha 01;31
|
||||||
|
-.lz4 01;31
|
||||||
|
-.lzh 01;31
|
||||||
|
-.lzma 01;31
|
||||||
|
-.tlz 01;31
|
||||||
|
-.txz 01;31
|
||||||
|
-.tzo 01;31
|
||||||
|
-.t7z 01;31
|
||||||
|
-.zip 01;31
|
||||||
|
-.z 01;31
|
||||||
|
-.dz 01;31
|
||||||
|
-.gz 01;31
|
||||||
|
-.lrz 01;31
|
||||||
|
-.lz 01;31
|
||||||
|
-.lzo 01;31
|
||||||
|
-.xz 01;31
|
||||||
|
-.zst 01;31
|
||||||
|
-.tzst 01;31
|
||||||
|
-.bz2 01;31
|
||||||
|
-.bz 01;31
|
||||||
|
-.tbz 01;31
|
||||||
|
-.tbz2 01;31
|
||||||
|
-.tz 01;31
|
||||||
|
-.deb 01;31
|
||||||
|
-.rpm 01;31
|
||||||
|
-.jar 01;31
|
||||||
|
-.war 01;31
|
||||||
|
-.ear 01;31
|
||||||
|
-.sar 01;31
|
||||||
|
-.rar 01;31
|
||||||
|
-.alz 01;31
|
||||||
|
-.ace 01;31
|
||||||
|
-.zoo 01;31
|
||||||
|
-.cpio 01;31
|
||||||
|
-.7z 01;31
|
||||||
|
-.rz 01;31
|
||||||
|
-.cab 01;31
|
||||||
|
-.wim 01;31
|
||||||
|
-.swm 01;31
|
||||||
|
-.dwm 01;31
|
||||||
|
-.esd 01;31
|
||||||
|
+.tar 00;31
|
||||||
|
+.tgz 00;31
|
||||||
|
+.arc 00;31
|
||||||
|
+.arj 00;31
|
||||||
|
+.taz 00;31
|
||||||
|
+.lha 00;31
|
||||||
|
+.lz4 00;31
|
||||||
|
+.lzh 00;31
|
||||||
|
+.lzma 00;31
|
||||||
|
+.tlz 00;31
|
||||||
|
+.txz 00;31
|
||||||
|
+.tzo 00;31
|
||||||
|
+.t7z 00;31
|
||||||
|
+.zip 00;31
|
||||||
|
+.z 00;31
|
||||||
|
+.dz 00;31
|
||||||
|
+.gz 00;31
|
||||||
|
+.lrz 00;31
|
||||||
|
+.lz 00;31
|
||||||
|
+.lzo 00;31
|
||||||
|
+.xz 00;31
|
||||||
|
+.zst 00;31
|
||||||
|
+.tzst 00;31
|
||||||
|
+.bz2 00;31
|
||||||
|
+.bz 00;31
|
||||||
|
+.tbz 00;31
|
||||||
|
+.tbz2 00;31
|
||||||
|
+.tz 00;31
|
||||||
|
+.deb 00;31
|
||||||
|
+.rpm 00;31
|
||||||
|
+.jar 00;31
|
||||||
|
+.war 00;31
|
||||||
|
+.ear 00;31
|
||||||
|
+.sar 00;31
|
||||||
|
+.rar 00;31
|
||||||
|
+.alz 00;31
|
||||||
|
+.ace 00;31
|
||||||
|
+.zoo 00;31
|
||||||
|
+.cpio 00;31
|
||||||
|
+.7z 00;31
|
||||||
|
+.rz 00;31
|
||||||
|
+.cab 00;31
|
||||||
|
+.wim 00;31
|
||||||
|
+.swm 00;31
|
||||||
|
+.dwm 00;31
|
||||||
|
+.esd 00;31
|
||||||
|
|
||||||
|
# image formats
|
||||||
|
-.jpg 01;35
|
||||||
|
-.jpeg 01;35
|
||||||
|
-.mjpg 01;35
|
||||||
|
-.mjpeg 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
|
||||||
|
-.tif 01;35
|
||||||
|
-.tiff 01;35
|
||||||
|
-.png 01;35
|
||||||
|
-.svg 01;35
|
||||||
|
-.svgz 01;35
|
||||||
|
-.mng 01;35
|
||||||
|
-.pcx 01;35
|
||||||
|
-.mov 01;35
|
||||||
|
-.mpg 01;35
|
||||||
|
-.mpeg 01;35
|
||||||
|
-.m2v 01;35
|
||||||
|
-.mkv 01;35
|
||||||
|
-.webm 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
|
||||||
|
-.flv 01;35
|
||||||
|
-.gl 01;35
|
||||||
|
-.dl 01;35
|
||||||
|
-.xcf 01;35
|
||||||
|
-.xwd 01;35
|
||||||
|
-.yuv 01;35
|
||||||
|
-.cgm 01;35
|
||||||
|
-.emf 01;35
|
||||||
|
+.jpg 00;35
|
||||||
|
+.jpeg 00;35
|
||||||
|
+.mjpg 00;35
|
||||||
|
+.mjpeg 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
|
||||||
|
+.tif 00;35
|
||||||
|
+.tiff 00;35
|
||||||
|
+.png 00;35
|
||||||
|
+.svg 00;35
|
||||||
|
+.svgz 00;35
|
||||||
|
+.mng 00;35
|
||||||
|
+.pcx 00;35
|
||||||
|
+.mov 00;35
|
||||||
|
+.mpg 00;35
|
||||||
|
+.mpeg 00;35
|
||||||
|
+.m2v 00;35
|
||||||
|
+.mkv 00;35
|
||||||
|
+.webm 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
|
||||||
|
+.flv 00;35
|
||||||
|
+.gl 00;35
|
||||||
|
+.dl 00;35
|
||||||
|
+.xcf 00;35
|
||||||
|
+.xwd 00;35
|
||||||
|
+.yuv 00;35
|
||||||
|
+.cgm 00;35
|
||||||
|
+.emf 00;35
|
||||||
|
|
||||||
|
# https://wiki.xiph.org/MIME_Types_and_File_Extensions
|
||||||
|
-.ogv 01;35
|
||||||
|
-.ogx 01;35
|
||||||
|
+.ogv 00;35
|
||||||
|
+.ogx 00;35
|
||||||
|
|
||||||
|
# audio formats
|
||||||
|
.aac 00;36
|
||||||
|
--
|
||||||
|
2.5.5
|
||||||
|
|
@ -0,0 +1,69 @@
|
|||||||
|
From 6d059cebfdefbdf56910a858f8b603d37f10ef6d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Bruno Haible <bruno@clisp.org>
|
||||||
|
Date: Sun, 23 Sep 2018 14:13:52 +0200
|
||||||
|
Subject: [PATCH] vasnprintf: Fix heap memory overrun bug.
|
||||||
|
|
||||||
|
Reported by Ben Pfaff <blp@cs.stanford.edu> in
|
||||||
|
<https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00107.html>.
|
||||||
|
|
||||||
|
* lib/vasnprintf.c (convert_to_decimal): Allocate one more byte of
|
||||||
|
memory.
|
||||||
|
* tests/test-vasnprintf.c (test_function): Add another test.
|
||||||
|
|
||||||
|
Upstream-commit: 278b4175c9d7dd47c1a3071554aac02add3b3c35
|
||||||
|
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||||
|
---
|
||||||
|
gnulib-tests/test-vasnprintf.c | 21 ++++++++++++++++++++-
|
||||||
|
lib/vasnprintf.c | 4 +++-
|
||||||
|
2 files changed, 23 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/gnulib-tests/test-vasnprintf.c b/gnulib-tests/test-vasnprintf.c
|
||||||
|
index 19731bc..93d81d7 100644
|
||||||
|
--- a/gnulib-tests/test-vasnprintf.c
|
||||||
|
+++ b/gnulib-tests/test-vasnprintf.c
|
||||||
|
@@ -53,7 +53,26 @@ test_function (char * (*my_asnprintf) (char *, size_t *, const char *, ...))
|
||||||
|
ASSERT (result != NULL);
|
||||||
|
ASSERT (strcmp (result, "12345") == 0);
|
||||||
|
ASSERT (length == 5);
|
||||||
|
- if (size < 6)
|
||||||
|
+ if (size < 5 + 1)
|
||||||
|
+ ASSERT (result != buf);
|
||||||
|
+ ASSERT (memcmp (buf + size, &"DEADBEEF"[size], 8 - size) == 0);
|
||||||
|
+ if (result != buf)
|
||||||
|
+ free (result);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* Note: This test assumes IEEE 754 representation of 'double' floats. */
|
||||||
|
+ for (size = 0; size <= 8; size++)
|
||||||
|
+ {
|
||||||
|
+ size_t length;
|
||||||
|
+ char *result;
|
||||||
|
+
|
||||||
|
+ memcpy (buf, "DEADBEEF", 8);
|
||||||
|
+ length = size;
|
||||||
|
+ result = my_asnprintf (buf, &length, "%2.0f", 1.6314159265358979e+125);
|
||||||
|
+ ASSERT (result != NULL);
|
||||||
|
+ ASSERT (strcmp (result, "163141592653589790215729350939528493057529598899734151772468186268423257777068536614838678161083520756952076273094236944990208") == 0);
|
||||||
|
+ ASSERT (length == 126);
|
||||||
|
+ if (size < 126 + 1)
|
||||||
|
ASSERT (result != buf);
|
||||||
|
ASSERT (memcmp (buf + size, &"DEADBEEF"[size], 8 - size) == 0);
|
||||||
|
if (result != buf)
|
||||||
|
diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c
|
||||||
|
index 3b441d0..48ef7a6 100644
|
||||||
|
--- a/lib/vasnprintf.c
|
||||||
|
+++ b/lib/vasnprintf.c
|
||||||
|
@@ -860,7 +860,9 @@ convert_to_decimal (mpn_t a, size_t extra_zeroes)
|
||||||
|
size_t a_len = a.nlimbs;
|
||||||
|
/* 0.03345 is slightly larger than log(2)/(9*log(10)). */
|
||||||
|
size_t c_len = 9 * ((size_t)(a_len * (GMP_LIMB_BITS * 0.03345f)) + 1);
|
||||||
|
- char *c_ptr = (char *) malloc (xsum (c_len, extra_zeroes));
|
||||||
|
+ /* We need extra_zeroes bytes for zeroes, followed by c_len bytes for the
|
||||||
|
+ digits of a, followed by 1 byte for the terminating NUL. */
|
||||||
|
+ char *c_ptr = (char *) malloc (xsum (xsum (extra_zeroes, c_len), 1));
|
||||||
|
if (c_ptr != NULL)
|
||||||
|
{
|
||||||
|
char *d_ptr = c_ptr;
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,42 @@
|
|||||||
|
From 5d6c2c9b3869938592025ce169659f0c7e9970fc Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kamil Dudka <kdudka@redhat.com>
|
||||||
|
Date: Mon, 2 Dec 2019 14:02:02 +0100
|
||||||
|
Subject: [PATCH] chcon: do not validate security context if SELinux is
|
||||||
|
disabled
|
||||||
|
|
||||||
|
* src/chcon.c (main): Skip call of security_check_context()
|
||||||
|
in case SELinux is disabled to avoid unnecessary failure.
|
||||||
|
|
||||||
|
Bug: https://bugzilla.redhat.com/1777831
|
||||||
|
|
||||||
|
Upstream-commit: 5118a2e392c8cffb3c26eaffbb75e2b1ef7607f9
|
||||||
|
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||||
|
---
|
||||||
|
src/chcon.c | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/chcon.c b/src/chcon.c
|
||||||
|
index 6414406..eea4235 100644
|
||||||
|
--- a/src/chcon.c
|
||||||
|
+++ b/src/chcon.c
|
||||||
|
@@ -18,6 +18,7 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <getopt.h>
|
||||||
|
+#include <selinux/selinux.h>
|
||||||
|
|
||||||
|
#include "system.h"
|
||||||
|
#include "dev-ino.h"
|
||||||
|
@@ -557,7 +558,8 @@ main (int argc, char **argv)
|
||||||
|
else
|
||||||
|
{
|
||||||
|
specified_context = argv[optind++];
|
||||||
|
- if (security_check_context (se_const (specified_context)) < 0)
|
||||||
|
+ if (0 < is_selinux_enabled ()
|
||||||
|
+ && security_check_context (se_const (specified_context)) < 0)
|
||||||
|
die (EXIT_FAILURE, errno, _("invalid context: %s"),
|
||||||
|
quote (specified_context));
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.21.1
|
||||||
|
|
@ -0,0 +1,69 @@
|
|||||||
|
From ce137aaf4b0d62b3e4c88816485a3ab0f5c4b3f3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kamil Dudka <kdudka@redhat.com>
|
||||||
|
Date: Thu, 6 Dec 2018 13:14:00 +0100
|
||||||
|
Subject: [PATCH] cp --preserve=xattr: preserve NFSv4 ACL extended attributes
|
||||||
|
|
||||||
|
... that cannot be preserved by other means
|
||||||
|
---
|
||||||
|
src/copy.c | 22 +++++++++++++++++-----
|
||||||
|
1 file changed, 17 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/copy.c b/src/copy.c
|
||||||
|
index 1a9cdd1..d227e3e 100644
|
||||||
|
--- a/src/copy.c
|
||||||
|
+++ b/src/copy.c
|
||||||
|
@@ -640,6 +640,17 @@ copy_attr_free (struct error_context *ctx _GL_UNUSED,
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
+/* Include NFSv4 ACL extended attributes that cannot be preserved by
|
||||||
|
+ other means. Otherwise honor attributes configured for exclusion
|
||||||
|
+ in /etc/xattr.conf. Return zero to skip. */
|
||||||
|
+static int
|
||||||
|
+check_not_nfs4_acl (const char *name, struct error_context *ctx)
|
||||||
|
+{
|
||||||
|
+ return attr_copy_check_permissions(name, ctx)
|
||||||
|
+ || !STRNCMP_LIT (name, "system.nfs4_acl")
|
||||||
|
+ || !STRNCMP_LIT (name, "system.nfs4acl");
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/* Exclude SELinux extended attributes that are otherwise handled,
|
||||||
|
and are problematic to copy again. Also honor attributes
|
||||||
|
configured for exclusion in /etc/xattr.conf.
|
||||||
|
@@ -649,7 +660,7 @@ static int
|
||||||
|
check_selinux_attr (const char *name, struct error_context *ctx)
|
||||||
|
{
|
||||||
|
return STRNCMP_LIT (name, "security.selinux")
|
||||||
|
- && attr_copy_check_permissions (name, ctx);
|
||||||
|
+ && check_not_nfs4_acl (name, ctx);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If positive SRC_FD and DST_FD descriptors are passed,
|
||||||
|
@@ -663,6 +674,9 @@ copy_attr (char const *src_path, int src_fd,
|
||||||
|
bool all_errors = (!x->data_copy_required || x->require_preserve_xattr);
|
||||||
|
bool some_errors = (!all_errors && !x->reduce_diagnostics);
|
||||||
|
bool selinux_done = (x->preserve_security_context || x->set_security_context);
|
||||||
|
+ int (*check) (const char *, struct error_context *) = (selinux_done)
|
||||||
|
+ ? check_selinux_attr
|
||||||
|
+ : check_not_nfs4_acl;
|
||||||
|
struct error_context ctx =
|
||||||
|
{
|
||||||
|
.error = all_errors ? copy_attr_allerror : copy_attr_error,
|
||||||
|
@@ -670,12 +684,10 @@ copy_attr (char const *src_path, int src_fd,
|
||||||
|
.quote_free = copy_attr_free
|
||||||
|
};
|
||||||
|
if (0 <= src_fd && 0 <= dst_fd)
|
||||||
|
- ret = attr_copy_fd (src_path, src_fd, dst_path, dst_fd,
|
||||||
|
- selinux_done ? check_selinux_attr : NULL,
|
||||||
|
+ ret = attr_copy_fd (src_path, src_fd, dst_path, dst_fd, check,
|
||||||
|
(all_errors || some_errors ? &ctx : NULL));
|
||||||
|
else
|
||||||
|
- ret = attr_copy_file (src_path, dst_path,
|
||||||
|
- selinux_done ? check_selinux_attr : NULL,
|
||||||
|
+ ret = attr_copy_file (src_path, dst_path, check,
|
||||||
|
(all_errors || some_errors ? &ctx : NULL));
|
||||||
|
|
||||||
|
return ret == 0;
|
||||||
|
--
|
||||||
|
2.17.2
|
||||||
|
|
@ -0,0 +1,74 @@
|
|||||||
|
From b60a61d7e5f6504518095d9ee8c7c8b185bedb23 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marc Dionne <marc.dionne@auristor.com>
|
||||||
|
Date: Wed, 5 Feb 2020 13:35:12 -0800
|
||||||
|
Subject: [PATCH 1/2] mountlist: Consider AFS filesystems as remote
|
||||||
|
|
||||||
|
df --local relies on the ME_REMOTE macro to determine if a given
|
||||||
|
mount entry should be considered "local". There is special logic
|
||||||
|
for nfs and smb/cifs mounts, but /afs as mounted by OpenAFS, the
|
||||||
|
kernel's kafs module or AuriStorFS is treated as a local mount.
|
||||||
|
* lib/mountlist.c (ME_REMOTE): Treat mounts of type 'afs'
|
||||||
|
(OpenAFS, kernel kafs) and 'auristorfs' (AuriStorFS) as remote.
|
||||||
|
|
||||||
|
Copyright-paperwork-exempt: yes
|
||||||
|
|
||||||
|
Upstream-commit: 7a15069b68a376f26c5dca34ae2689c5bf8adc99
|
||||||
|
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||||
|
---
|
||||||
|
lib/mountlist.c | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/lib/mountlist.c b/lib/mountlist.c
|
||||||
|
index b691f38..1b1e5e4 100644
|
||||||
|
--- a/lib/mountlist.c
|
||||||
|
+++ b/lib/mountlist.c
|
||||||
|
@@ -224,6 +224,7 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED)
|
||||||
|
#ifndef ME_REMOTE
|
||||||
|
/* A file system is "remote" if its Fs_name contains a ':'
|
||||||
|
or if (it is of type (smbfs or cifs) and its Fs_name starts with '//')
|
||||||
|
+ or if it is of type (afs or auristorfs)
|
||||||
|
or Fs_name is equal to "-hosts" (used by autofs to mount remote fs). */
|
||||||
|
# define ME_REMOTE(Fs_name, Fs_type) \
|
||||||
|
(strchr (Fs_name, ':') != NULL \
|
||||||
|
@@ -231,6 +232,8 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED)
|
||||||
|
&& (Fs_name)[1] == '/' \
|
||||||
|
&& (strcmp (Fs_type, "smbfs") == 0 \
|
||||||
|
|| strcmp (Fs_type, "cifs") == 0)) \
|
||||||
|
+ || strcmp (Fs_type, "afs") == 0 \
|
||||||
|
+ || strcmp (Fs_type, "auristorfs") == 0 \
|
||||||
|
|| (strcmp("-hosts", Fs_name) == 0))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
--
|
||||||
|
2.21.1
|
||||||
|
|
||||||
|
|
||||||
|
From 41010dfb0cc100f41fb16d93f9fa36dc07e63ac6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kenneth D'souza <kdsouza@redhat.com>
|
||||||
|
Date: Sat, 8 Feb 2020 13:54:35 +0000
|
||||||
|
Subject: [PATCH 2/2] mountlist: consider smb3 file systems as remote
|
||||||
|
|
||||||
|
* lib/mountlist.c (ME_REMOTE): Recognize file systems of type
|
||||||
|
"smb3" as remote.
|
||||||
|
|
||||||
|
Upstream-commit: 4d4a22ab1f719b7c6c3fe3dbf45d11baafd3c563
|
||||||
|
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||||
|
---
|
||||||
|
lib/mountlist.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/lib/mountlist.c b/lib/mountlist.c
|
||||||
|
index 1b1e5e4..8ad74a2 100644
|
||||||
|
--- a/lib/mountlist.c
|
||||||
|
+++ b/lib/mountlist.c
|
||||||
|
@@ -231,6 +231,7 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED)
|
||||||
|
|| ((Fs_name)[0] == '/' \
|
||||||
|
&& (Fs_name)[1] == '/' \
|
||||||
|
&& (strcmp (Fs_type, "smbfs") == 0 \
|
||||||
|
+ || strcmp (Fs_type, "smb3") == 0 \
|
||||||
|
|| strcmp (Fs_type, "cifs") == 0)) \
|
||||||
|
|| strcmp (Fs_type, "afs") == 0 \
|
||||||
|
|| strcmp (Fs_type, "auristorfs") == 0 \
|
||||||
|
--
|
||||||
|
2.21.1
|
||||||
|
|
@ -0,0 +1,77 @@
|
|||||||
|
From 2eabfbee57be82f755c74cbb05755dce1469ea7c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
Date: Tue, 6 Nov 2018 10:35:16 -0800
|
||||||
|
Subject: [PATCH 1/2] sync: fix open fallback bug
|
||||||
|
|
||||||
|
Problem caught by Coverity Analysis
|
||||||
|
and reported by Kamil Dudka (Bug#33287).
|
||||||
|
* src/sync.c (sync_arg): Fix typo in fallback code.
|
||||||
|
|
||||||
|
Upstream-commit: 94d364f157f007f2b23c70863ac8eefe9b21229d
|
||||||
|
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||||
|
---
|
||||||
|
src/sync.c | 6 ++++--
|
||||||
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/sync.c b/src/sync.c
|
||||||
|
index bd3671a..607fa8f 100644
|
||||||
|
--- a/src/sync.c
|
||||||
|
+++ b/src/sync.c
|
||||||
|
@@ -111,8 +111,10 @@ sync_arg (enum sync_mode mode, char const *file)
|
||||||
|
if (open_flags != (O_WRONLY | O_NONBLOCK))
|
||||||
|
fd = open (file, O_WRONLY | O_NONBLOCK);
|
||||||
|
if (fd < 0)
|
||||||
|
- error (0, rd_errno, _("error opening %s"), quoteaf (file));
|
||||||
|
- return false;
|
||||||
|
+ {
|
||||||
|
+ error (0, rd_errno, _("error opening %s"), quoteaf (file));
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* We used O_NONBLOCK above to not hang with fifos,
|
||||||
|
--
|
||||||
|
2.17.2
|
||||||
|
|
||||||
|
|
||||||
|
From e62ff3068f1f1b1e84d3319f54f1b869bb0bf6cc Mon Sep 17 00:00:00 2001
|
||||||
|
From: Bernhard Voelker <mail@bernhard-voelker.de>
|
||||||
|
Date: Wed, 7 Nov 2018 00:26:01 +0100
|
||||||
|
Subject: [PATCH 2/2] sync: add test for the fix in the previous commit
|
||||||
|
|
||||||
|
* tests/misc/sync.sh: Add a test with a write-only file for the fix.
|
||||||
|
|
||||||
|
Upstream-commit: 4711c49312d54e84996c13c612f7081c95f821a6
|
||||||
|
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||||
|
---
|
||||||
|
tests/misc/sync.sh | 7 ++++++-
|
||||||
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tests/misc/sync.sh b/tests/misc/sync.sh
|
||||||
|
index f60d28c..3bb6e17 100755
|
||||||
|
--- a/tests/misc/sync.sh
|
||||||
|
+++ b/tests/misc/sync.sh
|
||||||
|
@@ -19,7 +19,7 @@
|
||||||
|
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
|
||||||
|
print_ver_ sync
|
||||||
|
|
||||||
|
-touch file
|
||||||
|
+touch file || framework_failure_
|
||||||
|
|
||||||
|
# fdatasync+syncfs is nonsensical
|
||||||
|
returns_ 1 sync --data --file-system || fail=1
|
||||||
|
@@ -30,6 +30,11 @@ returns_ 1 sync -d || fail=1
|
||||||
|
# Test syncing of file (fsync) (little side effects)
|
||||||
|
sync file || fail=1
|
||||||
|
|
||||||
|
+# Test syncing of write-only file - which failed since adding argument
|
||||||
|
+# support to sync in coreutils-8.24.
|
||||||
|
+chmod 0200 file || framework_failure_
|
||||||
|
+sync file || fail=1
|
||||||
|
+
|
||||||
|
# Ensure multiple args are processed and diagnosed
|
||||||
|
returns_ 1 sync file nofile || fail=1
|
||||||
|
|
||||||
|
--
|
||||||
|
2.17.2
|
||||||
|
|
@ -0,0 +1,451 @@
|
|||||||
|
From 57ee8db4fee8eb6772df1ff18d275594c0b034d4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
Date: Thu, 5 Jul 2018 09:22:09 -0700
|
||||||
|
Subject: [PATCH 1/2] renameatu: rename from renameat2
|
||||||
|
|
||||||
|
It's looking like Glibc will add a renameat2 function
|
||||||
|
that is incompatible with Gnulib renameat2; see:
|
||||||
|
https://sourceware.org/ml/libc-alpha/2018-07/msg00064.html
|
||||||
|
To help avoid future confusion, rename renameat2 to something else.
|
||||||
|
Use the name 'renameatu', as the Gnulib function is close to the
|
||||||
|
Glibc function. Perhaps someday there will also be a renameat2
|
||||||
|
Gnulib module, which mimicks the future glibc renameat2, but that
|
||||||
|
can wait as nobody seems to need such a module now.
|
||||||
|
* NEWS: Mention this.
|
||||||
|
* lib/renameatu.c: Rename from lib/renameat2.c.
|
||||||
|
* lib/renameatu.h: Rename from lib/renameat2.h.
|
||||||
|
* modules/renameatu: Rename from modules/renameat2.
|
||||||
|
* modules/renameatu-tests: Rename from modules/renameat2-tests.
|
||||||
|
All uses of "renameat2" in identifiers or file name
|
||||||
|
changed to "renameatu", except for two instances in
|
||||||
|
lib/renameatu.c that deal with the Linux kernel's
|
||||||
|
renameat2 syscall.
|
||||||
|
|
||||||
|
Upstream-commit: 2522322e5304e7d86c63e607e2bc83c8d8b0a889
|
||||||
|
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||||
|
---
|
||||||
|
gnulib-tests/gnulib.mk | 12 +++---
|
||||||
|
.../{test-renameat2.c => test-renameatu.c} | 48 +++++++++++-----------
|
||||||
|
lib/backupfile.c | 4 +-
|
||||||
|
lib/gnulib.mk | 10 ++---
|
||||||
|
lib/renameat.c | 4 +-
|
||||||
|
lib/{renameat2.c => renameatu.c} | 9 ++--
|
||||||
|
lib/{renameat2.h => renameatu.h} | 8 ++--
|
||||||
|
7 files changed, 48 insertions(+), 47 deletions(-)
|
||||||
|
rename gnulib-tests/{test-renameat2.c => test-renameatu.c} (80%)
|
||||||
|
rename lib/{renameat2.c => renameatu.c} (94%)
|
||||||
|
rename lib/{renameat2.h => renameatu.h} (84%)
|
||||||
|
|
||||||
|
diff --git a/gnulib-tests/gnulib.mk b/gnulib-tests/gnulib.mk
|
||||||
|
index be2b99e..891425b 100644
|
||||||
|
--- a/gnulib-tests/gnulib.mk
|
||||||
|
+++ b/gnulib-tests/gnulib.mk
|
||||||
|
@@ -1750,14 +1750,14 @@ EXTRA_DIST += test-rename.h test-renameat.c signature.h macros.h
|
||||||
|
|
||||||
|
## end gnulib module renameat-tests
|
||||||
|
|
||||||
|
-## begin gnulib module renameat2-tests
|
||||||
|
+## begin gnulib module renameatu-tests
|
||||||
|
|
||||||
|
-TESTS += test-renameat2
|
||||||
|
-check_PROGRAMS += test-renameat2
|
||||||
|
-test_renameat2_LDADD = $(LDADD) @LIBINTL@
|
||||||
|
-EXTRA_DIST += test-rename.h test-renameat2.c signature.h macros.h
|
||||||
|
+TESTS += test-renameatu
|
||||||
|
+check_PROGRAMS += test-renameatu
|
||||||
|
+test_renameatu_LDADD = $(LDADD) @LIBINTL@
|
||||||
|
+EXTRA_DIST += test-rename.h test-renameatu.c signature.h macros.h
|
||||||
|
|
||||||
|
-## end gnulib module renameat2-tests
|
||||||
|
+## end gnulib module renameatu-tests
|
||||||
|
|
||||||
|
## begin gnulib module rmdir-tests
|
||||||
|
|
||||||
|
diff --git a/gnulib-tests/test-renameat2.c b/gnulib-tests/test-renameatu.c
|
||||||
|
similarity index 80%
|
||||||
|
rename from gnulib-tests/test-renameat2.c
|
||||||
|
rename to gnulib-tests/test-renameatu.c
|
||||||
|
index 0104890..988428b 100644
|
||||||
|
--- a/gnulib-tests/test-renameat2.c
|
||||||
|
+++ b/gnulib-tests/test-renameatu.c
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-/* Test renameat2.
|
||||||
|
+/* Test renameatu.
|
||||||
|
Copyright (C) 2009-2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
@@ -18,12 +18,12 @@
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
|
-#include <renameat2.h>
|
||||||
|
+#include <renameatu.h>
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "signature.h"
|
||||||
|
-SIGNATURE_CHECK (renameat2, int,
|
||||||
|
+SIGNATURE_CHECK (renameatu, int,
|
||||||
|
(int, char const *, int, char const *, unsigned int));
|
||||||
|
|
||||||
|
#include <dirent.h>
|
||||||
|
@@ -39,18 +39,18 @@ SIGNATURE_CHECK (renameat2, int,
|
||||||
|
#include "ignore-value.h"
|
||||||
|
#include "macros.h"
|
||||||
|
|
||||||
|
-#define BASE "test-renameat2.t"
|
||||||
|
+#define BASE "test-renameatu.t"
|
||||||
|
|
||||||
|
#include "test-rename.h"
|
||||||
|
|
||||||
|
static int dfd1 = AT_FDCWD;
|
||||||
|
static int dfd2 = AT_FDCWD;
|
||||||
|
|
||||||
|
-/* Wrapper to test renameat2 like rename. */
|
||||||
|
+/* Wrapper to test renameatu like rename. */
|
||||||
|
static int
|
||||||
|
do_rename (char const *name1, char const *name2)
|
||||||
|
{
|
||||||
|
- return renameat2 (dfd1, name1, dfd2, name2, 0);
|
||||||
|
+ return renameatu (dfd1, name1, dfd2, name2, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
@@ -67,24 +67,24 @@ main (void)
|
||||||
|
/* Test behaviour for invalid file descriptors. */
|
||||||
|
{
|
||||||
|
errno = 0;
|
||||||
|
- ASSERT (renameat2 (-1, "foo", AT_FDCWD, "bar", 0) == -1);
|
||||||
|
+ ASSERT (renameatu (-1, "foo", AT_FDCWD, "bar", 0) == -1);
|
||||||
|
ASSERT (errno == EBADF);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
close (99);
|
||||||
|
errno = 0;
|
||||||
|
- ASSERT (renameat2 (99, "foo", AT_FDCWD, "bar", 0) == -1);
|
||||||
|
+ ASSERT (renameatu (99, "foo", AT_FDCWD, "bar", 0) == -1);
|
||||||
|
ASSERT (errno == EBADF);
|
||||||
|
}
|
||||||
|
ASSERT (close (creat (BASE "oo", 0600)) == 0);
|
||||||
|
{
|
||||||
|
errno = 0;
|
||||||
|
- ASSERT (renameat2 (AT_FDCWD, BASE "oo", -1, "bar", 0) == -1);
|
||||||
|
+ ASSERT (renameatu (AT_FDCWD, BASE "oo", -1, "bar", 0) == -1);
|
||||||
|
ASSERT (errno == EBADF);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
errno = 0;
|
||||||
|
- ASSERT (renameat2 (AT_FDCWD, BASE "oo", 99, "bar", 0) == -1);
|
||||||
|
+ ASSERT (renameatu (AT_FDCWD, BASE "oo", 99, "bar", 0) == -1);
|
||||||
|
ASSERT (errno == EBADF);
|
||||||
|
}
|
||||||
|
ASSERT (unlink (BASE "oo") == 0);
|
||||||
|
@@ -133,13 +133,13 @@ main (void)
|
||||||
|
|
||||||
|
ASSERT (sprintf (strchr (file1, '\0') - 2, "%02d", i) == 2);
|
||||||
|
ASSERT (sprintf (strchr (file2, '\0') - 2, "%02d", i + 1) == 2);
|
||||||
|
- ASSERT (renameat2 (fd1, file1, fd2, file2, 0) == 0);
|
||||||
|
+ ASSERT (renameatu (fd1, file1, fd2, file2, 0) == 0);
|
||||||
|
free (file1);
|
||||||
|
free (file2);
|
||||||
|
}
|
||||||
|
dfd2 = open ("..", O_RDONLY);
|
||||||
|
ASSERT (0 <= dfd2);
|
||||||
|
- ASSERT (renameat2 (dfd, "../" BASE "16", dfd2, BASE "17", 0) == 0);
|
||||||
|
+ ASSERT (renameatu (dfd, "../" BASE "16", dfd2, BASE "17", 0) == 0);
|
||||||
|
ASSERT (close (dfd2) == 0);
|
||||||
|
|
||||||
|
/* Now we change back to the parent directory, and set dfd to ".";
|
||||||
|
@@ -152,47 +152,47 @@ main (void)
|
||||||
|
|
||||||
|
ASSERT (close (creat (BASE "sub2/file", 0600)) == 0);
|
||||||
|
errno = 0;
|
||||||
|
- ASSERT (renameat2 (dfd, BASE "sub1", dfd, BASE "sub2", 0) == -1);
|
||||||
|
+ ASSERT (renameatu (dfd, BASE "sub1", dfd, BASE "sub2", 0) == -1);
|
||||||
|
ASSERT (errno == EEXIST || errno == ENOTEMPTY);
|
||||||
|
ASSERT (unlink (BASE "sub2/file") == 0);
|
||||||
|
errno = 0;
|
||||||
|
- ASSERT (renameat2 (dfd, BASE "sub2", dfd, BASE "sub1/.", 0) == -1);
|
||||||
|
+ ASSERT (renameatu (dfd, BASE "sub2", dfd, BASE "sub1/.", 0) == -1);
|
||||||
|
ASSERT (errno == EINVAL || errno == EISDIR || errno == EBUSY
|
||||||
|
|| errno == ENOTEMPTY || errno == EEXIST
|
||||||
|
|| errno == ENOENT /* WSL */);
|
||||||
|
errno = 0;
|
||||||
|
- ASSERT (renameat2 (dfd, BASE "sub2/.", dfd, BASE "sub1", 0) == -1);
|
||||||
|
+ ASSERT (renameatu (dfd, BASE "sub2/.", dfd, BASE "sub1", 0) == -1);
|
||||||
|
ASSERT (errno == EINVAL || errno == EBUSY || errno == EEXIST
|
||||||
|
|| errno == ENOENT /* WSL */);
|
||||||
|
errno = 0;
|
||||||
|
- ASSERT (renameat2 (dfd, BASE "17", dfd, BASE "sub1", 0) == -1);
|
||||||
|
+ ASSERT (renameatu (dfd, BASE "17", dfd, BASE "sub1", 0) == -1);
|
||||||
|
ASSERT (errno == EISDIR);
|
||||||
|
errno = 0;
|
||||||
|
- ASSERT (renameat2 (dfd, BASE "nosuch", dfd, BASE "18", 0) == -1);
|
||||||
|
+ ASSERT (renameatu (dfd, BASE "nosuch", dfd, BASE "18", 0) == -1);
|
||||||
|
ASSERT (errno == ENOENT);
|
||||||
|
errno = 0;
|
||||||
|
- ASSERT (renameat2 (dfd, "", dfd, BASE "17", 0) == -1);
|
||||||
|
+ ASSERT (renameatu (dfd, "", dfd, BASE "17", 0) == -1);
|
||||||
|
ASSERT (errno == ENOENT);
|
||||||
|
errno = 0;
|
||||||
|
- ASSERT (renameat2 (dfd, BASE "17", dfd, "", 0) == -1);
|
||||||
|
+ ASSERT (renameatu (dfd, BASE "17", dfd, "", 0) == -1);
|
||||||
|
ASSERT (errno == ENOENT);
|
||||||
|
errno = 0;
|
||||||
|
- ASSERT (renameat2 (dfd, BASE "sub2", dfd, BASE "17", 0) == -1);
|
||||||
|
+ ASSERT (renameatu (dfd, BASE "sub2", dfd, BASE "17", 0) == -1);
|
||||||
|
ASSERT (errno == ENOTDIR);
|
||||||
|
errno = 0;
|
||||||
|
- ASSERT (renameat2 (dfd, BASE "17/", dfd, BASE "18", 0) == -1);
|
||||||
|
+ ASSERT (renameatu (dfd, BASE "17/", dfd, BASE "18", 0) == -1);
|
||||||
|
ASSERT (errno == ENOTDIR);
|
||||||
|
errno = 0;
|
||||||
|
- ASSERT (renameat2 (dfd, BASE "17", dfd, BASE "18/", 0) == -1);
|
||||||
|
+ ASSERT (renameatu (dfd, BASE "17", dfd, BASE "18/", 0) == -1);
|
||||||
|
ASSERT (errno == ENOTDIR || errno == ENOENT);
|
||||||
|
|
||||||
|
/* Finally, make sure we cannot overwrite existing files. */
|
||||||
|
ASSERT (close (creat (BASE "sub2/file", 0600)) == 0);
|
||||||
|
errno = 0;
|
||||||
|
- ASSERT ((renameat2 (dfd, BASE "sub2", dfd, BASE "sub1", RENAME_NOREPLACE)
|
||||||
|
+ ASSERT ((renameatu (dfd, BASE "sub2", dfd, BASE "sub1", RENAME_NOREPLACE)
|
||||||
|
== -1)
|
||||||
|
&& errno == EEXIST);
|
||||||
|
- ASSERT ((renameat2 (dfd, BASE "sub2/file", dfd, BASE "17", RENAME_NOREPLACE)
|
||||||
|
+ ASSERT ((renameatu (dfd, BASE "sub2/file", dfd, BASE "17", RENAME_NOREPLACE)
|
||||||
|
== -1)
|
||||||
|
&& errno == EEXIST);
|
||||||
|
|
||||||
|
diff --git a/lib/backupfile.c b/lib/backupfile.c
|
||||||
|
index d438455..637be6c 100644
|
||||||
|
--- a/lib/backupfile.c
|
||||||
|
+++ b/lib/backupfile.c
|
||||||
|
@@ -23,7 +23,7 @@
|
||||||
|
#include "backup-internal.h"
|
||||||
|
|
||||||
|
#include "dirname.h"
|
||||||
|
-#include "renameat2.h"
|
||||||
|
+#include "renameatu.h"
|
||||||
|
#include "xalloc-oversized.h"
|
||||||
|
|
||||||
|
#include <fcntl.h>
|
||||||
|
@@ -353,7 +353,7 @@ backupfile_internal (char const *file, enum backup_type backup_type, bool rename
|
||||||
|
base_offset = 0;
|
||||||
|
}
|
||||||
|
unsigned flags = backup_type == simple_backups ? 0 : RENAME_NOREPLACE;
|
||||||
|
- if (renameat2 (AT_FDCWD, file, sdir, s + base_offset, flags) == 0)
|
||||||
|
+ if (renameatu (AT_FDCWD, file, sdir, s + base_offset, flags) == 0)
|
||||||
|
break;
|
||||||
|
int e = errno;
|
||||||
|
if (e != EEXIST)
|
||||||
|
diff --git a/lib/gnulib.mk b/lib/gnulib.mk
|
||||||
|
index 04473d5..0b747e3 100644
|
||||||
|
--- a/lib/gnulib.mk
|
||||||
|
+++ b/lib/gnulib.mk
|
||||||
|
@@ -21,7 +21,7 @@
|
||||||
|
# the same distribution terms as the rest of that program.
|
||||||
|
#
|
||||||
|
# Generated by gnulib-tool.
|
||||||
|
-# Reproduce by: gnulib-tool --import --local-dir=gl --lib=libcoreutils --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=gnulib-tests --aux-dir=build-aux --with-tests --avoid=canonicalize-lgpl --avoid=dummy --makefile-name=gnulib.mk --no-conditional-dependencies --no-libtool --macro-prefix=gl acl alignof alloca announce-gen areadlink-with-size argmatch argv-iter assert autobuild backup-rename backupfile base32 base64 buffer-lcm c-strcase c-strtod c-strtold calloc-gnu canon-host canonicalize chown cloexec closein closeout config-h configmake crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 cycle-check d-ino d-type di-set diacrit dirfd dirname do-release-commit-and-tag dtoastr dup2 environ error euidaccess exclude exitfail explicit_bzero faccessat fadvise fchdir fchmodat fchownat fclose fcntl fcntl-safer fd-reopen fdatasync fdl fdopen fdutimensat file-has-acl file-type fileblocks filemode filenamecat filevercmp flexmember fnmatch-gnu fopen-safer fprintftime freopen freopen-safer fseeko fstatat fsusage fsync ftoastr ftruncate fts full-read full-write getgroups gethrxtime getline getloadavg getlogin getndelim2 getopt-gnu getpagesize getpass-gnu gettext-h gettime gettimeofday getugroups getusershell git-version-gen gitlog-to-changelog gnu-make gnu-web-doc-update gnumakefile gnupload group-member hard-locale hash hash-pjw heap host-os human idcache ignore-value inttostr inttypes isapipe isatty isblank largefile lchmod lchown ldtoastr lib-ignore linebuffer link link-follow linkat long-options lstat maintainer-makefile malloc-gnu manywarnings mbrlen mbrtowc mbsalign mbschr mbslen mbswidth memcasecmp memchr memcmp2 mempcpy memrchr mgetgroups mkancesdirs mkdir mkdir-p mkfifo mknod mkostemp mkstemp mktime modechange mountlist mpsort netinet_in non-recursive-gnulib-prefix-hack nproc nstrftime obstack open parse-datetime pathmax perl physmem pipe-posix pipe2 posix-shell posixtm posixver priv-set progname propername pthread putenv quote quotearg randint randperm read-file readlink readtokens readtokens0 readutmp realloc-gnu regex remove rename renameat renameat2 rmdir root-dev-ino rpmatch safe-read same save-cwd savedir savewd selinux-at setenv settime sig2str sigaction smack ssize_t stat-macros stat-size stat-time statat stdbool stdlib-safer stpcpy stpncpy strdup-posix strncat strnumcmp strsignal strtod strtoimax strtoumax symlinkat sys_ioctl sys_resource sys_stat sys_wait tempname termios time_rz timer-time timespec tzset uname unicodeio unistd-safer unlink-busy unlinkat unlocked-io unsetenv update-copyright uptime useless-if-before-free userspec utimecmp utimens vasprintf-posix vc-list-files verify verror version-etc-fsf wchar-single wcswidth wcwidth winsz-ioctl winsz-termios write-any-file xalloc xbinary-io xdectoint xfts xgetcwd xgetgroups xgethostname xmemcoll xnanosleep xprintf xprintf-posix xreadlink xstrtod xstrtoimax xstrtol xstrtold xstrtoumax year2038 yesno
|
||||||
|
+# Reproduce by: gnulib-tool --import --local-dir=gl --lib=libcoreutils --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=gnulib-tests --aux-dir=build-aux --with-tests --avoid=canonicalize-lgpl --avoid=dummy --makefile-name=gnulib.mk --no-conditional-dependencies --no-libtool --macro-prefix=gl acl alignof alloca announce-gen areadlink-with-size argmatch argv-iter assert autobuild backup-rename backupfile base32 base64 buffer-lcm c-strcase c-strtod c-strtold calloc-gnu canon-host canonicalize chown cloexec closein closeout config-h configmake crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 cycle-check d-ino d-type di-set diacrit dirfd dirname do-release-commit-and-tag dtoastr dup2 environ error euidaccess exclude exitfail explicit_bzero faccessat fadvise fchdir fchmodat fchownat fclose fcntl fcntl-safer fd-reopen fdatasync fdl fdopen fdutimensat file-has-acl file-type fileblocks filemode filenamecat filevercmp flexmember fnmatch-gnu fopen-safer fprintftime freopen freopen-safer fseeko fstatat fsusage fsync ftoastr ftruncate fts full-read full-write getgroups gethrxtime getline getloadavg getlogin getndelim2 getopt-gnu getpagesize getpass-gnu gettext-h gettime gettimeofday getugroups getusershell git-version-gen gitlog-to-changelog gnu-make gnu-web-doc-update gnumakefile gnupload group-member hard-locale hash hash-pjw heap host-os human idcache ignore-value inttostr inttypes isapipe isatty isblank largefile lchmod lchown ldtoastr lib-ignore linebuffer link link-follow linkat long-options lstat maintainer-makefile malloc-gnu manywarnings mbrlen mbrtowc mbsalign mbschr mbslen mbswidth memcasecmp memchr memcmp2 mempcpy memrchr mgetgroups mkancesdirs mkdir mkdir-p mkfifo mknod mkostemp mkstemp mktime modechange mountlist mpsort netinet_in non-recursive-gnulib-prefix-hack nproc nstrftime obstack open parse-datetime pathmax perl physmem pipe-posix pipe2 posix-shell posixtm posixver priv-set progname propername pthread putenv quote quotearg randint randperm read-file readlink readtokens readtokens0 readutmp realloc-gnu regex remove rename renameat renameatu rmdir root-dev-ino rpmatch safe-read same save-cwd savedir savewd selinux-at setenv settime sig2str sigaction smack ssize_t stat-macros stat-size stat-time statat stdbool stdlib-safer stpcpy stpncpy strdup-posix strncat strnumcmp strsignal strtod strtoimax strtoumax symlinkat sys_ioctl sys_resource sys_stat sys_wait tempname termios time_rz timer-time timespec tzset uname unicodeio unistd-safer unlink-busy unlinkat unlocked-io unsetenv update-copyright uptime useless-if-before-free userspec utimecmp utimens vasprintf-posix vc-list-files verify verror version-etc-fsf wchar-single wcswidth wcwidth winsz-ioctl winsz-termios write-any-file xalloc xbinary-io xdectoint xfts xgetcwd xgetgroups xgethostname xmemcoll xnanosleep xprintf xprintf-posix xreadlink xstrtod xstrtoimax xstrtol xstrtold xstrtoumax year2038 yesno
|
||||||
|
|
||||||
|
|
||||||
|
MOSTLYCLEANFILES += lib/core lib/*.stackdump
|
||||||
|
@@ -3218,15 +3218,15 @@ EXTRA_lib_libcoreutils_a_SOURCES += lib/renameat.c
|
||||||
|
|
||||||
|
## end gnulib module renameat
|
||||||
|
|
||||||
|
-## begin gnulib module renameat2
|
||||||
|
+## begin gnulib module renameatu
|
||||||
|
|
||||||
|
-lib_libcoreutils_a_SOURCES += lib/renameat2.c
|
||||||
|
+lib_libcoreutils_a_SOURCES += lib/renameatu.c
|
||||||
|
|
||||||
|
-EXTRA_DIST += lib/at-func2.c lib/renameat2.h
|
||||||
|
+EXTRA_DIST += lib/at-func2.c lib/renameatu.h
|
||||||
|
|
||||||
|
EXTRA_lib_libcoreutils_a_SOURCES += lib/at-func2.c
|
||||||
|
|
||||||
|
-## end gnulib module renameat2
|
||||||
|
+## end gnulib module renameatu
|
||||||
|
|
||||||
|
## begin gnulib module rewinddir
|
||||||
|
|
||||||
|
diff --git a/lib/renameat.c b/lib/renameat.c
|
||||||
|
index 0cb7d33..67be22b 100644
|
||||||
|
--- a/lib/renameat.c
|
||||||
|
+++ b/lib/renameat.c
|
||||||
|
@@ -16,10 +16,10 @@
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
-#include "renameat2.h"
|
||||||
|
+#include "renameatu.h"
|
||||||
|
|
||||||
|
int
|
||||||
|
renameat (int fd1, char const *src, int fd2, char const *dst)
|
||||||
|
{
|
||||||
|
- return renameat2 (fd1, src, fd2, dst, 0);
|
||||||
|
+ return renameatu (fd1, src, fd2, dst, 0);
|
||||||
|
}
|
||||||
|
diff --git a/lib/renameat2.c b/lib/renameatu.c
|
||||||
|
similarity index 94%
|
||||||
|
rename from lib/renameat2.c
|
||||||
|
rename to lib/renameatu.c
|
||||||
|
index a295ec3..b013ad6 100644
|
||||||
|
--- a/lib/renameat2.c
|
||||||
|
+++ b/lib/renameatu.c
|
||||||
|
@@ -18,7 +18,7 @@
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
|
-#include "renameat2.h"
|
||||||
|
+#include "renameatu.h"
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
@@ -68,10 +68,13 @@ rename_noreplace (char const *src, char const *dst)
|
||||||
|
the restore_cwd fails, then give a diagnostic and exit nonzero.
|
||||||
|
|
||||||
|
Obey FLAGS when doing the renaming. If FLAGS is zero, this
|
||||||
|
- function is equivalent to renameat (FD1, SRC, FD2, DST). */
|
||||||
|
+ function is equivalent to renameat (FD1, SRC, FD2, DST).
|
||||||
|
+ Otherwise, attempt to implement FLAGS even if the implementation is
|
||||||
|
+ not atomic; this differs from the GNU/Linux native renameat2,
|
||||||
|
+ which fails if it cannot guarantee atomicity. */
|
||||||
|
|
||||||
|
int
|
||||||
|
-renameat2 (int fd1, char const *src, int fd2, char const *dst,
|
||||||
|
+renameatu (int fd1, char const *src, int fd2, char const *dst,
|
||||||
|
unsigned int flags)
|
||||||
|
{
|
||||||
|
int ret_val = -1;
|
||||||
|
diff --git a/lib/renameat2.h b/lib/renameatu.h
|
||||||
|
similarity index 84%
|
||||||
|
rename from lib/renameat2.h
|
||||||
|
rename to lib/renameatu.h
|
||||||
|
index aba7966..7d79775 100644
|
||||||
|
--- a/lib/renameat2.h
|
||||||
|
+++ b/lib/renameatu.h
|
||||||
|
@@ -16,15 +16,13 @@
|
||||||
|
|
||||||
|
/* written by Paul Eggert */
|
||||||
|
|
||||||
|
-/* Get RENAME_* macros from linux/fs.h if present, otherwise supply
|
||||||
|
+/* Get RENAME_* macros from <stdio.h> if present, otherwise supply
|
||||||
|
the traditional Linux values. */
|
||||||
|
-#if HAVE_LINUX_FS_H
|
||||||
|
-# include <linux/fs.h>
|
||||||
|
-#endif
|
||||||
|
+#include <stdio.h>
|
||||||
|
#ifndef RENAME_NOREPLACE
|
||||||
|
# define RENAME_NOREPLACE (1 << 0)
|
||||||
|
# define RENAME_EXCHANGE (1 << 1)
|
||||||
|
# define RENAME_WHITEOUT (1 << 2)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-extern int renameat2 (int, char const *, int, char const *, unsigned int);
|
||||||
|
+extern int renameatu (int, char const *, int, char const *, unsigned int);
|
||||||
|
--
|
||||||
|
2.14.4
|
||||||
|
|
||||||
|
|
||||||
|
From a6b7ff5ef538bbdff4550a56fed878e9cd951d6d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
Date: Thu, 5 Jul 2018 09:33:48 -0700
|
||||||
|
Subject: [PATCH 2/2] build: update gnulib submodule to latest
|
||||||
|
|
||||||
|
* bootstrap.conf, src/copy.c, src/mv.c, src/shred.c:
|
||||||
|
Adjust to renaming of renameat2 to renameatu.
|
||||||
|
|
||||||
|
Upstream-commit: 439741053256618eb651e6d43919df29625b8714
|
||||||
|
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||||
|
---
|
||||||
|
bootstrap.conf | 2 +-
|
||||||
|
src/copy.c | 4 ++--
|
||||||
|
src/mv.c | 4 ++--
|
||||||
|
src/shred.c | 4 ++--
|
||||||
|
4 files changed, 7 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/bootstrap.conf b/bootstrap.conf
|
||||||
|
index 4da4f94..fcf29dc 100644
|
||||||
|
--- a/bootstrap.conf
|
||||||
|
+++ b/bootstrap.conf
|
||||||
|
@@ -210,7 +210,7 @@ gnulib_modules="
|
||||||
|
remove
|
||||||
|
rename
|
||||||
|
renameat
|
||||||
|
- renameat2
|
||||||
|
+ renameatu
|
||||||
|
rmdir
|
||||||
|
root-dev-ino
|
||||||
|
rpmatch
|
||||||
|
diff --git a/src/copy.c b/src/copy.c
|
||||||
|
index 58d2f6e..1a9cdd1 100644
|
||||||
|
--- a/src/copy.c
|
||||||
|
+++ b/src/copy.c
|
||||||
|
@@ -53,7 +53,7 @@
|
||||||
|
#include "ignore-value.h"
|
||||||
|
#include "ioblksize.h"
|
||||||
|
#include "quote.h"
|
||||||
|
-#include "renameat2.h"
|
||||||
|
+#include "renameatu.h"
|
||||||
|
#include "root-uid.h"
|
||||||
|
#include "same.h"
|
||||||
|
#include "savedir.h"
|
||||||
|
@@ -1873,7 +1873,7 @@ copy_internal (char const *src_name, char const *dst_name,
|
||||||
|
if (x->move_mode)
|
||||||
|
{
|
||||||
|
if (rename_errno < 0)
|
||||||
|
- rename_errno = (renameat2 (AT_FDCWD, src_name, AT_FDCWD, dst_name,
|
||||||
|
+ rename_errno = (renameatu (AT_FDCWD, src_name, AT_FDCWD, dst_name,
|
||||||
|
RENAME_NOREPLACE)
|
||||||
|
? errno : 0);
|
||||||
|
new_dst = rename_errno == 0;
|
||||||
|
diff --git a/src/mv.c b/src/mv.c
|
||||||
|
index b6dd72d..36fd1af 100644
|
||||||
|
--- a/src/mv.c
|
||||||
|
+++ b/src/mv.c
|
||||||
|
@@ -31,7 +31,7 @@
|
||||||
|
#include "error.h"
|
||||||
|
#include "filenamecat.h"
|
||||||
|
#include "remove.h"
|
||||||
|
-#include "renameat2.h"
|
||||||
|
+#include "renameatu.h"
|
||||||
|
#include "root-dev-ino.h"
|
||||||
|
#include "priv-set.h"
|
||||||
|
|
||||||
|
@@ -456,7 +456,7 @@ main (int argc, char **argv)
|
||||||
|
{
|
||||||
|
assert (2 <= n_files);
|
||||||
|
if (n_files == 2)
|
||||||
|
- x.rename_errno = (renameat2 (AT_FDCWD, file[0], AT_FDCWD, file[1],
|
||||||
|
+ x.rename_errno = (renameatu (AT_FDCWD, file[0], AT_FDCWD, file[1],
|
||||||
|
RENAME_NOREPLACE)
|
||||||
|
? errno : 0);
|
||||||
|
if (x.rename_errno != 0 && target_directory_operand (file[n_files - 1]))
|
||||||
|
diff --git a/src/shred.c b/src/shred.c
|
||||||
|
index 2ddaadd..270b1e9 100644
|
||||||
|
--- a/src/shred.c
|
||||||
|
+++ b/src/shred.c
|
||||||
|
@@ -93,7 +93,7 @@
|
||||||
|
#include "human.h"
|
||||||
|
#include "randint.h"
|
||||||
|
#include "randread.h"
|
||||||
|
-#include "renameat2.h"
|
||||||
|
+#include "renameatu.h"
|
||||||
|
#include "stat-size.h"
|
||||||
|
|
||||||
|
/* Default number of times to overwrite. */
|
||||||
|
@@ -1096,7 +1096,7 @@ wipename (char *oldname, char const *qoldname, struct Options const *flags)
|
||||||
|
memset (base, nameset[0], len);
|
||||||
|
base[len] = 0;
|
||||||
|
bool rename_ok;
|
||||||
|
- while (! (rename_ok = (renameat2 (AT_FDCWD, oldname, AT_FDCWD, newname,
|
||||||
|
+ while (! (rename_ok = (renameatu (AT_FDCWD, oldname, AT_FDCWD, newname,
|
||||||
|
RENAME_NOREPLACE)
|
||||||
|
== 0))
|
||||||
|
&& errno == EEXIST && incname (base, len))
|
||||||
|
--
|
||||||
|
2.14.4
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,36 @@
|
|||||||
|
From ef6be60dcaf424bdb21392aff42331bd4dc272e0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kamil Dudka <kdudka@redhat.com>
|
||||||
|
Date: Thu, 14 Mar 2019 13:48:01 +0100
|
||||||
|
Subject: [PATCH] md5sum,b2sum,sha*sum: --help: add note about binary/text mode
|
||||||
|
|
||||||
|
* src/md5sum.c (usage): Make it clear that there is no difference
|
||||||
|
between binary mode and text mode on GNU systems.
|
||||||
|
|
||||||
|
Bug: https://bugzilla.redhat.com/406981
|
||||||
|
Bug: https://bugzilla.redhat.com/1688740
|
||||||
|
|
||||||
|
Upstream-commit: ae61b1066351bb784b54fbfd7b52caf129ec286c
|
||||||
|
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||||
|
---
|
||||||
|
src/md5sum.c | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/md5sum.c b/src/md5sum.c
|
||||||
|
index 3532f7b7a..f75b6de02 100644
|
||||||
|
--- a/src/md5sum.c
|
||||||
|
+++ b/src/md5sum.c
|
||||||
|
@@ -287,7 +287,10 @@ The following five options are useful only when verifying checksums:\n\
|
||||||
|
The sums are computed as described in %s. When checking, the input\n\
|
||||||
|
should be a former output of this program. The default mode is to print a\n\
|
||||||
|
line with checksum, a space, a character indicating input mode ('*' for binary,\
|
||||||
|
-\n' ' for text or where binary is insignificant), and name for each FILE.\n"),
|
||||||
|
+\n' ' for text or where binary is insignificant), and name for each FILE.\n\
|
||||||
|
+\n\
|
||||||
|
+Note: There is no difference between binary mode and text mode on GNU systems.\
|
||||||
|
+\n"),
|
||||||
|
DIGEST_REFERENCE);
|
||||||
|
emit_ancillary_info (PROGRAM_NAME);
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.17.2
|
||||||
|
|
@ -1,100 +0,0 @@
|
|||||||
From 81e25c8521937ecf7f444bab11fddaaf81cc3efd Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
Date: Fri, 17 Jun 2016 16:58:18 +0200
|
|
||||||
Subject: [PATCH] downstream changes to default DIR_COLORS
|
|
||||||
|
|
||||||
---
|
|
||||||
DIR_COLORS | 9 ++++++++-
|
|
||||||
DIR_COLORS.lightbgcolor | 21 +++++++++++++++------
|
|
||||||
2 files changed, 23 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/DIR_COLORS b/DIR_COLORS
|
|
||||||
index bd5df23..84f2417 100644
|
|
||||||
--- a/DIR_COLORS
|
|
||||||
+++ b/DIR_COLORS
|
|
||||||
@@ -1,3 +1,7 @@
|
|
||||||
+# 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,6 +12,9 @@
|
|
||||||
# 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
|
|
||||||
@@ -58,7 +65,7 @@ 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
|
|
||||||
+MISSING 01;37;41 # ... 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
|
|
||||||
diff --git a/DIR_COLORS.lightbgcolor b/DIR_COLORS.lightbgcolor
|
|
||||||
index 4316832..6402854 100644
|
|
||||||
--- a/DIR_COLORS.lightbgcolor
|
|
||||||
+++ b/DIR_COLORS.lightbgcolor
|
|
||||||
@@ -1,3 +1,9 @@
|
|
||||||
+# Configuration file for the color ls utility - modified for lighter backgrounds
|
|
||||||
+
|
|
||||||
+# 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,6 +14,9 @@
|
|
||||||
# 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
|
|
||||||
@@ -48,17 +57,17 @@ TERM xterm*
|
|
||||||
#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 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.)
|
|
||||||
MULTIHARDLINK 00 # regular file with more than one link
|
|
||||||
FIFO 40;33 # pipe
|
|
||||||
-SOCK 01;35 # socket
|
|
||||||
-DOOR 01;35 # door
|
|
||||||
+SOCK 00;35 # socket
|
|
||||||
+DOOR 00;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
|
|
||||||
+MISSING 01;37;41 # ... 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
|
|
||||||
@@ -67,7 +76,7 @@ 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 01;32
|
|
||||||
+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.
|
|
||||||
--
|
|
||||||
2.21.1
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,81 +0,0 @@
|
|||||||
From 9618fb718b75920f37e5be2049ad1d0bb5c4a28c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
|
||||||
Date: Tue, 26 Jan 2021 09:23:54 -0800
|
|
||||||
Subject: [PATCH] expr: fix bug with unmatched \(...\)
|
|
||||||
|
|
||||||
Problem reported by Qiuhao Li.
|
|
||||||
* doc/coreutils.texi (String expressions):
|
|
||||||
Document the correct behavior, which POSIX requires.
|
|
||||||
* src/expr.c (docolon): Treat unmatched \(...\) as empty.
|
|
||||||
* tests/misc/expr.pl: New test.
|
|
||||||
|
|
||||||
Upstream-commit: 735083ba24878075235007b4417982ad5700436d
|
|
||||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
---
|
|
||||||
doc/coreutils.texi | 14 ++++++++------
|
|
||||||
src/expr.c | 9 +++++++--
|
|
||||||
tests/misc/expr.pl | 3 +++
|
|
||||||
3 files changed, 18 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
|
|
||||||
index 2382a16..5b2bb2c 100644
|
|
||||||
--- a/doc/coreutils.texi
|
|
||||||
+++ b/doc/coreutils.texi
|
|
||||||
@@ -13529,12 +13529,14 @@ second is considered to be a (basic, a la GNU @code{grep}) regular
|
|
||||||
expression, with a @code{^} implicitly prepended. The first argument is
|
|
||||||
then matched against this regular expression.
|
|
||||||
|
|
||||||
-If the match succeeds and @var{regex} uses @samp{\(} and @samp{\)}, the
|
|
||||||
-@code{:} expression returns the part of @var{string} that matched the
|
|
||||||
-subexpression; otherwise, it returns the number of characters matched.
|
|
||||||
-
|
|
||||||
-If the match fails, the @code{:} operator returns the null string if
|
|
||||||
-@samp{\(} and @samp{\)} are used in @var{regex}, otherwise 0.
|
|
||||||
+If @var{regex} does not use @samp{\(} and @samp{\)}, the @code{:}
|
|
||||||
+expression returns the number of characters matched, or 0 if the match
|
|
||||||
+fails.
|
|
||||||
+
|
|
||||||
+If @var{regex} uses @samp{\(} and @samp{\)}, the @code{:} expression
|
|
||||||
+returns the part of @var{string} that matched the subexpression, or
|
|
||||||
+the null string if the match failed or the subexpression did not
|
|
||||||
+contribute to the match.
|
|
||||||
|
|
||||||
@kindex \( @r{regexp operator}
|
|
||||||
Only the first @samp{\( @dots{} \)} pair is relevant to the return
|
|
||||||
diff --git a/src/expr.c b/src/expr.c
|
|
||||||
index e134872..0616a42 100644
|
|
||||||
--- a/src/expr.c
|
|
||||||
+++ b/src/expr.c
|
|
||||||
@@ -721,8 +721,13 @@ docolon (VALUE *sv, VALUE *pv)
|
|
||||||
/* Were \(...\) used? */
|
|
||||||
if (re_buffer.re_nsub > 0)
|
|
||||||
{
|
|
||||||
- sv->u.s[re_regs.end[1]] = '\0';
|
|
||||||
- v = str_value (sv->u.s + re_regs.start[1]);
|
|
||||||
+ if (re_regs.end[1] < 0)
|
|
||||||
+ v = str_value ("");
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ sv->u.s[re_regs.end[1]] = '\0';
|
|
||||||
+ v = str_value (sv->u.s + re_regs.start[1]);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
diff --git a/tests/misc/expr.pl b/tests/misc/expr.pl
|
|
||||||
index e45f8e7..e57f79d 100755
|
|
||||||
--- a/tests/misc/expr.pl
|
|
||||||
+++ b/tests/misc/expr.pl
|
|
||||||
@@ -84,6 +84,9 @@ my @Tests =
|
|
||||||
# In 5.94 and earlier, anchors incorrectly matched newlines.
|
|
||||||
['anchor', "'a\nb' : 'a\$'", {OUT => '0'}, {EXIT => 1}],
|
|
||||||
|
|
||||||
+ # In 8.32, \( ... \) that did not match caused memory errors.
|
|
||||||
+ ['emptysub', '"a" : "\\(b\\)*"', {OUT => ''}, {EXIT => 1}],
|
|
||||||
+
|
|
||||||
# These tests are taken from grep/tests/bre.tests.
|
|
||||||
['bre1', '"abc" : "a\\(b\\)c"', {OUT => 'b'}],
|
|
||||||
['bre2', '"a(" : "a("', {OUT => '2'}],
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
|||||||
From f61085aaa37f169365c56e44f5129d0491913b6a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
|
||||||
Date: Thu, 27 Aug 2020 17:52:58 -0700
|
|
||||||
Subject: [PATCH] perror, strerror_r: remove unportable tests
|
|
||||||
|
|
||||||
Problem reported by Florian Weimer in:
|
|
||||||
https://lists.gnu.org/r/bug-gnulib/2020-08/msg00220.html
|
|
||||||
* tests/test-perror2.c (main):
|
|
||||||
* tests/test-strerror_r.c (main): Omit unportable tests.
|
|
||||||
|
|
||||||
Upstream-commit: 175e0bc72808d564074c4adcc72aeadb74adfcc6
|
|
||||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
---
|
|
||||||
gnulib-tests/test-perror2.c | 3 ---
|
|
||||||
gnulib-tests/test-strerror_r.c | 3 ---
|
|
||||||
2 files changed, 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/gnulib-tests/test-perror2.c b/gnulib-tests/test-perror2.c
|
|
||||||
index 1d14eda..c6214dd 100644
|
|
||||||
--- a/gnulib-tests/test-perror2.c
|
|
||||||
+++ b/gnulib-tests/test-perror2.c
|
|
||||||
@@ -79,9 +79,6 @@ main (void)
|
|
||||||
errno = -5;
|
|
||||||
perror ("");
|
|
||||||
ASSERT (!ferror (stderr));
|
|
||||||
- ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1));
|
|
||||||
- ASSERT (msg2 == msg4 || STREQ (msg2, str2));
|
|
||||||
- ASSERT (msg3 == msg4 || STREQ (msg3, str3));
|
|
||||||
ASSERT (STREQ (msg4, str4));
|
|
||||||
|
|
||||||
free (str1);
|
|
||||||
diff --git a/gnulib-tests/test-strerror_r.c b/gnulib-tests/test-strerror_r.c
|
|
||||||
index b11d6fd..c1dbcf8 100644
|
|
||||||
--- a/gnulib-tests/test-strerror_r.c
|
|
||||||
+++ b/gnulib-tests/test-strerror_r.c
|
|
||||||
@@ -165,9 +165,6 @@ main (void)
|
|
||||||
|
|
||||||
strerror_r (EACCES, buf, sizeof buf);
|
|
||||||
strerror_r (-5, buf, sizeof buf);
|
|
||||||
- ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1));
|
|
||||||
- ASSERT (msg2 == msg4 || STREQ (msg2, str2));
|
|
||||||
- ASSERT (msg3 == msg4 || STREQ (msg3, str3));
|
|
||||||
ASSERT (STREQ (msg4, str4));
|
|
||||||
|
|
||||||
free (str1);
|
|
||||||
--
|
|
||||||
2.25.4
|
|
||||||
|
|
@ -1,153 +0,0 @@
|
|||||||
From 8c022656320592dbad146f5d3a3ae1875f419446 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
|
||||||
Date: Thu, 5 Mar 2020 17:25:29 -0800
|
|
||||||
Subject: [PATCH 1/2] ls: restore 8.31 behavior on removed directories
|
|
||||||
|
|
||||||
* NEWS: Mention this.
|
|
||||||
* src/ls.c: Do not include <sys/sycall.h>
|
|
||||||
(print_dir): Don't worry about whether the directory is removed.
|
|
||||||
* tests/ls/removed-directory.sh: Adjust to match new (i.e., old)
|
|
||||||
behavior.
|
|
||||||
|
|
||||||
Upstream-commit: 10fcb97bd728f09d4a027eddf8ad2900f0819b0a
|
|
||||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
---
|
|
||||||
src/ls.c | 22 ----------------------
|
|
||||||
tests/ls/removed-directory.sh | 10 ++--------
|
|
||||||
2 files changed, 2 insertions(+), 30 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/ls.c b/src/ls.c
|
|
||||||
index 9d25f62..850ecc2 100644
|
|
||||||
--- a/src/ls.c
|
|
||||||
+++ b/src/ls.c
|
|
||||||
@@ -49,10 +49,6 @@
|
|
||||||
# include <sys/ptem.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#ifdef __linux__
|
|
||||||
-# include <sys/syscall.h>
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <assert.h>
|
|
||||||
#include <setjmp.h>
|
|
||||||
@@ -2896,7 +2892,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg)
|
|
||||||
struct dirent *next;
|
|
||||||
uintmax_t total_blocks = 0;
|
|
||||||
static bool first = true;
|
|
||||||
- bool found_any_entries = false;
|
|
||||||
|
|
||||||
errno = 0;
|
|
||||||
dirp = opendir (name);
|
|
||||||
@@ -2972,7 +2967,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg)
|
|
||||||
next = readdir (dirp);
|
|
||||||
if (next)
|
|
||||||
{
|
|
||||||
- found_any_entries = true;
|
|
||||||
if (! file_ignored (next->d_name))
|
|
||||||
{
|
|
||||||
enum filetype type = unknown;
|
|
||||||
@@ -3018,22 +3012,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg)
|
|
||||||
if (errno != EOVERFLOW)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
-#ifdef __linux__
|
|
||||||
- else if (! found_any_entries)
|
|
||||||
- {
|
|
||||||
- /* If readdir finds no directory entries at all, not even "." or
|
|
||||||
- "..", then double check that the directory exists. */
|
|
||||||
- if (syscall (SYS_getdents, dirfd (dirp), NULL, 0) == -1
|
|
||||||
- && errno != EINVAL)
|
|
||||||
- {
|
|
||||||
- /* We exclude EINVAL as that pertains to buffer handling,
|
|
||||||
- and we've passed NULL as the buffer for simplicity.
|
|
||||||
- ENOENT is returned if appropriate before buffer handling. */
|
|
||||||
- file_failure (command_line_arg, _("reading directory %s"), name);
|
|
||||||
- }
|
|
||||||
- break;
|
|
||||||
- }
|
|
||||||
-#endif
|
|
||||||
else
|
|
||||||
break;
|
|
||||||
|
|
||||||
diff --git a/tests/ls/removed-directory.sh b/tests/ls/removed-directory.sh
|
|
||||||
index e8c835d..fe8f929 100755
|
|
||||||
--- a/tests/ls/removed-directory.sh
|
|
||||||
+++ b/tests/ls/removed-directory.sh
|
|
||||||
@@ -26,20 +26,14 @@ case $host_triplet in
|
|
||||||
*) skip_ 'non linux kernel' ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
-LS_FAILURE=2
|
|
||||||
-
|
|
||||||
-cat <<\EOF >exp-err || framework_failure_
|
|
||||||
-ls: reading directory '.': No such file or directory
|
|
||||||
-EOF
|
|
||||||
-
|
|
||||||
cwd=$(pwd)
|
|
||||||
mkdir d || framework_failure_
|
|
||||||
cd d || framework_failure_
|
|
||||||
rmdir ../d || framework_failure_
|
|
||||||
|
|
||||||
-returns_ $LS_FAILURE ls >../out 2>../err || fail=1
|
|
||||||
+ls >../out 2>../err || fail=1
|
|
||||||
cd "$cwd" || framework_failure_
|
|
||||||
compare /dev/null out || fail=1
|
|
||||||
-compare exp-err err || fail=1
|
|
||||||
+compare /dev/null err || fail=1
|
|
||||||
|
|
||||||
Exit $fail
|
|
||||||
--
|
|
||||||
2.21.1
|
|
||||||
|
|
||||||
|
|
||||||
From 847324a0debd9d12062c79e7a7a9d3d8ce76390d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
|
||||||
Date: Sat, 7 Mar 2020 10:29:51 -0800
|
|
||||||
Subject: [PATCH 2/2] ls: improve removed-directory test
|
|
||||||
|
|
||||||
* tests/ls/removed-directory.sh: Remove host_triplet test.
|
|
||||||
Skip this test if one cannot remove the working directory.
|
|
||||||
From a suggestion by Bernhard Voelker (Bug#39929).
|
|
||||||
|
|
||||||
Upstream-commit: 672819c73f2e94e61386dc0584bddf9da860cc26
|
|
||||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
---
|
|
||||||
tests/ls/removed-directory.sh | 13 ++++---------
|
|
||||||
1 file changed, 4 insertions(+), 9 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/tests/ls/removed-directory.sh b/tests/ls/removed-directory.sh
|
|
||||||
index fe8f929..63b209d 100755
|
|
||||||
--- a/tests/ls/removed-directory.sh
|
|
||||||
+++ b/tests/ls/removed-directory.sh
|
|
||||||
@@ -1,7 +1,7 @@
|
|
||||||
#!/bin/sh
|
|
||||||
-# If ls is asked to list a removed directory (e.g. the parent process's
|
|
||||||
-# current working directory that has been removed by another process), it
|
|
||||||
-# emits an error message.
|
|
||||||
+# If ls is asked to list a removed directory (e.g., the parent process's
|
|
||||||
+# current working directory has been removed by another process), it
|
|
||||||
+# should not emit an error message merely because the directory is removed.
|
|
||||||
|
|
||||||
# Copyright (C) 2020 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
@@ -21,15 +21,10 @@
|
|
||||||
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
|
|
||||||
print_ver_ ls
|
|
||||||
|
|
||||||
-case $host_triplet in
|
|
||||||
- *linux*) ;;
|
|
||||||
- *) skip_ 'non linux kernel' ;;
|
|
||||||
-esac
|
|
||||||
-
|
|
||||||
cwd=$(pwd)
|
|
||||||
mkdir d || framework_failure_
|
|
||||||
cd d || framework_failure_
|
|
||||||
-rmdir ../d || framework_failure_
|
|
||||||
+rmdir ../d || skip_ "can't remove working directory on this platform"
|
|
||||||
|
|
||||||
ls >../out 2>../err || fail=1
|
|
||||||
cd "$cwd" || framework_failure_
|
|
||||||
--
|
|
||||||
2.21.1
|
|
||||||
|
|
@ -1,85 +0,0 @@
|
|||||||
From 53c6b01e8e3fd338d7f53e5ff817ef86f9efa852 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
|
|
||||||
Date: Wed, 11 Nov 2020 17:22:33 +0000
|
|
||||||
Subject: [PATCH] ls: fix crash printing SELinux context for unstatable files
|
|
||||||
|
|
||||||
This crash was identified by Cyber Independent Testing Lab:
|
|
||||||
https://cyber-itl.org/2020/10/28/citl-7000-defects.html
|
|
||||||
and was introduced with commit v6.9.90-11-g4245876e2
|
|
||||||
|
|
||||||
* src/ls.c (gobble_file): Ensure scontext is initialized
|
|
||||||
in the case where files are not statable.
|
|
||||||
* tests/ls/selinux-segfault.sh: Renamed from proc-selinux-segfault.sh,
|
|
||||||
and added test case for broken symlinks.
|
|
||||||
* tests/local.mk: Adjust for the renamed test.
|
|
||||||
|
|
||||||
Upstream-commit: 6fc695cb4a26f09dfeef8b1c24895a707055334e
|
|
||||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
---
|
|
||||||
src/ls.c | 3 +++
|
|
||||||
tests/local.mk | 2 +-
|
|
||||||
.../{proc-selinux-segfault.sh => selinux-segfault.sh} | 10 ++++++++--
|
|
||||||
3 files changed, 12 insertions(+), 3 deletions(-)
|
|
||||||
rename tests/ls/{proc-selinux-segfault.sh => selinux-segfault.sh} (77%)
|
|
||||||
|
|
||||||
diff --git a/src/ls.c b/src/ls.c
|
|
||||||
index 4acf5f4..8eb483d 100644
|
|
||||||
--- a/src/ls.c
|
|
||||||
+++ b/src/ls.c
|
|
||||||
@@ -3412,6 +3412,9 @@ gobble_file (char const *name, enum filetype type, ino_t inode,
|
|
||||||
provokes an exit status of 1. */
|
|
||||||
file_failure (command_line_arg,
|
|
||||||
_("cannot access %s"), full_name);
|
|
||||||
+
|
|
||||||
+ f->scontext = UNKNOWN_SECURITY_CONTEXT;
|
|
||||||
+
|
|
||||||
if (command_line_arg)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
diff --git a/tests/local.mk b/tests/local.mk
|
|
||||||
index 2aeff2b..2441fdc 100644
|
|
||||||
--- a/tests/local.mk
|
|
||||||
+++ b/tests/local.mk
|
|
||||||
@@ -616,7 +616,7 @@ all_tests = \
|
|
||||||
tests/ls/multihardlink.sh \
|
|
||||||
tests/ls/no-arg.sh \
|
|
||||||
tests/ls/no-cap.sh \
|
|
||||||
- tests/ls/proc-selinux-segfault.sh \
|
|
||||||
+ tests/ls/selinux-segfault.sh \
|
|
||||||
tests/ls/quote-align.sh \
|
|
||||||
tests/ls/readdir-mountpoint-inode.sh \
|
|
||||||
tests/ls/recursive.sh \
|
|
||||||
diff --git a/tests/ls/proc-selinux-segfault.sh b/tests/ls/selinux-segfault.sh
|
|
||||||
similarity index 77%
|
|
||||||
rename from tests/ls/proc-selinux-segfault.sh
|
|
||||||
rename to tests/ls/selinux-segfault.sh
|
|
||||||
index 831a00e..e2b7ef6 100755
|
|
||||||
--- a/tests/ls/proc-selinux-segfault.sh
|
|
||||||
+++ b/tests/ls/selinux-segfault.sh
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
#!/bin/sh
|
|
||||||
-# ls -l /proc/sys would segfault when built against libselinux1 2.0.15-2+b1
|
|
||||||
+# Ensure we don't segfault in selinux handling
|
|
||||||
|
|
||||||
# Copyright (C) 2008-2020 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
@@ -19,9 +19,15 @@
|
|
||||||
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
|
|
||||||
print_ver_ ls
|
|
||||||
|
|
||||||
+# ls -l /proc/sys would segfault when built against libselinux1 2.0.15-2+b1
|
|
||||||
f=/proc/sys
|
|
||||||
test -r $f || f=.
|
|
||||||
-
|
|
||||||
ls -l $f > out || fail=1
|
|
||||||
|
|
||||||
+# ls <= 8.32 would segfault when printing
|
|
||||||
+# the security context of broken symlink targets
|
|
||||||
+mkdir sedir || framework_failure_
|
|
||||||
+ln -sf missing sedir/broken || framework_failure_
|
|
||||||
+returns_ 1 ls -L -R -Z -m sedir > out || fail=1
|
|
||||||
+
|
|
||||||
Exit $fail
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
@ -1,186 +0,0 @@
|
|||||||
From be77b4ab7cb68fd2daf9de90bd75d844392788ac Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
Date: Thu, 25 Mar 2021 11:57:56 +0100
|
|
||||||
Subject: [PATCH 1/4] ln: fix memory leaks in do_link
|
|
||||||
|
|
||||||
* src/ln.c (do_link): Free memory allocated by convert_abs_rel
|
|
||||||
on all code paths (Bug#47373).
|
|
||||||
|
|
||||||
Upstream-commit: 6e98f67758260579d7d44ea5f2df4c82d28c9f58
|
|
||||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
---
|
|
||||||
src/ln.c | 19 +++++++++++++------
|
|
||||||
1 file changed, 13 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/ln.c b/src/ln.c
|
|
||||||
index ffa278e..9b52602 100644
|
|
||||||
--- a/src/ln.c
|
|
||||||
+++ b/src/ln.c
|
|
||||||
@@ -229,14 +229,14 @@ do_link (char const *source, int destdir_fd, char const *dest_base,
|
|
||||||
if (errno != ENOENT)
|
|
||||||
{
|
|
||||||
error (0, errno, _("failed to access %s"), quoteaf (dest));
|
|
||||||
- return false;
|
|
||||||
+ goto fail;
|
|
||||||
}
|
|
||||||
force = false;
|
|
||||||
}
|
|
||||||
else if (S_ISDIR (dest_stats.st_mode))
|
|
||||||
{
|
|
||||||
error (0, 0, _("%s: cannot overwrite directory"), quotef (dest));
|
|
||||||
- return false;
|
|
||||||
+ goto fail;
|
|
||||||
}
|
|
||||||
else if (seen_file (dest_set, dest, &dest_stats))
|
|
||||||
{
|
|
||||||
@@ -245,7 +245,7 @@ do_link (char const *source, int destdir_fd, char const *dest_base,
|
|
||||||
error (0, 0,
|
|
||||||
_("will not overwrite just-created %s with %s"),
|
|
||||||
quoteaf_n (0, dest), quoteaf_n (1, source));
|
|
||||||
- return false;
|
|
||||||
+ goto fail;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@@ -274,7 +274,7 @@ do_link (char const *source, int destdir_fd, char const *dest_base,
|
|
||||||
{
|
|
||||||
error (0, 0, _("%s and %s are the same file"),
|
|
||||||
quoteaf_n (0, source), quoteaf_n (1, dest));
|
|
||||||
- return false;
|
|
||||||
+ goto fail;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -285,7 +285,10 @@ do_link (char const *source, int destdir_fd, char const *dest_base,
|
|
||||||
fprintf (stderr, _("%s: replace %s? "),
|
|
||||||
program_name, quoteaf (dest));
|
|
||||||
if (!yesno ())
|
|
||||||
- return true;
|
|
||||||
+ {
|
|
||||||
+ free(rel_source);
|
|
||||||
+ return true;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
if (backup_type != no_backups)
|
|
||||||
@@ -304,7 +307,7 @@ do_link (char const *source, int destdir_fd, char const *dest_base,
|
|
||||||
{
|
|
||||||
error (0, rename_errno, _("cannot backup %s"),
|
|
||||||
quoteaf (dest));
|
|
||||||
- return false;
|
|
||||||
+ goto fail;
|
|
||||||
}
|
|
||||||
force = false;
|
|
||||||
}
|
|
||||||
@@ -397,6 +400,10 @@ do_link (char const *source, int destdir_fd, char const *dest_base,
|
|
||||||
free (backup_base);
|
|
||||||
free (rel_source);
|
|
||||||
return link_errno <= 0;
|
|
||||||
+
|
|
||||||
+fail:
|
|
||||||
+ free (rel_source);
|
|
||||||
+ return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
--
|
|
||||||
2.26.3
|
|
||||||
|
|
||||||
|
|
||||||
From c051578e69bd8acf8f8a469566ae34e855345532 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
|
||||||
Date: Thu, 25 Mar 2021 09:15:50 -0700
|
|
||||||
Subject: [PATCH 2/4] maint: indenting
|
|
||||||
|
|
||||||
* src/ln.c: Fix indenting.
|
|
||||||
|
|
||||||
Upstream-commit: 8980b7c898046d899646da01c296fd15f0cced21
|
|
||||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
---
|
|
||||||
src/ln.c | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/ln.c b/src/ln.c
|
|
||||||
index 9b52602..8881d6a 100644
|
|
||||||
--- a/src/ln.c
|
|
||||||
+++ b/src/ln.c
|
|
||||||
@@ -286,7 +286,7 @@ do_link (char const *source, int destdir_fd, char const *dest_base,
|
|
||||||
program_name, quoteaf (dest));
|
|
||||||
if (!yesno ())
|
|
||||||
{
|
|
||||||
- free(rel_source);
|
|
||||||
+ free (rel_source);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -304,7 +304,7 @@ do_link (char const *source, int destdir_fd, char const *dest_base,
|
|
||||||
free (backup_base);
|
|
||||||
backup_base = NULL;
|
|
||||||
if (rename_errno != ENOENT)
|
|
||||||
- {
|
|
||||||
+ {
|
|
||||||
error (0, rename_errno, _("cannot backup %s"),
|
|
||||||
quoteaf (dest));
|
|
||||||
goto fail;
|
|
||||||
--
|
|
||||||
2.26.3
|
|
||||||
|
|
||||||
|
|
||||||
From 0d6a4afe5bee0e397fb2fc3b205a29b32a69af9d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
|
||||||
Date: Thu, 25 Mar 2021 09:16:36 -0700
|
|
||||||
Subject: [PATCH 3/4] hostname: use puts
|
|
||||||
|
|
||||||
* src/hostname.c (main): Prefer puts to printf "%s\n".
|
|
||||||
|
|
||||||
Upstream-commit: c7a588ac3632aae21642d4d568497177950d36bf
|
|
||||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
---
|
|
||||||
src/hostname.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/hostname.c b/src/hostname.c
|
|
||||||
index 0b5c0cf..62cc98c 100644
|
|
||||||
--- a/src/hostname.c
|
|
||||||
+++ b/src/hostname.c
|
|
||||||
@@ -103,7 +103,7 @@ main (int argc, char **argv)
|
|
||||||
hostname = xgethostname ();
|
|
||||||
if (hostname == NULL)
|
|
||||||
die (EXIT_FAILURE, errno, _("cannot determine hostname"));
|
|
||||||
- printf ("%s\n", hostname);
|
|
||||||
+ puts (hostname);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (optind + 1 < argc)
|
|
||||||
--
|
|
||||||
2.26.3
|
|
||||||
|
|
||||||
|
|
||||||
From 19c98d2080251edbaad9fb271aa10ad34f953500 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
|
||||||
Date: Thu, 25 Mar 2021 11:20:18 -0700
|
|
||||||
Subject: [PATCH 4/4] hostname: pacify valgrind
|
|
||||||
|
|
||||||
* src/hostname.c (main) [IF_LINT]: Free hostname (Bug#47384).
|
|
||||||
|
|
||||||
Upstream-commit: 4698e284f37844bc9b9f63f00eb556ccaaed5030
|
|
||||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
---
|
|
||||||
src/hostname.c | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/src/hostname.c b/src/hostname.c
|
|
||||||
index 62cc98c..7210248 100644
|
|
||||||
--- a/src/hostname.c
|
|
||||||
+++ b/src/hostname.c
|
|
||||||
@@ -104,6 +104,7 @@ main (int argc, char **argv)
|
|
||||||
if (hostname == NULL)
|
|
||||||
die (EXIT_FAILURE, errno, _("cannot determine hostname"));
|
|
||||||
puts (hostname);
|
|
||||||
+ IF_LINT (free (hostname));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (optind + 1 < argc)
|
|
||||||
--
|
|
||||||
2.26.3
|
|
||||||
|
|
@ -1,104 +0,0 @@
|
|||||||
From 09400b7f7f48d8eedc0df55de8073a43bc0aac96 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
|
|
||||||
Date: Tue, 27 Oct 2020 20:15:43 +0000
|
|
||||||
Subject: [PATCH 1/2] stat,tail: sync file system constants from the linux
|
|
||||||
kernel
|
|
||||||
|
|
||||||
* src/stat.c: Add magic constants for "devmem", and
|
|
||||||
"zonefs" file systems.
|
|
||||||
* NEWS: Mention the improvement.
|
|
||||||
|
|
||||||
Upstream-commit: ff80b6b0a0507e24f39cc1aad09d147f5187430b
|
|
||||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
---
|
|
||||||
src/stat.c | 4 ++++
|
|
||||||
1 file changed, 4 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/stat.c b/src/stat.c
|
|
||||||
index 5012622..8cd69da 100644
|
|
||||||
--- a/src/stat.c
|
|
||||||
+++ b/src/stat.c
|
|
||||||
@@ -347,6 +347,8 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
|
|
||||||
return "debugfs";
|
|
||||||
case S_MAGIC_DEVFS: /* 0x1373 local */
|
|
||||||
return "devfs";
|
|
||||||
+ case S_MAGIC_DEVMEM: /* 0x454D444D local */
|
|
||||||
+ return "devmem";
|
|
||||||
case S_MAGIC_DEVPTS: /* 0x1CD1 local */
|
|
||||||
return "devpts";
|
|
||||||
case S_MAGIC_DMA_BUF: /* 0x444D4142 local */
|
|
||||||
@@ -549,6 +551,8 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
|
|
||||||
return "z3fold";
|
|
||||||
case S_MAGIC_ZFS: /* 0x2FC12FC1 local */
|
|
||||||
return "zfs";
|
|
||||||
+ case S_MAGIC_ZONEFS: /* 0x5A4F4653 local */
|
|
||||||
+ return "zonefs";
|
|
||||||
case S_MAGIC_ZSMALLOC: /* 0x58295829 local */
|
|
||||||
return "zsmallocfs";
|
|
||||||
|
|
||||||
--
|
|
||||||
2.25.4
|
|
||||||
|
|
||||||
|
|
||||||
From d5948fd41013dfe4d2d10083111821667977c6d1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
|
|
||||||
Date: Tue, 27 Oct 2020 21:04:14 +0000
|
|
||||||
Subject: [PATCH 2/2] mountlist: recognize more file system types as remote
|
|
||||||
|
|
||||||
Sync "remote" file systems from stat.c in coreutils.
|
|
||||||
Note we only consider file systems that do not use host:resource
|
|
||||||
mount source. I.e. those that don't generally use a colon when
|
|
||||||
mounting, as that case is already considered. Searching for
|
|
||||||
"<fstype> /etc/fstab" was informative for identifying these.
|
|
||||||
The full list of "remote" file systems in coreutils is currently:
|
|
||||||
acfs afs ceph cifs coda fhgfs fuseblk fusectl
|
|
||||||
gfs gfs2 gpfs ibrix k-afs lustre novell nfs nfsd
|
|
||||||
ocfs2 panfs prl_fs smb smb2 snfs vboxsf vmhgfs vxfs
|
|
||||||
Note also we do not include virtual machine file systems,
|
|
||||||
as even though they're remote to the current kernel,
|
|
||||||
they are generally not distributed to separate hosts.
|
|
||||||
|
|
||||||
* lib/mountlist.c (ME_REMOTE): Sync previously unconsidered
|
|
||||||
"remote" file systems from stat.c in coreutils.
|
|
||||||
|
|
||||||
Upstream-commit: dd1fc46be12d671c1a9d9dc5a6fa8c766e99aa2f
|
|
||||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
---
|
|
||||||
lib/mountlist.c | 12 ++++++++++--
|
|
||||||
1 file changed, 10 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/mountlist.c b/lib/mountlist.c
|
|
||||||
index 7abe024..e0227b7 100644
|
|
||||||
--- a/lib/mountlist.c
|
|
||||||
+++ b/lib/mountlist.c
|
|
||||||
@@ -221,8 +221,9 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED)
|
|
||||||
#ifndef ME_REMOTE
|
|
||||||
/* A file system is "remote" if its Fs_name contains a ':'
|
|
||||||
or if (it is of type (smbfs or cifs) and its Fs_name starts with '//')
|
|
||||||
- or if it is of type (afs or auristorfs)
|
|
||||||
- or Fs_name is equal to "-hosts" (used by autofs to mount remote fs). */
|
|
||||||
+ or if it is of any other of the listed types
|
|
||||||
+ or Fs_name is equal to "-hosts" (used by autofs to mount remote fs).
|
|
||||||
+ "VM" file systems like prl_fs or vboxsf are not considered remote here. */
|
|
||||||
# define ME_REMOTE(Fs_name, Fs_type) \
|
|
||||||
(strchr (Fs_name, ':') != NULL \
|
|
||||||
|| ((Fs_name)[0] == '/' \
|
|
||||||
@@ -230,8 +231,15 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED)
|
|
||||||
&& (strcmp (Fs_type, "smbfs") == 0 \
|
|
||||||
|| strcmp (Fs_type, "smb3") == 0 \
|
|
||||||
|| strcmp (Fs_type, "cifs") == 0)) \
|
|
||||||
+ || strcmp (Fs_type, "acfs") == 0 \
|
|
||||||
|| strcmp (Fs_type, "afs") == 0 \
|
|
||||||
+ || strcmp (Fs_type, "coda") == 0 \
|
|
||||||
|| strcmp (Fs_type, "auristorfs") == 0 \
|
|
||||||
+ || strcmp (Fs_type, "fhgfs") == 0 \
|
|
||||||
+ || strcmp (Fs_type, "gpfs") == 0 \
|
|
||||||
+ || strcmp (Fs_type, "ibrix") == 0 \
|
|
||||||
+ || strcmp (Fs_type, "ocfs2") == 0 \
|
|
||||||
+ || strcmp (Fs_type, "vxfs") == 0 \
|
|
||||||
|| strcmp ("-hosts", Fs_name) == 0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
--
|
|
||||||
2.25.4
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
|||||||
From b87f944c87ffe04db6e5476b007a8e4979de933d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
Date: Thu, 18 Feb 2021 11:18:04 +0100
|
|
||||||
Subject: [PATCH] stat,tail: add support for the exfat file system
|
|
||||||
|
|
||||||
Bug: https://bugzilla.redhat.com/1921427
|
|
||||||
|
|
||||||
* src/stat.c (human_fstype): Add case for the 'exfat' file system type.
|
|
||||||
Fixes https://bugs.gnu.org/46613
|
|
||||||
|
|
||||||
Upstream-commit: a5e0d8f387e81e854427addbbaf2504541bbf4b9
|
|
||||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
---
|
|
||||||
src/stat.c | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/stat.c b/src/stat.c
|
|
||||||
index 8cd69da..4e1c8e3 100644
|
|
||||||
--- a/src/stat.c
|
|
||||||
+++ b/src/stat.c
|
|
||||||
@@ -361,6 +361,8 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
|
|
||||||
return "efs";
|
|
||||||
case S_MAGIC_EROFS_V1: /* 0xE0F5E1E2 local */
|
|
||||||
return "erofs";
|
|
||||||
+ case S_MAGIC_EXFAT: /* 0x2011BAB0 local */
|
|
||||||
+ return "exfat";
|
|
||||||
case S_MAGIC_EXFS: /* 0x45584653 local */
|
|
||||||
return "exfs";
|
|
||||||
case S_MAGIC_EXOFS: /* 0x5DF5 local */
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
@ -1,204 +0,0 @@
|
|||||||
From 73d119f4f8052a9fb6cef13cd9e75d5a4e23311a Mon Sep 17 00:00:00 2001
|
|
||||||
From: dann frazier <dann.frazier@canonical.com>
|
|
||||||
Date: Wed, 29 Nov 2023 18:32:34 -0700
|
|
||||||
Subject: [PATCH] tail: fix tailing sysfs files where PAGE_SIZE > BUFSIZ
|
|
||||||
|
|
||||||
* src/tail.c (file_lines): Ensure we use a buffer size >= PAGE_SIZE when
|
|
||||||
searching backwards to avoid seeking within a file,
|
|
||||||
which on sysfs files is accepted but also returns no data.
|
|
||||||
* tests/tail/tail-sysfs.sh: Add a new test.
|
|
||||||
* tests/local.mk: Reference the new test.
|
|
||||||
Fixes https://bugs.gnu.org/67490
|
|
||||||
|
|
||||||
Upstream-commit: 73d119f4f8052a9fb6cef13cd9e75d5a4e23311a
|
|
||||||
Cherry-picked-by: Lukáš Zaoral <lzaoral@redhat.com>
|
|
||||||
---
|
|
||||||
src/tail.c | 57 +++++++++++++++++++++++++++++-----------
|
|
||||||
tests/local.mk | 1 +
|
|
||||||
tests/tail-2/tail-sysfs.sh | 34 ++++++++++++++++++++++++
|
|
||||||
3 files changed, 77 insertions(+), 15 deletions(-)
|
|
||||||
create mode 100755 tests/tail/tail-sysfs.sh
|
|
||||||
|
|
||||||
diff --git a/src/tail.c b/src/tail.c
|
|
||||||
index c45f3b65a..6979e0ba3 100644
|
|
||||||
--- a/src/tail.c
|
|
||||||
+++ b/src/tail.c
|
|
||||||
@@ -208,6 +208,9 @@ static int nbpids = 0;
|
|
||||||
that is writing to all followed files. */
|
|
||||||
static pid_t pid;
|
|
||||||
|
|
||||||
+/* Used to determine the buffer size when scanning backwards in a file. */
|
|
||||||
+static int page_size;
|
|
||||||
+
|
|
||||||
/* True if we have ever read standard input. */
|
|
||||||
static bool have_read_stdin;
|
|
||||||
|
|
||||||
@@ -515,22 +518,40 @@ xlseek (int fd, off_t offset, int whence, char const *filename)
|
|
||||||
Return true if successful. */
|
|
||||||
|
|
||||||
static bool
|
|
||||||
-file_lines (const char *pretty_filename, int fd, uintmax_t n_lines,
|
|
||||||
- off_t start_pos, off_t end_pos, uintmax_t *read_pos)
|
|
||||||
+file_lines (const char *pretty_filename, int fd, struct stat const *sb,
|
|
||||||
+ uintmax_t n_lines, off_t start_pos, off_t end_pos,
|
|
||||||
+ uintmax_t *read_pos)
|
|
||||||
{
|
|
||||||
- char buffer[BUFSIZ];
|
|
||||||
+ char *buffer;
|
|
||||||
size_t bytes_read;
|
|
||||||
+ blksize_t bufsize = BUFSIZ;
|
|
||||||
off_t pos = end_pos;
|
|
||||||
+ bool ok = true;
|
|
||||||
|
|
||||||
if (n_lines == 0)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
+ /* Be careful with files with sizes that are a multiple of the page size,
|
|
||||||
+ as on /proc or /sys file systems these files accept seeking to within
|
|
||||||
+ the file, but then return no data when read. So use a buffer that's
|
|
||||||
+ at least PAGE_SIZE to avoid seeking within such files.
|
|
||||||
+
|
|
||||||
+ We could also indirectly use a large enough buffer through io_blksize()
|
|
||||||
+ however this would be less efficient in the common case, as it would
|
|
||||||
+ generally pick a larger buffer size, resulting in reading more data
|
|
||||||
+ from the end of the file. */
|
|
||||||
+ assert (S_ISREG (sb->st_mode));
|
|
||||||
+ if (sb->st_size % page_size == 0)
|
|
||||||
+ bufsize = MAX (BUFSIZ, page_size);
|
|
||||||
+
|
|
||||||
+ buffer = xmalloc (bufsize);
|
|
||||||
+
|
|
||||||
/* Set 'bytes_read' to the size of the last, probably partial, buffer;
|
|
||||||
- 0 < 'bytes_read' <= 'BUFSIZ'. */
|
|
||||||
- bytes_read = (pos - start_pos) % BUFSIZ;
|
|
||||||
+ 0 < 'bytes_read' <= 'bufsize'. */
|
|
||||||
+ bytes_read = (pos - start_pos) % bufsize;
|
|
||||||
if (bytes_read == 0)
|
|
||||||
- bytes_read = BUFSIZ;
|
|
||||||
- /* Make 'pos' a multiple of 'BUFSIZ' (0 if the file is short), so that all
|
|
||||||
+ bytes_read = bufsize;
|
|
||||||
+ /* Make 'pos' a multiple of 'bufsize' (0 if the file is short), so that all
|
|
||||||
reads will be on block boundaries, which might increase efficiency. */
|
|
||||||
pos -= bytes_read;
|
|
||||||
xlseek (fd, pos, SEEK_SET, pretty_filename);
|
|
||||||
@@ -538,7 +559,8 @@ file_lines (char const *pretty_filename, int fd, uintmax_t n_lines,
|
|
||||||
if (bytes_read == SAFE_READ_ERROR)
|
|
||||||
{
|
|
||||||
error (0, errno, _("error reading %s"), quoteaf (pretty_filename));
|
|
||||||
- return false;
|
|
||||||
+ ok = false;
|
|
||||||
+ goto free_buffer;
|
|
||||||
}
|
|
||||||
*read_pos = pos + bytes_read;
|
|
||||||
|
|
||||||
@@ -565,7 +587,7 @@ file_lines (char const *pretty_filename, int fd, uintmax_t n_lines,
|
|
||||||
xwrite_stdout (nl + 1, bytes_read - (n + 1));
|
|
||||||
*read_pos += dump_remainder (false, pretty_filename, fd,
|
|
||||||
end_pos - (pos + bytes_read));
|
|
||||||
- return true;
|
|
||||||
+ goto free_buffer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -577,23 +599,26 @@ file_lines (char const *pretty_filename, int fd, uintmax_t n_lines,
|
|
||||||
xlseek (fd, start_pos, SEEK_SET, pretty_filename);
|
|
||||||
*read_pos = start_pos + dump_remainder (false, pretty_filename, fd,
|
|
||||||
end_pos);
|
|
||||||
- return true;
|
|
||||||
+ goto free_buffer;
|
|
||||||
}
|
|
||||||
- pos -= BUFSIZ;
|
|
||||||
+ pos -= bufsize;
|
|
||||||
xlseek (fd, pos, SEEK_SET, pretty_filename);
|
|
||||||
|
|
||||||
- bytes_read = safe_read (fd, buffer, BUFSIZ);
|
|
||||||
+ bytes_read = safe_read (fd, buffer, bufsize);
|
|
||||||
if (bytes_read == SAFE_READ_ERROR)
|
|
||||||
{
|
|
||||||
error (0, errno, _("error reading %s"), quoteaf (pretty_filename));
|
|
||||||
- return false;
|
|
||||||
+ ok = false;
|
|
||||||
+ goto free_buffer;
|
|
||||||
}
|
|
||||||
|
|
||||||
*read_pos = pos + bytes_read;
|
|
||||||
}
|
|
||||||
while (bytes_read > 0);
|
|
||||||
|
|
||||||
- return true;
|
|
||||||
+free_buffer:
|
|
||||||
+ free (buffer);
|
|
||||||
+ return ok;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Print the last N_LINES lines from the end of the standard input,
|
|
||||||
@@ -1915,7 +1940,7 @@ tail_lines (char const *pretty_filename, int fd, uintmax_t n_lines,
|
|
||||||
{
|
|
||||||
*read_pos = end_pos;
|
|
||||||
if (end_pos != 0
|
|
||||||
- && ! file_lines (pretty_filename, fd, n_lines,
|
|
||||||
+ && ! file_lines (pretty_filename, fd, &stats, n_lines,
|
|
||||||
start_pos, end_pos, read_pos))
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
@@ -2337,6 +2362,8 @@ main (int argc, char **argv)
|
|
||||||
|
|
||||||
atexit (close_stdout);
|
|
||||||
|
|
||||||
+ page_size = getpagesize ();
|
|
||||||
+
|
|
||||||
have_read_stdin = false;
|
|
||||||
|
|
||||||
count_lines = true;
|
|
||||||
diff --git a/tests/local.mk b/tests/local.mk
|
|
||||||
index db4ee7ed8..bf03238c3 100644
|
|
||||||
--- a/tests/local.mk
|
|
||||||
+++ b/tests/local.mk
|
|
||||||
@@ -257,6 +257,7 @@ all_tests = \
|
|
||||||
tests/misc/seq-precision.sh \
|
|
||||||
tests/misc/head.pl \
|
|
||||||
tests/misc/head-elide-tail.pl \
|
|
||||||
+ tests/tail-2/tail-sysfs.sh \
|
|
||||||
tests/tail-2/tail-n0f.sh \
|
|
||||||
tests/misc/ls-misc.pl \
|
|
||||||
tests/misc/date.pl \
|
|
||||||
diff --git a/tests/tail/tail-sysfs.sh b/tests/tail-2/tail-sysfs.sh
|
|
||||||
new file mode 100755
|
|
||||||
index 000000000..00874b3dc
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/tests/tail-2/tail-sysfs.sh
|
|
||||||
@@ -0,0 +1,34 @@
|
|
||||||
+#!/bin/sh
|
|
||||||
+# sysfs files have weird properties that can be influenced by page size
|
|
||||||
+
|
|
||||||
+# Copyright 2023 Free Software Foundation, Inc.
|
|
||||||
+
|
|
||||||
+# This program is free software: you can redistribute it and/or modify
|
|
||||||
+# it under the terms of the GNU General Public License as published by
|
|
||||||
+# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
+
|
|
||||||
+# This program is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+# GNU General Public License for more details.
|
|
||||||
+
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
+
|
|
||||||
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
|
|
||||||
+print_ver_ tail
|
|
||||||
+
|
|
||||||
+file='/sys/kernel/profiling'
|
|
||||||
+
|
|
||||||
+test -r "$file" || skip_ "No $file file"
|
|
||||||
+
|
|
||||||
+cp -f "$file" exp || framework_failure_
|
|
||||||
+
|
|
||||||
+tail -n1 "$file" > out || fail=1
|
|
||||||
+compare exp out || fail=1
|
|
||||||
+
|
|
||||||
+tail -c2 "$file" > out || fail=1
|
|
||||||
+compare exp out || fail=1
|
|
||||||
+
|
|
||||||
+Exit $fail
|
|
@ -1,99 +0,0 @@
|
|||||||
From fc6318841f008dadc1e7c93e539f10d24aa83e90 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Bernhard Voelker <mail@bernhard-voelker.de>
|
|
||||||
Date: Wed, 21 Apr 2021 00:12:00 +0200
|
|
||||||
Subject: [PATCH 1/2] tests: fix FP in ls/stat-free-color.sh
|
|
||||||
|
|
||||||
On newer systems like Fedora 34 and openSUSE Tumbleweed, ls(1) calls
|
|
||||||
newfstatat(STDOUT_FILENO, ...), but only when there is something to
|
|
||||||
output.
|
|
||||||
|
|
||||||
* tests/ls/stat-free-color.sh: Add -a option to the reference invocation
|
|
||||||
of ls, thus enforcing something gets output.
|
|
||||||
|
|
||||||
Upstream-commit: b7091093bb6505c33279f9bc940b2e94763a6e5d
|
|
||||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
---
|
|
||||||
tests/ls/stat-free-color.sh | 10 ++++++----
|
|
||||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/tests/ls/stat-free-color.sh b/tests/ls/stat-free-color.sh
|
|
||||||
index 00942f7..87bed1c 100755
|
|
||||||
--- a/tests/ls/stat-free-color.sh
|
|
||||||
+++ b/tests/ls/stat-free-color.sh
|
|
||||||
@@ -56,12 +56,14 @@ eval $(dircolors -b color-without-stat)
|
|
||||||
# The system may perform additional stat-like calls before main.
|
|
||||||
# Furthermore, underlying library functions may also implicitly
|
|
||||||
# add an extra stat call, e.g. opendir since glibc-2.21-360-g46f894d.
|
|
||||||
-# To avoid counting those, first get a baseline count for running
|
|
||||||
-# ls with one empty directory argument. Then, compare that with the
|
|
||||||
-# invocation under test.
|
|
||||||
+# Finally, ls(1) makes a stat call for stdout, but only in the case
|
|
||||||
+# when there is something to output.
|
|
||||||
+# To get the comparison right, first get a baseline count for running
|
|
||||||
+# 'ls -a' with one empty directory argument. Then, compare that with
|
|
||||||
+# the invocation under test.
|
|
||||||
mkdir d || framework_failure_
|
|
||||||
|
|
||||||
-strace -q -o log1 -e $stats ls --color=always d || fail=1
|
|
||||||
+strace -q -o log1 -e $stats ls -a --color=always d || fail=1
|
|
||||||
n_stat1=$(grep -vF '+++' log1 | wc -l) || framework_failure_
|
|
||||||
|
|
||||||
test $n_stat1 = 0 \
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
||||||
|
|
||||||
From c16ca58f17a088e925c0d1c4015c48332c380a00 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
|
|
||||||
Date: Sun, 9 May 2021 23:41:00 +0100
|
|
||||||
Subject: [PATCH 2/2] tests: fix tests/cp/sparse-2.sh false failure on some
|
|
||||||
systems
|
|
||||||
|
|
||||||
* tests/cp/sparse-2.sh: Double check cp --sparse=always,
|
|
||||||
with dd conv=sparse, in the case where the former didn't
|
|
||||||
create a sparse file. Now that this test is being newly run
|
|
||||||
on macos, we're seeing a failure due to seek() not creating
|
|
||||||
holes on apfs unless the size is >= 16MiB.
|
|
||||||
|
|
||||||
Upstream-commit: 6b499720fecae935dc00e236d6aefe94d9010482
|
|
||||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
---
|
|
||||||
tests/cp/fiemap-2.sh | 13 ++++++++++---
|
|
||||||
1 file changed, 10 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/tests/cp/fiemap-2.sh b/tests/cp/fiemap-2.sh
|
|
||||||
index 548a376..e20ce54 100755
|
|
||||||
--- a/tests/cp/fiemap-2.sh
|
|
||||||
+++ b/tests/cp/fiemap-2.sh
|
|
||||||
@@ -17,7 +17,7 @@
|
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
|
|
||||||
-print_ver_ cp
|
|
||||||
+print_ver_ cp stat dd
|
|
||||||
|
|
||||||
# Require a fiemap-enabled FS.
|
|
||||||
touch fiemap_chk # check a file rather than current dir for best coverage
|
|
||||||
@@ -46,10 +46,17 @@ dd bs=1k seek=1 of=k count=255 < /dev/zero || framework_failure_
|
|
||||||
|
|
||||||
# cp should detect the all-zero blocks and convert some of them to holes.
|
|
||||||
# How many it detects/converts currently depends on io_blksize.
|
|
||||||
-# Currently, on my F14/ext4 desktop, this K starts off with size 256KiB,
|
|
||||||
+# Currently, on my F14/ext4 desktop, this K file starts off with size 256KiB,
|
|
||||||
# (note that the K in the preceding test starts off with size 4KiB).
|
|
||||||
# cp from coreutils-8.9 with --sparse=always reduces the size to 32KiB.
|
|
||||||
cp --sparse=always k k2 || fail=1
|
|
||||||
-test $(stat -c %b k2) -lt $(stat -c %b k) || fail=1
|
|
||||||
+if test $(stat -c %b k2) -ge $(stat -c %b k); then
|
|
||||||
+ # If not sparse, then double check by creating with dd
|
|
||||||
+ # as we're not guaranteed that seek will create a hole.
|
|
||||||
+ # apfs on darwin 19.2.0 for example was seen to not to create holes < 16MiB.
|
|
||||||
+ hole_size=$(stat -c %o k2) || framework_failure_
|
|
||||||
+ dd if=k of=k2.dd bs=$hole_size conv=sparse || framework_failure_
|
|
||||||
+ test $(stat -c %b k2) -eq $(stat -c %b k2.dd) || fail=1
|
|
||||||
+fi
|
|
||||||
|
|
||||||
Exit $fail
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
@ -1,9 +1,37 @@
|
|||||||
Provides: bundled(gnulib)
|
Provides: /bin/basename
|
||||||
|
|
||||||
# make it possible to install the latest available Adobe Reader RPM for Linux
|
|
||||||
Provides: /bin/cat
|
Provides: /bin/cat
|
||||||
|
Provides: /bin/chgrp
|
||||||
Provides: /bin/chmod
|
Provides: /bin/chmod
|
||||||
|
Provides: /bin/chown
|
||||||
|
Provides: /bin/cp
|
||||||
|
Provides: /bin/cut
|
||||||
|
Provides: /bin/date
|
||||||
|
Provides: /bin/dd
|
||||||
|
Provides: /bin/df
|
||||||
Provides: /bin/echo
|
Provides: /bin/echo
|
||||||
|
Provides: /bin/env
|
||||||
|
Provides: /bin/false
|
||||||
Provides: /bin/ln
|
Provides: /bin/ln
|
||||||
|
Provides: /bin/ls
|
||||||
|
Provides: /bin/mkdir
|
||||||
|
Provides: /bin/mknod
|
||||||
|
Provides: /bin/mktemp
|
||||||
|
Provides: /bin/mv
|
||||||
|
Provides: /bin/nice
|
||||||
|
Provides: /bin/pwd
|
||||||
|
Provides: /bin/readlink
|
||||||
Provides: /bin/rm
|
Provides: /bin/rm
|
||||||
|
Provides: /bin/rmdir
|
||||||
|
Provides: /bin/sleep
|
||||||
|
Provides: /bin/sort
|
||||||
|
Provides: /bin/stty
|
||||||
|
Provides: /bin/sync
|
||||||
Provides: /bin/touch
|
Provides: /bin/touch
|
||||||
|
Provides: /bin/true
|
||||||
|
Provides: /bin/uname
|
||||||
|
Provides: bundled(gnulib)
|
||||||
|
Provides: fileutils = %{version}-%{release}
|
||||||
|
Provides: mktemp = 4:%{version}-%{release}
|
||||||
|
Provides: sh-utils = %{version}-%{release}
|
||||||
|
Provides: stat = %{version}-%{release}
|
||||||
|
Provides: textutils = %{version}-%{release}
|
||||||
|
Loading…
Reference in new issue