From 0c608408b02580c49ffb876d1eb7c6b89267fa92 Mon Sep 17 00:00:00 2001 From: Yikun Jiang Date: Thu, 1 Dec 2022 19:54:11 +0800 Subject: [PATCH] openEuler support Signed-off-by: Yikun Jiang --- .cirrus.yml | 16 ++++++ .github/workflows/validate.yml | 10 ++++ components/admin/lmod/SPECS/lmod.spec | 2 +- components/admin/powerman/SPECS/powerman.spec | 2 +- .../dev-tools/autoconf/SPECS/autoconf.spec | 2 +- .../dev-tools/automake/SPECS/automake.spec | 6 ++ components/dev-tools/cmake/SPECS/cmake.spec | 2 +- components/dev-tools/spack/SPECS/spack.spec | 2 +- .../python-Cython/SPECS/python-Cython.spec | 3 +- .../netcdf-fortran/SPECS/netcdf-fortran.spec | 2 +- components/io-libs/sionlib/SPECS/sionlib.spec | 2 +- .../libfabric/SPECS/libfabric.spec | 2 +- .../mpi-families/mvapich2/SPECS/mvapich2.spec | 2 +- .../mpi-families/openmpi/SPECS/openmpi.spec | 4 +- .../parallel-libs/boost/SPECS/boost.spec | 5 +- .../parallel-libs/mumps/SPECS/mumps.spec | 2 +- .../parallel-libs/petsc/SPECS/petsc.spec | 2 +- .../ptscotch/SPECS/ptscotch.spec | 2 +- .../perf-tools/dimemas/SPECS/dimemas.spec | 2 +- .../perf-tools/paraver/SPECS/paraver.spec | 4 +- .../SPECS/warewulf-common.spec | 6 +- .../warewulf-vnfs/SPECS/warewulf-vnfs.spec | 2 +- components/rms/munge/SPECS/munge.spec | 2 +- components/rms/openpbs/SPECS/openpbs.spec | 6 +- components/rms/slurm/SPECS/slurm.spec | 13 +++-- .../charliecloud/SPECS/charliecloud.spec | 4 +- components/serial-libs/R/SPECS/R.spec | 6 +- .../serial-libs/openblas/SPECS/openblas.spec | 5 +- .../serial-libs/scotch/SPECS/scotch.spec | 2 +- tests/ci/prepare-ci-environment.sh | 57 ++++++++++++------- tests/ci/run_build.py | 6 +- tests/m4/distro_family.m4 | 3 + 32 files changed, 124 insertions(+), 62 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 2c62bc9e3a..cacf4a3857 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -21,3 +21,19 @@ task: build_script: | . /etc/profile.d/lmod.sh tests/ci/run_build.py ohpc $(tests/ci/cirrus_get_changed_files.sh) + +openeuler_task: + name: openEuler on aarch64 + arm_container: + image: docker.io/openeuler/openeuler:22.03-lts + cpu: 4 + memory: 12G + script: uname -a + setup_script: | + dnf install -y openEuler-release dnf-plugins-core git python3 make http://121.36.3.168:82/home:/huangtianhua:/ohpc/standard_aarch64/aarch64/ohpc-release-2-1.oe2203.ohpc.2.0.0.aarch64.rpm findutils rpm-build wget gawk jq which + dnf install -y https://github.com/ohpc-openeuler/ohpc/releases/download/2.x-openEuler-gcc12-aarch64/gnu12-compilers-ohpc-12.2.0-1.ohpc.2.0.0.aarch64.rpm + dnf install -y lmod-ohpc ohpc-buildroot + adduser ohpc + build_script: | + . /etc/profile.d/lmod.sh + tests/ci/run_build.py ohpc $(tests/ci/cirrus_get_changed_files.sh) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index ff0f7bab75..4120009adc 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -7,6 +7,7 @@ on: pull_request: branches: - 2.x + - 2.x-for-openEuler env: SKIP_CI_SPECS: | @@ -143,6 +144,15 @@ jobs: - name: Install git run: dnf -y install git - uses: actions/checkout@v3 + + build_on_openEuler: + runs-on: ubuntu-latest + container: + image: docker.io/openeuler/openeuler:22.03-lts + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Setup run: tests/ci/prepare-ci-environment.sh - id: files diff --git a/components/admin/lmod/SPECS/lmod.spec b/components/admin/lmod/SPECS/lmod.spec index ec1e527025..cf890c8555 100644 --- a/components/admin/lmod/SPECS/lmod.spec +++ b/components/admin/lmod/SPECS/lmod.spec @@ -28,7 +28,7 @@ BuildRequires: rsync BuildRequires: tcl-devel BuildRequires: gcc make bc -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} BuildRequires: lua-libs BuildRequires: lua-filesystem BuildRequires: lua-posix diff --git a/components/admin/powerman/SPECS/powerman.spec b/components/admin/powerman/SPECS/powerman.spec index bf4844e850..41142abf7b 100644 --- a/components/admin/powerman/SPECS/powerman.spec +++ b/components/admin/powerman/SPECS/powerman.spec @@ -22,7 +22,7 @@ Group: %{PROJ_NAME}/admin Url: http://code.google.com/p/powerman/ Source0: https://github.com/chaos/%{pname}/releases/download/%{version}/%{pname}-%{version}.tar.gz -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} %define _with_httppower 1 %define _with_snmppower 1 %define _with_genders 1 diff --git a/components/dev-tools/autoconf/SPECS/autoconf.spec b/components/dev-tools/autoconf/SPECS/autoconf.spec index 9b631d2788..48f2b3a7c9 100644 --- a/components/dev-tools/autoconf/SPECS/autoconf.spec +++ b/components/dev-tools/autoconf/SPECS/autoconf.spec @@ -24,7 +24,7 @@ Source0: https://ftp.gnu.org/gnu/autoconf/autoconf-%{version}.tar.gz BuildRequires: m4 Requires: m4 -%if 0%{?rhel_version} || 0%{?centos_version} || 0%{?rhel} +%if 0%{?rhel_version} || 0%{?centos_version} || 0%{?rhel} || 0%{?openEuler} BuildRequires: perl-macros BuildRequires: perl(Data::Dumper) # from f19, Text::ParseWords is not the part of 'perl' package diff --git a/components/dev-tools/automake/SPECS/automake.spec b/components/dev-tools/automake/SPECS/automake.spec index fa0aa5518c..71b13458a4 100644 --- a/components/dev-tools/automake/SPECS/automake.spec +++ b/components/dev-tools/automake/SPECS/automake.spec @@ -20,6 +20,7 @@ License: GNU GPL Group: %{PROJ_NAME}/dev-tools URL: http://www.gnu.org/software/automake/ Source0: https://ftp.gnu.org/gnu/automake/automake-%{version}.tar.gz +Patch0: fix-automake-build-error.patch %define install_path %{OHPC_UTILS}/autotools @@ -28,6 +29,11 @@ BuildRequires: autoconf%{PROJ_DELIM} >= 2.69 BuildRequires: perl(Thread::Queue) make +%if 0%{?openEuler} +BuildRequires: perl-Thread-Queue +Requires: perl-Thread-Queue +%endif + %description Automake is a tool for automatically generating `Makefile.in' files compliant with the GNU Coding Standards. diff --git a/components/dev-tools/cmake/SPECS/cmake.spec b/components/dev-tools/cmake/SPECS/cmake.spec index 49902afc0c..d5a52661f5 100644 --- a/components/dev-tools/cmake/SPECS/cmake.spec +++ b/components/dev-tools/cmake/SPECS/cmake.spec @@ -31,7 +31,7 @@ BuildRequires: xz-devel BuildRequires: zlib-devel BuildRequires: pkgconfig -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} BuildRequires: expat-devel BuildRequires: bzip2-devel %endif diff --git a/components/dev-tools/spack/SPECS/spack.spec b/components/dev-tools/spack/SPECS/spack.spec index a2a5fb7248..a66c876551 100644 --- a/components/dev-tools/spack/SPECS/spack.spec +++ b/components/dev-tools/spack/SPECS/spack.spec @@ -42,7 +42,7 @@ Requires: zstd Requires: file Requires: git Requires: curl -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} Requires: gnupg2 %endif %if 0%{?suse_version} diff --git a/components/distro-packages/python-Cython/SPECS/python-Cython.spec b/components/distro-packages/python-Cython/SPECS/python-Cython.spec index 9b860d92fd..84c1cf666b 100644 --- a/components/distro-packages/python-Cython/SPECS/python-Cython.spec +++ b/components/distro-packages/python-Cython/SPECS/python-Cython.spec @@ -21,7 +21,7 @@ License: Apache-2.0 Group: %{PROJ_NAME}/distro-packages Source0: https://files.pythonhosted.org/packages/source/C/Cython/Cython-%{version}.tar.gz Source1: python-Cython-rpmlintrc -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} BuildRequires: python3-libxml2 Requires: python3-libxml2 Requires(post): chkconfig @@ -33,6 +33,7 @@ Requires(post): update-alternatives Requires(postun): update-alternatives %endif BuildRequires: gcc-c++ +BuildRequires: python3-devel Requires: python3-devel %description diff --git a/components/io-libs/netcdf-fortran/SPECS/netcdf-fortran.spec b/components/io-libs/netcdf-fortran/SPECS/netcdf-fortran.spec index c1f8325c0c..c60dd4efd7 100644 --- a/components/io-libs/netcdf-fortran/SPECS/netcdf-fortran.spec +++ b/components/io-libs/netcdf-fortran/SPECS/netcdf-fortran.spec @@ -28,7 +28,7 @@ Source0: https://github.com/Unidata/netcdf-fortran/archive/v%{version}.tar.gz BuildRequires: zlib-devel >= 1.2.5 BuildRequires: libxml2-devel -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} BuildRequires: bzip2-devel %endif %if 0%{?suse_version} diff --git a/components/io-libs/sionlib/SPECS/sionlib.spec b/components/io-libs/sionlib/SPECS/sionlib.spec index 2afc9f6bb3..63349fd486 100644 --- a/components/io-libs/sionlib/SPECS/sionlib.spec +++ b/components/io-libs/sionlib/SPECS/sionlib.spec @@ -27,7 +27,7 @@ Source0: http://apps.fz-juelich.de/jsc/sionlib/download.php?version=%{version} Patch0: sionlib-llvm-arm.patch # For pre-processor only: -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} BuildRequires: gcc-gfortran %else BuildRequires: gcc-fortran diff --git a/components/mpi-families/libfabric/SPECS/libfabric.spec b/components/mpi-families/libfabric/SPECS/libfabric.spec index ffb7a2f3fe..560f9a68ea 100644 --- a/components/mpi-families/libfabric/SPECS/libfabric.spec +++ b/components/mpi-families/libfabric/SPECS/libfabric.spec @@ -28,7 +28,7 @@ BuildRequires: gcc make Buildrequires: ofed BuildRequires: rdma-core-devel infiniband-diags-devel %endif -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} Buildrequires: rdma-core-devel libibmad-devel %endif %ifarch x86_64 diff --git a/components/mpi-families/mvapich2/SPECS/mvapich2.spec b/components/mpi-families/mvapich2/SPECS/mvapich2.spec index b136f4eebd..5abe8b6895 100644 --- a/components/mpi-families/mvapich2/SPECS/mvapich2.spec +++ b/components/mpi-families/mvapich2/SPECS/mvapich2.spec @@ -61,7 +61,7 @@ Conflicts: %{pname}-%{compiler_family}%{PROJ_DELIM} Buildrequires: ofed BuildRequires: rdma-core-devel infiniband-diags-devel %endif -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} Buildrequires: rdma-core-devel libibmad-devel %endif diff --git a/components/mpi-families/openmpi/SPECS/openmpi.spec b/components/mpi-families/openmpi/SPECS/openmpi.spec index 3018384a90..84aa9b14bc 100644 --- a/components/mpi-families/openmpi/SPECS/openmpi.spec +++ b/components/mpi-families/openmpi/SPECS/openmpi.spec @@ -68,7 +68,7 @@ BuildRequires: libevent-devel %endif %if 0%{with_ofi} BuildRequires: libfabric%{PROJ_DELIM} -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} BuildRequires: libibverbs-devel %endif %ifarch x86_64 @@ -81,7 +81,7 @@ Requires: ucx%{PROJ_DELIM} Requires: ucx-ib%{PROJ_DELIM} %endif BuildRequires: hwloc%{PROJ_DELIM} -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} BuildRequires: libtool-ltdl %endif %if 0%{with_slurm} diff --git a/components/parallel-libs/boost/SPECS/boost.spec b/components/parallel-libs/boost/SPECS/boost.spec index db64a2c199..dd572bc1b6 100644 --- a/components/parallel-libs/boost/SPECS/boost.spec +++ b/components/parallel-libs/boost/SPECS/boost.spec @@ -33,7 +33,7 @@ BuildRequires: python3-numpy-devel BuildRequires: libquadmath0 %endif %else -# Assume RHEL/Fedora distro +# Assume RHEL/Fedora/openEuler distro BuildRequires: bzip2-devel BuildRequires: expat-devel BuildRequires: python3-numpy @@ -43,6 +43,7 @@ BuildRequires: libquadmath-devel %endif %endif +BuildRequires: make BuildRequires: fdupes BuildRequires: dos2unix BuildRequires: gmp-devel @@ -106,7 +107,7 @@ export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-unused-local-type export RPM_LD_FLAGS cat << "EOF" >> rpm-config.jam -%if 0%{?rhel} >= 9 +%if 0%{?rhel} >= 9 || 0%{?openEuler} using python : %{python3_version} : %{__python3} : /usr/include/python%{python3_version} ; %else using python : %{python3_version} : %{__python3} : /usr/include/python%{python3_version}m ; diff --git a/components/parallel-libs/mumps/SPECS/mumps.spec b/components/parallel-libs/mumps/SPECS/mumps.spec index b943af02d8..72de151c28 100644 --- a/components/parallel-libs/mumps/SPECS/mumps.spec +++ b/components/parallel-libs/mumps/SPECS/mumps.spec @@ -36,7 +36,7 @@ Patch0: mumps-5.0.1-shared-mumps.patch Patch1: mumps-5.0.0-shared-pord.patch Requires: lmod%{PROJ_DELIM} >= 7.6.1 -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} BuildRequires: libgomp %else BuildRequires: libgomp1 diff --git a/components/parallel-libs/petsc/SPECS/petsc.spec b/components/parallel-libs/petsc/SPECS/petsc.spec index fe23705c75..09ecb3f6fa 100644 --- a/components/parallel-libs/petsc/SPECS/petsc.spec +++ b/components/parallel-libs/petsc/SPECS/petsc.spec @@ -38,7 +38,7 @@ BuildRequires: valgrind-devel BuildRequires: make BuildRequires: xz BuildRequires: zlib-devel -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} BuildRequires: openssh-clients BuildRequires: glibc-langpack-en %else diff --git a/components/parallel-libs/ptscotch/SPECS/ptscotch.spec b/components/parallel-libs/ptscotch/SPECS/ptscotch.spec index 09d958cc9d..a9ab0023f5 100644 --- a/components/parallel-libs/ptscotch/SPECS/ptscotch.spec +++ b/components/parallel-libs/ptscotch/SPECS/ptscotch.spec @@ -31,7 +31,7 @@ Patch0: scotch-6.0.4-destdir.patch BuildRequires: flex bison make BuildRequires: zlib-devel -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} BuildRequires: bzip2-devel Requires: bzip2-devel %else diff --git a/components/perf-tools/dimemas/SPECS/dimemas.spec b/components/perf-tools/dimemas/SPECS/dimemas.spec index 7bc9925719..b836ae9158 100644 --- a/components/perf-tools/dimemas/SPECS/dimemas.spec +++ b/components/perf-tools/dimemas/SPECS/dimemas.spec @@ -28,7 +28,7 @@ Source0: https://ftp.tools.bsc.es/dimemas/dimemas-%{version}-src.tar.bz2 BuildRequires: boost-%{compiler_family}-%{mpi_family}%{PROJ_DELIM} Requires: boost-%{compiler_family}-%{mpi_family}%{PROJ_DELIM} BuildRequires: bison make -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} BuildRequires: flex-devel BuildRequires: flex %endif diff --git a/components/perf-tools/paraver/SPECS/paraver.spec b/components/perf-tools/paraver/SPECS/paraver.spec index a8ee2c7789..192c37e01d 100644 --- a/components/perf-tools/paraver/SPECS/paraver.spec +++ b/components/perf-tools/paraver/SPECS/paraver.spec @@ -27,7 +27,7 @@ Source0: https://ftp.tools.bsc.es/wxparaver/wxparaver-%{version}-src.tar.b BuildRequires: gcc-c++ BuildRequires: bison BuildRequires: boost-devel -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} BuildRequires: libfabric-devel BuildRequires: flex-devel BuildRequires: wxGTK3-devel @@ -67,7 +67,7 @@ achieving these targets. %build -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --with-wx-config=/usr/bin/wx-config-3.0 " %endif %if 0%{?suse_version} diff --git a/components/provisioning/warewulf-common/SPECS/warewulf-common.spec b/components/provisioning/warewulf-common/SPECS/warewulf-common.spec index 14cf94bcca..e6ca292a43 100644 --- a/components/provisioning/warewulf-common/SPECS/warewulf-common.spec +++ b/components/provisioning/warewulf-common/SPECS/warewulf-common.spec @@ -40,7 +40,7 @@ Requires: perl(DBD::mysql), perl(DBD::Pg), perl(DBD::SQLite), perl(JSON::PP) %global daemon_name mysqld %endif -%if 0%{?rhel} >= 8 +%if 0%{?rhel} >= 8 || 0%{?openEuler} BuildRequires: systemd Requires: perl-Sys-Syslog %endif @@ -138,7 +138,7 @@ SQL server. # Start services on install. # For upgrades or removal, restart after the old package is removed. if [ $1 -eq 1 ] ; then -%if 0%{?sle_version:1} || 0%{?rhel} >= 8 +%if 0%{?sle_version:1} || 0%{?rhel} >= 8 || 0%{?openEuler} %systemd_post %{daemon_name}.service %else /usr/bin/systemctl --no-reload preset %{daemon_name}.service &> /dev/null || : @@ -149,7 +149,7 @@ if [ $1 -eq 1 ] ; then fi %postun localdb -%if 0%{?sle_version:1} || 0%{?rhel} >= 8 +%if 0%{?sle_version:1} || 0%{?rhel} >= 8 || 0%{?openEuler} %systemd_postun_with_restart %{daemon_name}.service %else /usr/bin/systemctl try-restart %{daemon_name}.service &> /dev/null || : diff --git a/components/provisioning/warewulf-vnfs/SPECS/warewulf-vnfs.spec b/components/provisioning/warewulf-vnfs/SPECS/warewulf-vnfs.spec index 2adbf88e0f..d72195d679 100644 --- a/components/provisioning/warewulf-vnfs/SPECS/warewulf-vnfs.spec +++ b/components/provisioning/warewulf-vnfs/SPECS/warewulf-vnfs.spec @@ -47,7 +47,7 @@ Group: %{PROJ_NAME}/provisioning ExclusiveOS: linux Requires: warewulf-common%{PROJ_DELIM} Requires: pigz -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} Requires: perl-IO-Compress %endif BuildRequires: autoconf diff --git a/components/rms/munge/SPECS/munge.spec b/components/rms/munge/SPECS/munge.spec index 842d427b23..3350b0690e 100644 --- a/components/rms/munge/SPECS/munge.spec +++ b/components/rms/munge/SPECS/munge.spec @@ -114,7 +114,7 @@ touch "$RPM_BUILD_ROOT"/%{_localstatedir}/run/munge/munged.pid %if 0%{?sles_version} || 0%{?suse_version} rm "$RPM_BUILD_ROOT"/etc/init.d/munge %endif -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} rm "$RPM_BUILD_ROOT"/etc/rc.d/init.d/munge %endif diff --git a/components/rms/openpbs/SPECS/openpbs.spec b/components/rms/openpbs/SPECS/openpbs.spec index 60dd274ef8..07a50c2c10 100644 --- a/components/rms/openpbs/SPECS/openpbs.spec +++ b/components/rms/openpbs/SPECS/openpbs.spec @@ -47,7 +47,7 @@ %define _vendor_ver %(cat /etc/os-release | awk -F[=\\".] '/^VERSION_ID=/ {print \$3}') %define _vendor_id %(cat /etc/os-release | awk -F= '/^ID=/ {print \$2}') %endif -%if 0%{?suse_version} >= 1210 || 0%{?rhel} >= 7 || ("x%{?_vendor_id}" == "xdebian" && 0%{?_vendor_ver} >= 8) || ("x%{?_vendor_id}" == "xubuntu" && 0%{?_vendor_ver} >= 16) +%if 0%{?suse_version} >= 1210 || 0%{?rhel} >= 7 || 0%{?openEuler} || ("x%{?_vendor_id}" == "xdebian" && 0%{?_vendor_ver} >= 8) || ("x%{?_vendor_id}" == "xubuntu" && 0%{?_vendor_ver} >= 16) %define have_systemd 1 %endif @@ -136,7 +136,7 @@ Requires: net-tools Requires: smtpdaemon Requires: hostname %endif -%if 0%{?rhel} >= 7 +%if 0%{?rhel} >= 7 || 0%{?openEuler} Requires: hwloc-ohpc %endif Requires: libical @@ -173,7 +173,7 @@ Requires: net-tools %else Requires: hostname %endif -%if 0%{?rhel} >= 7 +%if 0%{?rhel} >= 7 || 0%{?openEuler} Requires: hwloc-ohpc %endif Autoreq: 1 diff --git a/components/rms/slurm/SPECS/slurm.spec b/components/rms/slurm/SPECS/slurm.spec index 1e00a4f396..824f4531e1 100644 --- a/components/rms/slurm/SPECS/slurm.spec +++ b/components/rms/slurm/SPECS/slurm.spec @@ -152,6 +152,11 @@ BuildRequires: pkgconfig %endif %endif +%if 0%{?openEuler} +BuildRequires: perl perl-devel +Requires: perl perl-devel +%endif + BuildRequires: perl(ExtUtils::MakeMaker) #needed to enable jobcomp_elasticsearch plugin @@ -347,7 +352,7 @@ Summary: Slurm REST API translator Group: System Environment/Base Requires: %{name}%{?_isa} = %{version}-%{release} BuildRequires: http-parser-devel -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} BuildRequires: json-c-devel %endif %if 0%{?suse_version:1} @@ -372,7 +377,7 @@ notifies slurm about failed nodes. Summary: Graphical user interface to view and modify Slurm state Group: %{PROJ_NAME}/rms Requires: %{pname}%{PROJ_DELIM} = %{version}-%{release} -BuildRequires: gtk2-devel +BuildRequires: gtk2-devel gcc Requires: gtk2 %description -n %{pname}-sview%{PROJ_DELIM} This package provides sview, which can be used to view Slurm configuration, job, @@ -386,7 +391,7 @@ select information. %setup -q -n %{slurm_source_dir} %build -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} export PATH="$PWD/bin:$PATH" %endif %configure \ @@ -412,7 +417,7 @@ export PATH="$PWD/bin:$PATH" make %{?_smp_mflags} %install -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} export PATH="$PWD/bin:$PATH" %endif diff --git a/components/runtimes/charliecloud/SPECS/charliecloud.spec b/components/runtimes/charliecloud/SPECS/charliecloud.spec index 459c116260..a550c14671 100644 --- a/components/runtimes/charliecloud/SPECS/charliecloud.spec +++ b/components/runtimes/charliecloud/SPECS/charliecloud.spec @@ -35,7 +35,7 @@ BuildRequires: gcc %if 0%{?centos_version} || 0%{?rhel_version} BuildRequires: python36 %endif -%if 0%{?sles_version} || 0%{?suse_version} +%if 0%{?sles_version} || 0%{?suse_version} || 0%{?openEuler} BuildRequires: python3 %endif @@ -45,7 +45,7 @@ Requires: wget %if 0%{?centos_version} || 0%{?rhel_version} Requires: python36 %endif -%if 0%{?sles_version} || 0%{?suse_version} +%if 0%{?sles_version} || 0%{?suse_version} || 0%{?openEuler} Requires: python3 %endif diff --git a/components/serial-libs/R/SPECS/R.spec b/components/serial-libs/R/SPECS/R.spec index 61f0f25697..7f80814bb7 100644 --- a/components/serial-libs/R/SPECS/R.spec +++ b/components/serial-libs/R/SPECS/R.spec @@ -44,14 +44,18 @@ BuildRequires: xz-devel BuildRequires: pcre2-devel BuildRequires: libcurl-devel BuildRequires: tk-devel -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} BuildRequires: libXt-devel BuildRequires: texinfo >= 5.1 BuildRequires: bzip2-devel %endif Requires: cairo >= 1.2 Requires: fontconfig +%if 0%{?openEuler} +Requires: freetype +%else Requires: freetype2 +%endif Requires: make Requires: readline Requires: xdg-utils diff --git a/components/serial-libs/openblas/SPECS/openblas.spec b/components/serial-libs/openblas/SPECS/openblas.spec index 6b973d322a..4aa38bfa55 100644 --- a/components/serial-libs/openblas/SPECS/openblas.spec +++ b/components/serial-libs/openblas/SPECS/openblas.spec @@ -29,6 +29,7 @@ Patch2: openblas-noexecstack.patch Patch3: fix-arm64-cpuid-return.patch ExclusiveArch: %ix86 ia64 ppc ppc64 ppc64le x86_64 aarch64 +BuildRequires: make ohpc-buildroot %global _default_patch_fuzz 1 %description @@ -45,7 +46,7 @@ OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. %build # OpenHPC compiler/mpi designation -%ohpc_setup_compiler +%{ohpc_setup_compiler} # Only *86 CPUs support DYNAMIC_ARCH %ifarch %ix86 x86_64 @@ -62,7 +63,7 @@ make %{?openblas_target} USE_THREAD=1 USE_OPENMP=1 %{?nbjobs_option} \ %install # OpenHPC compiler/mpi designation -%ohpc_setup_compiler +%{ohpc_setup_compiler} make %{?openblas_target} PREFIX=%{buildroot}%{install_path} install diff --git a/components/serial-libs/scotch/SPECS/scotch.spec b/components/serial-libs/scotch/SPECS/scotch.spec index 79dc1c4dc0..0ef410ba05 100644 --- a/components/serial-libs/scotch/SPECS/scotch.spec +++ b/components/serial-libs/scotch/SPECS/scotch.spec @@ -27,7 +27,7 @@ Source2: %{pname}-rpmlintrc Patch0: scotch-6.0.4-destdir.patch BuildRequires: flex bison make -%if 0%{?rhel} +%if 0%{?rhel} || 0%{?openEuler} BuildRequires: bzip2-devel Requires: bzip2-devel BuildRequires: zlib-devel diff --git a/tests/ci/prepare-ci-environment.sh b/tests/ci/prepare-ci-environment.sh index 73c34005d9..072b35ad25 100755 --- a/tests/ci/prepare-ci-environment.sh +++ b/tests/ci/prepare-ci-environment.sh @@ -47,25 +47,36 @@ for like in ${ID_LIKE}; do fi done + +if [ "${ID}" = "openEuler" ]; then + PKG_MANAGER=dnf + FACTORY_VERSION= +fi + + if [ "${PKG_MANAGER}" = "dnf" ]; then - # We need to figure out if we are running on RHEL (clone) 8 or 9 and - # rpmdev-vercmp from rpmdevtools is pretty good at comparing versions. - loop_command "${PKG_MANAGER}" -y install rpmdevtools crypto-policies-scripts "${COMMON_PKGS}" - - # Exit status is 0 if the EVR's are equal, 11 if EVR1 is newer, and 12 if EVR2 - # is newer. Other exit statuses indicate problems. - set +e - rpmdev-vercmp 9 "${VERSION_ID}" - if [ "$?" -eq "11" ]; then - OHPC_RELEASE="http://repos.openhpc.community/OpenHPC/2/CentOS_8/x86_64/ohpc-release-2-1.el8.x86_64.rpm" + if [ "${ID}" = "openEuler" ]; then + OHPC_RELEASE="http://121.36.3.168:82/home:/huangtianhua:/ohpc/standard_$(uname -m)/$(uname -m)/ohpc-release-2-1.oe2203.ohpc.2.0.0.$(uname -m).rpm" else - # This is our RHEL 9 pre-release repository - loop_command wget http://obs.openhpc.community:82/home:/adrianr/CentOS9/home:adrianr.repo -O /etc/yum.repos.d/ohpc-pre-release.repo - # The OBS signing key is too old - update-crypto-policies --set LEGACY - NINE=1 + # We need to figure out if we are running on RHEL (clone) 8 or 9 and + # rpmdev-vercmp from rpmdevtools is pretty good at comparing versions. + loop_command "${PKG_MANAGER}" -y install rpmdevtools crypto-policies-scripts "${COMMON_PKGS}" + + # Exit status is 0 if the EVR's are equal, 11 if EVR1 is newer, and 12 if EVR2 + # is newer. Other exit statuses indicate problems. + set +e + rpmdev-vercmp 9 "${VERSION_ID}" + if [ "$?" -eq "11" ]; then + OHPC_RELEASE="http://repos.openhpc.community/OpenHPC/2/CentOS_8/x86_64/ohpc-release-2-1.el8.x86_64.rpm" + else + # This is our RHEL 9 pre-release repository + loop_command wget http://obs.openhpc.community:82/home:/adrianr/CentOS9/home:adrianr.repo -O /etc/yum.repos.d/ohpc-pre-release.repo + # The OBS signing key is too old + update-crypto-policies --set LEGACY + NINE=1 + fi + set -e fi - set -e else OHPC_RELEASE="http://repos.openhpc.community/OpenHPC/2/Leap_15/x86_64/ohpc-release-2-1.leap15.x86_64.rpm" fi @@ -87,12 +98,16 @@ if [ "${FACTORY_VERSION}" != "" ]; then fi if [ "${PKG_MANAGER}" = "dnf" ]; then - loop_command "${PKG_MANAGER}" -y install ${COMMON_PKGS} epel-release dnf-plugins-core git rpm-build gawk "${OHPC_RELEASE}" - if [ -z "${NINE}" ]; then - loop_command "${PKG_MANAGER}" config-manager --set-enabled powertools - loop_command "${PKG_MANAGER}" config-manager --set-enabled devel + if [ "${ID}" = "openEuler" ]; then + loop_command "${PKG_MANAGER}" -y install ${COMMON_PKGS} openEuler-release dnf-plugins-core git rpm-build gawk "${OHPC_RELEASE}" else - loop_command "${PKG_MANAGER}" config-manager --set-enabled crb + loop_command "${PKG_MANAGER}" -y install ${COMMON_PKGS} epel-release dnf-plugins-core git rpm-build gawk "${OHPC_RELEASE}" + if [ -z "${NINE}" ]; then + loop_command "${PKG_MANAGER}" config-manager --set-enabled powertools + loop_command "${PKG_MANAGER}" config-manager --set-enabled devel + else + loop_command "${PKG_MANAGER}" config-manager --set-enabled crb + fi fi if [ "${FACTORY_VERSION}" != "" ]; then loop_command wget "${FACTORY_REPOSITORY}" -O "${FACTORY_REPOSITORY_DESTINATION}" diff --git a/tests/ci/run_build.py b/tests/ci/run_build.py index e9047bfc96..5bf35fb55e 100755 --- a/tests/ci/run_build.py +++ b/tests/ci/run_build.py @@ -37,9 +37,9 @@ for row in reader: key = row.pop('NAME') - if key == 'ID_LIKE': + if key in ['ID_LIKE', 'ID']: for item in list(row.items())[0]: - if 'fedora' in item: + if 'fedora' in item or 'openEuler' in item: dnf_based = True if key == 'VERSION_ID': version_id = list(row.items())[0][1] @@ -51,7 +51,7 @@ def run_command(command): command, bufsize=1, stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, + stderr=subprocess.PIPE, universal_newlines=True, ) diff --git a/tests/m4/distro_family.m4 b/tests/m4/distro_family.m4 index 6d917c49ce..acfa3426de 100644 --- a/tests/m4/distro_family.m4 +++ b/tests/m4/distro_family.m4 @@ -34,6 +34,9 @@ if test -r "/etc/os-release"; then elif grep -q "openSUSE Leap" /etc/os-release; then AC_MSG_RESULT([openSUSE Leap]) DISTRO_FAMILY=SLES + elif grep -q "openEuler" /etc/os-release; then + AC_MSG_RESULT([openEuler]) + DISTRO_FAMILY=openEuler else AC_MSG_RESULT([unknown]) echo