Blame toolbox.spec

01cc5e6
%global __brp_check_rpaths %{nil}
01cc5e6
33bd39b
Name:          toolbox
95d6ea8
Version:       0.0.99.4
ba60453
ba60453
%global goipath github.com/containers/%{name}
Martin Jackson fbfe9ff
Martin Jackson fbfe9ff
%if 0%{?rhel} == 9
ba60453
%gometa
Martin Jackson fbfe9ff
%else
Martin Jackson fbfe9ff
%gometa -f
Martin Jackson fbfe9ff
%endif
ba60453
a8db8e5
Release:       2%{?dist}
Debarshi Ray a88a4b9
Summary:       Tool for containerized command line environments on Linux
33bd39b
33bd39b
License:       ASL 2.0
deb9c1e
URL:           https://containertoolbx.org/
95d6ea8
Source0:       https://github.com/containers/%{name}/releases/download/%{version}/%{name}-%{version}-vendored.tar.xz
01cc5e6
2f7d549
# Upstream
2f7d549
Patch0:        toolbox-Don-t-use-podman-1-when-generating-the-comp.patch
a8db8e5
Patch1:        toolbox-Sprinkle-a-debug-log.patch 
2f7d549
ba60453
# Fedora specific
79167d7
Patch100:      toolbox-Make-the-build-flags-match-Fedora-s-gobuild.patch
79167d7
Patch101:      toolbox-Make-the-build-flags-match-Fedora-s-gobuild-for-PPC64.patch
33bd39b
df688dd
BuildRequires: gcc
0329ca3
BuildRequires: go-md2man
7556bb6
BuildRequires: golang >= 1.19.4
46d2ca5
%if ! 0%{?rhel}
95d6ea8
BuildRequires: golang(github.com/HarryMichal/go-version) >= 1.0.1
95d6ea8
BuildRequires: golang(github.com/acobaugh/osrelease) >= 0.1.0
95d6ea8
BuildRequires: golang(github.com/briandowns/spinner) >= 1.17.0
d3ce957
BuildRequires: golang(github.com/docker/go-units) >= 0.4.0
95d6ea8
BuildRequires: golang(github.com/fsnotify/fsnotify) >= 1.5.1
95d6ea8
BuildRequires: golang(github.com/godbus/dbus) >= 5.0.6
95d6ea8
BuildRequires: golang(github.com/sirupsen/logrus) >= 1.8.1
95d6ea8
BuildRequires: golang(github.com/spf13/cobra) >= 1.3.0
95d6ea8
BuildRequires: golang(github.com/spf13/viper) >= 1.10.1
ba60453
BuildRequires: golang(golang.org/x/sys/unix)
95d6ea8
BuildRequires: golang(golang.org/x/term)
484d3d6
# for tests
95d6ea8
# BuildRequires: codespell
ecc081d
# BuildRequires: golang(github.com/stretchr/testify) >= 1.7.0
ecc081d
# BuildRequires: ShellCheck
46d2ca5
%endif
88b0cbf
BuildRequires: meson >= 0.58.0
f5b32ef
BuildRequires: pkgconfig(bash-completion)
95d6ea8
BuildRequires: pkgconfig(fish)
95d6ea8
BuildRequires: shadow-utils-subid-devel
95d6ea8
BuildRequires: systemd
9bebde5
BuildRequires: systemd-rpm-macros
33bd39b
f8eb06d
Requires:      containers-common
3d415cb
Requires:      flatpak-session-helper
3071f36
Requires:      podman >= 1.4.0
33bd39b
33bd39b
33bd39b
%description
07c5601
Toolbox is a tool for Linux operating systems, which allows the use of
07c5601
containerized command line environments. It is built on top of Podman and
07c5601
other standard container technologies from OCI.
33bd39b
484d3d6
%if ! 0%{?rhel}
484d3d6
7c7b43b
# The list of requires packages for -support and -experience should be in sync with:
1e0a40d
# https://github.com/containers/toolbox/blob/master/images/fedora/f33/extra-packages
7c7b43b
%package       support
7c7b43b
Summary:       Required packages for the container image to support %{name}
7c7b43b
7c7b43b
# These are really required to make the image work with toolbox
7c7b43b
Requires:      passwd
7c7b43b
Requires:      shadow-utils
08f687e
Requires:      util-linux
7c7b43b
Requires:      vte-profile
7c7b43b
7c7b43b
%description   support
7c7b43b
The %{name}-support package contains all the required packages that are needed
8803d58
to be installed in the OCI image to make it work with %{name}.
7c7b43b
7c7b43b
The %{name}-support package should be typically installed from the Dockerfile
7c7b43b
if the image isn't based on the fedora-toolbox image.
7c7b43b
7c7b43b
7c7b43b
%package       experience
7c7b43b
Summary:       Set of packages to enhance the %{name} experience
7c7b43b
8713467
Requires:      %{name}-support = %{version}-%{release}
7c7b43b
Requires:      bash-completion
42c803e
Requires:      bc
7c7b43b
Requires:      bzip2
7c7b43b
Requires:      diffutils
7c7b43b
Requires:      dnf-plugins-core
7c7b43b
Requires:      findutils
8713467
Requires:      flatpak-spawn
7c7b43b
Requires:      fpaste
7c7b43b
Requires:      git
7c7b43b
Requires:      gnupg
7c7b43b
Requires:      gnupg2-smime
8713467
Requires:      gvfs-client
7c7b43b
Requires:      hostname
42c803e
Requires:      iproute
7c7b43b
Requires:      iputils
7c7b43b
Requires:      jwhois
7c7b43b
Requires:      keyutils
61caa93
Requires:      krb5-libs
7c7b43b
Requires:      less
7c7b43b
Requires:      lsof
7c7b43b
Requires:      man-db
7c7b43b
Requires:      man-pages
7c7b43b
Requires:      mtr
12df1ef
Requires:      nano-default-editor
61caa93
Requires:      nss-mdns
7c7b43b
Requires:      openssh-clients
7c7b43b
Requires:      pigz
7c7b43b
Requires:      procps-ng
7c7b43b
Requires:      rsync
7c7b43b
Requires:      sudo
7c7b43b
Requires:      tcpdump
7c7b43b
Requires:      time
7c7b43b
Requires:      traceroute
7c7b43b
Requires:      tree
7c7b43b
Requires:      unzip
7c7b43b
Requires:      wget
7c7b43b
Requires:      which
7c7b43b
Requires:      words
61caa93
Requires:      xorg-x11-xauth
7c7b43b
Requires:      xz
7c7b43b
Requires:      zip
7c7b43b
7c7b43b
%description   experience
7c7b43b
The %{name}-experience package contains all the packages that should be
7c7b43b
installed in the container to provide the same default experience as working
7c7b43b
on the host.
7c7b43b
7c7b43b
The %{name}-experience package should be typically installed from the
7c7b43b
Dockerfile if the image isn't based on the fedora-toolbox image.
7c7b43b
484d3d6
%endif
33bd39b
f9e5eff
%package       tests
f9e5eff
Summary:       Tests for %{name}
f9e5eff
f9e5eff
Requires:      %{name}%{?_isa} = %{version}-%{release}
f9e5eff
Requires:      bats
a961891
Requires:      coreutils
a961891
Requires:      gawk
a961891
Requires:      grep
a961891
Requires:      skopeo
f9e5eff
f9e5eff
%description   tests
f9e5eff
The %{name}-tests package contains system tests for %{name}.
f9e5eff
f9e5eff
33bd39b
%prep
95d6ea8
%setup -q
2f7d549
%patch0 -p1
a8db8e5
%patch1 -p1
ba60453
ba60453
%ifnarch ppc64
79167d7
%patch100 -p1
ba60453
%else
79167d7
%patch101 -p1
ba60453
%endif
ba60453
cbcdb7a
%gomkdir -s %{_builddir}/%{extractdir}/src %{?rhel:-k}
33bd39b
33bd39b
33bd39b
%build
5e28822
export %{gomodulesmode}
ba60453
export GOPATH=%{gobuilddir}:%{gopath}
12f33fe
export CGO_CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
cbcdb7a
95d6ea8
%meson \
95d6ea8
    -Dprofile_dir=%{_sysconfdir}/profile.d \
