diff --git a/lzma-4.32.7-acl-tests.patch b/lzma-4.32.7-acl-tests.patch new file mode 100644 index 0000000..11fd071 --- /dev/null +++ b/lzma-4.32.7-acl-tests.patch @@ -0,0 +1,11 @@ +diff -urN lzma-4.32.7/tests/perms lzma-4.32.7-patched/tests/perms +--- lzma-4.32.7/tests/perms 2008-05-06 20:45:28.000000000 +1100 ++++ lzma-4.32.7-patched/tests/perms 2020-06-06 18:38:14.013404648 +1000 +@@ -28,6 +28,6 @@ + fail=0 + lzma in || fail=1 + set - `ls -l in.lzma` +-test "x$1" = x-rw-r--r-- || fail=1 ++test "x$1" = x-rw-r--r--. || fail=1 + + (exit $fail); exit $fail diff --git a/lzmadec.spec b/lzmadec.spec index a0050d0..5364858 100644 --- a/lzmadec.spec +++ b/lzmadec.spec @@ -1,3 +1,5 @@ +%{?build_selinux}%{?!build_selinux:%bcond_with selinux} + %define oname lzma %define oldlzmaver 4.32.7 %define major 0 @@ -28,6 +30,8 @@ Patch9: lzma-4.32.4-text-tune.patch # 4.32.2 has changes to sdk that we replace with newer, we apply these to the new Patch12: lzma-4.32.2-sdk-changes.patch Patch16: lzma-4.32.7-format_not_a_string_literal_and_no_format_arguments.diff +# Fix tests (accept -rw-r--r--.) when SELinux is enabled +Patch20: lzma-4.32.7-acl-tests.patch BuildRequires: diffutils BuildRequires: dos2unix # for squashfs-lzma library @@ -140,6 +144,10 @@ find src/sdk -name makefile|xargs rm -f %patch12 -p1 -b .4.32.2 %patch16 -p1 -b .format_not_a_string_literal_and_no_format_arguments +%if %{with selinux} +%patch20 -p1 -b .acl +%endif + pushd C/7zip/Compress/LZMA_C cp %{SOURCE3} kmod/ cp uncomp.c LzmaDecode.{c,h} LzmaTypes.h kmod/