diff --git a/netlabel_tools.spec b/netlabel_tools.spec index 2e91419..5cde966 100644 --- a/netlabel_tools.spec +++ b/netlabel_tools.spec @@ -1,12 +1,13 @@ Summary: Tools to manage the Linux NetLabel subsystem Name: netlabel_tools Version: 0.30.0 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2 -Source: https://github.com/netlabel/netlabel_tools/releases/download/v%{version}/%{name}-%{version}.tar.gz URL: https://github.com/netlabel/netlabel_tools +Source: https://github.com/netlabel/netlabel_tools/releases/download/v%{version}/%{name}-%{version}.tar.gz +Patch0: rhbz1683434.patch -Requires: kernel libnl3 +Requires: libnl3 Requires(post): systemd Requires(preun): systemd Requires(postun): systemd @@ -25,6 +26,7 @@ kernel subsystem. %prep %setup -q +%patch0 -p1 %build %configure @@ -64,6 +66,10 @@ make V=1 DESTDIR="%{buildroot}" install %attr(0644,root,root) %config(noreplace) /etc/netlabel.rules %changelog +* Fri Aug 02 2019 Paul Moore - 0.30.0-8 +- Applied upstream patch to improve netlabel-config error reporting (rhbz #1683434) +- Removed the kernel dependency (rhbz #1733605) + * Thu Jul 25 2019 Fedora Release Engineering - 0.30.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/rhbz1683434.patch b/rhbz1683434.patch new file mode 100644 index 0000000..d8aeae1 --- /dev/null +++ b/rhbz1683434.patch @@ -0,0 +1,38 @@ +From 578a65904ff6426c01d81826873d27d0af35f355 Mon Sep 17 00:00:00 2001 +From: Paul Moore +Date: Sun, 17 Mar 2019 17:13:55 -0400 +Subject: [PATCH] netlabel_config: better error reporting on load + +Signed-off-by: Paul Moore +--- + netlabelctl/netlabel-config | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/netlabelctl/netlabel-config b/netlabelctl/netlabel-config +index 717d795..15c74f7 100755 +--- a/netlabelctl/netlabel-config ++++ b/netlabelctl/netlabel-config +@@ -114,15 +114,21 @@ function nlbl_reset() { + # load the NetLabel configuration from the configuration file + function nlbl_load() { + local ret_rc=0 ++ local line_num=0 + local line + while read line; do ++ line_num=$(($line_num + 1)) + # skip comments and blank lines + echo "$line" | egrep '^#|^$' >& /dev/null && continue + + # perform the configuration +- netlabelctl $line >& /dev/null ++ output=$(netlabelctl $line 2>&1) + rc=$? +- [[ $rc -ne 0 ]] && ret_rc=1 ++ if [[ $rc -ne 0 ]]; then ++ ret_rc=1 ++ echo "error: line $line_num \"$line\"" ++ echo "$output" ++ fi + done < "$CFG_FILE" + + return $ret_rc