95d6ea8
    -Dtmpfiles_dir=%{_tmpfilesdir} \
95d6ea8
    -Dzsh_completions_dir=%{_datadir}/zsh/site-functions
33bd39b
%meson_build
33bd39b
33bd39b
12df1ef
# %%check
12df1ef
# %%meson_test
33bd39b
33bd39b
33bd39b
%install
33bd39b
%meson_install
33bd39b
33bd39b
33bd39b
%files
ba60453
%doc CODE-OF-CONDUCT.md NEWS README.md SECURITY.md
46d2ca5
%license COPYING %{?rhel:src/vendor/modules.txt}
33bd39b
%{_bindir}/%{name}
f5b32ef
%{_datadir}/bash-completion
95d6ea8
%{_datadir}/fish
95d6ea8
%{_datadir}/zsh
Debarshi Ray b63f98c
%{_mandir}/man1/%{name}.1*
Debarshi Ray b63f98c
%{_mandir}/man1/%{name}-*.1*
95d6ea8
%{_mandir}/man5/%{name}.conf.5*
Oliver Gutierrez afdd5f1
%config(noreplace) %{_sysconfdir}/containers/%{name}.conf
221c815
%{_sysconfdir}/profile.d/%{name}.sh
Debarshi Ray b63f98c
%{_tmpfilesdir}/%{name}.conf
33bd39b
484d3d6
%if ! 0%{?rhel}
484d3d6
7c7b43b
%files support
7c7b43b
7c7b43b
%files experience
7c7b43b
484d3d6
%endif
484d3d6
f9e5eff
%files tests
f9e5eff
%{_datadir}/%{name}
f9e5eff
33bd39b
33bd39b
%changelog
a8db8e5
* Wed Mar 8 2023 Nieves Montero <nmontero@redhat.com> - 0.0.99.4-2
a8db8e5
- Sprinkle a debug log
a8db8e5
95d6ea8
* Wed Feb 22 2023 Debarshi Ray <rishi@fedoraproject.org> - 0.0.99.4-1
95d6ea8
- Update to 0.0.99.4
95d6ea8
Martin Jackson fbfe9ff
* Wed Feb 22 2023 Martin Jackson <mhjacks@swbell.net> - 0.0.99.3-12
Martin Jackson fbfe9ff
- Fix the ExclusiveArch
Martin Jackson fbfe9ff
7ce081c
* Tue Feb 21 2023 Debarshi Ray <rishi@fedoraproject.org> - 0.0.99.3-11
7ce081c
- Add ExclusiveArch to match Podman
7ce081c
484d3d6
* Thu Feb 02 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 0.0.99.3-10
484d3d6
- Sync packaging changes from CentOS Stream
484d3d6
1815f64
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.99.3-9
1815f64
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
1815f64
46d2ca5
* Thu Dec 22 2022 Yaakov Selkowitz <yselkowi@redhat.com> - 0.0.99.3-8
46d2ca5
- Use vendored dependencies for RHEL/ELN builds
46d2ca5
9dc2383
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.99.3-7
9dc2383
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
9dc2383
f6c0926
* Tue Jul 19 2022 Maxwell G <gotmax@e.email> - 0.0.99.3-6
f6c0926
- Rebuild for CVE-2022-{1705,32148,30631,30633,28131,30635,30632,30630,1962} in
f6c0926
  golang
