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