toolbox-0.0.99.3-8.el8
- sync with stream-container-tools-4.0-rhel-8.8.0 - Related: #2176055 Signed-off-by: Jindrich Novy <jnovy@redhat.com>
This commit is contained in:
parent
7796825f3a
commit
296aca4e73
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1 @@
|
|||||||
SOURCES/toolbox-0.0.99.3-vendored.tar.xz
|
/*.tar.xz
|
||||||
/toolbox-0.0.99.3-vendored.tar.xz
|
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
--- !Policy
|
|
||||||
product_versions:
|
|
||||||
- rhel-9
|
|
||||||
decision_context: osci_compose_gate
|
|
||||||
rules:
|
|
||||||
- !PassingTestCaseRule {test_case_name: desktop-qe.desktop-ci.tier1-gating.functional}
|
|
@ -1,9 +0,0 @@
|
|||||||
# https://one.redhat.com/rhel-developer-guide/#_modifying_a_per_package_rpminspect_yaml_file
|
|
||||||
# https://github.com/rpminspect/rpminspect/blob/master/data/generic.yaml
|
|
||||||
|
|
||||||
annocheck:
|
|
||||||
- hardened: --ignore-unknown --verbose --skip-run-path
|
|
||||||
|
|
||||||
runpath:
|
|
||||||
allowed_paths:
|
|
||||||
- /run/host/usr/lib64
|
|
@ -1,12 +0,0 @@
|
|||||||
---
|
|
||||||
# Sigh; RHEL8 doesn't have BATS
|
|
||||||
- name: bats | fetch and unpack tarball
|
|
||||||
unarchive:
|
|
||||||
src: https://github.com/bats-core/bats-core/archive/v1.4.1.tar.gz
|
|
||||||
dest: /root
|
|
||||||
remote_src: true
|
|
||||||
|
|
||||||
- name: bats | install
|
|
||||||
command: ./install.sh /usr/local
|
|
||||||
args:
|
|
||||||
chdir: /root/bats-core-1.4.1
|
|
@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
- name: create nonroot user
|
|
||||||
user:
|
|
||||||
name: testuser
|
|
||||||
shell: /bin/bash
|
|
||||||
- name: enable linger
|
|
||||||
command: loginctl enable-linger testuser
|
|
@ -1,72 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# Run bats tests for a given $TEST_PACKAGE, e.g. buildah, podman
|
|
||||||
#
|
|
||||||
# This is invoked by the 'run_bats_tests' role; we assume that
|
|
||||||
# the package foo has a foo-tests subpackage which provides the
|
|
||||||
# directory /usr/share/foo/test/system, containing one or more .bats
|
|
||||||
# test files.
|
|
||||||
#
|
|
||||||
|
|
||||||
export PATH=/usr/local/bin:/usr/sbin:/usr/bin
|
|
||||||
|
|
||||||
FULL_LOG=/tmp/test.debug.log
|
|
||||||
BATS_LOG=/tmp/test.bats.log
|
|
||||||
rm -f $FULL_LOG $BATS_LOG
|
|
||||||
touch $FULL_LOG $BATS_LOG
|
|
||||||
|
|
||||||
exec &> $FULL_LOG
|
|
||||||
|
|
||||||
# Log program versions
|
|
||||||
echo "Packages:"
|
|
||||||
rpm -q ${TEST_PACKAGE} ${TEST_PACKAGE}-tests
|
|
||||||
|
|
||||||
echo "------------------------------"
|
|
||||||
printenv | sort
|
|
||||||
|
|
||||||
testdir=/usr/share/${TEST_PACKAGE}/test/system
|
|
||||||
|
|
||||||
if ! cd $testdir; then
|
|
||||||
echo "FAIL ${TEST_NAME} : cd $testdir" >> /tmp/test.log
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -e /tmp/helper.sh ]; then
|
|
||||||
echo "------------------------------"
|
|
||||||
echo ". /tmp/helper.sh"
|
|
||||||
. /tmp/helper.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$(type -t setup)" = "function" ]; then
|
|
||||||
echo "------------------------------"
|
|
||||||
echo "\$ setup"
|
|
||||||
setup
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "FAIL ${TEST_NAME} : setup" >> /tmp/test.log
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "------------------------------"
|
|
||||||
echo "\$ bats ."
|
|
||||||
bats . &> $BATS_LOG
|
|
||||||
rc=$?
|
|
||||||
|
|
||||||
echo "------------------------------"
|
|
||||||
echo "bats completed with status $rc"
|
|
||||||
|
|
||||||
status=PASS
|
|
||||||
if [ $rc -ne 0 ]; then
|
|
||||||
status=FAIL
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "${status} ${TEST_NAME}" >> /tmp/test.log
|
|
||||||
|
|
||||||
if [ "$(type -t teardown)" = "function" ]; then
|
|
||||||
echo "------------------------------"
|
|
||||||
echo "\$ teardown"
|
|
||||||
teardown
|
|
||||||
fi
|
|
||||||
|
|
||||||
# FIXME: for CI purposes, always exit 0. This allows subsequent tests.
|
|
||||||
exit 0
|
|
@ -1,37 +0,0 @@
|
|||||||
---
|
|
||||||
# Create empty results file, world-writable
|
|
||||||
- name: initialize test.log file
|
|
||||||
copy: dest=/tmp/test.log content='' force=yes mode=0666
|
|
||||||
|
|
||||||
- name: execute tests
|
|
||||||
include: run_one_test.yml
|
|
||||||
with_items: "{{ tests }}"
|
|
||||||
loop_control:
|
|
||||||
loop_var: test
|
|
||||||
|
|
||||||
- name: pull test.log results
|
|
||||||
fetch:
|
|
||||||
src: "/tmp/test.log"
|
|
||||||
dest: "{{ artifacts }}/test.log"
|
|
||||||
flat: yes
|
|
||||||
|
|
||||||
# Copied from standard-test-basic
|
|
||||||
- name: check results
|
|
||||||
shell: grep "^FAIL" /tmp/test.log
|
|
||||||
register: test_fails
|
|
||||||
# Never fail at this step. Just store result of tests.
|
|
||||||
failed_when: False
|
|
||||||
|
|
||||||
- name: preserve results
|
|
||||||
set_fact:
|
|
||||||
role_result_failed: "{{ (test_fails.stdout|d|length > 0) or (test_fails.stderr|d|length > 0) }}"
|
|
||||||
role_result_msg: "{{ test_fails.stdout|d('tests failed.') }}"
|
|
||||||
|
|
||||||
- name: display results
|
|
||||||
vars:
|
|
||||||
msg: |
|
|
||||||
Tests failed: {{ role_result_failed|d('Undefined') }}
|
|
||||||
Tests msg: {{ role_result_msg|d('None') }}
|
|
||||||
debug:
|
|
||||||
msg: "{{ msg.split('\n') }}"
|
|
||||||
failed_when: "role_result_failed|bool"
|
|
@ -1,52 +0,0 @@
|
|||||||
---
|
|
||||||
- name: "{{ test.name }} | install test packages"
|
|
||||||
dnf: name="{{ test.package }}-tests" state=installed
|
|
||||||
|
|
||||||
- name: "{{ test.name }} | define helper variables"
|
|
||||||
set_fact:
|
|
||||||
test_name_oneword: "{{ test.name | replace(' ','-') }}"
|
|
||||||
|
|
||||||
# UGH. This is necessary because our caller sets some environment variables
|
|
||||||
# and we need to set a few more based on other caller variables; then we
|
|
||||||
# need to combine the two dicts when running the test. This seems to be
|
|
||||||
# the only way to do it in ansible.
|
|
||||||
- name: "{{ test.name }} | define local environment"
|
|
||||||
set_fact:
|
|
||||||
local_environment:
|
|
||||||
TEST_NAME: "{{ test.name }}"
|
|
||||||
TEST_PACKAGE: "{{ test.package }}"
|
|
||||||
TEST_ENV: "{{ test.environment }}"
|
|
||||||
|
|
||||||
- name: "{{ test.name }} | setup/teardown helper | see if exists"
|
|
||||||
local_action: stat path={{ role_path }}/files/helper.{{ test_name_oneword }}.sh
|
|
||||||
register: helper
|
|
||||||
|
|
||||||
- name: "{{ test.name }} | setup/teardown helper | install"
|
|
||||||
copy: src=helper.{{ test_name_oneword }}.sh dest=/tmp/helper.sh
|
|
||||||
when: helper.stat.exists
|
|
||||||
|
|
||||||
- name: "{{ test.name }} | run test"
|
|
||||||
script: ./run_bats_tests.sh
|
|
||||||
args:
|
|
||||||
chdir: /usr/share/{{ test.package }}/test/system
|
|
||||||
become: "{{ true if test.become is defined else false }}"
|
|
||||||
become_user: testuser
|
|
||||||
environment: "{{ local_environment | combine(test.environment) }}"
|
|
||||||
|
|
||||||
- name: "{{ test.name }} | pull logs"
|
|
||||||
fetch:
|
|
||||||
src: "/tmp/test.{{ item }}.log"
|
|
||||||
dest: "{{ artifacts }}/test.{{ test_name_oneword }}.{{ item }}.log"
|
|
||||||
flat: yes
|
|
||||||
with_items:
|
|
||||||
- bats
|
|
||||||
- debug
|
|
||||||
|
|
||||||
- name: "{{ test.name }} | remove remote logs and helpers"
|
|
||||||
file:
|
|
||||||
dest=/tmp/{{ item }}
|
|
||||||
state=absent
|
|
||||||
with_items:
|
|
||||||
- test.bats.log
|
|
||||||
- test.debug.log
|
|
||||||
- helper.sh
|
|
@ -1,17 +0,0 @@
|
|||||||
[general]
|
|
||||||
# Create a toolbox container for a different operating system distro than the
|
|
||||||
# host. Cannot be used with 'image'.
|
|
||||||
## distro = "fedora"
|
|
||||||
|
|
||||||
# Create a toolbox container for a different operating system release than the
|
|
||||||
# host. Cannot be used with 'image'.
|
|
||||||
## release = "33"
|
|
||||||
|
|
||||||
# Change the name of the image used to create the toolbox container. This is
|
|
||||||
# useful for creating containers from custom-built images. Cannot be used with
|
|
||||||
# 'distro' or 'release'.
|
|
||||||
#
|
|
||||||
# If the name does not contain a registry, the local image storage will be
|
|
||||||
# consulted, and if it's not present there then it will be pulled from a
|
|
||||||
# suitable remote registry.
|
|
||||||
image = "registry-proxy.engineering.redhat.com/rh-osbs/toolbox-container:8.5"
|
|
@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
# Copy the toolbox.conf file to /etc/containers/
|
|
||||||
- name: Check containers directory exists
|
|
||||||
file:
|
|
||||||
path: /etc/containers
|
|
||||||
state: directory
|
|
||||||
- name: Copy toolbox.conf file to set default image
|
|
||||||
copy: src={{ role_path }}/files/toolbox.conf dest=/etc/containers/toolbox.conf force=yes mode=0644
|
|
@ -1,17 +0,0 @@
|
|||||||
---
|
|
||||||
- hosts: localhost
|
|
||||||
tags: classic
|
|
||||||
vars:
|
|
||||||
- artifacts: ./artifacts
|
|
||||||
roles:
|
|
||||||
- role: bats_installed
|
|
||||||
- role: set_image
|
|
||||||
- role: nonroot_user
|
|
||||||
- role: run_bats_tests
|
|
||||||
tests:
|
|
||||||
- name: toolbox
|
|
||||||
package: toolbox
|
|
||||||
environment:
|
|
||||||
PODMAN: /usr/bin/podman
|
|
||||||
TOOLBOX_TEST_DEFAULT_CONTAINER_NAME: toolbox-container-8.5
|
|
||||||
become: true
|
|
@ -1,4 +1,4 @@
|
|||||||
From 565947a7df6f4d18cb2f2d3a172b79391880288a Mon Sep 17 00:00:00 2001
|
From cc15d0ac76fa77a2fa0f3c73e1a3ed4e7ceb2b29 Mon Sep 17 00:00:00 2001
|
||||||
From: Debarshi Ray <rishi@fedoraproject.org>
|
From: Debarshi Ray <rishi@fedoraproject.org>
|
||||||
Date: Wed, 18 Aug 2021 17:55:21 +0200
|
Date: Wed, 18 Aug 2021 17:55:21 +0200
|
||||||
Subject: [PATCH 1/2] cmd/run: Make sosreport work by setting the HOST
|
Subject: [PATCH 1/2] cmd/run: Make sosreport work by setting the HOST
|
||||||
@ -22,10 +22,10 @@ index 5954eac55fad..ca363815d4c9 100644
|
|||||||
"--tty",
|
"--tty",
|
||||||
"--user", currentUser.Username,
|
"--user", currentUser.Username,
|
||||||
--
|
--
|
||||||
2.31.1
|
2.39.1
|
||||||
|
|
||||||
|
|
||||||
From fecbda4c3ea823eb04ebe392a6e1422e8ce8dd41 Mon Sep 17 00:00:00 2001
|
From a47cd46e0ca32b8af0ea8181c856ce2a8d8307fd Mon Sep 17 00:00:00 2001
|
||||||
From: Debarshi Ray <rishi@fedoraproject.org>
|
From: Debarshi Ray <rishi@fedoraproject.org>
|
||||||
Date: Fri, 10 Dec 2021 13:42:15 +0100
|
Date: Fri, 10 Dec 2021 13:42:15 +0100
|
||||||
Subject: [PATCH 2/2] test/system: Update to test the migration path for
|
Subject: [PATCH 2/2] test/system: Update to test the migration path for
|
||||||
@ -97,5 +97,5 @@ index 000000000000..32d87904213e
|
|||||||
+ skip "Testing of entering toolboxes is not implemented"
|
+ skip "Testing of entering toolboxes is not implemented"
|
||||||
+}
|
+}
|
||||||
--
|
--
|
||||||
2.31.1
|
2.39.1
|
||||||
|
|
||||||
|
17
toolbox.spec
17
toolbox.spec
@ -11,7 +11,7 @@ Version: 0.0.99.3
|
|||||||
%global goipath github.com/containers/%{name}
|
%global goipath github.com/containers/%{name}
|
||||||
%gometa
|
%gometa
|
||||||
|
|
||||||
Release: 4%{?dist}
|
Release: 8%{?dist}
|
||||||
Summary: Tool for containerized command line environments on Linux
|
Summary: Tool for containerized command line environments on Linux
|
||||||
|
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
@ -24,6 +24,12 @@ URL: https://containertoolbx.org/
|
|||||||
Source0: %{name}-%{version}-vendored.tar.xz
|
Source0: %{name}-%{version}-vendored.tar.xz
|
||||||
Source1: %{name}.conf
|
Source1: %{name}.conf
|
||||||
|
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2152907
|
||||||
|
Patch0: toolbox-Unbreak-sorting-and-clearly-identify-copied-images-in-list.patch
|
||||||
|
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2165610
|
||||||
|
Patch1: toolbox-Support-RHEL-9-containers.patch
|
||||||
|
|
||||||
# RHEL specific
|
# RHEL specific
|
||||||
Patch100: toolbox-Make-the-build-flags-match-RHEL-s-gobuild.patch
|
Patch100: toolbox-Make-the-build-flags-match-RHEL-s-gobuild.patch
|
||||||
Patch101: toolbox-Make-the-build-flags-match-RHEL-s-gobuild-for-PPC64.patch
|
Patch101: toolbox-Make-the-build-flags-match-RHEL-s-gobuild-for-PPC64.patch
|
||||||
@ -32,7 +38,7 @@ Patch102: toolbox-Add-migration-paths-for-coreos-toolbox-users.patch
|
|||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1905383
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1905383
|
||||||
ExcludeArch: %{ix86}
|
ExcludeArch: %{ix86}
|
||||||
|
|
||||||
BuildRequires: golang >= 1.19.1
|
BuildRequires: golang >= 1.19.4
|
||||||
BuildRequires: /usr/bin/go-md2man
|
BuildRequires: /usr/bin/go-md2man
|
||||||
BuildRequires: meson >= 0.58.0
|
BuildRequires: meson >= 0.58.0
|
||||||
BuildRequires: pkgconfig(bash-completion)
|
BuildRequires: pkgconfig(bash-completion)
|
||||||
@ -64,6 +70,9 @@ The %{name}-tests package contains system tests for %{name}.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%ifnarch ppc64
|
%ifnarch ppc64
|
||||||
%patch100 -p1
|
%patch100 -p1
|
||||||
%else
|
%else
|
||||||
@ -124,6 +133,10 @@ install -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/containers/%{name}.conf
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Mar 14 2023 Jindrich Novy <jnovy@redhat.com> - 0.0.99.3-8
|
||||||
|
- sync with stream-container-tools-4.0-rhel-8.8.0
|
||||||
|
- Related: #2176055
|
||||||
|
|
||||||
* Mon Nov 07 2022 Debarshi Ray <rishi@fedoraproject.org> - 0.0.99.3-4
|
* Mon Nov 07 2022 Debarshi Ray <rishi@fedoraproject.org> - 0.0.99.3-4
|
||||||
- Rebuild for CVE-2022-27664 and CVE-2022-32189
|
- Rebuild for CVE-2022-27664 and CVE-2022-32189
|
||||||
Resolves: #2116761, #2126749
|
Resolves: #2116761, #2126749
|
||||||
|
Loading…
Reference in New Issue
Block a user