From 2305cc88f30fffaf0f7064627e4a4cd111f076ac Mon Sep 17 00:00:00 2001 From: Glauber Costa Date: Thu, 4 Apr 2019 10:09:29 -0400 Subject: [PATCH] relocatable python: Be more permissive with mime type checking Fedora28 python magic used to return a x-sharedlib mime type for .so files. Fedora29 changed that to x-pie-executable, so the libraries are no longer relocated. Let's be more permissive and relocate everything that starts with application/. Fixes #4396 Signed-off-by: Glauber Costa Message-Id: <20190404140929.7119-1-glauber@scylladb.com> --- scripts/create-relocatable-package-python3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/create-relocatable-package-python3.py b/scripts/create-relocatable-package-python3.py index 747b2026e8..d4a2f047d0 100755 --- a/scripts/create-relocatable-package-python3.py +++ b/scripts/create-relocatable-package-python3.py @@ -157,7 +157,7 @@ def copy_file_to_python_env(ar, f): ar.add(os.path.realpath(f), arcname=libfile) else: m = magic.detect_from_filename(f) - if m and m.mime_type == 'application/x-sharedlib': + if m and m.mime_type.startswith('application/'): fix_sharedlib(ar, f, libfile) else: # in case this is a directory that is listed, we don't want to include everything that is in that directory