d5298b
# RHEL's RPM toolchain doesn't like the compressed DWARF data generated by the
d5298b
# Go toolchain.
d5298b
%global _dwz_low_mem_die_limit 0
d5298b
%global _find_debuginfo_dwz_opts %{nil}
d5298b
d5298b
Name:          toolbox
ba23b3
Version:       0.0.99.3
d5298b
d5298b
%global goipath github.com/containers/%{name}
d5298b
%gometa
d5298b
df4283
Release:       0.6%{?dist}
d5298b
Summary:       Unprivileged development environment
d5298b
d5298b
License:       ASL 2.0
d5298b
URL:           https://github.com/containers/%{name}
d5298b
d5298b
# https://github.com/containers/%%{name}/releases/download/%%{version}/%%{name}-%%{version}.tar.xz
d5298b
# A vendored tarball was created from the upstream tarball:
d5298b
# $ cd src
d5298b
# $ go mod vendor
d5298b
Source0:       %{name}-%{version}-vendored.tar.xz
0273d8
Source1:       %{name}.conf
d5298b
d5298b
# RHEL specific
d5298b
Patch100:      toolbox-Make-the-build-flags-match-RHEL-s-gobuild.patch
d5298b
Patch101:      toolbox-Make-the-build-flags-match-RHEL-s-gobuild-for-PPC64.patch
0273d8
Patch102:      toolbox-cmd-run-Make-sosreport-work-by-setting-the-HOST-envi.patch
4c5362
Patch103:      toolbox-cmd-root-Suggest-a-way-forward-if-coreos-toolbox-was.patch
d5298b
d5298b
# https://bugzilla.redhat.com/show_bug.cgi?id=1905383
d5298b
ExcludeArch:   %{ix86}
d5298b
df4283
BuildRequires: golang >= 1.17.7
df4283
BuildRequires: /usr/bin/go-md2man
d5298b
BuildRequires: meson
d5298b
BuildRequires: pkgconfig(bash-completion)
d5298b
BuildRequires: systemd
d5298b
0273d8
Requires:      containers-common
d5298b
Requires:      podman >= 1.4.0
d5298b
d5298b
d5298b
%description
d5298b
Toolbox is a tool for Linux operating systems, which allows the use of
d5298b
containerized command line environments. It is built on top of Podman and
d5298b
other standard container technologies from OCI.
d5298b
d5298b
d5298b
%package       tests
d5298b
Summary:       Tests for %{name}
d5298b
d5298b
Requires:      %{name}%{?_isa} = %{version}-%{release}
d5298b
d5298b
%description   tests
d5298b
The %{name}-tests package contains system tests for %{name}.
d5298b
d5298b
d5298b
%prep
d5298b
%setup -q
d5298b
d5298b
%ifnarch ppc64
d5298b
%patch100 -p1
d5298b
%else
d5298b
%patch101 -p1
d5298b
%endif
d5298b
0273d8
%patch102 -p1
4c5362
%patch103 -p1
0273d8
d5298b
# %%gomkdir is absent from RHEL 8.
d5298b
GOBUILDDIR="$(pwd)/_build"
d5298b
GOSOURCEDIR="$(pwd)"
d5298b
if [[ ! -e "$GOBUILDDIR/bin" ]] ; then
d5298b
  install -m 0755 -vd "$GOBUILDDIR/bin"
d5298b
fi
d5298b
if [[ ! -e "$GOBUILDDIR/src/%{goipath}" ]] ; then
d5298b
  install -m 0755 -vd "$(dirname $GOBUILDDIR/src/%{goipath})"
d5298b
  ln -fs "$GOSOURCEDIR" "$GOBUILDDIR/src/%{goipath}"
