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
517389
Release:       0.4%{?dist}
517389
Summary:       Unprivileged development environment
517389
517389
License:       ASL 2.0
517389
URL:           https://github.com/containers/%{name}
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
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
517389
Patch102:      toolbox-cmd-run-Make-sosreport-work-by-setting-the-HOST-envi.patch
517389
Patch103:      toolbox-cmd-root-Suggest-a-way-forward-if-coreos-toolbox-was.patch
517389
517389
# https://bugzilla.redhat.com/show_bug.cgi?id=1905383
517389
ExcludeArch:   %{ix86}
517389
517389
BuildRequires: golang >= 1.13
517389
BuildRequires: go-md2man
517389
BuildRequires: meson
517389
BuildRequires: pkgconfig(bash-completion)
517389
BuildRequires: systemd
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}
517389
517389
%description   tests
517389
The %{name}-tests package contains system tests for %{name}.
517389
517389
517389
%prep
517389
%setup -q
517389
517389
%ifnarch ppc64
517389
%patch100 -p1
517389
%else
517389
%patch101 -p1
517389
%endif
517389
517389
%patch102 -p1
517389
%patch103 -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
517389
%meson --buildtype=plain -Dprofile_dir=%{_sysconfdir}/profile.d
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
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