f6c0926
c2a3244
* Sat Jun 18 2022 Robert-André Mauchin <zebob.m@gmail.com> - 0.0.99.3-5
c2a3244
- Rebuilt for CVE-2022-1996, CVE-2022-24675, CVE-2022-28327, CVE-2022-27191,
c2a3244
  CVE-2022-29526, CVE-2022-30629
c2a3244
b130695
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.99.3-4
b130695
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
b130695
3a1aa2f
* Sun Jan 09 2022 Ondřej Míchal <harrymichal@fedoraproject.org> - 0.0.99.3-3
3a1aa2f
- Add upstream patch fixing doubled error messages
3a1aa2f
9bebde5
* Fri Dec 10 2021 Debarshi Ray <rishi@fedoraproject.org> - 0.0.99.3-2
9bebde5
- BuildRequire only systemd-rpm-macros as recommended by the Fedora packaging
9bebde5
  guidelines
9bebde5
08f687e
* Fri Dec 10 2021 Debarshi Ray <rishi@fedoraproject.org> - 0.0.99.3-1
08f687e
- Update to 0.0.99.3
08f687e
70f5d23
* Mon Oct 25 2021 Debarshi Ray <rishi@fedoraproject.org> - 0.0.99.2^3.git075b9a8d2779-9
70f5d23
- Restore backwards compatibility with existing containers
70f5d23
01cc5e6
* Fri Oct 22 2021 Debarshi Ray <rishi@fedoraproject.org> - 0.0.99.2^3.git075b9a8d2779-8
01cc5e6
- Ensure that binaries are run against their build-time ABI
01cc5e6
Oliver Gutierrez c872492
* Mon Sep 13 2021 Oliver Gutiérrez <ogutierrez@fedoraproject.org> - 0.0.99.2^3.git075b9a8d2779-7
Oliver Gutierrez c872492
- Rebuilt for gating tests
Oliver Gutierrez c872492
Oliver Gutierrez c41104f
* Thu Sep 09 2021 Oliver Gutiérrez <ogutierrez@fedoraproject.org> - 0.0.99.2^3.git075b9a8d2779-6
Oliver Gutierrez c41104f
- Rebuilt for gating tests
Oliver Gutierrez c41104f
Oliver Gutierrez 482da67
* Mon Aug 23 2021 Oliver Gutiérrez <ogutierrez@fedoraproject.org> - 0.0.99.2^3.git075b9a8d2779-5
Oliver Gutierrez 482da67
- Version bump to build and check fedora gating after fixing ansible playbooks
Oliver Gutierrez 482da67
Oliver Gutierrez a6a68d9
* Fri Aug 20 2021 Oliver Gutiérrez <ogutierrez@fedoraproject.org> - 0.0.99.2^3.git075b9a8d2779-4
Oliver Gutierrez a6a68d9
- Version bump to build and check fedora gating
Oliver Gutierrez a6a68d9
Oliver Gutierrez 28e8056
* Wed Aug 18 2021 Oliver Gutiérrez <ogutierrez@fedoraproject.org> - 0.0.99.2^3.git075b9a8d2779-3
Oliver Gutierrez 28e8056
- Added Fedora gating
Oliver Gutierrez 28e8056
f8eb06d
* Wed Aug 18 2021 Debarshi Ray <rishi@fedoraproject.org> - 0.0.99.2^3.git075b9a8d2779-2
f8eb06d
- Require containers-common for ownership of %%{_sysconfdir}/containers
f8eb06d
Oliver Gutierrez 10d00ac
* Mon Aug 09 2021 Oliver Gutiérrez <ogutierrez@fedoraproject.org> - 0.0.99.2^3.git075b9a8d2779-1
Oliver Gutierrez 10d00ac
- Updated to 0.0.99.2^3.git075b9a8d2779 snapshot
Oliver Gutierrez 10d00ac
Oliver Gutierrez 8b5e951
* Thu Jul 29 2021 Oliver Gutiérrez <ogutierrez@fedoraproject.org> - 0.0.99.2^2.git40fbd377ed0b-1
Oliver Gutierrez 8b5e951
- Updated to 0.0.99.2^2.git40fbd377ed0b snapshot
Oliver Gutierrez 8b5e951
Oliver Gutierrez 906afe6
* Wed Jul 28 2021 Oliver Gutiérrez <ogutierrez@fedoraproject.org> - 0.0.99.2^1.git9820550c82bb-1
Oliver Gutierrez 906afe6
- Updated to 0.00.99.2^1.git9820550c82bb snapshot
Oliver Gutierrez 906afe6
Oliver Gutierrez c6fdde6
* Wed Jul 28 2021 Ondřej Míchal <harrymichal@seznam.cz> - 0.0.99.2-3
Oliver Gutierrez c6fdde6
- Update dependencies of -tests subpackage
Oliver Gutierrez c6fdde6
382aa99
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.99.2-2
382aa99
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
382aa99
12df1ef
* Sat Jun 26 2021 Debarshi Ray <rishi@fedoraproject.org> - 0.0.99.2-1
12df1ef
- Update to 0.0.99.2
12df1ef
aba1d29
* Tue Feb 23 2021 Debarshi Ray <rishi@fedoraproject.org> - 0.0.99.1-1
aba1d29
- Update to 0.0.99.1
aba1d29
6125231
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.99-2
6125231
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
6125231
07c5601
* Tue Jan 12 2021 Debarshi Ray <rishi@fedoraproject.org> - 0.0.99-1
07c5601
- Update to 0.0.99
07c5601
12f33fe
* Mon Jan 11 2021 Debarshi Ray <rishi@fedoraproject.org> - 0.0.98.1-2
12f33fe
- Harden the binary by using the same CGO_CFLAGS as on RHEL 8
12f33fe
800ec37
* Thu Jan 07 2021 Debarshi Ray <rishi@fedoraproject.org> - 0.0.98.1-1
800ec37
- Update to 0.0.98.1
800ec37
0e1027a
* Tue Jan 05 2021 Debarshi Ray <rishi@fedoraproject.org> - 0.0.98-1
0e1027a
- Update to 0.0.98
0e1027a
61caa93
* Wed Nov 25 2020 Ondřej Míchal <harrymichal@seznam.cz> - 0.0.97-2
61caa93
- Move krb5-libs from -support to -experience, and update the list of packages
61caa93
  in -experience
