fix build flags (#2044896)

Resolves: #2044896
This commit is contained in:
Michal Hlavinka 2022-02-24 15:43:41 +01:00
parent be5918b6c7
commit 63b2f88324
4 changed files with 77 additions and 2 deletions

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

50
tests/run_tests.sh Executable file
View File

@ -0,0 +1,50 @@
#!/bin/sh
function ntimes
{
I=0
for((I=0;I<50;I++))
do
"$@"
done
}
function fail
{
echo "FAIL: $1" >&2
exit 1
}
# check output is always different
if [ -n "$(uuid -n 50 | uniq --repeated)" ]
then
fail "dulicated output"
fi
# check it can parse uuid it generated
if ! uuid -d $(uuid -v1) >/dev/null 2>&1
then
fail "can't decore uuid"
fi
# check v3 uses same output for same seed
if ! [ "$({ uuid -n 5 -v3 ns:URL https://fedoraproject.org/; uuid -n 5 -v3 ns:URL https://fedoraproject.org/ ; } | wc -l)" = 10 ]
then
fail "v3 should have same output for same seed"
fi
# check v5 uses same output for same seed
if ! [ "$({ uuid -n 5 -v3 ns:URL https://fedoraproject.org/; uuid -n 5 -v3 ns:URL https://fedoraproject.org/ ; } | wc -l)" = 10 ]
then
fail "v5 should have same output for same seed"
fi
# check v3 and v5 use different hashes (output)
if ! [ "$({ uuid -n 5 -v3 ns:URL https://fedoraproject.org/; uuid -n 5 -v5 ns:URL https://fedoraproject.org/ ; } | uniq | wc -l)" = 2 ]
then
fail "v3 and v5 uuid shouldn't be the same"
fi
echo "SUCCESS"
exit 0

9
tests/tests.yml Normal file
View File

@ -0,0 +1,9 @@
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
tests:
- simple:
dir: .
run: run_tests.sh

View File

@ -6,7 +6,7 @@
Name: uuid
Version: 1.6.2
Release: 54%{?dist}
Release: 55%{?dist}
Summary: Universally Unique Identifier library
License: MIT
URL: http://www.ossp.org/pkg/lib/uuid/
@ -161,6 +161,13 @@ find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
%{_fixperms} $RPM_BUILD_ROOT/*
popd
# fix multilib issues
cp $RPM_BUILD_ROOT/%{_bindir}/uuid-config $RPM_BUILD_ROOT/%{_bindir}/uuid-config.$(uname -m)
cat >$RPM_BUILD_ROOT/%{_bindir}/uuid-config <<EOF
#!/bin/sh
exec \$0.\$(uname -m) "\$@"
EOF
%check
make check
@ -183,7 +190,7 @@ popd
%exclude %{_mandir}/man1/uuid-config.*
%files devel
%{_bindir}/uuid-config
%{_bindir}/uuid-config*
%{_includedir}/uuid.h
%{_libdir}/libossp-uuid.so
%{_libdir}/pkgconfig/ossp-uuid.pc
@ -211,6 +218,9 @@ popd
%{_libdir}/libossp-uuid_dce.so
%changelog
* Thu Feb 24 2022 Michal Hlavinka <mhlavink@redhat.com> - 1.6.2-55
- fix build flags (#2044896)
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.6.2-53
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688