diff --git a/autotools.spec b/autotools.spec index ce799287932..67374b312cf 100644 --- a/autotools.spec +++ b/autotools.spec @@ -6,7 +6,7 @@ %define automake_maj %(echo %{automake_version} | cut -f1,2 -d.) %define libtool_version 2.5.4 %define m4_version 1.4.19 -%define gettext_version 0.22 +%define gettext_version 0.22.5 %define pkgconfig_version 0.29.2 Source0: http://ftp.gnu.org/gnu/autoconf/autoconf-%{autoconf_version}.tar.gz Source1: http://ftp.gnu.org/gnu/automake/automake-%{automake_version}.tar.gz @@ -14,7 +14,7 @@ Source2: http://ftp.gnu.org/gnu/libtool/libtool-%{libtool_version}.tar.gz Source3: http://ftp.gnu.org/gnu/m4/m4-%{m4_version}.tar.gz Source4: http://ftp.gnu.org/gnu/gettext/gettext-%{gettext_version}.tar.gz Source5: http://pkgconfig.freedesktop.org/releases/pkg-config-%{pkgconfig_version}.tar.gz - +BuildRequires: gmake #pkg-config GCC 15 patch Patch0: autotools-pkg-config-gcc15 diff --git a/bazel-absl.patch b/bazel-absl.patch index d020e269a85..1fcc8d9a2d9 100644 --- a/bazel-absl.patch +++ b/bazel-absl.patch @@ -1,25 +1,25 @@ ---- bazel/distdir_deps.bzl.orig 2023-06-12 11:36:07.650810578 +0200 -+++ bazel/distdir_deps.bzl 2023-06-12 11:37:10.490300045 +0200 -@@ -162,17 +162,17 @@ +diff --git a/distdir_deps.bzl b/distdir_deps.bzl +index a3cd93a..f756645 100755 +--- a/distdir_deps.bzl ++++ b/distdir_deps.bzl +@@ -229,16 +229,16 @@ DIST_DEPS = { ], }, "com_google_absl": { -- "archive": "20211102.0.tar.gz", -- "sha256": "dcf71b9cba8dc0ca9940c4b316a0c796be8fab42b070bb6b7cab62b48f0e66c4", -+ "archive": "20230802.3.tar.gz", -+ "sha256": "052d1384266a3da0a4d16b644d7f9c4c2bfec4855720ac988a9407aebc06a3d8", +- "archive": "20230802.0.tar.gz", +- "sha256": "59d2976af9d6ecf001a81a35749a6e551a335b949d34918cfade07737b9d93c5", ++ "archive": "20230802.2.tar.gz", ++ "sha256": "7c11539617af1f332f0854a6fb21e296a1b29c27d03f23c7b49d4adefcd102cc", "urls": [ -- "https://mirror.bazel.build/github.com/abseil/abseil-cpp/archive/refs/tags/20211102.0.tar.gz", -- "https://github.com/abseil/abseil-cpp/archive/refs/tags/20211102.0.tar.gz", -+ "https://mirror.bazel.build/github.com/abseil/abseil-cpp/archive/refs/tags/20230802.3.tar.gz", -+ "https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.3.tar.gz", +- "https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.0.tar.gz", ++ "https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.2.tar.gz", ], "used_in": [ "additional_distfiles", "test_WORKSPACE_files", ], -- "strip_prefix": "abseil-cpp-20211102.0", -+ "strip_prefix": "abseil-cpp-20230802.3", +- "strip_prefix": "abseil-cpp-20230802.0", ++ "strip_prefix": "abseil-cpp-20230802.2", }, "zstd-jni": { - "archive": "v1.5.0-4.zip", + "archive": "v1.5.2-3.zip", diff --git a/bazel-gcc14.patch b/bazel-gcc14.patch index f2f791a3951..4d35f90e450 100644 --- a/bazel-gcc14.patch +++ b/bazel-gcc14.patch @@ -2,11 +2,11 @@ diff --git a/third_party/zlib/BUILD b/third_party/zlib/BUILD index f1aa936..7317aff 100755 --- a/third_party/zlib/BUILD +++ b/third_party/zlib/BUILD -@@ -29,6 +29,7 @@ distrib_cc_library( +@@ -43,6 +43,7 @@ distrib_cc_library( # Use -Dverbose=-1 to turn off zlib's trace logging. (#3280) copts = [ "-w", + "-Wno-error=implicit-function-declaration", "-Dverbose=-1", ], - includes = ["."], + enable_distributions = ["debian"], diff --git a/bazel.spec b/bazel.spec index cf05d5fe360..eb83814179d 100644 --- a/bazel.spec +++ b/bazel.spec @@ -1,4 +1,4 @@ -### RPM external bazel 5.3.0 +### RPM external bazel 6.5.0 ## INCLUDE cpp-standard Source: https://github.com/bazelbuild/bazel/releases/download/%{realversion}/bazel-%{realversion}-dist.zip @@ -31,11 +31,12 @@ Patch2: bazel-gcc14 %build export EXTRA_BAZEL_ARGS="--define=ABSOLUTE_JAVABASE=${JAVA_HOME} --jobs %{compiling_processes}" -export BAZEL_CXXOPTS="-std=c++%{cms_cxx_standard}" +export BAZEL_CXXOPTS="-Wno-error=deprecated:-std=c++%{cms_cxx_standard}" ${JAVA_HOME}/bin/java -version 2>&1 | grep -E -i 'openjdk version "[1-9]' if [ $(${JAVA_HOME}/bin/java -version 2>&1 | grep -E -i 'openjdk version "[1-9]' | sed -E 's|.* "([0-9]+)[.].*|\1|') -ge 17 ] ; then export JNI_FLAGS="--add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED" fi +sed -i '/src\/main\/cpp\/util\/logging.h/a #include ' src/main/cpp/blaze.h bash ./compile.sh %install diff --git a/blackhat.patch b/blackhat.patch new file mode 100644 index 00000000000..429f30b9e90 --- /dev/null +++ b/blackhat.patch @@ -0,0 +1,34 @@ +diff --git a/my_programs/Makefile.am b/my_programs/Makefile.am +index 6fef244..c35abe4 100644 +--- a/my_programs/Makefile.am ++++ b/my_programs/Makefile.am +@@ -65,13 +65,13 @@ LINKER_ARGS += -lmpfr -lgmpxx -lgmp + CXXFLAGS += -DBH_USE_GMP + endif + +-include $(DEPDIR)/*.Po +- + %.o: $(abs_srcdir)/%.cpp + test -f $(DEPDIR)/$*.Po || mkdir -p .deps ; echo "#dummy" > $(DEPDIR)/$*.Po + $(CXX) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(INCLUDE) -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po + ++#include $(DEPDIR)/*.Po ++ + LINKER_FLAGS=$(AM_LDFLAGS) + if GMP_PATH_SET + LINKER_FLAGS += -L$(AM_GMP_PATH) +diff --git a/configure.ac b/configure.ac +index 2099377..6396f8b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1,7 +1,8 @@ + AC_INIT([BlackHat], [0.9.9], [daniel.maitre@durham.ac.uk]) +-AM_INIT_AUTOMAKE([-Wall -Werror foreign]) ++AM_INIT_AUTOMAKE([-Wall foreign]) + AM_DISABLE_STATIC + AC_PROG_CXX ++AM_PROG_AR + AC_CONFIG_MACRO_DIR([m4]) + AC_CONFIG_HEADERS([config.h]) + AC_CHECK_FUNCS([pow log sqrt]) diff --git a/blackhat.spec b/blackhat.spec index 3f691438c8e..31acf0b99c8 100644 --- a/blackhat.spec +++ b/blackhat.spec @@ -3,10 +3,13 @@ %define branch cms/v%{realversion} %define github_user cms-externals Source: git+https://github.com/%{github_user}/%{n}.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz +BuildRequires: autotools Requires: qd python3 +Patch0: blackhat %prep %setup -n %{n}-%{realversion} +%patch0 -p1 sed -i -e 's|else return Cached_OLHA_user_normal|else return new Cached_OLHA_user_normal|' src/cached_OLHA.cpp @@ -17,6 +20,7 @@ rm -f ./config.{sub,guess} chmod +x ./config.{sub,guess} %build +autoreconf -ivf PYTHON=$(which python3) ./configure --prefix=%i \ --with-QDpath=$QD_ROOT \ --enable-pythoninterface=no \ diff --git a/bz2lib.spec b/bz2lib.spec index 0ebbc4bf033..49e7cddcae3 100644 --- a/bz2lib.spec +++ b/bz2lib.spec @@ -1,8 +1,8 @@ -### RPM external bz2lib 1.0.6 -Source: http://www.bzip.org/%{realversion}/bzip2-%{realversion}.tar.gz +### RPM external bz2lib 1.0.8 +Source: https://gitlab.com/bzip2/bzip2/-/archive/bzip2-%{realversion}/bzip2-bzip2-%{realversion}.tar.gz %prep -%setup -n bzip2-%{realversion} +%setup -n bzip2-bzip2-%{realversion} sed -e 's/ -shared/ -dynamiclib/' \ -e 's/ -Wl,-soname -Wl,[^ ]*//' \ -e 's/libbz2\.so/libbz2.dylib/g' \ diff --git a/cmake.spec b/cmake.spec index bbfe38cd5e0..730398c3574 100644 --- a/cmake.spec +++ b/cmake.spec @@ -2,6 +2,7 @@ %define downloaddir %(echo %realversion | cut -d. -f1,2) Source: http://www.cmake.org/files/v%{downloaddir}/%n-%realversion.tar.gz Requires: bz2lib curl expat zlib +BuildRequires: gmake %prep %setup -n cmake-%realversion diff --git a/coral-2_3_21-py312.patch b/coral-2_3_21-py312.patch new file mode 100644 index 00000000000..5d5f600e40b --- /dev/null +++ b/coral-2_3_21-py312.patch @@ -0,0 +1,13 @@ +diff --git a/PyCoral/src/Attribute.cpp b/PyCoral/src/Attribute.cpp +index 7b08bb9..eeda695 100644 +--- a/src/PyCoral/src/Attribute.cpp ++++ b/src/PyCoral/src/Attribute.cpp +@@ -15,7 +15,7 @@ + #define PyString_Check PyUnicode_Check + #define PyString_AsString PyUnicode_AsUTF8 + #define PyString_AS_STRING PyUnicode_AsUTF8 +- #define PyString_GET_SIZE PyUnicode_GET_SIZE ++ #define PyString_GET_SIZE PyUnicode_GET_LENGTH + #endif + + // Ignore 'dereferencing type-punned pointer' warnings caused by diff --git a/coral.spec b/coral.spec index 558ab0311b6..6a8eccff52e 100644 --- a/coral.spec +++ b/coral.spec @@ -5,18 +5,17 @@ Patch0: coral-2_3_20-macosx Patch1: coral-2_3_21-gcc8 +Patch5: coral-2_3_21-py312 Requires: coral-tool-conf %define cvssrc %{n} -# Build with debug symbols, and package them in a separate rpm: -%define subpackageDebug yes - # Disable building tests, since they bring dependency on cppunit: %ifarch darwin %define patchsrc2 perl -p -i -e 's!()!!;' config/BuildFile.xml -%define patchsrc3 %patch0 -p1 +%define patchsrc3 %patch0 -p1 %endif +%define patchsrc5 %patch5 -p1 # Drop Oracle interface on ARM machines and POWER machines. # Oracle does not provide Instant Client for ARMv8 or POWER8. diff --git a/curl.spec b/curl.spec index 4d3d516d833..2e74cb5ade0 100644 --- a/curl.spec +++ b/curl.spec @@ -1,11 +1,7 @@ -%if 0%{?rhel} > 9 -%define curl_version 8.13.0 -%else -%define curl_version 7.79.0 -%endif -### RPM external curl %{curl_version} -Source: https://curl.se/download/%{n}-%{realversion}.tar.gz +### RPM external curl 8.13.0 +Source: http://curl.haxx.se/download/%{n}-%{realversion}.tar.gz Requires: zlib +BuildRequires: gmake %prep %setup -n %{n}-%{realversion} @@ -23,6 +19,7 @@ Requires: zlib --disable-static \ --without-libidn \ --without-zstd \ + --without-libpsl \ --disable-ldap \ --with-zlib=${ZLIB_ROOT} \ --without-nss \ diff --git a/db6.spec b/db6.spec index 26e6efa660b..8a199ce9226 100644 --- a/db6.spec +++ b/db6.spec @@ -1,5 +1,7 @@ ### RPM external db6 6.2.32 Source: http://cmsrep.cern.ch/cmssw/download/db-%{realversion}.tar.gz +BuildRequires: gmake + %define drop_files %{i}/docs %define strip_files %{i}/lib diff --git a/eigen.spec b/eigen.spec index 7831c77008a..5066543fde2 100644 --- a/eigen.spec +++ b/eigen.spec @@ -1,8 +1,8 @@ -### RPM external eigen 3bb6a48d8c171cf20b5f8e48bfb4e424fbd4f79e +### RPM external eigen c1d637433e3b3f9012b226c2c9125c494b470ae6 ## INITENV +PATH PKG_CONFIG_PATH %{i}/share/pkgconfig ## NOCOMPILER ## INCLUDE cpp-standard -%define tag 6c8cca61b173180e2013bd76d33099c665ccb858 +%define tag b25e86af3379e35cd267d337693684dcdbdfd5d1 %define branch cms/master/%{realversion} %define github_user cms-externals Source: git+https://github.com/%{github_user}/eigen-git-mirror.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz diff --git a/expat.spec b/expat.spec index 07dd7923fd4..70287c41b25 100644 --- a/expat.spec +++ b/expat.spec @@ -1,6 +1,7 @@ -### RPM external expat 2.4.8 +### RPM external expat 2.7.1 ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 Source: http://downloads.sourceforge.net/project/%{n}/%{n}/%{realversion}/%{n}-%{realversion}.tar.gz +BuildRequires: gmake %define drop_files %{i}/share diff --git a/flatbuffers-7422.patch b/flatbuffers-7422.patch deleted file mode 100644 index e9952469069..00000000000 --- a/flatbuffers-7422.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- flatbuffers/CMakeLists.txt.orig 2023-05-30 14:34:01.518107275 +0200 -+++ flatbuffers/CMakeLists.txt 2023-05-30 14:35:11.112747553 +0200 -@@ -223,7 +223,7 @@ - "${CMAKE_CXX_FLAGS} -std=c++0x") - endif(CYGWIN) - set(CMAKE_CXX_FLAGS -- "${CMAKE_CXX_FLAGS} -Wall -pedantic -Werror -Wextra -Werror=shadow") -+ "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wno-unknown-warning-option -Werror -Wextra -Werror=shadow -Wno-error=stringop-overflow") - set(FLATBUFFERS_PRIVATE_CXX_FLAGS "-Wold-style-cast") - if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.4) - if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0) diff --git a/flatbuffers.spec b/flatbuffers.spec index d4fe65d1e6f..00404d73be7 100644 --- a/flatbuffers.spec +++ b/flatbuffers.spec @@ -1,19 +1,15 @@ -### RPM external flatbuffers 2.0.6 +### RPM external flatbuffers 24.3.25 ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 - +## INCLUDE cpp-standard %define tag v%{realversion} %define branch master %define github_user google Source: git+https://github.com/%{github_user}/%{n}.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz -Source1: https://patch-diff.githubusercontent.com/raw/google/flatbuffers/pull/7227.diff -Patch0: flatbuffers-7422 BuildRequires: cmake gmake %prep %setup -n %{n}-%{realversion} -%patch0 -p1 -patch -p1 <%{_sourcedir}/7227.diff %build rm -rf ../build @@ -23,6 +19,7 @@ cd ../build cmake ../%{n}-%{realversion} \ -DCMAKE_BUILD_TYPE=Release \ -DFLATBUFFERS_BUILD_CPP17=ON \ + -DFLATBUFFERS_CPP_STD=%{cms_cxx_standard}\ -DFLATBUFFERS_BUILD_SHAREDLIB=ON \ -DFLATBUFFERS_BUILD_TESTS=OFF \ -DCMAKE_INSTALL_PREFIX="%{i}" diff --git a/freetype.spec b/freetype.spec index 9b3526d8a7e..74e6d5e36fd 100644 --- a/freetype.spec +++ b/freetype.spec @@ -1,27 +1,33 @@ -### RPM external freetype 2.10.0 -Source: http://download.savannah.gnu.org/releases/freetype/freetype-%{realversion}.tar.bz2 +### RPM external freetype 2.13.2 +Source: http://download.savannah.gnu.org/releases/freetype/freetype-%{realversion}.tar.gz Requires: bz2lib zlib libpng +BuildRequires: gmake cmake %prep %setup -n %{n}-%{realversion} %build -./configure \ - --prefix %{i} \ - --with-bzip2==${BZ2LIB_ROOT} \ - --with-zlib=${ZLIB_ROOT} \ - --with-png=${LIBPNG_ROOT} \ - --with-harfbuzz=no +rm -rf ../build && mkdir ../build && cd ../build -make %{makeprocesses} +cmake ../%{n}-%{realversion} \ + -DCMAKE_BUILD_TYPE=Release \ + -DFT_DISABLE_HARFBUZZ=TRUE \ + -DFT_REQUIRE_ZLIB=TRUE \ + -DFT_REQUIRE_BZIP2=TRUE \ + -DFT_REQUIRE_PNG=TRUE \ + -DCMAKE_PREFIX_PATH=%{cmake_prefix_path} \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_INSTALL_PREFIX="%{i}" + +make %{makeprocesses} VERBOSE=1 %install +cd ../build make install -%ifos darwin -install_name_tool -id %{i}/lib/libfreetype-cms.dylib -change %{i}/lib/libfreetype.6.dylib %{i}/lib/libfreetype-cms.dylib %{i}/lib/libfreetype.6.dylib -ln -s libfreetype.6.dylib %{i}/lib/libfreetype-cms.dylib -perl -p -i -e 's|-lfreetype|-lfreetype-cms|' %{i}/bin/freetype-config -%endif -# Strip libraries, we are not going to debug them. %define strip_files %{i}/lib +%{relocateConfig}lib/cmake/freetype/freetype-config-release.cmake +%{relocateConfig}lib/cmake/freetype/freetype-config-version.cmake +%{relocateConfig}lib/cmake/freetype/freetype-config.cmake +%{relocateConfig}lib/pkgconfig/freetype2.pc diff --git a/frontier_client.spec b/frontier_client.spec index d4d22351c10..841e3776504 100644 --- a/frontier_client.spec +++ b/frontier_client.spec @@ -3,9 +3,11 @@ Source: http://frontier.cern.ch/dist/frontier_client__%{realversion}__src.tar.gz Requires: expat pacparser zlib +Patch0: frontier_client_py312 %prep %setup -n %{n}__%{realversion}__src +%patch0 -p1 %define makeargs "EXPAT_DIR=${EXPAT_ROOT} PACPARSER_DIR=${PACPARSER_ROOT} COMPILER_TAG=gcc_$(gcc -dumpversion) ZLIB_DIR=${ZLIB_ROOT}" diff --git a/frontier_client_py312.patch b/frontier_client_py312.patch new file mode 100644 index 00000000000..72dd3d934ab --- /dev/null +++ b/frontier_client_py312.patch @@ -0,0 +1,20 @@ +--- ./python/lib/frontier.py.orig 2024-08-21 10:32:39.531373649 +0200 ++++ ./python/lib/frontier.py 2024-08-21 10:33:03.642433236 +0200 +@@ -241,7 +241,7 @@ + if len(variables) != 0: + raise ProgrammingError('Bind variables used, but parameters were not provided.') + +- elif isinstance(parameters, collections.Sequence): ++ elif isinstance(parameters, collections.abc.Sequence): + if len(parameters) != len(variables): + raise ProgrammingError('Different length on parameters (%s) and bind variables list (%s) while using positional parameters.' % (len(parameters), len(variables))) + +@@ -250,7 +250,7 @@ + + final_parameters = parameters + +- elif isinstance(parameters, collections.Mapping): ++ elif isinstance(parameters, collections.abc.Mapping): + for variable in variables: + if isinstance(parameters[variable[1:]],datetime.datetime): + operation = operation.replace(variable,_stringify(parameters[variable[1:]])) diff --git a/gcc-prerequisites.spec b/gcc-prerequisites.spec index f7ae380b373..41bac15da8c 100644 --- a/gcc-prerequisites.spec +++ b/gcc-prerequisites.spec @@ -5,25 +5,26 @@ AutoReqProv: no %define keep_archives true %define gmpVersion 6.3.0 -%define mpfrVersion 4.2.1 +%define mpfrVersion 4.2.2 %define mpcVersion 1.3.1 %define islVersion 0.27 -%define zlibVersion 1.2.13 -%define zstdVersion 1.5.4 +%define zlibVersion 1.3.2 +%define zstdVersion 1.5.7 Source1: https://gmplib.org/download/gmp/gmp-%{gmpVersion}.tar.bz2 Source2: http://www.mpfr.org/mpfr-%{mpfrVersion}/mpfr-%{mpfrVersion}.tar.bz2 Source3: https://ftp.gnu.org/gnu/mpc/mpc-%{mpcVersion}.tar.gz Source4: https://libisl.sourceforge.io/isl-%{islVersion}.tar.bz2 -Source12: http://zlib.net/zlib-%{zlibVersion}.tar.gz +Source12: https://github.com/madler/zlib/archive/refs/tags/v%{zlibVersion}.tar.gz Source13: https://github.com/facebook/zstd/releases/download/v%{zstdVersion}/zstd-%{zstdVersion}.tar.gz Source14: https://github.com/gcc-mirror/gcc/commit/0a1d2ea57722c248777e1130de076e28c443ff8b.diff Source15: https://github.com/gcc-mirror/gcc/commit/77d01927bd7c989d431035251a5c196fe39bcec9.diff + %ifos linux %define bisonVersion 3.8.2 -%define binutilsVersion 2.43.1 -%define elfutilsVersion 0.192 -%define m4Version 1.4.19 +%define binutilsVersion 2.46.0 +%define elfutilsVersion 0.194 +%define m4Version 1.4.20 %define flexVersion 2.6.4 Source7: http://ftp.gnu.org/gnu/bison/bison-%{bisonVersion}.tar.gz Source8: https://sourceware.org/pub/binutils/releases/binutils-%{binutilsVersion}.tar.bz2 @@ -78,7 +79,7 @@ export PATH=%{i}/tmp/sw/bin:$PATH # Build zlib (required for compressed debug information) cd ../zlib-%{zlibVersion} -CONF_FLAGS="-fPIC -O3 -DUSE_MMAP -DUNALIGNED_OK -D_LARGEFILE64_SOURCE=1" +CONF_FLAGS="-fPIC -O3 -DUSE_MMAP -DUNALIGNED_OK -D_LARGEFILE64_SOURCE=1 -D_DEFAULT_SOURCE" %ifarch x86_64 CONF_FLAGS="${CONF_FLAGS} -msse3" %endif @@ -145,7 +146,7 @@ make -C ../zstd-%{zstdVersion}/lib %{makeprocesses} \ CC="$CC" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP" CFLAGS="-I%{i}/include -I%{i}/tmp/sw/include" \ CXXFLAGS="-I%{i}/include -I%{i}/tmp/sw/include" LDFLAGS="-L%{i}/lib -L%{i}/tmp/sw/lib" make %{makeprocesses} - find . -name Makefile -exec perl -p -i -e 's|LN = ln|LN = cp -p|;s|ln ([^-])|cp -p $1|g' {} \; + find . -name Makefile -exec perl -p -i -e 's|LN = ln|LN = cp -p|;s|ln ([^-])|cp -p $1|g' {} \; make install %endif diff --git a/lhapdf.spec b/lhapdf.spec index 947938ce56b..5347615bacf 100644 --- a/lhapdf.spec +++ b/lhapdf.spec @@ -1,4 +1,4 @@ -### RPM external lhapdf 6.4.0 +### RPM external lhapdf 6.5.4 %define setsversion 6.5.1c Source: http://www.hepforge.org/archive/lhapdf/LHAPDF-%{realversion}.tar.gz @@ -18,6 +18,7 @@ PYTHON=$(which python3) \ --enable-python %build +sed -i '/yaml-cpp\/null.h/a #include ' src/yamlcpp/emitterutils.cpp make all %makeprocesses %install @@ -33,7 +34,8 @@ rm -f pdfsets.index cp -f %{_sourcedir}/lhapdf_pdfsetsindex pdfsets.index cd - -# Remove all libtool archives +# Remove all libtool archives and docs +rm -rf %{i}/share/doc find %{i} -name '*.la' -exec rm -f {} \; %post diff --git a/libjpeg-turbo.spec b/libjpeg-turbo.spec index 0cbd9baec89..07c9635a4d4 100644 --- a/libjpeg-turbo.spec +++ b/libjpeg-turbo.spec @@ -1,14 +1,12 @@ -### RPM external libjpeg-turbo 2.0.2 +### RPM external libjpeg-turbo 3.0.4 ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 -%define source0 https://github.com/libjpeg-turbo/libjpeg-turbo/archive/%{realversion}.tar.gz -%define source_prefix %{n}-%{realversion} -Source: %{source0} +Source: https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/%{realversion}.tar.gz BuildRequires: nasm autotools gmake cmake %prep -%setup -n %{source_prefix} +%setup -n %{n}-%{realversion} %build # Update to get AArch64 diff --git a/libpng.spec b/libpng.spec index 54d42d0d078..6126fe5944e 100644 --- a/libpng.spec +++ b/libpng.spec @@ -1,10 +1,7 @@ -### RPM external libpng 1.6.37 -%define tag a40189cf881e9f0db80511c382292a5604c3c3d1 -%define branch cms/v%{realversion} -%define github_user cms-externals -Source: git+https://github.com/%github_user/%{n}.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz +### RPM external libpng 1.6.44 +Source: https://github.com/pnggroup/libpng/archive/refs/tags/v%{realversion}.tar.gz -BuildRequires: autotools +BuildRequires: autotools gmake Requires: zlib %prep diff --git a/libtiff.spec b/libtiff.spec index 831ff6955d6..2fc1faf8dcb 100644 --- a/libtiff.spec +++ b/libtiff.spec @@ -1,18 +1,14 @@ -### RPM external libtiff 4.0.10 -Source: http://download.osgeo.org/libtiff/tiff-%{realversion}.zip +### RPM external libtiff 4.6.0 +Source: https://github.com/libsdl-org/libtiff/archive/refs/tags/v%{realversion}.tar.gz Requires: libjpeg-turbo zlib xz zstd +BuildRequires: autotools gmake %prep -%setup -n tiff-%{realversion} - -# Update to detect aarch64 and ppc64le -rm -f ./config/config.{sub,guess} -%get_config_sub ./config/config.sub -%get_config_guess ./config/config.guess -chmod +x ./config/config.{sub,guess} +%setup -n libtiff-%{realversion} %build +autoreconf -fiv ./configure --prefix=%{i} --disable-static \ --with-zstd-lib-dir=${ZSTD_ROOT}/lib \ --with-zstd-include-dir=${ZSTD_ROOT}/include \ diff --git a/libunwind.spec b/libunwind.spec index 09e32fb9da8..d50970aefb7 100644 --- a/libunwind.spec +++ b/libunwind.spec @@ -24,6 +24,3 @@ make %{makeprocesses} make %{makeprocesses} install [ -d %{i}/lib64 ] && mv %{i}/lib64 %{i}/lib %define drop_files %{i}/share/man %{i}/lib/pkgconfig %{i}/lib/*.a - -%post -%{relocateConfig}libexec/libunwind/test-runner diff --git a/libuuid-2.34-disable-get_uuid_via_daemon.patch b/libuuid-2.40-disable-get_uuid_via_daemon.patch similarity index 91% rename from libuuid-2.34-disable-get_uuid_via_daemon.patch rename to libuuid-2.40-disable-get_uuid_via_daemon.patch index 5998222fce4..4d5cef7486d 100644 --- a/libuuid-2.34-disable-get_uuid_via_daemon.patch +++ b/libuuid-2.40-disable-get_uuid_via_daemon.patch @@ -1,9 +1,9 @@ diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c -index 27c135d..625405a 100644 +index 59e8c23..df585be 100644 --- a/libuuid/src/gen_uuid.c +++ b/libuuid/src/gen_uuid.c -@@ -331,77 +331,12 @@ try_again: - return ret; +@@ -453,77 +453,12 @@ error: + return -1; } -#if defined(HAVE_UUIDD) && defined(HAVE_SYS_UN_H) @@ -78,5 +78,5 @@ index 27c135d..625405a 100644 } -#endif - int __uuid_generate_time(uuid_t out, int *num) + static int __uuid_generate_time_internal(uuid_t out, int *num, uint32_t cont_offset) { diff --git a/libuuid.spec b/libuuid.spec index efe0ced420c..34d0628309a 100644 --- a/libuuid.spec +++ b/libuuid.spec @@ -1,6 +1,7 @@ -### RPM external libuuid 2.34 -Source: http://www.kernel.org/pub/linux/utils/util-linux/v2.34/util-linux-%{realversion}.tar.gz -Patch0: libuuid-2.34-disable-get_uuid_via_daemon +### RPM external libuuid 2.40 +Source: http://www.kernel.org/pub/linux/utils/util-linux/v%{realversion}/util-linux-%{realversion}.tar.gz +Patch0: libuuid-2.40-disable-get_uuid_via_daemon +BuildRequires: gmake %define keep_archives true %prep @@ -34,6 +35,7 @@ Patch0: libuuid-2.34-disable-get_uuid_via_daemon --disable-kill \ --disable-utmpdump \ --disable-rename \ + --disable-liblastlog2 \ --disable-login \ --disable-sulogin \ --disable-su \ diff --git a/lwtnn-assert-fix.patch b/lwtnn-assert-fix.patch new file mode 100644 index 00000000000..e4728e5bc41 --- /dev/null +++ b/lwtnn-assert-fix.patch @@ -0,0 +1,36 @@ +diff --git a/include/lwtnn/generic/Graph.tcc b/include/lwtnn/generic/Graph.tcc +index f0cc614..3af95ce 100644 +--- a/include/lwtnn/generic/Graph.tcc ++++ b/include/lwtnn/generic/Graph.tcc +@@ -7,6 +7,7 @@ + + #include + #include ++#include + + namespace lwt { + namespace generic { +diff --git a/include/lwtnn/generic/Stack.tcc b/include/lwtnn/generic/Stack.tcc +index d54680d..85acd45 100644 +--- a/include/lwtnn/generic/Stack.tcc ++++ b/include/lwtnn/generic/Stack.tcc +@@ -4,6 +4,7 @@ + #include "lwtnn/generic/Stack.hh" + + #include ++#include + + + namespace lwt { +diff --git a/src/lwtnn-test-arbitrary-net.cxx b/src/lwtnn-test-arbitrary-net.cxx +index 7678ac1..7de3018 100644 +--- a/src/lwtnn-test-arbitrary-net.cxx ++++ b/src/lwtnn-test-arbitrary-net.cxx +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + namespace { + int run_on_files(const lwt::JSONConfig& config, diff --git a/lwtnn.spec b/lwtnn.spec index a28a3b405b8..09e606aa5c9 100644 --- a/lwtnn.spec +++ b/lwtnn.spec @@ -5,11 +5,13 @@ Source: https://github.com/lwtnn/lwtnn/archive/v%{realversion}.tar.gz Source99: scram-tools.file/tools/eigen/env +Patch0: lwtnn-assert-fix BuildRequires: ninja cmake Requires: eigen boost %prep %setup -n %{n}-%{realversion} +%patch0 -p1 %build @@ -21,7 +23,7 @@ source %{_sourcedir}/env cmake ../%{n}-%{realversion} \ -G Ninja \ -DCMAKE_CXX_COMPILER="g++" \ - -DCMAKE_CXX_FLAGS="-fPIC $CMS_EIGEN_CXX_FLAGS %{selected_microarch}" \ + -DCMAKE_CXX_FLAGS="-fPIC -DBOOST_DISABLE_ASSERTS $CMS_EIGEN_CXX_FLAGS %{selected_microarch}" \ -DCMAKE_INSTALL_PREFIX:PATH="%{i}" \ -DCMAKE_BUILD_TYPE=Release \ -DBUILTIN_BOOST=OFF \ diff --git a/m4-centos8.patch b/m4-centos8.patch deleted file mode 100644 index c10bcbf6937..00000000000 --- a/m4-centos8.patch +++ /dev/null @@ -1,130 +0,0 @@ -update for glibc libio.h removal in 2.28+ - -see -https://src.fedoraproject.org/rpms/m4/c/814d592134fad36df757f9a61422d164ea2c6c9b?branch=master - -Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=4af4a4a718] -Signed-off-by: Khem Raj - -Index: m4-1.4.18/lib/fflush.c -=================================================================== ---- m4-1.4.18.orig/lib/fflush.c -+++ m4-1.4.18/lib/fflush.c -@@ -33,7 +33,7 @@ - #undef fflush - - --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - - /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */ - static void -@@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp) - - #endif - --#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) -+#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) - - # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT - /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */ -@@ -148,7 +148,7 @@ rpl_fflush (FILE *stream) - if (stream == NULL || ! freading (stream)) - return fflush (stream); - --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - - clear_ungetc_buffer_preserving_position (stream); - -Index: m4-1.4.18/lib/fpending.c -=================================================================== ---- m4-1.4.18.orig/lib/fpending.c -+++ m4-1.4.18/lib/fpending.c -@@ -32,7 +32,7 @@ __fpending (FILE *fp) - /* Most systems provide FILE as a struct and the necessary bitmask in - , because they need it for implementing getc() and putc() as - fast macros. */ --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - return fp->_IO_write_ptr - fp->_IO_write_base; - #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ - /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */ -Index: m4-1.4.18/lib/fpurge.c -=================================================================== ---- m4-1.4.18.orig/lib/fpurge.c -+++ m4-1.4.18/lib/fpurge.c -@@ -62,7 +62,7 @@ fpurge (FILE *fp) - /* Most systems provide FILE as a struct and the necessary bitmask in - , because they need it for implementing getc() and putc() as - fast macros. */ --# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - fp->_IO_read_end = fp->_IO_read_ptr; - fp->_IO_write_ptr = fp->_IO_write_base; - /* Avoid memory leak when there is an active ungetc buffer. */ -Index: m4-1.4.18/lib/freadahead.c -=================================================================== ---- m4-1.4.18.orig/lib/freadahead.c -+++ m4-1.4.18/lib/freadahead.c -@@ -25,7 +25,7 @@ - size_t - freadahead (FILE *fp) - { --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - if (fp->_IO_write_ptr > fp->_IO_write_base) - return 0; - return (fp->_IO_read_end - fp->_IO_read_ptr) -Index: m4-1.4.18/lib/freading.c -=================================================================== ---- m4-1.4.18.orig/lib/freading.c -+++ m4-1.4.18/lib/freading.c -@@ -31,7 +31,7 @@ freading (FILE *fp) - /* Most systems provide FILE as a struct and the necessary bitmask in - , because they need it for implementing getc() and putc() as - fast macros. */ --# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - return ((fp->_flags & _IO_NO_WRITES) != 0 - || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0 - && fp->_IO_read_base != NULL)); -Index: m4-1.4.18/lib/fseeko.c -=================================================================== ---- m4-1.4.18.orig/lib/fseeko.c -+++ m4-1.4.18/lib/fseeko.c -@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int when - #endif - - /* These tests are based on fpurge.c. */ --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - if (fp->_IO_read_end == fp->_IO_read_ptr - && fp->_IO_write_ptr == fp->_IO_write_base - && fp->_IO_save_base == NULL) -@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int when - return -1; - } - --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - fp->_flags &= ~_IO_EOF_SEEN; - fp->_offset = pos; - #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ -Index: m4-1.4.18/lib/stdio-impl.h -=================================================================== ---- m4-1.4.18.orig/lib/stdio-impl.h -+++ m4-1.4.18/lib/stdio-impl.h -@@ -18,6 +18,12 @@ - the same implementation of stdio extension API, except that some fields - have different naming conventions, or their access requires some casts. */ - -+/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this -+ problem by defining it ourselves. FIXME: Do not rely on glibc -+ internals. */ -+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN -+# define _IO_IN_BACKUP 0x100 -+#endif - - /* BSD stdio derived implementations. */ - diff --git a/matplotlib-freetype-slc7.patch b/matplotlib-freetype-slc7.patch new file mode 100644 index 00000000000..0bdcd06f1a6 --- /dev/null +++ b/matplotlib-freetype-slc7.patch @@ -0,0 +1,17 @@ +diff --git a/extern/meson.build b/extern/meson.build +index 662feb7..96ea3ef 100644 +--- a/extern/meson.build ++++ b/extern/meson.build +@@ -8,7 +8,11 @@ subdir('ttconv') + # For FreeType>=2.4, there is a conversion table in docs/VERSIONS.txt in the + # FreeType source tree. + if get_option('system-freetype') +- freetype_dep = dependency('freetype2', version: '>=9.11.3') ++ freetype_dep = dependency('freetype2', version: '>=9.11.3', required: false) ++ if not freetype_dep.found() ++ cc.check_header('freetype/freetype.h', required: true) ++ freetype_dep = cc.find_library('freetype') ++ endif + else + # This is the version of FreeType to use when building a local version. It + # must match the value in `lib/matplotlib.__init__.py`. Also update the docs diff --git a/mplsetup.patch b/mplsetup.patch deleted file mode 100644 index 56a47faa1ca..00000000000 --- a/mplsetup.patch +++ /dev/null @@ -1,5 +0,0 @@ ---- /dev/null 2023-08-09 02:00:04.190000000 +0200 -+++ a/mplsetup.cfg 2024-07-22 10:51:17.964075612 +0200 -@@ -0,0 +1,2 @@ -+[libs] -+system_freetype = True diff --git a/nasm.spec b/nasm.spec index 0922a720508..73c683ef045 100644 --- a/nasm.spec +++ b/nasm.spec @@ -1,5 +1,6 @@ ### RPM external nasm 3.01 Source: https://www.nasm.us/pub/nasm/releasebuilds/%{realversion}/%{n}-%{realversion}.tar.gz +BuildRequires: gmake %prep %setup -n %{n}-%{realversion} diff --git a/numpy-f2py-main.patch b/numpy-f2py-main.patch new file mode 100644 index 00000000000..0405ba971d1 --- /dev/null +++ b/numpy-f2py-main.patch @@ -0,0 +1,17 @@ +diff --git a/numpy/f2py/__init__.py b/numpy/f2py/__init__.py +index e583250f70..750ab35c5c 100644 +--- a/numpy/f2py/__init__.py ++++ b/numpy/f2py/__init__.py +@@ -11,6 +11,12 @@ + __all__ = ['run_main', 'compile', 'get_include'] + + import sys ++while True: ++ if sys.path[0].endswith(".zip"): ++ break ++ temp_path = sys.path.pop(0) ++ sys.path.append(temp_path) ++ + import subprocess + import os + import warnings \ No newline at end of file diff --git a/openloops-py3.patch b/openloops-py3.patch index 391fbbf31bf..8f6fd1e998f 100644 --- a/openloops-py3.patch +++ b/openloops-py3.patch @@ -15,7 +15,7 @@ index 2588bf7..74465b6 100755 fi -+export PYTHON3PATH=${PYTHONPATH} ++export PYTHON3PATH=${PYTHONPATH}:${PYTHON3PATH} if [ -n "$OLPYTHON" ]; then # OLPYTHON is set. Assume it points to a Python executable and use it # both to run Python scripts and SCons. @@ -51,3 +51,20 @@ index c0fe872..1ac6b9b 100755 # # SCons - a Software Constructor # +diff --git a/pyol/tools/OLBaseConfig.py b/pyol/tools/OLBaseConfig.py +index c2bb020a..b41685fd 100644 +--- a/pyol/tools/OLBaseConfig.py ++++ b/pyol/tools/OLBaseConfig.py +@@ -101,10 +101,10 @@ def get_config(args=[]): + (if the same option is given more than once, + only the last set value is used) + """ +- config = configparser.SafeConfigParser() ++ config = configparser.ConfigParser() + # default configuration + with open(os.path.join(prefix, default_config_file), 'r') as fh: +- config.readfp(fh) ++ config.read_file(fh) + # override with user configuration + config.read([os.path.join(prefix, user_config_file)]) + config = dict(config.items('OpenLoops')) diff --git a/openloops.spec b/openloops.spec index c1a191ff195..11b97ad6914 100644 --- a/openloops.spec +++ b/openloops.spec @@ -1,7 +1,7 @@ ## INCLUDE openloops-common ### RPM external openloops %{openloop_version} -BuildRequires: openloops-process +BuildRequires: openloops-process py3-scons Patch0: openloops-py3 %define keep_archives true diff --git a/patchelf.spec b/patchelf.spec index c0452694a9c..c35a1727f00 100644 --- a/patchelf.spec +++ b/patchelf.spec @@ -1,4 +1,4 @@ -### RPM external patchelf 0.13 +### RPM external patchelf 0.18.0 ## NO_AUTO_RUNPATH %define git_branch master diff --git a/pip/blosc2.file b/pip/blosc2.file index e56f85a168b..90d679e85d6 100644 --- a/pip/blosc2.file +++ b/pip/blosc2.file @@ -1,3 +1,3 @@ -Requires: c-blosc2 py3-cython py3-numpy py3-msgpack py3-ndindex py3-py-cpuinfo py3-rich +Requires: c-blosc2 py3-cython py3-numpy py3-msgpack py3-ndindex py3-py-cpuinfo py3-rich py3-numexpr BuildRequires: py3-scikit-build cmake ninja %define PipPreBuild export CMAKE_ARGS="-DUSE_SYSTEM_BLOSC2=1 -DCMAKE_PREFIX_PATH=\"%{cmake_prefix_path}\"" diff --git a/pip/bokeh.file b/pip/bokeh.file index 185df9d69c7..2b60fc29303 100644 --- a/pip/bokeh.file +++ b/pip/bokeh.file @@ -1,3 +1,3 @@ -Requires: py3-typing-extensions -Requires: py3-PyYAML py3-python-dateutil py3-Jinja2 py3-numpy py3-packaging +Requires: py3-PyYAML py3-Jinja2 py3-numpy py3-packaging Requires: py3-tornado py3-numpy py3-pillow +Requires: py3-contourpy py3-pandas py3-xyzservices py3-narwhals \ No newline at end of file diff --git a/pip/keras.file b/pip/keras.file index 6dd53aaf7f3..3968d0f0dc6 100644 --- a/pip/keras.file +++ b/pip/keras.file @@ -1,3 +1,5 @@ +## INITENV SET KERAS_BACKEND tensorflow %define PipDownloadSourceType none Requires: py3-PyYAML py3-six Requires: py3-h5py py3-keras-applications py3-keras-preprocessing +Requires: py3-absl-py py3-ml_dtypes py3-namex py3-optree py3-rich diff --git a/pip/lockfile.file b/pip/lockfile.file new file mode 100644 index 00000000000..b8c31c74ce3 --- /dev/null +++ b/pip/lockfile.file @@ -0,0 +1 @@ +Requires: py3-pbr \ No newline at end of file diff --git a/pip/matplotlib.file b/pip/matplotlib.file index 23672241e6b..c6486757492 100644 --- a/pip/matplotlib.file +++ b/pip/matplotlib.file @@ -1,9 +1,19 @@ -Requires: py3-numpy py3-pillow py3-pybind11 -Patch0: mplsetup +Requires: py3-numpy py3-pillow py3-pybind11 freetype qhull +BuildRequires: cmake ninja +Patch0: matplotlib-freetype-slc7 %define PipPreBuild \ - export CFLAGS="-I${FREETYPE_ROOT}/include/freetype2 -I${LIBPNG_ROOT}/include/libpng16" \ - export LDFLAGS="-L${FREETYPE_ROOT}/lib -L${LIBPNG_ROOT}/lib" \ + export CFLAGS="-I${FREETYPE_ROOT}/include/freetype2 -I${LIBPNG_ROOT}/include/libpng16 -I${QHULL_ROOT}/include" \ + export CXXFLAGS="-I${FREETYPE_ROOT}/include/freetype2 -I${LIBPNG_ROOT}/include/libpng16 -I${QHULL_ROOT}/include" \ + export LDFLAGS="-L${FREETYPE_ROOT}/lib -L${LIBPNG_ROOT}/lib -L${QHULL_ROOT}/lib" \ export PKG_CONFIG=false + +%define PipBuildOptions \\\ + --config-settings=setup-args="-Dsystem-freetype=true" \\\ + --config-settings=setup-args="-Dsystem-qhull=true" \\\ + --config-settings=setup-args="--backend=ninja" \\\ + --config-settings=compile-args="-v" \\\ + --config-settings=compile-args="%{makeprocesses}" + Requires: py3-cycler py3-kiwisolver py3-pyparsing py3-python-dateutil py3-certifi Requires: py3-fonttools py3-packaging Requires: py3-contourpy py3-importlib-resources diff --git a/pip/narwhals.file b/pip/narwhals.file new file mode 100644 index 00000000000..1d4a1de2e99 --- /dev/null +++ b/pip/narwhals.file @@ -0,0 +1 @@ +BuildRequires: py3-hatchling \ No newline at end of file diff --git a/pip/numpy.file b/pip/numpy.file index 8b2badb15df..a9a454b08e3 100644 --- a/pip/numpy.file +++ b/pip/numpy.file @@ -1,6 +1,7 @@ BuildRequires: py3-meson-python Requires: py3-cython Requires: zlib OpenBLAS +Patch0: numpy-f2py-main %define patchsrc \ cat > site.cfg < %{i}/bin/f2py \ + echo "echo \$PYTHONPATH" >> %{i}/bin/f2py \ + echo "python3 -m numpy.f2py \\$*" >> %{i}/bin/f2py \ + chmod +x %{i}/bin/f2py +# ln -s ${numpy_core} %{i}/c-api/core %define PipPostPost \ %{relocateConfig}lib/python*/site-packages/numpy/__config__.py diff --git a/pip/optree.file b/pip/optree.file new file mode 100644 index 00000000000..560f83cd9a6 --- /dev/null +++ b/pip/optree.file @@ -0,0 +1,2 @@ +Requires: py3-typing-extensions +BuildRequires: cmake \ No newline at end of file diff --git a/pip/portpicker.file b/pip/portpicker.file new file mode 100644 index 00000000000..2f072471a16 --- /dev/null +++ b/pip/portpicker.file @@ -0,0 +1 @@ +Requires: py3-psutil \ No newline at end of file diff --git a/pip/requirements.txt b/pip/requirements.txt index eb640456a21..350d8d8824c 100644 --- a/pip/requirements.txt +++ b/pip/requirements.txt @@ -47,12 +47,10 @@ beautifulsoup4==4.14.2 beniget==0.4.2.post1 bleach==6.2.0 blosc==1.11.3 -# NO_AUTO_UPDATE: version >= 2.6.0 needs Python 3.10 -blosc2==2.5.1 -bokeh==3.8.0 +blosc2==2.7.1 +bokeh==3.8.1 boost-histogram==1.6.1 bottle==0.13.4 -# NO_AUTO_UPDATE: version >= 16.0 needs Python 3.10 Bottleneck==1.5.0 braceexpand==0.1.7 build==1.3.0 @@ -69,7 +67,7 @@ clikit==0.6.2 cmsml==0.2.7 #NO_AUTO_UPDATE: Not in PyPi cms-tfaot==1.0.1 -contourpy==1.2.1 +contourpy==1.3.0 correctionlib==2.7.0 cramjam==2.11.0 crashtest==0.4.1 @@ -89,9 +87,7 @@ cppy==1.3.1 cryptography==46.0.3 cx-Oracle==8.3.0 cycler==0.12.1 -# xxNO_AUTO_UPDATE: numpy 1.24.3 doesn't support cython 3.x cython==3.1.6 -# NO_AUTO_UPDATE:2: version >= 2024.8.1 requires Python 3.10+ dask==2024.8.0 dask-awkward==2025.5.0 decorator==5.2.1 @@ -160,24 +156,19 @@ idna==3.11 immutables==0.21 importlib-metadata==8.7.0 importlib-resources==6.5.2 -# NO_AUTO_UPDATE: version >= 2.2.0 requires Python 3.10 iniconfig==2.1.0 installer==0.7.0 ipaddress==1.0.23 -# NO_AUTO_UPDATE: version >= 7.0.0 requires Python 3.10 ipykernel==6.31.0 ipython_genutils==0.2.0 -# NO_AUTO_UPDATE: version >= 8.20.0 requires Python 3.10 -ipython==8.18.1 +ipython==8.27.0 ipywidgets==8.1.7 -# NO_AUTO_UPDATE: version >= 7.0.0 requires Python 3.10 isort==6.1.0 jaraco-classes==3.4.0 jaraco-functools==4.3.0 jaraco-context==6.0.1 -# NO_AUTO_UPDATE:2: version >= 0.4.31 requires Python 3.10+ -jax==0.4.30 -jaxlib==0.4.30 +jax==0.6.1 +jaxlib==0.6.1 jedi==0.19.2 jeepney==0.9.0 Jinja2==3.1.6 @@ -189,7 +180,6 @@ jsonschema==4.25.1 jsonschema-specifications==2025.9.1 jupyter-client==8.6.3 jupyter-console==6.6.3 -# NO_AUTO_UPDATE: version >= 5.9.0 requires Python 3.10 jupyter-core==5.8.1 jupyter-events==0.12.0 jupyter-packaging==0.12.3 @@ -202,18 +192,16 @@ jupyter-server-mathjax==0.2.6 jupyter-server-terminals==0.5.3 jupyterlab==4.4.10 jupyterlab-widgets==3.0.15 -#NO_AUTO_UPDATE: needs newer TF -keras==2.11.0 +keras==3.5.0 keras-applications==1.0.8 keras-preprocessing==1.1.2 keras2onnx==1.7.0 keyring==25.6.0 -# NO_AUTO_UPDATE: version >= 1.4.8 requires Python 3.10+ kiwisolver==1.4.7 law==0.1.20 lazy-object-proxy==1.12.0 +lit==18.1.8 lizard==1.18.0 -#llvmlite==v0.41.0dev0 locket==1.0.0 lockfile==0.12.2 luigi==3.6.0 @@ -243,14 +231,15 @@ mplhep-data==0.0.5 mpmath==1.3.0 msgpack==1.1.2 multidict==6.7.0 +narwhals==2.13.0 +namex==0.0.8 nbclassic==1.3.3 nbclient==0.10.2 nbconvert==7.16.6 nbformat==5.10.4 ndindex==1.10.0 nest-asyncio==1.6.0 -# NO_AUTO_UPDATE: version >= 3.3 requires Python 3.10+ -networkx==3.2.1 +networkx==3.3 neurolab==0.3.5 node-semver==0.9.0 notebook==7.4.7 @@ -267,6 +256,7 @@ onnx==1.17.0 onnxmltools==1.14.0 onnxconverter-common==1.16.0 oauthlib==3.3.1 +optree==0.12.1 opt-einsum==3.4.0 overrides==7.7.0 pkginfo==1.12.1.2 @@ -294,6 +284,7 @@ platformdirs==4.4.0 pluginbase==1.0.1 pluggy==1.6.0 ply==3.11 +portpicker==1.6.0 poetry==2.2.1 poetry-core==2.2.1 poetry-dynamic-versioning==1.9.1 @@ -303,7 +294,7 @@ prometheus-client==0.23.1 prompt_toolkit==3.0.52 propcache==0.4.1 #NO_AUTO_UPDATE:1: Update together with Tensorflow -protobuf==4.21.9 +protobuf==5.28.0 prwlock==0.4.1 psutil==7.1.1 ptyprocess==0.7.0 @@ -376,12 +367,10 @@ scandir==1.10.0 schema==0.7.8 scikit-build==0.18.1 scikit-build-core==0.11.6 -#NO_AUTO_UPDATE: Version >= 1.7.0 requires Python >=3.10 scikit-learn==1.6.1 scinum==2.2.1 -#NO_AUTO_UPDATE: Version >= 1.40 requires Python >=3.10 -scipy==1.13.1 -#NO_AUTO_UPDATE: Version >= 3.4.0 requires Python >=3.10 +scipy==1.14.1 +scons==4.8.1 secretstorage==3.3.3 semantic-version==2.10.0 threadpoolctl==3.6.0 @@ -405,12 +394,12 @@ stack-data==0.6.3 stevedore==5.5.0 subprocess32==3.5.4 sympy==1.14.0 -# NO_AUTO_UPDATE: Needs newer blosc2 -tables==3.9.2 +tables==3.10.1 tabulate==0.9.0 +tblib==1.7.0 tenacity==9.1.2 -#NO_AUTO_UPDATE:1: Force to use tensorflow 2.6.4; this should match the version in tensorflow-sources.spec -tensorflow==2.12.0 +#NO_AUTO_UPDATE:1: Force to use tensorflow 2.17.0; this should match the version in tensorflow-sources.spec +tensorflow==2.17.0 tensorboard==2.20.0 tensorflow-io-gcs-filesystem==0.37.1 tensorflow-estimator==2.15.0 @@ -463,6 +452,7 @@ wrapt==1.14.1 #NO_AUTO_UPDATE: New versions require nvidia-nccl-cu12, which is a binary .whl package xgboost==1.7.5 xxhash==3.6.0 +xyzservices==2025.11.0 yarl==1.22.0 zipp==3.23.0 iminuit==2.31.1 diff --git a/pip/rfc3986-validator.file b/pip/rfc3986-validator.file new file mode 100644 index 00000000000..0eec0a57d3e --- /dev/null +++ b/pip/rfc3986-validator.file @@ -0,0 +1 @@ +BuildRequires: py3-pytest-runner \ No newline at end of file diff --git a/pip/scikit-build-core.file b/pip/scikit-build-core.file index ca192aeb890..bce75927b49 100644 --- a/pip/scikit-build-core.file +++ b/pip/scikit-build-core.file @@ -1,2 +1,2 @@ BuildRequires: py3-hatchling py3-hatch-vcs -Requires: py3-exceptiongroup py3-packaging py3-pathspec py3-tomli +Requires: py3-exceptiongroup py3-packaging py3-pathspec py3-tomli cmake \ No newline at end of file diff --git a/pip/scikit-learn.file b/pip/scikit-learn.file index 90315bcef22..677b2e1e156 100644 --- a/pip/scikit-learn.file +++ b/pip/scikit-learn.file @@ -1,4 +1,5 @@ Requires: py3-scipy py3-joblib py3-threadpoolctl +BuildRequires: py3-meson-python %define PipPreBuild \ export SKLEARN_BUILD_PARALLEL=%{compiling_processes}; \ export CFLAGS="-Wno-error=incompatible-pointer-types" diff --git a/pip/scipy.file b/pip/scipy.file index 491a922d1c2..cb0232e0652 100644 --- a/pip/scipy.file +++ b/pip/scipy.file @@ -6,12 +6,16 @@ AutoProv: no export NPY_NUM_BUILD_JOBS=%{compiling_processes} ;\ export FFLAGS="${FFLAGS_OPT} -fallow-argument-mismatch -fPIC" +Provides: libsf_error_state.so()(64bit) %ifarch aarch64 Provides: python%{cms_python3_major_minor_version}dist(scipy) = %{realversion} Provides: python3dist(scipy) = %{realversion} %define __find_provides true %endif +%define PipPostBuild \ + find %{i} -name 'libsf_error_state*.so*' -exec ls -l {} \\\; + %define PipPostPost \ %{relocateConfig}lib/python*/site-packages/scipy/__config__.py ; \ %{relocateConfig}lib/python*/site-packages/scipy/special/*.pyx diff --git a/pip/tables.file b/pip/tables.file index a34cfd4774e..6553daa74b0 100644 --- a/pip/tables.file +++ b/pip/tables.file @@ -1,6 +1,6 @@ Requires: py3-numexpr py3-six hdf5 bz2lib py3-mock py3-numpy Requires: py3-numexpr py3-six py3-numpy hdf5 bz2lib py3-mock -Requires: py3-blosc2 py3-blosc +Requires: py3-blosc2 py3-blosc py3-typing-extensions Requires: openmpi %define PipPreBuild export CFLAGS="-pthread -I${C_BLOSC2_ROOT}/include -I${C_BLOSC_ROOT}/inlcude -I${BZ2LIB_ROOT}/include"; export LDFLAGS="-L${C_BLOSC2_ROOT}/lib64 -L${C_BLOSC_ROOT}/lib64 -L${BZ2LIB_ROOT}/lib" export HDF5_DIR=${HDF5_ROOT} CC="mpicc"; export DISABLE_AVX2=true ; export BLOSC2_DIR="${C_BLOSC2_ROOT}"; export BLOSC_DIR="${C_BLOSC_ROOT}"; export CMAKE_ARGS="-DCMAKE_PREFIX_PATH='%{cmake_prefix_path}'" %define PipBuildOptions --global-option="--hdf5=${HDF5_ROOT}" --global-option="--bzip2=${BZ2LIB_ROOT}" diff --git a/pip/tensorflow.file b/pip/tensorflow.file index 1fa980c71cd..38c356d2fea 100644 --- a/pip/tensorflow.file +++ b/pip/tensorflow.file @@ -1,6 +1,6 @@ Requires: py3-tensorboard py3-opt-einsum py3-tensorflow-estimator py3-wrapt py3-google-pasta py3-scipy BuildRequires: tensorflow-sources -%define PipPreBuildPy PIPFILE=${TENSORFLOW_SOURCES_ROOT}/tensorflow-%{realversion}-cp%{cms_python3_major_minor}-cp%{cms_python3_major_minor}-linux_%{_arch}.whl +%define PipPreBuildPy PIPFILE=${TENSORFLOW_SOURCES_ROOT}/tensorflow-%{realversion}*-linux_%{_arch}.whl %define PipPostBuild rm -f %{i}/bin/tensorboard* ; ls %{i}/bin/* | xargs -i mv '{}' '{}3' %define PipDepsPost | grep -v libclang ## INCLUDE tensorflow-requires diff --git a/protobuf.spec b/protobuf.spec index f100e675a3b..b5d07546a9e 100644 --- a/protobuf.spec +++ b/protobuf.spec @@ -51,4 +51,6 @@ ninja -v %{makeprocesses} cd ../build ninja -v %{makeprocesses} install +mkdir -p %{i}/include/python/google/protobuf +cp ../%{n}-%{realversion}/python/google/protobuf/*.h %{i}/include/python/google/protobuf/ rm -rf %{i}/lib/pkgconfig diff --git a/py3-scikit-learn.patch b/py3-scikit-learn.patch new file mode 100644 index 00000000000..fe3adf8928a --- /dev/null +++ b/py3-scikit-learn.patch @@ -0,0 +1,11 @@ +diff --git a/sklearn/_build_utils/version.py b/sklearn/_build_utils/version.py +index 49a3cfb82..124c6cc3a 100644 +--- a/sklearn/_build_utils/version.py ++++ b/sklearn/_build_utils/version.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + """Extract version number from __init__.py""" + + import os + diff --git a/python3.spec b/python3.spec index 8cac1aa1ae2..4f3654cfbaf 100644 --- a/python3.spec +++ b/python3.spec @@ -1,4 +1,4 @@ -### RPM external python3 3.9.14 +### RPM external python3 3.12.4 ## INITENV +PATH PATH %{i}/bin ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib ## INITENV SETV PYTHON3_LIB_SITE_PACKAGES lib/python%{pythonv}/site-packages @@ -7,7 +7,7 @@ %define pythonv %(echo %realversion | cut -d. -f 1,2) %define python_major %(echo %realversion | cut -d. -f 1) Requires: expat bz2lib db6 gdbm libffi zlib sqlite xz libuuid - +BuildRequires: gmake Source: https://www.python.org/ftp/python/%realversion/Python-%realversion.tgz %prep diff --git a/python_tools.spec b/python_tools.spec index 2241ea28286..aef4d058660 100644 --- a/python_tools.spec +++ b/python_tools.spec @@ -110,6 +110,7 @@ Requires: py3-python-ldap Requires: py3-plac Requires: py3-matplotlib +Requires: py3-bokeh Requires: py3-numpy Requires: py3-sqlalchemy Requires: py3-pygithub diff --git a/qhull.spec b/qhull.spec new file mode 100644 index 00000000000..8d1da6ec3e0 --- /dev/null +++ b/qhull.spec @@ -0,0 +1,20 @@ +### RPM external qhull 8.0.2 +Source: https://github.com/qhull/qhull/archive/refs/tags/v%{realversion}.tar.gz +BuildRequires: cmake gmake + +%prep +%setup -n %{n}-%{realversion} + +%build +rm -rf ../build; mkdir ../build; cd ../build +cmake ../%{n}-%{realversion} \ + -DBUILD_STATIC_LIBS:BOOL=OFF \ + -DBUILD_SHARED_LIBS:BOOL=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX:STRING=%{i} + +make %{makeprocesses} VERBOSE=1 + +%install +cd ../build +make install \ No newline at end of file diff --git a/scram-tools.file/tools/tensorflow/tensorflow-c.xml b/scram-tools.file/tools/tensorflow/tensorflow-c.xml deleted file mode 100644 index 5542b81d47a..00000000000 --- a/scram-tools.file/tools/tensorflow/tensorflow-c.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/scram-tools.file/tools/tensorflow/tensorflow-executable_run_options.xml b/scram-tools.file/tools/tensorflow/tensorflow-executable_run_options.xml deleted file mode 100644 index ad658773d59..00000000000 --- a/scram-tools.file/tools/tensorflow/tensorflow-executable_run_options.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/scram-tools.file/tools/tensorflow/tensorflow-runtime.xml b/scram-tools.file/tools/tensorflow/tensorflow-runtime.xml deleted file mode 100644 index bfeee102d27..00000000000 --- a/scram-tools.file/tools/tensorflow/tensorflow-runtime.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/scram-tools.file/tools/tensorflow/tensorflow-tf2xla.xml b/scram-tools.file/tools/tensorflow/tensorflow-tf2xla.xml deleted file mode 100644 index 3767fdfbe08..00000000000 --- a/scram-tools.file/tools/tensorflow/tensorflow-tf2xla.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/scram-tools.file/tools/tensorflow/tensorflow-xla_compiled_cpu_function.xml b/scram-tools.file/tools/tensorflow/tensorflow-xla_compiled_cpu_function.xml deleted file mode 100644 index 3f429683b0e..00000000000 --- a/scram-tools.file/tools/tensorflow/tensorflow-xla_compiled_cpu_function.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/scram-tools.file/tools/tensorflow/tensorflow.xml b/scram-tools.file/tools/tensorflow/tensorflow.xml index a26e759fc77..a3221006e87 100644 --- a/scram-tools.file/tools/tensorflow/tensorflow.xml +++ b/scram-tools.file/tools/tensorflow/tensorflow.xml @@ -4,7 +4,7 @@ - + diff --git a/scram-tools.file/tools/tensorflow/vectorized.tmpl b/scram-tools.file/tools/tensorflow/vectorized.tmpl index 61eff04d02e..f2359b6796c 100644 --- a/scram-tools.file/tools/tensorflow/vectorized.tmpl +++ b/scram-tools.file/tools/tensorflow/vectorized.tmpl @@ -1,6 +1,5 @@ - + - diff --git a/sqlite.spec b/sqlite.spec index d48c7ffa627..4e6043e83e6 100644 --- a/sqlite.spec +++ b/sqlite.spec @@ -1,7 +1,7 @@ ### RPM external sqlite 3.48.0 Requires: zlib Source: https://www.sqlite.org/2025/sqlite-autoconf-3480000.tar.gz -Requires: zlib +BuildRequires: gmake %prep %setup -n sqlite-autoconf-3480000 diff --git a/tensorflow-ducc-gcc15.patch b/tensorflow-ducc-gcc15.patch new file mode 100644 index 00000000000..3a592b488d4 --- /dev/null +++ b/tensorflow-ducc-gcc15.patch @@ -0,0 +1,11 @@ +--- a/src/ducc0/infra/mav.h ++++ b/src/ducc0/infra/mav.h +@@ +- template T &operator()(Ns... ns) const ++ template T &operator()(Ns... ns) + { return this->vptr[this->index(ns...)]; } + +@@ +- template T &raw(I i) const ++ template T &raw(I i) + { return this->vptr[i]; } diff --git a/tensorflow-gcc14-aarch64.patch b/tensorflow-gcc14-aarch64.patch deleted file mode 100644 index 43291cbd474..00000000000 --- a/tensorflow-gcc14-aarch64.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/tensorflow/workspace2.bzl b/tensorflow/workspace2.bzl -index e906f65b7ef..4580ceebda8 100644 ---- a/tensorflow/workspace2.bzl -+++ b/tensorflow/workspace2.bzl -@@ -137,6 +137,7 @@ def _tf_repositories(): - name = "XNNPACK", - sha256 = "0a7ad183dcb4db36e82c4c24376a28281c30e986bd2d71311e624405229a7618", - strip_prefix = "XNNPACK-659147817805d17c7be2d60bd7bbca7e780f9c82", -+ patch_file = ["//third_party:XNNPACK-aarch64-gcc14.patch"], - urls = tf_mirror_urls("https://github.com/google/XNNPACK/archive/659147817805d17c7be2d60bd7bbca7e780f9c82.zip"), - ) - # LINT.ThenChange(//tensorflow/lite/tools/cmake/modules/xnnpack.cmake) -diff --git a/third_party/XNNPACK-aarch64-gcc14.patch b/third_party/XNNPACK-aarch64-gcc14.patch -new file mode 100644 -index 00000000000..014e47c44ae ---- /dev/null -+++ b/third_party/XNNPACK-aarch64-gcc14.patch -@@ -0,0 +1,13 @@ -+diff --git a/BUILD.bazel b/BUILD.bazel -+index b2a3b58..3d7f6bc 100755 -+--- a/BUILD.bazel -++++ b/BUILD.bazel -+@@ -3378,7 +3378,7 @@ xnnpack_cc_library( -+ "-mfpu=neon-fp-armv8", -+ ], -+ aarch32_srcs = ["src/amalgam/neonfp16arith.c"], -+- aarch64_copts = ["-march=armv8.2-a+fp16"], -++ aarch64_copts = ["-march=armv8.2-a+fp16", "-Wno-error=incompatible-pointer-types"], -+ aarch64_srcs = [ -+ "src/amalgam/neonfp16arith-aarch64.c", -+ "src/amalgam/neonfp16arith.c", diff --git a/tensorflow-requires.file b/tensorflow-requires.file index 0dfc3c470dd..dbf024122f9 100644 --- a/tensorflow-requires.file +++ b/tensorflow-requires.file @@ -2,8 +2,9 @@ Requires: python3 py3-numpy py3-mock py3-typing-extensions Requires: py3-keras-applications py3-keras-preprocessing py3-future py3-wrapt py3-gast py3-setuptools Requires: py3-cython py3-protobuf py3-astor py3-six py3-termcolor py3-absl-py Requires: py3-opt-einsum py3-flatbuffers -Requires: eigen protobuf zlib libpng libjpeg-turbo curl giflib sqlite grpc flatbuffers py3-pybind11 -BuildRequires: py3-wheel +Requires: py3-psutil py3-lit py3-tblib py3-portpicker +Requires: eigen protobuf zlib libpng libjpeg-turbo curl giflib sqlite grpc flatbuffers py3-pybind11 bazel +BuildRequires: py3-wheel java-env git patchelf %define enable_gpu 0 %{?without_cuda:%define enable_gpu 0} %if %{enable_gpu} diff --git a/tensorflow-sources.file b/tensorflow-sources.file index 098608aafaa..28bc51343e4 100644 --- a/tensorflow-sources.file +++ b/tensorflow-sources.file @@ -1,5 +1,4 @@ ##Tensorflow Common build files -BuildRequires: bazel java-env git #Keep all requires in separate file, so that can be included in py-tensorflow too ## INCLUDE cpp-standard ## INCLUDE tensorflow-requires @@ -14,34 +13,31 @@ BuildRequires: bazel java-env git %endif #Set cms_cxx_standard to 17 as LLVM downloaded by TF does not build with c++20 -%if "%{cms_cxx_standard}" == "20" || "%{cms_cxx_standard}" == "23" +%if "%{cms_cxx_standard}" >= "20" %undefine cms_cxx_standard -%define cms_cxx_standard 17 +%define cms_cxx_standard 20 %endif Source: git+https://github.com/%{github_user}/tensorflow.git?obj=%{branch}/%{tag}&export=tensorflow-%{realversion}&output=/tensorflow-%{realversion}.tgz -#GCC14/Aarch64 Fix: https://github.com/google/XNNPACK/issues/7733 -Patch0: tensorflow-gcc14-aarch64 - %if "%{?build_type:set}" != "set" %define build_type opt %endif -%if "%{?pythonOnly:set}" != "set" -%define pythonOnly no +%if "%{?tfversion:set}" != "set" +%define tfversion %{realversion} %endif -%define majorversion %(echo %realversion | cut -d . -f 1) + +%define majorversion %(echo %tfversion | cut -d . -f 1) %prep %setup -q -n tensorflow-%{realversion} -%patch0 -p1 sed -i -e 's|lib/python[^/]*/site-packages/|lib/python%{cms_python3_major_minor_version}/site-packages/|' third_party/systemlibs/pybind11.BUILD %build -export PYTHON_BIN_PATH="$(which %{python_cmd})" +export PYTHON_BIN_PATH="$(which python3)" export USE_DEFAULT_PYTHON_LIB_PATH=1 export GCC_HOST_COMPILER_PATH="$(which gcc)" export CC_OPT_FLAGS="-Wno-sign-compare" @@ -70,7 +66,7 @@ BAZEL_OPTS="$BAZEL_OPTS --config=noaws --config=nogcp --config=nohdfs --config=n BAZEL_OPTS="$BAZEL_OPTS --define=zendnn=true --define=build_with_mkl_dnn_only=false --define=build_with_mkl=false --define=enable_mkl=false --define=tensorflow_mkldnn_contraction_kernel=0 --define=build_with_mkl_opensource=false" %endif %ifarch ppc64le -BAZEL_OPTS="$BAZEL_OPTS --define=tflite_with_xnnpack=false --define tflite_kernel_use_xnnpack=false" +BAZEL_OPTS="$BAZEL_OPTS --define tflite_with_xnnpack=false" %endif %if %{enable_gpu} @@ -84,6 +80,7 @@ export TF_CUDA_CLANG=0 export cuda=Y %endif export TF_NEED_CUDA=%{enable_gpu} +export TF_NEED_CLANG=0 export TF_NEED_JEMALLOC=0 export TF_NEED_HDFS=0 export TF_NEED_GCP=0 @@ -102,6 +99,7 @@ export TF_DOWNLOAD_CLANG=0 export TF_NEED_IGNITE=0 export TF_NEED_ROCM=0 export TF_NEED_TENSORRT=0 +export TF_PYTHON_VERSION=%{cms_python3_major_minor_version} export TEST_TMPDIR=%{_builddir}/build export TF_CMS_EXTERNALS="%{_builddir}/cms_externals.txt" @@ -110,137 +108,59 @@ echo "libjpeg_turbo:${LIBJPEG_TURBO_ROOT}" >> ${TF_CMS_EXTERNALS} echo "zlib:${ZLIB_ROOT}" >> ${TF_CMS_EXTERNALS} echo "eigen_archive:${EIGEN_ROOT}" >> ${TF_CMS_EXTERNALS} echo "curl:${CURL_ROOT}" >> ${TF_CMS_EXTERNALS} -echo "com_google_protobuf:${PROTOBUF_ROOT}" >> ${TF_CMS_EXTERNALS} +#echo "com_google_protobuf:${PROTOBUF_ROOT}" >> ${TF_CMS_EXTERNALS} echo "com_github_grpc_grpc:${GRPC_ROOT}" >> ${TF_CMS_EXTERNALS} echo "gif:${GIFLIB_ROOT}" >> ${TF_CMS_EXTERNALS} echo "org_sqlite:${SQLITE_ROOT}" >> ${TF_CMS_EXTERNALS} echo "cython:" >> ${TF_CMS_EXTERNALS} echo "flatbuffers:${FLATBUFFERS_ROOT}" >> ${TF_CMS_EXTERNALS} echo "pybind11:${PY3_PYBIND11_ROOT}" >> ${TF_CMS_EXTERNALS} -echo "functools32_archive:" >> ${TF_CMS_EXTERNALS} -echo "astor_archive:" >> ${TF_CMS_EXTERNALS} -echo "six_archive:" >> ${TF_CMS_EXTERNALS} echo "absl_py:${PY3_ABSL_PY_ROOT}" >> ${TF_CMS_EXTERNALS} -echo "termcolor_archive:" >> ${TF_CMS_EXTERNALS} -echo "typing_extensions_archive:" >> ${TF_CMS_EXTERNALS} echo "pasta:" >> ${TF_CMS_EXTERNALS} -echo "wrapt:" >> ${TF_CMS_EXTERNALS} -echo "gast_archive:" >> ${TF_CMS_EXTERNALS} -echo "org_python_pypi_backports_weakref:" >> ${TF_CMS_EXTERNALS} -echo "opt_einsum_archive:" >> ${TF_CMS_EXTERNALS} echo "boringssl:" >> ${TF_CMS_EXTERNALS} export TF_SYSTEM_LIBS=$(cat ${TF_CMS_EXTERNALS} | sed 's|:.*||' | tr "\n" "," | sed 's|,*$||') +echo "pypi_numpy:${PY3_NUMPY_ROOT}" >> ${TF_CMS_EXTERNALS} + +#Create local repos for pypi_* packages required by TF +tf_requirement=requirements_lock_%{cms_python3_major_version}_%{cms_python3_minor_version}.txt +for name in $( grep '^[a-zA-Z].*==' ${tf_requirement} | sed 's| *==.*||;s|-|_|g') ; do + bfile="pypi" + [ -f third_party/cms/${name}.BUILD ] && bfile="${name}" + sed -i -e "s|def repos():|def pypi_${name}():\n cms_new_local_repository(name = \"pypi_${name}\",build_file = \"//third_party/cms:${bfile}.BUILD\")\n\ndef repos():\n pypi_${name}()|" third_party/cms/workspace.bzl +done +rm -f ${tf_requirement}; touch ${tf_requirement} + # clear the build dir and configure if [ -d ../build ] ; then chmod -R u+w ../build rm -rf ../build fi -./configure -#Generate Python wrappers so that we can use PYTHON*PATH env -rm -rf %{_builddir}/cms-pytool ; mkdir %{_builddir}/cms-pytool -echo '#!/bin/bash' > %{_builddir}/cms-pytool/python3 -echo "export PYTHON3PATH=\"${PYTHON3PATH}\"" >> %{_builddir}/cms-pytool/python3 -echo "$(which python3) \"\$@\"" >> %{_builddir}/cms-pytool/python3 - -chmod +x %{_builddir}/cms-pytool/python3 -ln -s python3 %{_builddir}/cms-pytool/python -export PATH=%{_builddir}/cms-pytool:$PATH +export PYTHONPATH=$PYTHON3PATH +./configure +# build numpy first to fix the pypi_numpy repo +bazel $BAZEL_OPTS //third_party/py/numpy +build_dir=$(readlink bazel-out | sed 's|/execroot/org_tensorflow/bazel-out$||') +ln -s ${PYTHON3_LIB_SITE_PACKAGES} ${build_dir}/external/pypi_numpy/site-packages # build tensorflow python targets -bazel $BAZEL_OPTS //tensorflow/tools/pip_package:build_pip_package - -%if "%{pythonOnly}" == "no" -bazel $BAZEL_OPTS //tensorflow:tensorflow -bazel $BAZEL_OPTS //tensorflow:tensorflow_cc -bazel $BAZEL_OPTS //tensorflow/tools/graph_transforms:transform_graph -bazel $BAZEL_OPTS //tensorflow/compiler/tf2xla:tf2xla -bazel $BAZEL_OPTS //tensorflow/compiler/xla:cpu_function_runtime -bazel $BAZEL_OPTS //tensorflow/compiler/xla:executable_run_options -bazel $BAZEL_OPTS //tensorflow/compiler/tf2xla:xla_compiled_cpu_function -#bazel $BAZEL_OPTS //tensorflow/compiler/aot:tfcompile -bazel $BAZEL_OPTS //tensorflow/core/profiler -bazel $BAZEL_OPTS //tensorflow:install_headers -bazel $BAZEL_OPTS //tensorflow/compiler/tf2xla:tf2xla_supported_ops - -# rebuild *.pb.{h|cc} files using the external protobuf compiler -chmod -R a+rwX $PWD/bazel-bin/tensorflow/include -for f in $(find tensorflow -name "*.proto") -do - protoc --cpp_out=$PWD/bazel-bin/tensorflow/include $f -done -%endif +bazel $BAZEL_OPTS //tensorflow/tools/pip_package:wheel %install -%if "%{pythonOnly}" == "no" - -# define and create empty target directories -outdir="$PWD/out" -bindir="$outdir/bin" -incdir="$outdir/include" -libdir="$outdir/lib" -rm -rf $bindir $incdir $libdir -mkdir -p $bindir $incdir $libdir - -# copy targets -srcdir="$PWD/bazel-bin/tensorflow" - -cp -p $srcdir/libtensorflow*.so* $libdir/ -cp -p $srcdir/compiler/tf2xla/lib*.so* $libdir/ -cp -p $srcdir/compiler/xla/lib*.so* $libdir/ - -for l in tensorflow_cc tensorflow_framework tensorflow ; do - # check if the actual lib exists - [ -f $libdir/lib${l}.so.%{realversion} ] || exit 1 - - # link from majorversion to realversion - rm -f $libdir/lib${l}.so.%{majorversion} - ln -s lib${l}.so.%{realversion} $libdir/lib${l}.so.%{majorversion} - - # link from default lib to majorversion - rm -f $libdir/lib${l}.so - ln -s lib${l}.so.%{majorversion} $libdir/lib${l}.so -done - -#cp -p $srcdir/compiler/aot/tfcompile $bindir -cp -p $srcdir/compiler/tf2xla/tf2xla_supported_ops $bindir -for name in tensorflow absl re2 third_party ; do - cp -r -p $srcdir/include/$name $incdir -done - -# copy headers from downloaded dependencies -copy_headers() { - for header_file in $(find $1/$2 -name *.h | sed "s|$1/||") ; do - header_dir="${incdir}/$(dirname ${header_file})" - mkdir -p "${header_dir}" - cp -p "${header_file}" "${header_dir}/" - done -} -copy_headers "$PWD" tensorflow/compiler -copy_headers "$PWD" tensorflow/core/profiler/internal -copy_headers "$PWD" tensorflow/core/profiler/lib -copy_headers "$PWD" tensorflow/core/util/tensor_bundle - -# do not copy the protobuf headers as we use the version in cmsdist -# copy_headers "$PWD/tensorflow/contrib/makefile/downloads/protobuf/src" google - -pushd $outdir - tar cfz %{i}/libtensorflow_cc.tar.gz . -popd - +%ifarch x86_64 +%define bazel_dir k8-%{build_type} +%else +%define bazel_dir %{_arch}-%{build_type} %endif -#FIXME: for some reason farmhash_gpu.h is a broken symlink -optdir=$(ls -d $PWD/bazel-out/*-%{build_type}) -if [ -L ${optdir}/bin/external/farmhash_gpu_archive/_virtual_includes/farmhash_gpu/third_party/farmhash_gpu/src/farmhash_gpu.h ] ; then - if [ ! -e ${optdir}/bin/external/farmhash_gpu_archive/_virtual_includes/farmhash_gpu/third_party/farmhash_gpu/src/farmhash_gpu.h ] ; then - ln -sf ${optdir}/bin/tensorflow/tools/pip_package/build_pip_package.runfiles/org_tensorflow/external/farmhash_gpu_archive/src/farmhash_gpu.h \ - ${optdir}/bin/external/farmhash_gpu_archive/_virtual_includes/farmhash_gpu/third_party/farmhash_gpu/src/farmhash_gpu.h - fi -fi - -# create the wheel file that is installed in py2-tensorflow -bazel-bin/tensorflow/tools/pip_package/build_pip_package %{i} +mkdir %{i}/lib-xla-runtime +find bazel-out/%{bazel_dir}/bin -path '*/pip_package/wheel_house/tensorflow-%{realversion}*.whl' | xargs --no-run-if-empty -i cp '{}' %{i}/ +find bazel-out/%{bazel_dir}/bin -path '*/external/ducc/libfft*.pic.a' | xargs --no-run-if-empty -i cp '{}' %{i}/lib-xla-runtime +find bazel-out/%{bazel_dir}/bin -path '*/external/local_tsl/tsl/*/libmutex.pic.a' | xargs --no-run-if-empty -i cp '{}' %{i}/lib-xla-runtime +find bazel-out/%{bazel_dir}/bin -path '*/external/nsync/libnsync_cpp.pic.a' | xargs --no-run-if-empty -i cp '{}' %{i}/lib-xla-runtime +for lib in libfft.pic.a libfft_wrapper.pic.a libmutex.pic.a libnsync_cpp.pic.a ; do + test -e %{i}/lib-xla-runtime/${lib} +done diff --git a/tensorflow-sources.spec b/tensorflow-sources.spec index 9f0df05e75b..1c82abdc934 100644 --- a/tensorflow-sources.spec +++ b/tensorflow-sources.spec @@ -1,5 +1,5 @@ -### RPM external tensorflow-sources 2.12.0 -%define tag 238001f8031e8f3762abfc89621d3b9fdf03b9e1 +### RPM external tensorflow-sources 2.17.0 +%define tag 4bc8eb2ebed6a8c02a3446f2541b6ed396a95cdf %define branch cms/v%{realversion} %define github_user cms-externals %define python_cmd python3 diff --git a/tensorflow-xla-runtime-absl.patch b/tensorflow-xla-runtime-absl.patch index afc9ec1a1af..f4ba31c5293 100644 --- a/tensorflow-xla-runtime-absl.patch +++ b/tensorflow-xla-runtime-absl.patch @@ -1,5 +1,5 @@ ---- tensorflow/xla_aot_runtime_src/CMakeLists.txt 2024-03-24 08:28:34.000000000 +0100 -+++ tensorflow/xla_aot_runtime_src/CMakeLists.txt 2024-03-25 11:17:58.108587945 +0100 +--- a/xla-aot-runtime/src/CMakeLists.txt 2024-03-24 08:28:34.000000000 +0100 ++++ b/xla-aot-runtime/src/CMakeLists.txt 2024-03-25 11:17:58.108587945 +0100 @@ -14,6 +14,8 @@ -Wno-sign-compare ) diff --git a/tensorflow-xla-runtime.spec b/tensorflow-xla-runtime.spec index 997a492dfb6..d389c089618 100644 --- a/tensorflow-xla-runtime.spec +++ b/tensorflow-xla-runtime.spec @@ -1,35 +1,40 @@ -### RPM external tensorflow-xla-runtime 2.12.0 +### RPM external tensorflow-xla-runtime 2.17.0 ## INCLUDE cpp-standard ## INCLUDE compilation_flags ## INCLUDE microarch_flags Source99: scram-tools.file/tools/eigen/env - Patch0: tensorflow-xla-runtime-absl - -Requires: eigen py3-tensorflow abseil-cpp +Requires: eigen abseil-cpp tensorflow BuildRequires: cmake %prep +case ${TENSORFLOW_VERSION} in + %{realversion}|%{realversion}-*) ;; + * ) echo "ERROR: Mismatch %{n} (%{realversion}) and tensorflow (${TENSORFLOW_VERSION}) versions." + echo "Please update %{n}.spec to use ${TENSORFLOW_VERSION} verison." + exit 1 + ;; +esac -cp -r ${PY3_TENSORFLOW_ROOT}/lib/python%{cms_python3_major_minor_version}/site-packages/tensorflow . -%patch0 -p0 +cp -r ${TENSORFLOW_ROOT}/xla-aot-runtime . +%patch0 -p1 %build -source %{_sourcedir}/env export CPATH="${CPATH}:${EIGEN_ROOT}/include/eigen3" CXXFLAGS="-fPIC -Wl,-z,defs %{arch_build_flags} ${CMS_EIGEN_CXX_FLAGS} %{selected_microarch}" -pushd tensorflow/xla_aot_runtime_src +pushd xla-aot-runtime/src # remove unnecessary implementations that use symbols that are not even existing find . -type f -path '*/service/cpu/runtime_fork_join.cc' | xargs rm -f cmake . \ - -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \ + -DCMAKE_CXX_FLAGS="${CXXFLAGS} -I${TENSORFLOW_ROOT}/include" \ -DCMAKE_CXX_STANDARD=%{cms_cxx_standard} \ -DCMAKE_PREFIX_PATH=${ABSEIL_CPP_ROOT} \ + -DCMAKE_SHARED_LINKER_FLAGS="-L../lib -Wl,--whole-archive -l:libfft_wrapper.pic.a -Wl,--no-whole-archive -l:libfft.pic.a -l:libmutex.pic.a -l:libnsync_cpp.pic.a" \ -DBUILD_SHARED_LIBS=ON make %{makeprocesses} popd @@ -37,4 +42,4 @@ popd %install mkdir -p %{i}/lib -mv tensorflow/xla_aot_runtime_src/libtf_xla_runtime.so %{i}/lib/ +mv xla-aot-runtime/src/libtf_xla_runtime.so %{i}/lib/ diff --git a/tensorflow.spec b/tensorflow.spec index e5bf7d00914..6519577c382 100644 --- a/tensorflow.spec +++ b/tensorflow.spec @@ -1,37 +1,36 @@ -### RPM external tensorflow 2.12.0 +### RPM external tensorflow 2.17.0 %if "%{?vectorized_package:set}" != "set" %define source_package tensorflow-sources %else %define source_package tensorflow-sources_%{vectorized_package} %endif ## INCLUDE tensorflow-requires -BuildRequires: %{source_package} +BuildRequires: %{source_package} py3-wheel +%define tf_major %(echo %realversion | cut -d. -f1) %define tf_root %(echo %{source_package}_ROOT | tr '[a-z-]' '[A-Z_]') -%define tf_version %(echo %{source_package}_VERSION | tr '[a-z-]' '[A-Z_]') -Provides: libtensorflow_cc.so(tensorflow)(64bit) Source: none %prep -case ${%{tf_version}} in - %{realversion}|%{realversion}-*) ;; - * ) echo "ERROR: Mismatch %{n} (%{realversion}) and %{source_package} (${%{tf_version}}) versions." - echo "Please update %{n}.spec to use ${%{tf_version}} verison." - exit 1 - ;; -esac %build %install +mkdir %{i}/lib %{i}/xla-aot-runtime +rm -rf tensorflow-%{realversion} +wheel unpack ${%{tf_root}}/tensorflow-%{realversion}*-cp%{cms_python3_major_minor}-cp%{cms_python3_major_minor}-linux_%{_arch}.whl +mv tensorflow-%{realversion}/tensorflow/include %{i}/include +for l in libtensorflow_cc.so libtensorflow_framework.so ; do + mv tensorflow-%{realversion}/tensorflow/${l}.%{tf_major} %{i}/lib + chmod 0755 %{i}/lib/${l}.%{tf_major} + ln -s ${l}.%{tf_major} %{i}/lib/${l} +done +mv tensorflow-%{realversion}/tensorflow/xla_aot_runtime_src %{i}/xla-aot-runtime/src +cp -r ${%{tf_root}}/lib-xla-runtime %{i}/xla-aot-runtime/lib -tar xfz ${%{tf_root}}/libtensorflow_cc.tar.gz -C %{i} %if %{enable_gpu} mkdir -p %{i}/etc/scram.d cat << \EOF_TOOLFILE >%{i}/etc/scram.d/tf_cuda_support.xml EOF_TOOLFILE -%endif - -%post -%{relocateConfig}lib/lib*.params +%endif \ No newline at end of file diff --git a/tfaot-compile.file b/tfaot-compile.file index c5952a66420..2ed1ea54d1e 100644 --- a/tfaot-compile.file +++ b/tfaot-compile.file @@ -5,7 +5,7 @@ ## (in this case a "Source" should be defined and %{aot_source} is likely %{n}-%{realversion}) BuildRequires: py3-cms-tfaot -Requires: tensorflow-xla-runtime +Requires: tensorflow-xla-runtime py3-tensorflow %ifarch ppc64le %define build_arch powerpc64le-unknown-linux-gnu diff --git a/xrootd.spec b/xrootd.spec index 8e17404cf4b..55e2d32aae0 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -28,6 +28,14 @@ sed -i -e 's|^ *check_library_exists("uuid" "uuid_generate_random".*$|set(_have_ # By default xrootd has fuse, krb5, readline, and crypto enabled. # libfuse is not produced by CMSDIST. +%if 0%{?fedora:1} +%define build_python 1 +%elif 0%{rhel} > 7 +%define build_python 1 +%else +%define build_python 0 +%endif + rm -rf ../build; mkdir ../build; cd ../build cmake ../%n-%{realversion} \ -DCMAKE_INSTALL_PREFIX=%{i} \ @@ -39,11 +47,15 @@ cmake ../%n-%{realversion} \ -DENABLE_KRB5=TRUE \ -DENABLE_READLINE=TRUE \ -DCMAKE_SKIP_RPATH=TRUE \ +%if %{build_python} -DENABLE_PYTHON=TRUE \ - -DENABLE_HTTP=TRUE \ - -DENABLE_XRDEC=TRUE \ -DXRD_PYTHON_REQ_VERSION=3 \ -DPIP_OPTIONS="--verbose" \ +%else + -DENABLE_PYTHON=FALSE \ +%endif + -DENABLE_HTTP=TRUE \ + -DENABLE_XRDEC=TRUE \ -DCMAKE_CXX_FLAGS="-I${LIBUUID_ROOT}/include" \ -DCMAKE_SHARED_LINKER_FLAGS="-L${LIBUUID_ROOT}/lib64" \ -DCMAKE_PREFIX_PATH="%{cmake_prefix_path}" @@ -57,4 +69,4 @@ make install %post %{relocateConfig}bin/xrootd-config -%{relocateConfig}lib64/cmake/XRootD/XRootDConfig.cmake +%{relocateConfig}lib64/cmake/XRootD/XRootDConfig.cmake \ No newline at end of file diff --git a/zlib.spec b/zlib.spec index 2c8a6206569..53b19ff1e0a 100644 --- a/zlib.spec +++ b/zlib.spec @@ -1,15 +1,13 @@ -### RPM external zlib 1.2.13 -%define git_repo madler -%define git_branch master -%define git_commit v%{realversion} -Source0: git://github.com/%{git_repo}/zlib.git?obj=%{git_branch}/%{git_commit}&export=zlib-%{realversion}&output=/zlib-%{realversion}.tgz +### RPM external zlib 1.3.2 +Source: https://github.com/madler/zlib/archive/refs/tags/v%{realversion}.tar.gz +BuildRequires: gmake %prep %setup -n zlib-%{realversion} %build -CONF_FLAGS="-fPIC -O3 -DUSE_MMAP -DUNALIGNED_OK -D_LARGEFILE64_SOURCE=1" +CONF_FLAGS="-fPIC -O3 -DUSE_MMAP -DUNALIGNED_OK -D_LARGEFILE64_SOURCE=1 -D_DEFAULT_SOURCE" CFLAGS="${CONF_FLAGS}" ./configure --prefix=%{i} make %{makeprocesses}