Skip to content

Commit

Permalink
[ci] Fix up failing CentOS 7 and Oracle Linux CI jobs
Browse files Browse the repository at this point in the history
Also do a bit of shell script cleanup work.  For CentOS 7, had to
adjust the way pip modules were installed and then python-rpm was
rebuilt.  For Oracle, we're using 2 different versions of Python 3,
but that's ok.

Signed-off-by: David Cantrell <dcantrell@redhat.com>
  • Loading branch information
dcantrell committed Apr 15, 2024
1 parent 8ea7f79 commit 94af90e
Show file tree
Hide file tree
Showing 30 changed files with 66 additions and 66 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/oraclelinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
# Turn on all the other repos
sed -i -e 's|enabled=0|enabled=1|g' /etc/yum.repos.d/*.repo
dnf upgrade -y
dnf install -y git
# This means clone the git repo
Expand All @@ -73,7 +74,10 @@ jobs:
# Install build dependencies and set up the target
make instreqs
# Use the latest Python
PYTHON_PROG="$(basename $(ls -1 /usr/bin/python*.* | grep -v config | sort -V | tail -n 1))"
# Build the software and run the test suite
make debug
make check
make debug PYTHON=${PYTHON_PROG}
make check PYTHON=${PYTHON_PROG}
ninja -C build coverage && ( curl -s https://codecov.io/bash | bash ) || :
4 changes: 2 additions & 2 deletions osdeps/alpine/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin
CWD="$(pwd)"

# The mandoc package in Alpine Linux lacks the library
if curl -s http://mandoc.bsd.lv/ >&- 2>&- ; then
if curl -s http://mandoc.bsd.lv/ >/dev/null 2>&1 ; then
curl -O http://mandoc.bsd.lv/snapshots/mandoc.tar.gz
else
# failed to connect to upstream host; take Debian's source
DEBIAN_URL=http://ftp.debian.org/debian/pool/main/m/mdocml/
# figure out which one is the latest and get that
SRCFILE="$(curl -s ${DEBIAN_URL} 2>&- | sed -r 's/<[^>]*>//g' | sed -r 's/<[^>]*>$//g' | tr -s ' ' | grep -vE '^[ \t]*$' | grep ".orig.tar" | sed -r 's/[0-9]{4}-[0-9]{2}-[0-9]{2}.*$//g' | sort -n | tail -n 1)"
SRCFILE="$(curl -s ${DEBIAN_URL} 2>/dev/null | sed -r 's/<[^>]*>//g' | sed -r 's/<[^>]*>$//g' | tr -s ' ' | grep -vE '^[ \t]*$' | grep ".orig.tar" | sed -r 's/[0-9]{4}-[0-9]{2}-[0-9]{2}.*$//g' | sort -n | tail -n 1)"
curl -o mandoc.tar.gz ${DEBIAN_URL}/"${SRCFILE}"
fi
SUBDIR="$(tar -tvf mandoc.tar.gz | head -n 1 | rev | cut -d ' ' -f 1 | rev)"
Expand Down
4 changes: 2 additions & 2 deletions osdeps/arch/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ CWD="$(pwd)"
echo '%dist .ri47' > "${HOME}"/.rpmmacros

# There is no mandoc package in Arch Linux
if curl -s http://mandoc.bsd.lv/ >&- 2>&- ; then
if curl -s http://mandoc.bsd.lv/ >/dev/null 2>&1 ; then
curl -O http://mandoc.bsd.lv/snapshots/mandoc.tar.gz
else
# failed to connect to upstream host; take Debian's source
DEBIAN_URL=http://ftp.debian.org/debian/pool/main/m/mdocml/
# figure out which one is the latest and get that
SRCFILE="$(curl -s ${DEBIAN_URL} 2>&- | sed -r 's/<[^>]*>//g' | sed -r 's/<[^>]*>$//g' | tr -s ' ' | grep -vE '^[ \t]*$' | grep ".orig.tar" | sed -r 's/[0-9]{4}-[0-9]{2}-[0-9]{2}.*$//g' | sort -n | tail -n 1)"
SRCFILE="$(curl -s ${DEBIAN_URL} 2>/dev/null | sed -r 's/<[^>]*>//g' | sed -r 's/<[^>]*>$//g' | tr -s ' ' | grep -vE '^[ \t]*$' | grep ".orig.tar" | sed -r 's/[0-9]{4}-[0-9]{2}-[0-9]{2}.*$//g' | sort -n | tail -n 1)"
curl -o mandoc.tar.gz ${DEBIAN_URL}/"${SRCFILE}"
fi
SUBDIR="$(tar -tvf mandoc.tar.gz | head -n 1 | rev | cut -d ' ' -f 1 | rev)"
Expand Down
17 changes: 8 additions & 9 deletions osdeps/centos7/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,19 @@ sed -i -e 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure
make -j "$(nproc)"
make altinstall
PYTHON_VER="$(./python -c 'import sys ; print("%d.%d" % (sys.version_info[0], sys.version_info[1]))')"
unzip -d /usr/local/lib/python"${PYTHON_VER}"/site-packages /usr/local/lib/python"${PYTHON_VER}"/test/setuptools*whl

# Install Python modules for our recent Python. Have to do this here
# because post.sh installed the Python we have to use for these tests.
pip"${PYTHON_VER}" install --upgrade pip setuptools
pip"${PYTHON_VER}" install cpp-coveralls gcovr PyYAML timeout-decorator rpmfluff

# Now rebuild rpm because we need the Python bindings to use the newer
# Python.
cd "${CWD}" || exit 1
yumdownloader --source python3-rpm
SRPM="$(ls -1 "${CWD}"/*.rpm)"
rpmdev-setuptree
rpm -Uvh "${SRPM}" 2>&-
rpm -Uvh "${SRPM}" 2>/dev/null
rm -f "${SRPM}"
cd ~/rpmbuild/SPECS || exit 1
sed -i -e 's|^Name:.*$|Name: python3-rpm-rebuild|g' python3-rpm.spec
Expand All @@ -42,21 +46,16 @@ rpmbuild -ba \
python3-rpm.spec
rpm -Uvh ~/rpmbuild/RPMS/"$(uname -m)"/*.rpm

# Install Python modules for our recent Python. Have to do this here
# because post.sh installed the Python we have to use for these tests.
pip"${PYTHON_VER}" install --upgrade pip setuptools
pip"${PYTHON_VER}" install cpp-coveralls gcovr PyYAML timeout-decorator rpmfluff

# Install the latest mandoc package to /usr/local, the official EPEL-7
# repos may be dated.
cd "${CWD}" || exit 1
if curl -s http://mandoc.bsd.lv/ >&- 2>&- ; then
if curl -s http://mandoc.bsd.lv/ >/dev/null 2>&1 ; then
curl -O http://mandoc.bsd.lv/snapshots/mandoc.tar.gz
else
# failed to connect to upstream host; take Debian's source
DEBIAN_URL=http://ftp.debian.org/debian/pool/main/m/mdocml/
# figure out which one is the latest and get that
SRCFILE="$(curl -s ${DEBIAN_URL} 2>&- | sed -r 's/<[^>]*>//g' | sed -r 's/<[^>]*>$//g' | tr -s ' ' | grep -vE '^[ \t]*$' | grep ".orig.tar" | sed -r 's/[0-9]{4}-[0-9]{2}-[0-9]{2}.*$//g' | sort -n | tail -n 1)"
SRCFILE="$(curl -s ${DEBIAN_URL} 2>/dev/null | sed -r 's/<[^>]*>//g' | sed -r 's/<[^>]*>$//g' | tr -s ' ' | grep -vE '^[ \t]*$' | grep ".orig.tar" | sed -r 's/[0-9]{4}-[0-9]{2}-[0-9]{2}.*$//g' | sort -n | tail -n 1)"
curl -o mandoc.tar.gz ${DEBIAN_URL}/"${SRCFILE}"
fi
SUBDIR="$(tar -tvf mandoc.tar.gz | head -n 1 | rev | cut -d ' ' -f 1 | rev)"
Expand Down
4 changes: 2 additions & 2 deletions osdeps/debian-stable/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ esac

# The mandoc package on Debian lacks libmandoc.a and
# header files, which we need to build rpminspect
if curl -s http://mandoc.bsd.lv/ >&- 2>&- ; then
if curl -s http://mandoc.bsd.lv/ >/dev/null 2>&1 ; then
curl -O http://mandoc.bsd.lv/snapshots/mandoc.tar.gz
else
# failed to connect to upstream host; take Debian's source
DEBIAN_URL=http://ftp.debian.org/debian/pool/main/m/mdocml/
# figure out which one is the latest and get that
SRCFILE="$(curl -s ${DEBIAN_URL} 2>&- | sed -r 's/<[^>]*>//g' | sed -r 's/<[^>]*>$//g' | tr -s ' ' | grep -vE '^[ \t]*$' | grep ".orig.tar" | sed -r 's/[0-9]{4}-[0-9]{2}-[0-9]{2}.*$//g' | sort -n | tail -n 1)"
SRCFILE="$(curl -s ${DEBIAN_URL} 2>/dev/null | sed -r 's/<[^>]*>//g' | sed -r 's/<[^>]*>$//g' | tr -s ' ' | grep -vE '^[ \t]*$' | grep ".orig.tar" | sed -r 's/[0-9]{4}-[0-9]{2}-[0-9]{2}.*$//g' | sort -n | tail -n 1)"
curl -o mandoc.tar.gz ${DEBIAN_URL}/"${SRCFILE}"
fi
SUBDIR="$(tar -tvf mandoc.tar.gz | head -n 1 | rev | cut -d ' ' -f 1 | rev)"
Expand Down
4 changes: 2 additions & 2 deletions osdeps/debian-testing/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ esac

# The mandoc package on Debian lacks libmandoc.a and
# header files, which we need to build rpminspect
if curl -s http://mandoc.bsd.lv/ >&- 2>&- ; then
if curl -s http://mandoc.bsd.lv/ >/dev/null 2>&1 ; then
curl -O http://mandoc.bsd.lv/snapshots/mandoc.tar.gz
else
# failed to connect to upstream host; take Debian's source
DEBIAN_URL=http://ftp.debian.org/debian/pool/main/m/mdocml/
# figure out which one is the latest and get that
SRCFILE="$(curl -s ${DEBIAN_URL} 2>&- | sed -r 's/<[^>]*>//g' | sed -r 's/<[^>]*>$//g' | tr -s ' ' | grep -vE '^[ \t]*$' | grep ".orig.tar" | sed -r 's/[0-9]{4}-[0-9]{2}-[0-9]{2}.*$//g' | sort -n | tail -n 1)"
SRCFILE="$(curl -s ${DEBIAN_URL} 2>/dev/null | sed -r 's/<[^>]*>//g' | sed -r 's/<[^>]*>$//g' | tr -s ' ' | grep -vE '^[ \t]*$' | grep ".orig.tar" | sed -r 's/[0-9]{4}-[0-9]{2}-[0-9]{2}.*$//g' | sort -n | tail -n 1)"
curl -o mandoc.tar.gz ${DEBIAN_URL}/"${SRCFILE}"
fi
SUBDIR="$(tar -tvf mandoc.tar.gz | head -n 1 | rev | cut -d ' ' -f 1 | rev)"
Expand Down
2 changes: 1 addition & 1 deletion osdeps/fedora-rawhide.i686/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ esac
# Remove any potentially bad udev rules files
if [ -d /usr/lib/udev/rules.d ]; then
for rulefile in /usr/lib/udev/rules.d/*.rules ; do
if ! udevadm verify "${rulefile}" >&- 2>&- ; then
if ! udevadm verify "${rulefile}" >/dev/null 2>&1 ; then
rm -f "${rulefile}"
fi
done
Expand Down
2 changes: 1 addition & 1 deletion osdeps/fedora-rawhide/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ esac
# Remove any potentially bad udev rules files
if [ -d /usr/lib/udev/rules.d ]; then
for rulefile in /usr/lib/udev/rules.d/*.rules ; do
if ! udevadm verify "${rulefile}" >&- 2>&- ; then
if ! udevadm verify "${rulefile}" >/dev/null 2>&1 ; then
rm -f "${rulefile}"
fi
done
Expand Down
2 changes: 1 addition & 1 deletion osdeps/fedora.i686/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ case "$(uname -m)" in
esac

# Work around a bug in meson 0.55.0
MESON_VER="$(meson --version 2>&-)"
MESON_VER="$(meson --version 2>/dev/null)"

if [ -z "${MESON_VER}" ] || [ ! "${MESON_VER}" = "0.55.0" ]; then
exit 0
Expand Down
2 changes: 1 addition & 1 deletion osdeps/fedora/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ case "$(uname -m)" in
esac

# Work around a bug in meson 0.55.0
MESON_VER="$(meson --version 2>&-)"
MESON_VER="$(meson --version 2>/dev/null)"

if [ -z "${MESON_VER}" ] || [ ! "${MESON_VER}" = "0.55.0" ]; then
exit 0
Expand Down
6 changes: 3 additions & 3 deletions osdeps/freebsd/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ git clone https://git.freebsd.org/ports.git /usr/ports

# https://github.com/rpm-software-management/rpm/pull/2459
RPMTAG_HDR="/usr/local/include/rpm/rpmtag.h"
if grep RPM_MASK_RETURN_TYPE ${RPMTAG_HDR} 2>&- | grep -q 0xffff0000 >&- 2>&- ; then
if grep RPM_MASK_RETURN_TYPE ${RPMTAG_HDR} 2>/dev/null | grep -q 0xffff0000 >/dev/null 2>&1 ; then
sed -I -E 's|^.*RPM_MASK_RETURN_TYPE.*=.*0xffff0000$|#define RPM_MASK_RETURN_TYPE 0xffff0000|g' ${RPMTAG_HDR}
sed -I -E '/RPM_MAPPING_RETURN_TYPE/ s/\,$//' ${RPMTAG_HDR}
fi
Expand All @@ -26,13 +26,13 @@ pip install -q cpp-coveralls gcovr rpmfluff

# libmandoc is missing on FreeBSD
cd "${CWD}" || exit 1
if curl -s http://mandoc.bsd.lv/ >&- 2>&- ; then
if curl -s http://mandoc.bsd.lv/ >/dev/null 2>&1 ; then
curl -O http://mandoc.bsd.lv/snapshots/mandoc.tar.gz
else
# failed to connect to upstream host; take Debian's source
DEBIAN_URL=http://ftp.debian.org/debian/pool/main/m/mdocml/
# figure out which one is the latest and get that
SRCFILE="$(curl -s ${DEBIAN_URL} 2>&- | sed -r 's/<[^>]*>//g' | sed -r 's/<[^>]*>$//g' | tr -s ' ' | grep -vE '^[ \t]*$' | grep ".orig.tar" | sed -r 's/[0-9]{4}-[0-9]{2}-[0-9]{2}.*$//g' | sort -n | tail -n 1)"
SRCFILE="$(curl -s ${DEBIAN_URL} 2>/dev/null | sed -r 's/<[^>]*>//g' | sed -r 's/<[^>]*>$//g' | tr -s ' ' | grep -vE '^[ \t]*$' | grep ".orig.tar" | sed -r 's/[0-9]{4}-[0-9]{2}-[0-9]{2}.*$//g' | sort -n | tail -n 1)"
curl -o mandoc.tar.gz ${DEBIAN_URL}/"${SRCFILE}"
fi
SUBDIR="$(tar -tvf mandoc.tar.gz | head -n 1 | rev | cut -d ' ' -f 1 | rev)"
Expand Down
4 changes: 2 additions & 2 deletions osdeps/gentoo/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ CWD="$(pwd)"

# The mandoc package in Gentoo Linux is both masked and does not
# install the library.
if curl -s http://mandoc.bsd.lv/ >&- 2>&- ; then
if curl -s http://mandoc.bsd.lv/ >/dev/null 2>&1 ; then
curl -O http://mandoc.bsd.lv/snapshots/mandoc.tar.gz
else
# failed to connect to upstream host; take Debian's source
DEBIAN_URL=http://ftp.debian.org/debian/pool/main/m/mdocml/
# figure out which one is the latest and get that
SRCFILE="$(curl -s ${DEBIAN_URL} 2>&- | sed -r 's/<[^>]*>//g' | sed -r 's/<[^>]*>$//g' | tr -s ' ' | grep -vE '^[ \t]*$' | grep ".orig.tar" | sed -r 's/[0-9]{4}-[0-9]{2}-[0-9]{2}.*$//g' | sort -n | tail -n 1)"
SRCFILE="$(curl -s ${DEBIAN_URL} 2>/dev/null | sed -r 's/<[^>]*>//g' | sed -r 's/<[^>]*>$//g' | tr -s ' ' | grep -vE '^[ \t]*$' | grep ".orig.tar" | sed -r 's/[0-9]{4}-[0-9]{2}-[0-9]{2}.*$//g' | sort -n | tail -n 1)"
curl -o mandoc.tar.gz ${DEBIAN_URL}/"${SRCFILE}"
fi
SUBDIR="$(tar -tvf mandoc.tar.gz | head -n 1 | rev | cut -d ' ' -f 1 | rev)"
Expand Down
4 changes: 2 additions & 2 deletions osdeps/mageia/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin
CWD="$(pwd)"

# Mageia Linux does not have mandoc
if curl -s http://mandoc.bsd.lv/ >&- 2>&- ; then
if curl -s http://mandoc.bsd.lv/ >/dev/null 2>&1 ; then
curl -O http://mandoc.bsd.lv/snapshots/mandoc.tar.gz
else
# failed to connect to upstream host; take Debian's source
DEBIAN_URL=http://ftp.debian.org/debian/pool/main/m/mdocml/
# figure out which one is the latest and get that
SRCFILE="$(curl -s ${DEBIAN_URL} 2>&- | sed -r 's/<[^>]*>//g' | sed -r 's/<[^>]*>$//g' | tr -s ' ' | grep -vE '^[ \t]*$' | grep ".orig.tar" | sed -r 's/[0-9]{4}-[0-9]{2}-[0-9]{2}.*$//g' | sort -n | tail -n 1)"
SRCFILE="$(curl -s ${DEBIAN_URL} 2>/dev/null | sed -r 's/<[^>]*>//g' | sed -r 's/<[^>]*>$//g' | tr -s ' ' | grep -vE '^[ \t]*$' | grep ".orig.tar" | sed -r 's/[0-9]{4}-[0-9]{2}-[0-9]{2}.*$//g' | sort -n | tail -n 1)"
curl -o mandoc.tar.gz ${DEBIAN_URL}/"${SRCFILE}"
fi
SUBDIR="$(tar -tvf mandoc.tar.gz | head -n 1 | rev | cut -d ' ' -f 1 | rev)"
Expand Down
4 changes: 2 additions & 2 deletions osdeps/opensuse-leap/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ sed -i -e '/^%vendor/d' /usr/lib/rpm/macros.d/*

# The mandoc package on OpenSUSE lacks libmandoc.a and
# header files, which we need to build rpminspect
if curl -s http://mandoc.bsd.lv/ >&- 2>&- ; then
if curl -s http://mandoc.bsd.lv/ >/dev/null 2>&1 ; then
curl -O http://mandoc.bsd.lv/snapshots/mandoc.tar.gz
else
# failed to connect to upstream host; take Debian's source
DEBIAN_URL=http://ftp.debian.org/debian/pool/main/m/mdocml/
# figure out which one is the latest and get that
SRCFILE="$(curl -s ${DEBIAN_URL} 2>&- | sed -r 's/<[^>]*>//g' | sed -r 's/<[^>]*>$//g' | tr -s ' ' | grep -vE '^[ \t]*$' | grep ".orig.tar" | sed -r 's/[0-9]{4}-[0-9]{2}-[0-9]{2}.*$//g' | sort -n | tail -n 1)"
SRCFILE="$(curl -s ${DEBIAN_URL} 2>/dev/null | sed -r 's/<[^>]*>//g' | sed -r 's/<[^>]*>$//g' | tr -s ' ' | grep -vE '^[ \t]*$' | grep ".orig.tar" | sed -r 's/[0-9]{4}-[0-9]{2}-[0-9]{2}.*$//g' | sort -n | tail -n 1)"
curl -o mandoc.tar.gz ${DEBIAN_URL}/"${SRCFILE}"
fi
SUBDIR="$(tar -tvf mandoc.tar.gz | head -n 1 | rev | cut -d ' ' -f 1 | rev)"
Expand Down
4 changes: 2 additions & 2 deletions osdeps/opensuse-tumbleweed/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ CWD="$(pwd)"

# The mandoc package on OpenSUSE lacks libmandoc.a and
# header files, which we need to build rpminspect
if curl -s http://mandoc.bsd.lv/ >&- 2>&- ; then
if curl -s http://mandoc.bsd.lv/ >/dev/null 2>&1 ; then
curl -O http://mandoc.bsd.lv/snapshots/mandoc.tar.gz
else
# failed to connect to upstream host; take Debian's source
DEBIAN_URL=http://ftp.debian.org/debian/pool/main/m/mdocml/
# figure out which one is the latest and get that
SRCFILE="$(curl -s ${DEBIAN_URL} 2>&- | sed -r 's/<[^>]*>//g' | sed -r 's/<[^>]*>$//g' | tr -s ' ' | grep -vE '^[ \t]*$' | grep ".orig.tar" | sed -r 's/[0-9]{4}-[0-9]{2}-[0-9]{2}.*$//g' | sort -n | tail -n 1)"
SRCFILE="$(curl -s ${DEBIAN_URL} 2>/dev/null | sed -r 's/<[^>]*>//g' | sed -r 's/<[^>]*>$//g' | tr -s ' ' | grep -vE '^[ \t]*$' | grep ".orig.tar" | sed -r 's/[0-9]{4}-[0-9]{2}-[0-9]{2}.*$//g' | sort -n | tail -n 1)"
curl -o mandoc.tar.gz ${DEBIAN_URL}/"${SRCFILE}"
fi
SUBDIR="$(tar -tvf mandoc.tar.gz | head -n 1 | awk '{ print $6; }')"
Expand Down
4 changes: 2 additions & 2 deletions osdeps/oraclelinux8/defs.mk
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
PKG_CMD = dnf install -y
PIP_CMD = pip3 install -I
PKG_CMD = dnf install --allowerasing --nobest -y
PIP_CMD = pip-3.11 install
3 changes: 2 additions & 1 deletion osdeps/oraclelinux8/pip.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cpp-coveralls
rpmfluff
gcovr
PyYAML
rpmfluff
timeout-decorator
3 changes: 2 additions & 1 deletion osdeps/oraclelinux8/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ if [ "$(uname -m)" = "x86_64" ]; then
fi

# cdson is not [yet] in Oracle Linux
git clone https://github.com/frozencemetery/cdson.git
cd "${CWD}" || exit 1
git clone -q https://github.com/frozencemetery/cdson.git
cd cdson || exit 1
TAG="$(git tag -l | sort -n | tail -n 1)"
git checkout -b "${TAG}" "${TAG}"
Expand Down
6 changes: 0 additions & 6 deletions osdeps/oraclelinux8/pre.sh

This file was deleted.

10 changes: 5 additions & 5 deletions osdeps/oraclelinux8/reqs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ meson
ninja-build
openssl-devel
patchelf
python3-devel
python3-pip
python3-pyyaml
python3-rpm
python3-timeout-decorator
python3.11-devel
python3.11-pip
python3.11-pyyaml
python3.11-rpm
python3.11-timeout-decorator
rc
rpm-build
rpm-devel
Expand Down
2 changes: 1 addition & 1 deletion osdeps/oraclelinux9/defs.mk
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
PKG_CMD = dnf install -y
PIP_CMD = pip3 install -I
PIP_CMD = pip3 install
3 changes: 2 additions & 1 deletion osdeps/oraclelinux9/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ if [ "$(uname -m)" = "x86_64" ]; then
fi

# cdson is not [yet] in Oracle Linux
git clone https://github.com/frozencemetery/cdson.git
cd "${CWD}" || exit 1
git clone -q https://github.com/frozencemetery/cdson.git
cd cdson || exit 1
TAG="$(git tag -l | sort -n | tail -n 1)"
git checkout -b "${TAG}" "${TAG}"
Expand Down
4 changes: 2 additions & 2 deletions osdeps/ubuntu/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ echo '%dist .ri47' > "${HOME}"/.rpmmacros

# The mandoc package on Ubuntu lacks libmandoc.a and
# header files, which we need to build rpminspect
if curl -s http://mandoc.bsd.lv/ >&- 2>&- ; then
if curl -s http://mandoc.bsd.lv/ >/dev/null 2>&1 ; then
curl -O http://mandoc.bsd.lv/snapshots/mandoc.tar.gz
else
# failed to connect to upstream host; take Debian's source
DEBIAN_URL=http://ftp.debian.org/debian/pool/main/m/mdocml/
# figure out which one is the latest and get that
SRCFILE="$(curl -s ${DEBIAN_URL} 2>&- | sed -r 's/<[^>]*>//g' | sed -r 's/<[^>]*>$//g' | tr -s ' ' | grep -vE '^[ \t]*$' | grep ".orig.tar" | sed -r 's/[0-9]{4}-[0-9]{2}-[0-9]{2}.*$//g' | sort -n | tail -n 1)"
SRCFILE="$(curl -s ${DEBIAN_URL} 2>/dev/null | sed -r 's/<[^>]*>//g' | sed -r 's/<[^>]*>$//g' | tr -s ' ' | grep -vE '^[ \t]*$' | grep ".orig.tar" | sed -r 's/[0-9]{4}-[0-9]{2}-[0-9]{2}.*$//g' | sort -n | tail -n 1)"
curl -o mandoc.tar.gz ${DEBIAN_URL}/"${SRCFILE}"
fi
SUBDIR="$(tar -tvf mandoc.tar.gz | head -n 1 | rev | cut -d ' ' -f 1 | rev)"
Expand Down
2 changes: 1 addition & 1 deletion regress/all-inspections-kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ trap 'rm -rf "${TMPDIR}"' EXIT

# Make sure we have additional commands available
for cmd in ${RPMINSPECT} ${TIMECMD} koji ; do
${cmd} --help >&- 2>&-
${cmd} --help >/dev/null 2>&1
if [ $? -eq 127 ]; then
echo "*** Missing ${cmd}, exiting." >&2
exit 1
Expand Down
2 changes: 1 addition & 1 deletion regress/indiv-inspections-kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ trap 'rm -rf "${TMPDIR}"' EXIT

# Make sure we have additional commands available
for cmd in ${RPMINSPECT} ${TIMECMD} koji ; do
${cmd} --help >&- 2>&-
${cmd} --help >/dev/null 2>&1
if [ $? -eq 127 ]; then
echo "*** Missing ${cmd}, exiting." >&2
exit 1
Expand Down
4 changes: 2 additions & 2 deletions utils/determine-os.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [ -r /etc/os-release ] || [ -L /etc/os-release ]; then
fi

# Crux Linux lacks /etc/os-release or an /etc/*-release file
grep -q ^CRUX /etc/issue >&- 2>&-
grep -q ^CRUX /etc/issue >/dev/null 2>&1
IS_CRUX=$?

# NetBSD does not have an /etc/os-release file
Expand All @@ -22,7 +22,7 @@ if [ -z "${ID}" ] && [ ! -f /etc/os-release ]; then
fi

if [ -r /etc/fedora-release ] && [ "${ID}" = "fedora" ]; then
if grep -q -i rawhide /etc/fedora-release >&- 2>&- ; then
if grep -q -i rawhide /etc/fedora-release >/dev/null 2>&1 ; then
echo "${ID}-rawhide"
else
echo "${ID}"
Expand Down
4 changes: 2 additions & 2 deletions utils/find-ninja.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
# Find the ninja command to use.
#

if ! ninja --help >&- 2>&- ; then
if ! ninja --help >/dev/null 2>&1 ; then
echo "ninja"
exit 0
fi

if ! ninja-build --help >&- 2>&- ; then
if ! ninja-build --help >/dev/null 2>&1 ; then
echo "ninja-build"
exit 0
fi
Expand Down
2 changes: 1 addition & 1 deletion utils/gate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ packages="zsh kernel python3 firefox mutt emacs tmux elfutils"
# Validate programs we need are present
reqs="rpmbuild koji"
for req in $reqs; do
if ! $req --help >&- 2>&-; then
if ! $req --help >/dev/null 2>&1 ; then
echo "ERROR: Required program $req missing." >&2
exit 1
fi
Expand Down
Loading

0 comments on commit 94af90e

Please sign in to comment.