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