|
|
ca3341 |
From 3377a914f4668af3d72216468ae192bc300890f9 Mon Sep 17 00:00:00 2001
|
|
|
ca3341 |
From: Matej Tyc <matyc@redhat.com>
|
|
|
ca3341 |
Date: Mon, 9 Aug 2021 15:45:58 +0200
|
|
|
ca3341 |
Subject: [PATCH 1/2] Fix archive handling in GUI installs
|
|
|
ca3341 |
|
|
|
ca3341 |
GUI downloads an archive, so the ensuing installation doesn't have to.
|
|
|
ca3341 |
However, the installation has to be able to discover files recovered
|
|
|
ca3341 |
from the archive.
|
|
|
ca3341 |
The fix makes sure that files are discovered also in subdirectories.
|
|
|
ca3341 |
---
|
|
|
ca3341 |
org_fedora_oscap/content_discovery.py | 3 ++-
|
|
|
ca3341 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
ca3341 |
|
|
|
ca3341 |
diff --git a/org_fedora_oscap/content_discovery.py b/org_fedora_oscap/content_discovery.py
|
|
|
ca3341 |
index f6b4d27..5fc7343 100644
|
|
|
ca3341 |
--- a/org_fedora_oscap/content_discovery.py
|
|
|
ca3341 |
+++ b/org_fedora_oscap/content_discovery.py
|
|
|
ca3341 |
@@ -196,7 +196,8 @@ def _gather_available_files(self, actually_fetched_content, dest_filename):
|
|
|
ca3341 |
if not dest_filename: # using scap-security-guide
|
|
|
ca3341 |
fpaths = [self.DEFAULT_SSG_DATA_STREAM_PATH]
|
|
|
ca3341 |
else: # Using downloaded XCCDF/OVAL/DS/tailoring
|
|
|
ca3341 |
- fpaths = glob(str(self.CONTENT_DOWNLOAD_LOCATION / "*.xml"))
|
|
|
ca3341 |
+ fpaths = pathlib.Path(self.CONTENT_DOWNLOAD_LOCATION).rglob("*")
|
|
|
ca3341 |
+ fpaths = [str(p) for p in fpaths if p.is_file()]
|
|
|
ca3341 |
else:
|
|
|
ca3341 |
dest_filename = pathlib.Path(dest_filename)
|
|
|
ca3341 |
# RPM is an archive at this phase
|
|
|
ca3341 |
|
|
|
ca3341 |
From 191df327e3e51f486fb655e97acac30222c264fa Mon Sep 17 00:00:00 2001
|
|
|
ca3341 |
From: Matej Tyc <matyc@redhat.com>
|
|
|
ca3341 |
Date: Mon, 9 Aug 2021 15:48:50 +0200
|
|
|
ca3341 |
Subject: [PATCH 2/2] Improve logging
|
|
|
ca3341 |
|
|
|
ca3341 |
Logs written to log files can contain specific details.
|
|
|
ca3341 |
---
|
|
|
ca3341 |
org_fedora_oscap/ks/oscap.py | 2 +-
|
|
|
ca3341 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
ca3341 |
|
|
|
ca3341 |
diff --git a/org_fedora_oscap/ks/oscap.py b/org_fedora_oscap/ks/oscap.py
|
|
|
ca3341 |
index d1b8c9e..65d74cf 100644
|
|
|
ca3341 |
--- a/org_fedora_oscap/ks/oscap.py
|
|
|
ca3341 |
+++ b/org_fedora_oscap/ks/oscap.py
|
|
|
ca3341 |
@@ -393,7 +393,7 @@ def _terminate(self, message):
|
|
|
ca3341 |
time.sleep(100000)
|
|
|
ca3341 |
|
|
|
ca3341 |
def _handle_error(self, exception):
|
|
|
ca3341 |
- log.error("Failed to fetch and initialize SCAP content!")
|
|
|
ca3341 |
+ log.error(f"Failed to fetch and initialize SCAP content: {str(exception)}")
|
|
|
ca3341 |
|
|
|
ca3341 |
if isinstance(exception, ContentCheckError):
|
|
|
ca3341 |
msg = _("The integrity check of the security content failed.")
|