diff --git a/no-parse_makefile.patch b/no-parse_makefile.patch new file mode 100644 index 0000000..e4769df --- /dev/null +++ b/no-parse_makefile.patch @@ -0,0 +1,29 @@ +diff --git a/config/gmakegen.py b/config/gmakegen.py +index c9c476822c5..f58caab4d71 100644 +--- a/config/gmakegen.py ++++ b/config/gmakegen.py +@@ -1,7 +1,6 @@ + #! /usr/bin/python3 -sP + + import os +-from sysconfig import _parse_makefile as parse_makefile + import sys + import logging + sys.path.insert(0, os.path.abspath(os.path.dirname(__file__))) +@@ -36,6 +35,16 @@ def getlangsplit(name): + def stripsplit(line): + return line[len('#requires'):].replace("'","").split() + ++def parse_makefile(fn): ++ out = {} ++ with open(fn) as f: ++ for l in f: ++ print(l[:-1]) ++ if "=" in l: ++ a,b = l.split("=", 1) ++ out[a.strip()] = b.strip() ++ return out ++ + PetscPKGS = 'sys vec mat dm ksp snes ts tao'.split() + # the key is actually the language suffix, it won't work for suffixes such as 'kokkos.cxx' so use an _ and replace the _ as needed with . + LANGS = dict(kokkos_cxx='KOKKOS', hip_cpp='HIP', sycl_cxx='SYCL', raja_cxx='RAJA', c='C', cxx='CXX', cpp='CPP', cu='CU', F='F', F90='F90') diff --git a/no-xdrlib.patch b/no-xdrlib.patch new file mode 100644 index 0000000..87fbec3 --- /dev/null +++ b/no-xdrlib.patch @@ -0,0 +1,48 @@ +diff --git a/config/BuildSystem/RDict.py b/config/BuildSystem/RDict.py +index cc90f3e26c5..d68ab095e06 100755 +--- a/config/BuildSystem/RDict.py ++++ b/config/BuildSystem/RDict.py +@@ -83,7 +83,7 @@ Arg class, which wraps the usual value.''' + def __init__(self, parentAddr = None, parentDirectory = None, load = 1, autoShutdown = 1, readonly = False): + import atexit + import time +- import xdrlib ++ #import xdrlib + + self.logFile = None + self.setupLogFile() +@@ -98,8 +98,8 @@ Arg class, which wraps the usual value.''' + self.isServer = 0 + self.readonly = readonly + self.parentDirectory = parentDirectory +- self.packer = xdrlib.Packer() +- self.unpacker = xdrlib.Unpacker('') ++ #self.packer = xdrlib.Packer() ++ #self.unpacker = xdrlib.Unpacker('') + self.stopCmd = pickle.dumps(('stop',)) + self.writeLogLine('Greetings') + self.connectParent(self.parentAddr, self.parentDirectory) +@@ -116,8 +116,8 @@ Arg class, which wraps the usual value.''' + if 'parent' in d: del d['parent'] + if 'saveTimer' in d: del d['saveTimer'] + if '_setCommandLine' in d: del d['_setCommandLine'] +- del d['packer'] +- del d['unpacker'] ++ #del d['packer'] ++ #del d['unpacker'] + del d['logFile'] + return d + +@@ -126,9 +126,9 @@ Arg class, which wraps the usual value.''' + self.logFile = open('RDict.log', 'a') + self.writeLogLine('Unpickling RDict') + self.__dict__.update(d) +- import xdrlib +- self.packer = xdrlib.Packer() +- self.unpacker = xdrlib.Unpacker('') ++ #import xdrlib ++ #self.packer = xdrlib.Packer() ++ #self.unpacker = xdrlib.Unpacker('') + self.connectParent(self.parentAddr, self.parentDirectory) + return + diff --git a/petsc.spec b/petsc.spec index b83c06c..3d6d84f 100644 --- a/petsc.spec +++ b/petsc.spec @@ -309,6 +309,9 @@ Patch4: %{name}-3.19.4-fix_metis64.patch Patch6: %{name}-3.14.1-fix_pkgconfig_file.patch Patch7: %{name}-3.17.0-avoid_fake_MKL_detection.patch +Patch100: no-xdrlib.patch +Patch101: no-parse_makefile.patch + %if %{with superlu} BuildRequires: SuperLU-devel >= 5.2.0 %endif @@ -587,6 +590,8 @@ done pushd %{name}-%{version} %patch -P 7 -p1 -b .backup +%patch -P 100 -p1 +%patch -P 101 -p1 popd # Remove pregenerated Cython C sources