Compare commits
No commits in common. "c8" and "c9s-private-than" have entirely different histories.
c8
...
c9s-privat
18
.gitignore
vendored
18
.gitignore
vendored
@ -1 +1,17 @@
|
|||||||
SOURCES/v0.9.0.tar.gz
|
clog
|
||||||
|
/6fb87d6eb01b.tar.bz2
|
||||||
|
/fb6fca832fd2.tar.bz2
|
||||||
|
/alanxz-rabbitmq-c-0.2-69-g2059570.tar.gz
|
||||||
|
/db13342f2443.tar.bz2
|
||||||
|
/rabbitmq-c-v0.3.0.tar.gz
|
||||||
|
/rabbitmq-c-0.4.1.tar.gz
|
||||||
|
/rabbitmq-c-0.5.0.tar.gz
|
||||||
|
/rabbitmq-c-0.5.1.tar.gz
|
||||||
|
/rabbitmq-c-0.5.2.tar.gz
|
||||||
|
/rabbitmq-c-0.6.0.tar.gz
|
||||||
|
/rabbitmq-c-0.7.0-4dde30c.tar.gz
|
||||||
|
/rabbitmq-c-0.7.1-a536516.tar.gz
|
||||||
|
/rabbitmq-c-0.8.0-caad0ef.tar.gz
|
||||||
|
/rabbitmq-c-0.9.0-77e3805.tar.gz
|
||||||
|
/rabbitmq-c-0.10.0-ffe918a.tar.gz
|
||||||
|
/rabbitmq-c-0.11.0-a64c08c.tar.gz
|
||||||
|
@ -1 +0,0 @@
|
|||||||
0709ef3c9906bd13158d3f9b11f1666bb3903f1d SOURCES/v0.9.0.tar.gz
|
|
@ -1,28 +0,0 @@
|
|||||||
diff -up rabbitmq-c-0.9.0/librabbitmq/amqp_connection.c.CVE-2019-18609 rabbitmq-c-0.9.0/librabbitmq/amqp_connection.c
|
|
||||||
--- rabbitmq-c-0.9.0/librabbitmq/amqp_connection.c.CVE-2019-18609 2020-04-06 15:10:07.002386201 +0200
|
|
||||||
+++ rabbitmq-c-0.9.0/librabbitmq/amqp_connection.c 2020-04-06 15:17:03.624425371 +0200
|
|
||||||
@@ -287,12 +287,21 @@ int amqp_handle_input(amqp_connection_st
|
|
||||||
case CONNECTION_STATE_HEADER: {
|
|
||||||
amqp_channel_t channel;
|
|
||||||
amqp_pool_t *channel_pool;
|
|
||||||
- /* frame length is 3 bytes in */
|
|
||||||
+ uint32_t frame_size;
|
|
||||||
+
|
|
||||||
channel = amqp_d16(amqp_offset(raw_frame, 1));
|
|
||||||
|
|
||||||
- state->target_size =
|
|
||||||
- amqp_d32(amqp_offset(raw_frame, 3)) + HEADER_SIZE + FOOTER_SIZE;
|
|
||||||
+ /* frame length is 3 bytes in */
|
|
||||||
+ frame_size = amqp_d32(amqp_offset(raw_frame, 3));
|
|
||||||
+ /* To prevent the target_size calculation below from overflowing, check
|
|
||||||
+ * that the stated frame_size is smaller than a signed 32-bit. Given
|
|
||||||
+ * the library only allows configuring frame_max as an int32_t, and
|
|
||||||
+ * frame_size is uint32_t, the math below is safe from overflow. */
|
|
||||||
+ if (frame_size >= INT32_MAX) {
|
|
||||||
+ return AMQP_STATUS_BAD_AMQP_DATA;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
+ state->target_size = frame_size + HEADER_SIZE + FOOTER_SIZE;
|
|
||||||
if ((size_t)state->frame_max < state->target_size) {
|
|
||||||
return AMQP_STATUS_BAD_AMQP_DATA;
|
|
||||||
}
|
|
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-9
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
|
@ -1,29 +1,45 @@
|
|||||||
# Fedora spec file for librabbitmq
|
# Fedora spec file for librabbitmq
|
||||||
#
|
#
|
||||||
# Copyright (c) 2012-2018 Remi Collet
|
# Copyright (c) 2012-2021 Remi Collet
|
||||||
# License: CC-BY-SA
|
# License: CC-BY-SA
|
||||||
# http://creativecommons.org/licenses/by-sa/4.0/
|
# http://creativecommons.org/licenses/by-sa/4.0/
|
||||||
#
|
#
|
||||||
# Please, preserve the changelog entries
|
# Please, preserve the changelog entries
|
||||||
#
|
#
|
||||||
|
|
||||||
Name: librabbitmq
|
%bcond_without tests
|
||||||
|
|
||||||
|
%global gh_commit a64c08c68aff34d49a2ac152f04988cd921084f9
|
||||||
|
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
|
||||||
|
%global gh_owner alanxz
|
||||||
|
%global gh_project rabbitmq-c
|
||||||
|
%global libname librabbitmq
|
||||||
|
%global soname 4
|
||||||
|
|
||||||
|
Name: %{libname}
|
||||||
Summary: Client library for AMQP
|
Summary: Client library for AMQP
|
||||||
Version: 0.9.0
|
Version: 0.11.0
|
||||||
Release: 4%{?dist}
|
Release: 7%{?dist}
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/alanxz/rabbitmq-c
|
URL: https://github.com/alanxz/rabbitmq-c
|
||||||
Source0: https://github.com/alanxz/rabbitmq-c/archive/v%{version}.tar.gz
|
|
||||||
Patch0: rabbitmq-c-0.9.0-CVE-2019-18609.patch
|
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
|
||||||
Patch1: rabbitmq-c-CVE-2023-35789.patch
|
|
||||||
|
# don't install static library
|
||||||
|
Patch0: %{gh_project}-static.patch
|
||||||
|
# fix version for cmake module
|
||||||
|
Patch1: %{gh_project}-version.patch
|
||||||
|
# CVE-2023-35789
|
||||||
|
Patch2: rabbitmq-c-CVE-2023-35789.patch
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: cmake > 2.8
|
BuildRequires: cmake > 2.8
|
||||||
BuildRequires: openssl-devel
|
BuildRequires: openssl-devel
|
||||||
# For tools
|
# For tools
|
||||||
BuildRequires: popt-devel
|
BuildRequires: popt-devel > 1.14
|
||||||
# For man page
|
# For man page
|
||||||
BuildRequires: xmlto
|
BuildRequires: xmlto
|
||||||
|
BuildRequires: make
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -56,9 +72,10 @@ amqp-publish Publish a message on an AMQP server
|
|||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n rabbitmq-c-%{version}
|
%setup -q -n %{gh_project}-%{gh_commit}
|
||||||
%patch0 -p1 -b .CVE-2019-18609
|
%patch -P0 -p1
|
||||||
%patch1 -p1 -b .CVE-2023-35789
|
%patch -P1 -p1
|
||||||
|
%patch -P2 -p1
|
||||||
|
|
||||||
# Copy sources to be included in -devel docs.
|
# Copy sources to be included in -devel docs.
|
||||||
cp -pr examples Examples
|
cp -pr examples Examples
|
||||||
@ -66,40 +83,64 @@ cp -pr examples Examples
|
|||||||
# This test requires a running server
|
# This test requires a running server
|
||||||
sed -e '/test_basic/d' -i tests/CMakeLists.txt
|
sed -e '/test_basic/d' -i tests/CMakeLists.txt
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# static lib required for tests
|
# static lib required for tests
|
||||||
%cmake \
|
%cmake \
|
||||||
-DBUILD_TOOLS_DOCS:BOOL=ON \
|
-DBUILD_TOOLS_DOCS:BOOL=ON \
|
||||||
-DBUILD_STATIC_LIBS:BOOL=ON
|
%if %{with tests}
|
||||||
|
-DINSTALL_STATIC_LIBS:BOOL=OFF \
|
||||||
|
%else
|
||||||
|
-DBUILD_TESTS:BOOL=OFF \
|
||||||
|
-DBUILD_STATIC_LIBS:BOOL=OFF \
|
||||||
|
%endif
|
||||||
|
-S .
|
||||||
|
|
||||||
|
%if 0%{?cmake_build:1}
|
||||||
|
%cmake_build
|
||||||
|
%else
|
||||||
make %{_smp_mflags}
|
make %{_smp_mflags}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if 0%{?cmake_install:1}
|
||||||
|
%cmake_install
|
||||||
|
%else
|
||||||
make install DESTDIR="%{buildroot}"
|
make install DESTDIR="%{buildroot}"
|
||||||
|
%endif
|
||||||
rm %{buildroot}%{_libdir}/%{name}.a
|
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
: check .pc is usable
|
: check .pc is usable
|
||||||
grep @ %{buildroot}%{_libdir}/pkgconfig/%{name}.pc && exit 1
|
grep @ %{buildroot}%{_libdir}/pkgconfig/librabbitmq.pc && exit 1
|
||||||
|
: check cmake files are usable
|
||||||
|
grep static %{buildroot}%{_libdir}/cmake/rabbitmq-c/*.cmake && exit 1
|
||||||
|
|
||||||
|
%if %{with tests}
|
||||||
: upstream tests
|
: upstream tests
|
||||||
|
%if 0%{?ctest:1}
|
||||||
|
%ctest
|
||||||
|
%else
|
||||||
make test
|
make test
|
||||||
|
%endif
|
||||||
|
%else
|
||||||
|
: Tests disabled
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license LICENSE-MIT
|
%license LICENSE-MIT
|
||||||
%{_libdir}/%{name}.so.*
|
%{_libdir}/%{libname}.so.%{soname}*
|
||||||
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%doc AUTHORS THANKS TODO *.md
|
%doc AUTHORS THANKS TODO *.md
|
||||||
%doc Examples
|
%doc Examples
|
||||||
%{_libdir}/%{name}.so
|
%{_libdir}/%{libname}.so
|
||||||
%{_includedir}/amqp*
|
%{_includedir}/amqp*
|
||||||
%{_libdir}/pkgconfig/%{name}.pc
|
%{_libdir}/pkgconfig/%{libname}.pc
|
||||||
|
%{_libdir}/cmake/rabbitmq-c
|
||||||
|
|
||||||
%files tools
|
%files tools
|
||||||
%{_bindir}/amqp-*
|
%{_bindir}/amqp-*
|
||||||
@ -108,16 +149,59 @@ make test
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Jun 23 2023 Than Ngo <than@redhat.com> - 0.9.0-4
|
* Fri Jun 23 2023 Than Ngo <than@redhat.com> - 0.11.0-7
|
||||||
- Resolves: #2215765, insecure credentials submission
|
- add missing gating.yaml
|
||||||
|
- fix rpminspect issue
|
||||||
|
Related: #2215766
|
||||||
|
|
||||||
* Tue Sep 29 2020 Than Ngo <than@redhat.com> - 0.9.0-3
|
* Fri Jun 23 2023 Than Ngo <than@redhat.com> - 0.11.0-6
|
||||||
- Resolves: #1857831, rpmdiff
|
- Resolves: #2215766, insecure credentials submission
|
||||||
|
|
||||||
* Mon Apr 06 2020 Than Ngo <than@redhat.com> - 0.9.0-2
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.11.0-5
|
||||||
- Resolves: #1809992, CVE-2019-18609
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||||
|
Related: rhbz#1991688
|
||||||
|
|
||||||
* Thu Jun 28 2018 Than Ngo <than@redhat.com> - 0.9.0-1
|
* Wed Jun 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.11.0-4
|
||||||
|
- Rebuilt for RHEL 9 BETA for openssl 3.0
|
||||||
|
Related: rhbz#1971065
|
||||||
|
|
||||||
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.11.0-3
|
||||||
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||||
|
|
||||||
|
* Thu Apr 1 2021 Remi Collet <remi@remirepo.net> - 0.11.0-2
|
||||||
|
- add patch to fix version in cmake file from
|
||||||
|
https://github.com/alanxz/rabbitmq-c/pull/667
|
||||||
|
|
||||||
|
* Thu Apr 1 2021 Remi Collet <remi@remirepo.net> - 0.11.0-1
|
||||||
|
- update to 0.11.0
|
||||||
|
- add patch to not install the static library, from
|
||||||
|
https://github.com/alanxz/rabbitmq-c/pull/665
|
||||||
|
|
||||||
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.0-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Aug 13 2020 Remi Collet <remi@remirepo.net> - 0.10.0-3
|
||||||
|
- fix cmake macros usage, FTBFS #1863670
|
||||||
|
|
||||||
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Dec 2 2019 Remi Collet <remi@remirepo.net> - 0.10.0-1
|
||||||
|
- update to 0.10.0
|
||||||
|
|
||||||
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Feb 4 2019 Remi Collet <remi@remirepo.net> - 0.9.0-3
|
||||||
|
- fix cmake invocation and FTBFS
|
||||||
|
|
||||||
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue May 15 2018 Remi Collet <remi@remirepo.net> - 0.9.0-1
|
||||||
- update to 0.9.0
|
- update to 0.9.0
|
||||||
|
|
||||||
* Tue Feb 20 2018 Remi Collet <remi@remirepo.net> - 0.8.0-7
|
* Tue Feb 20 2018 Remi Collet <remi@remirepo.net> - 0.8.0-7
|
41
rabbitmq-c-static.patch
Normal file
41
rabbitmq-c-static.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
From a8c05cb16afbf852fc584f2c2d31d2f7f0e3a48d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Remi Collet <remi@remirepo.net>
|
||||||
|
Date: Thu, 1 Apr 2021 11:21:36 +0200
|
||||||
|
Subject: [PATCH] add option to install or not the static library
|
||||||
|
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 1 +
|
||||||
|
librabbitmq/CMakeLists.txt | 8 +++++---
|
||||||
|
2 files changed, 6 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index a9a29fdd..a7cf8f2c 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -245,6 +245,7 @@ endif()
|
||||||
|
|
||||||
|
option(BUILD_SHARED_LIBS "Build rabbitmq-c as a shared library" ON)
|
||||||
|
option(BUILD_STATIC_LIBS "Build rabbitmq-c as a static library" ON)
|
||||||
|
+option(INSTALL_STATIC_LIBS "Install rabbitmq-c static library" ON)
|
||||||
|
|
||||||
|
option(BUILD_EXAMPLES "Build Examples" ON)
|
||||||
|
option(BUILD_TOOLS "Build Tools (requires POPT Library)" ${POPT_FOUND})
|
||||||
|
diff --git a/librabbitmq/CMakeLists.txt b/librabbitmq/CMakeLists.txt
|
||||||
|
index d8dcd262..72b4a875 100644
|
||||||
|
--- a/librabbitmq/CMakeLists.txt
|
||||||
|
+++ b/librabbitmq/CMakeLists.txt
|
||||||
|
@@ -154,9 +154,11 @@ if (BUILD_STATIC_LIBS)
|
||||||
|
set_target_properties(rabbitmq-static PROPERTIES VERSION ${RMQ_VERSION} SOVERSION ${RMQ_SOVERSION} OUTPUT_NAME rabbitmq)
|
||||||
|
endif (WIN32)
|
||||||
|
|
||||||
|
- install(TARGETS rabbitmq-static EXPORT "${targets_export_name}"
|
||||||
|
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
- )
|
||||||
|
+ if (INSTALL_STATIC_LIBS)
|
||||||
|
+ install(TARGETS rabbitmq-static EXPORT "${targets_export_name}"
|
||||||
|
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
+ )
|
||||||
|
+ endif (INSTALL_STATIC_LIBS)
|
||||||
|
|
||||||
|
if (NOT DEFINED RMQ_LIBRARY_TARGET)
|
||||||
|
set(RMQ_LIBRARY_TARGET rabbitmq-static)
|
25
rabbitmq-c-version.patch
Normal file
25
rabbitmq-c-version.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 2a9ae303f7fa7bc115ecb827c1c3c7c9f84558dd Mon Sep 17 00:00:00 2001
|
||||||
|
From: Remi Collet <remi@remirepo.net>
|
||||||
|
Date: Thu, 1 Apr 2021 14:48:25 +0200
|
||||||
|
Subject: [PATCH] Fix #666 bad PACKAGE_VERSION
|
||||||
|
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index a9a29fd..74364cf 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -322,7 +322,7 @@ set(version_config "${CMAKE_CURRENT_BINARY_DIR}/rabbitmq-c-config-version.cmake"
|
||||||
|
|
||||||
|
write_basic_package_version_file(
|
||||||
|
"${version_config}"
|
||||||
|
- VERSION ${RMQ_VERSION}
|
||||||
|
+ VERSION ${VERSION}
|
||||||
|
COMPATIBILITY AnyNewerVersion)
|
||||||
|
|
||||||
|
configure_package_config_file(
|
||||||
|
--
|
||||||
|
2.30.2
|
||||||
|
|
1
sources
Normal file
1
sources
Normal file
@ -0,0 +1 @@
|
|||||||
|
SHA512 (rabbitmq-c-0.11.0-a64c08c.tar.gz) = 0e0c77c3ce2de49841b4d2a8745bfdb118fc3bdf924c1f60d8ca168d7a933276f5d86e1d1440c2936859e6a6bddeb77eaa3c59f5f20e998160dde7d57cea4282
|
63
tests/Sanity/Sanity-test-for-librabbitmq/Makefile
Normal file
63
tests/Sanity/Sanity-test-for-librabbitmq/Makefile
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Makefile of /CoreOS/librabbitmq/Sanity/Sanity-test-for-librabbitmq
|
||||||
|
# Description: Tests the sanity of librabbitmq
|
||||||
|
# Author: Than Ngo <than@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2019 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/librabbitmq/Sanity/Sanity-test-for-librabbitmq
|
||||||
|
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: Than Ngo <than@redhat.com>" > $(METADATA)
|
||||||
|
@echo "Name: $(TEST)" >> $(METADATA)
|
||||||
|
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||||
|
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||||
|
@echo "Description: tests basic functionality" >> $(METADATA)
|
||||||
|
@echo "Type: Sanity" >> $(METADATA)
|
||||||
|
@echo "TestTime: 5m" >> $(METADATA)
|
||||||
|
@echo "RunFor: librabbitmq" >> $(METADATA)
|
||||||
|
@echo "Requires: librabbitmq librabbitmq-devel" >> $(METADATA)
|
||||||
|
@echo "Priority: Normal" >> $(METADATA)
|
||||||
|
@echo "License: MIT" >> $(METADATA)
|
||||||
|
@echo "Confidential: no" >> $(METADATA)
|
||||||
|
@echo "Destructive: no" >> $(METADATA)
|
||||||
|
|
||||||
|
rhts-lint $(METADATA)
|
3
tests/Sanity/Sanity-test-for-librabbitmq/PURPOSE
Normal file
3
tests/Sanity/Sanity-test-for-librabbitmq/PURPOSE
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
PURPOSE of /CoreOS/librabbitmq/Sanity/Sanity-test-for-librabbitmq
|
||||||
|
Description: Tests the sanity
|
||||||
|
Author: Than Ngo <than@redhat.com>
|
58
tests/Sanity/Sanity-test-for-librabbitmq/runtest.sh
Executable file
58
tests/Sanity/Sanity-test-for-librabbitmq/runtest.sh
Executable file
@ -0,0 +1,58 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# runtest.sh of /CoreOS/librabbitmq/Sanity/Sanity-test-for-librabbitmq
|
||||||
|
# Description: Tests the sanity
|
||||||
|
# Author: Than Ngo <than@redhat.com>, Brock Organ <borgan@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2019 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.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
PACKAGES="librabbitmq librabbitmq-devel"
|
||||||
|
|
||||||
|
# source the test script helpers
|
||||||
|
. /usr/bin/rhts-environment.sh || exit 1
|
||||||
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
|
rlJournalStart
|
||||||
|
rlPhaseStartSetup
|
||||||
|
for p in $PACKAGES ; do
|
||||||
|
rlAssertRpm $p
|
||||||
|
done
|
||||||
|
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||||
|
rlRun "pushd $TmpDir"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest "Smoke, sanity and function tests"
|
||||||
|
for o in $(ls -1 /usr/lib64/librabbitmq.so*) ; do
|
||||||
|
rlRun "ldd $o" 0 "validate the shared objects"
|
||||||
|
rlRun "objdump -T $o" 0 "validate the shared objects"
|
||||||
|
done
|
||||||
|
rlRun "head /usr/share/doc/librabbitmq-devel/README.md" 0 "correct form for doc file"
|
||||||
|
rlRun "head /usr/share/licenses/librabbitmq/LICENSE-MIT" 0 "correct form for doc file"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartCleanup
|
||||||
|
rlRun "popd"
|
||||||
|
rlRun "rm -fr $TmpDir" 0 "Removing tmp directory"
|
||||||
|
rlPhaseEnd
|
||||||
|
rlJournalPrintText
|
||||||
|
rlJournalEnd
|
11
tests/tests.yml
Normal file
11
tests/tests.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
# Run tests in all contexts
|
||||||
|
- hosts: localhost
|
||||||
|
tags:
|
||||||
|
- classic
|
||||||
|
roles:
|
||||||
|
- role: standard-test-beakerlib
|
||||||
|
tests:
|
||||||
|
- Sanity
|
||||||
|
required_packages:
|
||||||
|
- librabbitmq
|
Loading…
Reference in New Issue
Block a user