Blame SOURCES/fix_procps_tests.patch

9319e0
diff --git a/tests/probes/sysctl/test_sysctl_probe_all.sh b/tests/probes/sysctl/test_sysctl_probe_all.sh
9319e0
index 073d332ee..4325612a3 100755
9319e0
--- a/tests/probes/sysctl/test_sysctl_probe_all.sh
9319e0
+++ b/tests/probes/sysctl/test_sysctl_probe_all.sh
9319e0
@@ -28,6 +28,16 @@ sysctl -aN --deprecated 2> /dev/null | tr "/" "." | sort -u > "$sysctlNames"
9319e0
 
9319e0
 grep unix-sys:name "$result" | sed -E 's;.*>(.*)<.*;\1;g' | sort > "$ourNames"
9319e0
 
9319e0
+# If procps_ver > 3.3.12 we need to filter *stable_secret and vm.stat_refresh
9319e0
+# options from the sysctl output, for more details see
9319e0
+# https://github.com/OpenSCAP/openscap/issues/1152.
9319e0
+procps_ver=$(rpm -q procps-ng --qf="%{version}")
9319e0
+lowest_ver=$(echo -e "3.3.12\n$procps_ver" | sort -V | head -n1)
9319e0
+if [ "$procps_ver" != "$lowest_ver" ]; then
9319e0
+	sed -i '/net.ipv6.conf.*stable_secret$/d' "$sysctlNames"
9319e0
+	sed -i '/.*vm.stat_refresh/d' "$sysctlNames"
9319e0
+fi
9319e0
+
9319e0
 diff "$sysctlNames" "$ourNames"
9319e0
 
9319e0
 # remove oscap error message related to permissions from stderr