From df6129319ca3a092e1ab2bc5d72968cdca921be2 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Thu, 2 Feb 2023 20:13:26 +0000 Subject: [PATCH] Auto sync2gitlab import of python3.11-packaging-21.3-1.el8.src.rpm --- .gitignore | 1 + 538.patch | 62 ++++++++++++++++++++++++++++++++ EMPTY | 1 - python3.11-packaging.spec | 76 +++++++++++++++++++++++++++++++++++++++ sources | 1 + 5 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 538.patch delete mode 100644 EMPTY create mode 100644 python3.11-packaging.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1fdca13 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/packaging-21.3.tar.gz diff --git a/538.patch b/538.patch new file mode 100644 index 0000000..e421590 --- /dev/null +++ b/538.patch @@ -0,0 +1,62 @@ +From c3476c3207efef576a185a047e6596b3b0cbcb42 Mon Sep 17 00:00:00 2001 +From: Tzu-ping Chung +Date: Wed, 20 Apr 2022 10:00:07 +0800 +Subject: [PATCH 1/2] Correctly parse ELF for musllinux on Big Endian + +--- + packaging/_musllinux.py | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/packaging/_musllinux.py b/packaging/_musllinux.py +index 8ac3059b..d5d3e044 100644 +--- a/packaging/_musllinux.py ++++ b/packaging/_musllinux.py +@@ -39,9 +39,11 @@ def _parse_ld_musl_from_elf(f: IO[bytes]) -> Optional[str]: + # p_fmt: Format for section header. + # p_idx: Indexes to find p_type, p_offset, and p_filesz. + e_fmt, p_fmt, p_idx = { +- 1: ("IIIIHHH", "IIIIIIII", (0, 1, 4)), # 32-bit. +- 2: ("QQQIHHH", "IIQQQQQQ", (0, 2, 5)), # 64-bit. +- }[ident[4]] ++ (1, 1): ("IIIIHHH", ">IIIIIIII", (0, 1, 4)), # 32-bit MSB. ++ (2, 1): ("QQQIHHH", ">IIQQQQQQ", (0, 2, 5)), # 64-bit MSB. ++ }[(ident[4], ident[5])] + except KeyError: + return None + else: + +From a339dd3374b334a1a999481f3014f68a7389dacc Mon Sep 17 00:00:00 2001 +From: Tzu-ping Chung +Date: Sun, 29 May 2022 11:55:30 +0800 +Subject: [PATCH 2/2] Always use LSB to parse binary in tests + +--- + tests/test_musllinux.py | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/tests/test_musllinux.py b/tests/test_musllinux.py +index d2c87ca1..2623bdbc 100644 +--- a/tests/test_musllinux.py ++++ b/tests/test_musllinux.py +@@ -101,14 +101,15 @@ def test_parse_ld_musl_from_elf_no_interpreter_section(): + with BIN_MUSL_X86_64.open("rb") as f: + data = f.read() + +- # Change all sections to *not* PT_INTERP. +- unpacked = struct.unpack("16BHHIQQQIHHH", data[:58]) ++ # Change all sections to *not* PT_INTERP. We are explicitly using LSB rules ++ # because the binaries are in LSB. ++ unpacked = struct.unpack("<16BHHIQQQIHHH", data[:58]) + *_, e_phoff, _, _, _, e_phentsize, e_phnum = unpacked + for i in range(e_phnum + 1): + sb = e_phoff + e_phentsize * i + se = sb + 56 +- section = struct.unpack("IIQQQQQQ", data[sb:se]) +- data = data[:sb] + struct.pack("IIQQQQQQ", 0, *section[1:]) + data[se:] ++ section = struct.unpack(" - 21.3-1 +- Initial package +- Fedora contributions by: + # Charalampos Stratakis + # Iryna Shcherbina + # Jeroen van Meeuwen (Kolab Systems) + # Lumir Balhar + # Miro Hrončok + # Zbigniew Jędrzejewski-Szmek diff --git a/sources b/sources new file mode 100644 index 0000000..86f680e --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (packaging-21.3.tar.gz) = 8960deacda26877b73d98a3b632e760e902a16ec7a04707f84044980e4d4fb33e4f584db115c9008066aa876079f28633bafe37fbd5ce9a23830b6b89eb4ae7a