SHA256
1
0
forked from pool/apptainer
Files
apptainer/apptainer.spec
Christian Goll 58d17c44a2 Accepting request 1143083 from home:eeich:branches:network:cluster
- Updated apptainer to version 1.2.5
  * Added `libnvidia-nvvm` to `nvliblist.conf`. Newer NVIDIA
    Drivers (known with >= 525.85.05) require this lib to compile
    OpenCL programs against NVIDIA GPUs, i.e. `libnvidia-opencl`
    depends on `libnvidia-nvvm`.
  * Disable the usage of cgroup in instance creation when
    `--fakeroot` is passed.
  * Disable the usage of cgroup in instance creation when `hidepid`
    mount option on `/proc` is set.
  * Fixed a regression introduced in 1.2.0 where the user's
    password file information was not copied in to the container
    when there was a parent root-mapped user namespace (as is the
    case for example in `cvmfsexec`).
  * Added the upcoming NVIDIA driver library `libnvidia-gpucomp.so`
    to the list of libraries to add to NVIDIA GPU-enabled
    containers. Fixed missing error handling during the creation
    of an encrypted image that lead to the generation of corrupted
    images.
  * Use `APPTAINER_TMPDIR` for temporary files during privileged
    image encryption.
  * If rootless unified cgroups v2 is available when starting an
    image but `XDG_RUNTIME_DIR` or `DBUS_SESSION_BUS_ADDRESS` is
    not set, print an info message that stats will not be available
    instead of exiting with a fatal error.
  * Allow templated build arguments to definition files to have
    empty values.

OBS-URL: https://build.opensuse.org/request/show/1143083
OBS-URL: https://build.opensuse.org/package/show/network:cluster/apptainer?expand=0&rev=64
2024-02-01 07:37:58 +00:00

151 lines
4.8 KiB
RPMSpec

#
# spec file for package apptainer
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define apptainerpath src/github.com/apptainer/
%define _buildshell /bin/bash
Summary: Application and environment virtualization
# CRYPTOGAMS isn't known in OBS
#License: BSD-3-Clause-LBNL and (OpenSSL or CRYPTOGAMS)
License: BSD-3-Clause-LBNL AND OpenSSL
Group: Productivity/Clustering/Computing
Name: apptainer
Version: 1.2.5
Release: 0
# https://spdx.org/licenses/BSD-3-Clause-LBNL.html
URL: https://apptainer.org
Obsoletes: singularity <= 3.8.5
Conflicts: singularity
Conflicts: singularity-ce
Conflicts: singularity-runtime
Source0: https://github.com/apptainer/apptainer/archive/v%{version}%{?vers_suffix}/apptainer-%{version}%{?vers_suffix}.tar.gz
Source1: README.SUSE
Source2: SLE-15SP6.def
Source3: SLE.def
Source4: leap.def
Source20: %{name}-rpmlintrc
Source21: vendor.tar.gz
BuildRequires: cryptsetup
BuildRequires: fdupes
BuildRequires: gcc
BuildRequires: git
BuildRequires: go >= 1.19
BuildRequires: libuuid-devel
BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: sysuser-tools
%ifarch aarch64
BuildRequires: binutils-gold
%endif
BuildRequires: libseccomp-devel
Requires: squashfs
Requires: squashfuse
Recommends: fuse2fs
# Needed for container decryption in userspace, upstream rpms include this
# but factory should have this seperately
Recommends: gocryptfs
PreReq: permissions
# there's no golang for ppc64 & %ix86, ppc64le does not have non pie builds
ExcludeArch: ppc64 ppc64le %ix86 s390 s390x
%description
Apptainer provides functionality to make portable
containers that can be used across host environments.
%prep
%setup -q -n %{name}-%{version}%{?vers_suffix}
cp %{S:1} %{S:2} %{S:3} %{S:4} .
%build
# create VERSION file
echo %version > VERSION
# Not all of these parameters currently have an effect, but they might be
# used someday. They are the same parameters as in the configure macro.
tar xzf %{S:21}
./mconfig -V %{version}-%{release} \
-P release \
--prefix=%{_prefix} \
--exec-prefix=%{_exec_prefix} \
--bindir=%{_bindir} \
--sbindir=%{_sbindir} \
--sysconfdir=%{_sysconfdir} \
--datadir=%{_datadir} \
--includedir=%{_includedir} \
--libdir=%{_libdir} \
--libexecdir=%{_libexecdir} \
--localstatedir=%{_localstatedir}/lib \
--sharedstatedir=%{_sharedstatedir} \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--without-suid \
--reproducible
%make_build -C builddir V=""
%install
export GOPATH=$PWD/gopath
export GOFLAGS=-mod=vendor
export PATH=$GOPATH/bin:$PATH
%make_install -C builddir V=
%fdupes apptainer/examples
%fdupes -s %buildroot
%files
%doc examples
%doc CONTRIBUTING.md
%doc README.md
%doc CHANGELOG.md
%doc CONTRIBUTORS.md
%doc %{basename:%{S:1}}
%doc %{basename:%{S:2}}
%doc %{basename:%{S:3}}
%license LICENSE.md
%license LICENSE_THIRD_PARTY.md
%license LICENSE_DEPENDENCIES.md
%{_bindir}/*
%dir %{_libexecdir}/apptainer
%dir %{_libexecdir}/apptainer/bin
%dir %{_libexecdir}/apptainer/cni
%dir %{_libexecdir}/apptainer/lib
%{_libexecdir}/apptainer/bin/starter
%{_libexecdir}/apptainer/lib/offsetpreload.so
%{_libexecdir}/apptainer/cni/*
%dir %{_sysconfdir}/apptainer
%config(noreplace) %{_sysconfdir}/apptainer/capability.json
%config(noreplace) %{_sysconfdir}/apptainer/cgroups
%config(noreplace) %{_sysconfdir}/apptainer/ecl.toml
%config(noreplace) %{_sysconfdir}/apptainer/global-pgp-public
%config(noreplace) %{_sysconfdir}/apptainer/network
%config(noreplace) %{_sysconfdir}/apptainer/nvliblist.conf
%config(noreplace) %{_sysconfdir}/apptainer/seccomp-profiles
%config(noreplace) %{_sysconfdir}/apptainer/apptainer.conf
%config(noreplace) %{_sysconfdir}/apptainer/remote.yaml
%config(noreplace) %{_sysconfdir}/apptainer/rocmliblist.conf
%config(noreplace) %{_sysconfdir}/apptainer/dmtcp-conf.yaml
%{_datadir}/bash-completion/completions/*
%dir %{_localstatedir}/lib/apptainer
%dir %{_localstatedir}/lib/apptainer/mnt
%dir %{_localstatedir}/lib/apptainer/mnt/session
%{_mandir}/man1/*
%changelog