a1353c
%global __brp_check_rpaths %{nil}
a1353c
517389
# RHEL's RPM toolchain doesn't like the compressed DWARF data generated by the
517389
# Go toolchain.
517389
%global _dwz_low_mem_die_limit 0
517389
%global _find_debuginfo_dwz_opts %{nil}
517389
517389
Name:          toolbox
517389
Version:       0.0.99.3
517389
517389
%global goipath github.com/containers/%{name}
517389
%gometa
517389
a1353c
Release:       7%{?dist}
a1353c
Summary:       Tool for containerized command line environments on Linux
517389
517389
License:       ASL 2.0
a1353c
URL:           https://containertoolbx.org/
517389
517389
# https://github.com/containers/%%{name}/releases/download/%%{version}/%%{name}-%%{version}.tar.xz
517389
# A vendored tarball was created from the upstream tarball:
517389
# $ cd src
517389
# $ go mod vendor
517389
Source0:       %{name}-%{version}-vendored.tar.xz
517389
Source1:       %{name}.conf
517389
a1353c
# https://bugzilla.redhat.com/show_bug.cgi?id=2152907
a1353c
Patch0:        toolbox-Unbreak-sorting-and-clearly-identify-copied-images-in-list.patch
a1353c
a1353c
# https://bugzilla.redhat.com/show_bug.cgi?id=2165610
a1353c
Patch1:        toolbox-Support-RHEL-9-containers.patch
a1353c
517389
# RHEL specific
517389
Patch100:      toolbox-Make-the-build-flags-match-RHEL-s-gobuild.patch
517389
Patch101:      toolbox-Make-the-build-flags-match-RHEL-s-gobuild-for-PPC64.patch
a1353c
Patch102:      toolbox-Add-migration-paths-for-coreos-toolbox-users.patch
517389
517389
# https://bugzilla.redhat.com/show_bug.cgi?id=1905383
517389
ExcludeArch:   %{ix86}
517389
a1353c
BuildRequires: golang >= 1.19.4
a1353c
BuildRequires: /usr/bin/go-md2man
a1353c
BuildRequires: meson >= 0.58.0
517389
BuildRequires: pkgconfig(bash-completion)
a1353c
BuildRequires: systemd-rpm-macros
517389
517389
Requires:      containers-common
517389
Requires:      podman >= 1.4.0
517389
517389
517389
%description
517389
Toolbox is a tool for Linux operating systems, which allows the use of
517389
containerized command line environments. It is built on top of Podman and
517389
other standard container technologies from OCI.
517389
517389
517389
%package       tests
517389
Summary:       Tests for %{name}
517389
517389
Requires:      %{name}%{?_isa} = %{version}-%{release}
a1353c
Requires:      coreutils
a1353c
Requires:      gawk
a1353c
Requires:      grep
a1353c
Requires:      skopeo
517389
517389
%description   tests
517389
The %{name}-tests package contains system tests for %{name}.
517389
517389
517389
%prep
517389
%setup -q
517389
a1353c
%patch0 -p1
a1353c
%patch1 -p1
a1353c
517389
%ifnarch ppc64
517389
%patch100 -p1
517389
%else
517389
%patch101 -p1
517389
%endif
517389
517389
%patch102 -p1
517389
517389
# %%gomkdir is absent from RHEL 8.
517389
GOBUILDDIR="$(pwd)/_build"
517389
GOSOURCEDIR="$(pwd)"
517389
if [[ ! -e "$GOBUILDDIR/bin" ]] ; then
517389
  install -m 0755 -vd "$GOBUILDDIR/bin"
517389
fi
517389
if [[ ! -e "$GOBUILDDIR/src/%{goipath}" ]] ; then
517389
  install -m 0755 -vd "$(dirname $GOBUILDDIR/src/%{goipath})"
517389
  ln -fs "$GOSOURCEDIR" "$GOBUILDDIR/src/%{goipath}"
517389
fi
517389
cd "$GOBUILDDIR/src/%{goipath}"
517389
517389
517389
%build
517389
export GO111MODULE=off
517389
GOBUILDDIR="$(pwd)/_build"
517389
export GOPATH="$GOBUILDDIR:%{gopath}"
517389
export CGO_CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
517389
ln -s src/cmd cmd
517389
ln -s src/pkg pkg
517389
ln -s src/vendor vendor
a1353c
a1353c
%meson \
a1353c
    --buildtype=plain \
a1353c
    -Dmigration_path_for_coreos_toolbox=true \
a1353c
    -Dprofile_dir=%{_sysconfdir}/profile.d \
a1353c
    -Dtmpfiles_dir=%{_tmpfilesdir}
