diff --git a/Dockerfile.stream b/Dockerfile.stream deleted file mode 100644 index 497be97..0000000 --- a/Dockerfile.stream +++ /dev/null @@ -1,41 +0,0 @@ -FROM quay.io/centos/centos:stream9 -LABEL maintainer "OSCI" -LABEL description="rpminspect for CentOS Stream" - -# https://copr.fedorainfracloud.org/coprs/dcantrell/rpminspect/ -ENV RPMINSPECT_PACKAGE_NAME=rpminspect -ENV RPMINSPECT_DATA_PACKAGE_NAME=rpminspect-data-centos - -ENV RPMINSPECT_WORKDIR=/workdir -ENV RPMINSPECT_RUNNER_DIR=/opt/rpminspect_runner -ENV HOME=${RPMINSPECT_WORKDIR} - -RUN mkdir -p ${RPMINSPECT_WORKDIR} ${RPMINSPECT_RUNNER_DIR} &&\ - chmod 777 ${RPMINSPECT_WORKDIR} ${RPMINSPECT_RUNNER_DIR} - -# TODO: rpminspect is missing few deps in C9S, what do we do about it? -RUN dnf -y install 'dnf-command(copr)' epel-release && \ - dnf -y copr enable dcantrell/rpminspect epel-9-x86_64 && \ - dnf -y copr enable msrb/rpminspect-deps epel-9-x86_64 - -RUN dnf install -y \ - ${RPMINSPECT_PACKAGE_NAME} \ - ${RPMINSPECT_DATA_PACKAGE_NAME} \ - clamav-update \ - python3-pyyaml \ - koji \ - git \ - wget \ - centpkg \ - && dnf clean all - -# Update the virus database (we also update it when running the "virus" inspection) -RUN freshclam - -COPY rpminspect_zuul_runner.sh ${RPMINSPECT_RUNNER_DIR}/ -COPY scripts ${RPMINSPECT_RUNNER_DIR}/scripts -COPY configs ${RPMINSPECT_RUNNER_DIR}/configs - -RUN ln -s ${RPMINSPECT_RUNNER_DIR}/rpminspect_zuul_runner.sh /usr/local/bin/rpminspect_zuul_runner.sh - -WORKDIR ${RPMINSPECT_WORKDIR} diff --git a/README.md b/README.md index 5e96a90..71bb144 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # rpminspect container image -This repository contains bits needed to build a container image for [rpminspect](https://github.com/rpminspect/rpminspect). This image can be later used by Fedora CI. There is also a version for CentOS Stream. +This repository contains bits needed to build a container image for [rpminspect](https://github.com/rpminspect/rpminspect). This image can be later used by Fedora CI. ## Example usage @@ -12,16 +12,6 @@ $ podman run -ti --rm quay.io/fedoraci/rpminspect /bin/bash (inside container) $ rpminspect_runner.sh 60499294 f35-updates license ``` -`rpminspect_zuul_runner.sh` requires at least 2 parameters: `` and ``. -See `rpminspect_zuul_runner.sh --help`. - -```shell -$ podman run -ti --rm quay.io/fedoraci/rpminspect-stream /bin/bash -(inside container) $ rpminspect_zuul_runner.sh -r "https://centos.softwarefactory-project.io/logs/11/11/9e75bb0c73d34f33b216e278645cb648efc4b929/check/mock-build/d39b3e8/repo/" -t arch -``` - - ## Development Looking for information on how to make changes to the container image? Take a look [here](./docs/development.md)! - diff --git a/rpminspect_zuul_runner.sh b/rpminspect_zuul_runner.sh deleted file mode 100755 index e0a49b7..0000000 --- a/rpminspect_zuul_runner.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/bash - -set -e - -print_usage() { - cat << EOF -Usage: -${0} --repo-url --test-name [options] - -Options: --r, --repo-url=REPO_URL YUM repository URL --t, --test-name=TEST_NAME inspection name --c, --cached just print cached results --e, --cache-cleanup delete cache at the end --h, --help show this help and quit -EOF -} - -script_dir=$(cd -- "$( dirname -- "$( readlink -f "${BASH_SOURCE[0]}")" )" &> /dev/null && pwd) -scripts_dir="${script_dir}/scripts" -configs_dir="${script_dir}/configs" -workdir=${RPMINSPECT_WORKDIR:-${PWD}} -cache_dir="${workdir}/cache" -logs_dir="${PWD}/logs" - -repo_url= -test_name= -cached="false" -cache_cleanup="false" - -short_opts="hcr:t:e" -long_opts="help,cached,repo-url:,test-name:,cache-cleanup" -opt=$(getopt -n "$0" --options "${short_opts}" --longoptions "${long_opts}" -- "$@") -eval set -- "$opt" -while [[ $# -gt 0 ]]; do - case "$1" in - -r|--repo-url) - repo_url="${2}" - shift 2 - ;; - -t|--test-name) - test_name="${2}" - shift 2 - ;; - -e|--cache-cleanup) - cache_cleanup="true" - shift - ;; - -c|--cached) - cached="true" - shift - ;; - -h|--help) - print_usage - exit 0 - ;; - --) - shift - ;; - *) - print_usage - exit 1 - esac -done -if [ "${cached}" == "false" ]; then - if [ -z "${repo_url}" ] || [ -z "${test_name}" ]; then - echo "Missing required param.\n\n" - print_usage - exit 1 - fi -fi - -# Read configuration and export variables -set -o allexport -. "${configs_dir}/centos-9.conf" -set +o allexport - -if [ "${cached}" == "false" ]; then - rm -Rf "${logs_dir}" - mkdir -p "${logs_dir}" - # Prepare cache - "${scripts_dir}/prepare_cache.sh" "${repo_url}" > "${logs_dir}/1_prepare_cache.log" 2>&1 - # Obtain component-specific rpminspect config file - "${scripts_dir}/fetch_rpminspect_conf.sh" "${repo_url}" > "${logs_dir}/2_fetch_rpminspect_conf.log" 2>&1 - # Update environment - "${scripts_dir}/update_env.sh" > "${logs_dir}/3_update_env.log" 2>&1 - # Run rpminspect - "${scripts_dir}/run_rpminspect.sh" > "${logs_dir}/4_run_rpminspect.log" 2>&1 -fi -if [ "${cache_cleanup}" == "true" ]; then - rm -Rf "${cache_dir}" -fi - -# Print results -"${scripts_dir}/print_results.sh" "${test_name}"