Compare commits

..

No commits in common. "c8" and "c10s" have entirely different histories.
c8 ... c10s

24 changed files with 517 additions and 125 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

53
.gitignore vendored
View File

@ -1,2 +1,51 @@
SOURCES/gpgkey-1F42418905D8206AA754CCDC29EE58B996865171.gpg
SOURCES/libtasn1-4.13.tar.gz
libtasn1-2.4.tar.gz
libtasn1-2.7.tar.gz
/libtasn1-2.12.tar.gz
/libtasn1-2.13.tar.gz
/libtasn1-2.14.tar.gz
/libtasn1-3.2.tar.gz
/libtasn1-3.2.tar.gz.sig
/libtasn1-3.3.tar.gz
/libtasn1-3.3.tar.gz.sig
/libtasn1-3.4.tar.gz
/libtasn1-3.4.tar.gz.sig
/libtasn1-3.5.tar.gz
/libtasn1-3.5.tar.gz.sig
/libtasn1-3.6.tar.gz
/libtasn1-3.6.tar.gz.sig
/libtasn1-4.0.tar.gz
/libtasn1-4.0.tar.gz.sig
/libtasn1-4.1.tar.gz.sig
/libtasn1-4.1.tar.gz
/libtasn1-4.2.tar.gz.sig
/libtasn1-4.2.tar.gz
/libtasn1-4.3.tar.gz.sig
/libtasn1-4.3.tar.gz
/libtasn1-4.4.tar.gz.sig
/libtasn1-4.4.tar.gz
/libtasn1-4.5.tar.gz.sig
/libtasn1-4.5.tar.gz
/libtasn1-4.7.tar.gz
/libtasn1-4.7.tar.gz.sig
/libtasn1-4.8.tar.gz.sig
/libtasn1-4.8.tar.gz
/libtasn1-4.9.tar.gz.sig
/libtasn1-4.9.tar.gz
/libtasn1-4.10.tar.gz
/libtasn1-4.10.tar.gz.sig
/libtasn1-4.12.tar.gz.sig
/libtasn1-4.12.tar.gz
/libtasn1-4.13.tar.gz.sig
/libtasn1-4.13.tar.gz
/libtasn1-4.14.tar.gz
/libtasn1-4.14.tar.gz.sig
/libtasn1-4.15.0.tar.gz
/libtasn1-4.15.0.tar.gz.sig
/libtasn1-4.16.0.tar.gz
/libtasn1-4.16.0.tar.gz.sig
/libtasn1-4.17.0.tar.gz
/libtasn1-4.17.0.tar.gz.sig
/libtasn1-4.18.0.tar.gz
/libtasn1-4.18.0.tar.gz.sig
/libtasn1-4.19.0.tar.gz
/libtasn1-4.19.0.tar.gz.sig

View File

@ -1,2 +0,0 @@
a5442dfcf7f1b60f55f0e270e014a57710e75069 SOURCES/gpgkey-1F42418905D8206AA754CCDC29EE58B996865171.gpg
a84afb4cd8187c1fa5901c6bc1cf1486eea66635 SOURCES/libtasn1-4.13.tar.gz

2
Makefile Normal file
View File

@ -0,0 +1,2 @@
MAKEFILE_COMMON = $(HOME)/.fedora/common.mk
-include $(MAKEFILE_COMMON)

View File

@ -1,11 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQEzBAABCAAdFiEEqBLL/fzcTQvnoJMSnV6q9pATuEIFAlpeOtEACgkQnV6q9pAT
uEIWNAf/YnmT4u3ShAfhUKE4sIap+8ivG5AxCPw1Rwgwc8qcS2VKOVeiwYTWmt9t
g5CDrVu27DTPbCkdS7sTKrHQT3Pjc2DRJWHJbaHr5J717sNp50XWWXjNyZGrmyN4
ais1d7no0GMXRsR6SUOFi+M52Q/vWhhYz4gaDAV9XSOqbJ6MPiw4BhjqyVSQ4lwD
Lfn4upk+1JFjzCpVft7iXrx1P4RXvFJC1sBYpUJAbdm9y0rO5jGiY7EHokDNq1rT
71hBWUclo37GsJnF65CRD1Mb5/wdZxm2wvEL/SFlHKqnY/uB3y4u7il91fi9zrwY
mDmVimu7E563pqum16000pybZIEmFw==
=LTAv
-----END PGP SIGNATURE-----

