diff --git a/.gitignore b/.gitignore index 1f762da..7af7ecc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ SOURCES/jitterentropy-library-3.4.1.tar.gz -SOURCES/rng-tools-6.15.tar.gz +SOURCES/rng-tools-6.16.tar.gz /jitterentropy-library-3.4.1.tar.gz -/rng-tools-6.15.tar.gz +/rng-tools-6.16.tar.gz diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..6985029 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-8 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/rng-tools.spec b/rng-tools.spec index 0bfa277..14a02b7 100644 --- a/rng-tools.spec +++ b/rng-tools.spec @@ -2,8 +2,8 @@ Summary: Random number generator related utilities Name: rng-tools -Version: 6.15 -Release: 3%{?dist} +Version: 6.16 +Release: 1%{?dist} Group: System Environment/Base License: GPLv2+ URL: https://github.com/nhorman/rng-tools @@ -20,6 +20,7 @@ BuildRequires: libgcrypt-devel libcurl-devel BuildRequires: libxml2-devel openssl-devel BuildRequires: jansson-devel BuildRequires: libcap-devel +Suggests: opensc Requires(post): systemd Requires(preun): systemd @@ -48,6 +49,12 @@ mv jitterentropy-library-3.4.1 jitterentropy-library %build ./autogen.sh +# a dirty hack to force PIC for a PIC-aware assembly code for i686 +# /usr/lib/rpm/redhat/redhat-hardened-cc1 in Koji/Brew does not +# force PIC for assembly sources as of now +%ifarch i386 i686 +sed -i -e '/^#define RDRAND_RETRY_LIMIT\t10/a#define __PIC__ 1' rdrand_asm.S +%endif # a dirty hack so libdarn_impl_a_CFLAGS overrides common CFLAGS sed -i -e 's/$(libdarn_impl_a_CFLAGS) $(CFLAGS)/$(CFLAGS) $(libdarn_impl_a_CFLAGS)/' Makefile.in %configure --without-pkcs11 --without-rtlsdr @@ -82,6 +89,11 @@ install -D %{SOURCE2} -m0644 %{buildroot}%{_sysconfdir}/sysconfig/rngd %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/rngd %changelog +* Thu Mar 02 2023 Vladis Dronov - 6.16-1 +- Update rng-tools to v6.16 @ 0e560296 (bz 2174908) +- Get rid of text relocations in -fPIE build +- Add a hint for opensc package (bz 1845854) + * Tue Dec 27 2022 Vladis Dronov - 6.15-3 - Update rng-tools to v6.15 @ cb8cc624 (bz 2141379) - Update jitterentropy library to v3.4.1 @ 7bf9f85d diff --git a/sources b/sources index 24fef7d..fdd8641 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (jitterentropy-library-3.4.1.tar.gz) = b3b0a2fbac9b95f9c0da792647cc74abe464099bb2d26ca50f3903da280b4dc2020e024180792f88208524cccddfcea185e2e64c580145d65bd59c6a9e472bd9 -SHA512 (rng-tools-6.15.tar.gz) = eb4e3409c1d2b44644d3fd75afc9a47df2f273a47b1b9397a7eaf35c075bb9a9130c66975afd3cb0e5316d653d9b9c7c786695d4b514e51843c5a7976aea8554 +SHA512 (rng-tools-6.16.tar.gz) = 09d3ddc130486380efed726a29fb0a159f05140ee4e7f8a339af089dd75afaeaf2c3dc6a8b8ac955692a39ef9f4056a64cb2878c78a74f706776fb4fd563d7ec diff --git a/tests/README b/tests/README new file mode 100644 index 0000000..db70842 --- /dev/null +++ b/tests/README @@ -0,0 +1,2 @@ +initial tests: +run make check in src, which runs any selftests in the upstream source tarball diff --git a/tests/inventory b/tests/inventory new file mode 100755 index 0000000..6238138 --- /dev/null +++ b/tests/inventory @@ -0,0 +1,3 @@ +#!/bin/bash +export TEST_DOCKER_EXTRA_ARGS="--security-opt seccomp:unconfined" +exec merge-standard-inventory "$@" diff --git a/tests/selftest/Makefile b/tests/selftest/Makefile new file mode 100644 index 0000000..7b452de --- /dev/null +++ b/tests/selftest/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/patch/Sanity/selftest +# Description: Executes upstream test suite +# Author: Miroslav Vadkerti +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2010 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/CoreOS/rng-tools/Sanity/selftest +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Miroslav Vadkerti " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Executes upstream test suite" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 30m" >> $(METADATA) + @echo "RunFor: patch" >> $(METADATA) + @echo "Requires: patch gcc rpm-build automake libselinux-devel ed libattr-devel" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Releases: -RHEL3 -RHEL4 -RHELServer5 -RHELClient5" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/selftest/PURPOSE b/tests/selftest/PURPOSE new file mode 100644 index 0000000..b40985f --- /dev/null +++ b/tests/selftest/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/rng-tools/Sanity/selftest +Description: Executes rngtest to validate randomness of rng data +Author: Neil Horman diff --git a/tests/selftest/runtest.sh b/tests/selftest/runtest.sh new file mode 100755 index 0000000..ee4161a --- /dev/null +++ b/tests/selftest/runtest.sh @@ -0,0 +1,76 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/rng-tools/Sanity/selftest +# Description: Executes the upstream test suite comming with the package +# Author: Miroslav Vadkerti +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2010 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include rhts environment +. /usr/bin/rhts-environment.sh || exit 1 +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="rng-tools" +PACKAGES="rng-tools gcc make binutils gettext automake autoconf jansson-devel libcap-devel libxml2 libxml2-devel openssl-devel libcurl-devel libgcrypt-devel" +UPSTREAMPKG="rng-tools-*" +BUILDLOG=`mktemp` +TESTLOG=`mktemp` +TARGET=$(echo `uname -m` | egrep ppc) +if [[ $TARGET != "" ]]; then TARGET="--target `uname -m`"; fi +TOPDIR=`mktemp -d` +SPEC="$TOPDIR/SPECS/$PACKAGE*.spec" +TESTDIR="$TOPDIR/BUILD/$UPSTREAMPKG/" + +rlJournalStart + rlPhaseStartSetup + for PKG in $PACKAGES; do + rlAssertRpm $PKG + done + rlPhaseEnd + + rlPhaseStartTest + rlFetchSrcForInstalled $PACKAGE + rlRun "rpm -ivh --define '_topdir $TOPDIR' $PACKAGE*.src.rpm" 0 "Installing $PACKAGE src rpm" + echo "+ Building $PACKAGE (Log: $BUILDLOG)" + echo "+ Build command: rpmbuild -bc $SPEC $TARGET" + rlRun "rpmbuild --define '_topdir $TOPDIR' -bc $SPEC $TARGET &> $BUILDLOG" + echo "+ Buildlog:" + tail -n 100 $BUILDLOG + rlRun "pushd ." + rlRun "cd $TESTDIR" + rlRun "RNGD_JITTER_TIMEOUT=60 make check &> $TESTLOG" + if [ $? -eq 0 ] + then + rlPass "Selftest Passed" + else + rlFail "Selftest Failed" + fi + rlFileSubmit $TESTLOG + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -rf $PACKAGE*.src.rpm" 0 "Removing source rpm" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..e6f64ab --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,17 @@ +--- +# This first play always runs on the local staging system +- hosts: localhost + roles: + - role: standard-test-beakerlib + tags: + - classic + tests: + - selftest + required_packages: + - jansson-devel + - libcap-devel + - libxml2 + - libxml2-devel + - openssl-devel + - libcurl-devel + - libgcrypt-devel