diff --git a/Silence-spurious-error-message-from-lsetfilecon-on-E.patch b/Silence-spurious-error-message-from-lsetfilecon-on-E.patch new file mode 100644 index 0000000..1a708a2 --- /dev/null +++ b/Silence-spurious-error-message-from-lsetfilecon-on-E.patch @@ -0,0 +1,36 @@ +From 4a71a3eccd7e9e14ee0e83b1cb300386a93622cd Mon Sep 17 00:00:00 2001 +From: Panu Matilainen +Date: Fri, 13 Dec 2019 14:14:10 +0200 +Subject: [PATCH] Silence spurious error message from lsetfilecon() on + -EOPNOTSUPP + +We already filter out -EOPNOTSUPP and return OK, but the message was +getting logged before the filtering so we'd spit out spurious error +messages on filesystems that don't support SELinux (RhBug:1777502) +--- + plugins/selinux.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/plugins/selinux.c b/plugins/selinux.c +index a51f95e..ba37ffa 100644 +--- a/plugins/selinux.c ++++ b/plugins/selinux.c +@@ -168,11 +168,12 @@ static rpmRC selinux_fsm_file_prepare(rpmPlugin plugin, rpmfi fi, + if (selabel_lookup_raw(sehandle, &scon, dest, file_mode) == 0) { + int conrc = lsetfilecon(path, scon); + +- rpmlog(loglvl(conrc < 0), "lsetfilecon: (%s, %s) %s\n", +- path, scon, (conrc < 0 ? strerror(errno) : "")); +- + if (conrc == 0 || (conrc < 0 && errno == EOPNOTSUPP)) + rc = RPMRC_OK; ++ ++ rpmlog(loglvl(rc != RPMRC_OK), "lsetfilecon: (%s, %s) %s\n", ++ path, scon, (conrc < 0 ? strerror(errno) : "")); ++ + freecon(scon); + } else { + /* No context for dest is not our headache */ +-- +1.8.3.1 + diff --git a/0001-Unbundle-config-site-and-add-RPM-LD-FLAGS-macro.patch b/Unbundle-config-site-and-add-RPM-LD-FLAGS-macro.patch similarity index 100% rename from 0001-Unbundle-config-site-and-add-RPM-LD-FLAGS-macro.patch rename to Unbundle-config-site-and-add-RPM-LD-FLAGS-macro.patch diff --git a/0001-add-dist-to-release-by-default.patch b/add-dist-to-release-by-default.patch similarity index 100% rename from 0001-add-dist-to-release-by-default.patch rename to add-dist-to-release-by-default.patch diff --git a/0001-bugfix-rpm-4.14.2-fix-tty-failed.patch b/bugfix-rpm-4.14.2-fix-tty-failed.patch similarity index 100% rename from 0001-bugfix-rpm-4.14.2-fix-tty-failed.patch rename to bugfix-rpm-4.14.2-fix-tty-failed.patch diff --git a/0001-find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch b/find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch similarity index 100% rename from 0001-find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch rename to find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch diff --git a/rpm.spec b/rpm.spec index 54846ea..98186f8 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,19 +1,20 @@ Name: rpm Version: 4.15.1 -Release: 11 +Release: 12 Summary: RPM Package Manager License: GPLv2+ URL: http://www.rpm.org/ Source0: http://ftp.rpm.org/releases/rpm-4.15.x/%{name}-%{version}.tar.bz2 -Patch1: 0001-Unbundle-config-site-and-add-RPM-LD-FLAGS-macro.patch +Patch1: Unbundle-config-site-and-add-RPM-LD-FLAGS-macro.patch Patch2: rpm-4.12.0-rpm2cpio-hack.patch -Patch3: 0001-find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch -Patch4: 0001-skip-updating-the-preferences.patch -Patch5: 0001-add-dist-to-release-by-default.patch +Patch3: find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch +Patch4: skip-updating-the-preferences.patch +Patch5: add-dist-to-release-by-default.patch +Patch6: Silence-spurious-error-message-from-lsetfilecon-on-E.patch Patch9000: bugfix-rpm-4.11.3-add-aarch64_ilp32-arch.patch -Patch9001: 0001-bugfix-rpm-4.14.2-fix-tty-failed.patch +Patch9001: bugfix-rpm-4.14.2-fix-tty-failed.patch Patch9002: bugfix-rpm-4.14.2-wait-once-get-rpmlock-fail.patch BuildRequires: gcc autoconf automake libtool make gawk popt-devel openssl-devel readline-devel libdb-devel @@ -281,6 +282,12 @@ make check || (cat tests/rpmtests.log; exit 0) %{_mandir}/man1/gendiff.1* %changelog +* Fri Mar 6 2020 openEuler Buildteam - 4.15.1-12 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:silence spurious error message from lsetfilecon() + * Wed Mar 4 2020 openEuler Buildteam - 4.15.1-11 - Type:bugfix - ID:NA diff --git a/0001-skip-updating-the-preferences.patch b/skip-updating-the-preferences.patch similarity index 100% rename from 0001-skip-updating-the-preferences.patch rename to skip-updating-the-preferences.patch