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
14aa9a
Version:       0.0.99.2^1.git660b6970e998
d5298b
d5298b
%global goipath github.com/containers/%{name}
d5298b
%gometa
d5298b
14aa9a
Release:       1%{?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
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
d5298b
d5298b
# https://bugzilla.redhat.com/show_bug.cgi?id=1905383
d5298b
ExcludeArch:   %{ix86}
d5298b
d5298b
BuildRequires: golang >= 1.13
d5298b
BuildRequires: go-md2man
d5298b
BuildRequires: meson
d5298b
BuildRequires: pkgconfig(bash-completion)
d5298b
BuildRequires: systemd
d5298b
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
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
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
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