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