Skip to content

Commit

Permalink
openEuler support
Browse files Browse the repository at this point in the history
Signed-off-by: Yikun Jiang <yikunkero@gmail.com>
  • Loading branch information
Yikun committed Dec 20, 2022
1 parent 36f14a0 commit 0c60840
Show file tree
Hide file tree
Showing 32 changed files with 124 additions and 62 deletions.
16 changes: 16 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
10 changes: 10 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
pull_request:
branches:
- 2.x
- 2.x-for-openEuler

env:
SKIP_CI_SPECS: |
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion components/admin/lmod/SPECS/lmod.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion components/admin/powerman/SPECS/powerman.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion components/dev-tools/autoconf/SPECS/autoconf.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions components/dev-tools/automake/SPECS/automake.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion components/dev-tools/cmake/SPECS/cmake.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion components/dev-tools/spack/SPECS/spack.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -33,6 +33,7 @@ Requires(post): update-alternatives
Requires(postun): update-alternatives
%endif
BuildRequires: gcc-c++
BuildRequires: python3-devel
Requires: python3-devel

%description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion components/io-libs/sionlib/SPECS/sionlib.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion components/mpi-families/libfabric/SPECS/libfabric.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion components/mpi-families/mvapich2/SPECS/mvapich2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions components/mpi-families/openmpi/SPECS/openmpi.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}
Expand Down
5 changes: 3 additions & 2 deletions components/parallel-libs/boost/SPECS/boost.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -43,6 +43,7 @@ BuildRequires: libquadmath-devel
%endif
%endif

BuildRequires: make
BuildRequires: fdupes
BuildRequires: dos2unix
BuildRequires: gmp-devel
Expand Down Expand Up @@ -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 ;
Expand Down
2 changes: 1 addition & 1 deletion components/parallel-libs/mumps/SPECS/mumps.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion components/parallel-libs/petsc/SPECS/petsc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion components/parallel-libs/ptscotch/SPECS/ptscotch.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion components/perf-tools/dimemas/SPECS/dimemas.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions components/perf-tools/paraver/SPECS/paraver.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 || :
Expand All @@ -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 || :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion components/rms/munge/SPECS/munge.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions components/rms/openpbs/SPECS/openpbs.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
13 changes: 9 additions & 4 deletions components/rms/slurm/SPECS/slurm.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand All @@ -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,
Expand All @@ -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 \
Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions components/runtimes/charliecloud/SPECS/charliecloud.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
Loading

0 comments on commit 0c60840

Please sign in to comment.