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