File toolbox.spec of Package toolbox
Name: toolbox
Version: 0.0.99.4
Release: 0
Summary: Tool for containerized command line environments on Linux
License: Apache-2.0
URL: https://containertoolbx.org/
Source0: https://github.com/containers/%{name}/releases/download/%{version}/%{name}-%{version}-vendored.tar.xz
Source1: vendor.tar.gz
Source2: toolbox.rpmlintrc
# Upstream
Patch0: toolbox-Don-t-use-podman-1-when-generating-the-comp.patch
#OpenSuse
Patch1: toolbox-If-podman-is-not-needed-do-not-check-its-config.patch
BuildRequires: gcc
BuildRequires: go-md2man
BuildRequires: golang
# for tests
#BuildRequires: codespell
#BuildRequires: ShellCheck
BuildRequires: meson >= 0.58.0
BuildRequires: pkgconfig(bash-completion)
BuildRequires: pkgconfig(fish)
BuildRequires: libsubid-devel
BuildRequires: systemd
BuildRequires: systemd-rpm-macros
Requires: libcontainers-common
Requires: podman >= 1.4.0
%description
Toolbox is a tool for Linux operating systems, which allows the use of
containerized command line environments. It is built on top of Podman and
other standard container technologies from OCI.
# The list of requires packages for -support and -experience should be in sync with:
# https://github.com/containers/toolbox/blob/master/images/fedora/f33/extra-packages
%package support
Summary: Required packages for the container image to support %{name}
BuildArch: noarch
# These are really required to make the image work with toolbox
Requires: shadow
Requires: util-linux
Requires: vte-tools
%description support
The %{name}-support package contains all the required packages that are needed
to be installed in the OCI image to make it work with %{name}.
The %{name}-support package should be typically installed from the Dockerfile
if the image isn't based on the fedora-toolbox image.
%package experience
Summary: Set of packages to enhance the %{name} experience
BuildArch: noarch
Requires: %{name}-support = %{version}-%{release}
Requires: bash-completion
Requires: bc
Requires: bzip2
Requires: diffutils
Requires: dnf-plugins-core
Requires: findutils
Requires: flatpak-spawn
Requires: git
Requires: gnupg
Requires: gvfs
Requires: hostname
Requires: iproute
Requires: iputils
Requires: whois
Requires: keyutils
Requires: less
Requires: lsof
Requires: man
Requires: man-pages
Requires: mtr
Requires: nano
Requires: nss-mdns
Requires: openssh-clients
Requires: pigz
Requires: procps
Requires: rsync
Requires: sudo
Requires: tcpdump
Requires: time
Requires: traceroute
Requires: tree
Requires: unzip
Requires: wget
Requires: which
Requires: words
Requires: xorg-x11-xauth
Requires: xz
Requires: zip
%description experience
The %{name}-experience package contains all the packages that should be
installed in the container to provide the same default experience as working
on the host.
The %{name}-experience package should be typically installed from the
Dockerfile if the image isn't based on the fedora-toolbox image.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
export GOFLAGS="-mod=vendor -buildmode=pie"
export CGO_LDFLAGS="${LDFLAGS}"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
export CGO_CXXFLAGS="${CXXFLAGS}"
%meson \
-Dprofile_dir=%{_sysconfdir}/profile.d \
-Dtmpfiles_dir=%{_tmpfilesdir} \
-Dzsh_completions_dir=%{_datadir}/zsh/site-functions
%meson_build
#%%check
#%%meson_test
%install
%meson_install
rm -rvf %{buildroot}%{_datadir}/%{name}
%post
%tmpfiles_create %_tmpfilesdir/%{name}.conf
%files
%doc CODE-OF-CONDUCT.md NEWS README.md SECURITY.md
%license COPYING %{?rhel:src/vendor/modules.txt}
%{_bindir}/%{name}
%{_datadir}/bash-completion
%{_datadir}/fish
%{_datadir}/zsh
%{_mandir}/man1/%{name}.1*
%{_mandir}/man1/%{name}-*.1*
%{_mandir}/man5/%{name}.conf.5*
%{_sysconfdir}/containers/
%config(noreplace) %{_sysconfdir}/containers/%{name}.conf
%config %{_sysconfdir}/profile.d/%{name}.sh
%{_tmpfilesdir}/%{name}.conf
%if 0%{?suse_version} >= 1120
%ghost %{_rundir}/media
%ghost %{_rundir}/host
%endif
%files support
%files experience
%changelog