a1353c
517389
%meson_build
517389
517389
517389
%install
517389
%meson_install
517389
install -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/containers/%{name}.conf
517389
517389
517389
%files
517389
%doc CODE-OF-CONDUCT.md NEWS README.md SECURITY.md
517389
%license COPYING
517389
%{_bindir}/%{name}
517389
%{_datadir}/bash-completion
517389
%{_mandir}/man1/%{name}.1*
517389
%{_mandir}/man1/%{name}-*.1*
517389
%config(noreplace) %{_sysconfdir}/containers/%{name}.conf
517389
%{_sysconfdir}/profile.d/%{name}.sh
517389
%{_tmpfilesdir}/%{name}.conf
517389
517389
%files tests
517389
%{_datadir}/%{name}
517389
517389
517389
%changelog
a1353c
* Mon Feb 06 2023 Debarshi Ray <rishi@fedoraproject.org> - 0.0.99.3-7
a1353c
- Rebuild for CVE-2022-41717
a1353c
Resolves: #2163737
a1353c
a1353c
* Mon Jan 30 2023 Debarshi Ray <rishi@fedoraproject.org> - 0.0.99.3-6
a1353c
- Support RHEL 9 Toolbx containers
a1353c
Resolves: #2165610
a1353c
a1353c
* Tue Dec 13 2022 Debarshi Ray <rishi@fedoraproject.org> - 0.0.99.3-5
a1353c
- Unbreak sorting and clearly identify copied images in 'list'
a1353c
Resolves: #2152907
a1353c
a1353c
* Mon Nov 07 2022 Debarshi Ray <rishi@fedoraproject.org> - 0.0.99.3-4
a1353c
- Rebuild for CVE-2022-27664 and CVE-2022-32189
a1353c
Resolves: #2116761, #2126749
a1353c
a1353c
* Mon Nov 07 2022 Debarshi Ray <rishi@fedoraproject.org> - 0.0.99.3-3
a1353c
- Rebuild for CVE-2022-1705, CVE-2022-30630, CVE-2022-30631 and CVE-2022-30632
a1353c
Resolves: #2111827
a1353c
a1353c
* Mon Nov 07 2022 Debarshi Ray <rishi@fedoraproject.org> - 0.0.99.3-2
a1353c
- Update to 0.0.99.3
a1353c
- BuildRequire only systemd-rpm-macros as recommended by the Fedora packaging
a1353c
  guidelines
a1353c
- Update the Summary to match upstream
a1353c
- Update the URL to point to the website
a1353c
Resolves: #2115089
a1353c
030d89
* Fri Apr 08 2022 Jindrich Novy <jnovy@redhat.com> - 0.0.99.3-0.5
030d89
- bump golang BR to 1.17.7
030d89
- Related: #2061390
030d89
517389
* Mon Sep 20 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.99.3-0.4
517389
- Switch to using the Toolbox-specific UBI image by default
517389
- Related: #2001445
517389
517389
* Thu Sep 02 2021 Debarshi Ray <rishi@fedoraproject.org> - 0.0.99.3-0.3
517389
- Suggest a way forward if coreos/toolbox was used
517389
Resolves: #1998191, #2000914
517389
517389
* Thu Aug 26 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.99.3-0.2
517389
- Make sosreport work by setting the HOST environment variable
517389
- Related: #1934415
517389
517389
* Wed Aug 11 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.99.3-0.1
517389
- change release to 0.x so it is obvious it is devel version
517389
- Related: #1934415
517389
517389
* Thu Aug 05 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.99.3-1
517389
- Fix the build on CentOS Stream
517389
- Related: #1934415
517389
517389
* Wed Jul 28 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.99.2^1.git660b6970e998-1
517389
- Add support for configuration files
517389
Resolves: #1940082
517389
- Related: #1934415
517389
517389
* Mon Jul 26 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.99.2-4
517389
- Instead of offering to log into a registry, just mention 'podman login'
517389
- Related: #1934415
517389
517389
* Sat Jul 10 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.99.2-3
517389
- Expose the host's entire / in the container at /run/host
517389
- Related: #1934415
517389
517389
* Mon Jul 05 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.99.2-2
517389
- Actually apply the patch to make 'toolbox' create or fall back to a
517389
  container if possible
517389
- Support logging into a registry if necessary
517389
- Related: #1934415
517389
517389
* Fri Jul 02 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.99.2-1
517389
- Update to 0.0.99.2
517389
- Make 'toolbox' create or fall back to a container if possible
517389
Resolves: #1914687
517389
- Related: #1934415
517389
517389
* Tue Jan 12 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.99-1
517389
- Update to 0.0.99
517389
- Related: #1883490
517389
517389
* Tue Jan 12 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.98.1-3
517389
- remove bats as it's not present in RHEL
517389
- Related: #1883490
517389
517389
* Mon Jan 11 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.98.1-2
517389
- harden the toolbox binary
517389
- minor fixes
517389
- Related: #1883490
517389
517389
* Fri Jan 08 2021 Debarshi Ray <rishi@fedoraproject.org> - 0.0.98.1-1
517389
- Rebase to github.com/containers/toolbox