aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormerge-script <fanquake@gmail.com>2024-06-18 10:26:11 +0100
committermerge-script <fanquake@gmail.com>2024-06-18 10:26:11 +0100
commita1537ba1a394ad2791865705a07f622120d893f2 (patch)
treef19c0b4d04e338c49f4a3adf87326ea765cc6615
parent41544b8f96dbc9c6b8998acd6522200d67cdc16d (diff)
parentb03a45b13e4e33b044cae6c97a6d608f6f3d43f3 (diff)
Merge bitcoin/bitcoin#30282: Revert "contrib: macdeploy: monkey-patch gen-sdk to be deterministic"
b03a45b13e4e33b044cae6c97a6d608f6f3d43f3 Revert "contrib: macdeploy: monkey-patch gen-sdk to be deterministic" (fanquake) Pull request description: This reverts commit ba30a5407e065e9d6dd037351e83f56a43f38f19. We no-longer support Python 3.8, so remove the monkey patching. ACKs for top commit: hebasto: ACK b03a45b13e4e33b044cae6c97a6d608f6f3d43f3, I have reviewed the code and it looks OK. Tree-SHA512: 5bf68c2b332f18a620a8a6f77812ed93afa988016847bec1d3b7355670301dc957442ac47191a0cb7c3fe607d902914fb00c96345c8170f2a64429638c00b3c4
-rwxr-xr-xcontrib/macdeploy/gen-sdk15
1 files changed, 0 insertions, 15 deletions
diff --git a/contrib/macdeploy/gen-sdk b/contrib/macdeploy/gen-sdk
index b73f5cba14..86a6262b5c 100755
--- a/contrib/macdeploy/gen-sdk
+++ b/contrib/macdeploy/gen-sdk
@@ -8,21 +8,6 @@ import gzip
import os
import contextlib
-# monkey-patch Python 3.8 and older to fix wrong TAR header handling
-# see https://github.com/bitcoin/bitcoin/pull/24534
-# and https://github.com/python/cpython/pull/18080 for more info
-if sys.version_info < (3, 9):
- _old_create_header = tarfile.TarInfo._create_header
- def _create_header(info, format, encoding, errors):
- buf = _old_create_header(info, format, encoding, errors)
- # replace devmajor/devminor with binary zeroes
- buf = buf[:329] + bytes(16) + buf[345:]
- # recompute checksum
- chksum = tarfile.calc_chksums(buf)[0]
- buf = buf[:-364] + bytes("%06o\0" % chksum, "ascii") + buf[-357:]
- return buf
- tarfile.TarInfo._create_header = staticmethod(_create_header)
-
@contextlib.contextmanager
def cd(path):
"""Context manager that restores PWD even if an exception was raised."""