From 5b24f9e3ea4f7362e90dcc34c8b3a632a3da13e4 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Mon, 14 Oct 2019 18:03:23 +0200 Subject: [PATCH 001/101] Updates for CentOS8 --- PHEDEX-admin.spec | 53 ----- PHEDEX-micro.spec | 82 -------- PHEDEX.spec | 74 ------- autotools.spec | 8 +- bazel.spec | 1 + blackhat.spec | 8 +- boost.spec | 15 -- bootstrap-bundle.spec | 30 +-- bootstrap-driver.spec | 67 +++---- bz2lib.spec | 5 +- cascade.spec | 4 +- ...or-2.1.13.6-fix-memset-in-showqueues.patch | 13 -- castor-2.1.13.6-fix-pthreads-darwin.patch | 88 --------- castor-2.1.13.9-fix-arm-m32-option.patch | 45 ----- castor-2.1.13.9-fix-arm-type-limits.patch | 182 ------------------ castor-2.1.13.9-fix-link-libuuid.patch | 113 ----------- castor-toolfile.spec | 38 ---- castor.spec | 85 -------- classlib-3.1.3-fix-gcc47-cxx11.patch | 12 -- classlib-3.1.3-fix-obsolete-CLK_TCK.patch | 49 ----- classlib-3.1.3-fix-unwind-x86_64.patch | 35 ---- classlib-3.1.3-gcc46.patch | 62 ------ classlib-3.1.3-memset-fix.patch | 13 -- classlib-3.1.3-sl6.patch | 13 -- classlib-toolfile.spec | 8 +- classlib.spec | 42 ++-- cms-common.spec | 4 +- cms_oracleocci_abi_hack-fake-toolfile.spec | 3 +- cms_oracleocci_abi_hack-toolfile.spec | 3 +- cmsos.file | 9 +- cmssw-tool-conf.spec | 30 +-- cmsswdata.spec | 6 - coral-tool-conf.spec | 11 +- coral.spec | 3 +- curl.spec | 2 - das_client.spec | 13 -- data/cmsdist_packages.py | 2 +- davix-toolfile.spec | 1 - davix.spec | 6 +- dbs-schema.spec | 44 ----- distcc.spec | 4 +- doxygen.spec | 10 +- expat.spec | 4 +- fasthadd.spec | 23 --- fastjet.spec | 12 +- fftjet.spec | 4 +- frontier_client-toolfile.spec | 1 - frontier_client.spec | 8 +- fwlite-tool-conf.spec | 12 +- fwlite_python_tools.spec | 2 - gcc.spec | 31 ++- gdbm.spec | 4 +- git.spec | 24 +-- glibc-toolfile.spec | 16 -- glibc.spec | 60 ------ gmake.spec | 4 + graphviz.spec | 8 +- gsl.spec | 4 +- hdf5.spec | 4 +- heppdt.spec | 4 +- herwig.spec | 4 +- lcov.spec | 3 +- libarchive-bootstrap.spec | 6 +- libjpeg-turbo.spec | 4 +- libtiff.spec | 4 +- libungif.spec | 4 +- libuuid.spec | 4 +- llvm.spec | 5 +- lua-bootstrap.spec | 2 +- madgraph5amcatnlo-config.patch | 96 ++++----- madgraph5amcatnlo.spec | 43 ++--- mcfm.spec | 5 +- mctester.spec | 3 +- md5.spec | 3 +- meschach.spec | 3 +- openldap-toolfile.spec | 1 - openldap.spec | 10 +- openssl-bootstrap.spec | 96 --------- openssl-toolfile.spec | 14 +- openssl.spec | 96 --------- p5-dbd-oracle.spec | 31 --- p5-dbi.spec | 42 ---- p5-xml-parser.spec | 74 ------- pcre.spec | 15 +- photospp.spec | 4 +- pip/cryptography.file | 4 +- pip/pycurl.file | 5 +- pip/python-ldap.file | 4 +- pip/requirements.txt | 5 +- pip/testpath.file | 3 +- protobuf.spec | 19 +- py2-dxr.spec | 3 +- py2-pip.spec | 20 +- py2-setuptools.spec | 6 +- pythia6.spec | 4 +- python.spec | 21 +- python3.spec | 30 +-- python_tools.spec | 5 +- qd.spec | 4 +- qt-toolfile.spec | 87 --------- qt.spec | 83 -------- rivet.spec | 4 +- root.spec | 17 +- rpm-preamble.file | 42 ++-- rpm.spec | 58 ++---- scram-project-build.file | 33 +--- sherpa-toolfile.spec | 9 +- sherpa.spec | 15 +- systemtools.spec | 11 +- tauolapp.spec | 4 +- tensorflow-python3-sources.spec | 7 - tensorflow-sources.spec | 7 - thepeg.spec | 4 +- tkonlinesw.spec | 8 +- vdt.spec | 3 +- xerces-c.spec | 4 +- xrootd.spec | 2 - xz-bootstrap.spec | 6 +- zlib-build.file | 27 --- zlib-non-x86_64.spec | 4 - zlib-x86_64.spec | 7 - zlib.spec | 39 ++-- zstd.spec | 4 +- 123 files changed, 387 insertions(+), 2324 deletions(-) delete mode 100644 PHEDEX-admin.spec delete mode 100644 PHEDEX-micro.spec delete mode 100644 PHEDEX.spec delete mode 100644 castor-2.1.13.6-fix-memset-in-showqueues.patch delete mode 100644 castor-2.1.13.6-fix-pthreads-darwin.patch delete mode 100644 castor-2.1.13.9-fix-arm-m32-option.patch delete mode 100644 castor-2.1.13.9-fix-arm-type-limits.patch delete mode 100644 castor-2.1.13.9-fix-link-libuuid.patch delete mode 100644 castor-toolfile.spec delete mode 100644 castor.spec delete mode 100644 classlib-3.1.3-fix-gcc47-cxx11.patch delete mode 100644 classlib-3.1.3-fix-obsolete-CLK_TCK.patch delete mode 100644 classlib-3.1.3-fix-unwind-x86_64.patch delete mode 100644 classlib-3.1.3-gcc46.patch delete mode 100644 classlib-3.1.3-memset-fix.patch delete mode 100644 classlib-3.1.3-sl6.patch delete mode 100644 dbs-schema.spec delete mode 100644 glibc-toolfile.spec delete mode 100644 glibc.spec delete mode 100644 openssl-bootstrap.spec delete mode 100644 openssl.spec delete mode 100644 p5-dbd-oracle.spec delete mode 100644 p5-dbi.spec delete mode 100644 p5-xml-parser.spec delete mode 100644 qt-toolfile.spec delete mode 100644 qt.spec delete mode 100644 zlib-build.file delete mode 100644 zlib-non-x86_64.spec delete mode 100644 zlib-x86_64.spec diff --git a/PHEDEX-admin.spec b/PHEDEX-admin.spec deleted file mode 100644 index 826400a766b..00000000000 --- a/PHEDEX-admin.spec +++ /dev/null @@ -1,53 +0,0 @@ -### RPM cms PHEDEX-admin PHEDEX_3_3_2 - -## INITENV +PATH PERL5LIB %i/perl_lib -%define downloadn %(echo %n | cut -f1 -d-) -Source: cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e&module=%{downloadn}&export=%{downloadn}&&tag=-r%{v}&output=/%{downloadn}.tar.gz -# Oracle libs -Requires: oracle oracle-env -# perl libs -Requires: p5-time-hires p5-text-glob p5-compress-zlib p5-dbi -Requires: p5-dbd-oracle p5-xml-parser p5-poe p5-poe-component-child -Requires: p5-log-log4perl p5-log-dispatch p5-log-dispatch-filerotate -Requires: p5-params-validate p5-monalisa-apmon -# Actually, it is p5-xml-parser that requires this, but it doesn't configure itself correctly -# This is so it gets into our dependencies-setup.sh -Requires: expat - -# Provided by system perl -Provides: perl(HTML::Entities) -Provides: perl(DB_File) -Provides: perl(Date::Manip) -Provides: perl(XML::LibXML) - -%prep -%setup -n %{downloadn} -rm -rf Toolkit/DBS - -%build - -%install -mkdir -p %i/etc -tar -cf - * | (cd %i && tar -xf -) - -# Set permissions -chmod 755 %i/Utilities/* - -# Copy dependencies to dependencies-setup.sh -mkdir -p %i/etc/profile.d -for x in %pkgreqs; do - case $x in /* ) continue ;; esac - p=%{instroot}/%{cmsplatf}/$(echo $x | sed 's/\([^+]*\)+\(.*\)+\([A-Z0-9].*\)/\1 \2 \3/' | tr ' ' '/') - echo ". $p/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh - echo "source $p/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh -done - -# Make "env.sh" = "init.sh" for legacy configs -echo ". %i/etc/profile.d/init.sh" > %i/etc/profile.d/env.sh -echo "source %i/etc/profile.d/init.csh" > %i/etc/profile.d/env.csh - -%post -%{relocateConfig}etc/profile.d/env.sh -%{relocateConfig}etc/profile.d/env.csh -%{relocateConfig}etc/profile.d/dependencies-setup.sh -%{relocateConfig}etc/profile.d/dependencies-setup.csh diff --git a/PHEDEX-micro.spec b/PHEDEX-micro.spec deleted file mode 100644 index 50e9a459e51..00000000000 --- a/PHEDEX-micro.spec +++ /dev/null @@ -1,82 +0,0 @@ -### RPM cms PHEDEX-micro PHEDEX_3_3_2 - -## INITENV +PATH PATH %i/Utilities:%i/Toolkit/DBS:%i/Toolkit/DropBox:%i/Toolkit/Request -## INITENV +PATH PERL5LIB %i/perl_lib -%define downloadn %(echo %n | cut -f1 -d-) -Source: cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e&module=%{downloadn}&export=%{downloadn}&&tag=-r%{v}&output=/%{downloadn}.tar.gz -# Oracle libs -Requires: oracle oracle-env -# perl libs -Requires: p5-time-hires p5-text-glob p5-compress-zlib p5-dbi -Requires: p5-dbd-oracle p5-xml-parser p5-poe p5-poe-component-child -Requires: p5-log-log4perl p5-log-dispatch p5-log-dispatch-filerotate -Requires: p5-params-validate p5-monalisa-apmon -# CMS COMP clients -Requires: dbs-client -# Etc. -Requires: python -# Actually, it is p5-xml-parser that requires this, but it doesn't configure itself correctly -# This is so it gets into our dependencies-setup.sh -Requires: expat - -# Provided by system perl -Provides: perl(HTML::Entities) -Provides: perl(DB_File) -Provides: perl(Date::Manip) -Provides: perl(XML::LibXML) - -%prep - -%setup -n %{downloadn} -rm -rf Custom/Template/* -rm -rf Custom/DCache -rm -rf Custom/Castor -rm -rf Custom/SRM -rm -rf Schema -rm -rf Toolkit/Infrastructure -rm -rf Toolkit/Monitoring -rm -rf Toolkit/Transfer -rm -rf Toolkit/Workflow -rm -rf Toolkit/Verify -rm -rf Toolkit/DropBox -rm -rf Utilities/AgentFactory.pl -rm -rf Utilities/AgentMon.pl -rm -rf Utilities/CMSSWMigrate -rm -rf Utilities/DBDump -rm -rf Utilities/DBLoad -rm -rf Utilities/DropStatus -rm -rf Utilities/FillNames -rm -rf Utilities/GrepSites -rm -rf Utilities/ping-watchdog.pl -rm -rf Utilities/stagercp -rm -rf Utilities/WordMunger -rm -rf Utilities/wrapper_rfcp - -%build - -%install -mkdir -p %i/etc -tar -cf - * | (cd %i && tar -xf -) - -# Set permissions -chmod 755 %i/Toolkit/DBS/* -chmod 755 %i/Utilities/* - -# Copy dependencies to dependencies-setup.sh -mkdir -p %i/etc/profile.d -for x in %pkgreqs; do - case $x in /* ) continue ;; esac - p=%{instroot}/%{cmsplatf}/$(echo $x | sed 's/\([^+]*\)+\(.*\)+\([A-Z0-9].*\)/\1 \2 \3/' | tr ' ' '/') - echo ". $p/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh - echo "source $p/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh -done - -# Make "env.sh" = "init.sh" for legacy configs -echo ". %i/etc/profile.d/init.sh" > %i/etc/profile.d/env.sh -echo "source %i/etc/profile.d/init.csh" > %i/etc/profile.d/env.csh - -%post -%{relocateConfig}etc/profile.d/env.sh -%{relocateConfig}etc/profile.d/env.csh -%{relocateConfig}etc/profile.d/dependencies-setup.sh -%{relocateConfig}etc/profile.d/dependencies-setup.csh diff --git a/PHEDEX.spec b/PHEDEX.spec deleted file mode 100644 index 161dfaf27dd..00000000000 --- a/PHEDEX.spec +++ /dev/null @@ -1,74 +0,0 @@ -### RPM cms PHEDEX PHEDEX_3_3_2 - -## INITENV +PATH PERL5LIB %i/perl_lib -Source: cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e&module=%n&export=%n&&tag=-r%{v}&output=/%n.tar.gz -# Oracle libs -Requires: oracle oracle-env -# perl libs -Requires: p5-time-hires p5-text-glob p5-compress-zlib p5-dbi -Requires: p5-dbd-oracle p5-xml-parser p5-monalisa-apmon p5-poe -Requires: p5-poe-component-child p5-log-log4perl p5-log-dispatch -Requires: p5-log-dispatch-filerotate p5-params-validate -# Actually, it is p5-xml-parser that requires this, but it doesn't configure itself correctly -# This is so it gets into our dependencies-setup.sh -Requires: expat - -# Provided by system perl -Provides: perl(HTML::Entities) -Provides: perl(DB_File) -Provides: perl(Date::Manip) -Provides: perl(XML::LibXML) - -%prep -%setup -n %n -rm -f Custom/Template/Config.Micro -rm -f Custom/Template/ConfigPart.CERN* -rm -f Custom/Template/ConfigPart.Management -rm -rf Schema -rm -rf Toolkit/Infrastructure -rm -rf Toolkit/Monitoring -rm -rf Toolkit/Workflow -rm -rf Toolkit/DBS -rm -f Utilities/CMSSWMigrate -rm -f Utilities/DBDump -rm -f Utilities/DBLoad -rm -f Utilities/DBSCheck -rm -f Utilities/GrepSites -rm -f Utilities/FileDeleteTMDB -rm -f Utilities/LinkNew -rm -f Utilities/LinkRemove -rm -f Utilities/MakeDailyReport -rm -f Utilities/MakeDailyStats -rm -f Utilities/netmon -rm -f Utilities/NodeNew -rm -f Utilities/NodeRemove -rm -f Utilities/RunTest -rm -f Utilities/WordMunger - -%build - -%install -mkdir -p %i/etc -tar -cf - * | (cd %i && tar -xf -) - -# Set permissions -chmod 755 %i/Utilities/* - -# Copy dependencies to dependencies-setup.sh -mkdir -p %i/etc/profile.d -for x in %pkgreqs; do - case $x in /* ) continue ;; esac - p=%{instroot}/%{cmsplatf}/$(echo $x | sed 's/\([^+]*\)+\(.*\)+\([A-Z0-9].*\)/\1 \2 \3/' | tr ' ' '/') - echo ". $p/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh - echo "source $p/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh -done - -# Make "env.sh" = "init.sh" for legacy configs -echo ". %i/etc/profile.d/init.sh" > %i/etc/profile.d/env.sh -echo "source %i/etc/profile.d/init.csh" > %i/etc/profile.d/env.csh - -%post -%{relocateConfig}etc/profile.d/env.sh -%{relocateConfig}etc/profile.d/env.csh -%{relocateConfig}etc/profile.d/dependencies-setup.sh -%{relocateConfig}etc/profile.d/dependencies-setup.csh diff --git a/autotools.spec b/autotools.spec index f9948485e86..f78c609ee4e 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.4.6 %define m4_version 1.4.18 -%define gettext_version 0.19.8.1 +%define gettext_version 0.20.1 %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,19 +14,21 @@ Source2: http://ftp.gnu.org/gnu/libtool/libtool-%{libtool_version}.tar.gz Source3: http://ftp.gnu.org/gnu/m4/m4-%{m4_version}.tar.bz2 Source4: http://ftp.gnu.org/gnu/gettext/gettext-%{gettext_version}.tar.gz Source5: http://pkgconfig.freedesktop.org/releases/pkg-config-%{pkgconfig_version}.tar.gz +Patch0: m4-centos8 %prep %setup -D -T -b 0 -n autoconf-%{autoconf_version} %setup -D -T -b 1 -n automake-%{automake_version} %setup -D -T -b 2 -n libtool-%{libtool_version} %setup -D -T -b 3 -n m4-%{m4_version} +%patch0 -p1 %setup -D -T -b 4 -n gettext-%{gettext_version} %setup -D -T -b 5 -n pkg-config-%{pkgconfig_version} # Update config.{guess,sub} scripts rm -f %{_tmppath}/config.{sub,guess} -curl -L -k -s -o %{_tmppath}/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -curl -L -k -s -o %{_tmppath}/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' +%get_config_guess %{_tmppath}/config.guess +%get_config_sub %{_tmppath}/config.sub for CONFIG_GUESS_FILE in $(find $RPM_BUILD_DIR -name 'config.guess') do rm -f $CONFIG_GUESS_FILE diff --git a/bazel.spec b/bazel.spec index 20bc54975c1..350b3b9f6b2 100644 --- a/bazel.spec +++ b/bazel.spec @@ -8,6 +8,7 @@ BuildRequires: java-env %setup -q -n bazel-%{realversion} sed -i -e 's|^## Release 0.11.1|## Release 0.9.0|' CHANGELOG.md +sed -i -e 's|^\( *\)supports_gold_linker *=.*|\1supports_gold_linker = False|' ./tools/cpp/unix_cc_configure.bzl %build bash ./compile.sh diff --git a/blackhat.spec b/blackhat.spec index fa81310daeb..dc8e029fd71 100644 --- a/blackhat.spec +++ b/blackhat.spec @@ -7,7 +7,7 @@ Patch2: blackhat-no_warnings Patch3: blackhat-0.9.9-default-arg-at-first-decl Patch4: blackhat-0.9.9-gcc600 -Requires: qd python openssl +Requires: qd python %prep %setup -n blackhat-%{realversion} @@ -20,11 +20,11 @@ sed -i -e 's|else return Cached_OLHA_user_normal|else return new Cached_OLHA_use # Update to detect aarch64 and ppc64le rm -f ./config.{sub,guess} -curl -L -k -s -o ./config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +%get_config_sub ./config.sub +%get_config_guess ./config.guess chmod +x ./config.{sub,guess} -./configure --prefix=%i --with-QDpath=$QD_ROOT CXXFLAGS="-Wno-deprecated -I$OPENSSL_ROOT/include" LDFLAGS="-L$OPENSSL_ROOT/lib" +./configure --prefix=%i --with-QDpath=$QD_ROOT CXXFLAGS="-Wno-deprecated" # The following hack insures that the bins with the library linked explicitly # rather than indirectly, as required by the gold linker %build diff --git a/boost.spec b/boost.spec index 1013c07eaad..f163137f8ac 100644 --- a/boost.spec +++ b/boost.spec @@ -73,18 +73,3 @@ for l in $(find %{i}/lib -name "*.${so}.*") do ln -s $(basename ${l}) $(echo ${l} | sed -e "s|[.]${so}[.].*|.${so}|") done - -# Generate dependencies-setup.{sh,csh} so init.{sh,csh} picks full environment. -mkdir -p %{i}/etc/profile.d -: > %{i}/etc/profile.d/dependencies-setup.sh -: > %{i}/etc/profile.d/dependencies-setup.csh -for tool in $(echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'); do - root=$(echo $tool | tr a-z- A-Z_)_ROOT; eval r=\$$root - if [ X"$r" != X ] && [ -r "$r/etc/profile.d/init.sh" ]; then - echo "test X\$$root != X || . $r/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh - echo "test \$?$root != 0 || source $r/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh - fi -done - -%post -%{relocateConfig}etc/profile.d/dependencies-setup.*sh diff --git a/bootstrap-bundle.spec b/bootstrap-bundle.spec index 97f4f280804..82ef4b7b650 100644 --- a/bootstrap-bundle.spec +++ b/bootstrap-bundle.spec @@ -1,29 +1,24 @@ -### RPM external bootstrap-bundle 1.7 +### RPM external bootstrap-bundle 2.0 ## INITENV +PATH PATH %{i}/bin +## INITENV SET MAGIC %{i}/share/misc/magic.mgc ## NOCOMPILER BuildRequires: gcc -BuildRequires: db6-bootstrap lua-bootstrap -BuildRequires: openssl-bootstrap xz-bootstrap libarchive-bootstrap +BuildRequires: db6-bootstrap lua-bootstrap file-bootstrap +BuildRequires: xz-bootstrap libarchive-bootstrap %define keep_archives true -%define is64bit %(case %{cmsplatf} in (*_amd64_*|*_mic_*|*_aarch64_*|*_ppc64le_*|*_ppc64_*) echo 1 ;; (*) echo 0 ;; esac) -%define ismac %(case %{cmsplatf} in (osx*) echo 1 ;; (*) echo 0 ;; esac) +%define libdir lib64 %define soname so -%if %ismac +%ifos darwin %define soname dylib %endif -%define libdir lib -%if %is64bit -%define libdir lib64 -%endif - %prep %build %install -mkdir %{i}/bin %{i}/lib %{i}/include %{i}/share %{i}/tmp +mkdir -p %{i}/bin %{i}/lib %{i}/include %{i}/share %{i}/tmp %{i}/etc/profile.d for tool in `echo %{buildrequiredtools} | tr ' ' '\n' | grep '\-bootstrap$'`; do toolcap=`echo $tool | tr a-z- A-Z_` toolbase=`eval echo \\$${toolcap}_ROOT` @@ -32,15 +27,19 @@ for tool in `echo %{buildrequiredtools} | tr ' ' '\n' | grep '\-bootstrap$'`; do rsync -r --links --ignore-existing ${toolbase}/${sdir}/ %{i}/${sdir}/ done done +mkdir %{i}/share/misc +cp ${FILE_BOOTSTRAP_ROOT}/share/misc/magic.mgc %{i}/share/misc/magic.mgc rm -f %{i}/bin/xml2-config %{i}/lib/xml2Conf.sh #Bundle libstd and libgcc_s and libelf -%if %ismac +%ifos darwin cp -P $GCC_ROOT/lib/lib{stdc++,gcc_s}*.%{soname} %{i}/lib %else cp -P $GCC_ROOT/%{libdir}/lib{stdc++,gcc_s}.%{soname}* %{i}/lib cp -P $GCC_ROOT/lib/libelf.%{soname}* %{i}/lib cp -P $GCC_ROOT/lib/libelf-*.%{soname} %{i}/lib +cp -P $GCC_ROOT/lib/libdw.%{soname}* %{i}/lib +cp -P $GCC_ROOT/lib/libdw-*.%{soname} %{i}/lib %endif find %{i}/bin -type f -writable -exec %{strip} {} \; @@ -56,3 +55,8 @@ mv %{i}/lib/lib{lua,archive}.a %{i}/tmp rm -f %{i}/lib/*.{l,}a mv %{i}/tmp/lib* %{i}/lib/ rm -rf %{i}/tmp + +touch %{i}/etc/profile.d/dependencies-setup.sh %{i}/etc/profile.d/dependencies-setup.csh + +%post +rm -f $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/dependencies-setup.* diff --git a/bootstrap-driver.spec b/bootstrap-driver.spec index 2706001fd71..598b08a4f1b 100644 --- a/bootstrap-driver.spec +++ b/bootstrap-driver.spec @@ -1,6 +1,6 @@ -### RPM external bootstrap-driver 24.0 +### RPM external bootstrap-driver 30.0 ## NOCOMPILER - +Source: cmsos Requires: rpm #danger! cms-common version is now hardwired below (and in bootstrap.file) @@ -8,6 +8,7 @@ Requires: rpm %prep %build %install +cp %{_sourcedir}/cmsos %{i}/ packageList="" echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'` for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'` @@ -27,6 +28,29 @@ done case %cmsplatf in +cc* ) + cc8_amd64_packagesWithProvides="libGL" + cc8_amd64_platformSeeds=" + automake bash bzip2 bzip2-libs bzip2-devel coreutils-single e2fsprogs e2fsprogs-libs + file file-libs fontconfig freetype gcc-c++ git glibc krb5-libs libaio + libcom_err libgomp libICE libidn + libSM libX11 libX11-devel libxcrypt libXcursor libXext + libXext-devel libXft libXft-devel libXi libXinerama + libXmu libXpm libXpm-devel libXrandr libXrender + libglvnd-opengl mesa-libGL mesa-libGLU mesa-libGLU-devel + java-1.8.0-openjdk-devel libtool m4 make + ncurses ncurses-libs nspr nss nss-devel nss-util + openssl openssl-devel openssl-libs + perl perl-interpreter perl-libs + perl-Carp perl-CGI perl-constant perl-Data-Dumper perl-DBI + perl-Digest-MD5 perl-Encode perl-Env perl-Exporter perl-ExtUtils-Embed + perl-File-Path perl-File-Temp perl-Getopt-Long perl-IO perl-libnet + perl-Memoize perl-PathTools perl-Scalar-List-Utils perl-Socket perl-Storable + perl-Term-ANSIColor perl-Test-Harness perl-Text-ParseWords perl-Thread-Queue + perl-Time-HiRes perl-Time-Local perl-YAML + patch popt popt-devel python2 readline rpm-build + rsync tcl tcsh tk wget which zlib zsh" + ;; slc*) # Backward compatible seeds, so that old bootstrap does not suddenly stop working. platformSeeds="glibc glibc-32bit coreutils bash tcsh zsh pdksh perl @@ -218,7 +242,7 @@ case %cmsplatf in ;; # Required to get slc5_amd64_gcc434 work on slc6. - slc* ) + slc*|cc* ) additionalProvides="perl(CGI)" ;; esac @@ -233,48 +257,19 @@ defaultPkgs="cms+cms-common+1.0" mkdir -p %{i}/etc/profile.d (echo "rpm_version=$RPM_VERSION"; \ echo "platformSeeds=\"$platformSeeds\""; \ - echo "unsupportedSeeds=\"$unsupportedSeeds\""; \ - echo "fc18_armv7hl_platformSeeds=\"$fc18_armv7hl_platformSeeds\""; \ - echo "fc19_armv7hl_platformSeeds=\"$fc19_armv7hl_platformSeeds\""; \ - echo "fc19_aarch64_platformSeeds=\"$fc19_aarch64_platformSeeds\""; \ - echo "slc6_amd64_platformSeeds=\"$slc6_amd64_platformSeeds\""; \ - echo "slc7_amd64_platformSeeds=\"$slc7_amd64_platformSeeds\""; \ - echo "slc7_aarch64_platformSeeds=\"$slc7_aarch64_platformSeeds\""; \ - echo "slc7_ppc64le_platformSeeds=\"$slc7_ppc64le_platformSeeds\""; \ - echo "fc22_ppc64le_platformSeeds=\"$fc22_ppc64le_platformSeeds\""; \ - echo "fc22_ppc64_platformSeeds=\"$fc22_ppc64_platformSeeds\""; \ - echo "fc24_amd64_platformSeeds=\"$fc24_amd64_platformSeeds\""; \ - echo "fc24_ppc64le_platformSeeds=\"$fc24_ppc64le_platformSeeds\""; \ - echo "fc24_ppc64_platformSeeds=\"$fc24_ppc64_platformSeeds\""; \ + echo "%{cmsos}_platformSeeds=\"$%{cmsos}_platformSeeds\""; \ + echo "%{cmsos}_packagesWithProvides=\"$%{cmsos}_packagesWithProvides\""; \ echo "packageList=\"`echo $packageList`\""; \ echo "additionalProvides=\"$additionalProvides\""; \ - echo "unsupportedProvides=\"$unsupportedProvides\""; \ echo "defaultPkgs=\"$defaultPkgs\""; \ ) > %{i}/%{cmsplatf}-driver.txt (echo "rpm_version=$RPM_VERSION"; \ echo "platformSeeds=\"$platformSeeds $compPackages\""; \ - echo "unsupportedSeeds=\"$unsupportedSeeds\""; \ - echo "fc18_armv7hl_platformSeeds=\"$fc18_armv7hl_platformSeeds\""; \ - echo "fc19_armv7hl_platformSeeds=\"$fc19_armv7hl_platformSeeds\""; \ - echo "fc19_aarch64_platformSeeds=\"$fc19_aarch64_platformSeeds\""; \ - echo "slc6_amd64_platformSeeds=\"$slc6_amd64_platformSeeds $slc6_compPackages\""; \ - echo "slc7_amd64_platformSeeds=\"$slc7_amd64_platformSeeds\""; \ - echo "slc7_aarch64_platformSeeds=\"$slc7_aarch64_platformSeeds\""; \ - echo "slc7_ppc64le_platformSeeds=\"$slc7_ppc64le_platformSeeds\""; \ - echo "fc22_ppc64le_platformSeeds=\"$fc22_ppc64le_platformSeeds\""; \ - echo "fc22_ppc64_platformSeeds=\"$fc22_ppc64_platformSeeds\""; \ - echo "fc24_amd64_platformSeeds=\"$fc24_amd64_platformSeeds\""; \ - echo "fc24_ppc64le_platformSeeds=\"$fc24_ppc64le_platformSeeds\""; \ - echo "fc24_ppc64_platformSeeds=\"$fc24_ppc64_platformSeeds\""; \ + echo "%{cmsos}_platformSeeds=\"$%{cmsos}_platformSeeds\""; \ + echo "%{cmsos}_packagesWithProvides=\"$%{cmsos}_packagesWithProvides\""; \ echo "packageList=\"`echo $packageList`\""; \ echo "additionalProvides=\"$additionalProvides\""; \ - echo "unsupportedProvides=\"$unsupportedProvides\""; \ echo "defaultPkgs=\"$defaultPkgs\""; \ ) > %{i}/%{cmsplatf}-driver-comp.txt -# FIXME: Hack to make sure that the cms-common package is named correctly in the driver file. -# We should make sure that the $PACKAGE_CATEGORY variable is used (requires changes to cmsBuild.sh which -# I don't want to do at this point. -perl -p -i -e 's|external[+]cms-common|cms+cms-common|g' %{i}/%{cmsplatf}-driver.txt -perl -p -i -e 's|external[+]cms-common|cms+cms-common|g' %{i}/%{cmsplatf}-driver-comp.txt diff --git a/bz2lib.spec b/bz2lib.spec index 8ed91eec3de..d48ccda4a49 100644 --- a/bz2lib.spec +++ b/bz2lib.spec @@ -2,7 +2,6 @@ Source: http://www.bzip.org/%{realversion}/bzip2-%{realversion}.tar.gz %define cpu %(echo "%{cmsplatf}" | cut -f2 -d_) -%define isdarwin %(case %{cmsos} in (osx*) echo 1 ;; (*) echo 0 ;; esac) %prep %setup -n bzip2-%{realversion} @@ -12,7 +11,7 @@ sed -e 's/ -shared/ -dynamiclib/' \ < Makefile-libbz2_so > Makefile-libbz2_dylib %build -%if %isdarwin +%ifarch darwin make %{makeprocesses} -f Makefile-libbz2_dylib %else make %{makeprocesses} -f Makefile-libbz2_so @@ -20,7 +19,7 @@ make %{makeprocesses} -f Makefile-libbz2_so %install make install PREFIX=%{i} -%if %isdarwin +%ifarch darwin %define soname dylib %else %define soname so diff --git a/cascade.spec b/cascade.spec index 4478132f9aa..377b4d03152 100644 --- a/cascade.spec +++ b/cascade.spec @@ -29,8 +29,8 @@ LIBS="-lstdc++ -lz" # Update to detect aarch64 and ppc64le rm -f ./config.{sub,guess} -curl -L -k -s -o ./config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +%get_config_sub ./config.sub +%get_config_guess ./config.guess chmod +x ./config.{sub,guess} ./configure $PLATF_CONFIG_OPTS --with-pythia6=$PYTHIA --with-lhapdf=$LHAPDF --prefix=%i F77="$F77" LIBS="$LIBS" diff --git a/castor-2.1.13.6-fix-memset-in-showqueues.patch b/castor-2.1.13.6-fix-memset-in-showqueues.patch deleted file mode 100644 index 1173192c592..00000000000 --- a/castor-2.1.13.6-fix-memset-in-showqueues.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/vdqm/showqueues.c b/vdqm/showqueues.c -index c816fdb..af8cb0e 100644 ---- a/vdqm/showqueues.c -+++ b/vdqm/showqueues.c -@@ -131,7 +131,7 @@ int main(int argc, char *argv[]) { - do { - if ( tmp == NULL ) - tmp = (struct vdqm_reqlist *)calloc(1,sizeof(struct vdqm_reqlist)); -- memset(tmp,'\0',sizeof(tmp)); -+ memset(tmp,'\0',sizeof(struct vdqm_reqlist)); - strcpy(tmp->volreq.dgn,dgn); - rc = vdqm_NextVol(&nw,&tmp->volreq); - if ( rc != -1 && tmp->volreq.VolReqID > 0 && diff --git a/castor-2.1.13.6-fix-pthreads-darwin.patch b/castor-2.1.13.6-fix-pthreads-darwin.patch deleted file mode 100644 index fc436b7b039..00000000000 --- a/castor-2.1.13.6-fix-pthreads-darwin.patch +++ /dev/null @@ -1,88 +0,0 @@ -diff --git a/castor/common/CastorConfiguration.cpp b/castor/common/CastorConfiguration.cpp -index 6706580..d9968aa 100644 ---- a/castor/common/CastorConfiguration.cpp -+++ b/castor/common/CastorConfiguration.cpp -@@ -53,7 +53,7 @@ castor::common::CastorConfiguration::getConfig(std::string fileName) - // do we have this configuration already in cache ? - if (s_castorConfigs.end() == s_castorConfigs.find(fileName)) { - // no such configuration. Create it -- s_castorConfigs[fileName] = CastorConfiguration(fileName); -+ s_castorConfigs.insert(std::make_pair(fileName, CastorConfiguration(fileName))); - } - // we can now release the lock. Concurrent read only access is ok. - pthread_mutex_unlock(&s_globalConfigLock); -@@ -80,6 +80,20 @@ castor::common::CastorConfiguration::CastorConfiguration(std::string fileName) - } - - //------------------------------------------------------------------------------ -+// copy constructor -+//------------------------------------------------------------------------------ -+castor::common::CastorConfiguration::CastorConfiguration(const CastorConfiguration & other) -+ throw (castor::exception::Exception): m_fileName(other.m_fileName), -+ m_lastUpdateTime(other.m_lastUpdateTime), m_config(other.m_config) { -+ // create a new internal r/w lock -+ int rc = pthread_rwlock_init(&m_lock, NULL); -+ if (0 != rc) { -+ castor::exception::Exception e(rc); -+ throw e; -+ } -+} -+ -+//------------------------------------------------------------------------------ - // destructor - //------------------------------------------------------------------------------ - castor::common::CastorConfiguration::~CastorConfiguration() { -@@ -88,6 +102,23 @@ castor::common::CastorConfiguration::~CastorConfiguration() { - } - - //------------------------------------------------------------------------------ -+// assignment operator -+//------------------------------------------------------------------------------ -+castor::common::CastorConfiguration & castor::common::CastorConfiguration::operator=(const castor::common::CastorConfiguration & other) -+ throw (castor::exception::Exception) { -+ m_fileName = other.m_fileName; -+ m_lastUpdateTime = other.m_lastUpdateTime; -+ m_config = other.m_config; -+ // create a new internal r/w lock -+ int rc = pthread_rwlock_init(&m_lock, NULL); -+ if (0 != rc) { -+ castor::exception::Exception e(rc); -+ throw e; -+ } -+ return *this; -+} -+ -+//------------------------------------------------------------------------------ - // getConfEnt - //------------------------------------------------------------------------------ - const std::string& -diff --git a/castor/common/CastorConfiguration.hpp b/castor/common/CastorConfiguration.hpp -index 6ea9fbe..be9229c 100644 ---- a/castor/common/CastorConfiguration.hpp -+++ b/castor/common/CastorConfiguration.hpp -@@ -67,11 +67,25 @@ namespace castor { - throw (castor::exception::Exception); - - /** -+ * copy constructor -+ * @param other instance of CastorConfiguration class -+ */ -+ CastorConfiguration(const CastorConfiguration & other) -+ throw (castor::exception::Exception); -+ -+ /** - * destrcutor - */ - virtual ~CastorConfiguration(); - - /** -+ * assignment operator -+ * @ param other instance of CastorConfiguration class -+ */ -+ CastorConfiguration & operator=(const CastorConfiguration & other) -+ throw (castor::exception::Exception); -+ -+ /** - * retrieves a configuration entry - * @param category the category of the entry - * @param key the key of the entry diff --git a/castor-2.1.13.9-fix-arm-m32-option.patch b/castor-2.1.13.9-fix-arm-m32-option.patch deleted file mode 100644 index 684ea86dc0d..00000000000 --- a/castor-2.1.13.9-fix-arm-m32-option.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/gridftp2/external/Imakefile b/gridftp2/external/Imakefile -index 049e172..dfccf07 100644 ---- a/gridftp2/external/Imakefile -+++ b/gridftp2/external/Imakefile -@@ -24,7 +24,9 @@ COMM - COMM @author castor-dev@cern.ch - COMM - --MOPTION=-m32 -+ifeq ($(shell uname -m), i386) -+ MOPTION=-m32 -+endif - ifeq ($(shell uname -m), x86_64) - MOPTION=-m64 - endif -diff --git a/gridftp2/internal/Imakefile b/gridftp2/internal/Imakefile -index 4e1378e..30dbdfd 100644 ---- a/gridftp2/internal/Imakefile -+++ b/gridftp2/internal/Imakefile -@@ -24,7 +24,9 @@ COMM - COMM @author castor-dev@cern.ch - COMM - --MOPTION=-m32 -+ifeq ($(shell uname -m), i386) -+ MOPTION=-m32 -+endif - ifeq ($(shell uname -m), x86_64) - MOPTION=-m64 - endif -diff --git a/gridftp2/xroot/Imakefile b/gridftp2/xroot/Imakefile -index d915dcb..29a523d 100644 ---- a/gridftp2/xroot/Imakefile -+++ b/gridftp2/xroot/Imakefile -@@ -24,7 +24,9 @@ COMM - COMM @author castor-dev@cern.ch - COMM - --MOPTION=-m32 -+ifeq ($(shell uname -m), i386) -+ MOPTION=-m32 -+endif - ifeq ($(shell uname -m), x86_64) - MOPTION=-m64 - endif diff --git a/castor-2.1.13.9-fix-arm-type-limits.patch b/castor-2.1.13.9-fix-arm-type-limits.patch deleted file mode 100644 index 1f40ace1776..00000000000 --- a/castor-2.1.13.9-fix-arm-type-limits.patch +++ /dev/null @@ -1,182 +0,0 @@ -diff --git a/castor/server/BaseDaemon.cpp b/castor/server/BaseDaemon.cpp -index 4a213e6..cdf1c60 100644 ---- a/castor/server/BaseDaemon.cpp -+++ b/castor/server/BaseDaemon.cpp -@@ -166,9 +166,9 @@ void castor::server::BaseDaemon::parseCommandLine(int argc, char *argv[]) - Copterr = 0; - Coptreset = 1; - -- char c; -+ int c; - while ((c = Cgetopt_long(argc, argv, (char*)m_cmdLineParams.str().c_str(), longopts, NULL)) != -1) { -- switch (c) { -+ switch ((char)c) { - case 'f': - m_foreground = true; - break; -diff --git a/client/src/stager/stager_client_commandline.cpp b/client/src/stager/stager_client_commandline.cpp -index 0139846..f8919f0 100644 ---- a/client/src/stager/stager_client_commandline.cpp -+++ b/client/src/stager/stager_client_commandline.cpp -@@ -184,8 +184,7 @@ extern "C" { - int parseCmdLine(int argc, char *argv[], int (*callback)(const char *), - char** service_class, char** usertag, int* display_reqid) - { -- int Coptind, Copterr, errflg; -- char c; -+ int Coptind, Copterr, errflg, c; - static struct Coptions longopts[] = - { - {"filename", REQUIRED_ARGUMENT, NULL, 'M'}, -@@ -202,7 +201,7 @@ int parseCmdLine(int argc, char *argv[], int (*callback)(const char *), - errflg = 0; - - while ((c = Cgetopt_long (argc, argv, "f:M:S:U:rh", longopts, NULL)) != -1) { -- switch (c) { -+ switch ((char)c) { - case 'M': - if (0 != callback) { - callback(Coptarg); -diff --git a/client/src/stager/stager_qry.cpp b/client/src/stager/stager_qry.cpp -index e330017..90068a8 100644 ---- a/client/src/stager/stager_qry.cpp -+++ b/client/src/stager/stager_qry.cpp -@@ -324,8 +324,7 @@ void handleDiskPoolQuery(int argc, char *argv[]) { - // ----------------------------------------------------------------------- - int parseCmdLineFileQuery(int argc, char *argv[], - struct cmd_args *args) { -- int nbargs, errflg, getNextMode, i; -- char c; -+ int nbargs, errflg, getNextMode, i, c; - - Coptind = 1; - Copterr = 1; -@@ -335,7 +334,7 @@ int parseCmdLineFileQuery(int argc, char *argv[], - while ((c = Cgetopt_long (argc, argv, - "M:f:E:F:U:r:nS:", - longopts_fileQuery, NULL)) != -1) { -- switch (c) { -+ switch ((char)c) { - case 'M': - args->requests[nbargs].type = BY_FILENAME; - args->requests[nbargs].param = (char *)strdup(Coptarg); -@@ -419,8 +418,7 @@ int parseCmdLineFileQuery(int argc, char *argv[], - int parseCmdLineDiskPoolQuery(int argc, char *argv[], - char** diskPool, char** svcClass, int *siflag, - enum castor::query::DiskPoolQueryType* queryType) { -- int errflg; -- char c; -+ int errflg, c; - - Coptind = 1; - Copterr = 1; -@@ -430,7 +428,7 @@ int parseCmdLineDiskPoolQuery(int argc, char *argv[], - while ((c = Cgetopt_long (argc, argv, - "sd:S:iHat", - longopts_diskPoolQuery, NULL)) != -1) { -- switch (c) { -+ switch ((char)c) { - case 'd': - *diskPool = (char *)strdup(Coptarg); - break; -@@ -465,8 +463,7 @@ int parseCmdLineDiskPoolQuery(int argc, char *argv[], - // ----------------------------------------------------------------------- - int checkAndCountArguments(int argc, char *argv[], - int* count, enum queryType* type) { -- int errflg; -- char c; -+ int errflg, c; - - Coptind = 1; - Copterr = 1; -@@ -475,7 +472,7 @@ int checkAndCountArguments(int argc, char *argv[], - *type = FILEQUERY; - while ((c = Cgetopt_long - (argc, argv, "M:f:F:U:r:nhsd:S:iHat", longopts, NULL)) != -1) { -- switch (c) { -+ switch ((char)c) { - case 'M': - case 'F': - case 'U': -diff --git a/client/src/stager/stager_rm.c b/client/src/stager/stager_rm.c -index 162ef3f..16d2831 100644 ---- a/client/src/stager/stager_rm.c -+++ b/client/src/stager/stager_rm.c -@@ -98,8 +98,7 @@ int cmd_parse(int argc, - struct stage_filereq **reqs, - int* nbreqs, - struct stage_options* opts) { -- int nbfiles, Coptind, Copterr, errflg; -- char c; -+ int nbfiles, Coptind, Copterr, errflg, c; - - /* Counting the number of HSM files */ - if ((*nbreqs = cmd_countHsmFiles(argc, argv)) < 0) { -@@ -118,7 +117,7 @@ int cmd_parse(int argc, - nbfiles = 0; - while ((c = Cgetopt_long - (argc, argv, "M:f:S:ha", longopts, NULL)) != -1) { -- switch (c) { -+ switch ((char)c) { - case 'M': - (*reqs)[nbfiles].filename = Coptarg; - nbfiles++; -@@ -169,15 +168,14 @@ int cmd_parse(int argc, - * or -1 if an error occured - */ - int cmd_countHsmFiles(int argc, char *argv[]) { -- int Coptind, Copterr, errflg, nbargs; -- char c; -+ int Coptind, Copterr, errflg, nbargs, c; - - Coptind = 1; - Copterr = 1; - errflg = 0; - nbargs = 0; - while ((c = Cgetopt_long (argc, argv, "S:M:f:ha", longopts, NULL)) != -1) { -- switch (c) { -+ switch ((char)c) { - case 'M': - nbargs++;; - break; -diff --git a/client/src/stager/stager_setFileGCWeight.c b/client/src/stager/stager_setFileGCWeight.c -index 6063fe4..3d97371 100644 ---- a/client/src/stager/stager_setFileGCWeight.c -+++ b/client/src/stager/stager_setFileGCWeight.c -@@ -95,8 +95,7 @@ int cmd_parse(int argc, - char *argv[], - struct stage_filereq **reqs, - int* nbreqs, char **service_class, float *weight) { -- int nbfiles, Coptind, Copterr, errflg; -- char c; -+ int nbfiles, Coptind, Copterr, errflg, c; - - /* Counting the number of HSM files */ - if ((*nbreqs = cmd_countHsmFiles(argc, argv)) < 0) { -@@ -115,7 +114,7 @@ int cmd_parse(int argc, - nbfiles = 0; - while ((c = Cgetopt_long - (argc, argv, "M:S:h", longopts, NULL)) != -1) { -- switch (c) { -+ switch ((char)c) { - case 'M': - (*reqs)[nbfiles].filename = Coptarg; - nbfiles++; -@@ -153,15 +152,14 @@ int cmd_parse(int argc, - * or -1 if an error occured - */ - int cmd_countHsmFiles(int argc, char *argv[]) { -- int Coptind, Copterr, errflg, nbargs; -- char c; -+ int Coptind, Copterr, errflg, nbargs, c; - - Coptind = 1; - Copterr = 1; - errflg = 0; - nbargs = 0; - while ((c = Cgetopt_long (argc, argv, "M:S:h", longopts, NULL)) != -1) { -- switch (c) { -+ switch ((char)c) { - case 'M': - nbargs++;; - break; diff --git a/castor-2.1.13.9-fix-link-libuuid.patch b/castor-2.1.13.9-fix-link-libuuid.patch deleted file mode 100644 index 837538cf1b7..00000000000 --- a/castor-2.1.13.9-fix-link-libuuid.patch +++ /dev/null @@ -1,113 +0,0 @@ -diff --git a/client/src/stager/Imakefile b/client/src/stager/Imakefile -index 4fc670f..bc73c63 100644 ---- a/client/src/stager/Imakefile -+++ b/client/src/stager/Imakefile -@@ -3,6 +3,8 @@ COMM @(#)Imakefile,v 1.52 2005/11/25 14:27:22 CERN IT-ADC/CA Jean-Damien Durand - COMM - COMM Make stager clients. - -+AddLdFlags(UUIDLIBNAME) -+ - CPPFLAGS += -DSTAGEMAP=StageMapFile - AddLdFlags(-lstdc++) - -diff --git a/common/Imakefile b/common/Imakefile -index 95b8ec7..6c975aa 100644 ---- a/common/Imakefile -+++ b/common/Imakefile -@@ -7,7 +7,7 @@ COMM - COMM Make common routines library - - CPPFLAGS += -DPATH_CONFIG=CastorConfigFile -DLOCALHOSTSFILE=LocalHostsList -DMAPPING_FILE=MappingFile -DRTHOSTSFILE=RemoteHostsList -DADMIN_HOSTS=AdminHosts --AddLdFlags(-l UUIDLIBNAME -lstdc++) -+AddLdFlags(UUIDLIBNAME -lstdc++) - - COMMONLIB_OBJS = $(SYSDEP_OBJS) \ - compat.o getacct.o getacctent.o getconfent.o \ -diff --git a/config/apple.cf b/config/apple.cf -index a5af00d..bc5cafd 100644 ---- a/config/apple.cf -+++ b/config/apple.cf -@@ -10,5 +10,5 @@ COMM Default rules for Make APPLE - #define SONAMELINKEROPTION -install_name - #define DYLIBLINKEROPTION -dynamiclib - #define NOUNDEFLINKEROPTION --#define UUIDLIBNAME System -+#define UUIDLIBNAME -lSystem - LDFLAGS += -Wl,-current_version,$(subst .,,$(MAJOR_CASTOR_VERSION)).$(MINOR_CASTOR_VERSION) -diff --git a/config/linux.cf b/config/linux.cf -index c65765b..088ac33 100644 ---- a/config/linux.cf -+++ b/config/linux.cf -@@ -12,5 +12,5 @@ COMM Default rules for Make Linux - #define SONAMELINKEROPTION -soname - #define DYLIBLINKEROPTION -shared - #define NOUNDEFLINKEROPTION -Wl,-no-undefined --#define UUIDLIBNAME uuid -+#define UUIDLIBNAME -luuid - LDFLAGS += -Wl,--defsym,CastorVersion_v$(MAJOR_CASTOR_VERSION).$(MINOR_CASTOR_VERSION)=0 -diff --git a/ns/Imakefile b/ns/Imakefile -index 5244545..49ebd01 100644 ---- a/ns/Imakefile -+++ b/ns/Imakefile -@@ -7,7 +7,7 @@ COMM @(#)Imakefile,v 1.51 2004/06/09 16:10:35 CERN IT-PDP/DM Jean-Philippe - COMM Make name server programs. - - NSLIB = DepSharedLibraryTargetName(ns,castorns) --AddLdFlags(-l UUIDLIBNAME) -+AddLdFlags(UUIDLIBNAME) - - #if UseGSI - NSLIBCSEC += -lcrypto -diff --git a/rfio/Imakefile b/rfio/Imakefile -index 7a73008..152d10b 100644 ---- a/rfio/Imakefile -+++ b/rfio/Imakefile -@@ -11,6 +11,8 @@ COMM Define the file indicating that no more RFIO requests - COMM should be issued. - COMM - -+AddLdFlags(UUIDLIBNAME) -+ - CPPFLAGS += -DSACCT -DNOMORERFIO=RfioNoMore -DRFIOLOGFILE=RfioLogFile \ - -DCNS_ROOT=NsRoot $(STAGERSUPERUSER) $(STAGERSUPERGROUP) - CFLAGS += -DUSE_XFSPREALLOC -diff --git a/upv/Imakefile b/upv/Imakefile -index f922502..ba8055d 100644 ---- a/upv/Imakefile -+++ b/upv/Imakefile -@@ -6,6 +6,8 @@ COMM @(#)Imakefile,v 1.3 2005/01/23 08:49:33 CERN IT-PDP/DM Ben Couturier - - COMM Make UPV programs. - -+AddLdFlags(UUIDLIBNAME) -+ - #if BuildSecureCupv - CPPFLAGS += -DUPVCSEC - #endif -diff --git a/vdqm/Imakefile b/vdqm/Imakefile -index ec1c611..3c3a37e 100644 ---- a/vdqm/Imakefile -+++ b/vdqm/Imakefile -@@ -23,6 +23,8 @@ COMM Makefile for the VDQM API library and client - COMM - COMM @author Castor Dev team, castor-dev@cern.ch - -+AddLdFlags(UUIDLIBNAME) -+ - #if BuildSecureVdqm - CPPFLAGS += -DVDQMCSEC - LDLIBS += -ldl -diff --git a/vmgr/Imakefile b/vmgr/Imakefile -index e620887..8266215 100644 ---- a/vmgr/Imakefile -+++ b/vmgr/Imakefile -@@ -5,6 +5,8 @@ COMM - - COMM Make volume manager programs. - -+AddLdFlags(UUIDLIBNAME) -+ - #if BuildSecureVmgr - CPPFLAGS += -DVMGRCSEC - AddLdFlags(-ldl) diff --git a/castor-toolfile.spec b/castor-toolfile.spec deleted file mode 100644 index 774340f9c01..00000000000 --- a/castor-toolfile.spec +++ /dev/null @@ -1,38 +0,0 @@ -### RPM external castor-toolfile 2.0 -Requires: castor -%prep - -%build - -%install - -mkdir -p %i/etc/scram.d -cat << \EOF_TOOLFILE >%i/etc/scram.d/castor_header.xml - - - - - - - - - - -EOF_TOOLFILE -cat << \EOF_TOOLFILE >%i/etc/scram.d/castor.xml - - - - - - - - - - - - - -EOF_TOOLFILE - -## IMPORT scram-tools-post diff --git a/castor.spec b/castor.spec deleted file mode 100644 index bbfb699e937..00000000000 --- a/castor.spec +++ /dev/null @@ -1,85 +0,0 @@ -### RPM external castor 2.1.13.9 -# Override default realversion since they have a "-" in the realversion -%define online %(case %cmsplatf in (*onl_*_*) echo true;; (*) echo false;; esac) - -%define realversion 2.1.13-6 -%define downloadv v%(echo %realversion | tr - _ | tr . _) -%define baseVersion %(echo %realversion | cut -d- -f1) -%define patchLevel %(echo %realversion | cut -d- -f2) - -%define isamd64 %(case %{cmsplatf} in (*amd64*) echo 1 ;; (*) echo 0 ;; esac) -%define isdarwin %(case %{cmsos} in (osx*) echo 1 ;; (*) echo 0 ;; esac) - -%if %isamd64 -%define libsuffix ()(64bit) -%else -%define libsuffix %nil -%endif - -Source: http://castorold.web.cern.ch/castorold/DIST/CERN/savannah/CASTOR.pkg/%{baseVersion}-*/%{realversion}/castor-%{realversion}.tar.gz - -Patch0: castor-2.1.13.6-fix-pthreads-darwin -Patch1: castor-2.1.13.6-fix-memset-in-showqueues -Patch2: castor-2.1.13.9-fix-arm-m32-option -Patch3: castor-2.1.13.9-fix-arm-type-limits -Patch4: castor-2.1.13.9-fix-link-libuuid - -Requires: libuuid - -# Ugly kludge : forces libshift.x.y to be in the provides (rpm only puts libshift.so.x) -# root rpm require .x.y -Provides: libshift.so.%(echo %realversion |cut -d. -f1,2)%{libsuffix} - -%prep -%setup -n castor-%{baseVersion} -%if %isdarwin -%patch0 -p1 -%endif -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 - -perl -pi -e "s|-Werror|-Werror -Wno-error=unused-but-set-variable|" config/Imake.tmpl -perl -pi -e "s|--no-undefined||" config/Imake.rules - -%build - -# make sure the version gets properly set up as otherwise it's "unknown" to the server -# to check: " %i/bin/castor -v " should give back the version -perl -pi -e "s/\ \ __MAJORVERSION__/%(echo %realversion | cut -d. -f1)/" h/patchlevel.h -perl -pi -e "s/\ \ __MINORVERSION__/%(echo %realversion | cut -d. -f2)/" h/patchlevel.h -perl -pi -e "s/\ \ __MAJORRELEASE__/%(echo %realversion | cut -d. -f3 | cut -d- -f 1 )/" h/patchlevel.h -perl -pi -e "s/\ \ __MINORRELEASE__/%(echo %realversion | cut -d- -f2)/" h/patchlevel.h -perl -p -i -e "s!__PATCHLEVEL__!%patchLevel!;s!__BASEVERSION__!\"%baseVersion\"!;s!__TIMESTAMP__!%(date +%%s)!" h/patchlevel.h - -mkdir -p %i/bin %i/lib %i/etc/sysconfig - -find . -type f -exec touch {} \; - -CASTOR_NOSTK=yes; export CASTOR_NOSTK -./configure -LDFLAGS="-L${LIBUUID_ROOT}/lib64" CXXFLAGS="-I${LIBUUID_ROOT}/include" make %{makeprocesses} client -%install -make installclient \ - MAJOR_CASTOR_VERSION=%(echo %realversion | cut -d. -f1-2) \ - MINOR_CASTOR_VERSION=%(echo %realversion | cut -d. -f3-4 | tr '-' '.' ) \ - EXPORTLIB=/ \ - DESTDIR=%i \ - PREFIX= \ - CONFIGDIR=etc \ - FILMANDIR=usr/share/man/man4 \ - LIBMANDIR=usr/share/man/man3 \ - MANDIR=usr/share/man/man1 \ - LIBDIR=lib \ - BINDIR=bin \ - LIB=lib \ - BIN=bin \ - DESTDIRCASTOR=include/shift \ - TOPINCLUDE=include - -rm -rf %i/bin -mv %i/usr/bin %i/bin - -# Strip libraries, we are not going to debug them. -%define strip_files %i/lib diff --git a/classlib-3.1.3-fix-gcc47-cxx11.patch b/classlib-3.1.3-fix-gcc47-cxx11.patch deleted file mode 100644 index 973ae525240..00000000000 --- a/classlib-3.1.3-fix-gcc47-cxx11.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/classlib/utils/SearchPath.h b/classlib/utils/SearchPath.h -index dacde50..61dd780 100644 ---- a/classlib/utils/SearchPath.h -+++ b/classlib/utils/SearchPath.h -@@ -22,6 +22,7 @@ public: - typedef DirList::const_reverse_iterator const_reverse_iterator; - - typedef DirList::size_type size_type; -+ typedef DirList::value_type value_type; - typedef DirList::reference reference; - typedef DirList::const_reference const_reference; - diff --git a/classlib-3.1.3-fix-obsolete-CLK_TCK.patch b/classlib-3.1.3-fix-obsolete-CLK_TCK.patch deleted file mode 100644 index 5a75a52ec81..00000000000 --- a/classlib-3.1.3-fix-obsolete-CLK_TCK.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff --git a/src/utils/TimeInfo.cpp b/src/utils/TimeInfo.cpp -index 1c29859..92ed42a 100644 ---- a/src/utils/TimeInfo.cpp -+++ b/src/utils/TimeInfo.cpp -@@ -1,3 +1,4 @@ -+#include - - #include "classlib/utils/TimeInfo.h" - #include "classlib/utils/DebugAids.h" -@@ -295,7 +296,7 @@ TimeInfo::init (void) - if (pstat_getprocessor (&psp, sizeof(psp), 1, 0) != -1) - { - s_features |= FEATURE_EXACT_MHZ; -- s_ghz = psp.psp_iticksperclktick * sysconf(_SC_CLK_TCK) * 1e-9; -+ s_ghz = psp.psp_iticksperclktick * (__clock_t)sysconf(_SC_CLK_TCK) * 1e-9; - s_hiResFactor = 1e9 / s_ghz; - } - } -@@ -378,7 +379,7 @@ TimeInfo::time (void) - struct timespec now; clock_gettime (CLOCK_MONOTONIC, &now); - return (now.tv_sec * 1e9) + now.tv_nsec; - #elif _POSIX_VERSION > 0 -- struct tms now; return times (&now) * (1e9 / CLK_TCK); -+ struct tms now; return times (&now) * (1e9 / (__clock_t)sysconf(_SC_CLK_TCK)); - #else - // Do not use process-relative time: we probably can't measure real - // time anyway (only user + system), and even if we can, we'll end -@@ -426,7 +427,7 @@ TimeInfo::resolution (void) - struct timespec res; clock_getres (CLOCK_MONOTONIC, &res); - return (res.tv_sec * 1e9) + res.tv_nsec; - #elif _POSIX_VERSION > 0 -- return 1e9 / CLK_TCK; -+ return 1e9 / (__clock_t)sysconf(_SC_CLK_TCK); - #else - return 1e9 / CLOCKS_PER_SEC; - #endif -@@ -843,9 +844,9 @@ TimeInfo::processTimes (NanoSecs &user, NanoSecs &system, NanoSecs &real) - // - // Note that on linux and hp-ux s_clockBase is precise. Other - // systems resort to estimated real time based on call to init. -- struct tms now; real = times (&now) * (1e9 / CLK_TCK); -- user = now.tms_utime * (1e9/CLK_TCK); -- system = now.tms_stime * (1e9/CLK_TCK); -+ struct tms now; real = times (&now) * (1e9 / (__clock_t)sysconf(_SC_CLK_TCK)); -+ user = now.tms_utime * (1e9/(__clock_t)sysconf(_SC_CLK_TCK)); -+ system = now.tms_stime * (1e9/(__clock_t)sysconf(_SC_CLK_TCK)); - real -= s_clockBase; - #elif _WIN32 - // Real time will be based on an estimate from call to init; the diff --git a/classlib-3.1.3-fix-unwind-x86_64.patch b/classlib-3.1.3-fix-unwind-x86_64.patch deleted file mode 100644 index 36f1ee7a77e..00000000000 --- a/classlib-3.1.3-fix-unwind-x86_64.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/src/utils/DebugAids.cpp b/src/utils/DebugAids.cpp -index 894c8a0..f014b1b 100644 ---- a/src/utils/DebugAids.cpp -+++ b/src/utils/DebugAids.cpp -@@ -83,7 +83,7 @@ GetLogicalAddress (PVOID addr, PTSTR name, DWORD length, - } - #endif - --#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) // FIXME: Check -+#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) && defined(__x86_64__) // FIXME: Check - extern "C" { - typedef unsigned _Unwind_Ptr __attribute__((__mode__(__pointer__))); - struct _Unwind_Context; -@@ -168,7 +168,7 @@ unwindWalkStack (_Unwind_Context *ctx, void *data) - writev (fd, bufs, nbufs); - return _URC_NO_REASON; - } --#endif // GCC 3.4+ -+#endif // (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) && defined(__x86_64__) - - - #if __hpux -@@ -868,10 +868,10 @@ DebugAids::stacktrace (IOFD fd /* = IOFD_INVALID */) - sprintf (buffer, PSTACK_COMMAND, (unsigned long) getpid (), fd); - system (buffer); - --#elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -+#elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) && defined(__x86_64__) - // FIXME: Check for _Unwind*, compilers other than GCC support this API - _Unwind_Backtrace (unwindWalkStack, &fd); --#endif -+#endif // (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) && defined(__x86_64__) - - // FIXME: mpatrol has some generic unix unwind code. - // FIXME: from unix faq: ask debugger to dump stack trace diff --git a/classlib-3.1.3-gcc46.patch b/classlib-3.1.3-gcc46.patch deleted file mode 100644 index 2da96c1b44f..00000000000 --- a/classlib-3.1.3-gcc46.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff --git a/src/utils/Signal.cpp b/src/utils/Signal.cpp -index 7fcef14..72b226e 100644 ---- a/src/utils/Signal.cpp -+++ b/src/utils/Signal.cpp -@@ -318,7 +318,7 @@ Signal::queue (pid_t process, int sig, int value /* = 0 */) - process = 0; // silence unused warning - sig = 0; // silence unused warning - value = 0; // silence unused warning -- return 0; -+ return process + sig + (long long) value; - #endif - } - -@@ -335,7 +335,7 @@ Signal::queue (pid_t process, int sig, void *value) - process = 0; // silence unused warning - sig = 0; // silence unused warning - value = 0; // silence unused warning -- return 0; -+ return process + sig + (long long) value; - #endif - } - -@@ -350,7 +350,7 @@ Signal::queue (int sig, int value /* = 0 */) - #else - sig = 0; // silence unused warning - value = 0; // silence unused warning -- return 0; -+ return sig + (long long) value; - #endif - } - -@@ -365,7 +365,7 @@ Signal::queue (int sig, void *value) - #else - sig = 0; // silence unused warning - value = 0; // silence unused warning -- return 0; -+ return sig + (long long)value; - #endif - } - -@@ -452,7 +452,7 @@ Signal::wait (const sigset_t *mask, - mask = 0; // silence unused warning - info = 0; // silence unused warning - msecs = 0; // silence unused warning -- return 0; -+ return (long long) mask + (long long)info + msecs; - #endif - } - -diff --git a/classlib/iobase/DirIterator.h b/classlib/iobase/DirIterator.h -index 623f1e1..9b52cb2 100644 ---- a/classlib/iobase/DirIterator.h -+++ b/classlib/iobase/DirIterator.h -@@ -49,7 +49,7 @@ class Filename; - - The end indicator for the iteration range is the default - constructed iterator. */ --class DirIterator : public std::iterator -+class DirIterator : public std::iterator - { - public: - typedef std::input_iterator_tag iterator_category; diff --git a/classlib-3.1.3-memset-fix.patch b/classlib-3.1.3-memset-fix.patch deleted file mode 100644 index 7c60d10476c..00000000000 --- a/classlib-3.1.3-memset-fix.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/utils/Time.cpp b/src/utils/Time.cpp -index b2e87e1..2c9b5c3 100644 ---- a/src/utils/Time.cpp -+++ b/src/utils/Time.cpp -@@ -130,7 +130,7 @@ Time::Time (int year, int month, int day, - bool local /* = true */) - { - tm val; -- memset (&val, sizeof (val), 0); -+ memset (&val, 0, sizeof (val)); - val.tm_sec = sec; - val.tm_min = min; - val.tm_hour = hour; diff --git a/classlib-3.1.3-sl6.patch b/classlib-3.1.3-sl6.patch deleted file mode 100644 index 2208abddb75..00000000000 --- a/classlib-3.1.3-sl6.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/zip/TarInputStream.cpp b/src/zip/TarInputStream.cpp -index 31218af..21b5fec 100644 ---- a/src/zip/TarInputStream.cpp -+++ b/src/zip/TarInputStream.cpp -@@ -452,7 +452,7 @@ TarInputStream::readExtendedAttrs (TarMember &xdata, uint8_t &xfields, IOOffset - throw TarError (TarError::HEADER_VALUE_ERROR); - - // Find property name end at the first equal sign. -- const char *propname = ++end; -+ char *propname = ++end; - if (! (end = strchr(propname, '=')) || end - p > reclen) - throw TarError (TarError::HEADER_VALUE_ERROR); - ptrdiff_t proplen = end++ - propname; diff --git a/classlib-toolfile.spec b/classlib-toolfile.spec index 5a7d6c945c9..07a1a23e129 100644 --- a/classlib-toolfile.spec +++ b/classlib-toolfile.spec @@ -1,4 +1,4 @@ -### RPM external classlib-toolfile 1.0 +### RPM external classlib-toolfile 2.0 Requires: classlib %prep @@ -12,18 +12,14 @@ cat << \EOF_TOOLFILE > %i/etc/scram.d/classlib.xml - - - - - EOF_TOOLFILE ## IMPORT scram-tools-post + diff --git a/classlib.spec b/classlib.spec index 6e6dd9aaf3a..49ca5519528 100644 --- a/classlib.spec +++ b/classlib.spec @@ -1,26 +1,13 @@ ### RPM external classlib 3.1.3 -Source: http://cmsrep.cern.ch/cmssw/cms/SOURCES/slc5_amd64_gcc472/external/classlib/3.1.3/classlib-3.1.3.tar.bz2 -Patch0: classlib-3.1.3-gcc46 -Patch1: classlib-3.1.3-sl6 -Patch2: classlib-3.1.3-fix-gcc47-cxx11 -Patch3: classlib-3.1.3-fix-unwind-x86_64 -Patch4: classlib-3.1.3-memset-fix -Patch5: classlib-3.1.3-fix-obsolete-CLK_TCK +%define tag b2569c29126780017b48b96d324fe73a05573bc5 +%define branch cms/%{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 -Requires: bz2lib -Requires: pcre -Requires: xz -Requires: openssl -Requires: zlib +Requires: pcre %prep -%setup -n %n-%realversion -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 +%setup -n %{n}-%realversion %build # Update to get aarch64 and ppc64le @@ -29,18 +16,13 @@ curl -L -k -s -o ./cfg/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config. curl -L -k -s -o ./cfg/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' chmod +x ./cfg/config.{sub,guess} -./configure --prefix=%i \ - --with-zlib-includes=$ZLIB_ROOT/include \ - --with-zlib-libraries=$ZLIB_ROOT/lib \ - --with-bz2lib-includes=$BZ2LIB_ROOT/include \ - --with-bz2lib-libraries=$BZ2LIB_ROOT/lib \ - --with-pcre-includes=$PCRE_ROOT/include \ - --with-pcre-libraries=$PCRE_ROOT/lib \ - --with-openssl-includes=$OPENSSL_ROOT/include \ - --with-openssl-libraries=$OPENSSL_ROOT/lib \ - --with-lzma-includes=$XZ_ROOT/include \ - --with-lzma-libraries=$XZ_ROOT/lib +./configure --prefix=%i \ + --without-zlib --without-bz2lib \ + --without-lzma --without-lzo \ + --with-pcre-includes=$PCRE_ROOT/include \ + --with-pcre-libraries=$PCRE_ROOT/lib +perl -p -i -e 's|-lz | |;s|-lbz2| |;s|-lcrypto| |;s|-llzma||' Makefile perl -p -i -e ' s{-llzo2}{}g; !/^\S+: / && s{\S+LZO((C|Dec)ompressor|Constants|Error)\S+}{}g' \ diff --git a/cms-common.spec b/cms-common.spec index 58e713b155e..bbdc85223d0 100644 --- a/cms-common.spec +++ b/cms-common.spec @@ -1,8 +1,8 @@ ### RPM cms cms-common 1.0 -## REVISION 1202 +## REVISION 1203 ## NOCOMPILER -%define tag f8da87a4652546ca246f6c1ffe23025d3fd37525 +%define tag 9e258c4a2ee83eec18e35e3eae190350d15ff983 Source: git+https://github.com/cms-sw/cms-common.git?obj=master/%{tag}&export=%{n}-%{realversion}-%{tag}&output=/%{n}-%{realversion}-%{tag}.tgz diff --git a/cms_oracleocci_abi_hack-fake-toolfile.spec b/cms_oracleocci_abi_hack-fake-toolfile.spec index a5b11f65504..fd2e4da3f40 100644 --- a/cms_oracleocci_abi_hack-fake-toolfile.spec +++ b/cms_oracleocci_abi_hack-fake-toolfile.spec @@ -2,9 +2,8 @@ Requires: cms_oracleocci_abi_hack-fake %define cms_oracleocci_libname cms_oracleocci_abi_hack -%define isdarwin %(case %{cmsos} in (osx*) echo 1 ;; (*) echo 0 ;; esac) %define soext so -%if %isdarwin +%ifarch darwin %define soext dylib %endif diff --git a/cms_oracleocci_abi_hack-toolfile.spec b/cms_oracleocci_abi_hack-toolfile.spec index 29323e08655..478df31ee37 100644 --- a/cms_oracleocci_abi_hack-toolfile.spec +++ b/cms_oracleocci_abi_hack-toolfile.spec @@ -2,9 +2,8 @@ Requires: cms_oracleocci_abi_hack %define cms_oracleocci_libname cms_oracleocci_abi_hack -%define isdarwin %(case %{cmsos} in (osx*) echo 1 ;; (*) echo 0 ;; esac) %define soext so -%if %isdarwin +%ifarch darwin %define soext dylib %endif diff --git a/cmsos.file b/cmsos.file index d224d1b7bf1..79c25cf029c 100644 --- a/cmsos.file +++ b/cmsos.file @@ -27,7 +27,11 @@ cmsos() if [ "X`uname -i`" = Xi386 ]; then echo slc${slc_version}_ia32 else - echo slc${slc_version}_${cpuarch} + os="slc" + if egrep -q "CentOS" /etc/redhat-release 2>/dev/null; then + if [ ${slc_version} -gt 7 ] ; then os="cc" ; fi + fi + echo ${os}${slc_version}_${cpuarch} fi elif grep -q Scientific /etc/rocks-release 2>/dev/null; then slc_version=`grep DISTRIB_RELEASE rocks-release | sed 's/DISTRIB_RELEASE="\([0-9]*\).*/\1/'` @@ -72,6 +76,9 @@ defaultCompiler() case `cmsos` in slc4* ) echo gcc345 ;; slc5* ) echo gcc432 ;; + slc6* ) echo gcc630 ;; + slc7* ) echo gcc820 ;; + cc* ) echo gcc8 ;; osx104* ) echo gcc400 ;; osx105* ) echo gcc401 ;; osx106* ) echo gcc421 ;; diff --git a/cmssw-tool-conf.spec b/cmssw-tool-conf.spec index 9d560ed74d0..f0710285101 100644 --- a/cmssw-tool-conf.spec +++ b/cmssw-tool-conf.spec @@ -2,15 +2,6 @@ ## NOCOMPILER # With cmsBuild, change the above version only when a new tool is added -%define islinux %(case $(uname -s) in (Linux) echo 1 ;; (*) echo 0 ;; esac) -%define isdarwin %(case %{cmsos} in (osx*) echo 1 ;; (*) echo 0 ;; esac) -%define isamd64 %(case %{cmsplatf} in (*amd64*) echo 1 ;; (*) echo 0 ;; esac) -%define isslc %(case %{cmsplatf} in (slc*) echo 1 ;; (*) echo 0 ;; esac) -%define isnotppc64le %(case %{cmsplatf} in (*_ppc64le_*) echo 0 ;; (*) echo 1 ;; esac) -%define isnotppc64le_be %(case %{cmsplatf} in (*_ppc64*) echo 0 ;; (*) echo 1 ;; esac) -%define isnotaarch64 %(case %{cmsplatf} in (*_aarch64_*) echo 0 ;; (*) echo 1 ;; esac) -%define isslc7 %(case %{cmsplatf} in (slc7_amd64*) echo 1 ;; (*) echo 0 ;; esac) - Requires: google-benchmark-toolfile Requires: catch2-toolfile Requires: starlight-toolfile @@ -25,7 +16,6 @@ Requires: cppunit-toolfile Requires: curl-toolfile Requires: das_client-toolfile Requires: db6-toolfile -Requires: dpm-toolfile Requires: davix-toolfile Requires: evtgen-toolfile Requires: expat-toolfile @@ -71,7 +61,6 @@ Requires: vincia-toolfile Requires: dire-toolfile Requires: python-toolfile Requires: python3-toolfile -Requires: qt-toolfile Requires: root-toolfile Requires: sherpa-toolfile Requires: openmpi-toolfile @@ -89,8 +78,8 @@ Requires: dcap-toolfile Requires: frontier_client-toolfile Requires: xrootd-toolfile Requires: dd4hep-toolfile -%if %isnotaarch64 -Requires: pyqt-toolfile +%ifnarch aarch64 +#Requires: pyqt-toolfile %endif Requires: sip-toolfile Requires: graphviz-toolfile @@ -98,7 +87,7 @@ Requires: valgrind-toolfile Requires: cmsswdata-toolfile Requires: zstd-toolfile Requires: hls-toolfile -%if %isnotppc64le +%ifnarch ppc64le Requires: onnxruntime-toolfile %endif @@ -121,7 +110,6 @@ Requires: mctester-toolfile Requires: vdt-toolfile Requires: icc-gcc-toolfile Requires: ccache-gcc-toolfile -Requires: distcc-gcc-toolfile Requires: gnuplot-toolfile Requires: sloccount-toolfile Requires: millepede-toolfile @@ -129,7 +117,7 @@ Requires: cvs2git-toolfile Requires: pacparser-toolfile Requires: git-toolfile Requires: cgal-toolfile -Requires: doxygen-toolfile +#Requires: doxygen-toolfile Requires: yaml-cpp-toolfile Requires: gmp-static-toolfile Requires: mpfr-static-toolfile @@ -163,13 +151,13 @@ Requires: mxnet-predict-toolfile Requires: mkfit-toolfile # Only for Linux platform. -%if %islinux +%ifos linux Requires: codechecker-toolfile Requires: gcc-checker-plugin-toolfile Requires: openldap-toolfile Requires: gperftools-toolfile -%if %isnotppc64le_be +%ifnarch ppc64le Requires: libunwind-toolfile Requires: igprof-toolfile Requires: cuda-toolfile @@ -178,15 +166,11 @@ Requires: cuda-api-wrappers-toolfile Requires: openloops-toolfile %endif -%if %isamd64 +%ifarch x86_64 Requires: dmtcp-toolfile Requires: tkonlinesw-toolfile Requires: oracle-toolfile Requires: intel-vtune - -%if %isslc -Requires: glibc-toolfile -%endif %else Requires: tkonlinesw-fake-toolfile Requires: oracle-fake-toolfile diff --git a/cmsswdata.spec b/cmsswdata.spec index 8a8325486c0..494a9261b4b 100644 --- a/cmsswdata.spec +++ b/cmsswdata.spec @@ -4,9 +4,6 @@ Source: none %define BaseTool %(echo %n | tr '[a-z-]' '[A-Z_]') -%define isnotonline %(case %{cmsplatf} in (*onl_*_*) echo 0 ;; (*) echo 1 ;; esac) -%define isnotarmv7 %(case %{cmsplatf} in (*armv7*) echo 0 ;; (*) echo 1 ;; esac) - Requires: data-CondTools-SiPhase2Tracker Requires: data-PhysicsTools-PatUtils Requires: data-RecoTauTag-TrainingFiles @@ -64,15 +61,12 @@ Requires: data-RecoHGCal-TICL Requires: data-SimG4CMS-HGCalTestBeam Requires: data-SimPPS-PPSPixelDigiProducer -%if %isnotonline -# extra data dependencies for standard builds Requires: data-FastSimulation-MaterialEffects Requires: data-SimG4CMS-Calo Requires: data-SimG4CMS-Forward Requires: data-Validation-Geometry Requires: data-Fireworks-Geometry Requires: data-GeneratorInterface-ReggeGribovPartonMCInterface -%endif %prep diff --git a/coral-tool-conf.spec b/coral-tool-conf.spec index 2124d780165..7c2623cbfe6 100644 --- a/coral-tool-conf.spec +++ b/coral-tool-conf.spec @@ -1,7 +1,5 @@ ### RPM cms coral-tool-conf 2.1 ## NOCOMPILER -%define isnotonline %(case %{cmsplatf} in (*onl_*_*) echo 0 ;; (*) echo 1 ;; esac) -%define isamd64 %(case %{cmsplatf} in (*amd64*) echo 1 ;; (*) echo 0 ;; esac) Requires: pcre-toolfile Requires: python-toolfile @@ -11,20 +9,15 @@ Requires: frontier_client-toolfile Requires: gcc-toolfile Requires: openssl-toolfile -%if %isnotonline Requires: sqlite-toolfile Requires: libuuid-toolfile Requires: zlib-toolfile Requires: bz2lib-toolfile Requires: cppunit-toolfile Requires: xerces-c-toolfile -%if %isamd64 -Requires: oracle-toolfile -%endif Requires: systemtools -%else -Requires: onlinesystemtools -%define onlinesystemtoolsroot ${ONLINESYSTEMTOOLS_ROOT} +%ifarch x86_64 +Requires: oracle-toolfile %endif %define skipreqtools jcompiler diff --git a/coral.spec b/coral.spec index 147c7c56c7f..7b7ed6fd01e 100644 --- a/coral.spec +++ b/coral.spec @@ -19,7 +19,6 @@ Requires: coral-tool-conf %define cmsplatf_ppc64 1 %endif -%define isdarwin %(case %{cmsos} in (osx*) echo 1 ;; (*) echo 0 ;; esac) %define cvssrc %{n} @@ -27,7 +26,7 @@ Requires: coral-tool-conf %define subpackageDebug yes # Disable building tests, since they bring dependency on cppunit: -%if %isdarwin +%ifarch darwin %define patchsrc2 perl -p -i -e 's!()!!;' config/BuildFile.xml %define patchsrc3 %patch0 -p1 %endif diff --git a/curl.spec b/curl.spec index 09a5aa62315..30ebb32eeb2 100644 --- a/curl.spec +++ b/curl.spec @@ -1,6 +1,5 @@ ### RPM external curl 7.59.0 Source: http://curl.haxx.se/download/%{n}-%{realversion}.tar.gz -Requires: openssl Requires: zlib %prep @@ -19,7 +18,6 @@ esac --without-libidn \ --disable-ldap \ --with-zlib=${ZLIB_ROOT} \ - --with-ssl=${OPENSSL_ROOT} \ --without-nss \ --without-libssh2 \ --with-gssapi=${KERBEROS_ROOT} diff --git a/das_client.spec b/das_client.spec index e9eebed4b25..b9f216feca5 100644 --- a/das_client.spec +++ b/das_client.spec @@ -38,20 +38,7 @@ EOF chmod +x %i/etc/das_client -# Generate dependencies-setup.{sh,csh} so init.{sh,csh} picks full environment. -mkdir -p %i/etc/profile.d -: > %i/etc/profile.d/dependencies-setup.sh -: > %i/etc/profile.d/dependencies-setup.csh -for tool in $(echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'); do - root=$(echo $tool | tr a-z- A-Z_)_ROOT; eval r=\$$root - if [ X"$r" != X ] && [ -r "$r/etc/profile.d/init.sh" ]; then - echo "test X\$$root != X || . $r/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh - echo "test X\$?$root = X1 || source $r/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh - fi -done - %post -%{relocateConfig}etc/profile.d/dependencies-setup.*sh %{relocateConfig}etc/das_client # copy wrapper script into common if latest version is same as this version diff --git a/data/cmsdist_packages.py b/data/cmsdist_packages.py index d916aa584fa..1cdc68d3795 100644 --- a/data/cmsdist_packages.py +++ b/data/cmsdist_packages.py @@ -15,7 +15,7 @@ def packages(virtual_packages): (pkg, ver) = line.strip().split('=',1) data_pkg = 'data-'+pkg if data_pkg in virtual_packages: - print "ERROR: Duplicate data package definitions found in %s for package %s" % (req, pkg) + print ("ERROR: Duplicate data package definitions found in %s for package %s" % (req, pkg)) exit(1) virtual_packages[data_pkg]='%s/package.sh "%s" "%s" "%s"' % (pkg_dir, data_pkg, ver, ptype) return diff --git a/davix-toolfile.spec b/davix-toolfile.spec index dafbd35c6ea..fe5deb93f78 100644 --- a/davix-toolfile.spec +++ b/davix-toolfile.spec @@ -16,7 +16,6 @@ cat << \EOF_TOOLFILE > %i/etc/scram.d/davix.xml - EOF_TOOLFILE diff --git a/davix.spec b/davix.spec index 536c1cc7553..c55d1d5dc6b 100644 --- a/davix.spec +++ b/davix.spec @@ -5,14 +5,13 @@ %define github_user cern-it-sdc-id Source0: git+https://github.com/%{github_user}/%{n}.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz -%define isdarwin %(case %{cmsos} in (osx*) echo 1 ;; (*) echo 0 ;; esac) %define soext so -%if %isdarwin +%ifarch darwin %define soext dylib %endif BuildRequires: cmake gmake git -Requires: openssl libxml2 libuuid +Requires: libxml2 libuuid %prep %setup -n %{n}-%{realversion} @@ -28,7 +27,6 @@ cmake -DCMAKE_INSTALL_PREFIX="%{i}" \ -DLIBXML2_LIBRARY="${LIBXML2_ROOT}/lib/libxml2.%{soext}" \ -DUUID_INCLUDE_DIR="${LIBUUID_ROOT}/include" \ -DUUID_LIBRARY="${LIBUUID_ROOT}/lib64/libuuid.%{soext}" \ - -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT}" \ ../ make VERBOSE=1 %{makeprocesses} diff --git a/dbs-schema.spec b/dbs-schema.spec deleted file mode 100644 index fa7868b4c0c..00000000000 --- a/dbs-schema.spec +++ /dev/null @@ -1,44 +0,0 @@ -### RPM cms dbs-schema DBS_2_1_5 - -%define cvstag %{realversion} -#Source: cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e&module=DBS/Schema/NeXtGen&export=DBS/Schema/NeXtGen&tag=-r%{cvstag}&output=/dbs-schema.tar.gz -%define cvsserver cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e -Source: %cvsserver&strategy=checkout&module=DBS/Schema/NeXtGen&nocache=true&export=DBS&tag=-r%{cvstag}&output=/dbs-schema.tar.gz -Requires: mysql oracle - -%prep -%setup -n DBS -%build -(make DBSHOME=%_builddir/DBS/Schema/NeXtGen ) - -%install -mkdir -p %{i}/etc/profile.d -mkdir -p %{i}/lib/Schema/NeXtGen -cp -r Schema/NeXtGen/* %{i}/lib/Schema/NeXtGen/ - -(echo "#!/bin/sh"; \ - echo "source $ORACLE_ROOT/etc/profile.d/init.sh"; \ - echo "source $MYSQL_ROOT/etc/profile.d/init.sh"; \ - ) > %{i}/etc/profile.d/dependencies-setup.sh - -(echo "#!/bin/tcsh"; \ - echo "source $ORACLE_ROOT/etc/profile.d/init.csh"; \ - echo "source $MYSQL_ROOT/etc/profile.d/init.csh"; \ - ) > %{i}/etc/profile.d/dependencies-setup.csh - -# SCRAM ToolBox toolfile -mkdir -p %i/etc/scram.d -cat << \EOF_TOOLFILE >%i/etc/scram.d/%n - - - - - - - -EOF_TOOLFILE - -%post -%{relocateConfig}etc/profile.d/dependencies-setup.sh -%{relocateConfig}etc/profile.d/dependencies-setup.csh -%{relocateConfig}etc/scram.d/%n diff --git a/distcc.spec b/distcc.spec index 68b7fa11ac1..91b31191e98 100644 --- a/distcc.spec +++ b/distcc.spec @@ -11,8 +11,8 @@ Patch0: distcc-gcc7 %build # Update to detect aarch64 and ppc64le rm -f ./config.{sub,guess} -curl -L -k -s -o ./config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +%get_config_sub ./config.sub +%get_config_guess ./config.guess chmod +x ./config.{sub,guess} ./configure \ diff --git a/doxygen.spec b/doxygen.spec index 2e79b311b49..c4c2ab0df1d 100644 --- a/doxygen.spec +++ b/doxygen.spec @@ -1,19 +1,21 @@ -### RPM external doxygen 1.8.11 +### RPM external doxygen 1.8.16 +%define doxygen_release Release_%(echo %{realversion} | tr '.' '_') -Source: http://ftp.stack.nl/pub/users/dimitri/%{n}-%{realversion}.src.tar.gz +Source: https://github.com/doxygen/doxygen/archive/%{doxygen_release}.tar.gz +#Source: http://ftp.stack.nl/pub/users/dimitri/%{n}-%{realversion}.src.tar.gz BuildRequires: flex bison graphviz autotools gmake cmake python #define drop_files %{i}/man %prep -%setup -n %{n}-%{realversion} +%setup -n %{n}-%{doxygen_release} %build rm -rf ../build mkdir -p ../build cd ../build -cmake ../%{n}-%{realversion} \ +cmake ../%{n}-%{doxygen_release} \ -DCMAKE_INSTALL_PREFIX="%{i}" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_VERBOSE_MAKEFILE=TRUE \ diff --git a/expat.spec b/expat.spec index abcdcd1c654..82e320f638b 100644 --- a/expat.spec +++ b/expat.spec @@ -10,8 +10,8 @@ Source: http://downloads.sourceforge.net/project/%{n}/%{n}/%{realversion}/%{n}-% %build # Update to detect aarch64 and ppc64le rm -f ./conftools/config.{sub,guess} -curl -L -k -s -o ./conftools/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./conftools/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +%get_config_sub ./conftools/config.sub +%get_config_guess ./conftools/config.guess chmod +x ./conftools/config.{sub,guess} ./configure --prefix=%{i} diff --git a/fasthadd.spec b/fasthadd.spec index abb95a44048..3f6e3150ee2 100644 --- a/fasthadd.spec +++ b/fasthadd.spec @@ -19,27 +19,4 @@ g++ -O2 -o %i/bin/fastHadd ROOTFilePB.pb.cc ./fastHadd.cc \ -I$PROTOBUF_ROOT/include -L$PROTOBUF_ROOT/lib -lprotobuf \ `root-config --cflags --libs` -(echo "#!/bin/sh"; \ - echo "source $ROOT_ROOT/etc/profile.d/init.sh"; \ - echo "source $TBB_ROOT/etc/profile.d/init.sh"; \ - echo "source $PROTOBUF_ROOT/etc/profile.d/init.sh"; \ - echo "source $XZ_ROOT/etc/profile.d/init.sh"; \ - echo "source $ZLIB_ROOT/etc/profile.d/init.sh"; \ - echo "source $GCC_ROOT/etc/profile.d/init.sh"; \ - echo "source $PCRE_ROOT/etc/profile.d/init.sh"; \ - ) > %{i}/etc/profile.d/dependencies-setup.sh - -(echo "#!/bin/tcsh"; \ - echo "source $PROTOBUF_ROOT/etc/profile.d/init.csh"; \ - echo "source $ROOT_ROOT/etc/profile.d/init.csh"; \ - echo "source $TBB_ROOT/etc/profile.d/init.csh"; \ - echo "source $XZ_ROOT/etc/profile.d/init.csh"; \ - echo "source $ZLIB_ROOT/etc/profile.d/init.csh"; \ - echo "source $GCC_ROOT/etc/profile.d/init.csh"; \ - echo "source $PCRE_ROOT/etc/profile.d/init.csh"; \ - ) > %{i}/etc/profile.d/dependencies-setup.csh - %install -%post -%{relocateConfig}etc/profile.d/dependencies-setup.sh -%{relocateConfig}etc/profile.d/dependencies-setup.csh diff --git a/fastjet.spec b/fastjet.spec index 58e62b80a17..7edee37faad 100644 --- a/fastjet.spec +++ b/fastjet.spec @@ -10,15 +10,13 @@ Source: git+https://github.com/%{github_user}/fastjet.git?obj=%{branch}/%{tag}&e %setup -n %{n}-%{realversion} # Update to detect aarch64 and ppc64le -rm -f ./config.{sub,guess} -curl -L -k -s -o ./config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +rm -f ./config.{sub,guess} ./plugins/SISCone/siscone/config.{sub,guess} +%get_config_sub ./config.sub +%get_config_guess ./config.guess chmod +x ./config.{sub,guess} -rm -f ./plugins/SISCone/siscone/config.{sub,guess} -curl -L -k -s -o ./plugins/SISCone/siscone/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./plugins/SISCone/siscone/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -chmod +x ./plugins/SISCone/siscone/config.{sub,guess} +cp ./config.sub ./plugins/SISCone/siscone/config.sub +cp ./config.guess ./plugins/SISCone/siscone/config.guess CXXFLAGS="-O3 -Wall -ffast-math -ftree-vectorize" diff --git a/fftjet.spec b/fftjet.spec index 690b7394d59..17f62d7fb2a 100644 --- a/fftjet.spec +++ b/fftjet.spec @@ -14,8 +14,8 @@ CXX="$(which g++) -fPIC" # Update to detect aarch64 and ppc64le rm -f ./config.{sub,guess} -curl -L -k -s -o ./config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +%get_config_sub ./config.sub +%get_config_guess ./config.guess chmod +x ./config.{sub,guess} # Fake the existance of pkg-config on systems which dont have it. diff --git a/frontier_client-toolfile.spec b/frontier_client-toolfile.spec index 44fc22270da..dc8175159c0 100644 --- a/frontier_client-toolfile.spec +++ b/frontier_client-toolfile.spec @@ -19,7 +19,6 @@ cat << \EOF_TOOLFILE >%i/etc/scram.d/frontier_client.xml - diff --git a/frontier_client.spec b/frontier_client.spec index e47f53ea53b..6074cd13ec7 100644 --- a/frontier_client.spec +++ b/frontier_client.spec @@ -4,21 +4,23 @@ Source: http://frontier.cern.ch/dist/%{n}__%{realversion}__src.tar.gz %define online %(case %cmsplatf in (*onl_*_*) echo true;; (*) echo false;; esac) -Requires: expat openssl pacparser python zlib +Requires: expat pacparser python zlib Patch0: frontier_client-2.8.20-add-python-dbapi +Patch1: frontier_client-2.8.20-openssl11 %prep %setup -n %{n}__%{realversion}__src -%define makeargs "EXPAT_DIR=${EXPAT_ROOT} PACPARSER_DIR=${PACPARSER_ROOT} COMPILER_TAG=gcc_$(gcc -dumpversion) ZLIB_DIR=${ZLIB_ROOT} OPENSSL_DIR=${OPENSSL_ROOT}" +%define makeargs "EXPAT_DIR=${EXPAT_ROOT} PACPARSER_DIR=${PACPARSER_ROOT} COMPILER_TAG=gcc_$(gcc -dumpversion) ZLIB_DIR=${ZLIB_ROOT}" %patch0 -p1 +%patch1 -p1 %build export MAKE_ARGS=%{makeargs} -make $MAKE_ARGS CXXFLAGS="-ldl" CFLAGS="-I${OPENSSL_ROOT}/include" +make $MAKE_ARGS CXXFLAGS="-ldl" CFLAGS="" %install mkdir -p %i/lib diff --git a/fwlite-tool-conf.spec b/fwlite-tool-conf.spec index f0da0efcabd..897e70a4b1e 100644 --- a/fwlite-tool-conf.spec +++ b/fwlite-tool-conf.spec @@ -4,10 +4,6 @@ # tool is added ## INITENV SET CMSSW_TOOL_CONF_ROOT $FWLITE_TOOL_CONF_ROOT -%define isslc %(case %{cmsos} in (slc*) echo 1 ;; (*) echo 0 ;; esac) -%define isdarwin %(case %{cmsos} in (osx*) echo 1 ;; (*) echo 0 ;; esac) -%define isamd64 %(case %{cmsplatf} in (*amd64*) echo 1 ;; (*) echo 0 ;; esac) - Requires: tbb-toolfile Requires: boost-toolfile Requires: bz2lib-toolfile @@ -50,14 +46,8 @@ Requires: OpenBLAS-toolfile Requires: py2-pybind11-toolfile Requires: fwlite_python_tools -%if %isamd64 -%if %isslc -Requires: glibc-toolfile -%endif -%endif - # Only for Darwin platform. -%if %isdarwin +%ifarch darwin Requires: freetype-toolfile %endif diff --git a/fwlite_python_tools.spec b/fwlite_python_tools.spec index b4b93f77bb9..5fc7891b5d8 100644 --- a/fwlite_python_tools.spec +++ b/fwlite_python_tools.spec @@ -3,8 +3,6 @@ ## INITENV +PATH PYTHON3PATH %{i}/${PYTHON3_LIB_SITE_PACKAGES} Source: none -%define isslc7 %(case %{cmsplatf} in (slc7_amd64*) echo 1 ;; (*) echo 0 ;; esac) -%define isamd64 %(case %{cmsplatf} in (*amd64*) echo 1 ;; (*) echo 0 ;; esac) Requires: py2-six Requires: py2-scipy Requires: py2-numpy diff --git a/gcc.spec b/gcc.spec index 572ca3d2aeb..17ec5a559f8 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,4 +1,5 @@ ### RPM external gcc 8.3.0 +## USE_COMPILER_VERSION ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 # Use the git repository for fetching the sources. This gives us more control while developing # a new platform so that we can compile yet to be released versions of the compiler. @@ -9,14 +10,10 @@ %define moduleName %{n}-%{realversion} Source0: git+https://github.com/gcc-mirror/%{n}.git?obj=%{gccBranch}/%{gccTag}&export=%{moduleName}&output=/%{n}-%{realversion}-%{gccTag}.tgz -%define islinux %(case %{cmsos} in (slc*|fc*) echo 1 ;; (*) echo 0 ;; esac) -%define isdarwin %(case %{cmsos} in (osx*) echo 1 ;; (*) echo 0 ;; esac) -%define isamd64 %(case %{cmsplatf} in (*amd64*) echo 1 ;; (*) echo 0 ;; esac) - %define keep_archives true %define gmpVersion 6.1.2 -%define mpfrVersion 4.0.1 +%define mpfrVersion 4.0.2 %define mpcVersion 1.1.0 %define islVersion 0.18 %define zlibVersion 1.2.11 @@ -26,10 +23,10 @@ Source3: https://ftp.gnu.org/gnu/mpc/mpc-%{mpcVersion}.tar.gz Source4: ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-%{islVersion}.tar.bz2 Source12: http://zlib.net/zlib-%{zlibVersion}.tar.gz -%if %islinux -%define bisonVersion 3.1 -%define binutilsVersion 2.31 -%define elfutilsVersion 0.170 +%ifos linux +%define bisonVersion 3.3 +%define binutilsVersion 2.32 +%define elfutilsVersion 0.177 %define m4Version 1.4.18 %define flexVersion 2.6.4 Source7: http://ftp.gnu.org/gnu/bison/bison-%{bisonVersion}.tar.gz @@ -41,14 +38,11 @@ Source11: https://github.com/westes/flex/releases/download/v%{flexVersion}/flex- Patch0: gcc-flex-nonfull-path-m4 Patch1: gcc-flex-disable-doc -#Patch2: gcc-remove-LWG2825-LWG2756-r245024 -#Patch3: 0001-Revert-r248245-breaks-ROOT +Patch2: m4-centos8 %prep %setup -T -b 0 -n %{moduleName} -#%patch2 -p1 -#%patch3 -p1 # Filter out private stuff from RPM requires headers. cat << \EOF > %{name}-req @@ -60,8 +54,8 @@ EOF %global __find_requires %{_builddir}/%{moduleName}/%{name}-req chmod +x %{__find_requires} -%if %islinux -%if %isamd64 +%ifos linux +%ifarch x86_64 # Hack needed to align sections to 4096 bytes rather than 2MB on 64bit linux # architectures. This is done to reduce the amount of address space wasted by # relocating many libraries. This was done with a linker script before, but @@ -102,18 +96,19 @@ EOF_CMS_H %setup -D -T -b 4 -n isl-%{islVersion} %setup -D -T -b 12 -n zlib-%{zlibVersion} -%if %islinux +%ifos linux %setup -D -T -b 7 -n bison-%{bisonVersion} %setup -D -T -b 8 -n binutils-%{binutilsVersion} %setup -D -T -b 9 -n elfutils-%{elfutilsVersion} %setup -D -T -b 10 -n m4-%{m4Version} +%patch2 -p1 %setup -D -T -b 11 -n flex-%{flexVersion} %patch0 -p1 %patch1 -p1 %endif %build -%if %isdarwin +%ifarch darwin CC='clang' CXX='clang++' CPP='clang -E' @@ -152,7 +147,7 @@ esac make %{makeprocesses} make install -%if %islinux +%ifos linux CONF_BINUTILS_OPTS="--enable-ld=default --enable-lto --enable-plugins --enable-threads" CONF_GCC_WITH_LTO="--enable-ld=default --enable-lto" diff --git a/gdbm.spec b/gdbm.spec index 551597e7e95..351357db008 100644 --- a/gdbm.spec +++ b/gdbm.spec @@ -7,8 +7,8 @@ Source: http://ftp.gnu.org/gnu/%{n}/%{n}-%{realversion}.tar.gz %build # Update to detect aarch64 and ppc64le rm -f ./build-aux/config.{sub,guess} -curl -L -k -s -o ./build-aux/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./build-aux/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +%get_config_sub ./build-aux/config.sub +%get_config_guess ./build-aux/config.guess chmod +x ./build-aux/config.{sub,guess} ./configure \ diff --git a/git.spec b/git.spec index 62fb217b134..7786302ce5c 100644 --- a/git.spec +++ b/git.spec @@ -1,34 +1,19 @@ -### RPM external git 2.19.0 +### RPM external git 2.23.0 ## INITENV +PATH PATH %{i}/bin ## INITENV +PATH PATH %{i}/libexec/git-core ## INITENV SET GIT_TEMPLATE_DIR %{i}/share/git-core/templates ## INITENV SET GIT_SSL_CAINFO %{i}/share/ssl/certs/ca-bundle.crt ## INITENV SET GIT_EXEC_PATH %{i}/libexec/git-core -%define isDarwin %(case %{cmsos} in (osx*) echo 1 ;; (*) echo 0 ;; esac) -%define isNotDarwin %(case %{cmsos} in (osx*) echo 0 ;; (*) echo 1 ;; esac) -%define isLinux %(case $(uname -s) in (Linux) echo 1 ;; (*) echo 0 ;; esac) - Source0: https://github.com/git/git/archive/v%{realversion}.tar.gz Source1: https://raw.github.com/bagder/curl/curl-7_59_0/lib/mk-ca-bundle.pl Patch1: git-2.19.0-runtime -Requires: curl expat openssl zlib pcre +Requires: curl expat zlib pcre2 BuildRequires: autotools - -# Fake provides for git add --interactive -# The following are not avaialble on SLC and Darwin platforms by default -Provides: perl(DBI) -Provides: perl(Error) Provides: perl(SVN::Core) Provides: perl(SVN::Delta) Provides: perl(SVN::Ra) -Provides: perl(YAML::Any) -Provides: perl(CGI::Carp) -Provides: perl(CGI::Util) -Provides: perl(Time::HiRes) -Provides: perl(Encode) -Provides: perl(Scalar::Util) %define drop_files %{i}/share/man @@ -37,14 +22,13 @@ Provides: perl(Scalar::Util) %patch1 -p1 %build -export LDFLAGS="-L${OPENSSL_ROOT}/lib" +export LDFLAGS="" export NO_LIBPCRE1_JIT=1 make %{makeprocesses} configure ./configure prefix=%{i} \ --with-curl=${CURL_ROOT} \ - --with-openssl=${OPENSSL_ROOT} \ --with-expat=${EXPAT_ROOT} \ - --with-libpcre=${PCRE_ROOT} \ + --with-libpcre=${PCRE2_ROOT} \ --without-python \ --with-zlib=${ZLIB_ROOT} diff --git a/glibc-toolfile.spec b/glibc-toolfile.spec deleted file mode 100644 index a810256a455..00000000000 --- a/glibc-toolfile.spec +++ /dev/null @@ -1,16 +0,0 @@ -### RPM external glibc-toolfile 1.0 -Requires: glibc - -%prep -%build -%install -mkdir -p %{i}/etc/scram.d -cat << \EOF_TOOLFILE > %{i}/etc/scram.d/glibc.xml - - - - - - -EOF_TOOLFILE -## IMPORT scram-tools-post diff --git a/glibc.spec b/glibc.spec deleted file mode 100644 index 00e57dfed07..00000000000 --- a/glibc.spec +++ /dev/null @@ -1,60 +0,0 @@ -### RPM external glibc 2.17-78.el7_2.12-1.166.el6_7.3 -## NOCOMPILER - -%define isslc6 %(case %{cmsplatf} in (slc6*) echo 1 ;; (*) echo 0 ;; esac) -%define isslc7 %(case %{cmsplatf} in (slc7*) echo 1 ;; (*) echo 0 ;; esac) - -%if %isslc7 -%define realversion 2.17-78.el7 -%define tag ffca09a735586cbe44d9e330dc4c94ce18fa6aa3 -%endif - -%if %isslc6 -%define realversion 2.12-1.166.el6_7.3 -%define tag 2c052e03acb1795ac2c47f803b252ae85918e5ea -%endif - -%global official_version %(echo "%{realversion}" | cut -d'-' -f1) - -%define branch cms/%{realversion} -%define github_user cms-externals -Source: git+https://github.com/%{github_user}/glibc.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz - -%prep -%setup -n %{n}-%{realversion} - -%build - -rm -rf ../%{n}-build -mkdir ../%{n}-build -cd ../%{n}-build -../%{n}-%{realversion}/configure \ - CC=gcc \ - CXX=g++ \ - CFLAGS='-mtune=generic -fasynchronous-unwind-tables -DNDEBUG -g -O3' \ - --prefix=/usr \ - --enable-add-ons=nptl,c_stubs,libidn \ - --without-cvs \ - --enable-kernel=2.6.18 \ - --with-headers=/usr/include \ - --enable-bind-now \ - --with-tls \ - --with-__thread \ - --build=x86_64-redhat-linux \ - --host=x86_64-redhat-linux \ - --enable-multi-arch \ - --disable-profile \ - --enable-experimental-malloc - -make %{makeprocesses} - -%install -cd ../%{n}-build -make install install_root=%{i} - -# Remove everything except dynamic loader. All changes are contained -# within the loader. -find %{i} ! -type d | grep -Z -v 'ld-%{official_version}' | xargs rm -f -find %{i} -empty -type d -delete - -mv %{i}/lib64/ld-%{official_version}.so %{i}/lib64/ld.so diff --git a/gmake.spec b/gmake.spec index fa615c63ee5..a69bd2476d9 100644 --- a/gmake.spec +++ b/gmake.spec @@ -1,8 +1,12 @@ ### RPM external gmake 4.2.1 Source: ftp://ftp.gnu.org/gnu/make/make-%{realversion}.tar.gz +#https://github.com/osresearch/heads/blob/make-4.2.1/patches/make-4.2.1.patch +Patch0: make-4.2.1 + %prep %setup -n make-%{realversion} +%patch0 -p1 %build ./configure --prefix=%{i} diff --git a/graphviz.spec b/graphviz.spec index 22bf982d48a..1335f8226ae 100644 --- a/graphviz.spec +++ b/graphviz.spec @@ -7,8 +7,8 @@ BuildRequires: autotools # Update config.{guess,sub} scripts to detect aarch64 and ppc64le rm -f %{_tmppath}/config.{sub,guess} -curl -L -k -s -o %{_tmppath}/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -curl -L -k -s -o %{_tmppath}/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' +%get_config_guess %{_tmppath}/config.guess +%get_config_sub %{_tmppath}/config.sub for CONFIG_GUESS_FILE in $(find $RPM_BUILD_DIR -name 'config.guess') do rm -f $CONFIG_GUESS_FILE @@ -24,7 +24,7 @@ done %build case %cmsplatf in - slc*|fc*) + slc*|fc*|cc*) ADDITIONAL_OPTIONS="--with-freetype2=no --disable-shared --enable-static --disable-ltdl" ;; osx*) @@ -77,7 +77,7 @@ rm -rf %{i}/lib/pkgconfig # To match configure options above case %{cmsplatf} in - slc*|fc*) + slc*|fc*|cc*) ln -s dot_static %{i}/bin/dot ;; esac diff --git a/gsl.spec b/gsl.spec index 32b2ce14670..e23ac3b8f10 100644 --- a/gsl.spec +++ b/gsl.spec @@ -10,8 +10,8 @@ Requires: OpenBLAS # Update config.{guess,sub} scripts to detect aarch64 and ppc64le rm -f %{_tmppath}/config.{sub,guess} -curl -L -k -s -o %{_tmppath}/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -curl -L -k -s -o %{_tmppath}/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' +%get_config_guess %{_tmppath}/config.guess +%get_config_sub %{_tmppath}/config.sub for CONFIG_GUESS_FILE in $(find $RPM_BUILD_DIR -name 'config.guess') do rm -f $CONFIG_GUESS_FILE diff --git a/hdf5.spec b/hdf5.spec index cc996012893..ca84f598ad5 100644 --- a/hdf5.spec +++ b/hdf5.spec @@ -7,8 +7,8 @@ BuildRequires: zlib %build rm -f ./bin/config.{sub,guess} -curl -L -k -s -o ./bin/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./bin/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +%get_config_sub ./bin/config.sub +%get_config_guess ./bin/config.guess chmod +x ./bin/config.{sub,guess} ./configure --enable-shared --enable-cxx --with-zlib=${ZLIB_ROOT} --prefix %{i} make %{makeprocesses} VERBOSE=1 diff --git a/heppdt.spec b/heppdt.spec index 024c72aa22d..f12bc3496c1 100644 --- a/heppdt.spec +++ b/heppdt.spec @@ -21,8 +21,8 @@ Requires: tbb # Update to detect aarch64 and ppc64le rm -f ./config.{sub,guess} -curl -L -k -s -o ./config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +%get_config_sub ./config.sub +%get_config_guess ./config.guess chmod +x ./config.{sub,guess} CXX="%cms_cxx" CXXFLAGS="%cms_cxxflags" CPPFLAGS="-I$TBB_ROOT/include" LDFLAGS="-L$TBB_ROOT/lib -ltbb" ./configure --prefix=%{i} diff --git a/herwig.spec b/herwig.spec index 17ee55d2c32..f87ee531182 100644 --- a/herwig.spec +++ b/herwig.spec @@ -14,8 +14,8 @@ PLATF_CONFIG_OPTS="--disable-shared --enable-static" # Update to detect aarch64 and ppc64le rm -f ./config/config.{sub,guess} -curl -L -k -s -o ./config/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./config/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +%get_config_sub ./config/config.sub +%get_config_guess ./config/config.guess chmod +x ./config/config.{sub,guess} ./configure $PLATF_CONFIG_OPTS --prefix=%i F77="$F77" diff --git a/lcov.spec b/lcov.spec index 7387bba381e..1e59475df92 100644 --- a/lcov.spec +++ b/lcov.spec @@ -3,13 +3,12 @@ Source: http://heanet.dl.sourceforge.net/sourceforge/ltp/%{n}-%{realversion}.tar.gz Patch0: lcov-merge-files-in-same-dir -%define isdarwin %(case %{cmsos} in (osx*) echo 1 ;; (*) echo 0 ;; esac) %prep %setup -n %{n}-%{realversion} %patch0 -p1 -%if %isdarwin +%ifarch darwin # OS X does not support -D option sed -ibak 's/install -p -D/install -p/g' bin/install.sh %endif diff --git a/libarchive-bootstrap.spec b/libarchive-bootstrap.spec index 5f16b939573..69720431434 100644 --- a/libarchive-bootstrap.spec +++ b/libarchive-bootstrap.spec @@ -1,4 +1,4 @@ -### RPM external libarchive-bootstrap 3.1.2 +### RPM external libarchive-bootstrap 3.3.2 Source0: http://www.libarchive.org/downloads/libarchive-%{realversion}.tar.gz Requires: xz-bootstrap @@ -12,8 +12,8 @@ Requires: xz-bootstrap # Update config.{guess,sub} scripts rm -f %{_tmppath}/config.{sub,guess} -curl -L -k -s -o %{_tmppath}/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -curl -L -k -s -o %{_tmppath}/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' +%get_config_guess %{_tmppath}/config.guess +%get_config_sub %{_tmppath}/config.sub for CONFIG_GUESS_FILE in $(find . -name 'config.guess') do rm -f $CONFIG_GUESS_FILE diff --git a/libjpeg-turbo.spec b/libjpeg-turbo.spec index 472e929ca42..36562a97d73 100644 --- a/libjpeg-turbo.spec +++ b/libjpeg-turbo.spec @@ -15,8 +15,8 @@ BuildRequires: nasm autotools gmake cmake # Update to get AArch64 rm -f ./config.{sub,guess} -curl -L -k -s -o ./config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +%get_config_sub ./config.sub +%get_config_guess ./config.guess chmod +x ./config.{sub,guess} cmake -DCMAKE_INSTALL_PREFIX=%{i} -DENABLE_SHARED=TRUE -DENABLE_STATIC=FALSE -DWITH_JPEG8=TRUE diff --git a/libtiff.spec b/libtiff.spec index cccde788c5b..3bfc790c636 100644 --- a/libtiff.spec +++ b/libtiff.spec @@ -8,8 +8,8 @@ Requires: libjpeg-turbo zlib # Update to detect aarch64 and ppc64le rm -f ./config/config.{sub,guess} -curl -L -k -s -o ./config/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./config/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +%get_config_sub ./config/config.sub +%get_config_guess ./config/config.guess chmod +x ./config/config.{sub,guess} %build diff --git a/libungif.spec b/libungif.spec index ed6a0672e4b..7b3feef8f8c 100644 --- a/libungif.spec +++ b/libungif.spec @@ -8,8 +8,8 @@ Source: http://switch.dl.sourceforge.net/sourceforge/giflib/%{n}-%{realversion}. %build # Update to detect aarch64 and ppc64le rm -f ./config.{sub,guess} -curl -L -k -s -o ./config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +%get_config_sub ./config.sub +%get_config_guess ./config.guess chmod +x ./config.{sub,guess} ./configure --prefix=%{i} --disable-static diff --git a/libuuid.spec b/libuuid.spec index 06599979e85..efe0ced420c 100644 --- a/libuuid.spec +++ b/libuuid.spec @@ -3,8 +3,6 @@ Source: http://www.kernel.org/pub/linux/utils/util-linux/v2.34/util-linux-%{real Patch0: libuuid-2.34-disable-get_uuid_via_daemon %define keep_archives true -%define islinux %(case %{cmsos} in (slc*|fc*) echo 1 ;; (*) echo 0 ;; esac) - %prep %setup -n util-linux-%{realversion} %patch0 -p1 @@ -51,7 +49,7 @@ make %{makeprocesses} uuidd # There is no make install action for the libuuid libraries only mkdir -p %{i}/lib64 cp -p %{_builddir}/util-linux-%{realversion}/.libs/libuuid.a* %{i}/lib64 -%if %islinux +%ifos linux cp -p %{_builddir}/util-linux-%{realversion}/.libs/libuuid.so* %{i}/lib64 %endif mkdir -p %{i}/include diff --git a/llvm.spec b/llvm.spec index 19cc9f8b30b..b6173680679 100644 --- a/llvm.spec +++ b/llvm.spec @@ -2,11 +2,10 @@ ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 ## INITENV +PATH PYTHON27PATH %{i}/lib64/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages ## INITENV +PATH PYTHON3PATH %{i}/lib64/python`echo $PYTHON3_VERSION | cut -d. -f 1,2`/site-packages -%define isamd64 %(case %{cmsplatf} in (*_amd64_*) echo 1 ;; (*) echo 0 ;; esac) BuildRequires: cmake ninja Requires: gcc zlib python python3 -%if %{isamd64} +%ifarch x86_64 Requires: cuda %endif AutoReq: no @@ -48,7 +47,7 @@ cmake %{_builddir}/llvm-%{realversion}-%{llvmCommit}/llvm \ -DLLVM_ENABLE_EH:BOOL=ON \ -DLLVM_ENABLE_PIC:BOOL=ON \ -DLLVM_ENABLE_RTTI:BOOL=ON \ -%if %{isamd64} +%ifarch x86_64 -DLLVM_TARGETS_TO_BUILD:STRING="X86;PowerPC;AArch64;NVPTX" \ -DLIBOMPTARGET_NVPTX_ALTERNATE_HOST_COMPILER=/usr/bin/gcc \ %else diff --git a/lua-bootstrap.spec b/lua-bootstrap.spec index 5beefe00d32..6f3376a8e3d 100644 --- a/lua-bootstrap.spec +++ b/lua-bootstrap.spec @@ -1,4 +1,4 @@ -### RPM external lua-bootstrap 5.2.4 +### RPM external lua-bootstrap 5.3.4 Source0: http://www.lua.org/ftp/lua-%{realversion}.tar.gz %define keep_archives true diff --git a/madgraph5amcatnlo-config.patch b/madgraph5amcatnlo-config.patch index 17221a94aeb..9d07d54f85b 100644 --- a/madgraph5amcatnlo-config.patch +++ b/madgraph5amcatnlo-config.patch @@ -1,158 +1,144 @@ -diff --git a/input/mg5_configuration.txt b/input/mg5_configuration.txt -index c089808..f6b983f 100644 ---- a/input/mg5_configuration.txt -+++ b/input/mg5_configuration.txt -@@ -28,14 +28,14 @@ - #! Prefered Fortran Compiler - #! If None: try to find g77 or gfortran on the system +diff --git a/input/.mg5_configuration_default.txt b/input/.mg5_configuration_default.txt +index c089808..11ae192 100644 +--- a/input/.mg5_configuration_default.txt ++++ b/input/.mg5_configuration_default.txt +@@ -30,12 +30,14 @@ #! --# fortran_compiler = None -+fortran_compiler = gfortran + # fortran_compiler = None # f2py_compiler = None ++fortran_compiler = gfortran #! Prefered C++ Compiler #! If None: try to find g++ or clang on the system #! --# cpp_compiler = None + # cpp_compiler = None +cpp_compiler = g++ #! Prefered Text Editor #! Default: use the shell default Editor -@@ -53,20 +53,20 @@ - +@@ -54,12 +56,14 @@ #! Time allowed to answer question (if no answer takes default value) #! 0: No time limit --# timeout = 60 + # timeout = 60 +timeout = 0 #! Pythia8 path. #! Defines the path to the pythia8 installation directory (i.e. the #! on containing the lib, bin and include directories) . #! If using a relative path, that starts from the mg5 directory --# pythia8_path = ./HEPTools/pythia8 + # pythia8_path = ./HEPTools/pythia8 +pythia8_path = ${PYTHIA8_ROOT} #! MG5aMC_PY8_interface path #! Defines the path of the C++ driver file that is used by MG5_aMC to - #! steer the Pythia8 shower. +@@ -67,6 +71,7 @@ #! Can be installed directly from within MG5_aMC with the following command: #! MG5_aMC> install mg5amc_py8_interface --# mg5amc_py8_interface_path = ./HEPTools/MG5aMC_PY8_interface + # mg5amc_py8_interface_path = ./HEPTools/MG5aMC_PY8_interface +mg5amc_py8_interface_path = @MADGRAPH5AMCATNLO_ROOT@/HEPTools/MG5aMC_PY8_interface #! Herwig++/Herwig7 paths #! specify here the paths also to HepMC ant ThePEG -@@ -76,13 +76,13 @@ - #! then please set thepeg_path and hepmc_path to the same value as - #! hwpp_path +@@ -78,11 +83,15 @@ # hwpp_path = --# thepeg_path = --# hepmc_path = + # thepeg_path = + # hepmc_path = +thepeg_path = ${THEPEG_ROOT} +hepmc_path = ${HEPMC_ROOT} ++ #! Control when MG5 checks if he is up-to-date. #! Enter the number of day between two check (0 means never) #! A question is always asked before any update --# auto_update = 7 + # auto_update = 7 +auto_update = 0 ################################################################################ # INFO FOR MADEVENT / aMC@NLO -@@ -93,21 +93,20 @@ - +@@ -94,13 +103,15 @@ #! Allow/Forbid the automatic opening of the web browser (on the status page) #! when launching MadEvent [True/False] --# automatic_html_opening = True + # automatic_html_opening = True +automatic_html_opening = False #! allow notification of finished job in the notification center (Mac Only) --# notification_center = True + # notification_center = True - +notification_center = False #! Default Running mode #! 0: single machine/ 1: cluster / 2: multicore --# run_mode = 2 + # run_mode = 2 +run_mode = 1 #! Cluster Type [pbs|sge|condor|lsf|ge|slurm|htcaas|htcaas2] Use for cluster run only #! And cluster queue (or partition for slurm) - #! And size of the cluster (some part of the code can adapt splitting accordingly) --# cluster_type = condor --# cluster_queue = madgraph --# cluster_size = 150 +@@ -108,6 +119,9 @@ + # cluster_type = condor + # cluster_queue = madgraph + # cluster_size = 150 +cluster_type = lsf +cluster_queue = 1nh +cluster_size = 150 #! Path to a node directory to avoid direct writing on the central disk #! Note that condor clusters avoid direct writing by default (therefore this -@@ -132,7 +131,7 @@ - +@@ -133,6 +147,7 @@ #! Nb_core to use (None = all) This is use only for multicore run #! This correspond also to the number core used for code compilation for cluster mode --# nb_core = None + # nb_core = None +nb_core = 4 #! Pythia-PGS Package #! relative path start from main directory -@@ -161,11 +160,11 @@ - +@@ -162,10 +177,12 @@ #! lhapdf-config #! If None: try to find one available on the system --# lhapdf = lhapdf-config + # lhapdf = lhapdf-config +lhapdf = ${LHAPDF_ROOT}/bin/lhapdf-config #! fastjet-config #! If None: try to find one available on the system --# fastjet = fastjet-config + # fastjet = fastjet-config +fastjet = ${FASTJET_ROOT}/bin/fastjet-config #! MCatNLO-utilities #! relative path starting from main directory -@@ -178,14 +177,14 @@ - #! if auto: try to find it automatically on the system (default) +@@ -179,6 +196,7 @@ #! if '' or None: disabling pjfry #! if pjfry=/PATH/TO/pjfry/lib: use that specific installation path for PJFry++ --# pjfry = auto -+pjfry = None # + # pjfry = auto ++pjfry = None #! Set the Golem95 directory containing golem's library #! It only supports version higher than 1.3.0 - #! if auto: try to find it automatically on the system (default) +@@ -186,6 +204,7 @@ #! if '' or None: disabling Golem95 #! if golem=/PATH/TO/golem/lib: use that speficif installation path for Golem95 --# golem = auto -+golem = ${GOSAMCONTRIB_ROOT}/lib # + # golem = auto ++golem = ${GOSAMCONTRIB_ROOT}/lib #! Set the samurai directory containing samurai's library #! It only supports version higher than 2.0.0 -@@ -197,19 +196,19 @@ - #! Set the Ninja directory containing ninja's library +@@ -198,18 +217,21 @@ #! if '' or None: disabling ninja #! if ninja=/PATH/TO/ninja/lib: use that specific installation path for ninja --# ninja = ./HEPTools/lib + # ninja = ./HEPTools/lib +ninja = @MADGRAPH5AMCATNLO_ROOT@/HEPTools/lib #! Set the COLLIER directory containing COLLIER's library #! if '' or None: disabling COLLIER #! if ninja=/PATH/TO/ninja/lib: use that specific installation path for COLLIER # Note that it is necessary that you have generated a static library for COLLIER --# collier = ./HEPTools/lib + # collier = ./HEPTools/lib +collier = @MADGRAPH5AMCATNLO_ROOT@/HEPTools/lib #! Set how MadLoop dependencies (such as CutTools) should be handled #! > external : ML5 places a link to the MG5_aMC-wide libraries #! > internal : ML5 copies all dependencies in the output so that it is independent #! > environment_paths : ML5 searches for the dependencies in your environment path --# output_dependencies = external + # output_dependencies = external +output_dependencies = internal #! SysCalc PATH #! Path to the directory containing syscalc executables -@@ -220,4 +219,3 @@ - # applgrid = applgrid-config - # amcfast = amcfast-config - -- diff --git a/madgraph5amcatnlo.spec b/madgraph5amcatnlo.spec index 3a16c25374e..f89444c6bcc 100644 --- a/madgraph5amcatnlo.spec +++ b/madgraph5amcatnlo.spec @@ -1,12 +1,12 @@ -### RPM external madgraph5amcatnlo 2.6.0 -%define versiontag 2_6_0 +### RPM external madgraph5amcatnlo 2.6.7 +%define versiontag 2_6_7 +%define commit 307 Provides: perl(Compress::Zlib) Provides: perl(List::Util) +Source: http://cmsrep.cern.ch/cmssw/download/%{n}-%{realversion}.tgz #Source: https://launchpad.net/mg5amcnlo/2.0/2.5.x/+download/MG5_aMC_v%{realversion}.tar.gz -Source: https://launchpad.net/mg5amcnlo/2.0/2.6.x/+download/MG5_aMC_v%{realversion}.tar.gz +#Source: https://launchpad.net/mg5amcnlo/2.0/2.6.x/+download/MG5_aMC_v%{realversion}.tar.gz Patch0: madgraph5amcatnlo-config -# Compile and install internal and external packages -Patch1: madgraph5amcatnlo-compile Requires: python Requires: hepmc @@ -20,31 +20,19 @@ Requires: pythia8 Requires: thepeg %prep -%setup -n MG5_aMC_v%{versiontag} +%setup -n %{n}-%{realversion} %patch0 -p1 -%patch1 -p1 -sed -i -e "s|\${HEPMC_ROOT}|${HEPMC_ROOT}|g" input/mg5_configuration.txt -sed -i -e "s|\${PYTHIA8_ROOT}|${PYTHIA8_ROOT}|g" input/mg5_configuration.txt -sed -i -e "s|\${LHAPDF_ROOT}|${LHAPDF_ROOT}|g" input/mg5_configuration.txt -sed -i -e "s|\${FASTJET_ROOT}|${FASTJET_ROOT}|g" input/mg5_configuration.txt -sed -i -e "s|\${GOSAMCONTRIB_ROOT}|${GOSAMCONTRIB_ROOT}|g" input/mg5_configuration.txt -sed -i -e "s|\${THEPEG_ROOT}|${THEPEG_ROOT}|g" input/mg5_configuration.txt +sed -i -e "s|\${HEPMC_ROOT}|${HEPMC_ROOT}|g" input/.mg5_configuration_default.txt +sed -i -e "s|\${PYTHIA8_ROOT}|${PYTHIA8_ROOT}|g" input/.mg5_configuration_default.txt +sed -i -e "s|\${LHAPDF_ROOT}|${LHAPDF_ROOT}|g" input/.mg5_configuration_default.txt +sed -i -e "s|\${FASTJET_ROOT}|${FASTJET_ROOT}|g" input/.mg5_configuration_default.txt +sed -i -e "s|\${GOSAMCONTRIB_ROOT}|${GOSAMCONTRIB_ROOT}|g" input/.mg5_configuration_default.txt +sed -i -e "s|\${THEPEG_ROOT}|${THEPEG_ROOT}|g" input/.mg5_configuration_default.txt +sed -i -e "s|@MADGRAPH5AMCATNLO_ROOT@|%{i}|g" input/.mg5_configuration_default.txt %build export FC="$(which gfortran) -std=legacy" -# Save patched config -cp input/mg5_configuration.txt input/mg5_configuration_patched.txt - -# Compile in advance -chmod +x bin/compile.py -./bin/compile.py -# Remove compile script after compilation -rm bin/compile.py - -# Add back patched config after compilation since its get overwritten -# Save patched config -mv input/mg5_configuration_patched.txt input/mg5_configuration.txt # Start small NLO event generation to make sure that all additional packages are compiled cat < basiceventgeneration.txt @@ -59,12 +47,11 @@ EOF find . -type f -name '*.tgz' -delete %install -sed -i -e "s|@MADGRAPH5AMCATNLO_ROOT@|%{i}|g" input/mg5_configuration.txt -rsync -avh %{_builddir}/MG5_aMC_v%{versiontag}/ %{i}/ +rsync -avh %{_builddir}/%{n}-%{realversion}/ %{i}/ sed -ideleteme 's|#!.*/bin/python|#!/usr/bin/env python|' \ %{i}/Template/LO/bin/internal/addmasses_optional.py \ %{i}/madgraph/various/progressbar.py find %{i} -name '*deleteme' -delete %post -%{relocateConfig}input/mg5_configuration.txt +%{relocateConfig}input/.mg5_configuration_default.txt diff --git a/mcfm.spec b/mcfm.spec index abf07c28474..f20b951d30b 100644 --- a/mcfm.spec +++ b/mcfm.spec @@ -6,8 +6,6 @@ %define github_user cms-externals Source: git+https://github.com/%github_user/%{n}.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz -%define isaarch64 %(case %{cmsplatf} in (*_aarch64_*) echo 1 ;; (*) echo 0 ;; esac) - Patch0: mcfm-6.3-opt-for-size Requires: root @@ -17,10 +15,9 @@ Requires: root # This patch is needed as workaround for GCC PR63304 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63304 -%if 0%{isaarch64} +%ifarch aarch64 %patch0 -p1 %endif -#sed -i -e 's|gfortran|gfortran -std=legacy|' makefile QCDLoop/makefile %build mkdir -p obj diff --git a/mctester.spec b/mctester.spec index cde9a9899c5..e8c25edc742 100644 --- a/mctester.spec +++ b/mctester.spec @@ -12,7 +12,6 @@ BuildRequires: autotools %define keep_archives true -%define isdarwin %(case %{cmsos} in (osx*) echo 1 ;; (*) echo 0 ;; esac) %prep %setup -q -n %{n}/%{realversion} @@ -30,6 +29,6 @@ make %install make install -%if %isdarwin +%ifarch darwin find %i/lib -name "*.dylib" -exec install_name_tool -change '../lib/libHEPEvent.dylib' 'libHEPEvent.dylib' {} \; %endif diff --git a/md5.spec b/md5.spec index 819609f7484..934a3b2020e 100644 --- a/md5.spec +++ b/md5.spec @@ -2,7 +2,6 @@ %define tag d97a571864a119cd5408d2670d095b4410e926cc %define branch cms/1.0.0 %define github_user cms-externals -%define isdarwin %(case %{cmsos} in (osx*) echo 1 ;; (*) echo 0 ;; esac) Source: git+https://github.com/%github_user/%{n}.git?obj=%{branch}/%{tag}&export=%{n}.%{realversion}&output=/%{n}.%{realversion}-%{tag}.tgz %prep @@ -10,7 +9,7 @@ Source: git+https://github.com/%github_user/%{n}.git?obj=%{branch}/%{tag}&export %build -%if %isdarwin +%ifarch darwin gcc md5.c -shared -fPIC -o libcms-md5.dylib %else gcc md5.c -shared -fPIC -o libcms-md5.so diff --git a/meschach.spec b/meschach.spec index dc0219d3cfb..039b1b461d7 100644 --- a/meschach.spec +++ b/meschach.spec @@ -5,7 +5,6 @@ Patch1: meschach-1.2b-fPIC %define keep_archives true -%define isdarwin %(case %{cmsos} in (osx*) echo 1 ;; (*) echo 0 ;; esac) %prep %setup -c -n meschach-1.2 -a 0 @@ -14,7 +13,7 @@ Patch1: meschach-1.2b-fPIC %build # Just fix this by hand for MacOSX (the configure probably needs to be updated) -%if %isdarwin +%ifarch darwin perl -p -i -e "s|define HAVE_MALLOC_H 1|undef MALLOCDECL|g" machine.h %endif make diff --git a/openldap-toolfile.spec b/openldap-toolfile.spec index f4d5b16a4b9..1bdeb55afc5 100644 --- a/openldap-toolfile.spec +++ b/openldap-toolfile.spec @@ -13,7 +13,6 @@ cat << \EOF_TOOLFILE >%i/etc/scram.d/openldap.xml - EOF_TOOLFILE diff --git a/openldap.spec b/openldap.spec index 982fc9c8d52..140fadb59cf 100644 --- a/openldap.spec +++ b/openldap.spec @@ -1,7 +1,7 @@ ### RPM external openldap 2.4.45 ## INITENV +PATH LD_LIBRARY_PATH %i/lib Source: ftp://ftp.openldap.org/pub/OpenLDAP/%{n}-release/%{n}-%{realversion}.tgz -Requires: openssl db6 +Requires: db6 %prep %setup -q -n %{n}-%{realversion} @@ -9,8 +9,8 @@ Requires: openssl db6 %build # Update for AArch64 support rm -f ./build/config.{sub,guess} -curl -L -k -s -o ./build/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./build/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +%get_config_sub ./build/config.sub +%get_config_guess ./build/config.guess chmod +x ./build/config.{sub,guess} ./configure \ @@ -19,8 +19,8 @@ chmod +x ./build/config.{sub,guess} --with-tls=openssl \ --disable-static \ --disable-slapd \ - CPPFLAGS="-I${OPENSSL_ROOT}/include -I${DB6_ROOT}/include" \ - LDFLAGS="-L${OPENSSL_ROOT}/lib -L${DB6_ROOT}/lib" + CPPFLAGS="-I${DB6_ROOT}/include" \ + LDFLAGS="-L${DB6_ROOT}/lib" make depend make diff --git a/openssl-bootstrap.spec b/openssl-bootstrap.spec deleted file mode 100644 index 387b1d7bfaa..00000000000 --- a/openssl-bootstrap.spec +++ /dev/null @@ -1,96 +0,0 @@ -### RPM external openssl-bootstrap 1.0.2d -Source0: http://davidlt.web.cern.ch/davidlt/vault/openssl-1.0.2d-5675d07a144aa1a6c85f488a95aeea7854e86059.tar.bz2 - -# https://rt.openssl.org/Ticket/Display.html?id=3979&user=guest&pass=guest -Patch0: openssl-1.0.2d-pr3979 -# We want to pick CA certificates from /etc/pki/tls (openssldir), but we -# cannot install to a standard system location -Patch1: openssl-1.0.2d-disable-install-openssldir - -%prep -%setup -b 0 -n openssl-%{realversion} -%patch0 -p1 -%patch1 -p1 - -# Disable documenation -sed -ibak 's/install: all install_docs install_sw/install: all install_sw/g' Makefile.org Makefile - -case "%{cmsplatf}" in - slc6*) - # https://sourceware.org/glibc/wiki/Tips_and_Tricks/secure_getenv - grep -H -R 'secure_getenv(' * | cut -d':' -f1 | sort -u | xargs -t -n 1 sed -ibak 's;secure_getenv;__secure_getenv;g' - ;; -esac - -%build - -case "%{cmsplatf}" in - slc6_amd64_*) - RPM_OPT_FLAGS="-O2 -fPIC -g -pipe -Wall -Wa,--noexecstack -fno-strict-aliasing \ - -Wp,-DOPENSSL_USE_NEW_FUNCTIONS -Wp,-D_FORTIFY_SOURCE=2 -fexceptions \ - -fstack-protector --param=ssp-buffer-size=4 -mtune=generic" - ;; - *_aarch64_*|fc*) - RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wa,--noexecstack -DPURIFY" - ;; -esac - -case "%{cmsplatf}" in - osx*) target=darwin64-x86_64-cc ;; - *_aarch64_*) target=linux-aarch64 ;; - *_ppc64le_*) target=linux-ppc64le ;; - *_ppc64_*) target=linux-ppc64 ;; - *_amd64_*) target=linux-x86_64 ;; - *) target=linux-generic64 ;; -esac - -case "%{cmsplatf}" in - osx*) - cfg_args="-DOPENSSL_USE_NEW_FUNCTIONS" - ;; - *) - cfg_args="--with-krb5-flavor=MIT --with-krb5-dir=/usr enable-krb5 no-zlib --openssldir=/etc/pki/tls fips no-ec2m no-gost no-srp" - ;; -esac - -export RPM_OPT_FLAGS - -perl ./Configure ${target} ${cfg_args} enable-seed enable-tlsext enable-rfc3779 no-asm \ - no-idea no-mdc2 no-rc5 shared --prefix=%{i} - -case "%{cmsplatf}" in - *_aarch64_*|fc*|osx*) - make depend - ;; -esac - -make all - -%install -case "%{cmsplatf}" in - slc*_amd64_*) - RPM_OPT_FLAGS="-O2 -fPIC -g -pipe -Wall -Wa,--noexecstack -fno-strict-aliasing \ - -Wp,-DOPENSSL_USE_NEW_FUNCTIONS -Wp,-D_FORTIFY_SOURCE=2 -fexceptions \ - -fstack-protector --param=ssp-buffer-size=4 -mtune=generic" - ;; - *_aarch64_*|fc*) - RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wa,--noexecstack -DPURIFY" - ;; -esac - -export RPM_OPT_FLAGS - -make install - -rm -rf %{i}/lib/pkgconfig -# We remove archive libraries because otherwise we need to propagate everywhere -# their dependency on kerberos. -rm -rf %{i}/lib/*.a - -sed -ideleteme -e 's;^#!.*perl;#!/usr/bin/env perl;' \ - %{i}/bin/c_rehash -find %{i} -name '*deleteme' -type f -print0 | xargs -0 rm -f - -%post -%{relocateConfig}bin/c_rehash -%{relocateConfig}include/openssl/opensslconf.h diff --git a/openssl-toolfile.spec b/openssl-toolfile.spec index f0a78ba8a49..1392325e94a 100644 --- a/openssl-toolfile.spec +++ b/openssl-toolfile.spec @@ -1,24 +1,12 @@ ### RPM external openssl-toolfile 1.0 -Requires: openssl %prep - %build - %install mkdir -p %i/etc/scram.d cat << \EOF_TOOLFILE >%i/etc/scram.d/openssl.xml - + - - - - - - - EOF_TOOLFILE - -## IMPORT scram-tools-post diff --git a/openssl.spec b/openssl.spec deleted file mode 100644 index 5822408bdbc..00000000000 --- a/openssl.spec +++ /dev/null @@ -1,96 +0,0 @@ -### RPM external openssl 1.0.2d -Source0: http://davidlt.web.cern.ch/davidlt/vault/openssl-1.0.2d-5675d07a144aa1a6c85f488a95aeea7854e86059.tar.bz2 - -# https://rt.openssl.org/Ticket/Display.html?id=3979&user=guest&pass=guest -Patch0: openssl-1.0.2d-pr3979 -# We want to pick CA certificates from /etc/pki/tls (openssldir), but we -# cannot install to a standard system location -Patch1: openssl-1.0.2d-disable-install-openssldir - -%prep -%setup -b 0 -n openssl-%{realversion} -%patch0 -p1 -%patch1 -p1 - -# Disable documenation -sed -ibak 's/install: all install_docs install_sw/install: all install_sw/g' Makefile.org Makefile - -case "%{cmsplatf}" in - slc6*) - # https://sourceware.org/glibc/wiki/Tips_and_Tricks/secure_getenv - grep -H -R 'secure_getenv(' * | cut -d':' -f1 | sort -u | xargs -t -n 1 sed -ibak 's;secure_getenv;__secure_getenv;g' - ;; -esac - -%build - -case "%{cmsplatf}" in - slc6_amd64_*) - RPM_OPT_FLAGS="-O2 -fPIC -g -pipe -Wall -Wa,--noexecstack -fno-strict-aliasing \ - -Wp,-DOPENSSL_USE_NEW_FUNCTIONS -Wp,-D_FORTIFY_SOURCE=2 -fexceptions \ - -fstack-protector --param=ssp-buffer-size=4 -mtune=generic" - ;; - *_aarch64_*|fc*) - RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wa,--noexecstack -DPURIFY" - ;; -esac - -case "%{cmsplatf}" in - osx*) target=darwin64-x86_64-cc ;; - *_aarch64_*) target=linux-aarch64 ;; - *_ppc64le_*) target=linux-ppc64le ;; - *_ppc64_*) target=linux-ppc64 ;; - *_amd64_*) target=linux-x86_64 ;; - *) target=linux-generic64 ;; -esac - -case "%{cmsplatf}" in - osx*) - cfg_args="-DOPENSSL_USE_NEW_FUNCTIONS" - ;; - *) - cfg_args="--with-krb5-flavor=MIT --with-krb5-dir=/usr enable-krb5 no-zlib --openssldir=/etc/pki/tls fips no-ec2m no-gost no-srp" - ;; -esac - -export RPM_OPT_FLAGS - -perl ./Configure ${target} ${cfg_args} enable-seed enable-tlsext enable-rfc3779 no-asm \ - no-idea no-mdc2 no-rc5 shared --prefix=%{i} - -case "%{cmsplatf}" in - *_aarch64_*|fc*|osx*) - make depend - ;; -esac - -make all - -%install -case "%{cmsplatf}" in - slc*_amd64_*) - RPM_OPT_FLAGS="-O2 -fPIC -g -pipe -Wall -Wa,--noexecstack -fno-strict-aliasing \ - -Wp,-DOPENSSL_USE_NEW_FUNCTIONS -Wp,-D_FORTIFY_SOURCE=2 -fexceptions \ - -fstack-protector --param=ssp-buffer-size=4 -mtune=generic" - ;; - *_aarch64_*|fc*) - RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wa,--noexecstack -DPURIFY" - ;; -esac - -export RPM_OPT_FLAGS - -make install - -rm -rf %{i}/lib/pkgconfig -# We remove archive libraries because otherwise we need to propagate everywhere -# their dependency on kerberos. -rm -rf %{i}/lib/*.a - -sed -ideleteme -e 's;^#!.*perl;#!/usr/bin/env perl;' \ - %{i}/bin/c_rehash -find %{i} -name '*deleteme' -type f -print0 | xargs -0 rm -f - -%post -%{relocateConfig}bin/c_rehash -%{relocateConfig}include/openssl/opensslconf.h diff --git a/p5-dbd-oracle.spec b/p5-dbd-oracle.spec deleted file mode 100644 index f35ce4ac1e0..00000000000 --- a/p5-dbd-oracle.spec +++ /dev/null @@ -1,31 +0,0 @@ -### RPM external p5-dbd-oracle 1.23 -## INITENV +PATH PERL5LIB %i/lib/site_perl/%perlversion -## BUILDIF case $(uname):$(uname -m) in Linux:i*86 ) true ;; Linux:x86_64 ) true ;; Linux:ppc64 ) false ;; Darwin:* ) false ;; * ) false ;; esac -%define perlversion %(perl -e 'printf "%%vd", $^V') -%define perlarch %(perl -MConfig -e 'print $Config{archname}') -%define downloadn DBD-Oracle -%define closingbrace ) -%define online %(case %cmsplatf in *onl_*_*%closingbrace echo true;; *%closingbrace echo false;; esac) - -%if "%online" != "true" -Requires: oracle -Requires: p5-dbi -%else -Requires: onlinesystemtools -Provides: perl(DBI) -%endif - -Source0: http://mirror.switch.ch/ftp/mirror/CPAN/authors/id/P/PY/PYTHIAN/%downloadn-%{realversion}.tar.gz - -Provides: perl(Tk) perl(Tk::Balloon) perl(Tk::ErrorDialog) perl(Tk::FileSelect) perl(Tk::Pod) perl(Tk::ROText) - -%prep -%setup -T -b 0 -n %{downloadn}-%{realversion} - -%build -%ifos darwin -perl -p -i -e 's/NMEDIT = nmedit/NMEDIT = true/' Makefile.PL -%endif - -perl Makefile.PL PREFIX=%i LIB=%i/lib/site_perl/%perlversion -l -m $ORACLE_HOME/demo/demo.mk -h $ORACLE_HOME/include -make diff --git a/p5-dbi.spec b/p5-dbi.spec deleted file mode 100644 index 8de47e3cc59..00000000000 --- a/p5-dbi.spec +++ /dev/null @@ -1,42 +0,0 @@ -### RPM external p5-dbi 1.50-CMS19 -## INITENV +PATH PERL5LIB %i/lib/site_perl/%perlversion -%define perlversion %(perl -e 'printf "%%vd", $^V') -%define perlarch %(perl -MConfig -e 'print $Config{archname}') -%define downloadn DBI -## Let's fake the provides of windows stuff for the time being. -Provides: perl(RPC::PlClient) -Provides: perl(RPC::PlServer) -Provides: perl(Win32::ODBC) -Provides: libc.so.6(GLIBC_2.3)(64bit) - -Source: http://cpan.mirror.solnet.ch/authors/id/T/TI/TIMB/%{downloadn}-%{realversion}.tar.gz -%prep -%setup -n %downloadn-%{realversion} -%build -perl Makefile.PL PREFIX=%i LIB=%i/lib/site_perl/%perlversion -make -perl -p -i -e 's|^#!.*perl|#!/usr/bin/env perl|' blib/script/dbiprof -perl -p -i -e 's|^#!.*perl|#!/usr/bin/env perl|' blib/script/dbiproxy -perl -p -i -e 's|^#!.*perl|#!/usr/bin/env perl|' dbiprof -perl -p -i -e 's|^#!.*perl|#!/usr/bin/env perl|' dbiproxy - -case %{cmsos} in - slc4_ia32) - if ldd /usr/bin/gcc | grep -q /lib64/ - then - make install - mv %i/lib/site_perl/%perlversion/x86_64-linux-thread-multi %i/lib/site_perl/%perlversion/i386-linux-thread-multi - make clean - export PATH=/usr/bin/:$PATH - export GCC_EXEC_PREFIX=/usr/lib/gcc/ - perl Makefile.PL PREFIX=%i LIB=%i/lib/site_perl/%perlversion - make - perl -p -i -e 's|^#!.*perl|#!/usr/bin/env perl|' blib/script/dbiprof - perl -p -i -e 's|^#!.*perl|#!/usr/bin/env perl|' blib/script/dbiproxy - perl -p -i -e 's|^#!.*perl|#!/usr/bin/env perl|' dbiprof - perl -p -i -e 's|^#!.*perl|#!/usr/bin/env perl|' dbiproxy - fi;; - *) - ;; -esac -# diff --git a/p5-xml-parser.spec b/p5-xml-parser.spec deleted file mode 100644 index cbff269423c..00000000000 --- a/p5-xml-parser.spec +++ /dev/null @@ -1,74 +0,0 @@ -### RPM external p5-xml-parser 2.34-CMS19 -## INITENV +PATH PERL5LIB %i/lib/site_perl/%perlversion -%define perl /usr/bin/env perl -%if "%(echo %cmsplatf | cut -f1 -d_ | sed -e 's|\([A-Za-z]*\)[0-9]*|\1|')" == "osx" -%define perl /usr/bin/perl -%endif - -%define perlversion %(%perl -e 'printf "%%vd", $^V') -%define perlarch %(%perl -MConfig -e 'print $Config{archname}') -%define downloadn XML-Parser -%define expatversion 2.0.0 -Source0: http://mirror.switch.ch/ftp/mirror/CPAN/authors/id/M/MS/MSERGEANT/%{downloadn}-%{realversion}.tar.gz -Source1: http://dl.sourceforge.net/sourceforge/expat/expat-%expatversion.tar.gz -Provides: libc.so.6()(64bit) -Provides: libc.so.6(GLIBC_2.2.5)(64bit) - -%prep -%setup -T -b 0 -n %{downloadn}-%{realversion} -%setup -D -T -b 1 -n expat-%expatversion -%build -# We statically compile expat so that the perl module itself, -# and hence scram, do not depend on the expat rpm. -# This way we can change the expat version in CMSSW/externals -# without having to rebuild scram. -which gcc -rm -rf %_builddir/tmp -cd ../expat-%expatversion -mkdir -p %_builddir/tmp -./configure --prefix=%_builddir/tmp --disable-shared --enable-static --with-pic -make clean -make -make install -cd ../%{downloadn}-%{realversion} - -%perl Makefile.PL PREFIX=%i LIB=%i/lib/site_perl/%perlversion \ - EXPATLIBPATH=%_builddir/tmp/lib \ - EXPATINCPATH=%_builddir/tmp/include -make - -# If we are building on a machine which has a system compiler which -# can produce 64 bit binaries, than we also compile a 64 bit version -# of the module, so that scram can work also on 64bit platforms disguised -# as 32 bit via linux32. -case %{cmsos} in - slc4_ia32) - if ldd /usr/bin/gcc | grep -q /lib64/ - then - make install - mv %i/lib/site_perl/%perlversion/x86_64-linux-thread-multi %i/lib/site_perl/%perlversion/i386-linux-thread-multi - make clean - - export PATH=/usr/bin/:$PATH - export GCC_EXEC_PREFIX=/usr/lib/gcc/ - cd ../expat-%expatversion - CXX="/usr/bin/c++ -fPIC" CC="/usr/bin/gcc -fPIC" setarch x86_64 ./configure --prefix=%_builddir/tmp --bindir=%_builddir/tmp/bin/64 --libdir=%_builddir/tmp/lib64 --disable-shared --enable-static - echo "Building 64bit version" - setarch x86_64 make clean - setarch x86_64 make - setarch x86_64 make install - cd ../%{downloadn}-%{realversion} - %perl Makefile.PL PREFIX=%i LIB=%i/lib/site_perl/%perlversion \ - EXPATLIBPATH=%_builddir/tmp/lib64 \ - EXPATINCPATH=%_builddir/tmp/include - make - make install - else - make install - fi;; - *) - make install - ;; -esac - -%install diff --git a/pcre.spec b/pcre.spec index 768f99f5bcc..79b5c1f6e5a 100644 --- a/pcre.spec +++ b/pcre.spec @@ -1,4 +1,4 @@ -### RPM external pcre 8.37 +### RPM external pcre 8.43 Source0: http://downloads.sourceforge.net/%{n}/%{n}-%{realversion}.tar.bz2 Requires: bz2lib zlib @@ -18,15 +18,6 @@ make %install make install -# setup dependencies environment -rm -rf %{i}/etc/profile.d -mkdir -p %{i}/etc/profile.d -for x in %{pkgreqs}; do - case $x in /* ) continue ;; esac - p=%{instroot}/%{cmsplatf}/$(echo $x | sed 's/\([^+]*\)+\(.*\)+\([A-Z0-9].*\)/\1 \2 \3/' | tr ' ' '/') - echo ". $p/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh - echo "source $p/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh -done # Remove pkg-config to avoid rpm-generated dependency on /usr/bin/pkg-config # which we neither need nor use at this time. @@ -43,7 +34,3 @@ rm -f %{i}/lib/*.{l,}a %post %{relocateConfig}bin/pcre-config - -# The relocation is also needed because of dependencies -%{relocateConfig}etc/profile.d/dependencies-setup.sh -%{relocateConfig}etc/profile.d/dependencies-setup.csh diff --git a/photospp.spec b/photospp.spec index 3a4a3f7f2fd..197661b3b32 100644 --- a/photospp.spec +++ b/photospp.spec @@ -11,8 +11,8 @@ Source: http://service-spi.web.cern.ch/service-spi/external/MCGenerators/distrib # Update to detect aarch64 and ppc64le rm -f ./config/config.{sub,guess} -curl -L -k -s -o ./config/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./config/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +%get_config_sub ./config/config.sub +%get_config_guess ./config/config.guess chmod +x ./config/config.{sub,guess} export HEPMCLOCATION=${HEPMC_ROOT} diff --git a/pip/cryptography.file b/pip/cryptography.file index 97d1f0c91eb..7b019cdb0c4 100644 --- a/pip/cryptography.file +++ b/pip/cryptography.file @@ -1,3 +1 @@ -Requires: openssl py2-cffi py2-asn1crypto py2-enum34 py2-idna py2-ipaddress py2-six -%define PipPreBuild export LDFLAGS="-L${OPENSSL_ROOT}/lib"; \ - export CFLAGS="-I${OPENSSL_ROOT}/include" +Requires: py2-cffi py2-asn1crypto py2-enum34 py2-idna py2-ipaddress py2-six diff --git a/pip/pycurl.file b/pip/pycurl.file index d5f0bd67d79..bf4c3c677f7 100644 --- a/pip/pycurl.file +++ b/pip/pycurl.file @@ -1,5 +1,2 @@ -%define PipBuildOptions --global-option="--with-openssl" --global-option="--openssl-dir=${OPENSSL_ROOT}" %define pip_name pycurl -%define PipPreBuild export PYCURL_SSL_LIBRARY=openssl - -Requires: curl openssl +Requires: curl diff --git a/pip/python-ldap.file b/pip/python-ldap.file index fec850ea94e..3fc6cda8d3e 100644 --- a/pip/python-ldap.file +++ b/pip/python-ldap.file @@ -1,2 +1,2 @@ -Requires: python openssl openldap py2-pyasn1-modules -%define PipBuildOptions --global-option=build_ext --global-option="-L${OPENSSL_ROOT}/lib" --global-option="-L${PYTHON_ROOT}/lib" --global-option="-L${OPENLDAP_ROOT}/lib" --global-option="-I${OPENSSL_ROOT}/include" --global-option="-I${PYTHON_ROOT}/include" --global-option="-I${OPENLDAP_ROOT}/include" --global-option="-UHAVE_SASL" +Requires: python openldap py2-pyasn1-modules +%define PipBuildOptions --global-option=build_ext --global-option="-L${PYTHON_ROOT}/lib" --global-option="-L${OPENLDAP_ROOT}/lib" --global-option="-I${PYTHON_ROOT}/include" --global-option="-I${OPENLDAP_ROOT}/include" --global-option="-UHAVE_SASL" diff --git a/pip/requirements.txt b/pip/requirements.txt index a2f97f46931..3dd277b0b5f 100644 --- a/pip/requirements.txt +++ b/pip/requirements.txt @@ -165,7 +165,7 @@ prettytable==0.7.2 prometheus_client==0.7.1 prompt_toolkit==1.0.16 ; python_version<'3.0' prompt_toolkit==2.0.9 ; python_version>'3.0' -protobuf==3.9.2 +protobuf==3.10.0 prwlock==0.4.0 psutil==5.6.3 ptyprocess==0.6.0 @@ -231,10 +231,11 @@ tensorflow==1.6.0 ; python_version<'3.0' tensorflow==1.6.0 ; python_version>'3.0' termcolor==1.1.0 terminado==0.8.2 +#NO_AUTO_UPDATE:1: version of testpath is hardcoded in testpath.file. Update there also to point to latest source testpath==0.4.2 theanets==0.7.3 Theano==1.0.4 -thriftpy==0.3.9 +thriftpy==0.3.9 ; python_version<'3.0' tornado==5.1.1 ; python_version<'3.0' tornado==6.0.3 ; python_version>'3.0' tqdm==4.36.1 diff --git a/pip/testpath.file b/pip/testpath.file index aff83eca96e..2a20864df10 100644 --- a/pip/testpath.file +++ b/pip/testpath.file @@ -1 +1,2 @@ -%define PipDownloadSourceType none +%define source0 https://files.pythonhosted.org/packages/06/30/9a7e917066d851d8b4117e85794b5f14516419ea714a8a2681ec6aa8a981/testpath-0.4.2.tar.gz +%define patchsrc rm -f testpath/cli-*.exe diff --git a/protobuf.spec b/protobuf.spec index 6cc9c97786d..ecd24e239fe 100644 --- a/protobuf.spec +++ b/protobuf.spec @@ -25,21 +25,16 @@ BuildRequires: autotools %build ./autogen.sh # Update to detect aarch64 and ppc64le -rm -f ./config.{sub,guess} -curl -L -k -s -o ./config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +rm -f ./config.{sub,guess} ./gmock/gtest/build-aux/config.{sub,guess} ./gmock/build-aux/config.{sub,guess} +%get_config_sub ./config.sub +%get_config_guess ./config.guess chmod +x ./config.{sub,guess} +cp ./config.sub ./gmock/gtest/build-aux/config.sub +cp ./config.guess ./gmock/gtest/build-aux/config.guess +cp ./config.sub ./gmock/build-aux/config.sub +cp ./config.guess ./gmock/build-aux/config.guess -rm -f ./gmock/gtest/build-aux/config.{sub,guess} -curl -L -k -s -o ./gmock/gtest/build-aux/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./gmock/gtest/build-aux/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -chmod +x ./gmock/gtest/build-aux/config.{sub,guess} - -rm -f ./gmock/build-aux/config.{sub,guess} -curl -L -k -s -o ./gmock/build-aux/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./gmock/build-aux/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -chmod +x ./gmock/build-aux/config.{sub,guess} ./configure --prefix %{i} \ --disable-static \ --disable-dependency-tracking \ diff --git a/py2-dxr.spec b/py2-dxr.spec index d161953b6a7..097f8200170 100644 --- a/py2-dxr.spec +++ b/py2-dxr.spec @@ -2,7 +2,6 @@ ## INITENV +PATH PYTHON27PATH %i/${PYTHON_LIB_SITE_PACKAGES} ## INITENV +PATH PYTHON3PATH %i/${PYTHON3_LIB_SITE_PACKAGES} Requires: python python3 zlib py2-setuptools py2-pysqlite llvm sqlite -%define isdarwin %(case %{cmsos} in (osx*) echo 1 ;; (*) echo 0 ;; esac) %define dxrCommit 6ea764102a %define triliteCommit e64a2a1 %define re2Version 20140304 @@ -43,7 +42,7 @@ mv trilite-%triliteCommit/* trilite # GCC + libstdc++. The ABIs are different, thus correct # it accordingly. # https://code.google.com/p/re2/issues/detail?id=99 -%if %isdarwin +%ifarch darwin sed -ibak 's;__ZlsRNSt3__113basic_ostreamIcNS_11char_traitsIcEEEERKN3re211StringPieceE;__ZlsRSoRKN3re211StringPieceE;' ./trilite/re2/libre2.symbols.darwin %endif diff --git a/py2-pip.spec b/py2-pip.spec index 5a69e64c070..3ec169efc4b 100644 --- a/py2-pip.spec +++ b/py2-pip.spec @@ -13,27 +13,11 @@ Requires: python py2-setuptools python3 %build python3 setup.py build -python setup.py build +python2 setup.py build %install python3 setup.py install --single-version-externally-managed --record=/dev/null --prefix=%{i} -python setup.py install --single-version-externally-managed --record=/dev/null --prefix=%{i} +python2 setup.py install --single-version-externally-managed --record=/dev/null --prefix=%{i} %{relocatePy3SitePackages} %{relocatePy2SitePackages} perl -p -i -e "s|^#!.*python|#!/usr/bin/env python|" %{i}/bin/* - -# Generate dependencies-setup.{sh,csh} so init.{sh,csh} picks full environment. -mkdir -p %i/etc/profile.d -: > %i/etc/profile.d/dependencies-setup.sh -: > %i/etc/profile.d/dependencies-setup.csh -for tool in $(echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'); do - root=$(echo $tool | tr a-z- A-Z_)_ROOT; eval r=\$$root - if [ X"$r" != X ] && [ -r "$r/etc/profile.d/init.sh" ]; then - echo "test X\$$root != X || . $r/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh - echo "test \$?$root != 0 || source $r/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh - fi -done - -%post -%{relocateConfig}etc/profile.d/dependencies-setup.sh -%{relocateConfig}etc/profile.d/dependencies-setup.csh diff --git a/py2-setuptools.spec b/py2-setuptools.spec index 69e3c1c3d45..1695b029882 100644 --- a/py2-setuptools.spec +++ b/py2-setuptools.spec @@ -10,6 +10,8 @@ Requires: python python3 %setup -n setuptools-%{realversion} %build +which python +which python3 python bootstrap.py python3 setup.py build python setup.py build @@ -19,5 +21,5 @@ python3 setup.py install --single-version-externally-managed --record=/dev/null python setup.py install --single-version-externally-managed --record=/dev/null --skip-build --prefix=%{i} sed -i 's|#!.*/bin/python|#!/usr/bin/env python|' %{i}/bin/easy_install* sed -i 's|#!.*python.*|#!/usr/bin/env python3|' \ - %{i}/lib/python3.6/site-packages/setuptools/command/easy_install.py \ - %{i}/lib/python3.6/site-packages/pkg_resources/_vendor/appdirs.py + %{i}/${PYTHON3_LIB_SITE_PACKAGES}/setuptools/command/easy_install.py \ + %{i}/${PYTHON3_LIB_SITE_PACKAGES}/pkg_resources/_vendor/appdirs.py diff --git a/pythia6.spec b/pythia6.spec index 9e30e97dd0c..e9a68e28e95 100644 --- a/pythia6.spec +++ b/pythia6.spec @@ -22,8 +22,8 @@ esac # Update to detect aarch64 and ppc64le rm -f ./config/config.{sub,guess} -curl -L -k -s -o ./config/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./config/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +%get_config_sub ./config/config.sub +%get_config_guess ./config/config.guess chmod +x ./config/config.{sub,guess} # Unfortunately we need the two cases because LDFLAGS= does not work on linux diff --git a/python.spec b/python.spec index ca6f61dfb1b..e0abcd31e8b 100644 --- a/python.spec +++ b/python.spec @@ -1,12 +1,12 @@ -### RPM external python 2.7.15 +### RPM external python 2.7.16 ## INITENV +PATH PATH %{i}/bin ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib ## INITENV SETV PYTHON_LIB_SITE_PACKAGES lib/python%{python_major_version}/site-packages ## INITENV SETV PYTHONHASHSEED random # OS X patches and build fudging stolen from fink %{expand:%%define python_major_version %(echo %realversion | cut -d. -f1,2)} - -Requires: expat bz2lib db6 gdbm openssl libffi +Provides: python(abi) +Requires: expat bz2lib db6 gdbm libffi Requires: zlib sqlite # FIXME: readline, crypt @@ -50,7 +50,7 @@ done mkdir -p %{i}/{include,lib,bin} -dirs="${EXPAT_ROOT} ${BZ2LIB_ROOT} ${DB6_ROOT} ${GDBM_ROOT} ${OPENSSL_ROOT} ${LIBFFI_ROOT} ${ZLIB_ROOT} ${SQLITE_ROOT}" +dirs="${EXPAT_ROOT} ${BZ2LIB_ROOT} ${DB6_ROOT} ${GDBM_ROOT} ${LIBFFI_ROOT} ${ZLIB_ROOT} ${SQLITE_ROOT}" # We need to export it because setup.py now uses it to determine the actual # location of DB4, this was needed to avoid having it picked up from the system. @@ -184,18 +184,6 @@ cp %{SOURCE1} %{i}/share/valgrind/valgrind-python.supp # Remove .pyo files find %i -name '*.pyo' -exec rm {} \; -# Generate dependencies-setup.{sh,csh} so init.{sh,csh} picks full environment. -mkdir -p %i/etc/profile.d -: > %i/etc/profile.d/dependencies-setup.sh -: > %i/etc/profile.d/dependencies-setup.csh -for tool in $(echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'); do - root=$(echo $tool | tr a-z- A-Z_)_ROOT; eval r=\$$root - if [ X"$r" != X ] && [ -r "$r/etc/profile.d/init.sh" ]; then - echo "test X\$$root != X || . $r/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh - echo "test \$?$root != 0 || source $r/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh - fi -done - echo "from os import environ" > %i/lib/python2.7/sitecustomize.py echo "if 'PYTHON27PATH' in environ:" >> %i/lib/python2.7/sitecustomize.py echo " import os,site" >> %i/lib/python2.7/sitecustomize.py @@ -206,4 +194,3 @@ echo " site.addsitedir(p)">> %i/lib/python2.7/sitecustomize.py %post %{relocateConfig}lib/python2.7/config/Makefile %{relocateConfig}lib/python2.7/_sysconfigdata.py -%{relocateConfig}etc/profile.d/dependencies-setup.*sh diff --git a/python3.spec b/python3.spec index 07e03d2eed3..3bb57ae0126 100644 --- a/python3.spec +++ b/python3.spec @@ -1,4 +1,4 @@ -### RPM external python3 3.6.4 +### RPM external python3 3.6.9 ## INITENV +PATH PATH %{i}/bin ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib ## INITENV SETV PYTHON3_LIB_SITE_PACKAGES lib/python%{pythonv}/site-packages @@ -6,8 +6,8 @@ # OS X patches and build fudging stolen from fink %define pythonv %(echo %realversion | cut -d. -f 1,2) %define python_major %(echo %realversion | cut -d. -f 1) - -Requires: expat bz2lib db6 gdbm openssl libffi zlib sqlite +Provides: python(abi) +Requires: expat bz2lib db6 gdbm libffi zlib sqlite libuuid Source: https://www.python.org/ftp/python/%realversion/Python-%realversion.tgz @@ -25,9 +25,10 @@ export LIBFFI_ROOT # Python's configure parses LDFLAGS and CPPFLAGS to look for aditional library and include directories LDFLAGS="" CPPFLAGS="" -for d in ${EXPAT_ROOT} ${BZ2LIB_ROOT} ${DB6_ROOT} ${GDBM_ROOT} ${OPENSSL_ROOT} ${LIBFFI_ROOT} ${ZLIB_ROOT} ${SQLITE_ROOT}; do - LDFLAGS="$LDFLAGS -L$d/lib -L$d/lib64" - CPPFLAGS="$CPPFLAGS -I$d/include" +for d in ${EXPAT_ROOT} ${BZ2LIB_ROOT} ${DB6_ROOT} ${GDBM_ROOT} ${LIBFFI_ROOT} ${ZLIB_ROOT} ${SQLITE_ROOT} ${LIBUUID_ROOT}; do + [ -e $d/lib ] && LDFLAGS="$LDFLAGS -L$d/lib" + [ -e $d/lib64 ] && LDFLAGS="$LDFLAGS -L$d/lib64" + [ -e $d/include ] && CPPFLAGS="$CPPFLAGS -I$d/include" done ./configure \ @@ -54,18 +55,6 @@ find %i -name '*.py' -perm +0111 | while read f; do if head -n1 $f | grep -q '"'; then chmod -x $f; else :; fi done -# Generate dependencies-setup.{sh,csh} so init.{sh,csh} picks full environment. -mkdir -p %i/etc/profile.d -: > %i/etc/profile.d/dependencies-setup.sh -: > %i/etc/profile.d/dependencies-setup.csh -for tool in $(echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'); do - root=$(echo $tool | tr a-z- A-Z_)_ROOT; eval r=\$$root - if [ X"$r" != X ] && [ -r "$r/etc/profile.d/init.sh" ]; then - echo "test X\$$root != X || . $r/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh - echo "test \$?$root != 0 || source $r/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh - fi -done - # Remove .pyo files find %i -name '*.pyo' -exec rm {} \; @@ -78,13 +67,8 @@ echo " import os,site" >> %i/lib/python%{pythonv}/sitecustomize.py echo " for p in environ['PYTHON3PATH'].split(os.pathsep):">> %i/lib/python%{pythonv}/sitecustomize.py echo " site.addsitedir(p)">> %i/lib/python%{pythonv}/sitecustomize.py - - - %post %{relocateConfig}bin/python*-config %{relocateConfig}lib/pkgconfig/python*.pc %{relocateConfig}lib/python*/config-*/Makefile %{relocateConfig}lib/python*/_sysconfigdata*.py -%{relocateConfig}etc/profile.d/dependencies-setup.csh -%{relocateConfig}etc/profile.d/dependencies-setup.sh diff --git a/python_tools.spec b/python_tools.spec index a64833e3d0c..0925635073c 100644 --- a/python_tools.spec +++ b/python_tools.spec @@ -4,9 +4,6 @@ Source: none Requires: root curl python python3 xrootd llvm hdf5 - -%define isslc7 %(case %{cmsplatf} in (slc7_amd64*) echo 1 ;; (*) echo 0 ;; esac) -%define isamd64 %(case %{cmsplatf} in (*amd64*) echo 1 ;; (*) echo 0 ;; esac) Requires: py2-scipy Requires: py2-Keras Requires: py2-Theano @@ -142,7 +139,7 @@ Requires: py2-dxr-toolfile Requires: py2-PyYAML Requires: py2-pylint Requires: py2-pip -%if %isamd64 +%ifarch x86_64 Requires: py2-cx-Oracle %endif Requires: py2-cython diff --git a/qd.spec b/qd.spec index 518d65d6b94..1a78e838b21 100644 --- a/qd.spec +++ b/qd.spec @@ -6,8 +6,8 @@ Source: http://crd.lbl.gov/~dhbailey/mpdist/qd-%{realversion}.tar.gz # Update to detect aarch64 and ppc64le rm -f ./config/config.{sub,guess} -curl -L -k -s -o ./config/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./config/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +%get_config_sub ./config/config.sub +%get_config_guess ./config/config.guess chmod +x ./config/config.{sub,guess} ./configure --prefix=%{i} --enable-shared diff --git a/qt-toolfile.spec b/qt-toolfile.spec deleted file mode 100644 index 20c96b0606f..00000000000 --- a/qt-toolfile.spec +++ /dev/null @@ -1,87 +0,0 @@ -### RPM external qt-toolfile 1.0 -Requires: qt -%prep - -%build - -%install - -mkdir -p %i/etc/scram.d -cat << \EOF_TOOLFILE >%i/etc/scram.d/qtbase.xml - - - - - - - - - - - - - - - - - - - - - - - - -EOF_TOOLFILE - -cat << \EOF_TOOLFILE >%i/etc/scram.d/qt3support.xml - - - - - - - - - - - - -EOF_TOOLFILE - -cat << \EOF_TOOLFILE >%i/etc/scram.d/qt.xml - - - - - - - - - - - - - - - - - -EOF_TOOLFILE - -cat << \EOF_TOOLFILE >%i/etc/scram.d/qtdesigner.xml - - - - - - - - - - - - -EOF_TOOLFILE - -## IMPORT scram-tools-post diff --git a/qt.spec b/qt.spec deleted file mode 100644 index 7f42736b43a..00000000000 --- a/qt.spec +++ /dev/null @@ -1,83 +0,0 @@ -### RPM external qt 4.8.7 -## INITENV UNSET QMAKESPEC -## INITENV SET QTDIR %i - -Requires: libjpeg-turbo -Source0: http://download.qt.io/official_releases/qt/4.8/%{realversion}/qt-everywhere-opensource-src-%{realversion}.tar.gz -Patch0: qt-everywhere-opensource-src-4.8.7-gcc6 - -%define strip_files %i/lib %i/bin - -%prep -%setup -T -b 0 -n %n-everywhere-opensource-src-%{realversion} -%patch0 -p1 - -%build -unset QMAKESPEC || true -export QTDIR=$PWD -export PATH=$QTDIR/bin:$PATH -export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH -export DYLD_LIBRARY_PATH=$QTDIR/lib:$DYLD_LIBRARY_PATH -export MAKEFLAGS="%{makeprocesses}" - -case %cmsplatf in - slc*) - export CONFIG_ARGS="-platform linux-g++" - ;; - osx*) - export CONFIG_ARGS="-no-framework -arch x86_64" - ;; -esac - -# Force system compiler also when using gcc 4.6.1 ++ on mac. This is required -# because the mainline compiler does not support a bunch of objective-c 2.0 -# features which are heavily used in Qt/Cocoa. -case %cmsplatf in - osx*) - if [ xcode-select -print-path ]; then - CMS_XCODE_ROOT="`xcode-select -print-path`" - fi - export PATH=$CMS_XCODE_ROOT/usr/bin:$PATH - export CXX="$CMS_XCODE_ROOT/usr/bin/llvm-g++-4.2" - export CC="$CMS_XCODE_ROOT/usr/bin/llvm-gcc-4.2" - export LD="$CMS_XCODE_ROOT/usr/bin/llvm-g++-4.2" - export LINK="$CMS_XCODE_ROOT/usr/bin/llvm-g++-4.2" - ;; -esac - -rm -rf demos examples doc -echo yes | ./configure -prefix %i -opensource -stl -no-openssl -no-webkit -no-debug \ - -L$LIBJPEG_TURBO_ROOT/lib64 -no-glib -no-libtiff -no-libpng -no-libmng \ - -no-dwarf2 -no-phonon -no-multimedia -no-stl -no-exceptions \ - -no-separate-debug-info -no-multimedia -no-sql-sqlite -no-sql-odbc \ - -no-javascript-jit -no-script -no-scripttools -no-avx -no-rpath \ - -no-sql-psql -no-sql-mysql $CONFIG_ARGS \ - -make "libs tools" - -make %makeprocesses - -%install -make install -# We remove pkg-config files for two reasons: -# * it's actually not required (macosx does not even have it). -# * rpm 4.8 adds a dependency on the system /usr/bin/pkg-config -# on linux. -# In the case at some point we build a package that can be build -# only via pkg-config we have to think on how to ship our own -# version. -rm -rf %i/lib/pkgconfig -rm -rf %i/lib/*.la - -# Qt itself has some paths that can only be overwritten by -# using an appropriate `qt.conf`. -# Without this qmake will complain whenever used in -# a directory different than the build one. -mkdir -p %i/bin -cat << \EOF_QT_CONF >%i/bin/qt.conf -[Paths] -Prefix = %{i} -EOF_QT_CONF - -%post -%{relocateConfig}bin/qt.conf -%{relocateConfig}mkspecs/qconfig.pri diff --git a/rivet.spec b/rivet.spec index b1097ef6e41..536c0e26653 100644 --- a/rivet.spec +++ b/rivet.spec @@ -23,8 +23,8 @@ for sty in ./doc/*.sty; do cp ${sty} ./data/texmf/tex/latex/${sty:6:-4}; done # Update config.{guess,sub} to detect aarch64 and ppc64le rm -f %{_tmppath}/config.{sub,guess} -curl -L -k -s -o %{_tmppath}/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -curl -L -k -s -o %{_tmppath}/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' +%get_config_guess %{_tmppath}/config.guess +%get_config_sub %{_tmppath}/config.sub for CONFIG_GUESS_FILE in $(find $RPM_BUILD_DIR -name 'config.guess') do rm -f $CONFIG_GUESS_FILE diff --git a/root.spec b/root.spec index 565448c1365..572dc57207c 100644 --- a/root.spec +++ b/root.spec @@ -7,19 +7,16 @@ %define github_user cms-sw Source: git+https://github.com/%{github_user}/root.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz -%define islinux %(case %{cmsos} in (slc*|fc*) echo 1 ;; (*) echo 0 ;; esac) -%define isdarwin %(case %{cmsos} in (osx*) echo 1 ;; (*) echo 0 ;; esac) - BuildRequires: cmake ninja -Requires: gsl libjpeg-turbo libpng libtiff giflib pcre python fftw3 xz xrootd libxml2 openssl zlib davix tbb OpenBLAS py2-numpy lz4 freetype +Requires: gsl libjpeg-turbo libpng libtiff giflib pcre python fftw3 xz xrootd libxml2 zlib davix tbb OpenBLAS py2-numpy lz4 freetype -%if %islinux +%ifos linux Requires: dcap %endif %define soext so -%if %isdarwin +%ifarch darwin %define soext dylib %endif @@ -82,14 +79,12 @@ cmake ../%{n}-%{realversion} \ -DGSL_CONFIG_EXECUTABLE="$(which gsl-config)" \ -Dcxx17=ON \ -Dssl=ON \ - -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT}" \ - -DOPENSSL_INCLUDE_DIR="${OPENSSL_ROOT}/include" \ -Dpython=ON \ -Dxrootd=ON \ -Dbuiltin_xrootd=OFF \ -DXROOTD_INCLUDE_DIR="${XROOTD_ROOT}/include/xrootd" \ -DXROOTD_ROOT_DIR="${XROOTD_ROOT}" \ -%if %islinux +%ifos linux -Drfio=OFF \ -Dcastor=OFF \ -Ddcache=ON \ @@ -112,7 +107,7 @@ cmake ../%{n}-%{realversion} \ -Dsapdb=OFF \ -Dalien=OFF \ -Dmonalisa=OFF \ -%if %isdarwin +%ifarch darwin -Dbuiltin_afterimage=OFF \ -Dcocoa=OFF \ -Dx11=ON \ @@ -133,7 +128,7 @@ cmake ../%{n}-%{realversion} \ -DLIBLZ4_LIBRARY="${LZ4_ROOT}/lib/liblz4.%{soext}" \ -DZLIB_ROOT="${ZLIB_ROOT}" \ -DZLIB_INCLUDE_DIR="${ZLIB_ROOT}/include" \ - -DCMAKE_PREFIX_PATH="${XZ_ROOT};${OPENSSL_ROOT};${GIFLIB_ROOT};${FREETYPE_ROOT};${PYTHON_ROOT};${LIBPNG_ROOT};${PCRE_ROOT};${TBB_ROOT};${OPENBLAS_ROOT};${DAVIX_ROOT};${LZ4_ROOT};${LIBXML2_ROOT}" + -DCMAKE_PREFIX_PATH="${XZ_ROOT};${GIFLIB_ROOT};${FREETYPE_ROOT};${PYTHON_ROOT};${LIBPNG_ROOT};${PCRE_ROOT};${TBB_ROOT};${OPENBLAS_ROOT};${DAVIX_ROOT};${LZ4_ROOT};${LIBXML2_ROOT}" # For CMake cache variables: http://www.cmake.org/cmake/help/v3.2/manual/cmake-language.7.html#lists # For environment variables it's OS specific: http://www.cmake.org/Wiki/CMake_Useful_Variables diff --git a/rpm-preamble.file b/rpm-preamble.file index 7e916e5796e..aa4e4b2a378 100644 --- a/rpm-preamble.file +++ b/rpm-preamble.file @@ -6,6 +6,12 @@ #built with empty buildroot. %define __os_install_post %{nil} %define __spec_install_post %{nil} +%define __spec_install_pre %{___build_pre} +%define _empty_manifest_terminate_build 0 +%define _use_internal_dependency_generator 0 +%define _source_payload w9.gzdio +%define _binary_payload w9.gzdio + #disable running find-debuginfo.sh %define debug_package %{nil} @@ -15,7 +21,7 @@ # Preliminarily define where things go. These are the places we # know even without knowing the architecture yet. In particular -# we need %_specdir to find "cmsos" to determine the architecture. +# we need _specdir to find "cmsos" to determine the architecture. # Note that we define the values all here, but some of them are # not actually usable until we've managed to defined %cmsplatf. # @@ -77,7 +83,6 @@ %define pkginstroot %{instroot}/%{pkgrel} -#define _rpmdbdir %{cmsroot}/RPMDB %define _sourcedir %{cmsroot}/SOURCES/%{pkgdir} %define _builddir %{cmsroot}/BUILD/%{cmsplatf}/%{pkgdir} %define _specdir %{cmsroot}/SPECS/%{pkgdir} @@ -97,19 +102,6 @@ %define _rpmfilename %{cmsplatf}/%%{name}-%%{version}-%%{release}.%{cmsplatf}.rpm %define _srpmfilename %%{name}-%%{version}-%%{release}.src.rpm - - -# Force use of system gcc on darwin. Set/unset as necessary -- but -# then make sure the right compiler gets picked up in the environment -# by setting $PATH and $LD_LIBRARY_PATH correctly. -%ifos darwin -%define is_darwin true -%endif - -%if "%{?is_darwin:set}-%gccver" == "set-4.2.1" -%define use_system_gcc true -%endif - # Old version of install.sh/cmsBuild.sh did not set the cmscompiler variable, # while cmsBuild does, in order to support compilers different other than # gcc. For this reason we add a check to avoid setting cmscompiler in @@ -168,7 +160,7 @@ %define __check_files %{nil} %define debug_package %{nil} -# define ARCH %{cmsplatf}? +# define ARCH {cmsplatf}? # No BuildRoot # No %buildsubdir # No Distribution: @@ -236,12 +228,12 @@ %define relocateCmsPkg perl -p -i -e "s|\\Q%{instroot}\\E|%{cmsroot}|g;s|\\Q%{cmsroot}\\E|$CMS_INSTALL_PREFIX|g" $RPM_INSTALL_PREFIX/%{pkgrel}/ %define relocateConfig %relocateCmsPkg %define relocatePy3SitePackages \ - for py in $(grep -Rl -m1 '^#\!.*python' %{i}/${PYTHON3_LIB_SITE_PACKAGES}) ; do \ + for py in $(grep -Rl -m1 '^#\!.*python' %{i}/${PYTHON3_LIB_SITE_PACKAGES} | grep -v '\.pyc$') ; do \ lnum=$(grep -n -m1 '^#\!.*python' $py | sed 's|:.*||') \ sed -i -e "${lnum}c#!/usr/bin/env python3" $py \ done %define relocatePy2SitePackages \ - for py in $(grep -Rl -m1 '^#\!.*python' %{i}/${PYTHON_LIB_SITE_PACKAGES}) ; do \ + for py in $(grep -Rl -m1 '^#\!.*python' %{i}/${PYTHON_LIB_SITE_PACKAGES} | grep -v '\.pyc') ; do \ lnum=$(grep -n -m1 '^#\!.*python' $py | sed 's|:.*||') \ sed -i -e "${lnum}c#!/usr/bin/env python" $py \ done @@ -278,3 +270,17 @@ if [ -f $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/.autodependencies ] ; then \ %{relocateConfig}etc/profile.d/dependencies-setup.sh \ %{relocateConfig}etc/profile.d/dependencies-setup.csh \ fi +#Some special urls to gets config.sub/cofngi.guess +%define get_cmsrep_cache() curl -L -k -s -o %1 http://cmsrep.cern.ch/cmssw/download/%2 +%define get_config_guess() %get_cmsrep_cache %1 config/config.guess +%define get_config_sub() %get_cmsrep_cache %1 config/config.sub + +#Some help macros to check for OS and ARCH +%define isslc %(case %{cmsos} in (slc*|cc*) echo 1 ;; (*) echo 0 ;; esac) + +#Use the following without {} e.g 'isos cc*' instead of '{isos} cc*' +%define is_cmsos %(case %{cmsos} in (%1_*) echo 1 ;; (*) echo 0 ;; esac) +%define is_ncmsos %(case %{cmsos} in (%1_*) echo 0 ;; (*) echo 1 ;; esac) +%define is_cmsarch %(case %{cmsos} in (*_%1) echo 1 ;; (*) echo 0 ;; esac) +%define is_ncmsarch %(case %{cmsos} in (*_%1) echo 0 ;; (*) echo 1 ;; esac) + diff --git a/rpm.spec b/rpm.spec index cb5b616a07c..8d2f68ce508 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,14 +1,13 @@ -### RPM external rpm 4.13.0.1 +### RPM external rpm 4.15.0 ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 ## INITENV SET RPM_CONFIGDIR %{i}/lib/rpm ## INITENV SET RPM_POPTEXEC_PATH %{i}/bin ## NOCOMPILER -%define ismac %(case %{cmsplatf} in (osx*) echo 1 ;; (*) echo 0 ;; esac) # Warning! While rpm itself seems to work, at the time of writing it # does not seem to be possible to build apt-rpm with -%define tag c833595dbf3016971c1987f14641f99e37539779 -%define branch cms/rpm-4.13.0.1-release +%define tag 48c04ee8077fbba1a0001968f2794cbaeb54f15c +%define branch cms/rpm-%{realversion}-release %define github_user cms-externals %define github_repo rpm-upstream Source: git+https://github.com/%{github_user}/%{github_repo}.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz @@ -17,11 +16,6 @@ Requires: bootstrap-bundle BuildRequires: autotools BuildRequires: gcc -# Defaults here -%if %ismac -Provides: Kerberos -%endif - %prep %setup -n %{n}-%{realversion} @@ -31,7 +25,7 @@ Provides: Kerberos autoreconf -fiv case %cmsplatf in - slc*_amd64|*_mic_*) + slc*_amd64|cc*_amd64) CFLAGS_PLATF="-fPIC" LIBS_PLATF="-ldl" ;; @@ -53,14 +47,12 @@ USER_CXXFLAGS="-ggdb -O0" # On SLCx add $GCC_ROOT to various paths because that's where elflib is to be # found. Not required (and triggers a warning about missing include path) on # mac. -case "%{cmsplatf}" in - slc*|fc*) +%ifos linux OS_CFLAGS="-I$GCC_ROOT/include" OS_CXXFLAGS="-I$GCC_ROOT/include" OS_CPPFLAGS="-I$GCC_ROOT/include" OS_LDFLAGS="-L$GCC_ROOT/lib" - ;; -esac +%endif perl -p -i -e's|-O2|-O0|' ./configure @@ -83,11 +75,8 @@ export __PYTHON="/usr/bin/env python" # s|-lselinux||; #" `find . -name \*.in` -perl -p -i -e "s|#\!.*perl(.*)|#!/usr/bin/env perl$1|" scripts/get_magic.pl \ - scripts/rpmdiff.cgi \ - scripts/cpanflute2 \ - scripts/perldeps.pl \ - db/dist/camelize.pl +perl -p -i -e "s|#\!.*perl(.*)|#!/usr/bin/env perl$1|" $(grep -R '#! */usr/bin/perl' . | sed 's|:.*||' | sort | uniq) +perl -p -i -e "s|#\!.*python(.*)|#!/usr/bin/env python$1|" $(grep -R '#! */usr/bin/python' . | sed 's|:.*||' | sort | uniq) %install make install @@ -131,32 +120,12 @@ perl -p -i -e 's|^#[!]/usr/bin/perl(.*)|#!/usr/bin/env perl$1|' \ mkdir -p %{instroot}/%{cmsplatf}/var/spool/repackage -# Generates the dependencies-setup.sh/dependencies-setup.csh which is -# automatically sourced by init.sh/init.csh, providing the environment for all -# the dependencies. -mkdir -p %{i}/etc/profile.d - -echo '#!/bin/sh' > %{i}/etc/profile.d/dependencies-setup.sh -echo '#!/bin/tcsh' > %{i}/etc/profile.d/dependencies-setup.csh -echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'` -for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'` -do - case X$tool in - Xdistcc|Xccache ) - ;; - * ) - toolcap=`echo $tool | tr a-z- A-Z_` - eval echo ". $`echo ${toolcap}_ROOT`/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh - eval echo "source $`echo ${toolcap}_ROOT`/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh - ;; - esac -done - -perl -p -i -e 's|\. /etc/profile\.d/init\.sh||' %{i}/etc/profile.d/dependencies-setup.sh -perl -p -i -e 's|source /etc/profile\.d/init\.csh||' %{i}/etc/profile.d/dependencies-setup.csh - perl -p -i -e 's|.[{]prefix[}]|%instroot|g' %{i}/lib/rpm/macros +#Disabled pythondist requirement checks; we use pip checks to make sure the +#dependencies are satisfied +perl -p -i -e 's|^%%__pythondist_requires.*|%%__pythondist_requires true|' %{i}/lib/rpm/fileattrs/pythondist.attr + # Remove some of the path macros defined in macros since they could come from # different places (e.g. from system or from macports) and this would lead to # problems if a developer with macports builds a bootstrap package set. @@ -168,5 +137,8 @@ done ln -sf rpm %i/bin/rpmverify ln -sf rpm %i/bin/rpmquery +mkdir -p %{i}/etc/profile.d +echo "test X\$BOOTSTRAP_BUNDLE_ROOT != X || . $BOOTSTRAP_BUNDLE_ROOT/etc/profile.d/init.sh" > %{i}/etc/profile.d/dependencies-setup.sh + %post %{relocateRpmFiles} $(grep -I -r %cmsroot $RPM_INSTALL_PREFIX/%pkgrel | cut -d: -f1 | sort | uniq) diff --git a/scram-project-build.file b/scram-project-build.file index 1d24cc6a2e8..bf900a18f79 100644 --- a/scram-project-build.file +++ b/scram-project-build.file @@ -2,29 +2,19 @@ ## NO_AUTO_DEPENDENCY # FIXME: support building all platforms together like scram does? # FIXME: automatic sub-packages for "doc" etc? -%define mic %(case %cmsplatf in (*_mic_*) echo true;; (*) echo false;; esac) %define cmssw_libs biglib/%{cmsplatf} lib/%{cmsplatf} -%define islinux %(case $(uname -s) in (Linux) echo 1 ;; (*) echo 0 ;; esac) -%define isslc6_amd64 %(case %{cmsplatf} in (slc6_amd64_*) echo 1 ;; (*) echo 0 ;; esac) Requires: SCRAMV1 BuildRequires: gcc # For non-linux archs disable subpackageDebug otherwise add dwz.file build dependencies. %if "%{?subpackageDebug:set}" == "set" -%if %islinux +%ifos linux BuildRequires: dwz %else %undefine subpackageDebug -%endif # islinux -%endif # subpackageDebug - -%if %isslc6_amd64 -%if "%{?pkgname}" != "coral" -Requires: patchelf -Requires: glibc -%endif # coral -%endif # isslc6_amd64 +%endif +%endif %define initenv %initenv_direct %define scramcmd $SCRAMV1_ROOT/bin/scram --arch %cmsplatf @@ -43,12 +33,8 @@ Requires: glibc %endif %if "%{?scram_compiler:set}" != "set" -%if "%mic" == "true" -%define scram_compiler icc -%else %define scram_compiler gcc %endif -%endif %define bootstrapfile config/bootsrc.xml @@ -333,19 +319,6 @@ done %{?PartialReleaseFilesRelocate:%PartialReleaseFilesRelocate} [ -f $RPM_INSTALL_PREFIX/etc/scramrc/%{pkgname}.map ] || (mkdir -p $RPM_INSTALL_PREFIX/etc/scramrc && echo '%{ucprojtype}=$SCRAM_ARCH/%{pkgcategory}/%{pkgname}/%{ucprojtype}_*' > $RPM_INSTALL_PREFIX/etc/scramrc/%{pkgname}.map) -%if "%{?pkgname}" != "coral" -case %cmsplatf in - slc6_amd64_*) - PATCHELF_PKG=$(echo "%{directpkgreqs}" | tr ' ' '\n' | grep 'external/patchelf/') - PATCHELF_PATH=$RPM_INSTALL_PREFIX/%cmsplatf/$PATCHELF_PKG - CMSSW_BIN_PATH="$RPM_INSTALL_PREFIX/%pkgrel/bin/%cmsplatf $RPM_INSTALL_PREFIX/%pkgrel/test/%cmsplatf" - CMSSW_ELF_BIN=$(find $CMSSW_BIN_PATH -type f -exec file {} \; | grep ELF | cut -d':' -f1) - GLIBC_PKG=$(echo "%{directpkgreqs}" | tr ' ' '\n' | grep 'external/glibc/') - GLIBC_PATH=$CMS_INSTALL_PREFIX/%cmsplatf/$GLIBC_PKG - echo "$CMSSW_ELF_BIN" | xargs -t -n 1 -I% -P $(getconf _NPROCESSORS_ONLN) sh -c "strings % 2>&1 | grep '%{cmsplatf}/external/glibc' 2>&1 >/dev/null && $PATCHELF_PATH/bin/patchelf --set-interpreter $GLIBC_PATH/lib64/ld.so % || true" -esac -%endif # coral - %if "%{?runGlimpse:set}" == "set" %{relocateConfig}.glimpse_full/.glimpse_filenames %endif diff --git a/sherpa-toolfile.spec b/sherpa-toolfile.spec index 4ce531832b0..c8ca187c258 100644 --- a/sherpa-toolfile.spec +++ b/sherpa-toolfile.spec @@ -1,9 +1,6 @@ ### RPM external sherpa-toolfile 2.0 Requires: sherpa -%define islinux %(case $(uname -s) in (Linux) echo 1 ;; (*) echo 0 ;; esac) -%define isamd64 %(case %{cmsplatf} in (*amd64*) echo 1 ;; (*) echo 0 ;; esac) - %prep %build @@ -35,11 +32,11 @@ cat << \EOF_TOOLFILE >%i/etc/scram.d/sherpa.xml -%if %islinux +%ifos linux %ifnarch ppc64le -%endif # isamd64 -%endif # islinux +%endif +%endif EOF_TOOLFILE diff --git a/sherpa.spec b/sherpa.spec index 403dacbf0bb..1178b426d21 100644 --- a/sherpa.spec +++ b/sherpa.spec @@ -3,17 +3,14 @@ %define branch cms/v%realversion %define github_user cms-externals Source: http://www.hepforge.org/archive/sherpa/SHERPA-MC-%{realversion}.tar.gz -Requires: hepmc lhapdf blackhat sqlite fastjet openssl scons python openmpi rivet +Requires: hepmc lhapdf blackhat sqlite fastjet scons python openmpi rivet BuildRequires: mcfm swig -%define islinux %(case $(uname -s) in (Linux) echo 1 ;; (*) echo 0 ;; esac) -%define isamd64 %(case %{cmsplatf} in (*amd64*) echo 1 ;; (*) echo 0 ;; esac) - -%if %islinux +%ifos linux %ifnarch ppc64le Requires: openloops -%endif # is not ppc64 -%endif # islinux +%endif +%endif %prep %setup -q -n SHERPA-MC-%{realversion} @@ -51,8 +48,8 @@ esac CXX="mpicxx" \ MPICXX="mpicxx" \ FC="mpifort" \ - CXXFLAGS="-fuse-cxa-atexit $ARCH_CMSPLATF -O2 -std=c++0x -I$LHAPDF_ROOT/include -I$BLACKHAT_ROOT/include -I$OPENSSL_ROOT/include -I$RIVET_ROOT/include" \ - LDFLAGS="-ldl -L$BLACKHAT_ROOT/lib/blackhat -L$QD_ROOT/lib -L$OPENSSL_ROOT/lib" + CXXFLAGS="-fuse-cxa-atexit $ARCH_CMSPLATF -O2 -std=c++0x -I$LHAPDF_ROOT/include -I$BLACKHAT_ROOT/include -I$RIVET_ROOT/include" \ + LDFLAGS="-ldl -L$BLACKHAT_ROOT/lib/blackhat -L$QD_ROOT/lib" make %{makeprocesses} diff --git a/systemtools.spec b/systemtools.spec index 426fee8c52b..78ea0906edf 100644 --- a/systemtools.spec +++ b/systemtools.spec @@ -2,8 +2,6 @@ ## NOCOMPILER Source: none -%define islinux %(case %{cmsos} in (slc*|fc*) echo 1 ;; (*) echo 0 ;; esac) -%define isdarwin %(case %{cmsos} in (osx*) echo 1 ;; (*) echo 0 ;; esac) %if "%{?use_system_gcc:set}" == "set" %define compilertools ccompiler cxxcompiler f77compiler @@ -30,15 +28,14 @@ mkdir -p %i/etc/scram.d cat << \EOF_TOOLFILE >%i/etc/scram.d/sockets.xml EOF_TOOLFILE -%if %islinux +%ifos linux cat << \EOF_TOOLFILE >>%i/etc/scram.d/sockets.xml - EOF_TOOLFILE %endif -%if %isdarwin +%ifarch darwin cat << \EOF_TOOLFILE >>%i/etc/scram.d/sockets.xml EOF_TOOLFILE @@ -53,7 +50,7 @@ cat << \EOF_TOOLFILE >%i/etc/scram.d/opengl.xml EOF_TOOLFILE -%if %isdarwin +%ifarch darwin cat << \EOF_TOOLFILE >>%i/etc/scram.d/opengl.xml @@ -68,7 +65,7 @@ echo " " >>%i/etc/scram.d/opengl.xml cat << \EOF_TOOLFILE >%i/etc/scram.d/x11.xml EOF_TOOLFILE -%if %isdarwin +%ifarch darwin cat << \EOF_TOOLFILE >>%i/etc/scram.d/x11.xml diff --git a/tauolapp.spec b/tauolapp.spec index 35012de6c23..20e46f87228 100644 --- a/tauolapp.spec +++ b/tauolapp.spec @@ -16,8 +16,8 @@ export PYTHIA8_LOCATION=${PYTHIA8_ROOT} # Update to detect aarch64 and ppc64le rm -f ./config/config.{sub,guess} -curl -L -k -s -o ./config/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./config/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +%get_config_sub ./config/config.sub +%get_config_guess ./config/config.guess chmod +x ./config/config.{sub,guess} ./configure --prefix=%{i} --with-hepmc=$HEPMC_ROOT --with-pythia8=$PYTHIA8_ROOT --with-lhapdf=$LHAPDF_ROOT CPPFLAGS="-I${BOOST_ROOT}/include" diff --git a/tensorflow-python3-sources.spec b/tensorflow-python3-sources.spec index 0b50e277164..5910e4a05e3 100644 --- a/tensorflow-python3-sources.spec +++ b/tensorflow-python3-sources.spec @@ -1,7 +1,6 @@ ### RPM external tensorflow-python3-sources 1.6.0 #Source: https://github.com/tensorflow/tensorflow/archive/v%{realversion}.tar.gz # NOTE: whenever the version of tensorflow changes, update it also in tensorflow-c tensorflow-cc and py2-tensorflow -%define isslc6amd64 %(case %{cmsplatf} in (slc6_amd64_*) echo 1 ;; (*) echo 0 ;; esac) %define tag 6eea62c87173ad98c71f10ff2f796f6654f5b604 %define branch cms/v%{realversion} %define github_user cms-externals @@ -52,12 +51,6 @@ sed -i -e "s|@EIGEN_SOURCE@|${EIGEN_SOURCE}|;s|@EIGEN_STRIP_PREFIX@|${EIGEN_STRI sed -i -e "s|@PROTOBUF_SOURCE@|${PROTOBUF_SOURCE}|;s|@PROTOBUF_STRIP_PREFIX@|${PROTOBUF_STRIP_PREFIX}|" tensorflow/workspace.bzl tensorflow/contrib/makefile/download_dependencies.sh bazel --output_user_root ../build fetch "tensorflow:libtensorflow_cc.so" -#This is needed on SLC6 because the version of glibc is old -%if %isslc6amd64 -sed -i -e 's| linkopts=\[\],| linkopts=["-lrt"],|' ../build/*/external/org_tensorflow/tensorflow/tensorflow.bzl -sed -i -e 's|"-z defs",|"-z defs","-lrt",|' ../build/*/external/org_tensorflow/tensorflow/BUILD -%endif - sed -i -e 's|executable=ctx.executable._swig,|env=ctx.configuration.default_shell_env, executable=ctx.executable._swig,|' ../build/*/external/org_tensorflow/tensorflow/tensorflow.bzl sed -i -e 's|mnemonic="ProtoCompile",|env=ctx.configuration.default_shell_env, mnemonic="ProtoCompile",|' ../build/*/external/protobuf_archive/protobuf.bzl diff --git a/tensorflow-sources.spec b/tensorflow-sources.spec index 9fe00f92846..5e6bc1fdf86 100644 --- a/tensorflow-sources.spec +++ b/tensorflow-sources.spec @@ -1,7 +1,6 @@ ### RPM external tensorflow-sources 1.6.0 #Source: https://github.com/tensorflow/tensorflow/archive/v%{realversion}.tar.gz # NOTE: whenever the version of tensorflow changes, update it also in tensorflow-c tensorflow-cc and py2-tensorflow -%define isslc6amd64 %(case %{cmsplatf} in (slc6_amd64_*) echo 1 ;; (*) echo 0 ;; esac) %define tag 6eea62c87173ad98c71f10ff2f796f6654f5b604 %define branch cms/v%{realversion} %define github_user cms-externals @@ -52,12 +51,6 @@ sed -i -e "s|@EIGEN_SOURCE@|${EIGEN_SOURCE}|;s|@EIGEN_STRIP_PREFIX@|${EIGEN_STRI sed -i -e "s|@PROTOBUF_SOURCE@|${PROTOBUF_SOURCE}|;s|@PROTOBUF_STRIP_PREFIX@|${PROTOBUF_STRIP_PREFIX}|" tensorflow/workspace.bzl tensorflow/contrib/makefile/download_dependencies.sh bazel --output_user_root ../build fetch "tensorflow:libtensorflow_cc.so" -#This is needed on SLC6 because the version of glibc is old -%if %isslc6amd64 -sed -i -e 's| linkopts=\[\],| linkopts=["-lrt"],|' ../build/*/external/org_tensorflow/tensorflow/tensorflow.bzl -sed -i -e 's|"-z defs",|"-z defs","-lrt",|' ../build/*/external/org_tensorflow/tensorflow/BUILD -%endif - sed -i -e 's|executable=ctx.executable._swig,|env=ctx.configuration.default_shell_env, executable=ctx.executable._swig,|' ../build/*/external/org_tensorflow/tensorflow/tensorflow.bzl sed -i -e 's|mnemonic="ProtoCompile",|env=ctx.configuration.default_shell_env, mnemonic="ProtoCompile",|' ../build/*/external/protobuf_archive/protobuf.bzl diff --git a/thepeg.spec b/thepeg.spec index b5a457033bc..28ec4b7ac2c 100644 --- a/thepeg.spec +++ b/thepeg.spec @@ -36,8 +36,8 @@ PLATF_CONF_OPTS="--enable-shared --disable-static" # Update to detect aarch64 and ppc64le rm -f ./Config/config.{sub,guess} -curl -L -k -s -o ./Config/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./Config/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +%get_config_sub ./Config/config.sub +%get_config_guess ./Config/config.guess chmod +x ./Config/config.{sub,guess} sed -i -e "s|-lgslcblas|-lopenblas|" ./configure diff --git a/tkonlinesw.spec b/tkonlinesw.spec index 641a57baa67..ceab74d7c14 100644 --- a/tkonlinesw.spec +++ b/tkonlinesw.spec @@ -75,7 +75,7 @@ export ENV_CMS_TK_TTC_ROOT=%{i}/dummy/Linux # External Dependencies ################################################################################ case %cmsos in - slc*) + slc*|cc*) export XDAQ_OS=linux export XDAQ_PLATFORM=x86_slc4 ;; @@ -94,7 +94,7 @@ export XDAQ_ROOT # Configure ################################################################################ case %cmsos in - slc*) + slc*|cc*) chmod +x ./configure && ./configure --with-xdaq-platform=x86_64 cd ${ENV_CMS_TK_FEC_ROOT} && chmod +x ./configure && ./configure --with-xdaq-platform=x86_64 && cd - cd ${ENV_CMS_TK_FED9U_ROOT} && chmod +x ./configure && ./configure --with-xdaq-platform=x86_64 && cd - @@ -111,7 +111,7 @@ export CPPFLAGS="-fPIC" export CFLAGS="-O2 -fPIC" export CXXFLAGS="-O2 -fPIC" case %cmsos in - slc*) + slc*|cc*) make cmssw make cmsswinstall ;; @@ -138,7 +138,7 @@ esac %install # Again, installing is actually done by make install on macosx. case %cmsos in - slc*) + slc*|cc*) # Option --prefix in configure is not working yet, using tar: tar -c -C %{_builddir}/%{releasename}/opt/%{projectname} include lib | tar -x -C %{i} ;; diff --git a/vdt.spec b/vdt.spec index 6480f8700cd..d6912647b15 100644 --- a/vdt.spec +++ b/vdt.spec @@ -4,7 +4,6 @@ Source: https://github.com/dpiparo/%{n}/archive/v%{realversion}.tar.gz BuildRequires: cmake -%define isamd64 %(case %{cmsplatf} in (*amd64*) echo 1 ;; (*) echo 0 ;; esac) %define keep_archives true @@ -12,7 +11,7 @@ BuildRequires: cmake %setup -q -n %{n}-%{realversion} %build -%if %isamd64 +%ifarch x86_64 cmake . \ -DCMAKE_INSTALL_PREFIX=%{i} \ -DPRELOAD:BOOL=ON \ diff --git a/xerces-c.spec b/xerces-c.spec index c0c652972aa..e22bd02c777 100644 --- a/xerces-c.spec +++ b/xerces-c.spec @@ -12,8 +12,8 @@ cd $PWD/ # Update to detect aarch64 and ppc64le rm -f ./config/config.{sub,guess} -curl -L -k -s -o ./config/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./config/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +%get_config_sub ./config/config.sub +%get_config_guess ./config/config.guess chmod +x ./config/config.{sub,guess} export VERBOSE=1 diff --git a/xrootd.spec b/xrootd.spec index 5be8bee7aba..09a262c784a 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -10,7 +10,6 @@ Source: git+https://github.com/%github_user/xrootd.git?obj=%{branch}/%{tag}&expo BuildRequires: cmake Requires: zlib -Requires: openssl Requires: python python3 Requires: libxml2 @@ -29,7 +28,6 @@ perl -p -i -e 's|^#!.*perl(.*)|#!/usr/bin/env perl$1|' src/XrdMon/xrdmonPrepareS # By default xrootd has perl, fuse, krb5, readline, and crypto enabled. # libfuse and libperl are not produced by CMSDIST. CMAKE_ARGS="-DCMAKE_INSTALL_PREFIX=%{i} \ - -DOPENSSL_ROOT_DIR:PATH=${OPENSSL_ROOT} \ -DZLIB_ROOT:PATH=${ZLIB_ROOT} \ -DENABLE_PYTHON=FALSE \ -DENABLE_FUSE=FALSE \ diff --git a/xz-bootstrap.spec b/xz-bootstrap.spec index 12668b3bc7c..48f4fd61936 100644 --- a/xz-bootstrap.spec +++ b/xz-bootstrap.spec @@ -1,4 +1,4 @@ -### RPM external xz-bootstrap 5.2.1 +### RPM external xz-bootstrap 5.2.4 Source0: http://tukaani.org/xz/xz-%{realversion}.tar.gz %prep @@ -7,8 +7,8 @@ Source0: http://tukaani.org/xz/xz-%{realversion}.tar.gz %build # Update for AArch64 support rm -f ./build-aux/config.{sub,guess} -curl -L -k -s -o ./build-aux/config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./build-aux/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +%get_config_guess ./build-aux/config.guess +%get_config_sub ./build-aux/config.sub chmod +x ./build-aux/config.{sub,guess} ./configure CFLAGS='-fPIC -D_FILE_OFFSET_BITS=64 -Ofast' --prefix=%{i} --disable-static diff --git a/zlib-build.file b/zlib-build.file deleted file mode 100644 index 5579764f1f7..00000000000 --- a/zlib-build.file +++ /dev/null @@ -1,27 +0,0 @@ -#Build ZLIB - -%prep -%setup -n zlib-%{realversion} - -%build - -case %{cmsplatf} in - *_amd64_*|*_mic_*) - CFLAGS="-fPIC -O3 -DUSE_MMAP -DUNALIGNED_OK -D_LARGEFILE64_SOURCE=1 -msse3" \ - ./configure --prefix=%{i} - ;; - *_armv7hl_*|*_aarch64_*|*_ppc64le_*|*_ppc64_*) - CFLAGS="-fPIC -O3 -DUSE_MMAP -DUNALIGNED_OK -D_LARGEFILE64_SOURCE=1" \ - ./configure --prefix=%{i} - ;; - *) - ./configure --prefix=%{i} - ;; -esac - -make %{makeprocesses} - -# Strip libraries, we are not going to debug them. -%define strip_files %{i}/lib -# Look up documentation online. -%define drop_files %{i}/share diff --git a/zlib-non-x86_64.spec b/zlib-non-x86_64.spec deleted file mode 100644 index 2a5449d8528..00000000000 --- a/zlib-non-x86_64.spec +++ /dev/null @@ -1,4 +0,0 @@ -### RPM external zlib-non-x86_64 1.2.8 -Source: http://zlib.net/zlib-%{realversion}.tar.gz - -## IMPORT zlib-build diff --git a/zlib-x86_64.spec b/zlib-x86_64.spec deleted file mode 100644 index 5905f03ddc0..00000000000 --- a/zlib-x86_64.spec +++ /dev/null @@ -1,7 +0,0 @@ -### RPM external zlib-x86_64 1.2.11 -%define git_repo cms-externals -%define git_branch cms/v1.2.11 -%define git_commit 822f7f5a8c57802faf8bbfe16266be02eff8c2e2 -Source0: git://github.com/%{git_repo}/zlib.git?obj=%{git_branch}/%{git_commit}&export=zlib-%{realversion}&output=/zlib-%{realversion}.tgz - -## IMPORT zlib-build diff --git a/zlib.spec b/zlib.spec index b776470347e..a84e810d8c0 100644 --- a/zlib.spec +++ b/zlib.spec @@ -1,16 +1,31 @@ -### RPM external zlib 1.0 -%ifarch x86_64 -Requires: zlib-x86_64 -%define ZLIB_PKG ZLIB_X86_64 -%else -Requires: zlib-non-x86_64 -%define ZLIB_PKG ZLIB_NON_X86_64 -%endif +### RPM external zlib 1.2.11 +%define git_repo cms-externals +%define git_branch cms/v1.2.11 +%define git_commit 822f7f5a8c57802faf8bbfe16266be02eff8c2e2 +Source0: git://github.com/%{git_repo}/zlib.git?obj=%{git_branch}/%{git_commit}&export=zlib-%{realversion}&output=/zlib-%{realversion}.tgz %prep +%setup -n zlib-%{realversion} + %build -%install -%post -cp ${RPM_INSTALL_PREFIX}/%{cmsplatf}/$(echo %{directpkgreqs} | tr ' ' '\n' | grep /zlib-)/etc/profile.d/init.* ${RPM_INSTALL_PREFIX}/%{pkgrel}/etc/profile.d -sed -i -e 's|%{ZLIB_PKG}_|ZLIB_|' ${RPM_INSTALL_PREFIX}/%{pkgrel}/etc/profile.d/init.* +case %{cmsplatf} in + *_amd64_*|*_mic_*) + CFLAGS="-fPIC -O3 -DUSE_MMAP -DUNALIGNED_OK -D_LARGEFILE64_SOURCE=1 -msse3" \ + ./configure --prefix=%{i} + ;; + *_armv7hl_*|*_aarch64_*|*_ppc64le_*|*_ppc64_*) + CFLAGS="-fPIC -O3 -DUSE_MMAP -DUNALIGNED_OK -D_LARGEFILE64_SOURCE=1" \ + ./configure --prefix=%{i} + ;; + *) + ./configure --prefix=%{i} + ;; +esac + +make %{makeprocesses} + +# Strip libraries, we are not going to debug them. +%define strip_files %{i}/lib +# Look up documentation online. +%define drop_files %{i}/share diff --git a/zstd.spec b/zstd.spec index b0326e1919c..5961fd828d7 100644 --- a/zstd.spec +++ b/zstd.spec @@ -15,8 +15,8 @@ BuildRequires: gmake cmake # Update to get AArch64 rm -f ./config.{sub,guess} -curl -L -k -s -o ./config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -curl -L -k -s -o ./config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +%get_config_sub ./config.sub +%get_config_guess ./config.guess chmod +x ./config.{sub,guess} cmake build/cmake \ From a3319f35488896759703b89f39faf78e73defd3b Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Mon, 14 Oct 2019 18:06:11 +0200 Subject: [PATCH 002/101] added missing files for centos8 --- cmssw-tool-conf.spec | 1 + file-bootstrap.spec | 15 ++ frontier_client-2.8.20-openssl11.patch | 13 ++ m4-centos8.patch | 130 ++++++++++++++++++ make-4.2.1.patch | 11 ++ ...sl-1.0.2d-disable-install-openssldir.patch | 38 ----- openssl-1.0.2d-pr3979.patch | 44 ------ pcre2-toolfile.spec | 26 ++++ pcre2.spec | 36 +++++ 9 files changed, 232 insertions(+), 82 deletions(-) create mode 100644 file-bootstrap.spec create mode 100644 frontier_client-2.8.20-openssl11.patch create mode 100644 m4-centos8.patch create mode 100644 make-4.2.1.patch delete mode 100644 openssl-1.0.2d-disable-install-openssldir.patch delete mode 100644 openssl-1.0.2d-pr3979.patch create mode 100644 pcre2-toolfile.spec create mode 100644 pcre2.spec diff --git a/cmssw-tool-conf.spec b/cmssw-tool-conf.spec index f0710285101..4b2227158f9 100644 --- a/cmssw-tool-conf.spec +++ b/cmssw-tool-conf.spec @@ -51,6 +51,7 @@ Requires: lwtnn-toolfile Requires: mcdb-toolfile Requires: meschach-toolfile Requires: openssl-toolfile +Requires: pcre2-toolfile Requires: pcre-toolfile Requires: photos-toolfile Requires: photospp-toolfile diff --git a/file-bootstrap.spec b/file-bootstrap.spec new file mode 100644 index 00000000000..c99e1fbf412 --- /dev/null +++ b/file-bootstrap.spec @@ -0,0 +1,15 @@ +### RPM external file-bootstrap 5.33 +%define file_tag %(echo FILE%{realversion} | tr . _) +Source: https://github.com/file/file/archive/%{file_tag}.tar.gz +BuildRequires: autotools + +%prep +%setup -n file-%{file_tag} + +%build +autoreconf -fiv +./configure --prefix=%{i} +make + +%install +make install diff --git a/frontier_client-2.8.20-openssl11.patch b/frontier_client-2.8.20-openssl11.patch new file mode 100644 index 00000000000..0ea6fb6dc77 --- /dev/null +++ b/frontier_client-2.8.20-openssl11.patch @@ -0,0 +1,13 @@ +diff --git a/frontier.c b/frontier.c +index 74be022..8850006 100644 +--- a/frontier.c ++++ b/frontier.c +@@ -523,7 +523,7 @@ static char *vcb_curservername; + static int cert_verify_callback(int ok,X509_STORE_CTX *ctx) + { + if (!ok) +- frontier_setErrorMsg(__FILE__,__LINE__, "error verifying server %s cert: %s",vcb_curservername,X509_verify_cert_error_string(ctx->error)); ++ frontier_setErrorMsg(__FILE__,__LINE__, "error verifying server %s cert: %s",vcb_curservername,X509_verify_cert_error_string(X509_STORE_CTX_get_error(ctx))); + return ok; + } + diff --git a/m4-centos8.patch b/m4-centos8.patch new file mode 100644 index 00000000000..c10bcbf6937 --- /dev/null +++ b/m4-centos8.patch @@ -0,0 +1,130 @@ +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/make-4.2.1.patch b/make-4.2.1.patch new file mode 100644 index 00000000000..61a3581f4ab --- /dev/null +++ b/make-4.2.1.patch @@ -0,0 +1,11 @@ +--- clean/make-4.2/glob/glob.c 2013-10-20 17:14:38.000000000 +0000 ++++ make-4.2/glob/glob.c 2018-09-18 10:16:03.860886356 +0000 +@@ -208,7 +208,7 @@ + #endif /* __GNU_LIBRARY__ || __DJGPP__ */ + + +-#if !defined __alloca && !defined __GNU_LIBRARY__ ++#if !defined __alloca && defined __GNU_LIBRARY__ + + # ifdef __GNUC__ + # undef alloca diff --git a/openssl-1.0.2d-disable-install-openssldir.patch b/openssl-1.0.2d-disable-install-openssldir.patch deleted file mode 100644 index 28a98e5e0c0..00000000000 --- a/openssl-1.0.2d-disable-install-openssldir.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/apps/Makefile b/apps/Makefile -index cafe554..547fc41 100644 ---- a/apps/Makefile -+++ b/apps/Makefile -@@ -109,16 +109,6 @@ install: - chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \ - mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \ - done; -- @set -e; for i in $(SCRIPTS); \ -- do \ -- (echo installing $$i; \ -- cp $$i $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \ -- chmod 755 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \ -- mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i ); \ -- done -- @cp openssl.cnf $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new; \ -- chmod 644 $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new; \ -- mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf - - tags: - ctags $(SRC) -diff --git a/tools/Makefile b/tools/Makefile -index c1a2f6b..6e7c104 100644 ---- a/tools/Makefile -+++ b/tools/Makefile -@@ -26,12 +26,6 @@ install: - chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \ - mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \ - done; -- @for i in $(MISC_APPS) ; \ -- do \ -- (cp $$i $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \ -- chmod 755 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \ -- mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i ); \ -- done; - - files: - $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO diff --git a/openssl-1.0.2d-pr3979.patch b/openssl-1.0.2d-pr3979.patch deleted file mode 100644 index 7c313645157..00000000000 --- a/openssl-1.0.2d-pr3979.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff --git a/crypto/x509v3/v3_purp.c b/crypto/x509v3/v3_purp.c -index 36b0d87..845be67 100644 ---- a/crypto/x509v3/v3_purp.c -+++ b/crypto/x509v3/v3_purp.c -@@ -380,6 +380,14 @@ static void setup_crldp(X509 *x) - setup_dp(x, sk_DIST_POINT_value(x->crldp, i)); - } - -+#define V1_ROOT (EXFLAG_V1|EXFLAG_SS) -+#define ku_reject(x, usage) \ -+ (((x)->ex_flags & EXFLAG_KUSAGE) && !((x)->ex_kusage & (usage))) -+#define xku_reject(x, usage) \ -+ (((x)->ex_flags & EXFLAG_XKUSAGE) && !((x)->ex_xkusage & (usage))) -+#define ns_reject(x, usage) \ -+ (((x)->ex_flags & EXFLAG_NSCERT) && !((x)->ex_nscert & (usage))) -+ - static void x509v3_cache_extensions(X509 *x) - { - BASIC_CONSTRAINTS *bs; -@@ -499,7 +507,8 @@ static void x509v3_cache_extensions(X509 *x) - if (!X509_NAME_cmp(X509_get_subject_name(x), X509_get_issuer_name(x))) { - x->ex_flags |= EXFLAG_SI; - /* If SKID matches AKID also indicate self signed */ -- if (X509_check_akid(x, x->akid) == X509_V_OK) -+ if (X509_check_akid(x, x->akid) == X509_V_OK && -+ !ku_reject(x, KU_KEY_CERT_SIGN)) - x->ex_flags |= EXFLAG_SS; - } - x->altname = X509_get_ext_d2i(x, NID_subject_alt_name, NULL, NULL); -@@ -538,14 +547,6 @@ static void x509v3_cache_extensions(X509 *x) - * 4 basicConstraints absent but keyUsage present and keyCertSign asserted. - */ - --#define V1_ROOT (EXFLAG_V1|EXFLAG_SS) --#define ku_reject(x, usage) \ -- (((x)->ex_flags & EXFLAG_KUSAGE) && !((x)->ex_kusage & (usage))) --#define xku_reject(x, usage) \ -- (((x)->ex_flags & EXFLAG_XKUSAGE) && !((x)->ex_xkusage & (usage))) --#define ns_reject(x, usage) \ -- (((x)->ex_flags & EXFLAG_NSCERT) && !((x)->ex_nscert & (usage))) -- - static int check_ca(const X509 *x) - { - /* keyUsage if present should allow cert signing */ diff --git a/pcre2-toolfile.spec b/pcre2-toolfile.spec new file mode 100644 index 00000000000..4677d41eea2 --- /dev/null +++ b/pcre2-toolfile.spec @@ -0,0 +1,26 @@ +### RPM external pcr2-toolfile 1.0 +Requires: pcre2 +%prep + +%build + +%install + +mkdir -p %{i}/etc/scram.d +cat << \EOF_TOOLFILE >%{i}/etc/scram.d/pcre2.xml + + + + + + + + + + + + + +EOF_TOOLFILE + +## IMPORT scram-tools-post diff --git a/pcre2.spec b/pcre2.spec new file mode 100644 index 00000000000..016180f3132 --- /dev/null +++ b/pcre2.spec @@ -0,0 +1,36 @@ +### RPM external pcre2 10.33 +Source0: http://downloads.sourceforge.net/pcre/%{n}-%{realversion}.tar.bz2 + +Requires: bz2lib zlib + +%prep +%setup -b 0 -n %{n}-%{realversion} + +%build +./configure \ + --enable-unicode-properties \ + --enable-pcregrep-libz \ + --enable-pcregrep-libbz2 \ + --prefix=%{i} \ + CPPFLAGS="-I${BZ2LIB_ROOT}/include -I${ZLIB_ROOT}/include" \ + LDFLAGS="-L${BZ2LIB_ROOT}/lib -L${ZLIB_ROOT}/lib" +make + +%install +make install + +# Remove pkg-config to avoid rpm-generated dependency on /usr/bin/pkg-config +# which we neither need nor use at this time. +rm -rf %{i}/lib/pkgconfig + +# Strip libraries. +%define strip_files %{i}/lib + +# Do not need to keep the archives. +rm -f %{i}/lib/*.{l,}a + +# Look up documentation online. +%define drop_files %{i}/share + +%post +%{relocateConfig}bin/pcre2-config From c4751f932bf1eee3013027237cb2f6680a23051d Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Tue, 15 Oct 2019 08:21:44 +0200 Subject: [PATCH 003/101] fix pcre2 toolfile name --- pcre2-toolfile.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcre2-toolfile.spec b/pcre2-toolfile.spec index 4677d41eea2..91ea3a88d74 100644 --- a/pcre2-toolfile.spec +++ b/pcre2-toolfile.spec @@ -1,4 +1,4 @@ -### RPM external pcr2-toolfile 1.0 +### RPM external pcre2-toolfile 1.0 Requires: pcre2 %prep From dff3686c7b5787c58eeb0a23f47accdf72f719db Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Tue, 15 Oct 2019 23:27:08 +0200 Subject: [PATCH 004/101] fix toolfiles for cenos --- jemalloc-debug-toolfile.spec | 2 +- pythia6-toolfile.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jemalloc-debug-toolfile.spec b/jemalloc-debug-toolfile.spec index 02f03d97a3a..a94cb5baa8d 100644 --- a/jemalloc-debug-toolfile.spec +++ b/jemalloc-debug-toolfile.spec @@ -10,7 +10,7 @@ Requires: jemalloc-debug mkdir -p %{i}/etc/scram.d cat << \EOF_TOOLFILE >%{i}/etc/scram.d/jemalloc-debug.xml - + diff --git a/pythia6-toolfile.spec b/pythia6-toolfile.spec index 5f6850e84a2..310be896294 100644 --- a/pythia6-toolfile.spec +++ b/pythia6-toolfile.spec @@ -37,7 +37,7 @@ cat << \EOF_TOOLFILE >%i/etc/scram.d/pydata.xml - + From f1641e964a067ab679fb9de271eb072ab249bcf0 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Thu, 24 Oct 2019 13:23:33 +0200 Subject: [PATCH 005/101] use same python version as used by slc7 --- python.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python.spec b/python.spec index e0abcd31e8b..644183c17cc 100644 --- a/python.spec +++ b/python.spec @@ -1,4 +1,4 @@ -### RPM external python 2.7.16 +### RPM external python 2.7.15 ## INITENV +PATH PATH %{i}/bin ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib ## INITENV SETV PYTHON_LIB_SITE_PACKAGES lib/python%{python_major_version}/site-packages From 559ffbdcf487276defa210e710341760f216c81c Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Thu, 24 Oct 2019 13:30:25 +0200 Subject: [PATCH 006/101] added readline-devel and ncurses-devel to bootstrap --- bootstrap-driver.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap-driver.spec b/bootstrap-driver.spec index 598b08a4f1b..9059b09764a 100644 --- a/bootstrap-driver.spec +++ b/bootstrap-driver.spec @@ -39,7 +39,7 @@ cc* ) libXmu libXpm libXpm-devel libXrandr libXrender libglvnd-opengl mesa-libGL mesa-libGLU mesa-libGLU-devel java-1.8.0-openjdk-devel libtool m4 make - ncurses ncurses-libs nspr nss nss-devel nss-util + ncurses ncurses-libs ncurses-devel nspr nss nss-devel nss-util openssl openssl-devel openssl-libs perl perl-interpreter perl-libs perl-Carp perl-CGI perl-constant perl-Data-Dumper perl-DBI @@ -48,7 +48,7 @@ cc* ) perl-Memoize perl-PathTools perl-Scalar-List-Utils perl-Socket perl-Storable perl-Term-ANSIColor perl-Test-Harness perl-Text-ParseWords perl-Thread-Queue perl-Time-HiRes perl-Time-Local perl-YAML - patch popt popt-devel python2 readline rpm-build + patch popt popt-devel python2 readline readline-devel rpm-build rsync tcl tcsh tk wget which zlib zsh" ;; slc*) From 48ea6008fdc29c5ca56132010a6e09adc7f1d6a5 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Wed, 30 Oct 2019 17:40:39 +0100 Subject: [PATCH 007/101] [CC8] Build Pycurl with OpenSSL backend This shoudl fix mane unit tests in CC8 IBs which are failing with error ``` Traceback (most recent call last): File "/cvmfs/cms-ib.cern.ch/nweek-02600/cc8_amd64_gcc8/cms/cmssw/CMSSW_11_0_X_2019-10-29-2300/bin/cc8_amd64_gcc8/conddb", line 29, in <module> from CondCore.Utilities.tier0 import Tier0Handler, Tier0Error, tier0Url File "/cvmfs/cms-ib.cern.ch/nweek-02600/cc8_amd64_gcc8/cms/cmssw/CMSSW_11_0_X_2019-10-29-2300/python/CondCore/Utilities/tier0.py", line 12, in <module> import pycurl ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other) return code is 65 ``` --- pip/pycurl.file | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pip/pycurl.file b/pip/pycurl.file index bf4c3c677f7..e9a0cb6b729 100644 --- a/pip/pycurl.file +++ b/pip/pycurl.file @@ -1,2 +1,4 @@ %define pip_name pycurl +%define PipPreBuild export PYCURL_SSL_LIBRARY=openssl + Requires: curl From 6918b43ba25bd8fb7c4cd89da583d073085c435e Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Fri, 1 Nov 2019 17:51:38 +0100 Subject: [PATCH 008/101] Updates SCRAM to version SCRAMV1 V2_2_9_pre05 --- SCRAMV1.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SCRAMV1.spec b/SCRAMV1.spec index 95ec197b85e..5c9c70e4a3d 100644 --- a/SCRAMV1.spec +++ b/SCRAMV1.spec @@ -1,4 +1,4 @@ -### RPM lcg SCRAMV1 V2_2_9_pre04 +### RPM lcg SCRAMV1 V2_2_9_pre05 ## NOCOMPILER BuildRequires: gmake From 374c589c6a2681001f71ec3f57b983e996b9e7d2 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Mon, 4 Nov 2019 22:08:23 +0100 Subject: [PATCH 009/101] added xz dependency for python3 --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index 3bb57ae0126..e0ebcb6e504 100644 --- a/python3.spec +++ b/python3.spec @@ -7,7 +7,7 @@ %define pythonv %(echo %realversion | cut -d. -f 1,2) %define python_major %(echo %realversion | cut -d. -f 1) Provides: python(abi) -Requires: expat bz2lib db6 gdbm libffi zlib sqlite libuuid +Requires: expat bz2lib db6 gdbm libffi zlib sqlite libuuid xz Source: https://www.python.org/ftp/python/%realversion/Python-%realversion.tgz @@ -25,7 +25,7 @@ export LIBFFI_ROOT # Python's configure parses LDFLAGS and CPPFLAGS to look for aditional library and include directories LDFLAGS="" CPPFLAGS="" -for d in ${EXPAT_ROOT} ${BZ2LIB_ROOT} ${DB6_ROOT} ${GDBM_ROOT} ${LIBFFI_ROOT} ${ZLIB_ROOT} ${SQLITE_ROOT} ${LIBUUID_ROOT}; do +for d in ${EXPAT_ROOT} ${BZ2LIB_ROOT} ${DB6_ROOT} ${GDBM_ROOT} ${LIBFFI_ROOT} ${ZLIB_ROOT} ${SQLITE_ROOT} ${LIBUUID_ROOT} ${XZ_ROOT}; do [ -e $d/lib ] && LDFLAGS="$LDFLAGS -L$d/lib" [ -e $d/lib64 ] && LDFLAGS="$LDFLAGS -L$d/lib64" [ -e $d/include ] && CPPFLAGS="$CPPFLAGS -I$d/include" From a033ab02410a37614900f1b43a629c058a2c590f Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Wed, 6 Nov 2019 00:44:50 +0100 Subject: [PATCH 010/101] Update python3.spec --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 43f3baad016..e0ebcb6e504 100644 --- a/python3.spec +++ b/python3.spec @@ -1,4 +1,4 @@ - ### RPM external python3 3.6.9 +### RPM external python3 3.6.9 ## INITENV +PATH PATH %{i}/bin ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib ## INITENV SETV PYTHON3_LIB_SITE_PACKAGES lib/python%{pythonv}/site-packages From 9bf530ebb19acd7c255c3a82c4b97bdbe0734be5 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Fri, 15 Nov 2019 08:12:53 +0100 Subject: [PATCH 011/101] Update requirements.txt --- pip/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/pip/requirements.txt b/pip/requirements.txt index bb51462cf8f..927aa3797c3 100644 --- a/pip/requirements.txt +++ b/pip/requirements.txt @@ -233,6 +233,7 @@ tensorflow==1.6.0 ; python_version<'3.0' tensorflow==1.6.0 ; python_version>'3.0' termcolor==1.1.0 terminado==0.8.3 +#NO_AUTO_UPDATE:1: version of testpath is hardcoded in testpath.file. Update there also to point to latest source testpath==0.4.2 theanets==0.7.3 Theano==1.0.4 From b013e8a841df8ae1900a57ffbceb8945e589cd41 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Wed, 15 Jan 2020 06:55:51 +0100 Subject: [PATCH 012/101] Update cmssw-tool-conf.spec --- cmssw-tool-conf.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmssw-tool-conf.spec b/cmssw-tool-conf.spec index 805ecab9b97..7f7f1da5b0a 100644 --- a/cmssw-tool-conf.spec +++ b/cmssw-tool-conf.spec @@ -2,7 +2,7 @@ ## NOCOMPILER # With cmsBuild, change the above version only when a new tool is added -Requires: crab crab-pre crab-dev +Requires: crab-prod crab-pre crab-dev Requires: google-benchmark-toolfile Requires: catch2-toolfile Requires: starlight-toolfile From c9128f319eaa2ea126a86b25582fc0e8afd1bbb4 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Sat, 18 Jan 2020 07:13:14 +0100 Subject: [PATCH 013/101] Update cmssw-tool-conf.spec --- cmssw-tool-conf.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmssw-tool-conf.spec b/cmssw-tool-conf.spec index 7f7f1da5b0a..2042e6dd02c 100644 --- a/cmssw-tool-conf.spec +++ b/cmssw-tool-conf.spec @@ -2,7 +2,7 @@ ## NOCOMPILER # With cmsBuild, change the above version only when a new tool is added -Requires: crab-prod crab-pre crab-dev +Requires: crab Requires: google-benchmark-toolfile Requires: catch2-toolfile Requires: starlight-toolfile From 9e959bfcf878b4c9533f8377643c72eb1706354e Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Fri, 14 Feb 2020 08:41:08 +0100 Subject: [PATCH 014/101] [CC8] Use default zlib for non-x86_64 archs --- zlib.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zlib.spec b/zlib.spec index a84e810d8c0..3aa4269501c 100644 --- a/zlib.spec +++ b/zlib.spec @@ -1,7 +1,13 @@ ### RPM external zlib 1.2.11 ++%ifarch x86_64 %define git_repo cms-externals -%define git_branch cms/v1.2.11 +%define git_branch cms/v%{realversion} %define git_commit 822f7f5a8c57802faf8bbfe16266be02eff8c2e2 +%else +%define git_repo madler +%define git_branch master +%define git_commit v%{realversion} +%endif Source0: git://github.com/%{git_repo}/zlib.git?obj=%{git_branch}/%{git_commit}&export=zlib-%{realversion}&output=/zlib-%{realversion}.tgz %prep From 4ac0760915ca877ab2f5aae087fb758ceb6235b5 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Fri, 14 Feb 2020 09:04:21 +0100 Subject: [PATCH 015/101] Update zlib.spec --- zlib.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zlib.spec b/zlib.spec index 3aa4269501c..837e0d54b6a 100644 --- a/zlib.spec +++ b/zlib.spec @@ -1,5 +1,5 @@ ### RPM external zlib 1.2.11 -+%ifarch x86_64 +%ifarch x86_64 %define git_repo cms-externals %define git_branch cms/v%{realversion} %define git_commit 822f7f5a8c57802faf8bbfe16266be02eff8c2e2 From 1d7df825a41a6253f23f00a5471334025da14e5a Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Fri, 14 Feb 2020 13:51:27 +0100 Subject: [PATCH 016/101] updated bootstrap driver for cc8 aarch64 and ppc64le --- bootstrap-driver.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bootstrap-driver.spec b/bootstrap-driver.spec index 9059b09764a..ce6be12ba1e 100644 --- a/bootstrap-driver.spec +++ b/bootstrap-driver.spec @@ -50,6 +50,10 @@ cc* ) perl-Time-HiRes perl-Time-Local perl-YAML patch popt popt-devel python2 readline readline-devel rpm-build rsync tcl tcsh tk wget which zlib zsh" + cc8_aarch64_platformSeeds="${cc8_amd64_platformSeeds}" + cc8_aarch64_packagesWithProvides="${cc8_amd64_packagesWithProvides} libOpenGL.so.0()(64bit) libGLX.so.0()(64bit)" + cc8_ppc64le_platformSeeds="${cc8_amd64_platformSeeds}" + cc8_ppc64le_packagesWithProvides="${cc8_amd64_packagesWithProvides} libOpenGL.so.0()(64bit) libGLX.so.0()(64bit)" ;; slc*) # Backward compatible seeds, so that old bootstrap does not suddenly stop working. From 1667ebeb4f1a44e6022b0ee231ba9555c9fc9d0d Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Sat, 15 Feb 2020 20:55:40 +0100 Subject: [PATCH 017/101] add additional provides for cc8 --- bootstrap-driver.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bootstrap-driver.spec b/bootstrap-driver.spec index ce6be12ba1e..b89b59cb9ac 100644 --- a/bootstrap-driver.spec +++ b/bootstrap-driver.spec @@ -246,7 +246,9 @@ case %cmsplatf in ;; # Required to get slc5_amd64_gcc434 work on slc6. - slc*|cc* ) + cc8_* ) + additionalProvides="perl(CGI) perl(Switch)" + slc* ) additionalProvides="perl(CGI)" ;; esac From b181ace2f2f46c2272f836ca88107e8b728fba90 Mon Sep 17 00:00:00 2001 From: mrodozov Date: Wed, 26 Feb 2020 12:47:21 +0100 Subject: [PATCH 018/101] Updates for tensorflow on cc8 --- bazel-0.29.1-patches.patch | 55 ++++++++++ bazel.spec | 28 ++++- data/cmsswdata.txt | 4 +- libjpeg-turbo.spec | 3 +- onnxruntime.spec | 4 +- pip/google-pasta.file | 1 + pip/opt-einsum.file | 1 + pip/py2-tensorboard.file | 2 +- pip/py2-tensorflow.file | 2 +- pip/py3-tensorboard.file | 2 +- pip/py3-tensorflow.file | 2 +- pip/requirements.txt | 19 ++-- pip/tensorflow-estimator.file | 1 + pip/tensorflow.file | 5 +- protobuf.spec | 12 +- tensorflow-python3-sources.spec | 157 ++------------------------ tensorflow-requires.file | 5 + tensorflow-sources.file | 189 ++++++++++++++++++++++++++++++++ tensorflow-sources.spec | 165 +--------------------------- tensorflow-toolfile.spec | 43 ++++++-- tensorflow.spec | 7 +- 21 files changed, 347 insertions(+), 360 deletions(-) create mode 100644 bazel-0.29.1-patches.patch create mode 100644 pip/google-pasta.file create mode 100644 pip/opt-einsum.file create mode 100644 pip/tensorflow-estimator.file create mode 100644 tensorflow-requires.file create mode 100644 tensorflow-sources.file diff --git a/bazel-0.29.1-patches.patch b/bazel-0.29.1-patches.patch new file mode 100644 index 00000000000..599ededa81e --- /dev/null +++ b/bazel-0.29.1-patches.patch @@ -0,0 +1,55 @@ +diff --git a/src/main/java/com/google/devtools/build/lib/exec/local/LocalSpawnRunner.java b/src/main/java/com/google/devtools/build/lib/exec/local/LocalSpawnRunner.java +index 4426ad4c5a..7c64f42381 100644 +--- a/src/main/java/com/google/devtools/build/lib/exec/local/LocalSpawnRunner.java ++++ b/src/main/java/com/google/devtools/build/lib/exec/local/LocalSpawnRunner.java +@@ -112,7 +112,7 @@ public class LocalSpawnRunner implements SpawnRunner { + this.localExecutionOptions = Preconditions.checkNotNull(localExecutionOptions); + this.hostName = NetUtil.getCachedShortHostName(); + this.resourceManager = resourceManager; +- this.useProcessWrapper = useProcessWrapper; ++ this.useProcessWrapper = false; + this.localEnvProvider = localEnvProvider; + this.binTools = binTools; + } +diff --git a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl +index ccb18a431a..1858574756 100644 +--- a/tools/cpp/unix_cc_configure.bzl ++++ b/tools/cpp/unix_cc_configure.bzl +@@ -200,6 +200,8 @@ def _find_gold_linker_path(repository_ctx, cc): + for flag in line.split(" "): + if flag.find("gold") == -1: + continue ++ if flag.find("enable-gold") > -1 or flag.find("with-plugin-ld") > -1: ++ continue + + # flag is '-fuse-ld=gold' for GCC or "/usr/lib/ld.gold" for Clang + # strip space, single quote, and double quotes +diff --git a/src/conditions/BUILD b/src/conditions/BUILD +index 2b28e28..faa41a4 100644 +--- a/src/conditions/BUILD ++++ b/src/conditions/BUILD +@@ -11,6 +11,12 @@ filegroup( + ) + + config_setting( ++ name = "linux_ppc", ++ values = {"cpu": "ppc"}, ++ visibility = ["//visibility:public"], ++) ++ ++config_setting( + name = "linux_x86_64", + values = {"cpu": "k8"}, + visibility = ["//visibility:public"], +diff --git a/third_party/BUILD b/third_party/BUILD +index 159006d..b2c0163 100644 +--- a/third_party/BUILD ++++ b/third_party/BUILD +@@ -526,6 +526,7 @@ UNNECESSARY_DYNAMIC_LIBRARIES = select({ + # The .so file is an x86 one, so we can just remove it if the CPU is not x86 + "//src/conditions:arm": "*.so *.jnilib *.dll", + "//src/conditions:linux_aarch64": "*.so *.jnilib *.dll", ++ "//src/conditions:linux_ppc": "*.so *.jnilib *.dll", + # Play it safe -- better have a big binary than a slow binary + # zip -d does require an argument. Supply something bogus. + "//conditions:default": "*.bogusextension", diff --git a/bazel.spec b/bazel.spec index 350b3b9f6b2..bfd32ae5af0 100644 --- a/bazel.spec +++ b/bazel.spec @@ -1,20 +1,36 @@ -### RPM external bazel 0.11.1 +### RPM external bazel 0.29.1 Source: https://github.com/bazelbuild/bazel/releases/download/%{realversion}/bazel-%{realversion}-dist.zip -BuildRequires: java-env + +BuildRequires: java-env python3 + +# For some build steps, bazel uses a process-wrapper that is executed in an empty environment. +# Therefore, the wrapper is linked to the system library /lib64/libstdc++.so.6, and complains about +# a missing GLIBCXX_3.4.21 version when (e.g.) used during the compilation of tensorflow python +# modules invoked via swig. This mechanism of bazel is actually only useful in combination with its +# remote compilation features. When disabling the process-wrapper, the local environment is taken +# into account which is the desired behavior for us. For example, see: +# - https://github.com/bazelbuild/bazel/issues/4137 +# - https://github.com/bazelbuild/bazel/issues/4510 +# - https://github.com/tensorflow/tensorboard/issues/1611 + +# configuration issue +# https://github.com/bazelbuild/bazel/issues/9392 +Patch0: bazel-0.29.1-patches + %prep %define __unzip unzip -d bazel-%{realversion} %setup -q -n bazel-%{realversion} -sed -i -e 's|^## Release 0.11.1|## Release 0.9.0|' CHANGELOG.md -sed -i -e 's|^\( *\)supports_gold_linker *=.*|\1supports_gold_linker = False|' ./tools/cpp/unix_cc_configure.bzl + +%patch0 -p1 %build + +export EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk" bash ./compile.sh %install mkdir %{i}/bin cp output/bazel %{i}/bin/. - - diff --git a/data/cmsswdata.txt b/data/cmsswdata.txt index b7b8613ee58..a9f66f4f45b 100644 --- a/data/cmsswdata.txt +++ b/data/cmsswdata.txt @@ -3,6 +3,7 @@ #Once a non-default section is empty then cleanup that section and remove its cmsdist/${PACKAGE_TYPE}.file #If there is no customization for the packae then remove its .spec and .file [default] +RecoTauTag-TrainingFiles=V00-02-00 RecoJets-JetProducers=V05-11-00 RecoMTD-TimingIDTools=V00-01-00 Configuration-Generator=V01-02-00 @@ -26,7 +27,6 @@ L1Trigger-L1TMuon=V01-01-04 CondTools-SiPhase2Tracker=V00-01-00 PhysicsTools-NanoAOD=V01-00-05 EgammaAnalysis-ElectronTools=V00-01-04 -RecoTauTag-TrainingFiles=V00-01-01 PhysicsTools-PatUtils=V00-01-00 SimTransport-PPSProtonTransport=V00-01-00 SimTransport-TotemRPProtonTransportParametrization=V00-01-00 @@ -98,4 +98,4 @@ FastSimulation-MaterialEffects=V05-00-00 L1Trigger-RPCTrigger=V00-15-00 RecoParticleFlow-PFBlockProducer=V02-04-02 SimG4CMS-Calo=V03-01-00 -Validation-Geometry=V00-07-00 \ No newline at end of file +Validation-Geometry=V00-07-00 diff --git a/libjpeg-turbo.spec b/libjpeg-turbo.spec index 36562a97d73..b52f125e863 100644 --- a/libjpeg-turbo.spec +++ b/libjpeg-turbo.spec @@ -1,6 +1,5 @@ ### RPM external libjpeg-turbo 2.0.2 -## INITENV SETV LIBJPEG_TURBO_SOURCE %{source0} -## INITENV SETV LIBJPEG_TURBO_STRIP_PREFIX %{source_prefix} +## 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} diff --git a/onnxruntime.spec b/onnxruntime.spec index 8e568466e4c..96cd34b29fa 100644 --- a/onnxruntime.spec +++ b/onnxruntime.spec @@ -1,6 +1,6 @@ ### RPM external onnxruntime 1.0.0 -%define tag eb635bfb66dae6cf414abfd1eb94c93842f1e66e -%define branch cms/v1.0.0 +%define tag 0f048da7774428d5fb2c4c808fc5820809ab24b8 +%define branch cms/v1.0.0_pb380 %define github_user cms-externals Source: git+https://github.com/%{github_user}/%{n}.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&submodules=1&output=/%{n}-%{realversion}.tgz diff --git a/pip/google-pasta.file b/pip/google-pasta.file new file mode 100644 index 00000000000..e75ed8ab0c1 --- /dev/null +++ b/pip/google-pasta.file @@ -0,0 +1 @@ +Requires: py2-six diff --git a/pip/opt-einsum.file b/pip/opt-einsum.file new file mode 100644 index 00000000000..7b27352a4e9 --- /dev/null +++ b/pip/opt-einsum.file @@ -0,0 +1 @@ +%define source0 https://github.com/dgasmith/opt_einsum/archive/v%{realversion}.tar.gz diff --git a/pip/py2-tensorboard.file b/pip/py2-tensorboard.file index ed7b5b001ad..c7e2fe7ec7e 100644 --- a/pip/py2-tensorboard.file +++ b/pip/py2-tensorboard.file @@ -1,2 +1,2 @@ -Requires: py2-numpy +Requires: py2-numpy py2-grpcio py2-absl-py %define PipPostBuild cp %{i}/bin/tensorboard %{i}/bin/tensorboard2 diff --git a/pip/py2-tensorflow.file b/pip/py2-tensorflow.file index 6db484c6d32..12fef65e078 100644 --- a/pip/py2-tensorflow.file +++ b/pip/py2-tensorflow.file @@ -1,4 +1,4 @@ -Requires: py2-enum34 py2-tensorboard +Requires: py2-enum34 py2-tensorboard py2-wrapt py2-functools32 py2-google-pasta py2-opt-einsum py2-tensorflow-estimator py2-scipy BuildRequires: tensorflow-sources %define PipPreBuildPy2 PIPFILE=${TENSORFLOW_SOURCES_ROOT}/tensorflow-%{realversion}-cp27-cp27mu-linux_%{_arch}.whl %define PipPostBuild rm -f %{i}/bin/tensorboard* ; ls %{i}/bin/* | xargs -i cp '{}' '{}2' diff --git a/pip/py3-tensorboard.file b/pip/py3-tensorboard.file index 072b4de1157..5f6f6ab725b 100644 --- a/pip/py3-tensorboard.file +++ b/pip/py3-tensorboard.file @@ -1,2 +1,2 @@ -Requires: py3-numpy +Requires: py3-numpy py2-absl-py py2-grpcio %define PipPostBuild mv %{i}/bin/tensorboard %{i}/bin/tensorboard3 diff --git a/pip/py3-tensorflow.file b/pip/py3-tensorflow.file index d4ddeff010c..47395e152fc 100644 --- a/pip/py3-tensorflow.file +++ b/pip/py3-tensorflow.file @@ -1,4 +1,4 @@ +Requires: py3-tensorboard py3-opt-einsum py2-tensorflow-estimator py2-wrapt py2-google-pasta py3-scipy BuildRequires: tensorflow-python3-sources -Requires: py3-tensorboard %define PipPreBuildPy3 PIPFILE=${TENSORFLOW_PYTHON3_SOURCES_ROOT}/tensorflow-%{realversion}-cp36-cp36m-linux_%{_arch}.whl %define PipPostBuild rm -f %{i}/bin/tensorboard* ; ls %{i}/bin/* | xargs -i mv '{}' '{}3' diff --git a/pip/requirements.txt b/pip/requirements.txt index fb154bf739e..b9ad7086904 100644 --- a/pip/requirements.txt +++ b/pip/requirements.txt @@ -74,6 +74,7 @@ gitdb2==2.0.6 GitPython==2.1.14 ; python_version<'3.0' GitPython==3.0.4 ; python_version>'3.0' google-common==0.0.1 +google-pasta==0.1.8 grpcio==1.25.0 h5py-cache==1.0 h5py==2.10.0 @@ -104,9 +105,7 @@ jupyter_console==5.2.0 ; python_version<'3.0' jupyter_console==6.0.0 ; python_version>'3.0' jupyter_core==4.6.1 jupyter==1.0.0 -#NO_AUTO_UPDATE:1: looks like Keras version 2.1.5 works with tensorflow 1.6.0. -#Update it when tensorflow is updated. -Keras==2.1.5 +Keras==2.3.1 keras-applications==1.0.8 keras-preprocessing==1.1.0 kiwisolver==1.1.0 @@ -147,6 +146,8 @@ numpy==1.15.1 ; python_version<'3.0' ; platform_machine=='aarch64' numpy==1.15.1 ; python_version>'3.0' ; platform_machine=='aarch64' oamap==0.12.4 onnx==1.6.0 +opt-einsum==2.3.2 ; python_version<'3.0' +opt-einsum==3.1.0 ; python_version>'3.0' ordereddict==1.1 packaging==19.2 pandas==0.24.2 ; python_version<'3.0' @@ -228,14 +229,14 @@ tables==3.5.2 ; python_version<'3.0' tables==3.6.1 ; python_version>'3.0' #NO_AUTO_UPDATE:4: Force to use tensorflow 1.6.0; this should match the version in tensorflow-sources.spec #tensorboard: Need separate packages for py2 and py3 to properly get the correct sources -tensorboard==1.6.0 ; python_version<'3.0' -tensorboard==1.6.0 ; python_version>'3.0' -tensorflow==1.6.0 ; python_version<'3.0' -tensorflow==1.6.0 ; python_version>'3.0' +tensorboard==2.0.0 ; python_version<'3.0' +tensorboard==2.0.0 ; python_version>'3.0' +tensorflow==2.1.0 ; python_version<'3.0' +tensorflow==2.1.0 ; python_version>'3.0' +tensorflow-estimator==2.1.0 termcolor==1.1.0 terminado==0.8.3 -#NO_AUTO_UPDATE:1: version of testpath is hardcoded in testpath.file. Update there also to point to latest source -testpath==0.4.2 +testpath==0.4.4 theanets==0.7.3 Theano==1.0.4 thriftpy==0.3.9 diff --git a/pip/tensorflow-estimator.file b/pip/tensorflow-estimator.file new file mode 100644 index 00000000000..aff83eca96e --- /dev/null +++ b/pip/tensorflow-estimator.file @@ -0,0 +1 @@ +%define PipDownloadSourceType none diff --git a/pip/tensorflow.file b/pip/tensorflow.file index e0142a2e4be..93e09a9c6c3 100644 --- a/pip/tensorflow.file +++ b/pip/tensorflow.file @@ -1,4 +1,5 @@ -Requires: py2-funcsigs py2-protobuf py2-pbr py2-six py2-packaging py2-appdirs py2-setuptools py2-pyparsing py2-mock py2-Werkzeug -Requires: py2-astor py2-gast py2-absl-py py2-backports py2-termcolor py2-grpcio +## INCLUDE tensorflow-requires +Requires: py2-funcsigs py2-pbr py2-packaging py2-appdirs py2-setuptools py2-pyparsing py2-mock py2-Werkzeug +Requires: py2-grpcio %define source0 none %define source_file none diff --git a/protobuf.spec b/protobuf.spec index ecd24e239fe..3da007182cb 100644 --- a/protobuf.spec +++ b/protobuf.spec @@ -1,4 +1,4 @@ -### RPM external protobuf 3.5.2 +### RPM external protobuf 3.8.0 ## INITENV SETV PROTOBUF_SOURCE %{source0} ## INITENV SETV PROTOBUF_STRIP_PREFIX %{source_prefix} #============= IMPORTANT NOTE ========================# @@ -24,16 +24,6 @@ BuildRequires: autotools %build ./autogen.sh -# Update to detect aarch64 and ppc64le -rm -f ./config.{sub,guess} ./gmock/gtest/build-aux/config.{sub,guess} ./gmock/build-aux/config.{sub,guess} -%get_config_sub ./config.sub -%get_config_guess ./config.guess -chmod +x ./config.{sub,guess} - -cp ./config.sub ./gmock/gtest/build-aux/config.sub -cp ./config.guess ./gmock/gtest/build-aux/config.guess -cp ./config.sub ./gmock/build-aux/config.sub -cp ./config.guess ./gmock/build-aux/config.guess ./configure --prefix %{i} \ --disable-static \ diff --git a/tensorflow-python3-sources.spec b/tensorflow-python3-sources.spec index 5910e4a05e3..800fa0521a5 100644 --- a/tensorflow-python3-sources.spec +++ b/tensorflow-python3-sources.spec @@ -1,152 +1,9 @@ -### RPM external tensorflow-python3-sources 1.6.0 -#Source: https://github.com/tensorflow/tensorflow/archive/v%{realversion}.tar.gz -# NOTE: whenever the version of tensorflow changes, update it also in tensorflow-c tensorflow-cc and py2-tensorflow -%define tag 6eea62c87173ad98c71f10ff2f796f6654f5b604 -%define branch cms/v%{realversion} -%define github_user cms-externals -Source: git+https://github.com/%{github_user}/tensorflow.git?obj=%{branch}/%{tag}&export=tensorflow-%{realversion}&output=/tensorflow-%{realversion}-%{tag}.tgz -Patch1: tensorflow-1.6.0-eigen-backports -Patch2: tensorflow-1.6.0-eigen-update-gemm_pack_lhs -Patch3: tensorflow-1.6.0-eigen-rename-sigmoid - -BuildRequires: bazel eigen protobuf gcc -BuildRequires: py2-setuptools java-env +### RPM external tensorflow-python3-sources 2.1.0 +%define python_cmd python3 +%define python_env PYTHON3PATH +%define build_type opt +%define pythonOnly yes +#Just to make sure that only one tensorflow-source package built at a time BuildRequires: tensorflow-sources -Requires: py3-numpy python3 py2-wheel - -%prep - -%setup -q -n tensorflow-%{realversion} -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 - -%build -export PYTHON_BIN_PATH=`which python3` -export TF_NEED_JEMALLOC=0 -export TF_NEED_HDFS=0 -export CC_OPT_FLAGS=-march=core2 -export CXX_OPT_FLAGS=-std=c++11 -export TF_NEED_GCP=0 -export TF_ENABLE_XLA=0 -export TF_NEED_OPENCL=0 -export TF_NEED_CUDA=0 -export TF_NEED_VERBS=0 -export TF_NEED_MKL=0 -export TF_NEED_MPI=0 -export USE_DEFAULT_PYTHON_LIB_PATH=1 -export TF_NEED_S3=0 -export TF_NEED_GDR=0 -export TF_NEED_OPENCL_SYCL=0 -export TF_SET_ANDROID_WORKSPACE=false -export TF_NEED_KAFKA=false - -#temp directory -export TEST_TMPDIR=%{_builddir}/cache/baze -rm -rf ../build $TEST_TMPDIR - -./configure - -sed -i -e "s|@EIGEN_SOURCE@|${EIGEN_SOURCE}|;s|@EIGEN_STRIP_PREFIX@|${EIGEN_STRIP_PREFIX}|" tensorflow/workspace.bzl tensorflow/contrib/makefile/download_dependencies.sh -sed -i -e "s|@PROTOBUF_SOURCE@|${PROTOBUF_SOURCE}|;s|@PROTOBUF_STRIP_PREFIX@|${PROTOBUF_STRIP_PREFIX}|" tensorflow/workspace.bzl tensorflow/contrib/makefile/download_dependencies.sh -bazel --output_user_root ../build fetch "tensorflow:libtensorflow_cc.so" - -sed -i -e 's|executable=ctx.executable._swig,|env=ctx.configuration.default_shell_env, executable=ctx.executable._swig,|' ../build/*/external/org_tensorflow/tensorflow/tensorflow.bzl -sed -i -e 's|mnemonic="ProtoCompile",|env=ctx.configuration.default_shell_env, mnemonic="ProtoCompile",|' ../build/*/external/protobuf_archive/protobuf.bzl - -bazel --output_user_root ../build build -s --verbose_failures -c opt --cxxopt=$CXX_OPT_FLAGS tensorflow:libtensorflow_cc.so -bazel --output_user_root ../build build -s --verbose_failures -c opt --cxxopt=$CXX_OPT_FLAGS //tensorflow/tools/pip_package:build_pip_package -bazel --output_user_root ../build build -s --verbose_failures -c opt --cxxopt=$CXX_OPT_FLAGS //tensorflow/tools/lib_package:libtensorflow -bazel --output_user_root ../build build -s --verbose_failures -c opt --cxxopt=$CXX_OPT_FLAGS //tensorflow/python/tools:tools_pip -bazel --output_user_root ../build build -s --verbose_failures -c opt --cxxopt=$CXX_OPT_FLAGS //tensorflow/tools/graph_transforms:transform_graph - -bazel shutdown - -#Copying out what was built by bazel -incdir="$PWD/tensorflow_cc/include" -libdir="$PWD/tensorflow_cc/lib" - -# Make directory and clean it -mkdir -p $incdir -mkdir -p $libdir - -rm -rf $incdir/* -rm -rf $libdir/* - -cp -v $PWD/bazel-bin/tensorflow/libtensorflow_cc.so $libdir -cp -v $PWD/bazel-bin/tensorflow/libtensorflow_framework.so $libdir - -#Download depencies used by tensorflow and copy to include dir -tensorflow/contrib/makefile/download_dependencies.sh -tdir=$PWD -dwnldir=$PWD/tensorflow/contrib/makefile/downloads -gendir=$PWD/bazel-genfiles - -# tensorflow headers -cd ${tdir} -header_list=`find tensorflow -type f -name "*.h" | grep -v contrib` -for my_header in ${header_list} -do - my_header_dir=$(dirname "${my_header}") - mkdir -p ${incdir}/${my_header_dir} - cp -p ${my_header} ${incdir}/${my_header_dir} -done -# generated headers -cd ${gendir} -header_list=`find tensorflow -type f -name "*.h"` -for my_header in ${header_list} -do - my_header_dir=$(dirname "${my_header}") - mkdir -p ${incdir}/${my_header_dir} - cp -p ${my_header} ${incdir}/${my_header_dir} -done -# third party headers -cd ${tdir} -header_list=`find third_party -type f -name "*.h" | grep -v contrib` -for my_header in ${header_list} -do - my_header_dir=$(dirname "${my_header}") - mkdir -p ${incdir}/${my_header_dir} - cp -p ${my_header} ${incdir}/${my_header_dir} -done -# third party eigen headers -header_list=`find third_party/eigen3 -type f | grep -v contrib` -for my_header in ${header_list} -do - my_header_dir=$(dirname "${my_header}") - mkdir -p ${incdir}/${my_header_dir} - cp -p ${my_header} ${incdir}/${my_header_dir} -done -# downloaded headers -cd ${dwnldir} -header_list=`find gemmlowp googletest re2 -type f -name "*.h"` -for my_header in ${header_list} -do - my_header_dir=$(dirname "${my_header}") - mkdir -p ${incdir}/${my_header_dir} - cp -p ${my_header} ${incdir}/${my_header_dir} -done -# downloaded eigen headers -header_list=`find eigen/Eigen eigen/unsupported -type f` -for my_header in ${header_list} -do - my_header_dir=$(dirname "${my_header}") - mkdir -p ${incdir}/${my_header_dir} - cp -p ${my_header} ${incdir}/${my_header_dir} -done -# downloaded nsync headers -header_list=`find nsync/public -name '*.h' -type f` -for my_header in ${header_list} -do - cp -p ${my_header} ${incdir}/ -done -# eigen signature file -cp -p eigen/signature_of_eigen3_matrix_library ${incdir}/eigen/ || exit 1 - -%install - -bazel-bin/tensorflow/tools/pip_package/build_pip_package %{i} - -cp $PWD/bazel-bin/tensorflow/tools/lib_package/libtensorflow.tar.gz %{i} +## INCLUDE tensorflow-sources -tar cfz %{i}/libtensorflow_cc.tar.gz tensorflow_cc/. diff --git a/tensorflow-requires.file b/tensorflow-requires.file new file mode 100644 index 00000000000..4ae462beded --- /dev/null +++ b/tensorflow-requires.file @@ -0,0 +1,5 @@ +Requires: python python3 py2-numpy py2-enum34 py2-mock py2-wheel +Requires: py2-keras-applications py2-keras-preprocessing py2-setuptools py2-future py2-wrapt py2-gast +Requires: py2-cython py2-googlePackages py2-functools32 py2-astor py2-six py2-termcolor py2-absl-py +Requires: py2-backports py2-opt-einsum py3-opt-einsum +Requires: eigen protobuf zlib libpng libjpeg-turbo curl pcre giflib sqlite swig diff --git a/tensorflow-sources.file b/tensorflow-sources.file new file mode 100644 index 00000000000..157a587669a --- /dev/null +++ b/tensorflow-sources.file @@ -0,0 +1,189 @@ +##Tensorflow Common build files +############################################ +# IMPORTANT +# - Whenever the version of tensorflow changes, +# update it also in tensorflow-c tensorflow-cc +# and py2-tensorflow version too +# - Need to check protobuf and eigen versions +# - Check eigen flags in third_party/eigen.BUILD +# and update eigen-toolfile.spec accordingly +############################################ + +BuildRequires: bazel swig java-env git +#Keep all requires in separate file, so that can be included in py-tensorflow too +## INCLUDE tensorflow-requires + +%define tag 441193ae4b89fd8784a3ea0a5dfd8700018980da +%define branch cms/v%{realversion} +%define github_user cms-externals +Source: git+https://github.com/%{github_user}/tensorflow.git?obj=%{branch}/%{tag}&export=tensorflow-%{realversion}&output=/tensorflow-%{realversion}.tgz + +%if "%{?build_type:set}" != "set" +%define build_type opt +%endif +%if "%{?pythonOnly:set}" != "set" +%define pythonOnly no +%endif + +%define majorversion %(echo %realversion | cut -d . -f 1) + +%prep + +%setup -q -n tensorflow-%{realversion} + +%build + +export PYTHON_BIN_PATH="$(which %{python_cmd})" +export USE_DEFAULT_PYTHON_LIB_PATH=1 +export GCC_HOST_COMPILER_PATH="$(which gcc)" +%ifarch x86_64 +export CC_OPT_FLAGS=-march=core2 +%else +export CC_OPT_FLAGS="-mcpu=native -mtune=native" +%endif +export CXX_OPT_FLAGS=-std=c++17 +export EIGEN_SOURCE=${EIGEN_SOURCE} +export PROTOBUF_SOURCE=${PROTOBUF_SOURCE} +export EIGEN_STRIP_PREFIX=${EIGEN_STRIP_PREFIX} +export PROTOBUF_STRIP_PREFIX=${PROTOBUF_STRIP_PREFIX} + +export TF_NEED_JEMALLOC=0 +export TF_NEED_HDFS=0 +export TF_NEED_GCP=0 +export TF_ENABLE_XLA=0 +export TF_NEED_OPENCL=0 +export TF_NEED_CUDA=0 +export TF_NEED_VERBS=0 +export TF_NEED_MKL=0 +export TF_NEED_MPI=0 +export TF_NEED_S3=0 +export TF_NEED_GDR=0 +export TF_NEED_OPENCL_SYCL=0 +export TF_SET_ANDROID_WORKSPACE=false +export TF_NEED_KAFKA=false +export TF_NEED_AWS=0 +export TF_DOWNLOAD_CLANG=0 +export TF_NEED_IGNITE=0 +export TF_NEED_ROCM=0 +export TF_NEED_TENSORRT=0 +export TEST_TMPDIR=%{_builddir}/build +export TF_CMS_EXTERNALS="%{_builddir}/cms_externals.txt" + +echo "png:${LIBPNG_ROOT}" > ${TF_CMS_EXTERNALS} +echo "libjpeg_turbo:${LIBJPEG_TURBO_ROOT}" >> ${TF_CMS_EXTERNALS} +echo "zlib_archive:${ZLIB_ROOT}" >> ${TF_CMS_EXTERNALS} +echo "curl:${CURL_ROOT}" >> ${TF_CMS_EXTERNALS} +echo "com_google_protobuf:${PROTOBUF_ROOT}" >> ${TF_CMS_EXTERNALS} +echo "pcre:${PCRE_ROOT}" >> ${TF_CMS_EXTERNALS} +echo "gif:${GIFLIB_ROOT}" >> ${TF_CMS_EXTERNALS} +echo "org_sqlite:${SQLITE_ROOT}" >> ${TF_CMS_EXTERNALS} +echo "swig:" >> ${TF_CMS_EXTERNALS} +echo "cython:" >> ${TF_CMS_EXTERNALS} +echo "functools32_archive:" >> ${TF_CMS_EXTERNALS} +echo "enum34_archive:" >> ${TF_CMS_EXTERNALS} +echo "astor_archive:" >> ${TF_CMS_EXTERNALS} +echo "six_archive:" >> ${TF_CMS_EXTERNALS} +echo "absl_py:" >> ${TF_CMS_EXTERNALS} +echo "termcolor_archive:" >> ${TF_CMS_EXTERNALS} +echo "keras_applications_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} + +export TF_SYSTEM_LIBS=$(cat ${TF_CMS_EXTERNALS} | sed 's|:.*||' | tr "\n" "," | sed 's|,*$||') + +# clear the build dir and configure +rm -rf ../build +./configure + +# define bazel options +BAZEL_OPTS="--batch --output_user_root ../build build -s --verbose_failures --config=opt --cxxopt=$CXX_OPT_FLAGS %{makeprocesses}" +BAZEL_OPTS="$BAZEL_OPTS --config=noaws --config=nogcp --config=nohdfs --config=nonccl" +BAZEL_OPTS="$BAZEL_OPTS --action_env=SWIG_LIB=${SWIG_LIB} --action_env=PYTHONPATH=$%{python_env} --action_env=LD_LIBRARY_PATH" +BAZEL_OPTS="$BAZEL_OPTS --distinct_host_configuration=false --incompatible_no_support_tools_in_action_inputs=false" + +# build tensorflow python targets +bazel $BAZEL_OPTS $BAZEL_EXTRA_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 $BAZEL_EXTRA_OPTS //tensorflow:install_headers + +# 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 + +%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 +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 + +# 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 + +%endif + +# create the wheel file that is installed in py2-tensorflow +bazel-bin/tensorflow/tools/pip_package/build_pip_package %{i} diff --git a/tensorflow-sources.spec b/tensorflow-sources.spec index 5e6bc1fdf86..a3bd9bbef32 100644 --- a/tensorflow-sources.spec +++ b/tensorflow-sources.spec @@ -1,160 +1,7 @@ -### RPM external tensorflow-sources 1.6.0 -#Source: https://github.com/tensorflow/tensorflow/archive/v%{realversion}.tar.gz -# NOTE: whenever the version of tensorflow changes, update it also in tensorflow-c tensorflow-cc and py2-tensorflow -%define tag 6eea62c87173ad98c71f10ff2f796f6654f5b604 -%define branch cms/v%{realversion} -%define github_user cms-externals -Source: git+https://github.com/%{github_user}/tensorflow.git?obj=%{branch}/%{tag}&export=tensorflow-%{realversion}&output=/tensorflow-%{realversion}-%{tag}.tgz -Patch0: tensorflow-1.6.0-rename-runtime -Patch1: tensorflow-1.6.0-eigen-backports -Patch2: tensorflow-1.6.0-eigen-update-gemm_pack_lhs -Patch3: tensorflow-1.6.0-eigen-rename-sigmoid -BuildRequires: bazel eigen protobuf gcc -BuildRequires: py2-setuptools java-env -Requires: py2-numpy python py2-wheel +### RPM external tensorflow-sources 2.1.0 +%define python_cmd python +%define python_env PYTHON27PATH +%define build_type opt +%define pythonOnly no +## INCLUDE tensorflow-sources -%prep - -%setup -q -n tensorflow-%{realversion} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 - -%build -export PYTHON_BIN_PATH=`which python` -export TF_NEED_JEMALLOC=0 -export TF_NEED_HDFS=0 -export CC_OPT_FLAGS=-march=core2 -export CXX_OPT_FLAGS=-std=c++11 -export TF_NEED_GCP=0 -export TF_ENABLE_XLA=0 -export TF_NEED_OPENCL=0 -export TF_NEED_CUDA=0 -export TF_NEED_VERBS=0 -export TF_NEED_MKL=0 -export TF_NEED_MPI=0 -export USE_DEFAULT_PYTHON_LIB_PATH=1 -export TF_NEED_S3=0 -export TF_NEED_GDR=0 -export TF_NEED_OPENCL_SYCL=0 -export TF_SET_ANDROID_WORKSPACE=false -export TF_NEED_KAFKA=false - -#temp directory -export TEST_TMPDIR=%{_builddir}/cache/bazel -rm -rf ../build $TEST_TMPDIR - -./configure - -sed -i -e "s|@EIGEN_SOURCE@|${EIGEN_SOURCE}|;s|@EIGEN_STRIP_PREFIX@|${EIGEN_STRIP_PREFIX}|" tensorflow/workspace.bzl tensorflow/contrib/makefile/download_dependencies.sh -sed -i -e "s|@PROTOBUF_SOURCE@|${PROTOBUF_SOURCE}|;s|@PROTOBUF_STRIP_PREFIX@|${PROTOBUF_STRIP_PREFIX}|" tensorflow/workspace.bzl tensorflow/contrib/makefile/download_dependencies.sh -bazel --output_user_root ../build fetch "tensorflow:libtensorflow_cc.so" - -sed -i -e 's|executable=ctx.executable._swig,|env=ctx.configuration.default_shell_env, executable=ctx.executable._swig,|' ../build/*/external/org_tensorflow/tensorflow/tensorflow.bzl -sed -i -e 's|mnemonic="ProtoCompile",|env=ctx.configuration.default_shell_env, mnemonic="ProtoCompile",|' ../build/*/external/protobuf_archive/protobuf.bzl - -bazel --output_user_root ../build build -s --verbose_failures -c opt --cxxopt=$CXX_OPT_FLAGS //tensorflow:libtensorflow_cc.so -bazel --output_user_root ../build build -s --verbose_failures -c opt --cxxopt=$CXX_OPT_FLAGS //tensorflow/tools/pip_package:build_pip_package -bazel --output_user_root ../build build -s --verbose_failures -c opt --cxxopt=$CXX_OPT_FLAGS //tensorflow/tools/lib_package:libtensorflow -bazel --output_user_root ../build build -s --verbose_failures -c opt --cxxopt=$CXX_OPT_FLAGS //tensorflow/python/tools:tools_pip -bazel --output_user_root ../build build -s --verbose_failures -c opt --cxxopt=$CXX_OPT_FLAGS //tensorflow/tools/graph_transforms:transform_graph -bazel --output_user_root ../build build -s --verbose_failures -c opt --cxxopt=$CXX_OPT_FLAGS //tensorflow/compiler/aot:tf_aot_runtime -bazel --output_user_root ../build build -s --verbose_failures -c opt --cxxopt=$CXX_OPT_FLAGS //tensorflow/compiler/tf2xla:xla_compiled_cpu_function -%ifnarch ppc64le -bazel --output_user_root ../build build -s --verbose_failures -c opt --cxxopt=$CXX_OPT_FLAGS //tensorflow/compiler/aot:tfcompile -%endif - -bazel shutdown - -#Copying out what was built by bazel -incdir="$PWD/tensorflow_cc/include" -libdir="$PWD/tensorflow_cc/lib" -bindir="$PWD/tensorflow_cc/bin" - -# Make directory and clean it -rm -rf $incdir $libdir $bindir -mkdir -p $incdir $libdir $bindir - -cp -v $PWD/bazel-bin/tensorflow/libtensorflow_cc.so $libdir -cp -v $PWD/bazel-bin/tensorflow/libtensorflow_framework.so $libdir -cp -v $PWD/bazel-bin/tensorflow/compiler/aot/libtf_aot_runtime.so $libdir -cp -v $PWD/bazel-bin/tensorflow/compiler/tf2xla/libxla_compiled_cpu_function.so $libdir -%ifnarch ppc64le -cp -v $PWD/bazel-bin/tensorflow/compiler/aot/tfcompile $bindir -%endif - -#Download depencies used by tensorflow and copy to include dir -tensorflow/contrib/makefile/download_dependencies.sh -tdir=$PWD -dwnldir=$PWD/tensorflow/contrib/makefile/downloads -gendir=$PWD/bazel-genfiles - -# tensorflow headers -cd ${tdir} -header_list=`find tensorflow -type f -name "*.h" | grep -v contrib` -for my_header in ${header_list} -do - my_header_dir=$(dirname "${my_header}") - mkdir -p ${incdir}/${my_header_dir} - cp -p ${my_header} ${incdir}/${my_header_dir} -done -# generated headers -cd ${gendir} -header_list=`find tensorflow -type f -name "*.h"` -for my_header in ${header_list} -do - my_header_dir=$(dirname "${my_header}") - mkdir -p ${incdir}/${my_header_dir} - cp -p ${my_header} ${incdir}/${my_header_dir} -done -# third party headers -cd ${tdir} -header_list=`find third_party -type f -name "*.h" | grep -v contrib` -for my_header in ${header_list} -do - my_header_dir=$(dirname "${my_header}") - mkdir -p ${incdir}/${my_header_dir} - cp -p ${my_header} ${incdir}/${my_header_dir} -done -# third party eigen headers -header_list=`find third_party/eigen3 -type f | grep -v contrib` -for my_header in ${header_list} -do - my_header_dir=$(dirname "${my_header}") - mkdir -p ${incdir}/${my_header_dir} - cp -p ${my_header} ${incdir}/${my_header_dir} -done -# downloaded headers -cd ${dwnldir} -header_list=`find gemmlowp googletest re2 -type f -name "*.h"` -for my_header in ${header_list} -do - my_header_dir=$(dirname "${my_header}") - mkdir -p ${incdir}/${my_header_dir} - cp -p ${my_header} ${incdir}/${my_header_dir} -done -# downloaded eigen headers -header_list=`find eigen/Eigen eigen/unsupported -type f` -for my_header in ${header_list} -do - my_header_dir=$(dirname "${my_header}") - mkdir -p ${incdir}/${my_header_dir} - cp -p ${my_header} ${incdir}/${my_header_dir} -done -# downloaded nsync headers -header_list=`find nsync/public -name '*.h' -type f` -for my_header in ${header_list} -do - cp -p ${my_header} ${incdir}/ -done -# eigen signature file -cp -p eigen/signature_of_eigen3_matrix_library ${incdir}/eigen/ || exit 1 - -%install - -bazel-bin/tensorflow/tools/pip_package/build_pip_package %{i} - -cp $PWD/bazel-bin/tensorflow/tools/lib_package/libtensorflow.tar.gz %{i} -cd tensorflow_cc -tar cfz %{i}/libtensorflow_cc.tar.gz . diff --git a/tensorflow-toolfile.spec b/tensorflow-toolfile.spec index 6f6239c71b8..a59c0320f63 100644 --- a/tensorflow-toolfile.spec +++ b/tensorflow-toolfile.spec @@ -1,5 +1,7 @@ -### RPM external tensorflow-toolfile 1.0 +### RPM external tensorflow-toolfile 2.1.0 + Requires: tensorflow + %prep %build @@ -7,7 +9,8 @@ Requires: tensorflow %install mkdir -p %i/etc/scram.d -cat << \EOF_TOOLFILE >%i/etc/scram.d/tensorflow.xml + +cat << \EOF_TOOLFILE > %i/etc/scram.d/tensorflow.xml @@ -21,41 +24,63 @@ cat << \EOF_TOOLFILE >%i/etc/scram.d/tensorflow.xml EOF_TOOLFILE -cat << \EOF_TOOLFILE >%i/etc/scram.d/tensorflow-framework.xml +cat << \EOF_TOOLFILE > %i/etc/scram.d/tensorflow-framework.xml + + + + EOF_TOOLFILE -cat << \EOF_TOOLFILE >%i/etc/scram.d/tensorflow-cc.xml +cat << \EOF_TOOLFILE > %i/etc/scram.d/tensorflow-cc.xml - + + EOF_TOOLFILE -cat << \EOF_TOOLFILE >%i/etc/scram.d/tensorflow-c.xml +cat << \EOF_TOOLFILE > %i/etc/scram.d/tensorflow-c.xml + + + EOF_TOOLFILE -cat << \EOF_TOOLFILE >%i/etc/scram.d/tensorflow-runtime.xml +cat << \EOF_TOOLFILE > %i/etc/scram.d/tensorflow-runtime.xml - + + + +EOF_TOOLFILE + +cat << \EOF_TOOLFILE > %i/etc/scram.d/tensorflow-executable_run_options.xml + + EOF_TOOLFILE -cat << \EOF_TOOLFILE >%i/etc/scram.d/tensorflow-xla_compiled_cpu_function.xml +cat << \EOF_TOOLFILE > %i/etc/scram.d/tensorflow-xla_compiled_cpu_function.xml EOF_TOOLFILE +cat << \EOF_TOOLFILE > %i/etc/scram.d/tensorflow-tf2xla.xml + + + + +EOF_TOOLFILE + ## IMPORT scram-tools-post diff --git a/tensorflow.spec b/tensorflow.spec index 51a4dab27c8..96925b626e9 100644 --- a/tensorflow.spec +++ b/tensorflow.spec @@ -1,7 +1,7 @@ -### RPM external tensorflow 1.6.0 +### RPM external tensorflow 2.1.0 + Provides: libtensorflow_cc.so(tensorflow)(64bit) Source: none - BuildRequires: tensorflow-sources %prep @@ -9,6 +9,5 @@ BuildRequires: tensorflow-sources %build %install -tar xfz ${TENSORFLOW_SOURCES_ROOT}/libtensorflow.tar.gz -C %{i} -tar xfz ${TENSORFLOW_SOURCES_ROOT}/libtensorflow_cc.tar.gz -C %{i} +tar xfz ${TENSORFLOW_SOURCES_ROOT}/libtensorflow_cc.tar.gz -C %{i} From cd5aa6d148d7861ae4376d735eb1e3c5ba62c13b Mon Sep 17 00:00:00 2001 From: Mircho Rodozov Date: Fri, 28 Feb 2020 17:49:17 +0100 Subject: [PATCH 019/101] Disable gold linker for bazel --- bazel-0.29.1-patches.patch | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bazel-0.29.1-patches.patch b/bazel-0.29.1-patches.patch index 599ededa81e..1d5292a1780 100644 --- a/bazel-0.29.1-patches.patch +++ b/bazel-0.29.1-patches.patch @@ -12,18 +12,18 @@ index 4426ad4c5a..7c64f42381 100644 this.binTools = binTools; } diff --git a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl -index ccb18a431a..1858574756 100644 +index ccb18a4..46eff97 100644 --- a/tools/cpp/unix_cc_configure.bzl +++ b/tools/cpp/unix_cc_configure.bzl -@@ -200,6 +200,8 @@ def _find_gold_linker_path(repository_ctx, cc): - for flag in line.split(" "): - if flag.find("gold") == -1: - continue -+ if flag.find("enable-gold") > -1 or flag.find("with-plugin-ld") > -1: -+ continue +@@ -207,7 +207,7 @@ def _find_gold_linker_path(repository_ctx, cc): - # flag is '-fuse-ld=gold' for GCC or "/usr/lib/ld.gold" for Clang - # strip space, single quote, and double quotes + # remove -fuse-ld= from GCC output so we have only the flag value part + flag = flag.replace("-fuse-ld=", "") +- return flag ++ return None + auto_configure_warning( + "CC with -fuse-ld=gold returned 0, but its -v output " + + "didn't contain 'gold', falling back to the default linker.", diff --git a/src/conditions/BUILD b/src/conditions/BUILD index 2b28e28..faa41a4 100644 --- a/src/conditions/BUILD From 8b01683c0012660eee5569b67686c89320b4e047 Mon Sep 17 00:00:00 2001 From: Mircho Rodozov Date: Sat, 29 Feb 2020 12:50:12 +0100 Subject: [PATCH 020/101] [DD4hep] Fix CC8 IBs please test --- dd4hep.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dd4hep.spec b/dd4hep.spec index ddc1469c72f..1639f203010 100644 --- a/dd4hep.spec +++ b/dd4hep.spec @@ -1,6 +1,6 @@ ### RPM external dd4hep v01-10x -%define tag a2065d9461515873a6e37b099b6b06f3b9d7a81c +%define tag 2697e053267fc25bf81f9b6f514dca8f8bf371cd %define branch master %define github_user AIDASoft %define keep_archives true From e8cd03cb27d68f95e3cda7e9158a6df1a714cb97 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Fri, 20 Mar 2020 18:01:06 +0100 Subject: [PATCH 021/101] Update python_tools.spec --- python_tools.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_tools.spec b/python_tools.spec index 5d636c24289..78e62333e4b 100644 --- a/python_tools.spec +++ b/python_tools.spec @@ -3,7 +3,7 @@ ## INITENV +PATH PYTHON3PATH %{i}/${PYTHON3_LIB_SITE_PACKAGES} Source: none -Requires: root curl python python3 xrootd llvm hdf5 +Requires: root curl python python3 xrootd llvm hdf5 mxnet-predict Requires: py2-scipy Requires: py2-Keras Requires: py2-Theano From eb7a3e384ea9380e2fadbc20dc4b35cb175d84bc Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Fri, 20 Mar 2020 22:01:55 +0100 Subject: [PATCH 022/101] force provide the perl package --- autotools.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/autotools.spec b/autotools.spec index 8a6e77cf6e8..09d7da610f0 100644 --- a/autotools.spec +++ b/autotools.spec @@ -8,6 +8,7 @@ %define m4_version 1.4.18 %define gettext_version 0.20.1 %define pkgconfig_version 0.29.2 +Provides: perl(Errno) Source0: http://ftp.gnu.org/gnu/autoconf/autoconf-%{autoconf_version}.tar.gz Source1: http://ftp.gnu.org/gnu/automake/automake-%{automake_version}.tar.gz Source2: http://ftp.gnu.org/gnu/libtool/libtool-%{libtool_version}.tar.gz From 97825fd02a0c31ea874b14ccdb8be14bd2675b31 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Sat, 21 Mar 2020 22:43:06 +0100 Subject: [PATCH 023/101] for cc8 use system OpenSSL --- python3.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/python3.spec b/python3.spec index 90be33a9a07..d9aeda2dd5b 100644 --- a/python3.spec +++ b/python3.spec @@ -35,7 +35,6 @@ done --prefix=%{i} \ --enable-shared \ --enable-ipv6 \ - --with-openssl=${OPENSSL_ROOT} \ --with-system-ffi \ --without-ensurepip \ --with-system-expat \ From 9867d36d7028147d1469824cfbce968aa27fbfa2 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Mon, 30 Mar 2020 15:49:36 +0200 Subject: [PATCH 024/101] type --- bootstrap-driver.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap-driver.spec b/bootstrap-driver.spec index b89b59cb9ac..2b15df4c591 100644 --- a/bootstrap-driver.spec +++ b/bootstrap-driver.spec @@ -248,6 +248,7 @@ case %cmsplatf in # Required to get slc5_amd64_gcc434 work on slc6. cc8_* ) additionalProvides="perl(CGI) perl(Switch)" + ;; slc* ) additionalProvides="perl(CGI)" ;; From 3ea32ca5b66520f18a3be3b5b8a712e9ad29ce2b Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Tue, 7 Apr 2020 09:05:50 +0200 Subject: [PATCH 025/101] [CMSSWDATA] Use Source0 to allow extra possible sources --- cmsswdata-github.file | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmsswdata-github.file b/cmsswdata-github.file index d849eb7f1ec..c7b3cacfbeb 100644 --- a/cmsswdata-github.file +++ b/cmsswdata-github.file @@ -16,7 +16,7 @@ %define source0 git+https://github.com/cms-data/%{data_repo}.git?obj=master/%{realversion}&no-cmssdt-cache=1&export=%{export_dir}&output=/%{n}-%{realversion}.tgz %endif -Source: %{source0} +Source0: %{source0} %prep %{?PrePrep:%PrePrep} From 80febfe37460160811d83f398c2d106fb92c1143 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Thu, 7 May 2020 14:35:33 +0200 Subject: [PATCH 026/101] remove make 4.2.1 patch --- gmake.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/gmake.spec b/gmake.spec index e107d8ab710..eff4ecba4a5 100644 --- a/gmake.spec +++ b/gmake.spec @@ -1,12 +1,8 @@ ### RPM external gmake 4.3 Source: ftp://ftp.gnu.org/gnu/make/make-%{realversion}.tar.gz -#https://github.com/osresearch/heads/blob/make-4.2.1/patches/make-4.2.1.patch -Patch0: make-4.2.1 - %prep %setup -n make-%{realversion} -%patch0 -p1 %build ./configure --prefix=%{i} From 81d2fe6d118326554472efbb9456782b50e984c1 Mon Sep 17 00:00:00 2001 From: Mircho Rodozov Date: Thu, 28 May 2020 10:54:59 +0200 Subject: [PATCH 027/101] madgraph update cc8 - has few changes from 7 --- madgraph5amcatnlo.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/madgraph5amcatnlo.spec b/madgraph5amcatnlo.spec index f89444c6bcc..b62dac4821b 100644 --- a/madgraph5amcatnlo.spec +++ b/madgraph5amcatnlo.spec @@ -30,6 +30,7 @@ sed -i -e "s|\${FASTJET_ROOT}|${FASTJET_ROOT}|g" input/.mg5_configuration_defaul sed -i -e "s|\${GOSAMCONTRIB_ROOT}|${GOSAMCONTRIB_ROOT}|g" input/.mg5_configuration_default.txt sed -i -e "s|\${THEPEG_ROOT}|${THEPEG_ROOT}|g" input/.mg5_configuration_default.txt sed -i -e "s|@MADGRAPH5AMCATNLO_ROOT@|%{i}|g" input/.mg5_configuration_default.txt +sed -i -e "s|SHFLAG = \-fPIC|SHFLAG = \-fPIC \-fcommon|g" vendor/StdHEP/src/stdhep_arch %build export FC="$(which gfortran) -std=legacy" From 9ce334a52c7d659a7a8aa087964d687ea70c921d Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Sun, 31 May 2020 12:07:37 +0200 Subject: [PATCH 028/101] use openssl from system for cc8 --- triton-inference-server.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/triton-inference-server.spec b/triton-inference-server.spec index b3d9f809c38..6be232346fe 100644 --- a/triton-inference-server.spec +++ b/triton-inference-server.spec @@ -4,7 +4,7 @@ Source: git+https://github.com/%{github_user}/triton-inference-server.git?obj=%{branch}/v%{realversion}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz BuildRequires: cmake -Requires: openssl opencv protobuf grpc curl python py2-wheel py2-setuptools py2-grpcio-tools +Requires: opencv protobuf grpc curl python py2-wheel py2-setuptools py2-grpcio-tools %prep @@ -33,7 +33,6 @@ cmake ../%{n}-%{realversion}/build/trtis-clients \ -DTRTIS_ENABLE_GRPC_V2=OFF \ -DTRTIS_VERSION=%{realversion} \ -DZLIB_ROOT=${ZLIB_ROOT} \ - -DOPENSSL_ROOT_DIR=${OPENSSL_ROOT} \ -DCMAKE_PREFIX_PATH="${ZLIB_ROOT}" make %{makeprocesses} From 8bdc8902743d611a1345354191ea8380b3174dbe Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Tue, 23 Jun 2020 15:02:25 +0200 Subject: [PATCH 029/101] Fix go.spec for cc8 ppc64le to provide the missing deps --- go.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/go.spec b/go.spec index 8e594250b82..d85a9fb598a 100644 --- a/go.spec +++ b/go.spec @@ -5,6 +5,7 @@ Source: https://storage.googleapis.com/golang/go%{realversion}.linux-amd64.tar.gz %endif %ifarch ppc64le +Provides: libc.so.6(GLIBC_2.2.5)(64bit) Source: https://storage.googleapis.com/golang/go%{realversion}.linux-ppc64le.tar.gz %endif %ifarch aarch64 From 4b4348b35ce21d44b8aef22f50503a924ce5ade6 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Wed, 29 Jul 2020 12:31:07 +0200 Subject: [PATCH 030/101] use findDependencies.py for cc8 --- scram-project-build.file | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scram-project-build.file b/scram-project-build.file index b2d10b54c45..bee325e1f79 100644 --- a/scram-project-build.file +++ b/scram-project-build.file @@ -50,7 +50,7 @@ BuildRequires: dwz %endif %if "%{?configtag:set}" != "set" -%define configtag V05-10-26 +%define configtag V05-10-28 %endif %if "%{?cvssrc:set}" != "set" @@ -193,7 +193,7 @@ fi %if "%{?saveDeps:set}" == "set" mkdir -p %i/etc/dependencies -python %i/config/SCRAM/findDependencies.py -rel %i -arch %cmsplatf +%i/config/SCRAM/findDependencies.pl -rel %i -arch %cmsplatf %{?PatchReleaseDependencyInfo:%PatchReleaseDependencyInfo} gzip -f %i/etc/dependencies/*.out %endif From 793f351cd11fbc0bb5a4b17369c7164c5ea9cb44 Mon Sep 17 00:00:00 2001 From: Mircho Rodozov Date: Wed, 19 Aug 2020 16:57:45 +0300 Subject: [PATCH 031/101] [CC8] XrootD add skipped flag please test the auto merge skipped a flag, adding it --- xrootd.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xrootd.spec b/xrootd.spec index f6b9a593784..6a8cd468333 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -29,6 +29,7 @@ perl -p -i -e 's|^#!.*perl(.*)|#!/usr/bin/env perl$1|' src/XrdMon/xrdmonPrepareS # libfuse and libperl are not produced by CMSDIST. CMAKE_ARGS="-DCMAKE_INSTALL_PREFIX=%{i} \ + -DCMAKE_BUILD_TYPE=Release \ -DZLIB_ROOT:PATH=${ZLIB_ROOT} \ -DENABLE_PYTHON=FALSE \ -DENABLE_FUSE=FALSE \ From cc59c5cdb640d8de8ffe05c231fb24abe40c4b7b Mon Sep 17 00:00:00 2001 From: Cms Build Date: Thu, 19 Nov 2020 16:16:44 +0000 Subject: [PATCH 032/101] include gcc9 for cc8 --- bison.spec | 2 +- cmssw-tool-conf.spec | 1 - gcc-toolfile.spec | 3 +++ gcc.spec | 6 +++--- rpm-preamble.file | 4 ++-- starlight.spec | 6 +++++- thepeg.spec | 2 +- 7 files changed, 15 insertions(+), 9 deletions(-) diff --git a/bison.spec b/bison.spec index 6fe5d7d7a18..cc2ecc66a73 100644 --- a/bison.spec +++ b/bison.spec @@ -1,4 +1,4 @@ -### RPM external bison 3.1 +### RPM external bison 3.5 ## INITENV SET BISON_PKGDATADIR %{i}/share/bison Source: http://ftp.gnu.org/gnu/%{n}/%{n}-%{realversion}.tar.gz diff --git a/cmssw-tool-conf.spec b/cmssw-tool-conf.spec index 22032281350..7667b9c84d0 100644 --- a/cmssw-tool-conf.spec +++ b/cmssw-tool-conf.spec @@ -155,7 +155,6 @@ Requires: dablooms-toolfile # Only for Linux platform. %ifos linux -Requires: gcc-checker-plugin-toolfile Requires: openldap-toolfile Requires: gperftools-toolfile Requires: cuda-toolfile diff --git a/gcc-toolfile.spec b/gcc-toolfile.spec index 5ee5b35fc0b..0d03200b677 100644 --- a/gcc-toolfile.spec +++ b/gcc-toolfile.spec @@ -51,6 +51,8 @@ cat << \EOF_TOOLFILE >%i/etc/scram.d/gcc-cxxcompiler.xml + + @@ -110,6 +112,7 @@ cat << \EOF_TOOLFILE >%i/etc/scram.d/gcc-f77compiler.xml @ARCH_FORTRAN_LIBDIR@ + diff --git a/gcc.spec b/gcc.spec index 6a54ba36e0a..a4fb558c971 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,11 +1,11 @@ -### RPM external gcc 8.4.0 +### RPM external gcc 9.3.0 ## USE_COMPILER_VERSION ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 # Use the git repository for fetching the sources. This gives us more control while developing # a new platform so that we can compile yet to be released versions of the compiler. # See: https://gcc.gnu.org/viewcvs/gcc/branches/gcc-8-branch/?view=log -%define gccTag 8cd3bffead2ed1d1998c190865694f920fbc93ab -%define gccBranch releases/gcc-8 +%define gccTag 4212a6a3e44f870412d9025eeb323fd4f50a61da +%define gccBranch releases/gcc-9 %define moduleName %{n}-%{realversion} Source0: git+https://github.com/gcc-mirror/%{n}.git?obj=%{gccBranch}/%{gccTag}&export=%{moduleName}&output=/%{n}-%{realversion}-%{gccTag}.tgz diff --git a/rpm-preamble.file b/rpm-preamble.file index 3d9dd8d95f4..80e29ac24fe 100644 --- a/rpm-preamble.file +++ b/rpm-preamble.file @@ -193,8 +193,8 @@ # packages. This allows cross-package environment setup to work while # building. See above how we determine the list by parsing the spec # itself. -%{expand:%%define rpmbuild_libdir %(echo $LD_LIBRARY_PATH | tr ':' '\n' | grep '/external/bootstrap-bundle/')} -%define rpmbuild_env LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:%{rpmbuild_libdir} +%{expand:%%define rpmbuild_libdir :%(echo $LD_LIBRARY_PATH | tr ':' '\n' | grep '/external/bootstrap-bundle/')} +%define rpmbuild_env LD_LIBRARY_PATH=${LD_LIBRARY_PATH}%{rpmbuild_libdir} %define drop_bootstrap_path export PATH=$(echo $PATH | tr ':' '\\n' | grep -v '/external/bootstrap-bundle/' | tr '\\n' ':' | sed 's|:*$||') %define drop_bootstrap_lib export LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | tr ':' '\\n' | grep -v '/external/bootstrap-bundle/' | tr '\\n' ':' | sed 's|:*$||') %define drop_bootstrap_env %{drop_bootstrap_path}; %{drop_bootstrap_lib} diff --git a/starlight.spec b/starlight.spec index 72cfd414a0e..2eb6591dad9 100644 --- a/starlight.spec +++ b/starlight.spec @@ -20,13 +20,17 @@ mkdir ../build cd ../build export CLHEP_PARAM_PATH=${CLHEP_ROOT} +CXXFLAGS="-Wno-error=deprecated-declarations" +case %cmsplatf in + *_gcc9*|*_gcc1[0-9]*) CXXFLAGS="$CXXFLAGS -Wno-error=deprecated-copy";; +esac cmake ../%{n}-%{realversion} \ -DCMAKE_INSTALL_PREFIX:PATH="%{i}" \ -DCMAKE_BUILD_TYPE=Realease \ -DENABLE_CLHEP=ON \ -DCPP11=ON \ - -DCMAKE_CXX_FLAGS="-Wno-error=deprecated-declarations" + -DCMAKE_CXX_FLAGS="$CXXFLAGS" make %{makeprocesses} VERBOSE=1 diff --git a/thepeg.spec b/thepeg.spec index 8d3b08df2e9..3f5753e7ba8 100644 --- a/thepeg.spec +++ b/thepeg.spec @@ -10,7 +10,7 @@ Requires: gsl OpenBLAS Requires: hepmc Requires: zlib Requires: fastjet -Requires: rivet +#Requires: rivet BuildRequires: autotools BuildRequires: lhapdf From f1191878aab6179e1325b0f16025ddb717ad2513 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Fri, 20 Nov 2020 16:31:05 +0100 Subject: [PATCH 033/101] [CC8][Bazel] Do not use gold linker --- bazel-3.7.0-patches.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bazel-3.7.0-patches.patch b/bazel-3.7.0-patches.patch index 3f90080adc1..520353a4f1c 100644 --- a/bazel-3.7.0-patches.patch +++ b/bazel-3.7.0-patches.patch @@ -11,3 +11,15 @@ index 0ea30a9..8df189f 100644 named = true, positional = false, doc = "Whether the action should use the built in shell environment or not."), +diff --git a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl +index d48485b..40ca051 100755 +--- a/tools/cpp/unix_cc_configure.bzl ++++ b/tools/cpp/unix_cc_configure.bzl +@@ -193,6 +193,7 @@ def _find_gold_linker_path(repository_ctx, cc): + Returns: + String to put as value to -fuse-ld= flag, or None if gold couldn't be found. + """ ++ return None + result = repository_ctx.execute([ + cc, + str(repository_ctx.path("tools/cpp/empty.cc")), From 33cccdeead48ba2b0953610c028592886602ee25 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Thu, 26 Nov 2020 14:58:36 +0100 Subject: [PATCH 034/101] Update bootstrap-driver.spec --- bootstrap-driver.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-driver.spec b/bootstrap-driver.spec index 2b15df4c591..d8666c58217 100644 --- a/bootstrap-driver.spec +++ b/bootstrap-driver.spec @@ -31,7 +31,7 @@ case %cmsplatf in cc* ) cc8_amd64_packagesWithProvides="libGL" cc8_amd64_platformSeeds=" - automake bash bzip2 bzip2-libs bzip2-devel coreutils-single e2fsprogs e2fsprogs-libs + automake bash bzip2 bzip2-libs bzip2-devel coreutils|coreutils-single e2fsprogs e2fsprogs-libs file file-libs fontconfig freetype gcc-c++ git glibc krb5-libs libaio libcom_err libgomp libICE libidn libSM libX11 libX11-devel libxcrypt libXcursor libXext From b41dc56f1d8f54b24d173547362ebaf73e29c38f Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Fri, 22 Jan 2021 08:14:03 +0100 Subject: [PATCH 035/101] Update cryptography.file --- pip/cryptography.file | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pip/cryptography.file b/pip/cryptography.file index 7b019cdb0c4..3787b55b337 100644 --- a/pip/cryptography.file +++ b/pip/cryptography.file @@ -1 +1 @@ -Requires: py2-cffi py2-asn1crypto py2-enum34 py2-idna py2-ipaddress py2-six +Requires: py2-cffi py2-asn1crypto py2-enum34 py2-idna py2-ipaddress py2-six py2-wheel From cf14cf7f6bce769a178c7d4e81968983c5d2bcb5 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Fri, 22 Jan 2021 19:02:07 +0100 Subject: [PATCH 036/101] Update testpath.file --- pip/testpath.file | 1 - 1 file changed, 1 deletion(-) diff --git a/pip/testpath.file b/pip/testpath.file index 2a20864df10..c261c229192 100644 --- a/pip/testpath.file +++ b/pip/testpath.file @@ -1,2 +1 @@ -%define source0 https://files.pythonhosted.org/packages/06/30/9a7e917066d851d8b4117e85794b5f14516419ea714a8a2681ec6aa8a981/testpath-0.4.2.tar.gz %define patchsrc rm -f testpath/cli-*.exe From 119239df281275ab5aef734295bd9c1f10873464 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Tue, 16 Mar 2021 15:56:25 +0100 Subject: [PATCH 037/101] Update sherpa.spec --- sherpa.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sherpa.spec b/sherpa.spec index 2c6e8cc26dc..63754c02b36 100644 --- a/sherpa.spec +++ b/sherpa.spec @@ -4,7 +4,7 @@ %define github_user cms-externals Source: http://www.hepforge.org/archive/sherpa/SHERPA-MC-%{realversion}.tar.gz Requires: hepmc lhapdf blackhat sqlite fastjet scons python openmpi rivet -BuildRequires: mcfm swig +BuildRequires: mcfm swig autotools Patch0: sherpa-2.2.10-hepmcshort %ifos linux From 692be78ccfefadd7c95d087a7d20539f8b4d3d37 Mon Sep 17 00:00:00 2001 From: Mircho Rodozov Date: Wed, 24 Mar 2021 16:44:53 +0100 Subject: [PATCH 038/101] Madgraph 2.7.3 - sync with CC8 --- madgraph5amcatnlo-config.patch | 105 +++++++++++++++++++-------------- madgraph5amcatnlo.spec | 37 ++++++------ 2 files changed, 79 insertions(+), 63 deletions(-) diff --git a/madgraph5amcatnlo-config.patch b/madgraph5amcatnlo-config.patch index 9d07d54f85b..5231b136c65 100644 --- a/madgraph5amcatnlo-config.patch +++ b/madgraph5amcatnlo-config.patch @@ -1,144 +1,161 @@ -diff --git a/input/.mg5_configuration_default.txt b/input/.mg5_configuration_default.txt -index c089808..11ae192 100644 ---- a/input/.mg5_configuration_default.txt -+++ b/input/.mg5_configuration_default.txt -@@ -30,12 +30,14 @@ +diff --git a/mg5_configuration.txt b/mg5_configuration.txt +index c5429ae..a749941 100644 +--- a/input/mg5_configuration.txt ++++ b/input/mg5_configuration.txt +@@ -28,7 +28,7 @@ + #! Prefered Fortran Compiler + #! If None: try to find g77 or gfortran on the system #! - # fortran_compiler = None - # f2py_compiler = None +-# fortran_compiler = None +fortran_compiler = gfortran + # f2py_compiler_py2 = None + # f2py_compiler_py3 = None - +@@ -36,7 +36,7 @@ #! Prefered C++ Compiler #! If None: try to find g++ or clang on the system #! - # cpp_compiler = None +-# cpp_compiler = None +cpp_compiler = g++ #! Prefered Text Editor #! Default: use the shell default Editor -@@ -54,12 +56,14 @@ +@@ -54,20 +54,20 @@ + #! Time allowed to answer question (if no answer takes default value) #! 0: No time limit - # timeout = 60 +-# timeout = 60 +timeout = 0 #! Pythia8 path. #! Defines the path to the pythia8 installation directory (i.e. the #! on containing the lib, bin and include directories) . #! If using a relative path, that starts from the mg5 directory - # pythia8_path = ./HEPTools/pythia8 +-# pythia8_path = ./HEPTools/pythia8 +pythia8_path = ${PYTHIA8_ROOT} #! MG5aMC_PY8_interface path #! Defines the path of the C++ driver file that is used by MG5_aMC to -@@ -67,6 +71,7 @@ + #! steer the Pythia8 shower. #! Can be installed directly from within MG5_aMC with the following command: #! MG5_aMC> install mg5amc_py8_interface - # mg5amc_py8_interface_path = ./HEPTools/MG5aMC_PY8_interface +-# mg5amc_py8_interface_path = ./HEPTools/MG5aMC_PY8_interface +mg5amc_py8_interface_path = @MADGRAPH5AMCATNLO_ROOT@/HEPTools/MG5aMC_PY8_interface #! Herwig++/Herwig7 paths #! specify here the paths also to HepMC ant ThePEG -@@ -78,11 +83,15 @@ +@@ -77,13 +77,13 @@ + #! then please set thepeg_path and hepmc_path to the same value as + #! hwpp_path # hwpp_path = - # thepeg_path = - # hepmc_path = +-# thepeg_path = +-# hepmc_path = +thepeg_path = ${THEPEG_ROOT} +hepmc_path = ${HEPMC_ROOT} -+ #! Control when MG5 checks if he is up-to-date. #! Enter the number of day between two check (0 means never) #! A question is always asked before any update - # auto_update = 7 +-# auto_update = 7 +auto_update = 0 ################################################################################ # INFO FOR MADEVENT / aMC@NLO -@@ -94,13 +103,15 @@ +@@ -94,21 +94,20 @@ + #! Allow/Forbid the automatic opening of the web browser (on the status page) #! when launching MadEvent [True/False] - # automatic_html_opening = True +-# automatic_html_opening = True +automatic_html_opening = False #! allow notification of finished job in the notification center (Mac Only) - # notification_center = True +-# notification_center = True - +notification_center = False #! Default Running mode #! 0: single machine/ 1: cluster / 2: multicore - # run_mode = 2 +-# run_mode = 2 +run_mode = 1 #! Cluster Type [pbs|sge|condor|lsf|ge|slurm|htcaas|htcaas2] Use for cluster run only #! And cluster queue (or partition for slurm) -@@ -108,6 +119,9 @@ - # cluster_type = condor - # cluster_queue = madgraph - # cluster_size = 150 + #! And size of the cluster (some part of the code can adapt splitting accordingly) +-# cluster_type = condor +-# cluster_queue = madgraph +-# cluster_size = 150 +cluster_type = lsf +cluster_queue = 1nh +cluster_size = 150 #! Path to a node directory to avoid direct writing on the central disk #! Note that condor clusters avoid direct writing by default (therefore this -@@ -133,6 +147,7 @@ +@@ -133,7 +132,7 @@ + #! Nb_core to use (None = all) This is use only for multicore run #! This correspond also to the number core used for code compilation for cluster mode - # nb_core = None +-# nb_core = None +nb_core = 4 #! Pythia-PGS Package #! relative path start from main directory -@@ -162,10 +177,12 @@ - #! lhapdf-config +@@ -162,12 +161,12 @@ + + #! lhapdf-config --can be specify differently depending of your python version #! If None: try to find one available on the system - # lhapdf = lhapdf-config -+lhapdf = ${LHAPDF_ROOT}/bin/lhapdf-config +-# lhapdf_py2 = lhapdf-config +-# lhapdf_py3 = lhapdf-config ++lhapdf_py2 = ${LHAPDF_ROOT}/bin/lhapdf-config ++lhapdf_py3 = ${LHAPDF_ROOT}/bin/lhapdf-config #! fastjet-config #! If None: try to find one available on the system - # fastjet = fastjet-config +-# fastjet = fastjet-config +fastjet = ${FASTJET_ROOT}/bin/fastjet-config #! MCatNLO-utilities #! relative path starting from main directory -@@ -179,6 +196,7 @@ +@@ -180,14 +179,14 @@ + #! if auto: try to find it automatically on the system (default) #! if '' or None: disabling pjfry #! if pjfry=/PATH/TO/pjfry/lib: use that specific installation path for PJFry++ - # pjfry = auto -+pjfry = None +-# pjfry = auto ++pjfry = None # #! Set the Golem95 directory containing golem's library #! It only supports version higher than 1.3.0 -@@ -186,6 +204,7 @@ + #! if auto: try to find it automatically on the system (default) #! if '' or None: disabling Golem95 #! if golem=/PATH/TO/golem/lib: use that speficif installation path for Golem95 - # golem = auto -+golem = ${GOSAMCONTRIB_ROOT}/lib +-# golem = auto ++golem = ${GOSAMCONTRIB_ROOT}/lib # #! Set the samurai directory containing samurai's library #! It only supports version higher than 2.0.0 -@@ -198,18 +217,21 @@ +@@ -199,19 +198,19 @@ + #! Set the Ninja directory containing ninja's library #! if '' or None: disabling ninja #! if ninja=/PATH/TO/ninja/lib: use that specific installation path for ninja - # ninja = ./HEPTools/lib +-# ninja = ./HEPTools/lib +ninja = @MADGRAPH5AMCATNLO_ROOT@/HEPTools/lib #! Set the COLLIER directory containing COLLIER's library #! if '' or None: disabling COLLIER #! if ninja=/PATH/TO/ninja/lib: use that specific installation path for COLLIER # Note that it is necessary that you have generated a static library for COLLIER - # collier = ./HEPTools/lib +-# collier = ./HEPTools/lib +collier = @MADGRAPH5AMCATNLO_ROOT@/HEPTools/lib #! Set how MadLoop dependencies (such as CutTools) should be handled #! > external : ML5 places a link to the MG5_aMC-wide libraries #! > internal : ML5 copies all dependencies in the output so that it is independent #! > environment_paths : ML5 searches for the dependencies in your environment path - # output_dependencies = external +-# output_dependencies = external +output_dependencies = internal #! SysCalc PATH #! Path to the directory containing syscalc executables +@@ -222,4 +221,3 @@ + # applgrid = applgrid-config + # amcfast = amcfast-config + +- diff --git a/madgraph5amcatnlo.spec b/madgraph5amcatnlo.spec index b62dac4821b..64c222447e3 100644 --- a/madgraph5amcatnlo.spec +++ b/madgraph5amcatnlo.spec @@ -1,14 +1,13 @@ -### RPM external madgraph5amcatnlo 2.6.7 -%define versiontag 2_6_7 -%define commit 307 +### RPM external madgraph5amcatnlo 2.7.3 +%define versiontag 2_7_3 Provides: perl(Compress::Zlib) Provides: perl(List::Util) -Source: http://cmsrep.cern.ch/cmssw/download/%{n}-%{realversion}.tgz -#Source: https://launchpad.net/mg5amcnlo/2.0/2.5.x/+download/MG5_aMC_v%{realversion}.tar.gz -#Source: https://launchpad.net/mg5amcnlo/2.0/2.6.x/+download/MG5_aMC_v%{realversion}.tar.gz +Source: https://launchpad.net/mg5amcnlo/2.0/2.7.x/+download/MG5_aMC_v%{realversion}.py3.tar.gz Patch0: madgraph5amcatnlo-config +# Compile and install internal and external packages +#Patch1: madgraph5amcatnlo-compile -Requires: python +Requires: python3 py2-six Requires: hepmc # Needed for ExRoot analysis package Requires: root @@ -18,19 +17,19 @@ Requires: gosamcontrib Requires: fastjet Requires: pythia8 Requires: thepeg - + %prep -%setup -n %{n}-%{realversion} +%setup -n MG5_aMC_v%{versiontag}_py3 %patch0 -p1 +#%patch1 -p1 -sed -i -e "s|\${HEPMC_ROOT}|${HEPMC_ROOT}|g" input/.mg5_configuration_default.txt -sed -i -e "s|\${PYTHIA8_ROOT}|${PYTHIA8_ROOT}|g" input/.mg5_configuration_default.txt -sed -i -e "s|\${LHAPDF_ROOT}|${LHAPDF_ROOT}|g" input/.mg5_configuration_default.txt -sed -i -e "s|\${FASTJET_ROOT}|${FASTJET_ROOT}|g" input/.mg5_configuration_default.txt -sed -i -e "s|\${GOSAMCONTRIB_ROOT}|${GOSAMCONTRIB_ROOT}|g" input/.mg5_configuration_default.txt -sed -i -e "s|\${THEPEG_ROOT}|${THEPEG_ROOT}|g" input/.mg5_configuration_default.txt -sed -i -e "s|@MADGRAPH5AMCATNLO_ROOT@|%{i}|g" input/.mg5_configuration_default.txt -sed -i -e "s|SHFLAG = \-fPIC|SHFLAG = \-fPIC \-fcommon|g" vendor/StdHEP/src/stdhep_arch +sed -i -e "s|\${HEPMC_ROOT}|${HEPMC_ROOT}|g" input/mg5_configuration.txt +sed -i -e "s|\${PYTHIA8_ROOT}|${PYTHIA8_ROOT}|g" input/mg5_configuration.txt +sed -i -e "s|\${LHAPDF_ROOT}|${LHAPDF_ROOT}|g" input/mg5_configuration.txt +sed -i -e "s|\${FASTJET_ROOT}|${FASTJET_ROOT}|g" input/mg5_configuration.txt +sed -i -e "s|\${GOSAMCONTRIB_ROOT}|${GOSAMCONTRIB_ROOT}|g" input/mg5_configuration.txt +sed -i -e "s|\${THEPEG_ROOT}|${THEPEG_ROOT}|g" input/mg5_configuration.txt +sed -i -e "s|@MADGRAPH5AMCATNLO_ROOT@|%{i}|g" input/mg5_configuration.txt %build export FC="$(which gfortran) -std=legacy" @@ -48,11 +47,11 @@ EOF find . -type f -name '*.tgz' -delete %install -rsync -avh %{_builddir}/%{n}-%{realversion}/ %{i}/ +rsync -avh %{_builddir}/MG5_aMC_v%{versiontag}_py3/ %{i}/ sed -ideleteme 's|#!.*/bin/python|#!/usr/bin/env python|' \ %{i}/Template/LO/bin/internal/addmasses_optional.py \ %{i}/madgraph/various/progressbar.py find %{i} -name '*deleteme' -delete %post -%{relocateConfig}input/.mg5_configuration_default.txt +%{relocateConfig}input/mg5_configuration.txt From 75919d4812b1d76af160f1f4db7da3487f8a77b5 Mon Sep 17 00:00:00 2001 From: Mircho Rodozov Date: Wed, 24 Mar 2021 17:18:41 +0100 Subject: [PATCH 039/101] add fortran flag --- madgraph5amcatnlo.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/madgraph5amcatnlo.spec b/madgraph5amcatnlo.spec index 64c222447e3..e94e34158d8 100644 --- a/madgraph5amcatnlo.spec +++ b/madgraph5amcatnlo.spec @@ -30,6 +30,7 @@ sed -i -e "s|\${FASTJET_ROOT}|${FASTJET_ROOT}|g" input/mg5_configuration.txt sed -i -e "s|\${GOSAMCONTRIB_ROOT}|${GOSAMCONTRIB_ROOT}|g" input/mg5_configuration.txt sed -i -e "s|\${THEPEG_ROOT}|${THEPEG_ROOT}|g" input/mg5_configuration.txt sed -i -e "s|@MADGRAPH5AMCATNLO_ROOT@|%{i}|g" input/mg5_configuration.txt +sed -i -e "s|SHFLAG = \-fPIC|SHFLAG = \-fPIC \-fcommon|g" vendor/StdHEP/src/stdhep_arch %build export FC="$(which gfortran) -std=legacy" From b3a1e44f1127881cbc1e9a093655d27754c9ebd5 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Tue, 27 Apr 2021 19:07:44 +0200 Subject: [PATCH 040/101] [CC8] Update SCRAM V3 --- SCRAMV1.spec | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/SCRAMV1.spec b/SCRAMV1.spec index df7fd2e0448..dbe5255523c 100644 --- a/SCRAMV1.spec +++ b/SCRAMV1.spec @@ -1,15 +1,13 @@ -### RPM lcg SCRAMV1 V2_2_9_pre13 +### RPM lcg SCRAMV1 V3_00_18 ## NOCOMPILER -BuildRequires: gmake - Provides: perl(BuildSystem::Template::Plugins::PluginCore) Provides: perl(BuildSystem::TemplateStash) Provides: perl(Cache::CacheUtilities) Provides: perl(BuildSystem::ToolManager) -%define tag %{realversion} -%define branch master +%define tag bf9d60c30eaa004e769f0b9f1222f216f45bcd78 +%define branch SCRAMV3 %define github_user cms-sw Source: git+https://github.com/%{github_user}/SCRAM.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz @@ -49,14 +47,17 @@ fi %setup -n %{n}-%{realversion} %build -gmake %{makeprocesses} all INSTALL_BASE=%{instroot} VERSION=%{realversion} PREFIX=%{i} +sed -i -e "s|@CMS_PATH@|%{instroot}|g;s|@SCRAM_VERSION@|%{realversion}|g" SCRAM/__init__.py %install -gmake %{makeprocesses} install INSTALL_BASE=%{instroot} VERSION=%{realversion} PREFIX=%{i} +mkdir %{i}/bin +cp -r SCRAM %{i}/ +cp cli/scram %{i}/bin/ +cp cli/scram.py %{i}/bin/ %post -%{relocateRpmPkg}bin/scram -sed -i -e "s|dbPath = '$RPM_INSTALL_PREFIX';|dbPath = '$CMS_INSTALL_PREFIX';|" $RPM_INSTALL_PREFIX/%{pkgrel}/bin/scram +%{relocateRpmPkg}SCRAM/__init__.py +sed -i -e "s|^BASEPATH = .*|BASEPATH = '$CMS_INSTALL_PREFIX'|" $RPM_INSTALL_PREFIX/%{pkgrel}/SCRAM/__init__.py echo "SCRAMV1_ROOT='$CMS_INSTALL_PREFIX/%{pkgrel}'" > $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh echo "SCRAMV1_VERSION='%v'" >> $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh echo "set SCRAMV1_ROOT='$CMS_INSTALL_PREFIX/%{pkgrel}'" > $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.csh From 1d6369230e528289ade3c848018540d1655b1e8f Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Mon, 31 May 2021 17:48:28 +0200 Subject: [PATCH 041/101] updated GCC 11.1.0 --- autotools.spec | 8 ++-- bazel-0.29.1-patches.patch | 55 -------------------------- bison.spec | 2 +- bootstrap-driver.spec | 15 +++---- frontier_client-2.8.20-openssl11.patch | 13 ------ gcc.spec | 39 +++++++++--------- gmp-static.spec | 2 +- libarchive-bootstrap.spec | 2 +- mpfr-static.spec | 2 +- xz-bootstrap.spec | 2 +- xz.spec | 6 +-- 11 files changed, 39 insertions(+), 107 deletions(-) delete mode 100644 bazel-0.29.1-patches.patch delete mode 100644 frontier_client-2.8.20-openssl11.patch diff --git a/autotools.spec b/autotools.spec index 09d7da610f0..d83bccf7e22 100644 --- a/autotools.spec +++ b/autotools.spec @@ -1,12 +1,12 @@ -### RPM external autotools 1.4 +### RPM external autotools 1.5 ## INITENV SET M4 %{i}/bin/m4 # We keep all of them together to simplify the "requires" statements. -%define autoconf_version 2.69 -%define automake_version 1.16.1 +%define autoconf_version 2.71 +%define automake_version 1.16.3 %define automake_maj %(echo %{automake_version} | cut -f1,2 -d.) %define libtool_version 2.4.6 %define m4_version 1.4.18 -%define gettext_version 0.20.1 +%define gettext_version 0.21 %define pkgconfig_version 0.29.2 Provides: perl(Errno) Source0: http://ftp.gnu.org/gnu/autoconf/autoconf-%{autoconf_version}.tar.gz diff --git a/bazel-0.29.1-patches.patch b/bazel-0.29.1-patches.patch deleted file mode 100644 index 1d5292a1780..00000000000 --- a/bazel-0.29.1-patches.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff --git a/src/main/java/com/google/devtools/build/lib/exec/local/LocalSpawnRunner.java b/src/main/java/com/google/devtools/build/lib/exec/local/LocalSpawnRunner.java -index 4426ad4c5a..7c64f42381 100644 ---- a/src/main/java/com/google/devtools/build/lib/exec/local/LocalSpawnRunner.java -+++ b/src/main/java/com/google/devtools/build/lib/exec/local/LocalSpawnRunner.java -@@ -112,7 +112,7 @@ public class LocalSpawnRunner implements SpawnRunner { - this.localExecutionOptions = Preconditions.checkNotNull(localExecutionOptions); - this.hostName = NetUtil.getCachedShortHostName(); - this.resourceManager = resourceManager; -- this.useProcessWrapper = useProcessWrapper; -+ this.useProcessWrapper = false; - this.localEnvProvider = localEnvProvider; - this.binTools = binTools; - } -diff --git a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl -index ccb18a4..46eff97 100644 ---- a/tools/cpp/unix_cc_configure.bzl -+++ b/tools/cpp/unix_cc_configure.bzl -@@ -207,7 +207,7 @@ def _find_gold_linker_path(repository_ctx, cc): - - # remove -fuse-ld= from GCC output so we have only the flag value part - flag = flag.replace("-fuse-ld=", "") -- return flag -+ return None - auto_configure_warning( - "CC with -fuse-ld=gold returned 0, but its -v output " + - "didn't contain 'gold', falling back to the default linker.", -diff --git a/src/conditions/BUILD b/src/conditions/BUILD -index 2b28e28..faa41a4 100644 ---- a/src/conditions/BUILD -+++ b/src/conditions/BUILD -@@ -11,6 +11,12 @@ filegroup( - ) - - config_setting( -+ name = "linux_ppc", -+ values = {"cpu": "ppc"}, -+ visibility = ["//visibility:public"], -+) -+ -+config_setting( - name = "linux_x86_64", - values = {"cpu": "k8"}, - visibility = ["//visibility:public"], -diff --git a/third_party/BUILD b/third_party/BUILD -index 159006d..b2c0163 100644 ---- a/third_party/BUILD -+++ b/third_party/BUILD -@@ -526,6 +526,7 @@ UNNECESSARY_DYNAMIC_LIBRARIES = select({ - # The .so file is an x86 one, so we can just remove it if the CPU is not x86 - "//src/conditions:arm": "*.so *.jnilib *.dll", - "//src/conditions:linux_aarch64": "*.so *.jnilib *.dll", -+ "//src/conditions:linux_ppc": "*.so *.jnilib *.dll", - # Play it safe -- better have a big binary than a slow binary - # zip -d does require an argument. Supply something bogus. - "//conditions:default": "*.bogusextension", diff --git a/bison.spec b/bison.spec index cc2ecc66a73..1ad47f736f7 100644 --- a/bison.spec +++ b/bison.spec @@ -1,4 +1,4 @@ -### RPM external bison 3.5 +### RPM external bison 3.7.6 ## INITENV SET BISON_PKGDATADIR %{i}/share/bison Source: http://ftp.gnu.org/gnu/%{n}/%{n}-%{realversion}.tar.gz diff --git a/bootstrap-driver.spec b/bootstrap-driver.spec index d8666c58217..e1fa23b0dde 100644 --- a/bootstrap-driver.spec +++ b/bootstrap-driver.spec @@ -32,24 +32,21 @@ cc* ) cc8_amd64_packagesWithProvides="libGL" cc8_amd64_platformSeeds=" automake bash bzip2 bzip2-libs bzip2-devel coreutils|coreutils-single e2fsprogs e2fsprogs-libs - file file-libs fontconfig freetype gcc-c++ git glibc krb5-libs libaio - libcom_err libgomp libICE libidn + file file-libs fontconfig freetype glibc krb5-libs libaio + libcom_err libgomp libICE libSM libX11 libX11-devel libxcrypt libXcursor libXext libXext-devel libXft libXft-devel libXi libXinerama libXmu libXpm libXpm-devel libXrandr libXrender libglvnd-opengl mesa-libGL mesa-libGLU mesa-libGLU-devel - java-1.8.0-openjdk-devel libtool m4 make - ncurses ncurses-libs ncurses-devel nspr nss nss-devel nss-util - openssl openssl-devel openssl-libs + m4 make ncurses ncurses-libs openssl openssl-libs perl perl-interpreter perl-libs - perl-Carp perl-CGI perl-constant perl-Data-Dumper perl-DBI + perl-Carp perl-CGI perl-constant perl-Data-Dumper perl-Digest-MD5 perl-Encode perl-Env perl-Exporter perl-ExtUtils-Embed perl-File-Path perl-File-Temp perl-Getopt-Long perl-IO perl-libnet perl-Memoize perl-PathTools perl-Scalar-List-Utils perl-Socket perl-Storable perl-Term-ANSIColor perl-Test-Harness perl-Text-ParseWords perl-Thread-Queue perl-Time-HiRes perl-Time-Local perl-YAML - patch popt popt-devel python2 readline readline-devel rpm-build - rsync tcl tcsh tk wget which zlib zsh" + python2 readline rsync tcl tcsh tk wget which zsh" cc8_aarch64_platformSeeds="${cc8_amd64_platformSeeds}" cc8_aarch64_packagesWithProvides="${cc8_amd64_packagesWithProvides} libOpenGL.so.0()(64bit) libGLX.so.0()(64bit)" cc8_ppc64le_platformSeeds="${cc8_amd64_platformSeeds}" @@ -77,7 +74,7 @@ slc*) perl-Data-Dumper perl-Digest-MD5 perl-Exporter perl-File-Path perl-File-Temp perl-Getopt-Long perl-Socket perl-Text-ParseWords perl-Time-Local libX11-devel libXpm-devel libXext-devel mesa-libGLU-devel perl-Switch perl-Storable perl-Env perl-Thread-Queue perl-Encode nspr nss nss-util file file-libs readline - zlib popt bzip2 bzip2-libs" + zlib popt bzip2 bzip2-libs openssl-devel openssl-libs" slc7_aarch64_platformSeeds="glibc coreutils bash tcsh zsh perl tcl tk readline openssl ncurses e2fsprogs krb5-libs freetype fontconfig libstdc++ diff --git a/frontier_client-2.8.20-openssl11.patch b/frontier_client-2.8.20-openssl11.patch deleted file mode 100644 index 0ea6fb6dc77..00000000000 --- a/frontier_client-2.8.20-openssl11.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/frontier.c b/frontier.c -index 74be022..8850006 100644 ---- a/frontier.c -+++ b/frontier.c -@@ -523,7 +523,7 @@ static char *vcb_curservername; - static int cert_verify_callback(int ok,X509_STORE_CTX *ctx) - { - if (!ok) -- frontier_setErrorMsg(__FILE__,__LINE__, "error verifying server %s cert: %s",vcb_curservername,X509_verify_cert_error_string(ctx->error)); -+ frontier_setErrorMsg(__FILE__,__LINE__, "error verifying server %s cert: %s",vcb_curservername,X509_verify_cert_error_string(X509_STORE_CTX_get_error(ctx))); - return ok; - } - diff --git a/gcc.spec b/gcc.spec index a4fb558c971..0a197131e7d 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,21 +1,25 @@ -### RPM external gcc 9.3.0 +### RPM external gcc 11.1.0 ## USE_COMPILER_VERSION ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 # Use the git repository for fetching the sources. This gives us more control while developing # a new platform so that we can compile yet to be released versions of the compiler. # See: https://gcc.gnu.org/viewcvs/gcc/branches/gcc-8-branch/?view=log -%define gccTag 4212a6a3e44f870412d9025eeb323fd4f50a61da -%define gccBranch releases/gcc-9 +%define gccTag ef397f64ffe4c451369b99115ae362465d9c9d4e +%define gccBranch releases/gcc-11 %define moduleName %{n}-%{realversion} Source0: git+https://github.com/gcc-mirror/%{n}.git?obj=%{gccBranch}/%{gccTag}&export=%{moduleName}&output=/%{n}-%{realversion}-%{gccTag}.tgz +%define islinux %(case %{cmsos} in (slc*|fc*) echo 1 ;; (*) echo 0 ;; esac) +%define isdarwin %(case %{cmsos} in (osx*) echo 1 ;; (*) echo 0 ;; esac) +%define isamd64 %(case %{cmsplatf} in (*amd64*) echo 1 ;; (*) echo 0 ;; esac) + %define keep_archives true -%define gmpVersion 6.2.0 -%define mpfrVersion 4.0.2 -%define mpcVersion 1.1.0 -%define islVersion 0.21 +%define gmpVersion 6.2.1 +%define mpfrVersion 4.1.0 +%define mpcVersion 1.2.1 +%define islVersion 0.24 %define zlibVersion 1.2.11 Source1: https://gmplib.org/download/gmp/gmp-%{gmpVersion}.tar.bz2 Source2: http://www.mpfr.org/mpfr-%{mpfrVersion}/mpfr-%{mpfrVersion}.tar.bz2 @@ -23,10 +27,10 @@ Source3: https://ftp.gnu.org/gnu/mpc/mpc-%{mpcVersion}.tar.gz Source4: http://isl.gforge.inria.fr/isl-%{islVersion}.tar.bz2 Source12: http://zlib.net/zlib-%{zlibVersion}.tar.gz -%ifos linux -%define bisonVersion 3.5 -%define binutilsVersion 2.32 -%define elfutilsVersion 0.177 +%if %islinux +%define bisonVersion 3.7.6 +%define binutilsVersion 2.36.1 +%define elfutilsVersion 0.183 %define m4Version 1.4.18 %define flexVersion 2.6.4 Source7: http://ftp.gnu.org/gnu/bison/bison-%{bisonVersion}.tar.gz @@ -38,7 +42,6 @@ Source11: https://github.com/westes/flex/releases/download/v%{flexVersion}/flex- Patch0: gcc-flex-nonfull-path-m4 Patch1: gcc-flex-disable-doc -Patch2: m4-centos8 %prep @@ -54,8 +57,8 @@ EOF %global __find_requires %{_builddir}/%{moduleName}/%{name}-req chmod +x %{__find_requires} -%ifos linux -%ifarch x86_64 +%if %islinux +%if %isamd64 # Hack needed to align sections to 4096 bytes rather than 2MB on 64bit linux # architectures. This is done to reduce the amount of address space wasted by # relocating many libraries. This was done with a linker script before, but @@ -96,19 +99,18 @@ EOF_CMS_H %setup -D -T -b 4 -n isl-%{islVersion} %setup -D -T -b 12 -n zlib-%{zlibVersion} -%ifos linux +%if %islinux %setup -D -T -b 7 -n bison-%{bisonVersion} %setup -D -T -b 8 -n binutils-%{binutilsVersion} %setup -D -T -b 9 -n elfutils-%{elfutilsVersion} %setup -D -T -b 10 -n m4-%{m4Version} -%patch2 -p1 %setup -D -T -b 11 -n flex-%{flexVersion} %patch0 -p1 %patch1 -p1 %endif %build -%ifarch darwin +%if %isdarwin CC='clang' CXX='clang++' CPP='clang -E' @@ -147,7 +149,7 @@ esac make %{makeprocesses} make install -%ifos linux +%if %islinux CONF_BINUTILS_OPTS="--enable-ld=default --enable-lto --enable-plugins --enable-threads" CONF_GCC_WITH_LTO="--enable-ld=default --enable-lto" @@ -197,6 +199,7 @@ esac # Build elfutils cd ../elfutils-%{elfutilsVersion} ./configure --disable-static --with-zlib --without-bzlib --without-lzma \ + --disable-libdebuginfod --enable-libdebuginfod=dummy --disable-debuginfod \ --build=%{_build} --host=%{_host} --program-prefix='eu-' --disable-silent-rules \ --prefix=%{i} CC="gcc" \ CPPFLAGS="-I%{i}/tmp/sw/include" LDFLAGS="-L%{i}/tmp/sw/lib" diff --git a/gmp-static.spec b/gmp-static.spec index 76418792473..b74edb6df19 100644 --- a/gmp-static.spec +++ b/gmp-static.spec @@ -1,4 +1,4 @@ -### RPM external gmp-static 6.2.0 +### RPM external gmp-static 6.2.1 Source: https://ftp.gnu.org/gnu/gmp/gmp-%realversion.tar.xz diff --git a/libarchive-bootstrap.spec b/libarchive-bootstrap.spec index 69720431434..8c13fb48b3b 100644 --- a/libarchive-bootstrap.spec +++ b/libarchive-bootstrap.spec @@ -1,4 +1,4 @@ -### RPM external libarchive-bootstrap 3.3.2 +### RPM external libarchive-bootstrap 3.5.1 Source0: http://www.libarchive.org/downloads/libarchive-%{realversion}.tar.gz Requires: xz-bootstrap diff --git a/mpfr-static.spec b/mpfr-static.spec index 39ec871f431..56d65d6be9f 100644 --- a/mpfr-static.spec +++ b/mpfr-static.spec @@ -1,4 +1,4 @@ -### RPM external mpfr-static 4.0.2 +### RPM external mpfr-static 4.1.0 Source: http://www.mpfr.org/mpfr-%{realversion}/mpfr-%{realversion}.tar.bz2 diff --git a/xz-bootstrap.spec b/xz-bootstrap.spec index 48f4fd61936..6fe5dea0ec1 100644 --- a/xz-bootstrap.spec +++ b/xz-bootstrap.spec @@ -1,4 +1,4 @@ -### RPM external xz-bootstrap 5.2.4 +### RPM external xz-bootstrap 5.2.5 Source0: http://tukaani.org/xz/xz-%{realversion}.tar.gz %prep diff --git a/xz.spec b/xz.spec index b5c22dc6f4c..43e59b318f0 100644 --- a/xz.spec +++ b/xz.spec @@ -1,6 +1,6 @@ -### RPM external xz 5.2.4 +### RPM external xz 5.2.5 -%define tag 982e837ddd3da234f710870fa65ba8c14f381b8b +%define tag 50f585dc3b7b9b94b6b7f7a4c29903602d1e2a2d %define branch cms/v%{realversion} %define github_user cms-externals Source0: git+https://github.com/%github_user/xz.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz @@ -11,7 +11,7 @@ BuildRequires: autotools %setup -n %{n}-%{realversion} %build -./autogen.sh +./autogen.sh --no-po4a ./configure CFLAGS='-fPIC -Ofast' --prefix=%{i} --disable-static --disable-nls --disable-rpath --disable-dependency-tracking --disable-doc make %{makeprocesses} From 890bb54cd0bed8b0eeea91c99200e699114af7d0 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Fri, 30 Jul 2021 16:42:54 +0200 Subject: [PATCH 042/101] [GCC11] Updated needed to build with gcc 11 --- bazel-3.7.2-gcc11.patch | 24 +++ bazel.spec | 2 + git.spec | 10 +- google-benchmark-gcc11.patch | 13 ++ google-benchmark.spec | 2 + grpc-gcc11.patch | 12 ++ grpc.spec | 2 + lwtnn-gcc11.patch | 334 +++++++++++++++++++++++++++++++++++ lwtnn.spec | 2 + onnxruntime.spec | 11 +- opencv-gcc11.patch | 12 ++ opencv.spec | 2 + pip/requirements.txt | 2 +- tbb.spec | 6 + ucx.spec | 1 + 15 files changed, 427 insertions(+), 8 deletions(-) create mode 100644 bazel-3.7.2-gcc11.patch create mode 100644 google-benchmark-gcc11.patch create mode 100644 grpc-gcc11.patch create mode 100644 lwtnn-gcc11.patch create mode 100644 opencv-gcc11.patch diff --git a/bazel-3.7.2-gcc11.patch b/bazel-3.7.2-gcc11.patch new file mode 100644 index 00000000000..b4cbc6a0ffd --- /dev/null +++ b/bazel-3.7.2-gcc11.patch @@ -0,0 +1,24 @@ +diff --git a/third_party/ijar/mapped_file_unix.cc b/third_party/ijar/mapped_file_unix.cc +index 6e3a908..030e9ca 100755 +--- a/third_party/ijar/mapped_file_unix.cc ++++ b/third_party/ijar/mapped_file_unix.cc +@@ -19,6 +19,7 @@ + #include + + #include ++#include + + #include "third_party/ijar/mapped_file.h" + +diff --git a/third_party/ijar/zlib_client.h b/third_party/ijar/zlib_client.h +index ed66163..c4b051e 100755 +--- a/third_party/ijar/zlib_client.h ++++ b/third_party/ijar/zlib_client.h +@@ -16,6 +16,7 @@ + #define THIRD_PARTY_IJAR_ZLIB_CLIENT_H_ + + #include ++#include + + #include "third_party/ijar/common.h" + diff --git a/bazel.spec b/bazel.spec index 34af0642a08..738fe17fc90 100644 --- a/bazel.spec +++ b/bazel.spec @@ -17,6 +17,7 @@ BuildRequires: java-env python3 # configuration issue # https://github.com/bazelbuild/bazel/issues/9392 Patch0: bazel-3.7.0-patches +Patch1: bazel-3.7.2-gcc11 %prep @@ -25,6 +26,7 @@ Patch0: bazel-3.7.0-patches %setup -q -n bazel-%{realversion} %patch0 -p1 +%patch1 -p1 %build diff --git a/git.spec b/git.spec index 7786302ce5c..fe1aa57fa8e 100644 --- a/git.spec +++ b/git.spec @@ -9,11 +9,16 @@ Source0: https://github.com/git/git/archive/v%{realversion}.tar.gz Source1: https://raw.github.com/bagder/curl/curl-7_59_0/lib/mk-ca-bundle.pl Patch1: git-2.19.0-runtime -Requires: curl expat zlib pcre2 +Requires: curl expat zlib pcre2 python3 BuildRequires: autotools Provides: perl(SVN::Core) Provides: perl(SVN::Delta) Provides: perl(SVN::Ra) +Provides: perl(CGI::Carp) +Provides: perl(CGI::Util) +Provides: perl(Scalar::Util) +Provides: perl(Time::HiRes) +Provides: perl(YAML::Any) %define drop_files %{i}/share/man @@ -29,7 +34,7 @@ make %{makeprocesses} configure --with-curl=${CURL_ROOT} \ --with-expat=${EXPAT_ROOT} \ --with-libpcre=${PCRE2_ROOT} \ - --without-python \ + --with-python=$(which python3) \ --with-zlib=${ZLIB_ROOT} make %{makeprocesses} \ @@ -60,6 +65,7 @@ make %{makeprocesses} \ # Install ca-bundle.crt (Certification Authority certificates) mkdir -p %{i}/share/ssl/certs cp ./ca-bundle/ca-bundle.crt %{i}/share/ssl/certs/ca-bundle.crt +perl -p -i -e "s|^#!.*python.*|#!/usr/bin/env python3|" %{i}/libexec/git-core/git-p4 %post %{relocateConfig}bin/git-cvsserver diff --git a/google-benchmark-gcc11.patch b/google-benchmark-gcc11.patch new file mode 100644 index 00000000000..8754c97d40a --- /dev/null +++ b/google-benchmark-gcc11.patch @@ -0,0 +1,13 @@ +diff --git a/src/benchmark_register.h b/src/benchmark_register.h +index 0705e21..d4525f2 100644 +--- a/src/benchmark_register.h ++++ b/src/benchmark_register.h +@@ -2,7 +2,7 @@ + #define BENCHMARK_REGISTER_H + + #include +- ++#include + #include "check.h" + + template diff --git a/google-benchmark.spec b/google-benchmark.spec index 83e27e5c2bc..31cb8f5b1b8 100644 --- a/google-benchmark.spec +++ b/google-benchmark.spec @@ -11,11 +11,13 @@ BuildRequires: cmake ninja Source0: git+https://github.com/google/benchmark.git?obj=%{benchmarkBranch}/%{benchmarkCommit}&export=benchmark-%{realversion}-%{benchmarkCommit}&module=benchmark-%{realversion}-%{benchmarkCommit}&output=/benchmark-%{realversion}-%{benchmarkCommit}.tgz Source1: git+https://github.com/google/googletest.git?obj=%{googletestBranch}/%{googletestCommit}&export=googletest-%{realversion}-%{googletestCommit}&module=googletest-%{realversion}-%{googletestCommit}&output=/googletest-%{realversion}-%{googletestCommit}.tgz +Patch0: google-benchmark-gcc11 %prep %setup -T -b0 -n benchmark-%{realversion}-%{benchmarkCommit} %setup -T -D -a1 -c -n benchmark-%{realversion}-%{benchmarkCommit} mv googletest-%{realversion}-%{googletestCommit} googletest +%patch0 -p1 %build rm -rf %{_builddir}/build diff --git a/grpc-gcc11.patch b/grpc-gcc11.patch new file mode 100644 index 00000000000..beec63ccf9a --- /dev/null +++ b/grpc-gcc11.patch @@ -0,0 +1,12 @@ +diff --git a/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc b/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc +index 19f9aab..27fec21 100644 +--- a/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc ++++ b/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc +@@ -37,6 +37,7 @@ + + #include + #include ++#include + #include "absl/base/internal/hide_ptr.h" + #include "absl/base/internal/raw_logging.h" + #include "absl/base/internal/spinlock.h" diff --git a/grpc.spec b/grpc.spec index c7e47ac2756..28fe0b39489 100644 --- a/grpc.spec +++ b/grpc.spec @@ -2,6 +2,7 @@ Source: git+https://github.com/grpc/grpc.git?obj=master/v%{realversion}&export=%{n}-%{realversion}&submodules=1&output=/%{n}-%{realversion}.tgz Patch0: grpc-ssl-fix +Patch1: grpc-gcc11 BuildRequires: cmake ninja go Requires: protobuf zlib pcre %define keep_archives true @@ -12,6 +13,7 @@ Requires: protobuf zlib pcre if [ ! -z "$OPENSSL_ROOT" ]; then %patch0 -p1 fi +%patch1 -p1 %build rm -rf ../build diff --git a/lwtnn-gcc11.patch b/lwtnn-gcc11.patch new file mode 100644 index 00000000000..e215002e367 --- /dev/null +++ b/lwtnn-gcc11.patch @@ -0,0 +1,334 @@ +diff --git a/include/lwtnn/NNLayerConfig.hh b/include/lwtnn/NNLayerConfig.hh +index 680d995..f725ac2 100644 +--- a/include/lwtnn/NNLayerConfig.hh ++++ b/include/lwtnn/NNLayerConfig.hh +@@ -63,7 +63,7 @@ namespace lwt { + INPUT, INPUT_SEQUENCE, FEED_FORWARD, CONCATENATE, SEQUENCE, + TIME_DISTRIBUTED, SUM }; + Type type; +- std::vector sources; ++ std::vector sources; + int index; // input node size, or layer number + }; + } +diff --git a/src/Graph.cxx b/src/Graph.cxx +index 6089793..61b60cf 100644 +--- a/src/Graph.cxx ++++ b/src/Graph.cxx +@@ -14,14 +14,14 @@ namespace lwt { + m_matrix_inputs(std::move(mm)) + { + } +- VectorXd VectorSource::at(size_t index) const { ++ VectorXd VectorSource::at(std::size_t index) const { + if (index >= m_inputs.size()) { + throw NNEvaluationException( + "VectorSource: no source vector defined at " + std::to_string(index)); + } + return m_inputs.at(index); + } +- MatrixXd VectorSource::matrix_at(size_t index) const { ++ MatrixXd VectorSource::matrix_at(std::size_t index) const { + if (index >= m_matrix_inputs.size()) { + throw NNEvaluationException( + "VectorSource: no source matrix defined at " + std::to_string(index)); +@@ -29,34 +29,34 @@ namespace lwt { + return m_matrix_inputs.at(index); + } + +- DummySource::DummySource(const std::vector& input_sizes, +- const std::vector >& ma): ++ DummySource::DummySource(const std::vector& input_sizes, ++ const std::vector >& ma): + m_sizes(input_sizes), + m_matrix_sizes(ma) + { + } +- VectorXd DummySource::at(size_t index) const { ++ VectorXd DummySource::at(std::size_t index) const { + if (index >= m_sizes.size()) { + throw NNEvaluationException( + "Dummy Source: no size defined at " + std::to_string(index)); + } +- size_t n_entries = m_sizes.at(index); ++ std::size_t n_entries = m_sizes.at(index); + VectorXd vec(n_entries); +- for (size_t iii = 0; iii < n_entries; iii++) { ++ for (std::size_t iii = 0; iii < n_entries; iii++) { + vec(iii) = iii; + } + return vec; + } +- MatrixXd DummySource::matrix_at(size_t index) const { ++ MatrixXd DummySource::matrix_at(std::size_t index) const { + if (index >= m_matrix_sizes.size()) { + throw NNEvaluationException( + "Dummy Source: no size defined at " + std::to_string(index)); + } +- size_t n_rows = m_matrix_sizes.at(index).first; +- size_t n_cols = m_matrix_sizes.at(index).second; ++ std::size_t n_rows = m_matrix_sizes.at(index).first; ++ std::size_t n_cols = m_matrix_sizes.at(index).second; + MatrixXd mat(n_rows, n_cols); +- for (size_t iii = 0; iii < n_rows; iii++) { +- for (size_t jjj = 0; jjj < n_cols; jjj++) { ++ for (std::size_t iii = 0; iii < n_rows; iii++) { ++ for (std::size_t jjj = 0; jjj < n_cols; jjj++) { + mat(iii, jjj) = jjj + n_cols * iii; + } + } +@@ -65,7 +65,7 @@ namespace lwt { + + + // Nodes +- InputNode::InputNode(size_t index, size_t n_outputs): ++ InputNode::InputNode(std::size_t index, size_t n_outputs): + m_index(index), + m_n_outputs(n_outputs) + { +@@ -73,7 +73,7 @@ namespace lwt { + VectorXd InputNode::compute(const ISource& source) const { + VectorXd output = source.at(m_index); + assert(output.rows() > 0); +- if (static_cast(output.rows()) != m_n_outputs) { ++ if (static_cast(output.rows()) != m_n_outputs) { + std::string len = std::to_string(output.rows()); + std::string found = std::to_string(m_n_outputs); + throw NNEvaluationException( +@@ -81,7 +81,7 @@ namespace lwt { + } + return output; + } +- size_t InputNode::n_outputs() const { ++ std::size_t InputNode::n_outputs() const { + return m_n_outputs; + } + +@@ -93,7 +93,7 @@ namespace lwt { + VectorXd FeedForwardNode::compute(const ISource& source) const { + return m_stack->compute(m_source->compute(source)); + } +- size_t FeedForwardNode::n_outputs() const { ++ std::size_t FeedForwardNode::n_outputs() const { + return m_stack->n_outputs(); + } + +@@ -107,10 +107,10 @@ namespace lwt { + } + VectorXd ConcatenateNode::compute(const ISource& source) const { + VectorXd output(m_n_outputs); +- size_t offset = 0; ++ std::size_t offset = 0; + for (const auto node: m_sources) { + VectorXd input = node->compute(source); +- size_t n_elements = input.rows(); ++ std::size_t n_elements = input.rows(); + assert(n_elements == node->n_outputs()); + output.segment(offset, n_elements) = input; + offset += n_elements; +@@ -118,12 +118,12 @@ namespace lwt { + assert(offset == m_n_outputs); + return output; + } +- size_t ConcatenateNode::n_outputs() const { ++ std::size_t ConcatenateNode::n_outputs() const { + return m_n_outputs; + } + + // Sequence nodes +- InputSequenceNode::InputSequenceNode(size_t index, size_t n_outputs): ++ InputSequenceNode::InputSequenceNode(std::size_t index, size_t n_outputs): + m_index(index), + m_n_outputs(n_outputs) + { +@@ -133,7 +133,7 @@ namespace lwt { + if (output.rows() == 0) { + throw NNEvaluationException("empty input sequence"); + } +- if (static_cast(output.rows()) != m_n_outputs) { ++ if (static_cast(output.rows()) != m_n_outputs) { + std::string len = std::to_string(output.rows()); + std::string found = std::to_string(m_n_outputs); + throw NNEvaluationException( +@@ -141,7 +141,7 @@ namespace lwt { + } + return output; + } +- size_t InputSequenceNode::n_outputs() const { ++ std::size_t InputSequenceNode::n_outputs() const { + return m_n_outputs; + } + +@@ -156,14 +156,14 @@ namespace lwt { + } + VectorXd SequenceNode::compute(const ISource& src) const { + MatrixXd mat = scan(src); +- size_t n_cols = mat.cols(); ++ std::size_t n_cols = mat.cols(); + // special handling for empty sequence + if (n_cols == 0) { + return MatrixXd::Zero(mat.rows(), 1); + } + return mat.col(n_cols - 1); + } +- size_t SequenceNode::n_outputs() const { ++ std::size_t SequenceNode::n_outputs() const { + return m_stack->n_outputs(); + } + +@@ -176,13 +176,13 @@ namespace lwt { + MatrixXd TimeDistributedNode::scan(const ISource& source) const { + MatrixXd input = m_source->scan(source); + MatrixXd output(m_stack->n_outputs(), input.cols()); +- size_t n_columns = input.cols(); +- for (size_t col_n = 0; col_n < n_columns; col_n++) { ++ std::size_t n_columns = input.cols(); ++ for (std::size_t col_n = 0; col_n < n_columns; col_n++) { + output.col(col_n) = m_stack->compute(input.col(col_n)); + } + return output; + } +- size_t TimeDistributedNode::n_outputs() const { ++ std::size_t TimeDistributedNode::n_outputs() const { + return m_stack->n_outputs(); + } + +@@ -193,7 +193,7 @@ namespace lwt { + VectorXd SumNode::compute(const ISource& source) const { + return m_source->scan(source).rowwise().sum(); + } +- size_t SumNode::n_outputs() const { ++ std::size_t SumNode::n_outputs() const { + return m_source->n_outputs(); + } + +@@ -201,19 +201,19 @@ namespace lwt { + + namespace { + using namespace lwt; +- void throw_cfg(std::string msg, size_t index) { ++ void throw_cfg(std::string msg, std::size_t index) { + throw NNConfigurationException(msg + " " + std::to_string(index)); + } + void check_compute_node(const NodeConfig& node) { +- size_t n_source = node.sources.size(); ++ std::size_t n_source = node.sources.size(); + if (n_source != 1) throw_cfg("need one source, found", n_source); + int layer_n = node.index; + if (layer_n < 0) throw_cfg("negative layer number", layer_n); + } +- void check_compute_node(const NodeConfig& node, size_t n_layers) { ++ void check_compute_node(const NodeConfig& node, std::size_t n_layers) { + check_compute_node(node); + int layer_n = node.index; +- if (static_cast(layer_n) >= n_layers) { ++ if (static_cast(layer_n) >= n_layers) { + throw_cfg("no layer number", layer_n); + } + } +@@ -221,8 +221,8 @@ namespace { + INode* get_feedforward_node( + const NodeConfig& node, + const std::vector& layers, +- const std::unordered_map& node_map, +- std::unordered_map& stack_map) { ++ const std::unordered_map& node_map, ++ std::unordered_map& stack_map) { + + // FIXME: merge this block with the time distributed one later on + check_compute_node(node, layers.size()); +@@ -237,8 +237,8 @@ namespace { + SequenceNode* get_sequence_node( + const NodeConfig& node, + const std::vector& layers, +- const std::unordered_map& node_map, +- std::unordered_map& stack_map) { ++ const std::unordered_map& node_map, ++ std::unordered_map& stack_map) { + + check_compute_node(node, layers.size()); + ISequenceNode* source = node_map.at(node.sources.at(0)); +@@ -252,8 +252,8 @@ namespace { + TimeDistributedNode* get_time_distributed_node( + const NodeConfig& node, + const std::vector& layers, +- const std::unordered_map& node_map, +- std::unordered_map& stack_map) { ++ const std::unordered_map& node_map, ++ std::unordered_map& stack_map) { + + // FIXME: merge this block with the FF block above + check_compute_node(node, layers.size()); +@@ -282,7 +282,7 @@ namespace lwt { + const std::vector& layers): + m_last_node(0) + { +- for (size_t iii = 0; iii < nodes.size(); iii++) { ++ for (std::size_t iii = 0; iii < nodes.size(); iii++) { + build_node(iii, nodes, layers); + } + // assert(maps.node.size() + maps.seq_node.size() == nodes.size()); +@@ -308,7 +308,7 @@ namespace lwt { + stack.second = nullptr; + } + } +- VectorXd Graph::compute(const ISource& source, size_t node_number) const { ++ VectorXd Graph::compute(const ISource& source, std::size_t node_number) const { + if (!m_nodes.count(node_number)) { + auto num = std::to_string(node_number); + if (m_seq_nodes.count(node_number)) { +@@ -325,7 +325,7 @@ namespace lwt { + } + return m_nodes.at(m_last_node)->compute(source); + } +- MatrixXd Graph::scan(const ISource& source, size_t node_number) const { ++ MatrixXd Graph::scan(const ISource& source, std::size_t node_number) const { + if (!m_seq_nodes.count(node_number)) { + auto num = std::to_string(node_number); + if (m_nodes.count(node_number)) { +@@ -346,10 +346,10 @@ namespace lwt { + // ______________________________________________________________________ + // private methods + +- void Graph::build_node(const size_t iii, ++ void Graph::build_node(const std::size_t iii, + const std::vector& nodes, + const std::vector& layers, +- std::set cycle_check) { ++ std::set cycle_check) { + if (m_nodes.count(iii) || m_seq_nodes.count(iii)) return; + + // we insist that the upstream nodes are built before the +@@ -364,12 +364,12 @@ namespace lwt { + // if it's an input, build and return + if (node.type == NodeConfig::Type::INPUT) { + check_compute_node(node); +- size_t input_number = node.sources.at(0); ++ std::size_t input_number = node.sources.at(0); + m_nodes[iii] = new InputNode(input_number, node.index); + return; + } else if (node.type == NodeConfig::Type::INPUT_SEQUENCE) { + check_compute_node(node); +- size_t input_number = node.sources.at(0); ++ std::size_t input_number = node.sources.at(0); + m_seq_nodes[iii] = new InputSequenceNode(input_number, node.index); + return; + } +@@ -379,7 +379,7 @@ namespace lwt { + throw NNConfigurationException("found cycle in graph"); + } + cycle_check.insert(iii); +- for (size_t source_node: node.sources) { ++ for (std::size_t source_node: node.sources) { + build_node(source_node, nodes, layers, cycle_check); + } + +@@ -400,7 +400,7 @@ namespace lwt { + } else if (node.type == NodeConfig::Type::CONCATENATE) { + // build concatenate layer + std::vector in_nodes; +- for (size_t source_node: node.sources) { ++ for (std::size_t source_node: node.sources) { + in_nodes.push_back(m_nodes.at(source_node)); + } + m_nodes[iii] = new ConcatenateNode(in_nodes); diff --git a/lwtnn.spec b/lwtnn.spec index e9140232990..8bca1e4106f 100644 --- a/lwtnn.spec +++ b/lwtnn.spec @@ -1,11 +1,13 @@ ### RPM external lwtnn 2.10 Source: https://github.com/lwtnn/lwtnn/archive/v%{realversion}.tar.gz +Patch0: lwtnn-gcc11 BuildRequires: ninja cmake Requires: eigen boost %prep %setup -n %{n}-%{realversion} +%patch0 -p1 %build diff --git a/onnxruntime.spec b/onnxruntime.spec index a7f606e9abc..fe338641f99 100644 --- a/onnxruntime.spec +++ b/onnxruntime.spec @@ -4,24 +4,25 @@ %define branch cms/v%{realversion} %define tag d594f80cdf0a50a490eec4a807bb670ecce149d6 Source: git+https://github.com/%{github_user}/%{n}.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&submodules=1&output=/%{n}-%{realversion}.tgz +#GCC 11 Fix +Source1: https://patch-diff.githubusercontent.com/raw/microsoft/onnxruntime/pull/7599.patch BuildRequires: cmake ninja Requires: protobuf py3-numpy py3-wheel py3-onnx zlib libpng py3-pybind11 -%if "%{cmsos}" != "slc7_aarch64" Requires: cuda cudnn -%endif %prep %setup -q -n %{n}-%{realversion} +patch -p1 < %{_sourcedir}/7599.patch %build rm -rf ../build; mkdir ../build; cd ../build -%if "%{cmsos}" != "slc7_aarch64" +if [ $(%{cuda_gcc_support}) = true ]; then USE_CUDA=ON -%else +else USE_CUDA=OFF -%endif +fi cmake ../%{n}-%{realversion}/cmake -GNinja \ -DPYTHON_EXECUTABLE=${PYTHON3_ROOT}/bin/python3 \ diff --git a/opencv-gcc11.patch b/opencv-gcc11.patch new file mode 100644 index 00000000000..a51a7416d72 --- /dev/null +++ b/opencv-gcc11.patch @@ -0,0 +1,12 @@ +diff --git a/modules/gapi/test/gapi_async_test.cpp b/modules/gapi/test/gapi_async_test.cpp +index 66b8be4..aa0c9c7 100644 +--- a/modules/gapi/test/gapi_async_test.cpp ++++ b/modules/gapi/test/gapi_async_test.cpp +@@ -13,6 +13,7 @@ + + #include + #include ++#include + + namespace opencv_test + { diff --git a/opencv.spec b/opencv.spec index f74f52f1b8e..564dcf67b82 100644 --- a/opencv.spec +++ b/opencv.spec @@ -6,12 +6,14 @@ Source0: git+https://github.com/%{github_user}/opencv.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz Source1: https://patch-diff.githubusercontent.com/raw/opencv/opencv/pull/19692.patch +Patch0: opencv-gcc11 BuildRequires: cmake ninja Requires: python3 py3-numpy libpng libjpeg-turbo libtiff zlib eigen OpenBLAS %prep %setup -n %{n}-%{realversion} patch -p1 < %{_sourcedir}/19692.patch +%patch0 -p1 %build rm -rf ../build diff --git a/pip/requirements.txt b/pip/requirements.txt index 2a00d7cfd4e..83198b9ea75 100644 --- a/pip/requirements.txt +++ b/pip/requirements.txt @@ -51,7 +51,7 @@ Click==7.1.2 climate==0.4.6 cloudpickle==1.3.0 colorama==0.4.4 -conan==1.34.1 +conan==1.39.0 contextlib2==0.6.0.post1 contextvars==2.4 coverage==5.5 diff --git a/tbb.spec b/tbb.spec index 788654bacbe..18bde5b2ea3 100644 --- a/tbb.spec +++ b/tbb.spec @@ -9,6 +9,10 @@ Source: git+https://github.com/%{github_user}/%{github_repo}.git?obj=%{branch}/% Source1: https://patch-diff.githubusercontent.com/raw/oneapi-src/oneTBB/pull/435.patch # Remove arch macros checks for getSmallObjectIndex Source2: https://patch-diff.githubusercontent.com/raw/oneapi-src/oneTBB/pull/461.patch +# Fix GCC 11 warnings +Source3: https://patch-diff.githubusercontent.com/raw/oneapi-src/oneTBB/pull/447.patch +Source4: https://patch-diff.githubusercontent.com/raw/oneapi-src/oneTBB/pull/433.patch + Requires: hwloc BuildRequires: cmake @@ -16,6 +20,8 @@ BuildRequires: cmake %setup -n %{n}-%{realversion} patch -p1 < %{_sourcedir}/435.patch patch -p1 < %{_sourcedir}/461.patch +patch -p1 < %{_sourcedir}/447.patch +patch -p1 < %{_sourcedir}/433.patch %build rm -rf %{_builddir}/build diff --git a/ucx.spec b/ucx.spec index d49127fdf8b..71d5e2203c7 100644 --- a/ucx.spec +++ b/ucx.spec @@ -47,6 +47,7 @@ AutoReq: no --without-rdmacm \ --without-knem \ --with-xpmem \ + CFLAGS="-Wno-error=array-bounds" \ CPPFLAGS="-I$NUMACTL_ROOT/include" \ LDFLAGS="-L$NUMACTL_ROOT/lib" From 8a46bc1c0cdb232e882a6340fcec35c1f003fae0 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Fri, 30 Jul 2021 16:57:21 +0200 Subject: [PATCH 043/101] Update onnxruntime.spec --- onnxruntime.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/onnxruntime.spec b/onnxruntime.spec index fe338641f99..5e85b5bafd8 100644 --- a/onnxruntime.spec +++ b/onnxruntime.spec @@ -5,7 +5,7 @@ %define tag d594f80cdf0a50a490eec4a807bb670ecce149d6 Source: git+https://github.com/%{github_user}/%{n}.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&submodules=1&output=/%{n}-%{realversion}.tgz #GCC 11 Fix -Source1: https://patch-diff.githubusercontent.com/raw/microsoft/onnxruntime/pull/7599.patch +Source1: https://patch-diff.githubusercontent.com/raw/microsoft/onnxruntime/pull/de4089f8cbe0baffe56a363cc3a41595cc8f0809.patch BuildRequires: cmake ninja Requires: protobuf py3-numpy py3-wheel py3-onnx zlib libpng py3-pybind11 @@ -13,7 +13,7 @@ Requires: cuda cudnn %prep %setup -q -n %{n}-%{realversion} -patch -p1 < %{_sourcedir}/7599.patch +patch -p1 < %{_sourcedir}/de4089f8cbe0baffe56a363cc3a41595cc8f0809.patch %build rm -rf ../build; mkdir ../build; cd ../build From fd8e2608bb396c39771f6f6c8205abdd09700b80 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Sat, 31 Jul 2021 00:19:44 +0200 Subject: [PATCH 044/101] Update onnxruntime.spec --- onnxruntime.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime.spec b/onnxruntime.spec index 5e85b5bafd8..2111224cf36 100644 --- a/onnxruntime.spec +++ b/onnxruntime.spec @@ -5,7 +5,7 @@ %define tag d594f80cdf0a50a490eec4a807bb670ecce149d6 Source: git+https://github.com/%{github_user}/%{n}.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&submodules=1&output=/%{n}-%{realversion}.tgz #GCC 11 Fix -Source1: https://patch-diff.githubusercontent.com/raw/microsoft/onnxruntime/pull/de4089f8cbe0baffe56a363cc3a41595cc8f0809.patch +Source1: https://github.com/microsoft/onnxruntime/commit/de4089f8cbe0baffe56a363cc3a41595cc8f0809.patch BuildRequires: cmake ninja Requires: protobuf py3-numpy py3-wheel py3-onnx zlib libpng py3-pybind11 From 75efd10ee3ae7ceeb3226189e856c08f02445096 Mon Sep 17 00:00:00 2001 From: Andrea Bocci Date: Mon, 2 Nov 2020 09:05:05 +0100 Subject: [PATCH 045/101] Update to CUDA 11.4.1 Update to CUDA 11.4.1 (11.4.20210728): * CUDA runtime version 11.4.108 * NVIDIA drivers version 470.57.02 Add support for GCC 11 and clang 12. See https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html . --- cuda.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cuda.spec b/cuda.spec index 982cacf0269..feb4a0495c8 100644 --- a/cuda.spec +++ b/cuda.spec @@ -1,7 +1,7 @@ -### RPM external cuda 11.2.2 +### RPM external cuda 11.4.1 ## INITENV +PATH LD_LIBRARY_PATH %i/lib64 -%define driversversion 460.32.03 +%define driversversion 470.57.02 %ifarch x86_64 Source0: https://developer.download.nvidia.com/compute/cuda/%{realversion}/local_installers/%{n}_%{realversion}_%{driversversion}_linux.run From f3af69f189af0f21f9aa196af4ec75ef990caeeb Mon Sep 17 00:00:00 2001 From: Andrea Bocci Date: Wed, 4 Aug 2021 00:26:00 +0200 Subject: [PATCH 046/101] Update cuDNN to v8.2.2.26 for CUDA 11.4 --- cudnn.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cudnn.spec b/cudnn.spec index 778b2f5f22e..5cb14e25a77 100644 --- a/cudnn.spec +++ b/cudnn.spec @@ -1,7 +1,7 @@ -### RPM external cudnn 8.1.1.33 +### RPM external cudnn 8.2.2.26 ## INITENV +PATH LD_LIBRARY_PATH %i/lib64 -%define cudaver 11.2 +%define cudaver 11.4 %define cudnnver_maj %(echo %{realversion} | cut -f1,2,3 -d.) %ifarch x86_64 From 40565e8fd9116f4074d01d03c3b712158f6e9848 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Mon, 16 Aug 2021 12:52:06 +0200 Subject: [PATCH 047/101] [GCC11][RunPath] Add changes to build with runpath --- bootstrap-bundle.spec | 11 +--- cuda.spec | 1 + data/package.sh | 1 + dpm-1.7.4.7-ld.patch | 20 ------- dpm-1.7.4.7-macosx.patch | 33 ----------- dpm-1.8.0-shlib-macosx.patch | 15 ----- dpm.spec | 80 ------------------------- file-bootstrap.spec | 1 - git.spec | 2 + gsl.spec | 2 +- hls.spec | 1 + libxml2-bootstrap.spec | 24 -------- madgraph5amcatnlo.spec | 1 + opencv.spec | 3 + openloops.spec | 1 + patchelf.spec | 21 ------- pip/onnx.file | 2 +- rpm-preamble.file | 31 +++++----- rpm-set_runpath.file | 111 +++++++++++++++++++++++++++++++++++ rpm.spec | 43 ++++++++------ 20 files changed, 168 insertions(+), 236 deletions(-) delete mode 100644 dpm-1.7.4.7-ld.patch delete mode 100644 dpm-1.7.4.7-macosx.patch delete mode 100644 dpm-1.8.0-shlib-macosx.patch delete mode 100644 dpm.spec delete mode 100644 libxml2-bootstrap.spec delete mode 100644 patchelf.spec create mode 100644 rpm-set_runpath.file diff --git a/bootstrap-bundle.spec b/bootstrap-bundle.spec index 82ef4b7b650..18661eef22c 100644 --- a/bootstrap-bundle.spec +++ b/bootstrap-bundle.spec @@ -1,6 +1,5 @@ -### RPM external bootstrap-bundle 2.0 -## INITENV +PATH PATH %{i}/bin -## INITENV SET MAGIC %{i}/share/misc/magic.mgc +### RPM external bootstrap-bundle 3.0 +## NO_AUTO_DEPENDENCY ## NOCOMPILER BuildRequires: gcc @@ -40,6 +39,7 @@ cp -P $GCC_ROOT/lib/libelf.%{soname}* %{i}/lib cp -P $GCC_ROOT/lib/libelf-*.%{soname} %{i}/lib cp -P $GCC_ROOT/lib/libdw.%{soname}* %{i}/lib cp -P $GCC_ROOT/lib/libdw-*.%{soname} %{i}/lib +cp -P $GCC_ROOT/bin/readelf %{i}/bin %endif find %{i}/bin -type f -writable -exec %{strip} {} \; @@ -55,8 +55,3 @@ mv %{i}/lib/lib{lua,archive}.a %{i}/tmp rm -f %{i}/lib/*.{l,}a mv %{i}/tmp/lib* %{i}/lib/ rm -rf %{i}/tmp - -touch %{i}/etc/profile.d/dependencies-setup.sh %{i}/etc/profile.d/dependencies-setup.csh - -%post -rm -f $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/dependencies-setup.* diff --git a/cuda.spec b/cuda.spec index feb4a0495c8..941cf8218c2 100644 --- a/cuda.spec +++ b/cuda.spec @@ -1,6 +1,7 @@ ### RPM external cuda 11.4.1 ## INITENV +PATH LD_LIBRARY_PATH %i/lib64 +%define runpath_opts -m compute-sanitizer -m drivers -m nvvm %define driversversion 470.57.02 %ifarch x86_64 diff --git a/data/package.sh b/data/package.sh index 95cf110fad6..97f056ad18a 100755 --- a/data/package.sh +++ b/data/package.sh @@ -1,6 +1,7 @@ #!/bin/bash dir=$(dirname $0) if [ -e "${dir}/$1.spec" ] ; then + echo "## NO_AUTO_RUNPATH" cat "${dir}/$1.spec" exit 0 fi diff --git a/dpm-1.7.4.7-ld.patch b/dpm-1.7.4.7-ld.patch deleted file mode 100644 index 50f5ad3acea..00000000000 --- a/dpm-1.7.4.7-ld.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- orig.LCG-DM-1.7.4/shlib/Imakefile 2010-06-10 17:25:25.000000000 +0200 -+++ LCG-DM-1.7.4/shlib/Imakefile 2010-08-27 13:11:06.000000000 +0200 -@@ -60,7 +60,7 @@ - @mkdir tmp - @for i in $^ ;\ - do (cd tmp; case $$i in *.a) $(AR) x ../$$i; rm -f $(SYMTABNAM) ;; esac) done -- (cd tmp; ld $(SHLIBLDFLAGS) -o ../$@ *.o $(SHLIBREQLIBS) -L .. -llcgdm $(LIBCSEC)) -+ (cd tmp; c++ $(SHLIBLDFLAGS) -o ../$@ *.o $(SHLIBREQLIBS) -L .. -llcgdm $(LIBCSEC)) - @-rm -rf tmp - - liblcgdm.sl liblcgdm.so liblcgdm.dynlib: $(COMMONLIB) $(SECURITYLIB) -@@ -69,7 +69,7 @@ - @mkdir tmp - @for i in $^ ;\ - do (cd tmp; $(AR) x ../$$i; rm -f $(SYMTABNAM)) done -- (cd tmp; ld $(SHLIBLDFLAGS) -o ../$@ *.o $(SHLIBREQLIBS) $(LIBCSEC)) -+ (cd tmp; c++ $(SHLIBLDFLAGS) -o ../$@ *.o $(SHLIBREQLIBS) $(LIBCSEC)) - @-rm -rf tmp - - libdpm.dll: $(RFIOLIB) $(NSLIB) $(DPMLIB) diff --git a/dpm-1.7.4.7-macosx.patch b/dpm-1.7.4.7-macosx.patch deleted file mode 100644 index 54e915b5d24..00000000000 --- a/dpm-1.7.4.7-macosx.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/Imakefile b/Imakefile -index 323f9e8..bdef278 100644 ---- a/LCG-DM-1.7.4/shlib/Imakefile -+++ b/LCG-DM-1.7.4/shlib/Imakefile -@@ -54,13 +54,13 @@ exportshr: - libdpm.sl libdpm.so libdpm.dylib: $(RFIOLIB) $(NSLIB) $(DPMLIB) - liblfc.sl liblfc.so liblfc.dylib: $(NSLIB) - --%.sl %.so %.dynlib: SharedLibraryTargetName(lcgdm) -+%.sl %.so %.dylib: SharedLibraryTargetName(lcgdm) - @echo " making $@ in `pwd`" - @-rm -rf tmp - @mkdir tmp - @for i in $^ ;\ - do (cd tmp; case $$i in *.a) $(AR) x ../$$i; rm -f $(SYMTABNAM) ;; esac) done -- (cd tmp; c++ $(SHLIBLDFLAGS) -o ../$@ *.o $(SHLIBREQLIBS) -L .. -llcgdm $(LIBCSEC)) -+ (cd tmp; c++ $(SHLIBLDFLAGS) -o ../$@ *.o $(SHLIBREQLIBS) -L.. $(LIBCSEC)) - @-rm -rf tmp - - liblcgdm.sl liblcgdm.so liblcgdm.dynlib: $(COMMONLIB) $(SECURITYLIB) -diff --git a/LCG-DM-1.7.4/shlib/Imakefile b/LCG-DM-1.7.4/shlib/Imakefile -index bdef278..1f1a1e0 100644 ---- a/LCG-DM-1.7.4/shlib/Imakefile -+++ b/LCG-DM-1.7.4/shlib/Imakefile -@@ -63,7 +63,7 @@ liblfc.sl liblfc.so liblfc.dylib: $(NSLIB) - (cd tmp; c++ $(SHLIBLDFLAGS) -o ../$@ *.o $(SHLIBREQLIBS) -L.. $(LIBCSEC)) - @-rm -rf tmp - --liblcgdm.sl liblcgdm.so liblcgdm.dynlib: $(COMMONLIB) $(SECURITYLIB) -+liblcgdm.sl liblcgdm.so liblcgdm.dylib: $(COMMONLIB) $(SECURITYLIB) - @echo " making $@ in `pwd`" - @-rm -rf tmp - @mkdir tmp diff --git a/dpm-1.8.0-shlib-macosx.patch b/dpm-1.8.0-shlib-macosx.patch deleted file mode 100644 index 598c0529934..00000000000 --- a/dpm-1.8.0-shlib-macosx.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/LCG-DM-1.8.0/config/darwin.cf b/LCG-DM-1.8.0/config/darwin.cf -index ab0bf06..8cf4e0b 100644 ---- a/LCG-DM-1.8.0/config/darwin.cf -+++ b/LCG-DM-1.8.0/config/darwin.cf -@@ -12,8 +12,8 @@ GSOAP_PLATFORM = macosx - MTCCFLAGS = -DCTHREAD_POSIX -D_THREAD_SAFE -D_REENTRANT - MTLDLIBS = - MTLDFLAGS = --SHLIBLDFLAGS = -undefined dynamic_lookup -dylib -single_module --SHLIBREQLIBS = -lc /usr/lib/dylib1.o -+SHLIBLDFLAGS = -undefined dynamic_lookup -shared -+SHLIBREQLIBS = -lc - FC = gfortran - - #include diff --git a/dpm.spec b/dpm.spec deleted file mode 100644 index bfbf4ea03d7..00000000000 --- a/dpm.spec +++ /dev/null @@ -1,80 +0,0 @@ -### RPM external dpm 1.8.0.1 - -%define baseVersion %(echo %v | cut -d- -f1 | cut -d. -f1,2,3) -%define patchLevel %(echo %v | cut -d- -f1 | cut -d. -f4) -%define downloadv %{baseVersion}-%{patchLevel} -#%define dpmarch %(echo %cmsplatf | cut -d_ -f1 | sed 's/onl//') -%define dpmarch sl5 - -Source: http://eticssoft.web.cern.ch/eticssoft/repository/org.glite/LCG-DM/%{baseVersion}/src/DPM-mysql-%{downloadv}sec.%{dpmarch}.src.rpm -# Source: http://cmsrep.cern.ch/cms/cpt/Software/download/cms.ap/SOURCES/%{cmsplatf}/external/dpm/%{downloadv}/DPM-%{downloadv}.src.rpm -Patch0: dpm-1.7.4.7-ld -Patch1: dpm-1.7.4.7-macosx -Patch2: dpm-1.8.0-shlib-macosx - -%define cpu %(echo %cmsplatf | cut -d_ -f2) -%if "%cpu" != "amd64" -%define libsuffix %{nil} -%else -%define libsuffix ()(64bit) -%endif -Provides: libdpm.so%{libsuffix} - -%prep -rm -f %_builddir/DPM-%{downloadv}.src.tar.gz -%{rpmbuild_env} rpm2cpio %{_sourcedir}/DPM-mysql-%{downloadv}sec.%{dpmarch}.src.rpm | cpio -ivd LCG-DM-%{baseVersion}.tar.gz -cd %_builddir ; rm -rf LCG-DM-%{baseVersion}; tar -xzvf LCG-DM-%{baseVersion}.tar.gz - -perl -p -i -e 's|SHLIBREQLIBS = -lc|SHLIBREQLIBS = -lc /usr/lib/dylib1.o|' LCG-DM-%{baseVersion}/config/darwin.cf -perl -p -i -e 's|FC = g77|FC = gfortran|' LCG-DM-%{baseVersion}/config/darwin.cf -cd LCG-DM-%{baseVersion} -%patch0 -p1 -case %cmsos in - osx*) -%patch1 -p2 -%patch2 -p2 -;; -esac - -%build -cd LCG-DM-%{baseVersion} -cp h/patchlevel.in h/patchlevel.h -perl -pi -e "s!__PATCHLEVEL__!%patchLevel!;s!__BASEVERSION__!\"%baseVersion\"!;s!__TIMESTAMP__!%(date +%%s)!" h/patchlevel.h -%if "%cpu" != "amd64" -perl -pi -e 's|ld\s+\$\(|ld -m elf_i386 \$\(|' shlib/Imakefile -%endif - -for this in BuildDLI BuildDPMServer BuildNameServerDaemon BuildNameServerLibrary BuildRfioServer \ - BuildSRMv1Server BuildSRMv2Server BuildSRMv2_2Server BuildTest ; do - perl -pi -e "s/\s+$this\s+YES/ $this\tNO/g" config/site.def -done - -for this in BuildDPMClient BuildInterfaces BuildRfioClient; do - perl -pi -e "s/\s+$this\s+NO/ $this\tYES/g" config/site.def -done -for this in Accounting HasNroff UseCupv UseKRB4 UseKRB5 UseMySQL UseOracle UseVirtualIds UseVOMS ; do - perl -pi -e "s/\s+$this\s+YES/ $this\tNO/g" config/site.def -done -for this in SecMakeStaticLibrary BuildSecureRfio BuildSecureCns BuildSecureDpm ; do - perl -pi -e "s/\s+$this\s+YES/ $this\tNO/g" config/site.def -done - -mkdir -p %i/lib %i/include/dpm - -./configure dpm --with-client-only -cd shlib; make - -%install -case %cmsplatf in - osx*) SONAME=dylib ;; - *) SONAME=so ;; -esac - -cd LCG-DM-%{baseVersion} -cp ./shlib/lib%n.$SONAME %i/lib/lib%n.$SONAME.%realversion -# RPM 4.4.2.2 didn't seem to be happy with the dependencies if a symlink -# and realversion was used for liblcgdm.so, so just leave it with the original -# name -cp ./shlib/liblcgdm.$SONAME %i/lib/ -cp ./h/*.h %i/include/dpm -ln -s lib%n.$SONAME.%realversion %i/lib/lib%n.$SONAME diff --git a/file-bootstrap.spec b/file-bootstrap.spec index c99e1fbf412..99ca6320f92 100644 --- a/file-bootstrap.spec +++ b/file-bootstrap.spec @@ -1,7 +1,6 @@ ### RPM external file-bootstrap 5.33 %define file_tag %(echo FILE%{realversion} | tr . _) Source: https://github.com/file/file/archive/%{file_tag}.tar.gz -BuildRequires: autotools %prep %setup -n file-%{file_tag} diff --git a/git.spec b/git.spec index fe1aa57fa8e..6f5e1ab5bec 100644 --- a/git.spec +++ b/git.spec @@ -19,8 +19,10 @@ Provides: perl(CGI::Util) Provides: perl(Scalar::Util) Provides: perl(Time::HiRes) Provides: perl(YAML::Any) +Provides: perl(DBI) %define drop_files %{i}/share/man +%define runpath_opts -m libexec %prep %setup -b 0 -n %{n}-%{realversion} diff --git a/gsl.spec b/gsl.spec index e74ddac507c..5e0ad4262d3 100644 --- a/gsl.spec +++ b/gsl.spec @@ -2,7 +2,7 @@ ## INITENV SET GSL_CBLAS_LIB -L${OPENBLAS_ROOT}/lib -lopenblas Source: ftp://ftp.gnu.org/gnu/%{n}/%{n}-%{realversion}.tar.gz Requires: OpenBLAS - +%define runpath_opts -m cblas %define keep_archives true %prep diff --git a/hls.spec b/hls.spec index 632b6fef7bc..0c55692130b 100644 --- a/hls.spec +++ b/hls.spec @@ -2,6 +2,7 @@ %define tag 200a9aecaadf471592558540dc5a88256cbf880f %define branch master %define github_user Xilinx +%define runpath_opts -m examples Source: git+https://github.com/%{github_user}/HLS_arbitrary_Precision_Types.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz Requires: gmake diff --git a/libxml2-bootstrap.spec b/libxml2-bootstrap.spec deleted file mode 100644 index 8609b694868..00000000000 --- a/libxml2-bootstrap.spec +++ /dev/null @@ -1,24 +0,0 @@ -### RPM external libxml2-bootstrap 2.9.1 -Source: ftp://xmlsoft.org/libxml2/libxml2-%{realversion}.tar.gz -%define strip_files %{i}/lib/lib* %{i}/bin/{xmlcatalog,xmllint} -%define drop_files %{i}/share/{man,doc,gtk-doc} - -Requires: xz-bootstrap - -%prep -%setup -n libxml2-%{realversion} - -%build -./configure --disable-static --prefix=%{i} --build="%{_build}" \ - --host="%{_host}" --with-zlib \ - --with-lzma="${XZ_BOOTSTRAP_ROOT}" --without-python -make %{makeprocesses} - -%install -make install -rm -rf %{i}/lib/pkgconfig -rm -rf %{i}/lib/*.{l,}a - -%post -%{relocateConfig}bin/xml2-config -%{relocateConfig}lib/xml2Conf.sh diff --git a/madgraph5amcatnlo.spec b/madgraph5amcatnlo.spec index 925eda11a20..0ba88f25832 100644 --- a/madgraph5amcatnlo.spec +++ b/madgraph5amcatnlo.spec @@ -1,4 +1,5 @@ ### RPM external madgraph5amcatnlo 2.7.3 +%define runpath_opts -m HEPTools -m basiceventgeneration %define versiontag 2_7_3 Provides: perl(Compress::Zlib) Provides: perl(List::Util) diff --git a/opencv.spec b/opencv.spec index 564dcf67b82..e34a2febe3b 100644 --- a/opencv.spec +++ b/opencv.spec @@ -25,6 +25,9 @@ cmake ../%{n}-%{realversion} \ -DCMAKE_INSTALL_PREFIX="%{i}" \ -DCMAKE_INSTALL_LIBDIR=lib \ -DWITH_EIGEN=ON \ + -DBUILD_EXAMPLES=OFF \ + -DWITH_QT=OFF \ + -DWITH_GTK=OFF \ -DPYTHON3_EXECUTABLE:FILEPATH="${PYTHON3_ROOT}/bin/python3" \ -DPYTHON3_INCLUDE_DIR:PATH="${PYTHON3_ROOT}/include/python%{cms_python3_major_minor_version}" \ -DPYTHON3_LIBRARY:FILEPATH="${PYTHON3_ROOT}/lib/libpython%{cms_python3_major_minor_version}.so" \ diff --git a/openloops.spec b/openloops.spec index d83ce108d3c..643004b9e4e 100644 --- a/openloops.spec +++ b/openloops.spec @@ -4,6 +4,7 @@ BuildRequires: py3-scons openloops-process %define keep_archives true +%define runpath_opts -m proclib %prep %setup -n %{n}-%{realversion} diff --git a/patchelf.spec b/patchelf.spec deleted file mode 100644 index bd6ae462b1d..00000000000 --- a/patchelf.spec +++ /dev/null @@ -1,21 +0,0 @@ -### RPM external patchelf 0.10 -## INITENV +PATH PATH %{i}/bin - -%define git_branch master -%define git_commit 327d80443672c397970738f9e216a7e86cbf3ad7 -Source0: git://github.com/NixOS/patchelf.git?obj=%{git_branch}/%{git_commit}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz -BuildRequires: autotools - -%define drop_files %{i}/share - -%prep -%setup -n %{n}-%{realversion} - -%build - -./bootstrap.sh -./configure --prefix=%{i} -make %{makeprocesses} - -%install -make install diff --git a/pip/onnx.file b/pip/onnx.file index 536a7faf197..d0c85c4e5eb 100644 --- a/pip/onnx.file +++ b/pip/onnx.file @@ -1,4 +1,4 @@ Requires: cmake protobuf py3-protobuf py3-six py3-typing_extensions py3-numpy py3-pytest-runner - +%define runpath_opts -n pb -n onnx %define PipPreBuild export ONNX_ML=1 %define RelocatePython %{i}/bin/* diff --git a/rpm-preamble.file b/rpm-preamble.file index d8b6a8ef0f6..8687e190a46 100644 --- a/rpm-preamble.file +++ b/rpm-preamble.file @@ -168,31 +168,23 @@ # No %_excludedocs # No Packager: # No Provides: -# FIXME need %make -> gmake/make as appropriate? # Define a little helper scriptlet to source package inits from other # packages. This allows cross-package environment setup to work while # building. See above how we determine the list by parsing the spec # itself. -%{expand:%%define rpmbuild_libdir :%(echo $LD_LIBRARY_PATH | tr ':' '\n' | grep '/external/bootstrap-bundle/')} -%define rpmbuild_env LD_LIBRARY_PATH=${LD_LIBRARY_PATH}%{rpmbuild_libdir} -%define drop_bootstrap_path export PATH=$(echo $PATH | tr ':' '\\n' | grep -v '/external/bootstrap-bundle/' | tr '\\n' ':' | sed 's|:*$||') -%define drop_bootstrap_lib export LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | tr ':' '\\n' | grep -v '/external/bootstrap-bundle/' | tr '\\n' ':' | sed 's|:*$||') -%define drop_bootstrap_env %{drop_bootstrap_path}; %{drop_bootstrap_lib} +%define drop_bootstrap_path export PATH=$(echo $PATH | tr ':' '\\n' | grep -v '/external/bootstrap-bundle/' | tr '\\n' ':' | sed 's|:*$||') +%define drop_bootstrap_lib export %{dynamic_path_var}=$(echo $%{dynamic_path_var} | tr ':' '\\n' | grep -v '/external/bootstrap-bundle/' | tr '\\n' ':' | sed 's|:*$||') +%define disable_recursive_env %{drop_bootstrap_path}; %{drop_bootstrap_lib}; export _CMSBUILD_BUILD_ENV_=1 %if "%archfirst" == "yes" -%define initenv_all %{drop_bootstrap_env} ; for x in %{allpkgreqs} .; do i=%{cmsroot}/%{cmsplatf}/$x/etc/profile.d/init.sh; [ -f $i ] && . $i; done -%define initenv_direct %{drop_bootstrap_env} ; for x in %{directpkgreqs} %{builddirectpkgreqs} .; do i=%{cmsroot}/%{cmsplatf}/$x/etc/profile.d/init.sh; [ -f $i ] && . $i; done -%define post_initenv unset %{dynamic_path_var}; for x in %{allpkgreqs} %{pkgdir} ; do i=$RPM_INSTALL_PREFIX/%{cmsplatf}/$x/etc/profile.d/init.sh; [ -f $i ] && . $i; done +%define initenv_all %{disable_recursive_env} ; for x in %{allpkgreqs} .; do i=%{cmsroot}/%{cmsplatf}/$x/etc/profile.d/init.sh; [ -f $i ] && . $i; done +%define initenv_direct %{disable_recursive_env} ; for x in %{directpkgreqs} %{builddirectpkgreqs} .; do i=%{cmsroot}/%{cmsplatf}/$x/etc/profile.d/init.sh; [ -f $i ] && . $i; done %else -%define initenv_all %{drop_bootstrap_env} ; for x in %{allpkgreqs} .; do i=%{cmsroot}/$x/%{cmsplatf}/etc/profile.d/init.sh; [ -f $i ] && . $i; done -%define initenv_direct %{drop_bootstrap_env} ; for x in %{directpkgreqs} %{builddirectpkgreqs} .; do i=%{cmsroot}/$x/%{cmsplatf}/etc/profile.d/init.sh; [ -f $i ] && . $i; done -%define post_initenv unset %{dynamic_path_var}; for x in %{allpkgreqs} %{pkgdir} ; do i=$RPM_INSTALL_PREFIX/$x/%{cmsplatf}/etc/profile.d/init.sh; [ -f $i ] && . $i; done +%define initenv_all %{disable_recursive_env} ; for x in %{allpkgreqs} .; do i=%{cmsroot}/$x/%{cmsplatf}/etc/profile.d/init.sh; [ -f $i ] && . $i; done +%define initenv_direct %{disable_recursive_env} ; for x in %{directpkgreqs} %{builddirectpkgreqs} .; do i=%{cmsroot}/$x/%{cmsplatf}/etc/profile.d/init.sh; [ -f $i ] && . $i; done %endif %define initenv %initenv_all -%define add_rpath (RPATH_ELF_BIN=$(find $RPM_INSTALL_PREFIX/%{pkgrel} -type f -exec file {} \\; | grep ' ELF ' | grep ' executable' | cut -d':' -f1) && \ - echo "$RPATH_ELF_BIN" | xargs -n 1 -I{} -P $(getconf _NPROCESSORS_ONLN) sh -c "cp {} {}.post-tmp && chmod u+w {}.post-tmp && patchelf --set-rpath $%{dynamic_path_var} --force-rpath {}.post-tmp && chmod --reference={} {}.post-tmp && mv {}.post-tmp {}" ) - %if "%{?compiling_processes:set}" == "set" %define makeprocesses -j %compiling_processes %else @@ -224,6 +216,15 @@ sed -i -e "${lnum}c#!/usr/bin/env python" $py \ done +#RunPath commands +%define runpath_install \ + script=${RPM_POPTEXEC_PATH}/set_runpath; \ + if [ -e %{i}/etc/profile.d/set_runpath ] ; then script=%{i}/etc/profile.d/set_runpath; fi ;\ + force_rpath=""; \ + if [ "%{force_rpath}" = "true" ] ; then force_rpath='--force-rpath'; fi; \ + . %{i}/etc/profile.d/init.sh; \ + PATH="${RPM_POPTEXEC_PATH}:${PATH}" $script --prefix %{cmsroot}/%{cmsplatf} --package %{i} --jobs %{compiling_processes} %{?runpath_opts:%runpath_opts} ${force_rpath} + # On macosx one needs to use the -x option, to avoid excessive stripping. %ifos darwin %define strip strip -x diff --git a/rpm-set_runpath.file b/rpm-set_runpath.file new file mode 100644 index 00000000000..b88894438fb --- /dev/null +++ b/rpm-set_runpath.file @@ -0,0 +1,111 @@ +#!/bin/bash -ex + +function set_runpath() +{ + [ $(readelf -d ${1} 2>&1 | grep '(NEEDED)' |wc -l) -eq 0 ] && return + cp ${1} ${1}.post-tmp + chmod u+w ${1}.post-tmp + local ERR=true + if patchelf --set-rpath ${LD_LIBRARY_PATH_ENV} ${FORCE_RPATH} ${1}.post-tmp ; then + if [ "${SET_RUNPATH}" = "" ] ; then + if patchelf --shrink-rpath ${1}.post-tmp ; then + rpath="" + local d=$(dirname ${1} | sed 's|^./||') + local r1=$(echo $d | sed 's|[^/][^/]*|..|g') + local r2="${r1}/../../.." + for p in $(patchelf --print-rpath ${1}.post-tmp | tr ':' '\n') ; do + case $p in + ${PACKAGE_PATH}/${d}) rpath="${rpath}:\$ORIGIN" ;; + ${PACKAGE_PATH}/*) p=$(echo $p | sed "s|${PACKAGE_PATH}/||"); rpath="${rpath}:\$ORIGIN/${r1}/${p}" ;; + ${INSTALL_PREFIX}/*) p=$(echo $p | sed "s|${INSTALL_PREFIX}/||"); rpath="${rpath}:\$ORIGIN/${r2}/${p}" ;; + *) rpath="${rpath}:${p}" ;; + esac + done + rpath=$(echo ${rpath} | sed 's|^:||') + if [ "${rpath}" != "" -a "${rpath}" != "${LD_LIBRARY_PATH_ENV}" ] ; then + patchelf --set-rpath ${rpath} ${FORCE_RPATH} ${1}.post-tmp + fi + ERR=false + fi + else + ERR=false + fi + fi + if $ERR ; then + touch ${PACKAGE_PATH}/error.set_runpath + echo "ERROR: $1" + rm ${1}.post-tmp + else + chmod --reference=${1} ${1}.post-tmp + mv ${1}.post-tmp ${1} + touch ${1}.cmsdist_runpath + fi +} + +INSTALL_PREFIX="" +PACKAGE_PATH="" +FORCE_RPATH="" +SET_RUNPATH="" +MATCH="lib lib64 bin" +NAME="py pyc pyi h hh hpp inc" +MAX_JOBS=$(getconf _NPROCESSORS_ONLN) +let STIME=$(date +%s) + +while [ ! X$# = X0 ]; do + arg=$1 ; shift + case $arg in + --prefix) INSTALL_PREFIX=$1 ; shift ;; + --package) PACKAGE_PATH=$1 ; shift ;; + --force-rpath) FORCE_RPATH='--force-rpath' ;; + --rpath) SET_RUNPATH=$1 ; shift ;; + -m|--match) MATCH="$MATCH $1"; shift ;; + -n|--not-name) NAME="$NAME $1" ; shift ;; + --jobs) MAX_JOBS="$1" ; shift ;; + --help) + echo "Usage: $0 --prefix /install/prefix/arch --package package-rootdir [--force-rpath] [--rpath runpath-to-set] [--patchelf patchelf-path] [--jobs N] [--help]" + echo "e.g." + echo "$0 --prefix /build/cms/slc7_amd64_gcc900 --package /build/cms/slc7_amd64_gcc900/lcg/root/6.24.00 --patchelf /build/cms/slc7_amd64_gcc900/externals/rpm/4.15.0/bin/patchelf" + exit 0 + ;; + *) echo "Unknown command $1" ; exit 1 ;; + esac +done + +[ "${INSTALL_PREFIX}" != "" ] || exit 1 +[ "${PACKAGE_PATH}" != "" ] || exit 1 + +LD_LIBRARY_PATH_ENV="${SET_RUNPATH}" +if [ "${SET_RUNPATH}" = "" ] ; then + case $(uname -s) in + Linux) LD_LIBRARY_PATH_ENV="${LD_LIBRARY_PATH}" ;; + Darwin) LD_LIBRARY_PATH_ENV="${DYLD_FALLBACK_LIBRARY_PATH}" ;; + esac +fi + +cnt=0 +pcnt=0 +if [ "${LD_LIBRARY_PATH_ENV}" != "" ] ; then + pushd ${PACKAGE_PATH} + rm -f error.set_runpath + mdir="" ; name="" + for d in $(echo ${MATCH} | tr ' ' '\n' | grep -v '^$' | sort | uniq) ; do mdir="${mdir} -path './$d/*' -o "; done + for d in $(echo ${NAME} | tr ' ' '\n' | grep -v '^$' | sort | uniq) ; do name="${name} -not -name '*.$d' -a "; done + mdir=$(echo "$mdir" | sed 's|-o $||') + name=$(echo "$name" | sed 's|-a $||') + mkdir -p ./etc/profile.d + for fpath in $(eval "find . -path './*/__pycache__' -prune -o \( $mdir \) -a \( $name \) -a -type f -print") ; do + let cnt=$cnt+1 + while [ $(jobs -p | wc -l) -gt ${MAX_JOBS} ] ; do sleep 0.1 ; done + set_runpath $fpath & + done + wait + find . -name '*.cmsdist_runpath' -type f > etc/profile.d/set_runpath.txt + cat etc/profile.d/set_runpath.txt | xargs --no-run-if-empty rm -f + pcnt=$(cat etc/profile.d/set_runpath.txt | wc -l) + popd +fi + +let DTIME=$(date +%s)-${STIME} || true +echo "Runpath took ${DTIME} secs for $pcnt/$cnt files" + +[ ! -e ${PACKAGE_PATH}/error.set_runpath ] || exit 1 diff --git a/rpm.spec b/rpm.spec index 8d2f68ce508..07480daef6e 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,20 +1,19 @@ ### RPM external rpm 4.15.0 -## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 -## INITENV SET RPM_CONFIGDIR %{i}/lib/rpm +## INITENV SET RPM_CONFIGDIR %{i}/libx/rpm ## INITENV SET RPM_POPTEXEC_PATH %{i}/bin +## INITENV SET MAGIC %{i}/share/misc/magic.mgc ## NOCOMPILER +## NO_AUTO_DEPENDENCY -# Warning! While rpm itself seems to work, at the time of writing it -# does not seem to be possible to build apt-rpm with %define tag 48c04ee8077fbba1a0001968f2794cbaeb54f15c %define branch cms/rpm-%{realversion}-release %define github_user cms-externals %define github_repo rpm-upstream Source: git+https://github.com/%{github_user}/%{github_repo}.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz +Source2: rpm-set_runpath -Requires: bootstrap-bundle -BuildRequires: autotools BuildRequires: gcc +BuildRequires: bootstrap-bundle patchelf-bootstrap %prep %setup -n %{n}-%{realversion} @@ -69,19 +68,13 @@ perl -p -i -e's|-O2|-O0|' ./configure LIBS="-lnspr4 -lnss3 -lnssutil3 -lplds4 -lbz2 -lplc4 -lz -lpopt -llzma \ -ldb -llua -larchive $LIBS_PLATF" -#FIXME: this does not seem to work and we still get /usr/bin/python in some of the files. -export __PYTHON="/usr/bin/env python" -#perl -p -i -e "s|^.*WITH_SELINUX.*$||; -# s|-lselinux||; -#" `find . -name \*.in` - perl -p -i -e "s|#\!.*perl(.*)|#!/usr/bin/env perl$1|" $(grep -R '#! */usr/bin/perl' . | sed 's|:.*||' | sort | uniq) perl -p -i -e "s|#\!.*python(.*)|#!/usr/bin/env python$1|" $(grep -R '#! */usr/bin/python' . | sed 's|:.*||' | sort | uniq) %install make install # Remove unneeded documentation -%define drop_files %i/share +rm -rf %i/share # We remove pkg-config files for two reasons: # * it's actually not required (macosx does not even have it). @@ -102,7 +95,7 @@ perl -p -i -e "s!^.buildroot!#%%buildroot!; s!^%%_repackage_dir.*/var/spool/repackage!%%_repackage_dir %{instroot}/%{cmsplatf}/var/spool/repackage!" %i/lib/rpm/macros # Removes any reference to /usr/lib/rpm in lib/rpm -perl -p -i -e 's|/usr/lib/rpm([^a-zA-Z])|%{i}/lib/rpm$1|g' \ +perl -p -i -e 's|/usr/lib/rpm([^a-zA-Z])|%{i}/libx/rpm$1|g' \ %{i}/lib/rpm/check-rpaths \ %{i}/lib/rpm/check-rpaths-worker \ %{i}/lib/rpm/find-debuginfo.sh \ @@ -137,8 +130,24 @@ done ln -sf rpm %i/bin/rpmverify ln -sf rpm %i/bin/rpmquery -mkdir -p %{i}/etc/profile.d -echo "test X\$BOOTSTRAP_BUNDLE_ROOT != X || . $BOOTSTRAP_BUNDLE_ROOT/etc/profile.d/init.sh" > %{i}/etc/profile.d/dependencies-setup.sh +#rpath settings +#Copy bootstrap/patchelf lib +mv %{i}/lib %{i}/libx +cp -rf $BOOTSTRAP_BUNDLE_ROOT/bin/* %{i}/bin +cp -f $PATCHELF_BOOTSTRAP_ROOT/bin/patchelf %{i}/bin +cp %{_sourcedir}/rpm-set_runpath %{i}/bin/set_runpath +chmod +x %{i}/bin/set_runpath +#Copy bootstrap share/lib +cp -rf $BOOTSTRAP_BUNDLE_ROOT/share %i/share +cp -rf $BOOTSTRAP_BUNDLE_ROOT/lib/* %{i}/libx + +MAGIC=%{i}/share/misc/magic.mgc %{dynamic_path_var}=%{i}/libx PATH="%{i}/bin:${PATH}" \ + %{i}/bin/set_runpath --prefix %{cmsroot}/%{cmsplatf} --package %{i} -m libx \ + --force-rpath --rpath '$ORIGIN:$ORIGIN/..:$ORIGIN/../libx' --jobs %{compiling_processes} + +#Create lib/rpm +mkdir -p %{i}/lib +for d in lua rpm rpm-plugins ; do ln -sf ../libx/$d %{i}/lib/$d ; done %post -%{relocateRpmFiles} $(grep -I -r %cmsroot $RPM_INSTALL_PREFIX/%pkgrel | cut -d: -f1 | sort | uniq) +%{relocateRpmFiles} $(grep -I -r %cmsroot $RPM_INSTALL_PREFIX/%pkgrel | cut -d: -f1 | grep -v '/%pkgrel/etc/profile.d/' | sort | uniq) From a8b20bba78396035f630db1557c0fdee07eda9b5 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Tue, 17 Aug 2021 08:31:57 +0200 Subject: [PATCH 048/101] [GCC11] Bump to 11.2.0 --- gcc.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc.spec b/gcc.spec index 0a197131e7d..ed51716a0e4 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,10 +1,10 @@ -### RPM external gcc 11.1.0 +### RPM external gcc 11.2.0 ## USE_COMPILER_VERSION ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 # Use the git repository for fetching the sources. This gives us more control while developing # a new platform so that we can compile yet to be released versions of the compiler. # See: https://gcc.gnu.org/viewcvs/gcc/branches/gcc-8-branch/?view=log -%define gccTag ef397f64ffe4c451369b99115ae362465d9c9d4e +%define gccTag a0a0499b8bb920fdd98e791804812f001f0b4fe8 %define gccBranch releases/gcc-11 %define moduleName %{n}-%{realversion} From 9b3cddd7a169bf1754abed97992ca420a63a1577 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Tue, 17 Aug 2021 08:33:29 +0200 Subject: [PATCH 049/101] Update gcc.spec --- gcc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc.spec b/gcc.spec index ed51716a0e4..55656e9769a 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,4 +1,4 @@ -### RPM external gcc 11.2.0 +### RPM external gcc 11.2.1 ## USE_COMPILER_VERSION ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 # Use the git repository for fetching the sources. This gives us more control while developing From 76f9fdc2b36a9d9f90928a80e7bb44109a3c49b4 Mon Sep 17 00:00:00 2001 From: Mircho Rodozov Date: Tue, 7 Sep 2021 23:00:11 +0200 Subject: [PATCH 050/101] Update libffi to 3.4.2 --- libffi.spec | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/libffi.spec b/libffi.spec index 22d09632706..3fba24698e2 100644 --- a/libffi.spec +++ b/libffi.spec @@ -1,20 +1,24 @@ -### RPM external libffi 3.2.1 +### RPM external libffi 3.4.2 ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 -Source: ftp://sourceware.org/pub/%{n}/%{n}-%{realversion}.tar.gz +%define tag v%{realversion} +%define github_user libffi +%define github_repo libffi +%define branch master -Patch0: libffi-3.2.1-fix-include-path +Source: git+https://github.com/%{github_user}/%{github_repo}.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz +BuildRequires: autotools %prep %setup -n %{n}-%{realversion} -%patch0 -p1 +autoreconf -fiv %build ./configure \ --prefix=%{i} \ --enable-portable-binary \ --disable-dependency-tracking \ - --disable-static + --disable-static --disable-docs make %{makeprocesses} From 810f5e099326a28770f0632b9c38edab3a5d38fd Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Fri, 10 Sep 2021 19:34:31 +0200 Subject: [PATCH 051/101] added patchelf-bootstrap.spec --- patchelf-bootstrap.spec | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 patchelf-bootstrap.spec diff --git a/patchelf-bootstrap.spec b/patchelf-bootstrap.spec new file mode 100644 index 00000000000..8c7fbd3fd0a --- /dev/null +++ b/patchelf-bootstrap.spec @@ -0,0 +1,21 @@ +### RPM external patchelf-bootstrap 0.13 +## NO_AUTO_RUNPATH + +%define git_branch master +%define git_commit %{realversion} +Source0: git://github.com/NixOS/patchelf.git?obj=%{git_branch}/%{git_commit}&export=patchelf-%{realversion}&output=/patchelf-%{realversion}.tgz +BuildRequires: autotools + +%define drop_files %{i}/share + +%prep +%setup -n patchelf-%{realversion} + +%build + +./bootstrap.sh +./configure --prefix=%{i} +make %{makeprocesses} + +%install +make install From d99af453d0de2e17a05829d308f4d8dc3e4f167a Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Thu, 30 Sep 2021 15:03:16 +0200 Subject: [PATCH 052/101] added openssl-devel openssl-libs for ppc64 aarch64 --- bootstrap-driver.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap-driver.spec b/bootstrap-driver.spec index e1fa23b0dde..1eb6fda00a1 100644 --- a/bootstrap-driver.spec +++ b/bootstrap-driver.spec @@ -89,7 +89,7 @@ slc*) perl-Socket perl-Time-Local perl-Storable glibc-headers perl-threads perl-Thread-Queue perl-Module-ScanDeps perl-Test-Harness perl-Env perl-Switch perl-ExtUtils-Embed ncurses-libs perl-libs nspr nss nss-util file file-libs - readline zlib popt bzip2 bzip2-libs perl-Encode" + readline zlib popt bzip2 bzip2-libs perl-Encode openssl-devel openssl-libs" slc7_ppc64le_platformSeeds="glibc coreutils bash tcsh zsh perl tcl tk readline openssl ncurses e2fsprogs krb5-libs freetype fontconfig libstdc++ @@ -104,7 +104,7 @@ slc*) perl-Socket perl-Time-Local perl-Storable glibc-headers perl-threads perl-Thread-Queue perl-Module-ScanDeps perl-Test-Harness perl-Env perl-Switch perl-ExtUtils-Embed ncurses-libs perl-libs nspr nss nss-util file file-libs - readline zlib popt bzip2 bzip2-libs perl-Encode" + readline zlib popt bzip2 bzip2-libs perl-Encode openssl-devel openssl-libs" ;; fc*) From 68968d0894bc71c32f0848f90d20e23a862c90c5 Mon Sep 17 00:00:00 2001 From: ddaina Date: Mon, 25 Oct 2021 14:23:55 +0200 Subject: [PATCH 053/101] dont build cudnn on slc7_aarch64 --- onnxruntime.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/onnxruntime.spec b/onnxruntime.spec index 2111224cf36..211003137d6 100644 --- a/onnxruntime.spec +++ b/onnxruntime.spec @@ -9,7 +9,9 @@ Source1: https://github.com/microsoft/onnxruntime/commit/de4089f8cbe0baffe56a363 BuildRequires: cmake ninja Requires: protobuf py3-numpy py3-wheel py3-onnx zlib libpng py3-pybind11 +%if "%{cmsos}" != "slc7_aarch64" Requires: cuda cudnn +%endif %prep %setup -q -n %{n}-%{realversion} @@ -18,11 +20,11 @@ patch -p1 < %{_sourcedir}/de4089f8cbe0baffe56a363cc3a41595cc8f0809.patch %build rm -rf ../build; mkdir ../build; cd ../build -if [ $(%{cuda_gcc_support}) = true ]; then +%if "%{cmsos}" != "slc7_aarch64" USE_CUDA=ON -else +%else USE_CUDA=OFF -fi +%endif cmake ../%{n}-%{realversion}/cmake -GNinja \ -DPYTHON_EXECUTABLE=${PYTHON3_ROOT}/bin/python3 \ From 18c8fed6f7ed53b6c1ee942d76c2c2dae3aebe3d Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Tue, 26 Oct 2021 11:10:00 +0200 Subject: [PATCH 054/101] [llvm] use same host triple which is used bu gcc --- llvm.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/llvm.spec b/llvm.spec index a64fda12324..7fc1217a7ab 100644 --- a/llvm.spec +++ b/llvm.spec @@ -48,6 +48,7 @@ cmake %{_builddir}/llvm-%{realversion}-%{llvmCommit}/llvm \ -DLLVM_ENABLE_EH:BOOL=ON \ -DLLVM_ENABLE_PIC:BOOL=ON \ -DLLVM_ENABLE_RTTI:BOOL=ON \ + -DLLVM_HOST_TRIPLE=$(gcc -dumpmachine) \ -DLLVM_TARGETS_TO_BUILD:STRING="X86;PowerPC;AArch64;NVPTX" \ -DLIBOMPTARGET_NVPTX_ALTERNATE_HOST_COMPILER=/usr/bin/gcc \ -DLIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES="%llvm_cuda_arch" \ From 9a586f4c3289eccfae38543da3fb0f44666ca42a Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Thu, 28 Oct 2021 07:59:05 +0200 Subject: [PATCH 055/101] [git][gcc11] Added extra provides to avoid perl modules deps --- git.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/git.spec b/git.spec index 6f5e1ab5bec..5d1d0241a03 100644 --- a/git.spec +++ b/git.spec @@ -20,6 +20,10 @@ Provides: perl(Scalar::Util) Provides: perl(Time::HiRes) Provides: perl(YAML::Any) Provides: perl(DBI) +Provides: perl(CGI) +Provides: perl(Encode) +Provides: perl(Storable) +Provides: perl(Time::Local) %define drop_files %{i}/share/man %define runpath_opts -m libexec From 77a5b605b672d4bb2551f3c577c8a2d3c4ba3e37 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Thu, 28 Oct 2021 08:05:02 +0200 Subject: [PATCH 056/101] Update git.spec --- git.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/git.spec b/git.spec index 5d1d0241a03..8cfd2c09e2a 100644 --- a/git.spec +++ b/git.spec @@ -11,6 +11,9 @@ Patch1: git-2.19.0-runtime Requires: curl expat zlib pcre2 python3 BuildRequires: autotools + +# Fake provides for git add --interactive +# The following are not avaialble on SLC and Darwin platforms by default Provides: perl(SVN::Core) Provides: perl(SVN::Delta) Provides: perl(SVN::Ra) @@ -22,6 +25,7 @@ Provides: perl(YAML::Any) Provides: perl(DBI) Provides: perl(CGI) Provides: perl(Encode) +Provides: perl(Error) Provides: perl(Storable) Provides: perl(Time::Local) From a53147e7e1a1370f4b3d909ff2e586b593f03e53 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Tue, 2 Nov 2021 13:30:19 +0100 Subject: [PATCH 057/101] upated rpm-preamble --- rpm-preamble.file | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rpm-preamble.file b/rpm-preamble.file index 8687e190a46..0b44d55ecea 100644 --- a/rpm-preamble.file +++ b/rpm-preamble.file @@ -265,10 +265,10 @@ fi %define isslc %(case %{cmsos} in (slc*|cc*) echo 1 ;; (*) echo 0 ;; esac) #Use the following without {} e.g 'isos cc*' instead of '{isos} cc*' -%define is_cmsos %(case %{cmsos} in (%1_*) echo 1 ;; (*) echo 0 ;; esac) -%define is_ncmsos %(case %{cmsos} in (%1_*) echo 0 ;; (*) echo 1 ;; esac) -%define is_cmsarch %(case %{cmsos} in (*_%1) echo 1 ;; (*) echo 0 ;; esac) -%define is_ncmsarch %(case %{cmsos} in (*_%1) echo 0 ;; (*) echo 1 ;; esac) +%define is_cmsos() %(case %{cmsos} in (%{1}_*) echo 1 ;; (*) echo 0 ;; esac) +%define is_ncmsos() %(case %{cmsos} in (%{1}_*) echo 0 ;; (*) echo 1 ;; esac) +%define is_cmsarch() %(case %{cmsos} in (*_%{1}) echo 1 ;; (*) echo 0 ;; esac) +%define is_ncmsarch() %(case %{cmsos} in (*_%{1}) echo 0 ;; (*) echo 1 ;; esac) %define cuda_gcc_support touch cuda_gcc_supported.cu; if [ $(nvcc -dc cuda_gcc_supported.cu -o cuda_gcc_supported.cu.o 2>&1 | grep 'unsupported GNU version' | wc -l) -eq 0 ] ; then echo true; else echo false; fi ; rm -f cuda_gcc_supported.cu* %define common_revision_script() \ From fcc44562a4873e585d4242c1ae2b7cd4a1eba365 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Tue, 2 Nov 2021 14:52:47 +0100 Subject: [PATCH 058/101] updated gcc 11 to avoid m4 patch --- gcc.spec | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/gcc.spec b/gcc.spec index 55656e9769a..52290f8f6c9 100644 --- a/gcc.spec +++ b/gcc.spec @@ -10,10 +10,6 @@ %define moduleName %{n}-%{realversion} Source0: git+https://github.com/gcc-mirror/%{n}.git?obj=%{gccBranch}/%{gccTag}&export=%{moduleName}&output=/%{n}-%{realversion}-%{gccTag}.tgz -%define islinux %(case %{cmsos} in (slc*|fc*) echo 1 ;; (*) echo 0 ;; esac) -%define isdarwin %(case %{cmsos} in (osx*) echo 1 ;; (*) echo 0 ;; esac) -%define isamd64 %(case %{cmsplatf} in (*amd64*) echo 1 ;; (*) echo 0 ;; esac) - %define keep_archives true %define gmpVersion 6.2.1 @@ -27,11 +23,11 @@ Source3: https://ftp.gnu.org/gnu/mpc/mpc-%{mpcVersion}.tar.gz Source4: http://isl.gforge.inria.fr/isl-%{islVersion}.tar.bz2 Source12: http://zlib.net/zlib-%{zlibVersion}.tar.gz -%if %islinux +%ifos linux %define bisonVersion 3.7.6 %define binutilsVersion 2.36.1 %define elfutilsVersion 0.183 -%define m4Version 1.4.18 +%define m4Version 1.4.19 %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 @@ -57,8 +53,8 @@ EOF %global __find_requires %{_builddir}/%{moduleName}/%{name}-req chmod +x %{__find_requires} -%if %islinux -%if %isamd64 +%ifos linux +%ifarch x86_64 # Hack needed to align sections to 4096 bytes rather than 2MB on 64bit linux # architectures. This is done to reduce the amount of address space wasted by # relocating many libraries. This was done with a linker script before, but @@ -99,7 +95,7 @@ EOF_CMS_H %setup -D -T -b 4 -n isl-%{islVersion} %setup -D -T -b 12 -n zlib-%{zlibVersion} -%if %islinux +%ifos linux %setup -D -T -b 7 -n bison-%{bisonVersion} %setup -D -T -b 8 -n binutils-%{binutilsVersion} %setup -D -T -b 9 -n elfutils-%{elfutilsVersion} @@ -110,7 +106,7 @@ EOF_CMS_H %endif %build -%if %isdarwin +%ifarch darwin CC='clang' CXX='clang++' CPP='clang -E' @@ -149,7 +145,7 @@ esac make %{makeprocesses} make install -%if %islinux +%ifos linux CONF_BINUTILS_OPTS="--enable-ld=default --enable-lto --enable-plugins --enable-threads" CONF_GCC_WITH_LTO="--enable-ld=default --enable-lto" From a14ccae89b66de04201e6f2b0ebccb78772fedb5 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Tue, 2 Nov 2021 17:30:43 +0100 Subject: [PATCH 059/101] Update bootstrap-driver.spec --- bootstrap-driver.spec | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/bootstrap-driver.spec b/bootstrap-driver.spec index 2e209590102..49890f67d78 100644 --- a/bootstrap-driver.spec +++ b/bootstrap-driver.spec @@ -37,8 +37,6 @@ defaultSeeds="glibc glibc-32bit coreutils bash tcsh zsh pdksh perl tcl tk perl-T platformSeeds="bash bzip2-libs glibc nspr nss nss-util perl popt zlib glibc-devel openssl openssl-devel openssl-libs krb5-libs libcom_err tcsh perl-Carp perl-Data-Dumper perl-Exporter perl-File-Path perl-File-Temp perl-Getopt-Long perl-PathTools perl-Text-ParseWords perl-Thread-Queue perl-constant perl-Digest-MD5 perl-Socket libX11 libXext libXft libXpm libglvnd-glx libglvnd-opengl mesa-libGLU" -# Needed by oracle -platformSeeds+=" libaio" # Needed by python runtime platformSeeds+=" readline ncurses-libs tcl tk" # Seed packages which provides these @@ -52,6 +50,15 @@ platformBuildSeeds="git patch make zip unzip bzip2 java-1.8.0-openjdk-devel libc platformBuildSeeds+=" readline-devel ncurses-devel tcl-devel tk-devel" packagesWithBuildProvides="" +case %cmsplatf in +*_aarch64_* ) + ;; +*) + # Needed by oracle + platformSeeds+=" libaio" + ;; +esac + case %cmsplatf in cc* ) platformSeeds+=" libxcrypt" From 67257e5da884236cc0594e7f1c9b4d6e648ef489 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Tue, 2 Nov 2021 17:43:55 +0100 Subject: [PATCH 060/101] Update bootstrap-driver.spec --- bootstrap-driver.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/bootstrap-driver.spec b/bootstrap-driver.spec index 49890f67d78..435be4cca02 100644 --- a/bootstrap-driver.spec +++ b/bootstrap-driver.spec @@ -1,6 +1,5 @@ ### RPM external bootstrap-driver 32.0 ## NOCOMPILER -Source: cmsos Requires: rpm BuildRequires: cms-common @@ -9,7 +8,6 @@ BuildRequires: cms-common %prep %build %install -cp %{_sourcedir}/cmsos %{i}/ packageList="" echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'` for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'` From 72d3294eb2bd27fee35b189ecc98227a9dfdbc5f Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Wed, 3 Nov 2021 22:39:46 +0100 Subject: [PATCH 061/101] Update bootstrap-driver.spec --- bootstrap-driver.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-driver.spec b/bootstrap-driver.spec index 435be4cca02..7fe9c8252f4 100644 --- a/bootstrap-driver.spec +++ b/bootstrap-driver.spec @@ -59,7 +59,7 @@ esac case %cmsplatf in cc* ) - platformSeeds+=" libxcrypt" + platformSeeds+=" libxcrypt perl-IO" ;; slc*) platformSeeds+=" perl-Switch" From 60f81b77be91cc13d503aea5c036942a3292330c Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Wed, 3 Nov 2021 22:43:53 +0100 Subject: [PATCH 062/101] Update bootstrap-driver.spec --- bootstrap-driver.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-driver.spec b/bootstrap-driver.spec index 7fe9c8252f4..08a01d2afd3 100644 --- a/bootstrap-driver.spec +++ b/bootstrap-driver.spec @@ -59,7 +59,7 @@ esac case %cmsplatf in cc* ) - platformSeeds+=" libxcrypt perl-IO" + platformSeeds+=" libxcrypt perl-IO perl-Memoize perl-libnet perl-Term-ANSIColor perl-libs" ;; slc*) platformSeeds+=" perl-Switch" From ae38c8a72e8ba0a7d1835316295b81bc23a23a46 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Thu, 4 Nov 2021 11:30:29 +0100 Subject: [PATCH 063/101] cleanup extra Provides --- autotools.spec | 1 - bootstrap-driver.spec | 36 +++++++++++------------------------- fakesystem.spec | 38 ++++++++++++++++---------------------- git.spec | 17 ----------------- madgraph5amcatnlo.spec | 2 -- mysql.spec | 2 -- python.spec | 1 - python3.spec | 1 - 8 files changed, 27 insertions(+), 71 deletions(-) diff --git a/autotools.spec b/autotools.spec index d83bccf7e22..908f0210221 100644 --- a/autotools.spec +++ b/autotools.spec @@ -8,7 +8,6 @@ %define m4_version 1.4.18 %define gettext_version 0.21 %define pkgconfig_version 0.29.2 -Provides: perl(Errno) Source0: http://ftp.gnu.org/gnu/autoconf/autoconf-%{autoconf_version}.tar.gz Source1: http://ftp.gnu.org/gnu/automake/automake-%{automake_version}.tar.gz Source2: http://ftp.gnu.org/gnu/libtool/libtool-%{libtool_version}.tar.gz diff --git a/bootstrap-driver.spec b/bootstrap-driver.spec index 08a01d2afd3..cf35537b2f2 100644 --- a/bootstrap-driver.spec +++ b/bootstrap-driver.spec @@ -1,7 +1,7 @@ -### RPM external bootstrap-driver 32.0 +### RPM external bootstrap-driver 40.0 ## NOCOMPILER Requires: rpm -BuildRequires: cms-common +BuildRequires: cms-common fakesystem #danger! cms-common version is now hardwired below (and in bootstrap.file) @@ -26,15 +26,11 @@ do done additionalProvides="" -defaultSeeds="glibc glibc-32bit coreutils bash tcsh zsh pdksh perl tcl tk perl-Tk readline openssl ncurses XFree86-libs - e2fsprogs krb5-libs freetype fontconfig XFree86-Mesa-libGLU XFree86-Mesa-libGL xorg-x11-deprecated-libs - xorg-x11-libs xorg-x11-Mesa-libGLU xorg-x11-Mesa-libGL compat-libstdc++-33 fglrx_6_8_0 libidn" ############################## # Packages to seed for runtime ############################## -platformSeeds="bash bzip2-libs glibc nspr nss nss-util perl popt zlib glibc-devel openssl openssl-devel openssl-libs krb5-libs - libcom_err tcsh perl-Carp perl-Data-Dumper perl-Exporter perl-File-Path perl-File-Temp perl-Getopt-Long perl-PathTools perl-Text-ParseWords - perl-Thread-Queue perl-constant perl-Digest-MD5 perl-Socket libX11 libXext libXft libXpm libglvnd-glx libglvnd-opengl mesa-libGLU" +platformSeeds="bash tcsh bzip2-libs glibc nspr nss nss-util popt zlib glibc-devel openssl openssl-devel openssl-libs krb5-libs + libcom_err libX11 libXext libXft libXpm libglvnd-glx libglvnd-opengl mesa-libGLU" # Needed by python runtime platformSeeds+=" readline ncurses-libs tcl tk" # Seed packages which provides these @@ -43,7 +39,10 @@ packagesWithProvides="/usr/bin/python3 /usr/bin/perl /usr/bin/env /usr/bin/uname ############################## #Packages to seed for build ############################## -platformBuildSeeds="git patch make zip unzip bzip2 java-1.8.0-openjdk-devel libcom_err-devel which libXpm-devel libXft-devel mesa-libGLU-devel rsync" +platformBuildSeeds="git patch perl make zip unzip bzip2 java-1.8.0-openjdk-devel libcom_err-devel which libXpm-devel libXft-devel mesa-libGLU-devel rsync" +#Needed by autotools,go and lcov +platformBuildSeeds+=" perl-Carp perl-PathTools perl-Data-Dumper perl-Exporter perl-File-Path perl-PathTools perl-File-Temp perl-Getopt-Long perl-Text-ParseWords + perl-constant perl-PathTools perl-PathTools perl-Digest-MD5 perl-File-Path perl-PathTools perl-File-Temp perl-Getopt-Long" #needed by python build platformBuildSeeds+=" readline-devel ncurses-devel tcl-devel tk-devel" packagesWithBuildProvides="" @@ -66,25 +65,12 @@ slc*) ;; esac -# Seeds for unsupported platforms. These will not make bootstrap die, if not found. -# OpenSuse -unsupportedSeeds="xorg-x11-Mesa compat-readline4 compat-curl2 freetype2 xorg-x11-libX11" -# Ubuntu -unsupportedSeeds="$unsupportedSeeds libcomerr2 libidn11 libxi6 libxpm4 libxinerama1 libncurses5 libsm6 libice6 libc6 libxcursor1 libxmu6 - libgl1-mesa-glx libxft2 perl-base xserver-xorg xserver-xorg-core libfreetype6 libfontconfig1 libgl1-mesa libxrandr2 libglu1-mesa libxext6 libx11-6 libxrender1" -# Fedora -unsupportedSeeds="$unsupportedSeeds libX11 libXmu libSM libICE libXcursor - libXext libXrandr libXft mesa-libGLU mesa-libGL e2fsprogs-libs libXi libXinerama - libXft libXrender libXpm ncurses-libs libc6-i686 compat-readline5" -# PU-IAS -unsupportedSeeds="$unsupportedSeeds libcom_err" - -defaultPkgs="cms+cms-common+1.0" +defaultPkgs="cms+cms-common+1.0 cms+fakesystem+1.0" mkdir -p %{i}/etc/profile.d (echo "rpm_version=$RPM_VERSION"; \ - echo "platformSeeds=\"$defaultSeeds\""; \ - echo "unsupportedSeeds=\"$unsupportedSeeds\""; \ + echo "platformSeeds=\"\""; \ + echo "unsupportedSeeds=\"\""; \ echo "%{cmsos}_platformSeeds=\"$platformSeeds\""; \ echo "%{cmsos}_platformBuildSeeds=\"$platformBuildSeeds\""; \ echo "%{cmsos}_packagesWithProvides=\"$packagesWithProvides\""; \ diff --git a/fakesystem.spec b/fakesystem.spec index eb57edb79ad..dd0056cfa96 100644 --- a/fakesystem.spec +++ b/fakesystem.spec @@ -1,14 +1,8 @@ -### RPM external fakesystem 2.0 +### RPM cms fakesystem 1.0 +## REVISION 1000 ## NOCOMPILER +## NO_VERSION_SUFFIX -# Various system scripts -Provides: /bin/zsh -Provides: /bin/ksh -Provides: /bin/sed -Provides: /bin/bash -Provides: /usr/bin/awk -Provides: /usr/bin/python -Provides: /usr/bin/python3 # Various perl modules/dependencies that are needed only for specialized # scripts Provides: perl(Date::Format) @@ -21,19 +15,19 @@ Provides: perl(Tk) >= 804 Provides: perl(Tk::ROText) Provides: perl(Tk::DialogBox) Provides: perl(DBI) -# These appear to be needed by Iguana/Utilities once we moved to SLC5 -# Add them here, but why they are needed should be understood. -Provides: ld-linux.so.2(GLIBC_PRIVATE) -Provides: ld-linux-x86-64.so.2(GLIBC_PRIVATE)(64bit) -# The following are for oracle 11.2.0.1.0, which apparently needs libaio. -# Since oracle in principle is only used at CERN, don't require this -# everywhere, use instead fake provides -Provides: libaio.so.1 -Provides: libaio.so.1(LIBAIO_0.1) -Provides: libaio.so.1(LIBAIO_0.4) -Provides: libaio.so.1()(64bit) -Provides: libaio.so.1(LIBAIO_0.1)(64bit) -Provides: libaio.so.1(LIBAIO_0.4)(64bit) +Provides: perl(Carp) +Provides: perl(Cwd) +Provides: perl(Data::Dumper) +Provides: perl(Exporter) +Provides: perl(File::Path) +Provides: perl(File::Spec) +Provides: perl(File::Temp) +Provides: perl(Getopt::Long) +Provides: perl(Text::ParseWords) +Provides: perl(constant) +Provides: perl(Errno) +Provides: perl(Digest::MD5) +Provides: perl(File::Spec::Functions) %prep %build diff --git a/git.spec b/git.spec index 8cfd2c09e2a..514d14c158f 100644 --- a/git.spec +++ b/git.spec @@ -12,23 +12,6 @@ Patch1: git-2.19.0-runtime Requires: curl expat zlib pcre2 python3 BuildRequires: autotools -# Fake provides for git add --interactive -# The following are not avaialble on SLC and Darwin platforms by default -Provides: perl(SVN::Core) -Provides: perl(SVN::Delta) -Provides: perl(SVN::Ra) -Provides: perl(CGI::Carp) -Provides: perl(CGI::Util) -Provides: perl(Scalar::Util) -Provides: perl(Time::HiRes) -Provides: perl(YAML::Any) -Provides: perl(DBI) -Provides: perl(CGI) -Provides: perl(Encode) -Provides: perl(Error) -Provides: perl(Storable) -Provides: perl(Time::Local) - %define drop_files %{i}/share/man %define runpath_opts -m libexec diff --git a/madgraph5amcatnlo.spec b/madgraph5amcatnlo.spec index 0ba88f25832..356282f9fa3 100644 --- a/madgraph5amcatnlo.spec +++ b/madgraph5amcatnlo.spec @@ -1,8 +1,6 @@ ### RPM external madgraph5amcatnlo 2.7.3 %define runpath_opts -m HEPTools -m basiceventgeneration %define versiontag 2_7_3 -Provides: perl(Compress::Zlib) -Provides: perl(List::Util) Source: https://launchpad.net/mg5amcnlo/2.0/2.7.x/+download/MG5_aMC_v%{realversion}.py3.tar.gz Patch0: madgraph5amcatnlo-config #Python 3.9, use of math.gcd instead of fractions.gcd diff --git a/mysql.spec b/mysql.spec index ea3ecb9eb59..7366f3d4796 100644 --- a/mysql.spec +++ b/mysql.spec @@ -12,8 +12,6 @@ %endif Source: %source -# Let's fake the fact that we have perl (DBI) so that rpm does not complain. -Provides: perl(DBI) %prep %setup -n %n-%realversion diff --git a/python.spec b/python.spec index 1b797e0cacd..1ff1f61e7db 100644 --- a/python.spec +++ b/python.spec @@ -5,7 +5,6 @@ ## INITENV SETV PYTHONHASHSEED random # OS X patches and build fudging stolen from fink %{expand:%%define python_major_version %(echo %realversion | cut -d. -f1,2)} -Provides: python(abi) Requires: expat bz2lib db6 gdbm libffi Requires: zlib sqlite diff --git a/python3.spec b/python3.spec index 3d8aca34048..6b10ccddd4d 100644 --- a/python3.spec +++ b/python3.spec @@ -6,7 +6,6 @@ # OS X patches and build fudging stolen from fink %define pythonv %(echo %realversion | cut -d. -f 1,2) %define python_major %(echo %realversion | cut -d. -f 1) -Provides: python(abi) Requires: expat bz2lib db6 gdbm libffi zlib sqlite xz libuuid Source: https://www.python.org/ftp/python/%realversion/Python-%realversion.tgz From 51bc2725852e95a3aaba1eafc83973f597eab09c Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Thu, 4 Nov 2021 12:01:31 +0100 Subject: [PATCH 064/101] cleanup driver --- bootstrap-driver.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bootstrap-driver.spec b/bootstrap-driver.spec index cf35537b2f2..fd57d594fa1 100644 --- a/bootstrap-driver.spec +++ b/bootstrap-driver.spec @@ -41,8 +41,7 @@ packagesWithProvides="/usr/bin/python3 /usr/bin/perl /usr/bin/env /usr/bin/uname ############################## platformBuildSeeds="git patch perl make zip unzip bzip2 java-1.8.0-openjdk-devel libcom_err-devel which libXpm-devel libXft-devel mesa-libGLU-devel rsync" #Needed by autotools,go and lcov -platformBuildSeeds+=" perl-Carp perl-PathTools perl-Data-Dumper perl-Exporter perl-File-Path perl-PathTools perl-File-Temp perl-Getopt-Long perl-Text-ParseWords - perl-constant perl-PathTools perl-PathTools perl-Digest-MD5 perl-File-Path perl-PathTools perl-File-Temp perl-Getopt-Long" +platformBuildSeeds+=" perl-Carp perl-Data-Dumper perl-Digest-MD5 perl-Exporter perl-File-Path perl-File-Temp perl-Getopt-Long perl-PathTools perl-Text-ParseWords perl-constant" #needed by python build platformBuildSeeds+=" readline-devel ncurses-devel tcl-devel tk-devel" packagesWithBuildProvides="" @@ -58,10 +57,11 @@ esac case %cmsplatf in cc* ) - platformSeeds+=" libxcrypt perl-IO perl-Memoize perl-libnet perl-Term-ANSIColor perl-libs" + platformSeeds+=" libxcrypt" + #platformBuildSeeds+=" perl-IO perl-Memoize perl-libnet perl-Term-ANSIColor perl-libs" ;; slc*) - platformSeeds+=" perl-Switch" + platformBuildSeeds+=" perl-Switch" ;; esac From 55db62ba01572385a9b23c1d04d2fb8dc90e3423 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Thu, 4 Nov 2021 21:30:18 +0100 Subject: [PATCH 065/101] Update bootstrap-driver.spec --- bootstrap-driver.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bootstrap-driver.spec b/bootstrap-driver.spec index fd57d594fa1..64192e09c49 100644 --- a/bootstrap-driver.spec +++ b/bootstrap-driver.spec @@ -29,7 +29,7 @@ additionalProvides="" ############################## # Packages to seed for runtime ############################## -platformSeeds="bash tcsh bzip2-libs glibc nspr nss nss-util popt zlib glibc-devel openssl openssl-devel openssl-libs krb5-libs +platformSeeds="bash tcsh perl bzip2-libs glibc nspr nss nss-util popt zlib glibc-devel openssl openssl-devel openssl-libs krb5-libs libcom_err libX11 libXext libXft libXpm libglvnd-glx libglvnd-opengl mesa-libGLU" # Needed by python runtime platformSeeds+=" readline ncurses-libs tcl tk" @@ -57,8 +57,8 @@ esac case %cmsplatf in cc* ) - platformSeeds+=" libxcrypt" - #platformBuildSeeds+=" perl-IO perl-Memoize perl-libnet perl-Term-ANSIColor perl-libs" + platformSeeds+=" libxcrypt perl-libs perl-IO" + #platformBuildSeeds+=" perl-Memoize perl-libnet perl-Term-ANSIColor" ;; slc*) platformBuildSeeds+=" perl-Switch" From 057f0eae7206203f24d366eb15c4c74944628682 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Fri, 5 Nov 2021 10:09:01 +0100 Subject: [PATCH 066/101] Update fakesystem.spec --- fakesystem.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fakesystem.spec b/fakesystem.spec index dd0056cfa96..9c5483b755c 100644 --- a/fakesystem.spec +++ b/fakesystem.spec @@ -28,6 +28,8 @@ Provides: perl(constant) Provides: perl(Errno) Provides: perl(Digest::MD5) Provides: perl(File::Spec::Functions) +#needed by xrootd +Provides: perl(Socket) %prep %build From 661df14fcd0ba068113f0b6adf9130229685ac01 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Fri, 5 Nov 2021 10:09:13 +0100 Subject: [PATCH 067/101] Update fakesystem.spec --- fakesystem.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fakesystem.spec b/fakesystem.spec index 9c5483b755c..ce47f704ceb 100644 --- a/fakesystem.spec +++ b/fakesystem.spec @@ -1,5 +1,5 @@ ### RPM cms fakesystem 1.0 -## REVISION 1000 +## REVISION 1001 ## NOCOMPILER ## NO_VERSION_SUFFIX From 3c91fa2b27ac3c33986a028fca0e9e2fc2b91403 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Fri, 5 Nov 2021 11:43:03 +0100 Subject: [PATCH 068/101] Update fakesystem.spec --- fakesystem.spec | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/fakesystem.spec b/fakesystem.spec index ce47f704ceb..cab7fc3f133 100644 --- a/fakesystem.spec +++ b/fakesystem.spec @@ -1,35 +1,45 @@ ### RPM cms fakesystem 1.0 -## REVISION 1001 +## REVISION 1002 ## NOCOMPILER ## NO_VERSION_SUFFIX -# Various perl modules/dependencies that are needed only for specialized -# scripts -Provides: perl(Date::Format) -Provides: perl(Term::ReadKey) -Provides: perl(full) -Provides: perl(LWP::UserAgent) -Provides: perl(Template) +# Various perl modules/dependencies that are needed only for specialized scripts +# One should install these on host system to run perl part of these tools +#################################### +# Needed by autotools +#################################### +# Carp, Cwd, Data::Dumper, Errno, Exporter +# File::Path, File::Spec, File::Temp +# Getopt::Long, Text::ParseWords, constant +#################################### +# Needed by xrootd: +#################################### +# Cwd, Exporter, Socket + Provides: perl(CMSDBA) -Provides: perl(Tk) >= 804 -Provides: perl(Tk::ROText) -Provides: perl(Tk::DialogBox) -Provides: perl(DBI) Provides: perl(Carp) Provides: perl(Cwd) +Provides: perl(DBI) Provides: perl(Data::Dumper) +Provides: perl(Date::Format) +Provides: perl(Digest::MD5) +Provides: perl(Errno) Provides: perl(Exporter) Provides: perl(File::Path) Provides: perl(File::Spec) +Provides: perl(File::Spec::Functions) Provides: perl(File::Temp) Provides: perl(Getopt::Long) +Provides: perl(LWP::UserAgent) +Provides: perl(Socket) +Provides: perl(Template) +Provides: perl(Term::ReadKey) Provides: perl(Text::ParseWords) +Provides: perl(Tk) >= 804 +Provides: perl(Tk::DialogBox) +Provides: perl(Tk::ROText) Provides: perl(constant) -Provides: perl(Errno) -Provides: perl(Digest::MD5) -Provides: perl(File::Spec::Functions) -#needed by xrootd -Provides: perl(Socket) +Provides: perl(full) %prep %build From 2f4e56be2ad87995ed9c72d9374d281b04582b48 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Fri, 5 Nov 2021 12:06:21 +0100 Subject: [PATCH 069/101] Update fakesystem.spec --- fakesystem.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fakesystem.spec b/fakesystem.spec index cab7fc3f133..791214e39fd 100644 --- a/fakesystem.spec +++ b/fakesystem.spec @@ -12,7 +12,13 @@ # File::Path, File::Spec, File::Temp # Getopt::Long, Text::ParseWords, constant #################################### -# Needed by xrootd: +# Needed by git +#################################### +# Carp, Cwd, DBI, Data::Dumper, Digest::MD5, Exporter +# File::Path, File::Spec, File::Spec::Functions, File::Temp +# Getopt::Long, Text::ParseWords, constant +#################################### +# Needed by xrootd #################################### # Cwd, Exporter, Socket From bd3b7bbc43e7ff285c3ae114ed9ccf4c1edac765 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Fri, 5 Nov 2021 12:16:48 +0100 Subject: [PATCH 070/101] Update fakesystem.spec --- fakesystem.spec | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/fakesystem.spec b/fakesystem.spec index 791214e39fd..d9eaf49497d 100644 --- a/fakesystem.spec +++ b/fakesystem.spec @@ -47,6 +47,30 @@ Provides: perl(Tk::ROText) Provides: perl(constant) Provides: perl(full) +################################# +# Needed by git on SLC7 +################################# +Provides: perl(CGI) +Provides: perl(CGI::Carp) +Provides: perl(CGI::Util) +Provides: perl(Encode) +Provides: perl(SVN::Core) +Provides: perl(SVN::Delta) +Provides: perl(SVN::Ra) +Provides: perl(Scalar::Util) +Provides: perl(Storable) +Provides: perl(Time::HiRes) +Provides: perl(Time::Local) +Provides: perl(YAML::Any) + +################################# +# Needed by git on CC8 +################################# +Provides: perl(Memoize) +Provides: perl(Net::Domain) +Provides: perl(Net::SMTP) +Provides: perl(Term::ANSIColor) + %prep %build %install From 02e5d8af37bda1dc3368faa608d3c1b41bc51a5a Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Sat, 6 Nov 2021 10:27:17 +0100 Subject: [PATCH 071/101] Update fakesystem.spec --- fakesystem.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fakesystem.spec b/fakesystem.spec index d9eaf49497d..7629e940efa 100644 --- a/fakesystem.spec +++ b/fakesystem.spec @@ -63,6 +63,12 @@ Provides: perl(Time::HiRes) Provides: perl(Time::Local) Provides: perl(YAML::Any) +################################# +# Needed by madgraph5amcatnlo +################################# +Provides: perl(Compress::Zlib) +Provides: perl(List::Util) + ################################# # Needed by git on CC8 ################################# From f1a147206c2762eae50e64442a1018ca7ff3edcf Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Sat, 6 Nov 2021 10:46:38 +0100 Subject: [PATCH 072/101] Update fakesystem.spec --- fakesystem.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fakesystem.spec b/fakesystem.spec index 7629e940efa..9af7e888bfd 100644 --- a/fakesystem.spec +++ b/fakesystem.spec @@ -1,5 +1,5 @@ ### RPM cms fakesystem 1.0 -## REVISION 1002 +## REVISION 1003 ## NOCOMPILER ## NO_VERSION_SUFFIX From 2c623f5369e6c6e9ca2dd7d6d6bdccc7db126c83 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Sat, 6 Nov 2021 23:10:23 +0100 Subject: [PATCH 073/101] Update fakesystem.spec --- fakesystem.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/fakesystem.spec b/fakesystem.spec index 9af7e888bfd..32e62a9d826 100644 --- a/fakesystem.spec +++ b/fakesystem.spec @@ -1,5 +1,5 @@ ### RPM cms fakesystem 1.0 -## REVISION 1003 +## REVISION 1004 ## NOCOMPILER ## NO_VERSION_SUFFIX @@ -69,6 +69,11 @@ Provides: perl(YAML::Any) Provides: perl(Compress::Zlib) Provides: perl(List::Util) +################################# +# Needed by cmssw +################################# +Provides: perl(Switch) + ################################# # Needed by git on CC8 ################################# @@ -77,6 +82,8 @@ Provides: perl(Net::Domain) Provides: perl(Net::SMTP) Provides: perl(Term::ANSIColor) + + %prep %build %install From 1f64dece1dd2167e153bddfbf0e159073a876b55 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Sun, 7 Nov 2021 22:15:19 +0100 Subject: [PATCH 074/101] Update tensorflow.spec --- tensorflow.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/tensorflow.spec b/tensorflow.spec index 691ef3aee2c..d314f016047 100644 --- a/tensorflow.spec +++ b/tensorflow.spec @@ -4,6 +4,7 @@ %else %define source_package tensorflow-sources_%{vectorized_package} %endif +## INCLUDE tensorflow-requires BuildRequires: %{source_package} %define tf_root %(echo %{source_package}_ROOT | tr '[a-z-]' '[A-Z_]') %define tf_version %(echo %{source_package}_VERSION | tr '[a-z-]' '[A-Z_]') From 5352f0d289d8976138febd21e09fcc5b5c4500ed Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Mon, 8 Nov 2021 10:12:37 +0100 Subject: [PATCH 075/101] updated for GCC 10.3.1 --- gcc.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc.spec b/gcc.spec index 52290f8f6c9..69096efe1c8 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,11 +1,11 @@ -### RPM external gcc 11.2.1 +### RPM external gcc 10.3.1 ## USE_COMPILER_VERSION ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 # Use the git repository for fetching the sources. This gives us more control while developing # a new platform so that we can compile yet to be released versions of the compiler. # See: https://gcc.gnu.org/viewcvs/gcc/branches/gcc-8-branch/?view=log -%define gccTag a0a0499b8bb920fdd98e791804812f001f0b4fe8 -%define gccBranch releases/gcc-11 +%define gccTag 4f024c99a05f1c6852d1e5daad4a172f4cdd24a1 +%define gccBranch releases/gcc-10 %define moduleName %{n}-%{realversion} Source0: git+https://github.com/gcc-mirror/%{n}.git?obj=%{gccBranch}/%{gccTag}&export=%{moduleName}&output=/%{n}-%{realversion}-%{gccTag}.tgz From f1aebb401407b9c3cd4109fb4ba219e6116597e0 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Tue, 9 Nov 2021 07:29:37 +0100 Subject: [PATCH 076/101] use old gcc 10 commit --- gcc-103-substitution-bug-fix.patch | 78 ++++++++++++++++++++++++++++++ gcc.spec | 6 ++- 2 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 gcc-103-substitution-bug-fix.patch diff --git a/gcc-103-substitution-bug-fix.patch b/gcc-103-substitution-bug-fix.patch new file mode 100644 index 00000000000..9059d07b1e1 --- /dev/null +++ b/gcc-103-substitution-bug-fix.patch @@ -0,0 +1,78 @@ +--- a/gcc/cp/pt.c ++++ b/gcc/cp/pt.c +@@ -13750,45 +13750,6 @@ tsubst_function_decl (tree t, tree args, tsubst_flags_t complain, + if (tree spec = retrieve_specialization (gen_tmpl, argvec, hash)) + return spec; + } +- +- /* We can see more levels of arguments than parameters if +- there was a specialization of a member template, like +- this: +- +- template struct S { template void f(); } +- template <> template void S::f(U); +- +- Here, we'll be substituting into the specialization, +- because that's where we can find the code we actually +- want to generate, but we'll have enough arguments for +- the most general template. +- +- We also deal with the peculiar case: +- +- template struct S { +- template friend void f(); +- }; +- template void f() {} +- template S; +- template void f(); +- +- Here, the ARGS for the instantiation of will be {int, +- double}. But, we only need as many ARGS as there are +- levels of template parameters in CODE_PATTERN. We are +- careful not to get fooled into reducing the ARGS in +- situations like: +- +- template struct S { template void f(U); } +- template template <> void S::f(int) {} +- +- which we can spot because the pattern will be a +- specialization in this case. */ +- int args_depth = TMPL_ARGS_DEPTH (args); +- int parms_depth = +- TMPL_PARMS_DEPTH (DECL_TEMPLATE_PARMS (DECL_TI_TEMPLATE (t))); +- +- if (args_depth > parms_depth && !DECL_TEMPLATE_SPECIALIZATION (t)) +- args = get_innermost_template_args (args, parms_depth); + } + else + { +diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C +new file mode 100644 +index 00000000000..8009756dcba +--- /dev/null ++++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C +@@ -0,0 +1,9 @@ ++// PR c++/100102 ++// { dg-do compile { target c++11 } } ++ ++template struct ratio; ++template struct duration { ++ static constexpr int _S_gcd(); ++ template using __is_harmonic = ratio<_S_gcd>; ++ using type = __is_harmonic; ++}; +diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C +new file mode 100644 +index 00000000000..a4443e18f9d +--- /dev/null ++++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C +@@ -0,0 +1,9 @@ ++// PR c++/100102 ++// { dg-do compile { target c++11 } } ++ ++template struct ratio; ++template struct duration { ++ static constexpr int _S_gcd(); ++ template using __is_harmonic = ratio<(duration::_S_gcd)()>; ++ using type = __is_harmonic; ++}; diff --git a/gcc.spec b/gcc.spec index 69096efe1c8..e4bb9f70054 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,10 +1,10 @@ -### RPM external gcc 10.3.1 +### RPM external gcc 10.3.0 ## USE_COMPILER_VERSION ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 # Use the git repository for fetching the sources. This gives us more control while developing # a new platform so that we can compile yet to be released versions of the compiler. # See: https://gcc.gnu.org/viewcvs/gcc/branches/gcc-8-branch/?view=log -%define gccTag 4f024c99a05f1c6852d1e5daad4a172f4cdd24a1 +%define gccTag f00b5710a30f22efc3171c393e56aeb335c3cd39 %define gccBranch releases/gcc-10 %define moduleName %{n}-%{realversion} @@ -38,10 +38,12 @@ Source11: https://github.com/westes/flex/releases/download/v%{flexVersion}/flex- Patch0: gcc-flex-nonfull-path-m4 Patch1: gcc-flex-disable-doc +Patch2: gcc-103-substitution-bug-fix %prep %setup -T -b 0 -n %{moduleName} +%patch2 -p1 # Filter out private stuff from RPM requires headers. cat << \EOF > %{name}-req From cf9b4b6474c70c135b00055ac049a82a30289414 Mon Sep 17 00:00:00 2001 From: iarspider Date: Mon, 15 Nov 2021 16:43:03 +0100 Subject: [PATCH 077/101] Update sqlite to 3.36.0 --- sqlite.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sqlite.spec b/sqlite.spec index 43c1a968c43..a916c3df28c 100644 --- a/sqlite.spec +++ b/sqlite.spec @@ -1,8 +1,8 @@ -### RPM external sqlite 3.22.0 -Source: https://www.sqlite.org/2018/sqlite-autoconf-3220000.tar.gz +### RPM external sqlite 3.36.0 +Source: https://www.sqlite.org/2021/sqlite-autoconf-3360000.tar.gz %prep -%setup -n sqlite-autoconf-3220000 +%setup -n sqlite-autoconf-3360000 %build ./configure --build="%{_build}" --host="%{_host}" --prefix=%{i} \ From ee14abc48249e0470cfbd0ba1743361997d9191e Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Sat, 27 Nov 2021 22:58:40 +0100 Subject: [PATCH 078/101] fix for cs8 --- bootstrap-driver.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-driver.spec b/bootstrap-driver.spec index 64192e09c49..9519bd912b0 100644 --- a/bootstrap-driver.spec +++ b/bootstrap-driver.spec @@ -56,7 +56,7 @@ case %cmsplatf in esac case %cmsplatf in -cc* ) +cc*|cs* ) platformSeeds+=" libxcrypt perl-libs perl-IO" #platformBuildSeeds+=" perl-Memoize perl-libnet perl-Term-ANSIColor" ;; From e987a59de74de00b1438d053bdd200b13f783300 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Sun, 28 Nov 2021 00:14:37 +0100 Subject: [PATCH 079/101] sync changes from IB/CMSSW_12_2_X/g11 --- archive/graphviz.spec | 15 +++---- bootstrap-driver.spec | 13 ++---- cmsos.file | 23 +++------- coral.spec | 15 +------ fastjet.spec | 10 +++-- fftw3.spec | 9 +--- gcc.spec | 53 ++++++----------------- rivet.spec | 4 -- rpm-preamble.file | 3 -- rpm.spec | 29 +++++-------- scram-tools.file/tools/pythia6/pydata.xml | 2 +- sherpa.spec | 16 +++---- tkonlinesw.spec | 33 +++++--------- zlib.spec | 18 +++----- 14 files changed, 73 insertions(+), 170 deletions(-) mode change 100644 => 100755 cmsos.file diff --git a/archive/graphviz.spec b/archive/graphviz.spec index 895d4bfb0ff..6486a2c7202 100644 --- a/archive/graphviz.spec +++ b/archive/graphviz.spec @@ -23,14 +23,11 @@ do done %build -case %cmsplatf in - slc*|fc*|cc*) +%ifnos darwin ADDITIONAL_OPTIONS="--with-freetype2=no --disable-shared --enable-static --disable-ltdl" - ;; - osx*) +%else ADDITIONAL_OPTIONS="--with-freetype2=no" - ;; -esac +%endif ./configure \ --disable-silent-rules \ --with-expatlibdir=$EXPAT_ROOT/lib \ @@ -76,10 +73,8 @@ make install rm -rf %{i}/lib/pkgconfig # To match configure options above -case %{cmsplatf} in - slc*|fc*|cc*) +%ifnos darwin ln -s dot_static %{i}/bin/dot - ;; -esac +%endif # Drop static libraries. rm -rf %{i}/lib/*.{l,}a diff --git a/bootstrap-driver.spec b/bootstrap-driver.spec index 9519bd912b0..6fa8d99f54a 100644 --- a/bootstrap-driver.spec +++ b/bootstrap-driver.spec @@ -46,19 +46,14 @@ platformBuildSeeds+=" perl-Carp perl-Data-Dumper perl-Digest-MD5 perl-Exporter p platformBuildSeeds+=" readline-devel ncurses-devel tcl-devel tk-devel" packagesWithBuildProvides="" -case %cmsplatf in -*_aarch64_* ) - ;; -*) - # Needed by oracle - platformSeeds+=" libaio" - ;; -esac +%ifnarch aarch64 +# Needed by oracle +platformSeeds+=" libaio" +%endif case %cmsplatf in cc*|cs* ) platformSeeds+=" libxcrypt perl-libs perl-IO" - #platformBuildSeeds+=" perl-Memoize perl-libnet perl-Term-ANSIColor" ;; slc*) platformBuildSeeds+=" perl-Switch" diff --git a/cmsos.file b/cmsos.file old mode 100644 new mode 100755 index 79c25cf029c..c0e7202dce2 --- a/cmsos.file +++ b/cmsos.file @@ -29,7 +29,13 @@ cmsos() else os="slc" if egrep -q "CentOS" /etc/redhat-release 2>/dev/null; then - if [ ${slc_version} -gt 7 ] ; then os="cc" ; fi + if [ ${slc_version} -gt 7 ] ; then + if egrep -q " Stream " /etc/redhat-release 2>/dev/null; then + os="cs" + else + os="cc" + fi + fi fi echo ${os}${slc_version}_${cpuarch} fi @@ -71,19 +77,4 @@ cmsos() fi } -defaultCompiler() -{ - case `cmsos` in - slc4* ) echo gcc345 ;; - slc5* ) echo gcc432 ;; - slc6* ) echo gcc630 ;; - slc7* ) echo gcc820 ;; - cc* ) echo gcc8 ;; - osx104* ) echo gcc400 ;; - osx105* ) echo gcc401 ;; - osx106* ) echo gcc421 ;; - * ) echo gcc345 ;; - esac -} - cmsos diff --git a/coral.spec b/coral.spec index 4486a9cd321..935ac9f5281 100644 --- a/coral.spec +++ b/coral.spec @@ -7,19 +7,6 @@ Patch0: coral-2_3_20-macosx Patch1: coral-2_3_21-gcc8 Requires: coral-tool-conf -%if %(case %{cmsplatf} in (*_aarch64_*) echo 1 ;; (*) echo 0 ;; esac) == 1 -%define cmsplatf_aarch64 1 -%endif - -%if %(case %{cmsplatf} in (*_ppc64le_*) echo 1 ;; (*) echo 0 ;; esac) == 1 -%define cmsplatf_ppc64le 1 -%endif - -%if %(case %{cmsplatf} in (*_ppc64_*) echo 1 ;; (*) echo 0 ;; esac) == 1 -%define cmsplatf_ppc64 1 -%endif - - %define cvssrc %{n} # Build with debug symbols, and package them in a separate rpm: @@ -33,7 +20,7 @@ Requires: coral-tool-conf # Drop Oracle interface on ARM machines and POWER machines. # Oracle does not provide Instant Client for ARMv8 or POWER8. -%if 0%{?cmsplatf_aarch64}%{?cmsplatf_ppc64le}%{?cmsplatf_ppc64} +%ifnarch x86_64 %define patchsrc2 rm -rf ./src/OracleAccess %endif %define patchsrc4 %patch1 -p1 diff --git a/fastjet.spec b/fastjet.spec index 3c97087565d..15e8f861c8d 100644 --- a/fastjet.spec +++ b/fastjet.spec @@ -23,10 +23,12 @@ cp ./config.guess ./plugins/SISCone/siscone/config.guess CXXFLAGS="-O3 -Wall -ffast-math -ftree-vectorize" -case %{cmsplatf} in - *_amd64_*) CXXFLAGS="${CXXFLAGS} -msse3" ;; - *_ppc64le_*) CXXFLAGS="${CXXFLAGS} %{ppc64le_build_flags}" ;; -esac +%ifarch x86_64 +CXXFLAGS="${CXXFLAGS} -msse3" +%endif +%ifarch ppc64le +CXXFLAGS="${CXXFLAGS} %{ppc64le_build_flags}" +$endif PYTHON=$(which python3) \ ./configure \ diff --git a/fftw3.spec b/fftw3.spec index c2883e5635a..346216fb8c8 100644 --- a/fftw3.spec +++ b/fftw3.spec @@ -9,14 +9,9 @@ CONFIG_ARGS="--with-pic --enable-shared --enable-threads --disable-fortran --disable-dependency-tracking --disable-mpi --disable-openmp --prefix=%{i} --build=%{_build} --host=%{_host}" -case "%{cmsplatf}" in - *amd64*) +%ifarch x86_64 CONFIG_ARGS="${CONFIG_ARGS} --enable-sse2" - ;; -# *armv7hl*) -# CONFIG_ARGS="${CONFIG_ARGS} --enable-neon --enable-float" -# ;; -esac +%endif ./configure ${CONFIG_ARGS} diff --git a/gcc.spec b/gcc.spec index e4bb9f70054..c46f1b19a91 100644 --- a/gcc.spec +++ b/gcc.spec @@ -131,19 +131,11 @@ export PATH=%{i}/tmp/sw/bin:$PATH # Build zlib (required for compressed debug information) cd ../zlib-%{zlibVersion} -case %{cmsplatf} in - *_amd64_*) - CFLAGS="-fPIC -O3 -DUSE_MMAP -DUNALIGNED_OK -D_LARGEFILE64_SOURCE=1 -msse3" \ - ./configure --static --prefix=%{i}/tmp/sw - ;; - *_aarch64_*|*_ppc64le_*|*_ppc64_*) - CFLAGS="-fPIC -O3 -DUSE_MMAP -DUNALIGNED_OK -D_LARGEFILE64_SOURCE=1" \ - ./configure --static --prefix=%{i}/tmp/sw - ;; - *) - ./configure --static --prefix=%{i}/tmp/sw - ;; -esac +CONF_FLAGS="-fPIC -O3 -DUSE_MMAP -DUNALIGNED_OK -D_LARGEFILE64_SOURCE=1" +%ifarch x86_64 +CONF_FLAGS="${CONF_FLAGS} -msse3" +%endif +CFLAGS="${CONF_FLAGS}" ./configure --static --prefix=%{i}/tmp/sw make %{makeprocesses} make install @@ -151,14 +143,8 @@ make install CONF_BINUTILS_OPTS="--enable-ld=default --enable-lto --enable-plugins --enable-threads" CONF_GCC_WITH_LTO="--enable-ld=default --enable-lto" -case "%{cmsplatf}" in - *_ppc64_*) - ;; - *) - CONF_BINUTILS_OPTS="$CONF_BINUTILS_OPTS --enable-gold=yes" - CONF_GCC_WITH_LTO="$CONF_GCC_WITH_LTO --enable-gold=yes" - ;; -esac + CONF_BINUTILS_OPTS="$CONF_BINUTILS_OPTS --enable-gold=yes" + CONF_GCC_WITH_LTO="$CONF_GCC_WITH_LTO --enable-gold=yes" # Build M4 (for building) cd ../m4-%{m4Version} @@ -204,14 +190,9 @@ esac make %{makeprocesses} make install -case %{cmsplatf} in - *_ppc64le_*) +%ifarch ppc64le CONF_BINUTILS_OPTS="${CONF_BINUTILS_OPTS} --enable-targets=spu --enable-targets=powerpc-linux" - ;; - *_ppc64_*) - CONF_BINUTILS_OPTS="${CONF_BINUTILS_OPTS} --enable-targets=spu" - ;; -esac +%endif # Build binutils cd ../binutils-%{binutilsVersion} @@ -257,24 +238,16 @@ make %{makeprocesses} make install CONF_GCC_ARCH_SPEC= -case %{cmsplatf} in - *_aarch64_*) +%ifarch aarch64 CONF_GCC_ARCH_SPEC="$CONF_GCC_ARCH_SPEC \ --enable-threads=posix --enable-initfini-array --disable-libmpx" - ;; - *_ppc64le_*) +%endif +%ifarch ppc64le CONF_GCC_ARCH_SPEC="$CONF_GCC_ARCH_SPEC \ --enable-threads=posix --enable-initfini-array \ --enable-targets=powerpcle-linux --enable-secureplt --with-long-double-128 \ --with-cpu=power8 --with-tune=power8 --disable-libmpx" - ;; - *_ppc64_*) - CONF_GCC_ARCH_SPEC="$CONF_GCC_ARCH_SPEC \ - --enable-threads=posix --enable-initfini-array \ - --enable-secureplt --with-long-double-128 \ - --with-cpu=power7 --with-tune=power7 --disable-libmpx" - ;; -esac +%endif # Build GCC cd ../%{moduleName} diff --git a/rivet.spec b/rivet.spec index 6d63099f13d..e019fb9fa27 100644 --- a/rivet.spec +++ b/rivet.spec @@ -30,10 +30,6 @@ do chmod +x $CONFIG_SUB_FILE done -case %{cmsplatf} in - slc6*) sed -i -e 's#^ *OPENMP_CXXFLAGS=.*#OPENMP_CXXFLAGS=#' configure ;; -esac - autoreconf -fiv #disable building Rivet with OpenMP as it crash executables due to static TLS blocks diff --git a/rpm-preamble.file b/rpm-preamble.file index de9517173c1..2ecaabf1f07 100644 --- a/rpm-preamble.file +++ b/rpm-preamble.file @@ -261,9 +261,6 @@ fi %define get_config_guess() curl -L -k -s -o %1 http://cmsrep.cern.ch/cmssw/download/config/config.guess %define get_config_sub() curl -L -k -s -o %1 http://cmsrep.cern.ch/cmssw/download/config/config.sub -#Some help macros to check for OS and ARCH -%define isslc %(case %{cmsos} in (slc*|cc*) echo 1 ;; (*) echo 0 ;; esac) - #Use the following without {} e.g 'isos cc*' instead of '{isos} cc*' %define is_cmsos() %(case %{cmsos} in (%{1}_*) echo 1 ;; (*) echo 0 ;; esac) %define is_ncmsos() %(case %{cmsos} in (%{1}_*) echo 0 ;; (*) echo 1 ;; esac) diff --git a/rpm.spec b/rpm.spec index 07480daef6e..3201dda6098 100644 --- a/rpm.spec +++ b/rpm.spec @@ -23,23 +23,18 @@ BuildRequires: bootstrap-bundle patchelf-bootstrap # Reconfigure to drop pkg-config for lua autoreconf -fiv -case %cmsplatf in - slc*_amd64|cc*_amd64) - CFLAGS_PLATF="-fPIC" - LIBS_PLATF="-ldl" - ;; - slc*_aarch64_*|fc*) - CFLAGS_PLATF="-fPIC" - LIBS_PLATF="-ldl -lrt -pthread" - ;; - osx*) - export CFLAGS_PLATF="-arch x86_64 -fPIC -D_FORTIFY_SOURCE=0" - export LIBS_PLATF="-liconv" - ;; - *) - export CFLAGS_PLATF="-fPIC" - ;; -esac +CFLAGS_PLATF="-fPIC" +%ifos darwin +CFLAGS_PLATF="-arch x86_64 -fPIC -D_FORTIFY_SOURCE=0" +export LIBS_PLATF="-liconv" +%else +%ifarch aarch64 +LIBS_PLATF="-ldl -lrt -pthread" +%endif +%ifarch x86_64 +LIBS_PLATF="-ldl" +%endif +%endif USER_CFLAGS="-ggdb -O0" USER_CXXFLAGS="-ggdb -O0" diff --git a/scram-tools.file/tools/pythia6/pydata.xml b/scram-tools.file/tools/pythia6/pydata.xml index f0801817b93..344fd965162 100644 --- a/scram-tools.file/tools/pythia6/pydata.xml +++ b/scram-tools.file/tools/pythia6/pydata.xml @@ -2,7 +2,7 @@ - + diff --git a/sherpa.spec b/sherpa.spec index aa379755716..15f900083a8 100644 --- a/sherpa.spec +++ b/sherpa.spec @@ -19,17 +19,13 @@ Requires: openloops autoreconf -i --force # Force architecture based on %%cmsplatf -case %cmsplatf in - *_amd64_gcc*) ARCH_CMSPLATF="-m64" ;; -esac +%ifarch x86_64 + ARCH_CMSPLATF="-m64" +%endif -case %cmsplatf in - osx*) - perl -p -i -e 's|-rdynamic||g' \ - configure \ - AddOns/Analysis/Scripts/Makefile.in - ;; -esac +%ifos darwin +perl -p -i -e 's|-rdynamic||g' configure AddOns/Analysis/Scripts/Makefile.in +%endif %patch0 -p1 diff --git a/tkonlinesw.spec b/tkonlinesw.spec index b6ed1ccaab2..15db6309261 100644 --- a/tkonlinesw.spec +++ b/tkonlinesw.spec @@ -74,16 +74,13 @@ export ENV_CMS_TK_TTC_ROOT=%{i}/dummy/Linux ################################################################################ # External Dependencies ################################################################################ -case %cmsos in - slc*|cc*) +%ifnos darwin export XDAQ_OS=linux export XDAQ_PLATFORM=x86_slc4 - ;; - osx*) +%else export XDAQ_OS=macosx export XDAQ_PLATFORM=x86_slc4 - ;; -esac +%endif export ENV_CMS_TK_ORACLE_HOME=${ORACLE_ROOT} export ENV_ORACLE_HOME=${ORACLE_ROOT} @@ -93,29 +90,24 @@ export XDAQ_ROOT ################################################################################ # Configure ################################################################################ -case %cmsos in - slc*|cc*) +%ifnos darwin chmod +x ./configure && ./configure --with-xdaq-platform=x86_64 cd ${ENV_CMS_TK_FEC_ROOT} && chmod +x ./configure && ./configure --with-xdaq-platform=x86_64 && cd - cd ${ENV_CMS_TK_FED9U_ROOT} && chmod +x ./configure && ./configure --with-xdaq-platform=x86_64 && cd - - ;; - osx*) +%else chmod +x ./configure && ./configure cd ${ENV_CMS_TK_FEC_ROOT} && chmod +x ./configure && ./configure && cd - cd ${ENV_CMS_TK_FED9U_ROOT} && chmod +x ./configure && ./configure && cd - - ;; -esac +%endif # The CPPFLAGS is probably not needed. Clean up at some point. export CPPFLAGS="-fPIC" export CFLAGS="-O2 -fPIC" export CXXFLAGS="-O2 -fPIC" -case %cmsos in - slc*|cc*) +%ifnos darwin make cmssw make cmsswinstall - ;; - osx*) +%else # We still need the old makefile to generate a few headers. make -C TrackerOnline/Fed9U/Fed9USoftware/Fed9UUtils include/Fed9UUtils.hh make -C TrackerOnline/Fed9U/Fed9USoftware Fed9UUtils/include/Fed9UVersion.inc @@ -132,14 +124,11 @@ case %cmsos in -DXERCESC=2 -DCMAKE_INSTALL_PREFIX=%i make %makeprocesses make install - ;; -esac +%endif %install # Again, installing is actually done by make install on macosx. -case %cmsos in - slc*|cc*) +%ifos linux # Option --prefix in configure is not working yet, using tar: tar -c -C %{_builddir}/%{releasename}/opt/%{projectname} include lib | tar -x -C %{i} - ;; -esac +%endif diff --git a/zlib.spec b/zlib.spec index 837e0d54b6a..be51ba37c9e 100644 --- a/zlib.spec +++ b/zlib.spec @@ -15,19 +15,11 @@ Source0: git://github.com/%{git_repo}/zlib.git?obj=%{git_branch}/%{git_commit}&e %build -case %{cmsplatf} in - *_amd64_*|*_mic_*) - CFLAGS="-fPIC -O3 -DUSE_MMAP -DUNALIGNED_OK -D_LARGEFILE64_SOURCE=1 -msse3" \ - ./configure --prefix=%{i} - ;; - *_armv7hl_*|*_aarch64_*|*_ppc64le_*|*_ppc64_*) - CFLAGS="-fPIC -O3 -DUSE_MMAP -DUNALIGNED_OK -D_LARGEFILE64_SOURCE=1" \ - ./configure --prefix=%{i} - ;; - *) - ./configure --prefix=%{i} - ;; -esac +CONF_FLAGS="-fPIC -O3 -DUSE_MMAP -DUNALIGNED_OK -D_LARGEFILE64_SOURCE=1" +%ifarch x86_64 +CONF_FLAGS="${CONF_FLAGS} msse3" +%endif +CFLAGS=${CONF_FLAGS} ./configure --prefix=%{i} make %{makeprocesses} From 43f7f9f64a8cb1f7a0c6837a196b08eb232512f9 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Sun, 28 Nov 2021 10:44:30 +0100 Subject: [PATCH 080/101] Update zlib.spec --- zlib.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zlib.spec b/zlib.spec index be51ba37c9e..4678ec3c38c 100644 --- a/zlib.spec +++ b/zlib.spec @@ -19,7 +19,7 @@ CONF_FLAGS="-fPIC -O3 -DUSE_MMAP -DUNALIGNED_OK -D_LARGEFILE64_SOURCE=1" %ifarch x86_64 CONF_FLAGS="${CONF_FLAGS} msse3" %endif -CFLAGS=${CONF_FLAGS} ./configure --prefix=%{i} +CFLAGS="${CONF_FLAGS}" ./configure --prefix=%{i} make %{makeprocesses} From a4e0ba4e0f21ef5dd885c7377b02bc8a1f11071e Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Sun, 28 Nov 2021 10:50:16 +0100 Subject: [PATCH 081/101] update to Gcc 11.2.1 --- gcc-103-substitution-bug-fix.patch | 78 ------------------------------ gcc.spec | 8 ++- 2 files changed, 3 insertions(+), 83 deletions(-) delete mode 100644 gcc-103-substitution-bug-fix.patch diff --git a/gcc-103-substitution-bug-fix.patch b/gcc-103-substitution-bug-fix.patch deleted file mode 100644 index 9059d07b1e1..00000000000 --- a/gcc-103-substitution-bug-fix.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- a/gcc/cp/pt.c -+++ b/gcc/cp/pt.c -@@ -13750,45 +13750,6 @@ tsubst_function_decl (tree t, tree args, tsubst_flags_t complain, - if (tree spec = retrieve_specialization (gen_tmpl, argvec, hash)) - return spec; - } -- -- /* We can see more levels of arguments than parameters if -- there was a specialization of a member template, like -- this: -- -- template struct S { template void f(); } -- template <> template void S::f(U); -- -- Here, we'll be substituting into the specialization, -- because that's where we can find the code we actually -- want to generate, but we'll have enough arguments for -- the most general template. -- -- We also deal with the peculiar case: -- -- template struct S { -- template friend void f(); -- }; -- template void f() {} -- template S; -- template void f(); -- -- Here, the ARGS for the instantiation of will be {int, -- double}. But, we only need as many ARGS as there are -- levels of template parameters in CODE_PATTERN. We are -- careful not to get fooled into reducing the ARGS in -- situations like: -- -- template struct S { template void f(U); } -- template template <> void S::f(int) {} -- -- which we can spot because the pattern will be a -- specialization in this case. */ -- int args_depth = TMPL_ARGS_DEPTH (args); -- int parms_depth = -- TMPL_PARMS_DEPTH (DECL_TEMPLATE_PARMS (DECL_TI_TEMPLATE (t))); -- -- if (args_depth > parms_depth && !DECL_TEMPLATE_SPECIALIZATION (t)) -- args = get_innermost_template_args (args, parms_depth); - } - else - { -diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C -new file mode 100644 -index 00000000000..8009756dcba ---- /dev/null -+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C -@@ -0,0 +1,9 @@ -+// PR c++/100102 -+// { dg-do compile { target c++11 } } -+ -+template struct ratio; -+template struct duration { -+ static constexpr int _S_gcd(); -+ template using __is_harmonic = ratio<_S_gcd>; -+ using type = __is_harmonic; -+}; -diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C -new file mode 100644 -index 00000000000..a4443e18f9d ---- /dev/null -+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C -@@ -0,0 +1,9 @@ -+// PR c++/100102 -+// { dg-do compile { target c++11 } } -+ -+template struct ratio; -+template struct duration { -+ static constexpr int _S_gcd(); -+ template using __is_harmonic = ratio<(duration::_S_gcd)()>; -+ using type = __is_harmonic; -+}; diff --git a/gcc.spec b/gcc.spec index c46f1b19a91..667240b16b0 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,11 +1,11 @@ -### RPM external gcc 10.3.0 +### RPM external gcc 11.2.1 ## USE_COMPILER_VERSION ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 # Use the git repository for fetching the sources. This gives us more control while developing # a new platform so that we can compile yet to be released versions of the compiler. # See: https://gcc.gnu.org/viewcvs/gcc/branches/gcc-8-branch/?view=log -%define gccTag f00b5710a30f22efc3171c393e56aeb335c3cd39 -%define gccBranch releases/gcc-10 +%define gccTag a0a0499b8bb920fdd98e791804812f001f0b4fe8 +%define gccBranch releases/gcc-11 %define moduleName %{n}-%{realversion} Source0: git+https://github.com/gcc-mirror/%{n}.git?obj=%{gccBranch}/%{gccTag}&export=%{moduleName}&output=/%{n}-%{realversion}-%{gccTag}.tgz @@ -38,12 +38,10 @@ Source11: https://github.com/westes/flex/releases/download/v%{flexVersion}/flex- Patch0: gcc-flex-nonfull-path-m4 Patch1: gcc-flex-disable-doc -Patch2: gcc-103-substitution-bug-fix %prep %setup -T -b 0 -n %{moduleName} -%patch2 -p1 # Filter out private stuff from RPM requires headers. cat << \EOF > %{name}-req From 0008f91760d54190b7d51f979c55074a4735fa74 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Sun, 28 Nov 2021 12:38:22 +0100 Subject: [PATCH 082/101] fiz zlib flags --- zlib.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zlib.spec b/zlib.spec index 4678ec3c38c..75cc13f79a6 100644 --- a/zlib.spec +++ b/zlib.spec @@ -17,7 +17,7 @@ Source0: git://github.com/%{git_repo}/zlib.git?obj=%{git_branch}/%{git_commit}&e CONF_FLAGS="-fPIC -O3 -DUSE_MMAP -DUNALIGNED_OK -D_LARGEFILE64_SOURCE=1" %ifarch x86_64 -CONF_FLAGS="${CONF_FLAGS} msse3" +CONF_FLAGS="${CONF_FLAGS} -msse3" %endif CFLAGS="${CONF_FLAGS}" ./configure --prefix=%{i} From e69fc4412f3c65530ba3fe0fd37f1232341d17cb Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Sun, 28 Nov 2021 21:14:12 +0100 Subject: [PATCH 083/101] typo --- fastjet.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastjet.spec b/fastjet.spec index 15e8f861c8d..00a08571713 100644 --- a/fastjet.spec +++ b/fastjet.spec @@ -28,7 +28,7 @@ CXXFLAGS="${CXXFLAGS} -msse3" %endif %ifarch ppc64le CXXFLAGS="${CXXFLAGS} %{ppc64le_build_flags}" -$endif +%endif PYTHON=$(which python3) \ ./configure \ From 12d55a008fc4f8208f940c91312d1b668dd9c9b4 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Wed, 15 Dec 2021 11:54:30 +0100 Subject: [PATCH 084/101] revert gcc10 changes --- gcc-103-substitution-bug-fix.patch | 78 ------------------------------ gcc.spec | 2 - 2 files changed, 80 deletions(-) delete mode 100644 gcc-103-substitution-bug-fix.patch diff --git a/gcc-103-substitution-bug-fix.patch b/gcc-103-substitution-bug-fix.patch deleted file mode 100644 index 9059d07b1e1..00000000000 --- a/gcc-103-substitution-bug-fix.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- a/gcc/cp/pt.c -+++ b/gcc/cp/pt.c -@@ -13750,45 +13750,6 @@ tsubst_function_decl (tree t, tree args, tsubst_flags_t complain, - if (tree spec = retrieve_specialization (gen_tmpl, argvec, hash)) - return spec; - } -- -- /* We can see more levels of arguments than parameters if -- there was a specialization of a member template, like -- this: -- -- template struct S { template void f(); } -- template <> template void S::f(U); -- -- Here, we'll be substituting into the specialization, -- because that's where we can find the code we actually -- want to generate, but we'll have enough arguments for -- the most general template. -- -- We also deal with the peculiar case: -- -- template struct S { -- template friend void f(); -- }; -- template void f() {} -- template S; -- template void f(); -- -- Here, the ARGS for the instantiation of will be {int, -- double}. But, we only need as many ARGS as there are -- levels of template parameters in CODE_PATTERN. We are -- careful not to get fooled into reducing the ARGS in -- situations like: -- -- template struct S { template void f(U); } -- template template <> void S::f(int) {} -- -- which we can spot because the pattern will be a -- specialization in this case. */ -- int args_depth = TMPL_ARGS_DEPTH (args); -- int parms_depth = -- TMPL_PARMS_DEPTH (DECL_TEMPLATE_PARMS (DECL_TI_TEMPLATE (t))); -- -- if (args_depth > parms_depth && !DECL_TEMPLATE_SPECIALIZATION (t)) -- args = get_innermost_template_args (args, parms_depth); - } - else - { -diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C -new file mode 100644 -index 00000000000..8009756dcba ---- /dev/null -+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C -@@ -0,0 +1,9 @@ -+// PR c++/100102 -+// { dg-do compile { target c++11 } } -+ -+template struct ratio; -+template struct duration { -+ static constexpr int _S_gcd(); -+ template using __is_harmonic = ratio<_S_gcd>; -+ using type = __is_harmonic; -+}; -diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C -new file mode 100644 -index 00000000000..a4443e18f9d ---- /dev/null -+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C -@@ -0,0 +1,9 @@ -+// PR c++/100102 -+// { dg-do compile { target c++11 } } -+ -+template struct ratio; -+template struct duration { -+ static constexpr int _S_gcd(); -+ template using __is_harmonic = ratio<(duration::_S_gcd)()>; -+ using type = __is_harmonic; -+}; diff --git a/gcc.spec b/gcc.spec index 28c6846a6ca..667240b16b0 100644 --- a/gcc.spec +++ b/gcc.spec @@ -38,12 +38,10 @@ Source11: https://github.com/westes/flex/releases/download/v%{flexVersion}/flex- Patch0: gcc-flex-nonfull-path-m4 Patch1: gcc-flex-disable-doc -Patch2: gcc-103-substitution-bug-fix %prep %setup -T -b 0 -n %{moduleName} -%patch2 -p1 # Filter out private stuff from RPM requires headers. cat << \EOF > %{name}-req From d8000cf3458270272f12cd59847b3ea1956ff921 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Wed, 17 Aug 2022 09:16:59 +0200 Subject: [PATCH 085/101] build vecgeom with default flags i.e. drop explicit -O2 for gcc11 and above --- vecgeom.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vecgeom.spec b/vecgeom.spec index 23d7f3edda8..0061409f8ee 100644 --- a/vecgeom.spec +++ b/vecgeom.spec @@ -24,7 +24,7 @@ cmake ../%{n}-%{realversion} \ -DCMAKE_AR=$(which gcc-ar) \ -DCMAKE_RANLIB=$(which gcc-ranlib) \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_CXX_FLAGS_RELEASE="-O2 -DNDEBUG" \ + -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \ -DNO_SPECIALIZATION=ON \ -DBACKEND=Scalar \ %ifarch x86_64 From 742bc28aa321893250d9036fc948e641a39effb6 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Thu, 18 Aug 2022 12:19:19 +0200 Subject: [PATCH 086/101] [vecgeom][gcc11] drop CMAKE_CXX_FLAGS_RELEASE to let veccgeom use its default flags --- vecgeom.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/vecgeom.spec b/vecgeom.spec index 0061409f8ee..b3478ffada7 100644 --- a/vecgeom.spec +++ b/vecgeom.spec @@ -24,7 +24,6 @@ cmake ../%{n}-%{realversion} \ -DCMAKE_AR=$(which gcc-ar) \ -DCMAKE_RANLIB=$(which gcc-ranlib) \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \ -DNO_SPECIALIZATION=ON \ -DBACKEND=Scalar \ %ifarch x86_64 From 1a9550e6cac5b6fbad226b6ebe76dd3ebe8812b4 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Thu, 18 Aug 2022 12:23:46 +0200 Subject: [PATCH 087/101] Update vecgeom.spec --- vecgeom.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vecgeom.spec b/vecgeom.spec index b3478ffada7..385341d35e6 100644 --- a/vecgeom.spec +++ b/vecgeom.spec @@ -36,11 +36,11 @@ cmake ../%{n}-%{realversion} \ %endif -DGEANT4=OFF -make %{makeprocesses} +make %{makeprocesses} VERBOSE=1 %install cd ../build -make %{makeprocesses} install +make %{makeprocesses} install VERBOSE=1 %post %{relocateConfig}lib/cmake/VecGeom/*.cmake From bc012879e8628af92e5a9deb1c4798e3ca133374 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Thu, 25 Aug 2022 09:52:22 +0200 Subject: [PATCH 088/101] [PATCH] libstdc++: Mark non-exported function always_inline --- ...8492bee6243a9d10e78fea1a3e423bd5f9cd.patch | 41 +++++++++++++++++++ gcc.spec | 2 + 2 files changed, 43 insertions(+) create mode 100644 gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd.patch diff --git a/gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd.patch b/gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd.patch new file mode 100644 index 00000000000..46c5ba47231 --- /dev/null +++ b/gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd.patch @@ -0,0 +1,41 @@ +From 03af8492bee6243a9d10e78fea1a3e423bd5f9cd Mon Sep 17 00:00:00 2001 +From: Jonathan Wakely +Date: Fri, 27 May 2022 12:43:18 +0100 +Subject: [PATCH] libstdc++: Mark non-exported function always_inline + [PR105671] + +This new function was added for gcc 11.1 but is not exported from the +shared library. Depending on inlining decisions, its callers might get +inlined but an external definition be needed for this function. That +then fails to link. + +Since we can't add the export to the gcc-11 release branch now, mark it +always_inline. We can consider exporting it for gcc-13 if/when we bump +the shared library version (and maybe also for gcc-12 which is currently +at the same version as trunk). For now, the attribute will solve the +problem on all affected branches. The function is small enough that +force-inlining it shouldn't cause problems. + +libstdc++-v3/ChangeLog: + + PR libstdc++/105671 + * include/std/sstream (basic_stringbuf::_M_high_mark): Add + always_inline attribute. + +(cherry picked from commit de57440858591a88e8fd7ba2505ca54546c86021) +--- + libstdc++-v3/include/std/sstream | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libstdc++-v3/include/std/sstream b/libstdc++-v3/include/std/sstream +index f21664100ab8..56555ecd98a1 100644 +--- a/libstdc++-v3/include/std/sstream ++++ b/libstdc++-v3/include/std/sstream +@@ -425,6 +425,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 + // This might not be the same character as _M_string.end() because + // basic_stringbuf::overflow might have written to unused capacity + // in _M_string without updating its length. ++ __attribute__((__always_inline__)) + char_type* + _M_high_mark() const _GLIBCXX_NOEXCEPT + { diff --git a/gcc.spec b/gcc.spec index 667240b16b0..99710f1f5a1 100644 --- a/gcc.spec +++ b/gcc.spec @@ -38,10 +38,12 @@ Source11: https://github.com/westes/flex/releases/download/v%{flexVersion}/flex- Patch0: gcc-flex-nonfull-path-m4 Patch1: gcc-flex-disable-doc +Patch2: gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd %prep %setup -T -b 0 -n %{moduleName} +%patch2 -p1 # Filter out private stuff from RPM requires headers. cat << \EOF > %{name}-req From 87d08bb80c3e87b00daa54263887dc8b0e97d424 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Thu, 25 Aug 2022 11:51:28 +0200 Subject: [PATCH 089/101] Update fakesystem.spec --- fakesystem.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/fakesystem.spec b/fakesystem.spec index b0e9063df07..2e254ba6477 100644 --- a/fakesystem.spec +++ b/fakesystem.spec @@ -81,6 +81,7 @@ Provides: perl(Memoize) Provides: perl(Net::Domain) Provides: perl(Net::SMTP) Provides: perl(Term::ANSIColor) +Provides: perl(IO::File) ################################# # Needed by git on CS9 From 87aee09fb2bd310603dfc7652b9a34e5054e4cc1 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Thu, 25 Aug 2022 11:51:41 +0200 Subject: [PATCH 090/101] Update fakesystem.spec --- fakesystem.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fakesystem.spec b/fakesystem.spec index 2e254ba6477..e1aace6b93b 100644 --- a/fakesystem.spec +++ b/fakesystem.spec @@ -1,5 +1,5 @@ ### RPM cms fakesystem 1.0 -## REVISION 1008 +## REVISION 1009 ## NOCOMPILER ## NO_VERSION_SUFFIX From 941cb6448532c87722793cb74575520b1dccc923 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Sun, 28 Aug 2022 16:52:40 +0200 Subject: [PATCH 091/101] Update fakesystem.spec --- fakesystem.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fakesystem.spec b/fakesystem.spec index e1aace6b93b..906a347f103 100644 --- a/fakesystem.spec +++ b/fakesystem.spec @@ -1,5 +1,5 @@ ### RPM cms fakesystem 1.0 -## REVISION 1009 +## REVISION 1010 ## NOCOMPILER ## NO_VERSION_SUFFIX @@ -82,6 +82,7 @@ Provides: perl(Net::Domain) Provides: perl(Net::SMTP) Provides: perl(Term::ANSIColor) Provides: perl(IO::File) +Provides: perl(Class::Struct) ################################# # Needed by git on CS9 From 119bdf3e80bdfb3712082fc4b14a30045e5320a5 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Fri, 16 Sep 2022 11:17:45 +0200 Subject: [PATCH 092/101] Update fakesystem.spec --- fakesystem.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fakesystem.spec b/fakesystem.spec index 906a347f103..d66f876e12a 100644 --- a/fakesystem.spec +++ b/fakesystem.spec @@ -1,5 +1,5 @@ ### RPM cms fakesystem 1.0 -## REVISION 1010 +## REVISION 1011 ## NOCOMPILER ## NO_VERSION_SUFFIX From 07ee568c8eb76b7016ca2aea36ed411e3cde3091 Mon Sep 17 00:00:00 2001 From: Andrea Valenzuela Date: Thu, 17 Nov 2022 12:26:22 +0100 Subject: [PATCH 093/101] Update to gcc11 --- gcc.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc.spec b/gcc.spec index c46f1b19a91..5f0b2f80cbd 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,11 +1,11 @@ -### RPM external gcc 10.3.0 +### RPM external gcc 11.2.1 ## USE_COMPILER_VERSION ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 # Use the git repository for fetching the sources. This gives us more control while developing # a new platform so that we can compile yet to be released versions of the compiler. # See: https://gcc.gnu.org/viewcvs/gcc/branches/gcc-8-branch/?view=log %define gccTag f00b5710a30f22efc3171c393e56aeb335c3cd39 -%define gccBranch releases/gcc-10 +%define gccBranch releases/gcc-11 %define moduleName %{n}-%{realversion} Source0: git+https://github.com/gcc-mirror/%{n}.git?obj=%{gccBranch}/%{gccTag}&export=%{moduleName}&output=/%{n}-%{realversion}-%{gccTag}.tgz From d354d6db5956eb439fbbdf37dc04b38b02989367 Mon Sep 17 00:00:00 2001 From: Andrea Valenzuela Date: Thu, 17 Nov 2022 16:28:39 +0100 Subject: [PATCH 094/101] Update to gcc11 --- gcc.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc.spec b/gcc.spec index 5f0b2f80cbd..99710f1f5a1 100644 --- a/gcc.spec +++ b/gcc.spec @@ -4,7 +4,7 @@ # Use the git repository for fetching the sources. This gives us more control while developing # a new platform so that we can compile yet to be released versions of the compiler. # See: https://gcc.gnu.org/viewcvs/gcc/branches/gcc-8-branch/?view=log -%define gccTag f00b5710a30f22efc3171c393e56aeb335c3cd39 +%define gccTag a0a0499b8bb920fdd98e791804812f001f0b4fe8 %define gccBranch releases/gcc-11 %define moduleName %{n}-%{realversion} @@ -38,7 +38,7 @@ Source11: https://github.com/westes/flex/releases/download/v%{flexVersion}/flex- Patch0: gcc-flex-nonfull-path-m4 Patch1: gcc-flex-disable-doc -Patch2: gcc-103-substitution-bug-fix +Patch2: gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd %prep From 6dbf81788684b0a4f882006f080ff60fd3cbaf20 Mon Sep 17 00:00:00 2001 From: Andrea Valenzuela Date: Thu, 17 Nov 2022 16:29:35 +0100 Subject: [PATCH 095/101] Update to gcc11 --- vecgeom.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vecgeom.spec b/vecgeom.spec index 23d7f3edda8..35429cbfce4 100644 --- a/vecgeom.spec +++ b/vecgeom.spec @@ -37,11 +37,11 @@ cmake ../%{n}-%{realversion} \ %endif -DGEANT4=OFF -make %{makeprocesses} +make %{makeprocesses} VERBOSE=1 %install cd ../build -make %{makeprocesses} install +make %{makeprocesses} install VERBOSE=1 %post %{relocateConfig}lib/cmake/VecGeom/*.cmake From a40a757bba17b95d6db911adf3cc0e71df62115d Mon Sep 17 00:00:00 2001 From: Andrea Valenzuela Date: Thu, 17 Nov 2022 16:30:54 +0100 Subject: [PATCH 096/101] Update to gcc11 --- gcc-103-substitution-bug-fix.patch | 78 ------------------------------ 1 file changed, 78 deletions(-) delete mode 100644 gcc-103-substitution-bug-fix.patch diff --git a/gcc-103-substitution-bug-fix.patch b/gcc-103-substitution-bug-fix.patch deleted file mode 100644 index 9059d07b1e1..00000000000 --- a/gcc-103-substitution-bug-fix.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- a/gcc/cp/pt.c -+++ b/gcc/cp/pt.c -@@ -13750,45 +13750,6 @@ tsubst_function_decl (tree t, tree args, tsubst_flags_t complain, - if (tree spec = retrieve_specialization (gen_tmpl, argvec, hash)) - return spec; - } -- -- /* We can see more levels of arguments than parameters if -- there was a specialization of a member template, like -- this: -- -- template struct S { template void f(); } -- template <> template void S::f(U); -- -- Here, we'll be substituting into the specialization, -- because that's where we can find the code we actually -- want to generate, but we'll have enough arguments for -- the most general template. -- -- We also deal with the peculiar case: -- -- template struct S { -- template friend void f(); -- }; -- template void f() {} -- template S; -- template void f(); -- -- Here, the ARGS for the instantiation of will be {int, -- double}. But, we only need as many ARGS as there are -- levels of template parameters in CODE_PATTERN. We are -- careful not to get fooled into reducing the ARGS in -- situations like: -- -- template struct S { template void f(U); } -- template template <> void S::f(int) {} -- -- which we can spot because the pattern will be a -- specialization in this case. */ -- int args_depth = TMPL_ARGS_DEPTH (args); -- int parms_depth = -- TMPL_PARMS_DEPTH (DECL_TEMPLATE_PARMS (DECL_TI_TEMPLATE (t))); -- -- if (args_depth > parms_depth && !DECL_TEMPLATE_SPECIALIZATION (t)) -- args = get_innermost_template_args (args, parms_depth); - } - else - { -diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C -new file mode 100644 -index 00000000000..8009756dcba ---- /dev/null -+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C -@@ -0,0 +1,9 @@ -+// PR c++/100102 -+// { dg-do compile { target c++11 } } -+ -+template struct ratio; -+template struct duration { -+ static constexpr int _S_gcd(); -+ template using __is_harmonic = ratio<_S_gcd>; -+ using type = __is_harmonic; -+}; -diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C -new file mode 100644 -index 00000000000..a4443e18f9d ---- /dev/null -+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C -@@ -0,0 +1,9 @@ -+// PR c++/100102 -+// { dg-do compile { target c++11 } } -+ -+template struct ratio; -+template struct duration { -+ static constexpr int _S_gcd(); -+ template using __is_harmonic = ratio<(duration::_S_gcd)()>; -+ using type = __is_harmonic; -+}; From e3e5eba824bb146c93b860cc258415c0d24d6c0d Mon Sep 17 00:00:00 2001 From: Andrea Valenzuela Date: Thu, 17 Nov 2022 16:32:11 +0100 Subject: [PATCH 097/101] Update to gcc11 --- ...8492bee6243a9d10e78fea1a3e423bd5f9cd.patch | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd.patch diff --git a/gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd.patch b/gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd.patch new file mode 100644 index 00000000000..46c5ba47231 --- /dev/null +++ b/gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd.patch @@ -0,0 +1,41 @@ +From 03af8492bee6243a9d10e78fea1a3e423bd5f9cd Mon Sep 17 00:00:00 2001 +From: Jonathan Wakely +Date: Fri, 27 May 2022 12:43:18 +0100 +Subject: [PATCH] libstdc++: Mark non-exported function always_inline + [PR105671] + +This new function was added for gcc 11.1 but is not exported from the +shared library. Depending on inlining decisions, its callers might get +inlined but an external definition be needed for this function. That +then fails to link. + +Since we can't add the export to the gcc-11 release branch now, mark it +always_inline. We can consider exporting it for gcc-13 if/when we bump +the shared library version (and maybe also for gcc-12 which is currently +at the same version as trunk). For now, the attribute will solve the +problem on all affected branches. The function is small enough that +force-inlining it shouldn't cause problems. + +libstdc++-v3/ChangeLog: + + PR libstdc++/105671 + * include/std/sstream (basic_stringbuf::_M_high_mark): Add + always_inline attribute. + +(cherry picked from commit de57440858591a88e8fd7ba2505ca54546c86021) +--- + libstdc++-v3/include/std/sstream | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libstdc++-v3/include/std/sstream b/libstdc++-v3/include/std/sstream +index f21664100ab8..56555ecd98a1 100644 +--- a/libstdc++-v3/include/std/sstream ++++ b/libstdc++-v3/include/std/sstream +@@ -425,6 +425,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 + // This might not be the same character as _M_string.end() because + // basic_stringbuf::overflow might have written to unused capacity + // in _M_string without updating its length. ++ __attribute__((__always_inline__)) + char_type* + _M_high_mark() const _GLIBCXX_NOEXCEPT + { From f8b7ec05e58b2ee2c7b5148fc3dd48a824c41698 Mon Sep 17 00:00:00 2001 From: Andrea Valenzuela Date: Thu, 17 Nov 2022 17:10:01 +0100 Subject: [PATCH 098/101] Update to gcc11 --- vecgeom.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/vecgeom.spec b/vecgeom.spec index 35429cbfce4..385341d35e6 100644 --- a/vecgeom.spec +++ b/vecgeom.spec @@ -24,7 +24,6 @@ cmake ../%{n}-%{realversion} \ -DCMAKE_AR=$(which gcc-ar) \ -DCMAKE_RANLIB=$(which gcc-ranlib) \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_CXX_FLAGS_RELEASE="-O2 -DNDEBUG" \ -DNO_SPECIALIZATION=ON \ -DBACKEND=Scalar \ %ifarch x86_64 From 7d2339145e4e0b069773ccfc80b884d8773e690c Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Mon, 21 Nov 2022 15:58:01 +0100 Subject: [PATCH 099/101] Deploy SCRAMV2 latest verison --- SCRAMV2.spec | 113 +++++++++++++++++++++++++++++++++++++++++++ cmssw-tool-conf.spec | 4 +- 2 files changed, 115 insertions(+), 2 deletions(-) create mode 100644 SCRAMV2.spec diff --git a/SCRAMV2.spec b/SCRAMV2.spec new file mode 100644 index 00000000000..bde16ae44f2 --- /dev/null +++ b/SCRAMV2.spec @@ -0,0 +1,113 @@ +### RPM lcg SCRAMV2 V2_2_9_pre16 +## NOCOMPILER +## NO_VERSION_SUFFIX + +BuildRequires: gmake + +Provides: perl(BuildSystem::Template::Plugins::PluginCore) +Provides: perl(BuildSystem::TemplateStash) +Provides: perl(Cache::CacheUtilities) +Provides: perl(BuildSystem::ToolManager) + +%define tag da6e6eb53b7f982049a165588c2015262b6f8146 +%define branch SCRAMV2 +%define github_user cms-sw +Source: git+https://github.com/%{github_user}/SCRAM.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz + +%define scramv1_dir %{pkgcategory}/SCRAMV1/%{v} +%define SCRAM_ALL_VERSIONS V[0-9][0-9]*_[0-9][0-9]*_[0-9][0-9]* +%define SCRAM_REL_MINOR %(echo %realversion | grep '%{SCRAM_ALL_VERSIONS}' | sed 's|^\\(V[0-9][0-9]*_[0-9][0-9]*\\)_.*|\\1|') +%define SCRAM_REL_MAJOR %(echo %realversion | sed 's|^\\(V[0-9][0-9]*\\)_.*|\\1|') +%define SetLatestVersion \ + vers="" \ + for ver in `find %{pkgcategory}/SCRAMV1 -maxdepth 2 -mindepth 2 -name "bin" -type d | sed 's|/bin$||' | xargs -I '{}' basename '{}' | grep "$VERSION_REGEXP" `; do \ + ver_str=`echo $ver | sed 's|-.\\+$||' | tr '_' '\\n' | sed 's|V\\([0-9]\\)$|V0\\1|;s|^\\([0-9]\\)$|0\\1|' | tr '\\n' '_'` \ + vers="${ver_str}zzz:${ver} ${vers}" \ + done \ + echo $vers | tr ' ' '\\n' | grep -v '^$' | sort | tail -1 | sed 's|.*:||' > etc/$VERSION_FILE \ + [ -s etc/$VERSION_FILE ] || rm -f etc/$VERSION_FILE + +%define BackwardCompatibilityVersionPolicy \ + touch etc/default-scram/%{SCRAM_REL_MINOR} \ + for ver in `find etc/default-scram -maxdepth 1 -mindepth 1 -name "%{SCRAM_REL_MAJOR}_[0-9]*" -type f | xargs -I '{}' basename '{}' | grep 'V[0-9][0-9]*_[0-9][0-9]*$' `; do \ + case $ver in \ + V2_[01] ) ;;\ + * ) \ + if [ -f etc/default-scram/%{SCRAM_REL_MAJOR} ] ; then \ + cp etc/default-scram/%{SCRAM_REL_MAJOR} etc/default-scram/$ver \ + else\ + rm -f etc/default-scram/$ver \ + fi;;\ + esac \ + done + +%prep +#SCRAM version policy check +if [ "X%{SCRAM_REL_MINOR}" == "X" ] ; then + echo "You are trying to build SCRAM version %v which does not follow the SCRAM version policy. Valid SCRAM versions should be of the form V[0-9]+_[0-9]+_[0-9].*" + exit 1 +fi + +%setup -n %{n}-%{realversion} +%build +gmake %{makeprocesses} all INSTALL_BASE=%{instroot} VERSION=%{realversion} PREFIX=%{i} + +%install +gmake %{makeprocesses} install INSTALL_BASE=%{instroot} VERSION=%{realversion} PREFIX=%{i} + +%post +%{relocateRpmPkg}bin/scram +sed -i -e "s|dbPath = '$RPM_INSTALL_PREFIX';|dbPath = '$CMS_INSTALL_PREFIX';|" $RPM_INSTALL_PREFIX/%{pkgrel}/bin/scram +echo "SCRAMV1_ROOT='$CMS_INSTALL_PREFIX/%{pkgrel}'" > $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh +echo "SCRAMV1_VERSION='%v'" >> $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh +echo "set SCRAMV1_ROOT='$CMS_INSTALL_PREFIX/%{pkgrel}'" > $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.csh +echo "set SCRAMV1_VERSION='%v'" >> $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.csh + +if [ ! -d $RPM_INSTALL_PREFIX/etc/scramrc ] ; then + mkdir -p $RPM_INSTALL_PREFIX/etc/scramrc + touch $RPM_INSTALL_PREFIX/etc/scramrc/links.db + echo 'CMSSW=$SCRAM_ARCH/cms/cmssw/CMSSW_*' > $RPM_INSTALL_PREFIX/etc/scramrc/cmssw.map + echo 'CMSSW=$SCRAM_ARCH/cms/cmssw-patch/CMSSW_*' > $RPM_INSTALL_PREFIX/etc/scramrc/cmssw-patch.map + echo 'CORAL=$SCRAM_ARCH/cms/coral/CORAL_*' > $RPM_INSTALL_PREFIX/etc/scramrc/coral.map +fi + +if [ ! -d $RPM_INSTALL_PREFIX/%{cmsplatf}/%{scramv1_dir} ] ; then + mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/%{scramv1_dir} + rsync --links --ignore-existing --recursive $RPM_INSTALL_PREFIX/%{pkgrel}/ $RPM_INSTALL_PREFIX/%{cmsplatf}/%{scramv1_dir}/ +fi + +touch $RPM_INSTALL_PREFIX/etc/scramrc/site.cfg +mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scram $RPM_INSTALL_PREFIX/share/etc/default-scram +cd $RPM_INSTALL_PREFIX/%{cmsplatf} +VERSION_REGEXP="%{SCRAM_ALL_VERSIONS}" ; VERSION_FILE=default-scramv1-version ; %{SetLatestVersion} +VERSION_REGEXP="%{SCRAM_REL_MAJOR}_" ; VERSION_FILE=default-scram/%{SCRAM_REL_MAJOR}; %{SetLatestVersion} +%{BackwardCompatibilityVersionPolicy} + +#Create a shared copy of this version +if [ ! -d $RPM_INSTALL_PREFIX/share/%{scramv1_dir} ] ; then + mkdir -p $RPM_INSTALL_PREFIX/share/%{scramv1_dir}/ + rsync --links --ignore-existing --recursive $RPM_INSTALL_PREFIX/%{pkgrel}/ $RPM_INSTALL_PREFIX/share/%{scramv1_dir}/ + sed -i -e 's|/%{pkgrel}|/share/%{scramv1_dir}|g' $RPM_INSTALL_PREFIX/share/%{scramv1_dir}/etc/profile.d/init.*sh +fi + +cd $RPM_INSTALL_PREFIX/share +VERSION_REGEXP="%{SCRAM_ALL_VERSIONS}" ; VERSION_FILE=default-scramv1-version ; %{SetLatestVersion} +VERSION_REGEXP="%{SCRAM_REL_MAJOR}_" ; VERSION_FILE=default-scram/%{SCRAM_REL_MAJOR}; %{SetLatestVersion} + +if [ `cat $RPM_INSTALL_PREFIX/share/etc/default-scramv1-version` == '%v' ] ; then + mkdir -p $RPM_INSTALL_PREFIX/share/man/man1 + cp -f $RPM_INSTALL_PREFIX/share/%{scramv1_dir}/docs/man/man1/scram.1 ${RPM_INSTALL_PREFIX}/share/man/man1/scram.1 +fi + +#FIMEME: Remove it when cmsBuild has a fix +#For some strange reason we need something after the last statement +#otherwise RPM does not run it. rpm -q --scripts also confirm that above +#command is missing if there is nothing after the last multi-line macro + +%postun +rm -rf $RPM_INSTALL_PREFIX/%{pkgrel} || true +rm -rf $RPM_INSTALL_PREFIX/%{cmsplatf}/%{scramv1_dir} || true +cd $RPM_INSTALL_PREFIX/%{cmsplatf} +VERSION_REGEXP="%{SCRAM_ALL_VERSIONS}"; VERSION_FILE=default-scramv1-version ; %{SetLatestVersion} +VERSION_REGEXP="%{SCRAM_REL_MAJOR}_" ; VERSION_FILE=default-scram/%{SCRAM_REL_MAJOR}; %{SetLatestVersion} +%{BackwardCompatibilityVersionPolicy} diff --git a/cmssw-tool-conf.spec b/cmssw-tool-conf.spec index 96d69438b7e..25b2ada4c17 100644 --- a/cmssw-tool-conf.spec +++ b/cmssw-tool-conf.spec @@ -1,7 +1,7 @@ -### RPM cms cmssw-tool-conf 52.0 +### RPM cms cmssw-tool-conf 53.0 # With cmsBuild, change the above version only when a new tool is added -## INSTALL_DEPENDENCIES cmsLHEtoEOSManager gcc-fixincludes cmssw-osenv cms-git-tools +## INSTALL_DEPENDENCIES cmsLHEtoEOSManager gcc-fixincludes cmssw-osenv cms-git-tools SCRAMV2 ## UPLOAD_DEPENDENCIES dqmgui Requires: crab From 525a0666caddb57f27a2390b8d47eff87fe7aeb1 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Thu, 24 Nov 2022 15:10:48 +0100 Subject: [PATCH 100/101] sync GCC11 changes to master branch --- ...8492bee6243a9d10e78fea1a3e423bd5f9cd.patch | 41 ++++++++++ gcc-103-substitution-bug-fix.patch | 78 ------------------- gcc.spec | 8 +- vecgeom.spec | 5 +- 4 files changed, 47 insertions(+), 85 deletions(-) create mode 100644 gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd.patch delete mode 100644 gcc-103-substitution-bug-fix.patch diff --git a/gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd.patch b/gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd.patch new file mode 100644 index 00000000000..46c5ba47231 --- /dev/null +++ b/gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd.patch @@ -0,0 +1,41 @@ +From 03af8492bee6243a9d10e78fea1a3e423bd5f9cd Mon Sep 17 00:00:00 2001 +From: Jonathan Wakely +Date: Fri, 27 May 2022 12:43:18 +0100 +Subject: [PATCH] libstdc++: Mark non-exported function always_inline + [PR105671] + +This new function was added for gcc 11.1 but is not exported from the +shared library. Depending on inlining decisions, its callers might get +inlined but an external definition be needed for this function. That +then fails to link. + +Since we can't add the export to the gcc-11 release branch now, mark it +always_inline. We can consider exporting it for gcc-13 if/when we bump +the shared library version (and maybe also for gcc-12 which is currently +at the same version as trunk). For now, the attribute will solve the +problem on all affected branches. The function is small enough that +force-inlining it shouldn't cause problems. + +libstdc++-v3/ChangeLog: + + PR libstdc++/105671 + * include/std/sstream (basic_stringbuf::_M_high_mark): Add + always_inline attribute. + +(cherry picked from commit de57440858591a88e8fd7ba2505ca54546c86021) +--- + libstdc++-v3/include/std/sstream | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libstdc++-v3/include/std/sstream b/libstdc++-v3/include/std/sstream +index f21664100ab8..56555ecd98a1 100644 +--- a/libstdc++-v3/include/std/sstream ++++ b/libstdc++-v3/include/std/sstream +@@ -425,6 +425,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 + // This might not be the same character as _M_string.end() because + // basic_stringbuf::overflow might have written to unused capacity + // in _M_string without updating its length. ++ __attribute__((__always_inline__)) + char_type* + _M_high_mark() const _GLIBCXX_NOEXCEPT + { diff --git a/gcc-103-substitution-bug-fix.patch b/gcc-103-substitution-bug-fix.patch deleted file mode 100644 index 9059d07b1e1..00000000000 --- a/gcc-103-substitution-bug-fix.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- a/gcc/cp/pt.c -+++ b/gcc/cp/pt.c -@@ -13750,45 +13750,6 @@ tsubst_function_decl (tree t, tree args, tsubst_flags_t complain, - if (tree spec = retrieve_specialization (gen_tmpl, argvec, hash)) - return spec; - } -- -- /* We can see more levels of arguments than parameters if -- there was a specialization of a member template, like -- this: -- -- template struct S { template void f(); } -- template <> template void S::f(U); -- -- Here, we'll be substituting into the specialization, -- because that's where we can find the code we actually -- want to generate, but we'll have enough arguments for -- the most general template. -- -- We also deal with the peculiar case: -- -- template struct S { -- template friend void f(); -- }; -- template void f() {} -- template S; -- template void f(); -- -- Here, the ARGS for the instantiation of will be {int, -- double}. But, we only need as many ARGS as there are -- levels of template parameters in CODE_PATTERN. We are -- careful not to get fooled into reducing the ARGS in -- situations like: -- -- template struct S { template void f(U); } -- template template <> void S::f(int) {} -- -- which we can spot because the pattern will be a -- specialization in this case. */ -- int args_depth = TMPL_ARGS_DEPTH (args); -- int parms_depth = -- TMPL_PARMS_DEPTH (DECL_TEMPLATE_PARMS (DECL_TI_TEMPLATE (t))); -- -- if (args_depth > parms_depth && !DECL_TEMPLATE_SPECIALIZATION (t)) -- args = get_innermost_template_args (args, parms_depth); - } - else - { -diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C -new file mode 100644 -index 00000000000..8009756dcba ---- /dev/null -+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C -@@ -0,0 +1,9 @@ -+// PR c++/100102 -+// { dg-do compile { target c++11 } } -+ -+template struct ratio; -+template struct duration { -+ static constexpr int _S_gcd(); -+ template using __is_harmonic = ratio<_S_gcd>; -+ using type = __is_harmonic; -+}; -diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C -new file mode 100644 -index 00000000000..a4443e18f9d ---- /dev/null -+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C -@@ -0,0 +1,9 @@ -+// PR c++/100102 -+// { dg-do compile { target c++11 } } -+ -+template struct ratio; -+template struct duration { -+ static constexpr int _S_gcd(); -+ template using __is_harmonic = ratio<(duration::_S_gcd)()>; -+ using type = __is_harmonic; -+}; diff --git a/gcc.spec b/gcc.spec index c46f1b19a91..99710f1f5a1 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,11 +1,11 @@ -### RPM external gcc 10.3.0 +### RPM external gcc 11.2.1 ## USE_COMPILER_VERSION ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 # Use the git repository for fetching the sources. This gives us more control while developing # a new platform so that we can compile yet to be released versions of the compiler. # See: https://gcc.gnu.org/viewcvs/gcc/branches/gcc-8-branch/?view=log -%define gccTag f00b5710a30f22efc3171c393e56aeb335c3cd39 -%define gccBranch releases/gcc-10 +%define gccTag a0a0499b8bb920fdd98e791804812f001f0b4fe8 +%define gccBranch releases/gcc-11 %define moduleName %{n}-%{realversion} Source0: git+https://github.com/gcc-mirror/%{n}.git?obj=%{gccBranch}/%{gccTag}&export=%{moduleName}&output=/%{n}-%{realversion}-%{gccTag}.tgz @@ -38,7 +38,7 @@ Source11: https://github.com/westes/flex/releases/download/v%{flexVersion}/flex- Patch0: gcc-flex-nonfull-path-m4 Patch1: gcc-flex-disable-doc -Patch2: gcc-103-substitution-bug-fix +Patch2: gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd %prep diff --git a/vecgeom.spec b/vecgeom.spec index 23d7f3edda8..385341d35e6 100644 --- a/vecgeom.spec +++ b/vecgeom.spec @@ -24,7 +24,6 @@ cmake ../%{n}-%{realversion} \ -DCMAKE_AR=$(which gcc-ar) \ -DCMAKE_RANLIB=$(which gcc-ranlib) \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_CXX_FLAGS_RELEASE="-O2 -DNDEBUG" \ -DNO_SPECIALIZATION=ON \ -DBACKEND=Scalar \ %ifarch x86_64 @@ -37,11 +36,11 @@ cmake ../%{n}-%{realversion} \ %endif -DGEANT4=OFF -make %{makeprocesses} +make %{makeprocesses} VERBOSE=1 %install cd ../build -make %{makeprocesses} install +make %{makeprocesses} install VERBOSE=1 %post %{relocateConfig}lib/cmake/VecGeom/*.cmake From f658ca8ac9931d1bd5f936c234d0587fb72787a4 Mon Sep 17 00:00:00 2001 From: cmsbuild Date: Fri, 25 Nov 2022 13:42:01 +0100 Subject: [PATCH 101/101] Update tag for L1Trigger-TrackFindingTracklet to V00-03-00 --- data/cmsswdata.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/cmsswdata.txt b/data/cmsswdata.txt index ad515d710c7..9d5f83f61f6 100644 --- a/data/cmsswdata.txt +++ b/data/cmsswdata.txt @@ -3,6 +3,7 @@ #Once a non-default section is empty then cleanup that section and remove its cmsdist/${PACKAGE_TYPE}.file #If there is no customization for the packae then remove its .spec and .file [default] +L1Trigger-TrackFindingTracklet=V00-03-00 RecoTracker-MkFit=V00-10-00 RecoEgamma-PhotonIdentification=V01-06-00 Alignment-OfflineValidation=V00-03-00 @@ -41,7 +42,6 @@ Validation-Geometry=V00-07-00 PhysicsTools-NanoAOD=V01-02-00 CalibPPS-ESProducers=V01-04-00 DataFormats-PatCandidates=V01-01-00 -L1Trigger-TrackFindingTracklet=V00-02-00 GeneratorInterface-EvtGenInterface=V02-06-00 DetectorDescription-Schema=V02-03-00 PhysicsTools-PatUtils=V00-05-00