Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
Konrad Kleine
444026fd4f Remove ClamAV subdirectory because of viruses in input files
These were the findings:

```
MultiSource/Applications/ClamAV/inputs/rtf-test/rtf1.rtf: Eicar-Signature
MultiSource/Applications/ClamAV/inputs/clam.zip: Clamav.Test.File-6
MultiSource/Applications/ClamAV/inputs/rtf-test/docCLAMexe.rtf: Clamav.Test.File-6
MultiSource/Applications/ClamAV/inputs/rtf-test/Doc11.rtf: Clamav.Test.File-6
MultiSource/Applications/ClamAV/inputs/rtf-test/Doc1.rtf: Clamav.Test.File-6
MultiSource/Applications/ClamAV/inputs/clam.cab: Clamav.Test.File-6
MultiSource/Applications/ClamAV/inputs/rtf-test/Doc2.rtf: Clamav.Test.File-6
MultiSource/Applications/ClamAV/inputs/clam.exe.bz2: Clamav.Test.File-6
MultiSource/Applications/ClamAV/inputs/rtf-test/doc3.rtf: Clamav.Test.File-6
MultiSource/Applications/ClamAV/inputs/clam.exe: Clamav.Test.File-6
MultiSource/Applications/ClamAV/inputs/rtf-test/Doc22.rtf: Clamav.Test.File-6
```
2024-10-15 15:51:33 +02:00
Konrad Kleine
3c45e289f4 Remove broken links in source tarball
This is a backport of https://src.fedoraproject.org/rpms/llvm-test-suite/pull-request/41.

Before it wasn't possible to pass `-DTEST_SUITE_SUBDIRS=CTMark` to cmake
when configuring the llvm-test-suite:

```
-- Adding directory CTMark
CMake Error at CTMark/CMakeLists.txt:1 (add_subdirectory):
  add_subdirectory given source "7zip" which is not an existing directory.

CMake Error at CTMark/CMakeLists.txt:5 (add_subdirectory):
  add_subdirectory given source "lencod" which is not an existing directory.
```

The llvm-test-suite command script `pkg_test_suite.sh` removes
directories with BAD or unreviewed licenses. Currently this leaves at
least two directories in a broken state:

```
/usr/share/llvm-test-suite/CTMark/7zip -> ../MultiSource/Benchmarks/7zip
/usr/share/llvm-test-suite/CTMark/lencod -> ../MultiSource/Applications/JM/lencod
```

In both cases the link target is non-existent.

Therefore I find any broken symbolic links, remove them and adapt the
`CMakeLists.txt` to not have the `add_subdirectory(broken_link)` entry in
it. Here's an excerpt of what the `pkg_test_suite.sh` script shows when
running as a proof of the work it does now.

```
++ find test-suite-18.1.8.src -type l '!' -exec test -e '{}' ';' -print
+ broken_symlinks='test-suite-18.1.8.src/CTMark/7zip
test-suite-18.1.8.src/CTMark/lencod'
+ for f in $broken_symlinks
+ test -L test-suite-18.1.8.src/CTMark/7zip
+ rm -fv test-suite-18.1.8.src/CTMark/7zip
removed 'test-suite-18.1.8.src/CTMark/7zip'
++ dirname test-suite-18.1.8.src/CTMark/7zip
+ basedir=test-suite-18.1.8.src/CTMark
++ basename test-suite-18.1.8.src/CTMark/7zip
+ dir=7zip
+ cmake_file=test-suite-18.1.8.src/CTMark/CMakeLists.txt
+ test -f test-suite-18.1.8.src/CTMark/CMakeLists.txt
+ sed -i 's/add_subdirectory(7zip)//g' test-suite-18.1.8.src/CTMark/CMakeLists.txt
+ for f in $broken_symlinks
+ test -L test-suite-18.1.8.src/CTMark/lencod
+ rm -fv test-suite-18.1.8.src/CTMark/lencod
removed 'test-suite-18.1.8.src/CTMark/lencod'
++ dirname test-suite-18.1.8.src/CTMark/lencod
+ basedir=test-suite-18.1.8.src/CTMark
++ basename test-suite-18.1.8.src/CTMark/lencod
+ dir=lencod
+ cmake_file=test-suite-18.1.8.src/CTMark/CMakeLists.txt
+ test -f test-suite-18.1.8.src/CTMark/CMakeLists.txt
+ sed -i 's/add_subdirectory(lencod)//g' test-suite-18.1.8.src/CTMark/CMakeLists.txt
```
2024-10-10 21:46:52 +02:00
4 changed files with 32 additions and 7 deletions

View file

