diff --git a/0001-bypass-wrong-output-when-enabled-selinux.patch b/0001-bypass-wrong-output-when-enabled-selinux.patch new file mode 100644 index 0000000000000000000000000000000000000000..5e05a28c98280b7abaa37f62df50392e08099e9f --- /dev/null +++ b/0001-bypass-wrong-output-when-enabled-selinux.patch @@ -0,0 +1,47 @@ +From 47a7a1baa2347a13dbb4e2284ec76be1baa4adb2 Mon Sep 17 00:00:00 2001 +From: Shijie Luo +Date: Sun, 15 Mar 2020 14:15:42 -0400 +Subject: [PATCH] bypass wrong output when enabled selinux +When enforcing selinux, excuting command getfattr may output +something about selinux. Bypass these messages to make +testcases go success. + +Signed-off-by: Shijie Luo +--- + test/run | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +diff --git a/test/run b/test/run +index 4b1f8d0..780a49c 100755 +--- a/test/run ++++ b/test/run +@@ -160,17 +160,21 @@ sub process_test($$$$) { + map { s/\s/\\$&/g; $_ } @$p), " -- "; + my $result = exec_test($prog, $in); + my @good = (); +- my $nmax = (@$out > @$result) ? @$out : @$result; +- for (my $n=0; $n < $nmax; $n++) { ++ my $nmax = @$out; ++ my $mmax = @$result; ++ for (my $n=0, my $m=0; $n < $nmax; $n++, $m++) { + my $use_re; ++ while($m < $mmax-1 && $result->[$m] !~ $out->[$n]) { ++ $m++; ++ } + if (defined $out->[$n] && $out->[$n] =~ /^~ /) { + $use_re = 1; + $out->[$n] =~ s/^~ //g; + } + +- if (!defined($out->[$n]) || !defined($result->[$n]) || +- (!$use_re && $result->[$n] ne $out->[$n]) || +- ( $use_re && $result->[$n] !~ /^$out->[$n]/)) { ++ if (!defined($out->[$n]) || !defined($result->[$m]) || ++ (!$use_re && $result->[$m] ne $out->[$n]) || ++ ( $use_re && $result->[$m] !~ /^$out->[$n]/)) { + push @good, ($use_re ? '!~' : '!='); + } + else { +-- +2.23.0 + diff --git a/attr.spec b/attr.spec index dffc3a460a325d4913d43299903575c125e4fc7b..74c42fd6f927e49dd3e4703822175740cab1a567 100644 --- a/attr.spec +++ b/attr.spec @@ -1,7 +1,7 @@ %{!?_licensedir:%global license %%doc} Name: attr Version: 2.4.48 -Release: 5 +Release: 6 Summary: Commands for Manipulating Filesystem Extended Attributes License: GPLv2+ AND LGPLv2+ URL: https://savannah.nongnu.org/projects/attr @@ -9,6 +9,7 @@ Source0: https://download-mirror.savannah.gnu.org/releases/attr/attr-%{version}. # fix test-suite failure with perl-5.26.0 (#1473853) Patch0000: 0000-attr-2.4.48-test-suite-perl.patch +Patch0001: 0001-bypass-wrong-output-when-enabled-selinux.patch Patch6000: 6000-Switch-back-to-syscall.patch @@ -92,6 +93,12 @@ make %{?_smp_mflags} check %{_mandir}/man3/* %changelog +* Sun Mar 15 2020 zoujing - 2.4.48-6 +- Type:bugfix +- ID:NA +- SUG:restart +- DESC:bypass wrong output when enabled selinux. + * Fri Aug 30 2019 zoujing - 2.4.48-5 - Type:enhancemnet - ID:NA