View File

@ -1,11 +0,0 @@
--- a/lib/int.h 2022-11-30 14:21:26.985600761 -0500
+++ b/lib/int.h 2022-11-30 14:23:25.856065950 -0500
@@ -97,7 +97,7 @@
#define ETYPE_TAG(etype) (_asn1_tags[etype].tag)
#define ETYPE_CLASS(etype) (_asn1_tags[etype].class)
#define ETYPE_OK(etype) (((etype) != ASN1_ETYPE_INVALID && \
- (etype) <= _asn1_tags_size && \
+ (etype) < _asn1_tags_size && \
_asn1_tags[(etype)].desc != NULL)?1:0)
#define ETYPE_IS_STRING(etype) ((etype == ASN1_ETYPE_GENERALSTRING || \

View File

@ -1,120 +1,61 @@
Summary: The ASN.1 library used in GNUTLS
Name: libtasn1
Version: 4.13
Release: 4%{?dist}
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.18.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
# The libtasn1 library is LGPLv2+, utilities are GPLv3+
License: GPLv3+ and LGPLv2+
Group: System Environment/Libraries
URL: http://www.gnu.org/software/libtasn1/
Source0: http://ftp.gnu.org/gnu/libtasn1/%name-%version.tar.gz
Source1: http://ftp.gnu.org/gnu/libtasn1/%name-%version.tar.gz.sig
Source2: gpgkey-1F42418905D8206AA754CCDC29EE58B996865171.gpg
Patch1: libtasn1-3.4-rpath.patch
Patch300: libtasn1-4.19-CVE-2021-46848.patch
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.18.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
BuildRequires: bison, pkgconfig, help2man
BuildRequires: autoconf, automake, libtool
%ifarch %{valgrind_arches}
BuildRequires: valgrind-devel
%endif
# Wildcard bundling exception https://fedorahosted.org/fpc/ticket/174
Provides: bundled(gnulib) = 20130324
* Tue Nov 9 2021 Simo Sorce <simo@redhat.com> - 4.18.0-1
- Update to 4.18.0 (#2021613)
%package devel
Summary: Files for development of applications which will use libtasn1
Group: Development/Libraries
Requires: %name = %version-%release
Requires: pkgconfig
Requires(post): /sbin/install-info
Requires(postun): /sbin/install-info
* Wed Nov 3 2021 Simo Sorce <simo@redhat.com> - 4.17.0-1
- Update to 4.17.0 (#1960364)
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.16.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
%package tools
Summary: Some ASN.1 tools
Group: Applications/Text
License: GPLv3+
Requires: %name = %version-%release
* Tue Apr 06 2021 Simo Sorce <simo@redhat.com> - 4.16.0-5
- Add gtk-doc as BuildRequire
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.16.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
%description
A library that provides Abstract Syntax Notation One (ASN.1, as specified
by the X.680 ITU-T recommendation) parsing and structures management, and
Distinguished Encoding Rules (DER, as per X.690) encoding and decoding functions.
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.16.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
%description devel
This package contains files for development of applications which will
use libtasn1.
* Mon Jul 13 2020 Tom Stellard <tstellar@redhat.com> - 4.16.0-2
- Use make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Sun Feb 02 2020 Nikos Mavrogiannopoulos <nmav@redhat.com> - 4.16.0-1
- Update to 4.14 (#1621973)
%description tools
This package contains simple tools that can decode and encode ASN.1
data.
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.15.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Nov 21 2019 Simo Sorce <simo@redhat.com> - 4.15.0-1
- Update to 4.15.0 (#1775065)
%prep
gpgv2 --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
%setup -q
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.14-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
%patch1 -p1 -b .rpath
%patch300 -p1 -b .CVE-2021-46848
* Mon Jul 22 2019 Nikos Mavrogiannopoulos <nmav@redhat.com> - 4.14-1
- Update to 4.14 (#1621973)
%build
autoreconf -v -f --install
%configure --disable-static --disable-silent-rules
# libtasn1 likes to regenerate docs
touch doc/stamp_docs
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.13-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
make %{?_smp_mflags}
* Mon Oct 29 2018 James Antill <james.antill@redhat.com> - 4.13-6
- Remove ldconfig scriptlet, now done via. transfiletrigger in glibc.
* Mon Oct 22 2018 Nikos Mavrogiannopoulos <nmav@redhat.com> - 4.13-5
- libtasn1-devel requires the tools subpackage; it is necessary for
development.
%install
make DESTDIR="$RPM_BUILD_ROOT" install
* Sat Jul 21 2018 Peter Robinson <pbrobinson@fedoraproject.org> 4.13-4
- Add missing gcc/gnupg2 deps, spec cleanups
rm -f $RPM_BUILD_ROOT{%_libdir/*.la,%_infodir/dir}
%check
make check
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post devel
test -f %_infodir/%name.info.gz && \
/sbin/install-info --info-dir=%_infodir %_infodir/%name.info || :
%preun devel
test "$1" = 0 -a -f %_infodir/%name.info.gz && \
/sbin/install-info --info-dir=%_infodir --delete %_infodir/%name.info || :
%files
%{!?_licensedir:%global license %%doc}
%license COPYING*
%doc AUTHORS NEWS README THANKS
%{_libdir}/*.so.6*
%files tools
%{_bindir}/asn1*
%{_mandir}/man1/asn1*
%files devel
%doc doc/TODO doc/*.pdf
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/*
%{_infodir}/*.info.*
%{_mandir}/man3/*asn1*
%changelog
* Wed Nov 30 2022 Simo Sorce <simo@redhat.com> - 4.13-4
- Resolves: rhbz#2140600
* Fri Aug 3 2018 Florian Weimer <fweimer@redhat.com> - 4.13-3
- Honor %%{valgrind_arches}
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.13-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.13-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
@ -344,3 +285,4 @@ test "$1" = 0 -a -f %_infodir/%name.info.gz && \
* Tue Jun 10 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> 0:0.2.4-0.fdr.1
- Initial build.

1
ci.fmf Normal file
View File

@ -0,0 +1 @@
resultsdb-testcase: separate

7
gating.yaml Normal file
View File

@ -0,0 +1,7 @@
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/ci/buildroot-enabled.functional}
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/ci/buildroot-disabled.functional}

Binary file not shown.

Binary file not shown.

Binary file not shown.

98
libtasn1.spec Normal file
View File

@ -0,0 +1,98 @@
Summary: The ASN.1 library used in GNUTLS
Name: libtasn1
Version: 4.19.0
Release: %autorelease
# The libtasn1 library is LGPLv2+, utilities are GPLv3+
License: GPL-3.0-or-later AND LGPL-2.1-or-later
URL: http://www.gnu.org/software/libtasn1/
Source0: http://ftp.gnu.org/gnu/libtasn1/%name-%version.tar.gz
Source1: http://ftp.gnu.org/gnu/libtasn1/%name-%version.tar.gz.sig
#Source2: gpgkey-1F42418905D8206AA754CCDC29EE58B996865171.gpg
#Source2: gpgkey-99415CE1905D0E55A9F88026860B7FBB32F8119D.gpg
Source2: gpgkey-B1D2BD1375BECB784CF4F8C4D73CF638C53C06BE.gpg
Patch1: libtasn1-3.4-rpath.patch
BuildRequires: gnupg2
BuildRequires: gcc
BuildRequires: bison, pkgconfig, help2man
BuildRequires: autoconf, automake, libtool
BuildRequires: valgrind-devel
BuildRequires: make
BuildRequires: gtk-doc
# Wildcard bundling exception https://fedorahosted.org/fpc/ticket/174
Provides: bundled(gnulib) = 20130324
%package devel
Summary: Files for development of applications which will use libtasn1
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %name = %version-%release
Requires: %{name}-tools = %{version}-%{release}
Requires: pkgconfig
%package tools
Summary: Some ASN.1 tools
License: GPLv3+
Requires: %{name}%{?_isa} = %{version}-%{release}
%description
A library that provides Abstract Syntax Notation One (ASN.1, as specified
by the X.680 ITU-T recommendation) parsing and structures management, and
Distinguished Encoding Rules (DER, as per X.690) encoding and decoding functions.
%description devel
This package contains files for development of applications which will
use libtasn1.
%description tools
This package contains simple tools that can decode and encode ASN.1
data.
%prep
gpgv2 --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
%setup -q
%patch1 -p1 -b .rpath
%build
autoreconf -v -f --install
%configure --disable-static --disable-silent-rules
# libtasn1 likes to regenerate docs
touch doc/stamp_docs
%make_build
%install
%make_install
rm -f $RPM_BUILD_ROOT{%_libdir/*.la,%_infodir/dir}
%check
make check
%files
%license COPYING doc/COPYING*
%doc AUTHORS NEWS README.md
%{_libdir}/*.so.6*
%files tools
%{_bindir}/asn1*
%{_mandir}/man1/asn1*
%files devel
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/*
%{_infodir}/*.info.*
%{_mandir}/man3/*asn1*
%changelog
%autochangelog

11
plans/ci.fmf Normal file
View File

@ -0,0 +1,11 @@
/buildroot-disabled:
plan:
import:
url: https://pkgs.devel.redhat.com/git/tests/libtasn1
name: /plans/ci/buildroot-disabled
/buildroot-enabled:
plan:
import:
url: https://pkgs.devel.redhat.com/git/tests/libtasn1
name: /plans/ci/buildroot-enabled

2
sources Normal file
View File

@ -0,0 +1,2 @@
SHA512 (libtasn1-4.19.0.tar.gz) = 287f5eddfb5e21762d9f14d11997e56b953b980b2b03a97ed4cd6d37909bda1ed7d2cdff9da5d270a21d863ab7e54be6b85c05f1075ac5d8f0198997cf335ef4
SHA512 (libtasn1-4.19.0.tar.gz.sig) = e0417625f8df22c6421914bf2d4f19d7f27260c24c04f50e59669681f326debe06ddef9dc5a2e20fda50feb30bbbf3f41597e64961257304ec2c407aa76d107e

View File

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/libtasn1/Regression/libtasn1-doesn-t-handle-OIDs-which-have-elements
# Description: Test for libtasn1 doesn't handle OIDs which have elements
# Author: Hubert Kario <hkario@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2016 Red Hat, Inc.
#
# 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/libtasn1/Regression/libtasn1-doesn-t-handle-OIDs-which-have-elements
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)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Hubert Kario <hkario@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for libtasn1 doesn't handle OIDs which have elements" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 10m" >> $(METADATA)
@echo "RunFor: libtasn1" >> $(METADATA)
@echo "Requires: libtasn1 libtasn1-tools openssl" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,6 @@
PURPOSE of /CoreOS/libtasn1/Regression/libtasn1-doesn-t-handle-OIDs-which-have-elements
Description: Test for libtasn1 doesn't handle OIDs which have elements
Author: Hubert Kario <hkario@redhat.com>
Bug summary: libtasn1 doesn't handle OIDs which have elements of size which exceed 32-bits
Test that libtasn1 does handle OIDs which have elements of size which exceed 32-bits

View File

@ -0,0 +1,71 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/libtasn1/Regression/libtasn1-doesn-t-handle-OIDs-which-have-elements
# Description: Test for libtasn1 doesn't handle OIDs which have elements
# Author: Hubert Kario <hkario@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2016 Red Hat, Inc.
#
# 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 Beaker environment
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="libtasn1"
TOP_DIR="$(rpm --eval=%{_topdir})"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlRun "echo 'PKIX1 { }
DEFINITIONS IMPLICIT TAGS ::=
BEGIN
Dss-Sig-Value ::= SEQUENCE {
r OBJECT IDENTIFIER,
s INTEGER
}
END' > pkix.asn"
rlRun "echo 'dp PKIX1.Dss-Sig-Value
r 1.3.6.1.4.1.2312.9.2.1461701120873.1.6
s 255' > assign.asn1"
rlPhaseEnd
rlPhaseStartTest
rlRun -s "asn1Coding pkix.asn assign.asn1"
rlAssertGrep "1.3.6.1.4.1.2312.9.2.1461701120873.1.6" $rlRun_LOG
rlRun "rm $rlRun_LOG"
rlRun -s "openssl asn1parse -in assign.out -inform DER"
rlAssertGrep "1.3.6.1.4.1.2312.9.2.1461701120873.1.6" $rlRun_LOG
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

68
tests/smoke-test/Makefile Normal file
View File

@ -0,0 +1,68 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/libtasn1/Sanity/smoke-test
# Description: Test calls upstream test suite.
# Author: Ondrej Moris <omoris@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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/libtasn1/Sanity/smoke-test
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: Ondrej Moris <omoris@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test calls upstream test suite." >> $(METADATA)
@echo "Type: Sanity" >> $(METADATA)
@echo "TestTime: 10m" >> $(METADATA)
@echo "RunFor: libtasn1" >> $(METADATA)
@echo "Requires: libtasn1" >> $(METADATA)
@echo "Requires: libtasn1-devel" >> $(METADATA)
@echo "Requires: valgrind" >> $(METADATA)
@echo "Requires: nfs-utils" >> $(METADATA)
@echo "Requires: rpm-build" >> $(METADATA)
@echo "Releases: -RHEL3 -RHEL4 -RHELServer5 -RHELClient5" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
rhts-lint $(METADATA)

3
tests/smoke-test/PURPOSE Normal file
View File

@ -0,0 +1,3 @@
PURPOSE of /CoreOS/libtasn1/Sanity/smoke-test
Description: Test calls upstream test suite.
Author: Ondrej Moris <omoris@redhat.com>

View File

74
tests/smoke-test/runtest.sh Executable file
View File

@ -0,0 +1,74 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/libtasn1/Sanity/smoke-test
# Description: Test calls upstream test suite.
# Author: Ondrej Moris <omoris@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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="libtasn1"
PACKAGES=( "libtasn1" "valgrind" )
TOPDIR=`rpm --eval %_topdir`
rlJournalStart
rlPhaseStartSetup
for P in "${PACKAGES[@]}"; do rlAssertRpm $P || rlDie; done
rlFetchSrcForInstalled $PACKAGE
rlRun "dnf builddep -y libtasn1*.rpm"
rlRun "rpm -ihv `ls libtasn1*.rpm`" 0
rlRun "rpmbuild -vv -bc $TOPDIR/SPECS/libtasn1.spec" 0
rlPhaseEnd
rlPhaseStartTest
rlRun "make -C $TOPDIR/BUILD/libtasn1-* check > make_check.out" 0
cat make_check.out
if grep "All [0-9]\+ tests passed" make_check.out; then
rlPass "All tests passed -- have seen the old format of test summary in the output"
elif grep "Testsuite summary" make_check.out; then
TOTAL=`sed -rn 's/^# TOTAL: *([0-9]*).*/\1/p' make_check.out`
PASS=`sed -rn 's/^# PASS: *([0-9]*).*/\1/p' make_check.out`
rlAssertEquals "The number of tests that ran and passed should be equal" "$TOTAL" "$PASS"
else
rlFail "Tests reported summary in an unknown way"
rlBundleLogs make_check.out
fi
rlPhaseEnd
rlPhaseStartCleanup
rlRun "rm libtasn1*.rpm -rf" 0
rlRun "rm $TOPDIR/BUILD/libtasn1-* -rf" 0
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

17
tests/tests.yml Normal file
View File

@ -0,0 +1,17 @@
---
- hosts: localhost
roles:
- role: standard-test-beakerlib
tags:
- classic
- container
tests:
- libtasn1-doesn-t-handle-OIDs-which-have-elements
required_packages:
- libtasn1
- libtasn1-devel
- libtasn1-tools
- openssl
- valgrind
- nfs-utils
- rpm-build