@ -1,5 +1,4 @@
autoconf/LICENSE.TXT
CTMark/ClamAV/COPYING
CTMark/consumer-typeset/LICENSE
CTMark/kimwitu++/COPYING
CTMark/kimwitu++/LICENSE.TXT
@ -11,7 +10,6 @@ MultiSource/Applications/aha/LICENSE.TXT
MultiSource/Applications/ALAC/decode/LICENSE
MultiSource/Applications/ALAC/encode/LICENSE
MultiSource/Applications/ALAC/LICENSE
MultiSource/Applications/ClamAV/COPYING
MultiSource/Applications/hbd/doc/COPYING
MultiSource/Applications/hbd/LICENSE.TXT
MultiSource/Applications/hexxagon/COPYING

View file

@ -6,12 +6,12 @@
Name: llvm-test-suite
Version: %{llvm_test_suite_version}%{?rc_ver:~rc%{rc_ver}}
Release: 1%{?dist}
Release: 3%{?dist}
Summary: C/C++ Compiler Test Suite
License: NCSA and BSD and GPLv1 and GPLv2+ and GPLv2 and MIT and Python and Public Domain and CRC32 and AML and Rdisc and ASL 2.0 and LGPLv3
URL: http://llvm.org
# The LLVM Test Suite contains progrms with "BAD" or unknown licenses which should
# The LLVM Test Suite contains programs with "BAD" or unknown licenses which should
# be removed. Some of the unknown licenses may be OK, but until they are reviewed,
# we will remove them.
# Use the pkg_test_suite.sh script to generate the test-suite tarball:
@ -80,6 +80,12 @@ cp -R %{_builddir}/%{test_suite_srcdir}/* %{buildroot}%{_datadir}/llvm-test-suit
%changelog
* Tue Oct 15 2024 Konrad Kleine <kkleine@redhat.com> - 18.1.8-3
- Remove MultiSource/Applications/ClamAV directory because of viruses in input files
* Thu Oct 10 2024 Konrad Kleine <kkleine@redhat.com> - 18.1.8-2
- Remove broken links in source tarball
* Fri Jul 12 2024 Jesus Checa Hidalgo <jchecahi@redhat.com> - 18.1.8-1
- 18.1.8 Release

25
pkg_test_suite.sh Normal file → Executable file
View file

@ -38,12 +38,14 @@ POSSIBLY_BAD="\
MultiSource/Applications/Burg/ \
MultiSource/Benchmarks/MiBench/telecomm-FFT/"
VIRUSES="\
MultiSource/Applications/ClamAV/"
#siod: llvm.org/PR38648
BUGGY="\
MultiSource/Applications/siod"
for f in $UNKNOWN $BAD $POSSIBLY_BAD $BUGGY; do
for f in $UNKNOWN $BAD $POSSIBLY_BAD $BUGGY $VIRUSES; do
test -d $test_suite_src/$f
rm -Rf $test_suite_src/$f
basedir=`dirname $f`
@ -51,9 +53,28 @@ for f in $UNKNOWN $BAD $POSSIBLY_BAD $BUGGY; do
cmake_file=$test_suite_src/$basedir/CMakeLists.txt
test -f $cmake_file
sed -i s/add_subdirectory\($dir\)//g $cmake_file
done
# The llvm-test-suite now contains broken symlinks because
# the link target was removed above, e.g.
#
# /usr/share/llvm-test-suite/CTMark/7zip -> ../MultiSource/Benchmarks/7zip
# /usr/share/llvm-test-suite/CTMark/lencod -> ../MultiSource/Applications/JM/lencod
#
# To fix these algorithmically, we have to find all broken
# symlinks and remove the add_subdirectory entry in the
# CMakeLists.txt in their parent directory.
broken_symlinks=$(find $test_suite_src -type l ! -exec test -e {} \; -print)
for f in $broken_symlinks; do
test -L $f
rm -fv $f
basedir=`dirname $f`
dir=`basename $f`
cmake_file=$basedir/CMakeLists.txt
test -f $cmake_file
sed -i s/add_subdirectory\($dir\)//g $cmake_file
done
tar --transform=s/$test_suite_src/$test_suite_src.fedora/ --show-transformed-names -cJf $currentdir/$test_suite_src.fedora.tar.xz $test_suite_src
pushd
popd
rm -Rf $tmpdir

View file

@ -1 +1 @@
SHA512 (test-suite-18.1.8.src.fedora.tar.xz) = d9538aec6565ff2884939fb62a73d54fc8489660a73b990250991fa0bd4cea51936112c0302321392715fef24f6ae6836f9a6829cae154bd7208644b9d67b068
SHA512 (test-suite-18.1.8.src.fedora.tar.xz) = 67f0ad86203d0e202fdd5755fc203efe0217e71f8d09f57d382a73135a228f90e5102c8a8b3a50c13b34e85a31475906609d450f427de721e8f79c436d415c79