d5298b
fi
d5298b
cd "$GOBUILDDIR/src/%{goipath}"
d5298b
d5298b
d5298b
%build
d5298b
export GO111MODULE=off
d5298b
GOBUILDDIR="$(pwd)/_build"
d5298b
export GOPATH="$GOBUILDDIR:%{gopath}"
d5298b
export CGO_CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
d5298b
ln -s src/cmd cmd
d5298b
ln -s src/pkg pkg
d5298b
ln -s src/vendor vendor
d5298b
%meson --buildtype=plain -Dprofile_dir=%{_sysconfdir}/profile.d
d5298b
%meson_build
d5298b
d5298b
d5298b
%install
d5298b
%meson_install
0273d8
install -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/containers/%{name}.conf
d5298b
d5298b
d5298b
%files
d5298b
%doc CODE-OF-CONDUCT.md NEWS README.md SECURITY.md
d5298b
%license COPYING
d5298b
%{_bindir}/%{name}
d5298b
%{_datadir}/bash-completion
d5298b
%{_mandir}/man1/%{name}.1*
d5298b
%{_mandir}/man1/%{name}-*.1*
14aa9a
%config(noreplace) %{_sysconfdir}/containers/%{name}.conf
d5298b
%{_sysconfdir}/profile.d/%{name}.sh
d5298b
%{_tmpfilesdir}/%{name}.conf
d5298b
d5298b
%files tests
d5298b
%{_datadir}/%{name}
d5298b
d5298b
d5298b
%changelog
df4283
* Wed May 11 2022 Jindrich Novy <jnovy@redhat.com> - 0.0.99.3-0.6
df4283
- BuildRequires: /usr/bin/go-md2man
df4283
- Related: #2061390
df4283
df4283
* Fri Apr 08 2022 Jindrich Novy <jnovy@redhat.com> - 0.0.99.3-0.5
df4283
- Related: #2061390
df4283
e337f3
* Mon Sep 20 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.99.3-0.4
71ef4b
- Switch to using the Toolbox-specific UBI image by default
e337f3
- Related: #2001445
71ef4b
4c5362
* Thu Sep 02 2021 Debarshi Ray <rishi@fedoraproject.org> - 0.0.99.3-0.3
4c5362
- Suggest a way forward if coreos/toolbox was used
e337f3
Resolves: #1998191, #2000914
4c5362
0273d8
* Thu Aug 26 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.99.3-0.2
0273d8
- Make sosreport work by setting the HOST environment variable
0273d8
- Related: #1934415
0273d8
00e358
* Wed Aug 11 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.99.3-0.1
00e358
- change release to 0.x so it is obvious it is devel version
00e358
- Related: #1934415
00e358
ba23b3
* Thu Aug 05 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.99.3-1
ba23b3
- Fix the build on CentOS Stream
ba23b3
- Related: #1934415
ba23b3
14aa9a
* Wed Jul 28 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.99.2^1.git660b6970e998-1
14aa9a
- Add support for configuration files
14aa9a
Resolves: #1940082
14aa9a
- Related: #1934415
14aa9a
6a258f
* Mon Jul 26 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.99.2-4
6a258f
- Instead of offering to log into a registry, just mention 'podman login'
6a258f
- Related: #1934415
6a258f
6a258f
* Sat Jul 10 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.99.2-3
6a258f
- Expose the host's entire / in the container at /run/host
6a258f
- Related: #1934415
6a258f
6a258f
* Mon Jul 05 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.99.2-2
6a258f
- Actually apply the patch to make 'toolbox' create or fall back to a
6a258f
  container if possible
6a258f
- Support logging into a registry if necessary
6a258f
- Related: #1934415
6a258f
6a258f
* Fri Jul 02 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.99.2-1
6a258f
- Update to 0.0.99.2
6a258f
- Make 'toolbox' create or fall back to a container if possible
6a258f
Resolves: #1914687
6a258f
- Related: #1934415
6a258f
d5298b
* Tue Jan 12 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.99-1
d5298b
- Update to 0.0.99
d5298b
- Related: #1883490
d5298b
d5298b
* Tue Jan 12 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.98.1-3
d5298b
- remove bats as it's not present in RHEL
d5298b
- Related: #1883490
d5298b
d5298b
* Mon Jan 11 2021 Jindrich Novy <jnovy@redhat.com> - 0.0.98.1-2
d5298b
- harden the toolbox binary
d5298b
- minor fixes
d5298b
- Related: #1883490
d5298b
d5298b
* Fri Jan 08 2021 Debarshi Ray <rishi@fedoraproject.org> - 0.0.98.1-1
d5298b
- Rebase to github.com/containers/toolbox