From c2369388d3a53c5caa5a69fefd79c48027818d3a5fb7b1f96fc0c2a2a84ee4b6 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 19 Feb 2018 07:17:33 +0000 Subject: [PATCH 1/4] Accepting request 573323 from home:michel_mno:branches:security - force -j1 for PowerPC make check to avoid build failure (lookup_test.o: file not recognized: File truncated) OBS-URL: https://build.opensuse.org/request/show/573323 OBS-URL: https://build.opensuse.org/package/show/security/audit?expand=0&rev=96 --- audit-secondary.changes | 6 ++++++ audit-secondary.spec | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/audit-secondary.changes b/audit-secondary.changes index f6ec1f5..e1a5997 100644 --- a/audit-secondary.changes +++ b/audit-secondary.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Feb 6 13:24:43 UTC 2018 - normand@linux.vnet.ibm.com + +- force -j1 for PowerPC make check to avoid build failure + (lookup_test.o: file not recognized: File truncated) + ------------------------------------------------------------------- Wed Jan 17 15:25:55 UTC 2018 - tchvatal@suse.com diff --git a/audit-secondary.spec b/audit-secondary.spec index bf34b7f..40738c1 100644 --- a/audit-secondary.spec +++ b/audit-secondary.spec @@ -173,7 +173,11 @@ ln -s service %{buildroot}%{_sbindir}/rcauditd chmod 0644 %{buildroot}%{_unitdir}/auditd.service %check +%ifarch ppc ppc64 ppc64le +make -j1 check +%else make %{?_smp_mflags} check +%endif %post -n audit # Save existing audit files if any (from old locations) From c3b4f0e839d1900f7e996ea3f21a54b0e18e1f8858e51181772755400df9c167 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 22 Feb 2018 11:00:36 +0000 Subject: [PATCH 2/4] - reverted -j1 force ppc specific only OBS-URL: https://build.opensuse.org/package/show/security/audit?expand=0&rev=97 --- audit-secondary.changes | 5 +++++ audit-secondary.spec | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/audit-secondary.changes b/audit-secondary.changes index e1a5997..38cbdcd 100644 --- a/audit-secondary.changes +++ b/audit-secondary.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Feb 22 11:00:16 UTC 2018 - meissner@suse.com + +- reverted -j1 force ppc specific only + ------------------------------------------------------------------- Tue Feb 6 13:24:43 UTC 2018 - normand@linux.vnet.ibm.com diff --git a/audit-secondary.spec b/audit-secondary.spec index 40738c1..bf34b7f 100644 --- a/audit-secondary.spec +++ b/audit-secondary.spec @@ -173,11 +173,7 @@ ln -s service %{buildroot}%{_sbindir}/rcauditd chmod 0644 %{buildroot}%{_unitdir}/auditd.service %check -%ifarch ppc ppc64 ppc64le -make -j1 check -%else make %{?_smp_mflags} check -%endif %post -n audit # Save existing audit files if any (from old locations) From 7176e3c394f393a5271b73a6fe4f922e05bccaf88902050cad7176d857da67d4 Mon Sep 17 00:00:00 2001 From: Tony Jones Date: Thu, 1 Mar 2018 21:24:42 +0000 Subject: [PATCH 3/4] Accepting request 580988 from openSUSE:Factory:Staging:O - Add patch to fix test run without python2 interpreter: * audit-python3.patch - Update to 2.8.2 release: * Update tables for 4.14 kernel * Fixup ipv6 server side binding * AVC report from aureport was missing result column header (#1511606) * Add SOFTWARE_UPDATE event * In ausearch/report pickup any path and new-disk fields as a file * Fix value returned by auditctl --reset-lost (Richard Guy Briggs) * In auparse, fix expr_create_timestamp_comparison_ex to be numeric field * Fix building on old systems without linux/fanotify.h * Fix shell portability issues reported by shellcheck * Auditd validate_email should not use gethostbyname - Add patch to fix test run without python2 interpreter: * audit-python3.patch - Update to 2.8.2 release: * Update tables for 4.14 kernel * Fixup ipv6 server side binding * AVC report from aureport was missing result column header (#1511606) * Add SOFTWARE_UPDATE event * In ausearch/report pickup any path and new-disk fields as a file * Fix value returned by auditctl --reset-lost (Richard Guy Briggs) * In auparse, fix expr_create_timestamp_comparison_ex to be numeric field * Fix building on old systems without linux/fanotify.h * Fix shell portability issues reported by shellcheck * Auditd validate_email should not use gethostbyname OBS-URL: https://build.opensuse.org/request/show/580988 OBS-URL: https://build.opensuse.org/package/show/security/audit?expand=0&rev=98 --- audit-2.8.1.tar.gz | 3 - audit-2.8.2.tar.gz | 3 + audit-python3.patch | 290 ++++++++++++++++++++++++++++++++++++++++ audit-secondary.changes | 17 +++ audit-secondary.spec | 17 ++- audit.changes | 17 +++ audit.spec | 10 +- 7 files changed, 343 insertions(+), 14 deletions(-) delete mode 100644 audit-2.8.1.tar.gz create mode 100644 audit-2.8.2.tar.gz create mode 100644 audit-python3.patch diff --git a/audit-2.8.1.tar.gz b/audit-2.8.1.tar.gz deleted file mode 100644 index 29cb501..0000000 --- a/audit-2.8.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1becde92ff6e81798fa8878820ab2497d867036a6596f55109504b37c8b33b6c -size 1120440 diff --git a/audit-2.8.2.tar.gz b/audit-2.8.2.tar.gz new file mode 100644 index 0000000..cb4726b --- /dev/null +++ b/audit-2.8.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67b59b2b77afee9ed87afa4d80ffc8e6f3a1f4bbedd5f2871f387c952147bcba +size 1121970 diff --git a/audit-python3.patch b/audit-python3.patch new file mode 100644 index 0000000..8585c42 --- /dev/null +++ b/audit-python3.patch @@ -0,0 +1,290 @@ +From: Tomas Chvatal +Subject: Convert tests to run under python3 +Upsteam: yes 0dc17590 https://github.com/linux-audit/audit-userspace/pull/39 + +Adjust auparse_test to run with python3 and python2 + +Index: audit-2.8.1/auparse/test/auparse_test.py +=================================================================== +--- audit-2.8.1.orig/auparse/test/auparse_test.py ++++ audit-2.8.1/auparse/test/auparse_test.py +@@ -1,5 +1,7 @@ + #!/usr/bin/env python + ++from __future__ import print_function ++ + import os + srcdir = os.getenv('srcdir') + +@@ -30,29 +32,29 @@ def walk_test(au): + au.reset() + while True: + if not au.first_record(): +- print "Error getting first record" ++ print("Error getting first record") + sys.exit(1) + +- print "event %d has %d records" % (event_cnt, au.get_num_records()) ++ print("event %d has %d records" % (event_cnt, au.get_num_records())) + + record_cnt = 1 + while True: +- print " record %d of type %d(%s) has %d fields" % \ ++ print(" record %d of type %d(%s) has %d fields" % \ + (record_cnt, + au.get_type(), audit.audit_msg_type_to_name(au.get_type()), +- au.get_num_fields()) +- print " line=%d file=%s" % (au.get_line_number(), au.get_filename()) ++ au.get_num_fields())) ++ print(" line=%d file=%s" % (au.get_line_number(), au.get_filename())) + event = au.get_timestamp() + if event is None: +- print "Error getting timestamp - aborting" ++ print("Error getting timestamp - aborting") + sys.exit(1) + +- print " event time: %d.%d:%d, host=%s" % (event.sec, event.milli, event.serial, none_to_null(event.host)) ++ print(" event time: %d.%d:%d, host=%s" % (event.sec, event.milli, event.serial, none_to_null(event.host))) + au.first_field() + while True: +- print " %s=%s (%s)" % (au.get_field_name(), au.get_field_str(), au.interpret_field()) ++ print(" %s=%s (%s)" % (au.get_field_name(), au.get_field_str(), au.interpret_field())) + if not au.next_field(): break +- print ++ print("") + record_cnt += 1 + if not au.next_record(): break + event_cnt += 1 +@@ -62,25 +64,25 @@ def walk_test(au): + def light_test(au): + while True: + if not au.first_record(): +- print "Error getting first record" ++ print("Error getting first record") + sys.exit(1) + +- print "event has %d records" % (au.get_num_records()) ++ print("event has %d records" % (au.get_num_records())) + + record_cnt = 1 + while True: +- print " record %d of type %d(%s) has %d fields" % \ ++ print(" record %d of type %d(%s) has %d fields" % \ + (record_cnt, + au.get_type(), audit.audit_msg_type_to_name(au.get_type()), +- au.get_num_fields()) +- print " line=%d file=%s" % (au.get_line_number(), au.get_filename()) ++ au.get_num_fields())) ++ print(" line=%d file=%s" % (au.get_line_number(), au.get_filename())) + event = au.get_timestamp() + if event is None: +- print "Error getting timestamp - aborting" ++ print("Error getting timestamp - aborting") + sys.exit(1) + +- print " event time: %d.%d:%d, host=%s" % (event.sec, event.milli, event.serial, none_to_null(event.host)) +- print ++ print(" event time: %d.%d:%d, host=%s" % (event.sec, event.milli, event.serial, none_to_null(event.host))) ++ print("") + record_cnt += 1 + if not au.next_record(): break + if not au.parse_next_event(): break +@@ -97,9 +99,9 @@ def simple_search(au, source, where): + au.search_add_item("auid", "=", val, auparse.AUSEARCH_RULE_CLEAR) + au.search_set_stop(where) + if not au.search_next_event(): +- print "Error searching for auid" ++ print("Error searching for auid") + else: +- print "Found %s = %s" % (au.get_field_name(), au.get_field_str()) ++ print("Found %s = %s" % (au.get_field_name(), au.get_field_str())) + + def compound_search(au, how): + au = auparse.AuParser(auparse.AUSOURCE_FILE, srcdir + "/test.log"); +@@ -115,119 +117,119 @@ def compound_search(au, how): + + au.search_set_stop(auparse.AUSEARCH_STOP_FIELD) + if not au.search_next_event(): +- print "Error searching for auid" ++ print("Error searching for auid") + else: +- print "Found %s = %s" % (au.get_field_name(), au.get_field_str()) ++ print("Found %s = %s" % (au.get_field_name(), au.get_field_str())) + + def feed_callback(au, cb_event_type, event_cnt): + if cb_event_type == auparse.AUPARSE_CB_EVENT_READY: + if not au.first_record(): +- print "Error getting first record" ++ print("Error getting first record") + sys.exit(1) + +- print "event %d has %d records" % (event_cnt[0], au.get_num_records()) ++ print("event %d has %d records" % (event_cnt[0], au.get_num_records())) + + record_cnt = 1 + while True: +- print " record %d of type %d(%s) has %d fields" % \ ++ print(" record %d of type %d(%s) has %d fields" % \ + (record_cnt, + au.get_type(), audit.audit_msg_type_to_name(au.get_type()), +- au.get_num_fields()) +- print " line=%d file=%s" % (au.get_line_number(), au.get_filename()) ++ au.get_num_fields())) ++ print(" line=%d file=%s" % (au.get_line_number(), au.get_filename())) + event = au.get_timestamp() + if event is None: +- print "Error getting timestamp - aborting" ++ print("Error getting timestamp - aborting") + sys.exit(1) + +- print " event time: %d.%d:%d, host=%s" % (event.sec, event.milli, event.serial, none_to_null(event.host)) ++ print(" event time: %d.%d:%d, host=%s" % (event.sec, event.milli, event.serial, none_to_null(event.host))) + au.first_field() + while True: +- print " %s=%s (%s)" % (au.get_field_name(), au.get_field_str(), au.interpret_field()) ++ print(" %s=%s (%s)" % (au.get_field_name(), au.get_field_str(), au.interpret_field())) + if not au.next_field(): break +- print ++ print("") + record_cnt += 1 + if not au.next_record(): break + event_cnt[0] += 1 + + au = auparse.AuParser(auparse.AUSOURCE_BUFFER_ARRAY, buf) + +-print "Starting Test 1, iterate..." ++print("Starting Test 1, iterate...") + while au.parse_next_event(): + if au.find_field("auid"): +- print "%s=%s" % (au.get_field_name(), au.get_field_str()) +- print "interp auid=%s" % (au.interpret_field()) ++ print("%s=%s" % (au.get_field_name(), au.get_field_str())) ++ print("interp auid=%s" % (au.interpret_field())) + else: +- print "Error iterating to auid" +-print "Test 1 Done\n" ++ print("Error iterating to auid") ++print("Test 1 Done\n") + + # Reset, now lets go to beginning and walk the list manually */ +-print "Starting Test 2, walk events, records, and fields..." ++print("Starting Test 2, walk events, records, and fields...") + au.reset() + walk_test(au) +-print "Test 2 Done\n" ++print("Test 2 Done\n") + + # Reset, now lets go to beginning and walk the list manually */ +-print "Starting Test 3, walk events, records of 1 buffer..." ++print("Starting Test 3, walk events, records of 1 buffer...") + au = auparse.AuParser(auparse.AUSOURCE_BUFFER, buf[1]) + au.reset() + light_test(au); +-print "Test 3 Done\n" ++print("Test 3 Done\n") + +-print "Starting Test 4, walk events, records of 1 file..." ++print("Starting Test 4, walk events, records of 1 file...") + au = auparse.AuParser(auparse.AUSOURCE_FILE, srcdir + "/test.log"); + walk_test(au); +-print "Test 4 Done\n" ++print("Test 4 Done\n") + +-print "Starting Test 5, walk events, records of 2 files..." ++print("Starting Test 5, walk events, records of 2 files...") + au = auparse.AuParser(auparse.AUSOURCE_FILE_ARRAY, files); + walk_test(au); +-print "Test 5 Done\n" ++print("Test 5 Done\n") + +-print "Starting Test 6, search..." ++print("Starting Test 6, search...") + au = auparse.AuParser(auparse.AUSOURCE_BUFFER_ARRAY, buf) + au.search_add_item("auid", "=", "500", auparse.AUSEARCH_RULE_CLEAR) + au.search_set_stop(auparse.AUSEARCH_STOP_EVENT) + if au.search_next_event(): +- print "Error search found something it shouldn't have" ++ print("Error search found something it shouldn't have") + else: +- print "auid = 500 not found...which is correct" ++ print("auid = 500 not found...which is correct") + au.search_clear() + au = auparse.AuParser(auparse.AUSOURCE_BUFFER_ARRAY, buf) + #au.search_add_item("auid", "exists", None, auparse.AUSEARCH_RULE_CLEAR) + au.search_add_item("auid", "exists", "", auparse.AUSEARCH_RULE_CLEAR) + au.search_set_stop(auparse.AUSEARCH_STOP_EVENT) + if not au.search_next_event(): +- print "Error searching for existence of auid" +-print "auid exists...which is correct" +-print "Testing BUFFER_ARRAY, stop on field" ++ print("Error searching for existence of auid") ++print("auid exists...which is correct") ++print("Testing BUFFER_ARRAY, stop on field") + simple_search(au, auparse.AUSOURCE_BUFFER_ARRAY, auparse.AUSEARCH_STOP_FIELD) +-print "Testing BUFFER_ARRAY, stop on record" ++print("Testing BUFFER_ARRAY, stop on record") + simple_search(au, auparse.AUSOURCE_BUFFER_ARRAY, auparse.AUSEARCH_STOP_RECORD) +-print "Testing BUFFER_ARRAY, stop on event" ++print("Testing BUFFER_ARRAY, stop on event") + simple_search(au, auparse.AUSOURCE_BUFFER_ARRAY, auparse.AUSEARCH_STOP_EVENT) +-print "Testing test.log, stop on field" ++print("Testing test.log, stop on field") + simple_search(au, auparse.AUSOURCE_FILE, auparse.AUSEARCH_STOP_FIELD) +-print "Testing test.log, stop on record" ++print("Testing test.log, stop on record") + simple_search(au, auparse.AUSOURCE_FILE, auparse.AUSEARCH_STOP_RECORD) +-print "Testing test.log, stop on event" ++print("Testing test.log, stop on event") + simple_search(au, auparse.AUSOURCE_FILE, auparse.AUSEARCH_STOP_EVENT) +-print "Test 6 Done\n" ++print("Test 6 Done\n") + +-print "Starting Test 7, compound search..." ++print("Starting Test 7, compound search...") + au = auparse.AuParser(auparse.AUSOURCE_BUFFER_ARRAY, buf) + compound_search(au, auparse.AUSEARCH_RULE_AND) + compound_search(au, auparse.AUSEARCH_RULE_OR) +-print "Test 7 Done\n" ++print("Test 7 Done\n") + +-print "Starting Test 8, regex search..." ++print("Starting Test 8, regex search...") + au = auparse.AuParser(auparse.AUSOURCE_BUFFER_ARRAY, buf) +-print "Doing regex match...\n" ++print("Doing regex match...\n") + au = auparse.AuParser(auparse.AUSOURCE_BUFFER_ARRAY, buf) +-print "Test 8 Done\n" ++print("Test 8 Done\n") + + # Note: this should match Test 2 exactly + # Note: this should match Test 2 exactly +-print "Starting Test 9, buffer feed..." ++print("Starting Test 9, buffer feed...") + au = auparse.AuParser(auparse.AUSOURCE_FEED); + event_cnt = 1 + au.add_callback(feed_callback, [event_cnt]) +@@ -241,10 +243,10 @@ for s in buf: + beg += chunk_len + au.feed(data) + au.flush_feed() +-print "Test 9 Done\n" ++print("Test 9 Done\n") + + # Note: this should match Test 4 exactly +-print "Starting Test 10, file feed..." ++print("Starting Test 10, file feed...") + au = auparse.AuParser(auparse.AUSOURCE_FEED); + event_cnt = 1 + au.add_callback(feed_callback, [event_cnt]) +@@ -254,9 +256,9 @@ while True: + if not data: break + au.feed(data) + au.flush_feed() +-print "Test 10 Done\n" ++print("Test 10 Done\n") + +-print "Finished non-admin tests\n" ++print("Finished non-admin tests\n") + + au = None + sys.exit(0) diff --git a/audit-secondary.changes b/audit-secondary.changes index 38cbdcd..b021dcf 100644 --- a/audit-secondary.changes +++ b/audit-secondary.changes @@ -3,6 +3,23 @@ Thu Feb 22 11:00:16 UTC 2018 - meissner@suse.com - reverted -j1 force ppc specific only +------------------------------------------------------------------- +Wed Feb 7 09:26:35 UTC 2018 - tchvatal@suse.com + +- Add patch to fix test run without python2 interpreter: + * audit-python3.patch +- Update to 2.8.2 release: + * Update tables for 4.14 kernel + * Fixup ipv6 server side binding + * AVC report from aureport was missing result column header (#1511606) + * Add SOFTWARE_UPDATE event + * In ausearch/report pickup any path and new-disk fields as a file + * Fix value returned by auditctl --reset-lost (Richard Guy Briggs) + * In auparse, fix expr_create_timestamp_comparison_ex to be numeric field + * Fix building on old systems without linux/fanotify.h + * Fix shell portability issues reported by shellcheck + * Auditd validate_email should not use gethostbyname + ------------------------------------------------------------------- Tue Feb 6 13:24:43 UTC 2018 - normand@linux.vnet.ibm.com diff --git a/audit-secondary.spec b/audit-secondary.spec index bf34b7f..b9ef03c 100644 --- a/audit-secondary.spec +++ b/audit-secondary.spec @@ -22,10 +22,10 @@ # The seperation is required to minimize unnecessary build cycles. %define _name audit Name: audit-secondary -Version: 2.8.1 +Version: 2.8.2 Release: 0 Summary: Linux kernel audit subsystem utilities -License: GPL-2.0+ +License: GPL-2.0-or-later Group: System/Monitoring Url: http://people.redhat.com/sgrubb/audit/ Source0: http://people.redhat.com/sgrubb/audit/%{_name}-%{version}.tar.gz @@ -33,6 +33,7 @@ Patch1: audit-plugins-path.patch Patch2: audit-no-gss.patch Patch3: audit-allow-manual-stop.patch Patch4: audit-ausearch-do-not-require-tclass.patch +Patch5: audit-python3.patch BuildRequires: audit-devel = %{version} BuildRequires: autoconf >= 2.12 BuildRequires: gcc-c++ @@ -58,7 +59,7 @@ Linux kernel. %package -n audit Summary: User Space Tools for Kernel Auditing -License: LGPL-2.1+ +License: LGPL-2.1-or-later Group: System/Monitoring Requires: %{_name}-libs = %{version} Requires: coreutils @@ -71,7 +72,7 @@ Linux kernel. %package -n python2-audit Summary: Python Bindings for libaudit -License: LGPL-2.1+ +License: LGPL-2.1-or-later Group: Development/Languages/Python Provides: audit-libs-python = %{version} Obsoletes: audit-libs-python < %{version} @@ -82,7 +83,7 @@ by python. %package -n python3-audit Summary: Python3 Bindings for libaudit -License: LGPL-2.1+ +License: LGPL-2.1-or-later Group: Development/Languages/Python Provides: audit-libs-python3 = %{version} Obsoletes: audit-libs-python3 < %{version} @@ -93,7 +94,7 @@ by python3. %package -n audit-audispd-plugins Summary: Default plugins for the audit dispatcher -License: GPL-2.0+ +License: GPL-2.0-or-later Group: System/Monitoring Requires: openldap2 @@ -111,6 +112,10 @@ rm -rf audisp/plugins/prelude %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 + +# fix python env call in tests +sed -i -e 's:#!/usr/bin/env python:#!/usr/bin/python3:g' auparse/test/auparse_test.py %build autoreconf -fi diff --git a/audit.changes b/audit.changes index 435d457..aed8184 100644 --- a/audit.changes +++ b/audit.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Wed Feb 7 09:26:35 UTC 2018 - tchvatal@suse.com + +- Add patch to fix test run without python2 interpreter: + * audit-python3.patch +- Update to 2.8.2 release: + * Update tables for 4.14 kernel + * Fixup ipv6 server side binding + * AVC report from aureport was missing result column header (#1511606) + * Add SOFTWARE_UPDATE event + * In ausearch/report pickup any path and new-disk fields as a file + * Fix value returned by auditctl --reset-lost (Richard Guy Briggs) + * In auparse, fix expr_create_timestamp_comparison_ex to be numeric field + * Fix building on old systems without linux/fanotify.h + * Fix shell portability issues reported by shellcheck + * Auditd validate_email should not use gethostbyname + ------------------------------------------------------------------- Sat Nov 4 21:12:09 UTC 2017 - aavindraa@gmail.com diff --git a/audit.spec b/audit.spec index 3b900b7..88be1db 100644 --- a/audit.spec +++ b/audit.spec @@ -17,10 +17,10 @@ Name: audit -Version: 2.8.1 +Version: 2.8.2 Release: 0 Summary: Linux kernel audit subsystem utilities -License: GPL-2.0+ +License: GPL-2.0-or-later Group: System/Monitoring Url: http://people.redhat.com/sgrubb/audit/ Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz @@ -41,7 +41,7 @@ Linux kernel. %package -n libaudit1 Summary: Library for interfacing with the kernel audit subsystem -License: LGPL-2.1+ +License: LGPL-2.1-or-later Group: System/Libraries Obsoletes: %{name}-libs < 2.0.4 Provides: %{name}-libs = %{version} @@ -52,7 +52,7 @@ applications to use the audit framework. %package -n libauparse0 Summary: Library for parsing and interpreting audit events -License: LGPL-2.1+ +License: LGPL-2.1-or-later Group: System/Libraries %description -n libauparse0 @@ -61,7 +61,7 @@ parse audit records. %package -n audit-devel Summary: Header files for libaudit -License: LGPL-2.1+ +License: LGPL-2.1-or-later Group: Development/Libraries/C and C++ Requires: libaudit1 = %{version} Requires: libauparse0 = %{version} From e57cf5edeb4b3328cd728b5fbd05ad6b899de21c033c8b95be4f7903e350c0ea Mon Sep 17 00:00:00 2001 From: Tony Jones Date: Fri, 16 Mar 2018 23:10:56 +0000 Subject: [PATCH 4/4] Accepting request 588034 from home:jones_tony:branches:security - Change openldap dependency to client only (bsc#1085003) - Resolve issue with previous change if both Python2 and Python3 are present, tests were failing as python2 bindings are preferred in this case. - Update header in audit-python3.patch - Update patch guidelines in README-BEFORE-ADDING-PATCHES OBS-URL: https://build.opensuse.org/request/show/588034 OBS-URL: https://build.opensuse.org/package/show/security/audit?expand=0&rev=99 --- README-BEFORE-ADDING-PATCHES | 21 ++++++++++++--------- audit-python3.patch | 4 +++- audit-secondary.changes | 8 ++++++++ audit-secondary.spec | 10 +++++++--- audit.changes | 6 ++++++ 5 files changed, 36 insertions(+), 13 deletions(-) diff --git a/README-BEFORE-ADDING-PATCHES b/README-BEFORE-ADDING-PATCHES index 43eb94c..8259e81 100644 --- a/README-BEFORE-ADDING-PATCHES +++ b/README-BEFORE-ADDING-PATCHES @@ -1,13 +1,16 @@ -All patches need to have a patch description header similar to what is used in -SUSE kernel git tree. Patches added without this will be reverted. Thanks. +All patches need to have a kernel-style patch description header. -From: Name +PATCHES LACKING THIS OR NOT CORRECTLY FOLLOWING DESCRIPTION BELOW WILL BE +REJECTED OR REVERTED + +From: Joe Smoe Subject: Summary of fix -Date: date -References: bnc#xxxxxx (bugzilla reference if applicable) -Upstream: yes (provide repo/commit-id in description) or no (provide reason) -Signed-Off-by: Name (same as From: if committer is patch author) +Date: Date of fix +References: Bugzilla reference [bsc#xxxx] +References: URL of relevant discussion thread, opensuse or upstream ML etc +Git-commit: Full SHA of upstream commit [if applicable] +Git-repo: [if different from https://github.com/linux-audit/audit-userspace.git] +Patch-mainline: revision of audit package or explanation if not [i.e v2.8.1 or "queued with maintainer" or "never; because ...." ] +Signed-Off-by: Joe Smoe Short paragraph describing problem/fix. - -References to upstream repo-path/commit-id if applicable. diff --git a/audit-python3.patch b/audit-python3.patch index 8585c42..ebd0a09 100644 --- a/audit-python3.patch +++ b/audit-python3.patch @@ -1,6 +1,8 @@ From: Tomas Chvatal +Date: Wed Feb 7 09:26:35 UTC 2018 Subject: Convert tests to run under python3 -Upsteam: yes 0dc17590 https://github.com/linux-audit/audit-userspace/pull/39 +References: https://github.com/linux-audit/audit-userspace/pull/39 +Patch-mainline: no; pending with maintainer Adjust auparse_test to run with python3 and python2 diff --git a/audit-secondary.changes b/audit-secondary.changes index b021dcf..a84f1e7 100644 --- a/audit-secondary.changes +++ b/audit-secondary.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Mar 16 19:44:45 UTC 2018 - tonyj@suse.com + +- Change openldap dependency to client only (bsc#1085003) +- Resolve issue with previous change if both Python2 and Python3 are + present, tests were failing as python2 bindings are preferred in this + case. + ------------------------------------------------------------------- Thu Feb 22 11:00:16 UTC 2018 - meissner@suse.com diff --git a/audit-secondary.spec b/audit-secondary.spec index b9ef03c..d246c5b 100644 --- a/audit-secondary.spec +++ b/audit-secondary.spec @@ -38,8 +38,8 @@ BuildRequires: audit-devel = %{version} BuildRequires: autoconf >= 2.12 BuildRequires: gcc-c++ BuildRequires: kernel-headers >= 2.6.30 +BuildRequires: libldapcpp-devel BuildRequires: libtool -BuildRequires: openldap2-devel BuildRequires: pkgconfig %if %{with python2} BuildRequires: python2-devel @@ -96,7 +96,6 @@ by python3. Summary: Default plugins for the audit dispatcher License: GPL-2.0-or-later Group: System/Monitoring -Requires: openldap2 %description -n audit-audispd-plugins The audit-audispd-plugins package contains plugin components for the @@ -114,8 +113,13 @@ rm -rf audisp/plugins/prelude %patch4 -p1 %patch5 -p1 -# fix python env call in tests +%if %{without python2} && %{with python3} +# Fix python env call in tests if we only have Python3. +# If both versions are present, python2 bindings are preferred by the tests and +# unconditionally using /usr/bin/python3 breaks the tests +# Probably the correct solution is to run the tests twice if both are present. sed -i -e 's:#!/usr/bin/env python:#!/usr/bin/python3:g' auparse/test/auparse_test.py +%endif %build autoreconf -fi diff --git a/audit.changes b/audit.changes index aed8184..4f0c55e 100644 --- a/audit.changes +++ b/audit.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Mar 16 19:41:29 UTC 2018 - tonyj@suse.com + +- Update header in audit-python3.patch +- Update patch guidelines in README-BEFORE-ADDING-PATCHES + ------------------------------------------------------------------- Wed Feb 7 09:26:35 UTC 2018 - tchvatal@suse.com