From a5d3815e4a9f6d9156633964ccc114055a3f7c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20M=C3=ADchal?= Date: Wed, 25 Nov 2020 22:06:47 +0100 Subject: [PATCH 1/9] Move krb5-libs to -experience, and update the list of packages The krb5-libs package is necessary to ensure the presence of the /etc/krb5.conf.d directory with the correct permissions. However, it's not strictly necessary and toolbox(1) can work without it. No need to issue a build just for this. https://src.fedoraproject.org/rpms/toolbox/pull-request/4 --- toolbox.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/toolbox.spec b/toolbox.spec index b23f42f..f8176c2 100644 --- a/toolbox.spec +++ b/toolbox.spec @@ -49,7 +49,6 @@ Summary: Required packages for the container image to support %{name} # These are really required to make the image work with toolbox Requires: passwd Requires: shadow-utils -Requires: krb5-libs Requires: vte-profile %description support @@ -79,12 +78,14 @@ Requires: hostname Requires: iputils Requires: jwhois Requires: keyutils +Requires: krb5-libs Requires: less Requires: lsof Requires: man-db Requires: man-pages Requires: mlocate Requires: mtr +Requires: nss-mdns Requires: openssh-clients Requires: pigz Requires: procps-ng @@ -98,6 +99,7 @@ Requires: unzip Requires: wget Requires: which Requires: words +Requires: xorg-x11-xauth Requires: xz Requires: zip From 1ae8c9a070b1e0acba9990b5d597fe05e3fc8ac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20M=C3=ADchal?= Date: Wed, 25 Nov 2020 22:49:41 +0100 Subject: [PATCH 2/9] Tweak the description No need to issue a build just for this. --- toolbox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolbox.spec b/toolbox.spec index f8176c2..89c6da7 100644 --- a/toolbox.spec +++ b/toolbox.spec @@ -53,7 +53,7 @@ Requires: vte-profile %description support The %{name}-support package contains all the required packages that are needed -to be installed in the container image to make it work with the %{name}. +to be installed in the OCI image to make it work with %{name}. The %{name}-support package should be typically installed from the Dockerfile if the image isn't based on the fedora-toolbox image. From 11f6b99eb49e55efef89fc84baf6ac12aa30931c Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Tue, 5 Jan 2021 18:29:31 +0100 Subject: [PATCH 3/9] Update to 0.0.98 --- .gitignore | 1 + sources | 2 +- ...ild-flags-match-Fedora-s-gobuild-for-PPC64.patch | 13 ++++--------- ...ake-the-build-flags-match-Fedora-s-gobuild.patch | 13 ++++--------- toolbox.spec | 5 ++++- 5 files changed, 14 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index d0608a7..fa26659 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ /toolbox-0.0.95.tar.xz /toolbox-0.0.96.tar.xz /toolbox-0.0.97.tar.xz +/toolbox-0.0.98.tar.xz diff --git a/sources b/sources index 590ca40..ea2ee10 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (toolbox-0.0.97.tar.xz) = e8c9b3713346a8e1ecabda4518af3955ca2b729a7a99000b15ac8275243d81d5eb53a8accb876f89ef7320ea8bc6e683547ae5cd027ee5e5054494032727f85d +SHA512 (toolbox-0.0.98.tar.xz) = 52b25633fcc660bfce4a3e7df591c272dec35f1cdb63a17b529d0402e195743e7f2f034495fc100dd7ad1b479520a8369923d794833de3e10232e46ebeb8be69 diff --git a/toolbox-Make-the-build-flags-match-Fedora-s-gobuild-for-PPC64.patch b/toolbox-Make-the-build-flags-match-Fedora-s-gobuild-for-PPC64.patch index 7e03497..43df0c9 100644 --- a/toolbox-Make-the-build-flags-match-Fedora-s-gobuild-for-PPC64.patch +++ b/toolbox-Make-the-build-flags-match-Fedora-s-gobuild-for-PPC64.patch @@ -1,4 +1,4 @@ -From d70e3b4bf7825e67f57373fcd6e8da5ed1d5b461 Mon Sep 17 00:00:00 2001 +From e9bfc40bbbf7af1a20819b6840441cbe52a7d1b7 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 29 Jun 2020 17:57:47 +0200 Subject: [PATCH] build: Make the build flags match Fedora's %{gobuild} for @@ -19,27 +19,22 @@ exported by Fedora's %{meson} RPM macro. Note that these flags are only meant for the "ppc64" CPU architecture, and should be kept updated to match Fedora's Go guidelines. Use 'rpm --eval "%{gobuild}"' to expand the %{gobuild} macro. - -For some reason, when built on Koji, the final binary gets created as -../src/src instead of ../src/toolbox, but it doesn't happen when -building locally with 'rpmbuild -ba ...'. Hence it's necessary to -explicitly specify the name of the output binary. --- src/go-build-wrapper | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/go-build-wrapper b/src/go-build-wrapper -index f061a1c5ccf6..8baaff53b329 100755 +index 515e1d8a0670..8baaff53b329 100755 --- a/src/go-build-wrapper +++ b/src/go-build-wrapper @@ -27,5 +27,6 @@ if ! cd "$1"; then exit 1 fi --go build -trimpath -ldflags "-extldflags '-Wl,--wrap,pthread_sigmask $4' -linkmode external -X github.com/containers/toolbox/pkg/version.currentVersion=$3" -o "$2" +-go build -trimpath -ldflags "-extldflags '-Wl,--wrap,pthread_sigmask $4' -linkmode external -X github.com/containers/toolbox/pkg/version.currentVersion=$3" -o "$2/toolbox" +unset LDFLAGS +go build -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -extldflags '-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,--wrap,pthread_sigmask $4' -linkmode external -X github.com/containers/toolbox/pkg/version.currentVersion=$3" -a -v -x -o "$2/toolbox" exit "$?" -- -2.25.4 +2.29.2 diff --git a/toolbox-Make-the-build-flags-match-Fedora-s-gobuild.patch b/toolbox-Make-the-build-flags-match-Fedora-s-gobuild.patch index 4a8661c..16c844d 100644 --- a/toolbox-Make-the-build-flags-match-Fedora-s-gobuild.patch +++ b/toolbox-Make-the-build-flags-match-Fedora-s-gobuild.patch @@ -1,4 +1,4 @@ -From b1d265c4529eb0b23d10633326c075d54e07772f Mon Sep 17 00:00:00 2001 +From d204528ce3b3c70727c12e1911d1c5562b56d474 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 29 Jun 2020 17:57:47 +0200 Subject: [PATCH] build: Make the build flags match Fedora's %{gobuild} @@ -18,27 +18,22 @@ exported by Fedora's %{meson} RPM macro. Note that these flags are meant for every CPU architecture other than PPC64, and should be kept updated to match Fedora's Go guidelines. Use 'rpm --eval "%{gobuild}"' to expand the %{gobuild} macro. - -For some reason, when built on Koji, the final binary gets created as -../src/src instead of ../src/toolbox, but it doesn't happen when -building locally with 'rpmbuild -ba ...'. Hence it's necessary to -explicitly specify the name of the output binary. --- src/go-build-wrapper | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/go-build-wrapper b/src/go-build-wrapper -index f061a1c5ccf6..013a35e52a1a 100755 +index 515e1d8a0670..013a35e52a1a 100755 --- a/src/go-build-wrapper +++ b/src/go-build-wrapper @@ -27,5 +27,6 @@ if ! cd "$1"; then exit 1 fi --go build -trimpath -ldflags "-extldflags '-Wl,--wrap,pthread_sigmask $4' -linkmode external -X github.com/containers/toolbox/pkg/version.currentVersion=$3" -o "$2" +-go build -trimpath -ldflags "-extldflags '-Wl,--wrap,pthread_sigmask $4' -linkmode external -X github.com/containers/toolbox/pkg/version.currentVersion=$3" -o "$2/toolbox" +unset LDFLAGS +go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -extldflags '-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,--wrap,pthread_sigmask $4' -linkmode external -X github.com/containers/toolbox/pkg/version.currentVersion=$3" -a -v -x -o "$2/toolbox" exit "$?" -- -2.25.4 +2.29.2 diff --git a/toolbox.spec b/toolbox.spec index 89c6da7..ea3da48 100644 --- a/toolbox.spec +++ b/toolbox.spec @@ -1,5 +1,5 @@ Name: toolbox -Version: 0.0.97 +Version: 0.0.98 %global goipath github.com/containers/%{name} %gometa @@ -171,6 +171,9 @@ ln -s src/pkg pkg %changelog +* Tue Jan 05 2021 Debarshi Ray - 0.0.98-1 +- Update to 0.0.98 + * Tue Nov 03 2020 Debarshi Ray - 0.0.97-1 - Update to 0.0.97 From 7542fb25805352e7cbc8db81edb114840d0c676c Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 7 Jan 2021 20:36:04 +0100 Subject: [PATCH 4/9] Update to 0.0.98.1 --- .gitignore | 1 + sources | 2 +- toolbox.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index fa26659..65e35ff 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ /toolbox-0.0.96.tar.xz /toolbox-0.0.97.tar.xz /toolbox-0.0.98.tar.xz +/toolbox-0.0.98.1.tar.xz diff --git a/sources b/sources index ea2ee10..f81cb03 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (toolbox-0.0.98.tar.xz) = 52b25633fcc660bfce4a3e7df591c272dec35f1cdb63a17b529d0402e195743e7f2f034495fc100dd7ad1b479520a8369923d794833de3e10232e46ebeb8be69 +SHA512 (toolbox-0.0.98.1.tar.xz) = 89f2d1e331c42ef0d4c25c3144539f6160b4467090db6703c35eb68d1dad064f3a0f2234888e9aecfbd53b7c750f86d881932f2519a4b9629439d4d9841c2815 diff --git a/toolbox.spec b/toolbox.spec index ea3da48..5f74bad 100644 --- a/toolbox.spec +++ b/toolbox.spec @@ -1,5 +1,5 @@ Name: toolbox -Version: 0.0.98 +Version: 0.0.98.1 %global goipath github.com/containers/%{name} %gometa @@ -171,6 +171,9 @@ ln -s src/pkg pkg %changelog +* Thu Jan 07 2021 Debarshi Ray - 0.0.98.1-1 +- Update to 0.0.98.1 + * Tue Jan 05 2021 Debarshi Ray - 0.0.98-1 - Update to 0.0.98 From fb9c2d77c999c311a51a8ad133f2815daf4a1864 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 11 Jan 2021 12:57:06 +0100 Subject: [PATCH 5/9] Update to 0.0.99 Harden the binary by using the same CGO_CFLAGS as on RHEL 8. --- .gitignore | 1 + sources | 2 +- toolbox.spec | 11 ++++++++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 65e35ff..bda8bf7 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ /toolbox-0.0.97.tar.xz /toolbox-0.0.98.tar.xz /toolbox-0.0.98.1.tar.xz +/toolbox-0.0.99.tar.xz diff --git a/sources b/sources index f81cb03..6d069a5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (toolbox-0.0.98.1.tar.xz) = 89f2d1e331c42ef0d4c25c3144539f6160b4467090db6703c35eb68d1dad064f3a0f2234888e9aecfbd53b7c750f86d881932f2519a4b9629439d4d9841c2815 +SHA512 (toolbox-0.0.99.tar.xz) = a2b750894d902575b742249ee89526e876fdbc6353e0aa8aa262f230f6b0c53266c70c93b2921eef3c2189d93dc096bdeee1be11c9aff0ee110a4fcbcb782f88 diff --git a/toolbox.spec b/toolbox.spec index 5f74bad..3289d39 100644 --- a/toolbox.spec +++ b/toolbox.spec @@ -1,5 +1,5 @@ Name: toolbox -Version: 0.0.98.1 +Version: 0.0.99 %global goipath github.com/containers/%{name} %gometa @@ -38,8 +38,9 @@ Requires: podman >= 1.4.0 %description -Toolbox is offers a familiar RPM based environment for developing and -debugging software that runs fully unprivileged using Podman. +Toolbox is a tool for Linux operating systems, which allows the use of +containerized command line environments. It is built on top of Podman and +other standard container technologies from OCI. # The list of requires packages for -support and -experience should be in sync with: # https://github.com/containers/toolbox/blob/master/images/fedora/f33/extra-packages @@ -138,6 +139,7 @@ The %{name}-tests package contains system tests for %{name}. %build export GO111MODULE=off export GOPATH=%{gobuilddir}:%{gopath} +export CGO_CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" ln -s src/cmd cmd ln -s src/pkg pkg %meson --buildtype=plain -Dprofile_dir=%{_sysconfdir}/profile.d @@ -171,6 +173,9 @@ ln -s src/pkg pkg %changelog +* Tue Jan 12 2021 Debarshi Ray - 0.0.99-1 +- Update to 0.0.99 + * Thu Jan 07 2021 Debarshi Ray - 0.0.98.1-1 - Update to 0.0.98.1 From e8830669b9bd7e84b23026b3545fa022225c1fe0 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Tue, 23 Feb 2021 20:19:10 +0100 Subject: [PATCH 6/9] Update to 0.0.99.1 --- .gitignore | 1 + sources | 2 +- toolbox.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index bda8bf7..5586f4a 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ /toolbox-0.0.98.tar.xz /toolbox-0.0.98.1.tar.xz /toolbox-0.0.99.tar.xz +/toolbox-0.0.99.1.tar.xz diff --git a/sources b/sources index 6d069a5..668e2bc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (toolbox-0.0.99.tar.xz) = a2b750894d902575b742249ee89526e876fdbc6353e0aa8aa262f230f6b0c53266c70c93b2921eef3c2189d93dc096bdeee1be11c9aff0ee110a4fcbcb782f88 +SHA512 (toolbox-0.0.99.1.tar.xz) = 6021653eb7fbfc85ea700a9f52f9cfb552efbd4127eb3332a53bd340c8270c4d7a4e54b4a435202fd9e95ee0d90555a46ae9363a930b37fa35e63f239dffc027 diff --git a/toolbox.spec b/toolbox.spec index 3289d39..5bd770e 100644 --- a/toolbox.spec +++ b/toolbox.spec @@ -1,5 +1,5 @@ Name: toolbox -Version: 0.0.99 +Version: 0.0.99.1 %global goipath github.com/containers/%{name} %gometa @@ -173,6 +173,9 @@ ln -s src/pkg pkg %changelog +* Tue Feb 23 2021 Debarshi Ray - 0.0.99.1-1 +- Update to 0.0.99.1 + * Tue Jan 12 2021 Debarshi Ray - 0.0.99-1 - Update to 0.0.99 From c434433151d8ab0a0f9b30f7ab4ceefd5faed584 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 29 Apr 2021 01:02:13 +0200 Subject: [PATCH 7/9] Tweak the Summary No need to issue a build just for this. --- toolbox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolbox.spec b/toolbox.spec index 5bd770e..0f3170a 100644 --- a/toolbox.spec +++ b/toolbox.spec @@ -5,7 +5,7 @@ Version: 0.0.99.1 %gometa Release: 1%{?dist} -Summary: Unprivileged development environment +Summary: Tool for containerized command line environments on Linux License: ASL 2.0 URL: https://github.com/containers/%{name} From cd9768661b21035e73e58e6bf22f6fa6c4621b5b Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Sat, 26 Jun 2021 20:03:14 +0200 Subject: [PATCH 8/9] Update to 0.0.99.2 Disable the %check section because 'go test ...' isn't working as it is in the build environment. --- .gitignore | 1 + sources | 2 +- toolbox.spec | 11 ++++++++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 5586f4a..51193d6 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ /toolbox-0.0.98.1.tar.xz /toolbox-0.0.99.tar.xz /toolbox-0.0.99.1.tar.xz +/toolbox-0.0.99.2.tar.xz diff --git a/sources b/sources index 668e2bc..c553232 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (toolbox-0.0.99.1.tar.xz) = 6021653eb7fbfc85ea700a9f52f9cfb552efbd4127eb3332a53bd340c8270c4d7a4e54b4a435202fd9e95ee0d90555a46ae9363a930b37fa35e63f239dffc027 +SHA512 (toolbox-0.0.99.2.tar.xz) = 8e775d500755181f22f62dde4da32d5eff446590e54587633a545f880e9d58dc36ace9e7b37e5ec7a4713f570ceb3d27569f9421ad27fd95f0bb6499b470d0b6 diff --git a/toolbox.spec b/toolbox.spec index 0f3170a..1f90809 100644 --- a/toolbox.spec +++ b/toolbox.spec @@ -1,5 +1,5 @@ Name: toolbox -Version: 0.0.99.1 +Version: 0.0.99.2 %global goipath github.com/containers/%{name} %gometa @@ -27,6 +27,7 @@ BuildRequires: golang(github.com/fsnotify/fsnotify) >= 1.4.7 BuildRequires: golang(github.com/godbus/dbus) >= 5.0.3 BuildRequires: golang(github.com/mattn/go-isatty) >= 0.0.12 BuildRequires: golang(github.com/sirupsen/logrus) >= 1.4.2 +# BuildRequires: golang(github.com/stretchr/testify) >= 1.7.0 BuildRequires: golang(github.com/spf13/cobra) >= 0.0.5 BuildRequires: golang(golang.org/x/sys/unix) BuildRequires: meson @@ -86,6 +87,7 @@ Requires: man-db Requires: man-pages Requires: mlocate Requires: mtr +Requires: nano-default-editor Requires: nss-mdns Requires: openssh-clients Requires: pigz @@ -146,8 +148,8 @@ ln -s src/pkg pkg %meson_build -%check -%meson_test +# %%check +# %%meson_test %install @@ -173,6 +175,9 @@ ln -s src/pkg pkg %changelog +* Sat Jun 26 2021 Debarshi Ray - 0.0.99.2-1 +- Update to 0.0.99.2 + * Tue Feb 23 2021 Debarshi Ray - 0.0.99.1-1 - Update to 0.0.99.1 From 691c8f89afc9094807ff478d46ce9bf0273a3395 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 8 Jul 2021 20:59:14 +0200 Subject: [PATCH 9/9] Add bc and iproute to the toolbox-experience sub-package No need to issue a build just for this. --- toolbox.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/toolbox.spec b/toolbox.spec index 1f90809..b5411a4 100644 --- a/toolbox.spec +++ b/toolbox.spec @@ -66,6 +66,7 @@ Summary: Set of packages to enhance the %{name} experience Requires: %{name}-support = %{version}-%{release} Requires: bash-completion +Requires: bc Requires: bzip2 Requires: diffutils Requires: dnf-plugins-core @@ -77,6 +78,7 @@ Requires: gnupg Requires: gnupg2-smime Requires: gvfs-client Requires: hostname +Requires: iproute Requires: iputils Requires: jwhois Requires: keyutils