Compare commits
No commits in common. "c8" and "c9s" have entirely different histories.
|
@ -1 +1 @@
|
|||
bd5d495c162730873a2774acd1c5091fbf0c55a4 SOURCES/coreutils-8.30.tar.xz
|
||||
b2b12195e276c64c8e850cf40ea2cff9b3aa53f6 coreutils-8.32.tar.xz
|
||||
|
|
|
@ -1 +1 @@
|
|||
SOURCES/coreutils-8.30.tar.xz
|
||||
/coreutils-[0-9.]*.tar.xz
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,686 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,451 +0,0 @@
|
|||
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
|
@ -1,469 +0,0 @@
|
|||
From 95f427178720d047316e95f44777cfdf2ecf2b46 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
|
||||
Date: Fri, 4 Jan 2019 09:29:13 -0800
|
||||
Subject: [PATCH 1/4] tail: don't exit immediately with filters on AIX
|
||||
|
||||
* src/tail.c: Fix the check_output_available check on AIX.
|
||||
Note we don't use poll for all systems as the overhead
|
||||
of adding the gnulib poll module wouldn't be worth it
|
||||
just for this single use.
|
||||
* tests/tail-2/pipe-f.sh: Fix the test which always passed
|
||||
due to only the exit code of sleep being checked.
|
||||
* NEWS: Mention the bug fix and rearrange alphabetically.
|
||||
Fixes http://bugs.gnu.org/33946
|
||||
|
||||
Upstream-commit: d5ab4cbe424e3e95140eec22ef828f50b2fb3067
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
src/tail.c | 13 +++++++++++++
|
||||
tests/tail-2/pipe-f.sh | 5 ++++-
|
||||
2 files changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/tail.c b/src/tail.c
|
||||
index ac001d7..d63aacc 100644
|
||||
--- a/src/tail.c
|
||||
+++ b/src/tail.c
|
||||
@@ -30,6 +30,9 @@
|
||||
#include <getopt.h>
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
+#ifdef _AIX
|
||||
+# include <poll.h>
|
||||
+#endif
|
||||
|
||||
#include "system.h"
|
||||
#include "argmatch.h"
|
||||
@@ -335,6 +338,16 @@ named file in a way that accommodates renaming, removal and creation.\n\
|
||||
static void
|
||||
check_output_alive (void)
|
||||
{
|
||||
+#ifdef _AIX
|
||||
+ /* select on AIX was seen to give a readable event immediately. */
|
||||
+ struct pollfd pfd;
|
||||
+ pfd.fd = STDOUT_FILENO;
|
||||
+ pfd.events = POLLERR;
|
||||
+
|
||||
+ if (poll (&pfd, 1, 0) >= 0 && (pfd.revents & POLLERR))
|
||||
+ raise (SIGPIPE);
|
||||
+#endif
|
||||
+
|
||||
if (! monitor_output)
|
||||
return;
|
||||
|
||||
diff --git a/tests/tail-2/pipe-f.sh b/tests/tail-2/pipe-f.sh
|
||||
index 76b0d90..1126c93 100755
|
||||
--- a/tests/tail-2/pipe-f.sh
|
||||
+++ b/tests/tail-2/pipe-f.sh
|
||||
@@ -37,7 +37,10 @@ compare exp out || fail=1
|
||||
|
||||
# This would wait indefinitely before v8.28 due to no EPIPE being
|
||||
# generated due to no data written after the first small amount
|
||||
-timeout 10 tail -f $mode $fastpoll out | sleep .1 || fail=1
|
||||
+(returns_ 124 timeout 10 tail -n2 -f $mode $fastpoll out && touch timed_out) |
|
||||
+ sed 2q > out2
|
||||
+test -e timed_out && fail=1
|
||||
+compare exp out2 || fail=1
|
||||
|
||||
# This would wait indefinitely before v8.28 (until first write)
|
||||
(returns_ 1 timeout 10 tail -f $mode $fastpoll /dev/null >&-) || fail=1
|
||||
--
|
||||
2.31.1
|
||||
|
||||
|
||||
From 125bb79d3e9f414533b1c29237ee3f647053d0d6 Mon Sep 17 00:00:00 2001
|
||||
From: Ayappan <ayappap2@in.ibm.com>
|
||||
Date: Sun, 20 Jan 2019 00:17:33 -0800
|
||||
Subject: [PATCH 2/4] tail: fix recent ineffective AIX change
|
||||
|
||||
* src/tail.c: Fix commit v8.30-40-gd5ab4cb which was ineffective.
|
||||
Fixes http://bugs.gnu.org/33946
|
||||
|
||||
Upstream-commit: 17983b2cb3bccbb4fa69691178caddd99269bda9
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
src/tail.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/tail.c b/src/tail.c
|
||||
index d63aacc..9ed6d48 100644
|
||||
--- a/src/tail.c
|
||||
+++ b/src/tail.c
|
||||
@@ -338,6 +338,9 @@ named file in a way that accommodates renaming, removal and creation.\n\
|
||||
static void
|
||||
check_output_alive (void)
|
||||
{
|
||||
+ if (! monitor_output)
|
||||
+ return;
|
||||
+
|
||||
#ifdef _AIX
|
||||
/* select on AIX was seen to give a readable event immediately. */
|
||||
struct pollfd pfd;
|
||||
@@ -346,11 +349,7 @@ check_output_alive (void)
|
||||
|
||||
if (poll (&pfd, 1, 0) >= 0 && (pfd.revents & POLLERR))
|
||||
raise (SIGPIPE);
|
||||
-#endif
|
||||
-
|
||||
- if (! monitor_output)
|
||||
- return;
|
||||
-
|
||||
+#else
|
||||
struct timeval delay;
|
||||
delay.tv_sec = delay.tv_usec = 0;
|
||||
|
||||
@@ -362,6 +361,7 @@ check_output_alive (void)
|
||||
and implies an error condition on output like broken pipe. */
|
||||
if (select (STDOUT_FILENO + 1, &rfd, NULL, NULL, &delay) == 1)
|
||||
raise (SIGPIPE);
|
||||
+#endif
|
||||
}
|
||||
|
||||
static bool
|
||||
--
|
||||
2.31.1
|
||||
|
||||
|
||||
From 7741989c3e633aa44f01d8f91332cb65a9280ba3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
|
||||
Date: Sun, 20 Jan 2019 00:13:15 -0800
|
||||
Subject: [PATCH 3/4] tail: fix handling of broken pipes with SIGPIPE ignored
|
||||
|
||||
* init.cfg (trap_sigpipe_or_skip_): A new function refactored from...
|
||||
* tests/misc/printf-surprise.sh: ...here.
|
||||
* tests/misc/seq-epipe.sh. Likewise.
|
||||
* src/tail.c (die_pipe): Ensure we exit upon sending SIGPIPE.
|
||||
* tests/tail-2/pipe-f.sh: Ensure we exit even if SIGPIPE is ignored.
|
||||
* NEWS: Mention the bug fix.
|
||||
|
||||
Upstream-commit: fa50623394f491b975dbd7ad73193519dd721771
|
||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||
---
|
||||
init.cfg | 6 ++++++
|
||||
src/tail.c | 14 +++++++++++---
|
||||
tests/misc/printf-surprise.sh | 4 +---
|
||||
tests/misc/seq-epipe.sh | 4 +---
|
||||
tests/tail-2/pipe-f.sh | 19 ++++++++++++++-----
|
||||
5 files changed, 33 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/init.cfg b/init.cfg
|
||||
index b6c81ab..985c8d3 100644
|
||||
--- a/init.cfg
|
||||
+++ b/init.cfg
|
||||
@@ -613,6 +613,12 @@ mkfifo_or_skip_()
|
||||
fi
|
||||
}
|
||||
|
||||
+trap_sigpipe_or_skip_()
|
||||
+{
|
||||
+ (trap '' PIPE && yes | :) 2>&1 | grep -qF 'Broken pipe' ||
|
||||
+ skip_ 'trapping SIGPIPE is not supported'
|
||||
+}
|
||||
+
|
||||
# Disable the current test if the working directory seems to have
|
||||
# the setgid bit set.
|
||||
skip_if_setgid_()
|
||||
diff --git a/src/tail.c b/src/tail.c
|
||||
index 9ed6d48..16e0d73 100644
|
||||
--- a/src/tail.c
|
||||
+++ b/src/tail.c
|
||||
@@ -333,6 +333,14 @@ named file in a way that accommodates renaming, removal and creation.\n\
|
||||
exit (status);
|
||||
}
|
||||
|
||||
+/* Ensure exit, either with SIGPIPE or EXIT_FAILURE status. */
|
||||
+static void ATTRIBUTE_NORETURN
|
||||
+die_pipe (void)
|
||||
+{
|
||||
+ raise (SIGPIPE);
|
||||
+ exit (EXIT_FAILURE);
|
||||
+}
|
||||
+
|
||||
/* If the output has gone away, then terminate
|
||||
as we would if we had written to this output. */
|
||||
static void
|
||||
@@ -348,7 +356,7 @@ check_output_alive (void)
|
||||
pfd.events = POLLERR;
|
||||
|
||||
if (poll (&pfd, 1, 0) >= 0 && (pfd.revents & POLLERR))
|
||||
- raise (SIGPIPE);
|
||||
+ die_pipe ();
|
||||
#else
|
||||
struct timeval delay;
|
||||
delay.tv_sec = delay.tv_usec = 0;
|
||||
@@ -360,7 +368,7 @@ check_output_alive (void)
|
||||
/* readable event on STDOUT is equivalent to POLLERR,
|
||||
and implies an error condition on output like broken pipe. */
|
||||
if (select (STDOUT_FILENO + 1, &rfd, NULL, NULL, &delay) == 1)
|
||||
- raise (SIGPIPE);
|
||||
+ die_pipe ();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1658,7 +1666,7 @@ tail_forever_inotify (int wd, struct File_spec *f, size_t n_files,
|
||||
{
|
||||
/* readable event on STDOUT is equivalent to POLLERR,
|
||||
and implies an error on output like broken pipe. */
|
||||
|