1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-23 08:16:54 +00:00

Merge pull request #7855 from ytec-nl/master

Prevent CLI argument issues in scripts/glibc_check.py
This commit is contained in:
TW 2023-10-09 01:16:00 +02:00 committed by GitHub
commit d4ea88433c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,6 @@
import sys import sys
verbose = True verbose = True
objdump = "objdump -T %s"
glibc_re = re.compile(r"GLIBC_([0-9]\.[0-9]+)") glibc_re = re.compile(r"GLIBC_([0-9]\.[0-9]+)")
@ -32,7 +31,7 @@ def main():
overall_versions = set() overall_versions = set()
for filename in filenames: for filename in filenames:
try: try:
output = subprocess.check_output(objdump % filename, shell=True, stderr=subprocess.STDOUT) output = subprocess.check_output(["objdump", "-T", filename], stderr=subprocess.STDOUT)
output = output.decode() output = output.decode()
versions = {parse_version(match.group(1)) for match in glibc_re.finditer(output)} versions = {parse_version(match.group(1)) for match in glibc_re.finditer(output)}
requires_glibc = max(versions) requires_glibc = max(versions)