Skip to content

Commit

Permalink
Publish system dependencies for Alma/RHEL 9
Browse files Browse the repository at this point in the history
EL9 needs at least aliBuild v1.15.0, since that uses tarballs from S3 by
default on slc9.
  • Loading branch information
TimoWilken committed Nov 2, 2023
1 parent 669bee4 commit efdd210
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/o2-full-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,42 @@ jobs:
rclone --config /tmp/rclone.conf --transfers=10 --progress --delete-before \
sync local:./ rpms3:alibuild-repo/RPMS/o2-full-deps_el8.x86-64/
rpm-el9:
runs-on: ubuntu-latest
container: almalinux:9
env:
ALIBUILD_TAG: v1.15.0

steps:
# For rpms/*.spec
- uses: actions/checkout@v3

- name: Install prerequisites
run: |
set -x
yum clean all
yum update -y
yum install -y rpm-build scl-utils-build createrepo unzip git python3 python3-pip python3-setuptools
curl https://rclone.org/install.sh | bash
cat << EOF > /tmp/rclone.conf
${{ secrets.S3_RCLONE_CONFIG }}
EOF
- name: Build the EL9 RPM and create a yum repo
run: |
set -x
rpmbuild -ba rpms/o2-prereq-alma9.spec
git clone -b "$ALIBUILD_TAG" https://github.com/alisw/alibuild
pushd alibuild
python3 setup.py bdist_rpm --requires python3,git,python3-pyyaml,python3-requests,python3-distro
cp dist/alibuild-*.noarch.rpm ~/rpmbuild/RPMS/x86_64/
popd
cd ~/rpmbuild/RPMS/x86_64/
createrepo .
ls -la
rclone --config /tmp/rclone.conf --transfers=10 --progress --delete-before \
sync local:./ rpms3:alibuild-repo/RPMS/o2-full-deps_el9.x86-64/
rpm-fedora:
runs-on: ubuntu-latest
container: fedora:33
Expand Down
87 changes: 87 additions & 0 deletions rpms/o2-prereq-alma9.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
%global scl_name_prefix alice-
%global scl_name_base o2-full-deps

%global scl %{scl_name_prefix}%{scl_name_base}

# Optional but recommended: define nfsmountable
%global nfsmountable 1

%scl_package %scl
%global _scl_prefix /opt/alice

Summary: Package that installs %scl
Name: %scl_name
Version: 1
Release: 1%{?dist}
License: GPLv2+
Requires: make rsync glew-devel pigz which git mysql-devel curl curl-devel bzip2 bzip2-devel unzip autoconf automake texinfo gettext gettext-devel libtool freetype freetype-devel libpng libpng-devel sqlite sqlite-devel ncurses-devel mesa-libGLU-devel libX11-devel libXpm-devel libXext-devel libXft-devel libXi-devel libxml2 libxml2-devel motif motif-devel kernel-devel pciutils-devel kmod-devel bison flex perl-ExtUtils-Embed environment-modules tk-devel libXinerama-devel libXcursor-devel libXrandr-devel subversion-devel apr-util-devel apr-devel
BuildRequires: scl-utils-build

%description
Metapackage which brings in all AliceO2 dependencies

%package runtime
Summary: Package that handles %scl Software Collection.
Requires: scl-utils

%description runtime
Package shipping essential scripts to work with %scl Software Collection.

%package build
Summary: Package shipping basic build configuration
Requires: scl-utils-build

%description build
Package shipping essential configuration macros to build %scl Software Collection.

%prep
%setup -c -T

%install
%scl_install

# There are currently no published RPMs for el9, so to avoid error messages
# from "yum update", don't install the .repo files.
#mkdir -p $RPM_BUILD_ROOT%_root_sysconfdir/yum.repos.d
#cat > $RPM_BUILD_ROOT%_root_sysconfdir/yum.repos.d/alisw.repo <<EOF
#[alisw]
#name=ALICE Software - EL9
#baseurl=https://s3.cern.ch/swift/v1/alibuild-repo/RPMS/el9.x86_64/
#enabled=0
#gpgcheck=0
#EOF
#
#cat > $RPM_BUILD_ROOT%_root_sysconfdir/yum.repos.d/alisw-upd.repo <<EOF
#[alisw-upd]
#name=ALICE Software - EL9
#baseurl=https://s3.cern.ch/swift/v1/alibuild-repo/UpdRPMS/el9.x86_64/
#enabled=0
#gpgcheck=0
#EOF

mkdir -p %{buildroot}%{_scl_prefix}
cat >> %{buildroot}%{_scl_scripts}/enable << EOF
export PATH="%{_bindir}:%{_sbindir}\${PATH:+:\${PATH}}"
export LD_LIBRARY_PATH="%{_libdir}\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}}"
export MANPATH="%{_mandir}:\${MANPATH:-}"
export PKG_CONFIG_PATH="%{_libdir}/pkgconfig\${PKG_CONFIG_PATH:+:\${PKG_CONFIG_PATH}}"
EOF

# Install the generated man page
mkdir -p %{buildroot}%{_mandir}/man7/
#install -p -m 644 %{scl_name}.7 %{buildroot}%{_mandir}/man7/

%files

%files runtime -f filelist
%scl_files
%_root_sysconfdir/yum.repos.d/alisw-el8.repo
%_root_sysconfdir/yum.repos.d/alisw-upd-el8.repo

%files build
%{_root_sysconfdir}/rpm/macros.%{scl}-config

%changelog
* Fri Nov 02 2023 Timo Wilken &lt;[email protected]&gt; 1-1
- Initial package

0 comments on commit efdd210

Please sign in to comment.