61caa93
c45736f
* Tue Nov 03 2020 Debarshi Ray <rishi@fedoraproject.org> - 0.0.97-1
c45736f
- Update to 0.0.97
c45736f
19102e8
* Thu Oct 01 2020 Debarshi Ray <rishi@fedoraproject.org> - 0.0.96-1
19102e8
- Update to 0.0.96
19102e8
a463b09
* Sun Aug 30 2020 Debarshi Ray <rishi@fedoraproject.org> - 0.0.95-1
a463b09
- Update to 0.0.95
a463b09
f9e5eff
* Mon Aug 24 2020 Debarshi Ray <rishi@fedoraproject.org> - 0.0.94-1
f9e5eff
- Update to 0.0.94
f9e5eff
adbd3c3
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.93-2
adbd3c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
adbd3c3
d3ce957
* Sat Jul 25 2020 Debarshi Ray <rishi@fedoraproject.org> - 0.0.93-1
d3ce957
- Update to 0.0.93
d3ce957
795a168
* Fri Jul 03 2020 Debarshi Ray <rishi@fedoraproject.org> - 0.0.92-1
795a168
- Update to 0.0.92
795a168
52cbc50
* Fri Jul 03 2020 Debarshi Ray <rishi@fedoraproject.org> - 0.0.91-2
52cbc50
- Fix the 'toolbox --version' output
52cbc50
ba60453
* Tue Jun 30 2020 Harry Míchal <harrymichal@seznam.cz> - 0.0.91-1
ba60453
- Update to 0.0.91
ba60453
b836324
* Sat Jun 27 2020 Debarshi Ray <rishi@fedoraproject.org> - 0.0.18-5
b836324
- Remove ExclusiveArch to match Podman
b836324
8713467
* Wed Jun 10 2020 Debarshi Ray <rishi@fedoraproject.org> - 0.0.18-4
8713467
- Sync the "experience" packages with the current Dockerfile
8713467
- Make "experience" Require "support"
8713467
ccd037e
* Fri Apr 03 2020 Debarshi Ray <rishi@fedoraproject.org> - 0.0.18-3
ccd037e
- Drop compatibility Obsoletes and Provides for fedora-toolbox
ccd037e
d86ee9c
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.18-2
d86ee9c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
d86ee9c
b58043a
* Tue Jan 14 2020 Debarshi Ray <rishi@fedoraproject.org> - 0.0.18-1
b58043a
- Update to 0.0.18
b58043a
02f9da9
* Wed Nov 20 2019 Debarshi Ray <rishi@fedoraproject.org> - 0.0.17-1
02f9da9
- Update to 0.0.17
02f9da9
dc19362
* Tue Oct 29 2019 Debarshi Ray <rishi@fedoraproject.org> - 0.0.16-1
dc19362
- Update to 0.0.16
dc19362
74e17d8
* Mon Sep 30 2019 Debarshi Ray <rishi@fedoraproject.org> - 0.0.15-1
74e17d8
- Update to 0.0.15
74e17d8
3071f36
* Wed Sep 18 2019 Debarshi Ray <rishi@fedoraproject.org> - 0.0.14-1
3071f36
- Update to 0.0.14
3071f36
8cd9b48
* Thu Sep 05 2019 Debarshi Ray <rishi@fedoraproject.org> - 0.0.13-1
8cd9b48
- Update to 0.0.13
8cd9b48
8a68c31
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.12-2
8a68c31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
8a68c31
2589ddf
* Mon Jul 22 2019 Debarshi Ray <rishi@fedoraproject.org> - 0.0.12-1
2589ddf
- Update to 0.0.12
2589ddf
3d415cb
* Tue Jun 25 2019 Debarshi Ray <rishi@fedoraproject.org> - 0.0.11-2
3d415cb
- Require flatpak-session-helper
3d415cb
3b15753
* Fri Jun 21 2019 Debarshi Ray <rishi@fedoraproject.org> - 0.0.11-1
3b15753
- Update to 0.0.11
3b15753
86f63f7
* Tue May 21 2019 Debarshi Ray <rishi@fedoraproject.org> - 0.0.10-1
86f63f7
- Update to 0.0.10
86f63f7
f5b32ef
* Tue Apr 30 2019 Debarshi Ray <rishi@fedoraproject.org> - 0.0.9-1
f5b32ef
- Update to 0.0.9
f5b32ef
d6bc568
* Tue Apr 16 2019 Adam Williamson <awilliam@redhat.com> - 0.0.8-2
d6bc568
- Rebuild with Meson fix for #1699099
d6bc568
83e7cea
* Fri Apr 12 2019 Debarshi Ray <rishi@fedoraproject.org> - 0.0.8-1
83e7cea
- Update to 0.0.8
83e7cea
Debarshi Ray b63f98c
* Thu Mar 14 2019 Debarshi Ray <rishi@fedoraproject.org> - 0.0.7-1
Debarshi Ray b63f98c
- Update to 0.0.7
Debarshi Ray b63f98c
33bd39b
* Fri Feb 22 2019 Debarshi Ray <rishi@fedoraproject.org> - 0.0.6-1
33bd39b
- Initial build after rename from fedora-toolbox