From 74aeb6e89a8e88f78be405764cae30eba3b0965d Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 10 May 2022 03:13:23 -0400 Subject: [PATCH] import sed-4.5-5.el8 --- SOURCES/sed-selinux-testsuite.patch | 12 ++++++++++++ SOURCES/sed-selinux.patch | 29 ----------------------------- SPECS/sed.spec | 18 +++++++++++++++--- 3 files changed, 27 insertions(+), 32 deletions(-) create mode 100644 SOURCES/sed-selinux-testsuite.patch delete mode 100644 SOURCES/sed-selinux.patch diff --git a/SOURCES/sed-selinux-testsuite.patch b/SOURCES/sed-selinux-testsuite.patch new file mode 100644 index 0000000..f8e8bb1 --- /dev/null +++ b/SOURCES/sed-selinux-testsuite.patch @@ -0,0 +1,12 @@ +--- a/sed-4.5/testsuite/inplace-selinux.sh 2018-03-31 06:33:01.000000000 +0200 ++++ b/sed-4.5/testsuite/inplace-selinux.sh 2021-10-05 17:10:32.259956822 +0200 +@@ -24,6 +24,9 @@ + chcon -u system_u a || skip_ "chcon doesn't work" + chcon -u user_u a || skip_ "chcon doesn't work" + ++cp --preserve=context ./a ./b 2>&1 | grep "cannot preserve security context" >/dev/null && skip_ "cannot preserve security context without an SELinux-enabled kernel" ++ ++ + # Create the first file and symlink pointing at it. + echo "Hello World" > inplace-selinux-file || framework_failure_ + ln -s ./inplace-selinux-file inplace-selinux-link || framework_failure_ diff --git a/SOURCES/sed-selinux.patch b/SOURCES/sed-selinux.patch deleted file mode 100644 index 2dca5ab..0000000 --- a/SOURCES/sed-selinux.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/NEWS b/NEWS -index e9335f0..e762b2d 100644 ---- a/NEWS -+++ b/NEWS -@@ -1,4 +1,9 @@ GNU sed NEWS -*- outline -*- - GNU sed NEWS -*- outline -*- -+ -+ sed -i now creates selinux context based on the context of the symlink -+ instead of the symlink target. [Bug present since at least sed-4.2] -+ sed -i --follow-symlinks remains unchanged. -+ - - * Noteworthy changes in release 4.4 (2017-02-03) [stable] - -diff --git a/sed/execute.c b/sed/execute.c -index 1843392..453886e 100644 ---- a/sed/execute.c -+++ b/sed/execute.c -@@ -607,7 +607,7 @@ open_next_file(const char *name, struct input *input) - if (is_selinux_enabled () > 0) - { - security_context_t con; -- if (getfilecon (input->in_file_name, &con) != -1) -+ if (lgetfilecon (input->in_file_name, &con) != -1) - { - /* Save and restore the old context for the sake of w and W - commands. */ -2.9.5 - diff --git a/SPECS/sed.spec b/SPECS/sed.spec index 6ba8402..d014c6e 100644 --- a/SPECS/sed.spec +++ b/SPECS/sed.spec @@ -3,15 +3,15 @@ Summary: A GNU stream text editor Name: sed Version: 4.5 -Release: 2%{?dist} +Release: 5%{?dist} License: GPLv3+ Group: Applications/Text URL: http://sed.sourceforge.net/ Source0: ftp://ftp.gnu.org/pub/gnu/sed/sed-%{version}.tar.xz Source1: http://sed.sourceforge.net/sedfaq.txt Patch0: sed-4.2.2-binary_copy_args.patch -Patch1: sed-selinux.patch Patch2: sed-fuse.patch +Patch3: sed-selinux-testsuite.patch BuildRequires: glibc-devel, libselinux-devel, libacl-devel, automake, autoconf BuildRequires: perl-Getopt-Long Requires(post): /sbin/install-info @@ -32,8 +32,8 @@ specified in a script file or from the command line. %prep %setup -q %patch0 -p1 -b .copy -#%patch1 -p1 -b .selinux %patch2 -p1 +%patch3 -p2 %build %configure --without-included-regex @@ -73,6 +73,18 @@ fi %{_mandir}/man*/* %changelog +* Tue Oct 05 2021 Jakub Martisko - 4.5-5 +- Minor cleanup - remove unused patch from the spec file too (related to 4.5-3) +- Resolves: rhbz#1869253 + +* Tue Oct 05 2021 Jakub Martisko - 4.5-4 +- Skip selinux test when selinux is not working +- Resolves: rhbz#1905777 + +* Tue Oct 05 2021 Jakub Martisko - 4.5-3 +- Minor cleanup - remove unused patch from the git +- Resolves: rhbz#1869253 + * Mon May 18 2020 Jakub Martisko - 4.5-2 - fix "in-place edits on FUSE filesystems create files with all-zero mode bits" - Resolves: #1835761