# disable in source builds on EPEL <9 %undefine __cmake_in_source_build %undefine __cmake3_in_source_build Name: csmock Version: 3.5.0.20231130.092943.g73eddc1 Release: 1%{?dist} Summary: A mock wrapper for Static Analysis tools License: GPL-3.0-or-later URL: https://github.com/csutils/%{name} Source0: csmock-3.5.0.20231130.092943.g73eddc1.tar.gz BuildRequires: cmake3 BuildRequires: help2man %if 0%{?rhel} == 7 %global python3_pkgversion 36 %endif BuildRequires: python%{python3_pkgversion}-GitPython BuildRequires: python%{python3_pkgversion}-devel Requires: csmock-common >= %{version}-%{release} Requires: csmock-plugin-clang >= %{version}-%{release} Requires: csmock-plugin-cppcheck >= %{version}-%{release} Requires: csmock-plugin-gitleaks >= %{version}-%{release} Requires: csmock-plugin-shellcheck >= %{version}-%{release} BuildArch: noarch %description This is a metapackage pulling in csmock-common and basic csmock plug-ins. %package -n csbuild Summary: Tool for plugging static analyzers into the build process Requires: cscppc Requires: csclng Requires: csdiff Requires: csmock-common Requires: cswrap Requires: python%{python3_pkgversion}-GitPython %description -n csbuild Tool for plugging static analyzers into the build process, free of mock. %package -n csmock-common Summary: Core of csmock (a mock wrapper for Static Analysis tools) Requires: csdiff > 3.1.0 Requires: csgcca Requires: cswrap Requires: mock Requires: tar Requires: xz %if 0%{?rhel} != 7 Recommends: modulemd-tools %endif %description -n csmock-common This package contains the csmock tool that allows to scan SRPMs by Static Analysis tools in a fully automated way. %package -n csmock-plugin-bandit Summary: csmock plug-in providing the support for Bandit. Requires: csmock-common %description -n csmock-plugin-bandit This package contains the bandit plug-in for csmock. %package -n csmock-plugin-cbmc Summary: csmock plug-in providing the support for cbmc Requires: csexec Requires: csmock-common %description -n csmock-plugin-cbmc This package contains the cbmc plug-in for csmock. %package -n csmock-plugin-clang Summary: csmock plug-in providing the support for Clang Requires: csclng Requires: csmock-common %description -n csmock-plugin-clang This package contains the clang plug-in for csmock. %package -n csmock-plugin-cppcheck Summary: csmock plug-in providing the support for Cppcheck Requires: cscppc Requires: csmock-common %description -n csmock-plugin-cppcheck This package contains the cppcheck plug-in for csmock. %package -n csmock-plugin-divine Summary: csmock plug-in providing the support for divine Requires: csexec Requires: csmock-common %description -n csmock-plugin-divine This package contains the divine plug-in for csmock. %package -n csmock-plugin-gitleaks Summary: experimental csmock plug-in Requires: csmock-common %description -n csmock-plugin-gitleaks This package contains the gitleaks plug-in for csmock. %package -n csmock-plugin-infer Summary: csmock plug-in providing the support for Infer Requires: csmock-common %description -n csmock-plugin-infer This package contains the Infer plug-in for csmock. %package -n csmock-plugin-pylint Summary: csmock plug-in providing the support for Pylint. Requires: csmock-common %description -n csmock-plugin-pylint This package contains the pylint plug-in for csmock. %package -n csmock-plugin-shellcheck Summary: csmock plug-in providing the support for ShellCheck. Requires: csmock-common %description -n csmock-plugin-shellcheck This package contains the shellcheck plug-in for csmock. %package -n csmock-plugin-smatch Summary: csmock plug-in providing the support for smatch Requires: csmatch Requires: csmock-common Requires: cswrap %description -n csmock-plugin-smatch This package contains the smatch plug-in for csmock. %package -n csmock-plugin-snyk Summary: csmock plug-in providing the support for snyk Requires: csmock-common %description -n csmock-plugin-snyk This package contains the snyk plug-in for csmock. %package -n csmock-plugin-strace Summary: csmock plug-in providing the support for strace Requires: csexec Requires: csmock-common %description -n csmock-plugin-strace This package contains the strace plug-in for csmock. %package -n csmock-plugin-symbiotic Summary: csmock plug-in providing the support for symbiotic Requires: csexec Requires: csmock-common %description -n csmock-plugin-symbiotic This package contains the symbiotic plug-in for csmock. %package -n csmock-plugin-valgrind Summary: csmock plug-in providing the support for valgrind Requires: csexec Requires: csmock-common %description -n csmock-plugin-valgrind This package contains the valgrind plug-in for csmock. %package -n csmock-plugin-unicontrol Summary: experimental csmock plug-in Requires: csmock-common %description -n csmock-plugin-unicontrol This package contains the unicontrol plug-in for csmock. %prep %autosetup -n csmock-3.5.0.20231130.092943.g73eddc1 %build %cmake3 \ -DVERSION='%{name}-%{version}-%{release}' \ -DPython3_EXECUTABLE='%{__python3}' %cmake3_build %install %cmake3_install # needed to create the csmock RPM %files %files -n csbuild %license COPYING %{_bindir}/csbuild %{_mandir}/man1/csbuild.1* %{_datadir}/csbuild/scripts/run-scan.sh %files -n csmock-common %license COPYING %doc README %dir %{_datadir}/csmock %dir %{_datadir}/csmock/scripts %dir %{python3_sitelib}/csmock %dir %{python3_sitelib}/csmock/plugins %{_bindir}/csmock %{_mandir}/man1/csmock.1* %{_datadir}/csmock/cwe-map.csv %{_datadir}/csmock/scripts/enable-keep-going.sh %{_datadir}/csmock/scripts/chroot-fixups %{_datadir}/csmock/scripts/patch-rawbuild.sh %{python3_sitelib}/csmock/__init__.py* %{python3_sitelib}/csmock/common %{python3_sitelib}/csmock/plugins/__init__.py* %{python3_sitelib}/csmock/plugins/gcc.py* %{python3_sitelib}/csmock/__pycache__/__init__.* %{python3_sitelib}/csmock/plugins/__pycache__/__init__.* %{python3_sitelib}/csmock/plugins/__pycache__/gcc.* %files -n csmock-plugin-bandit %{_datadir}/csmock/scripts/run-bandit.sh %{python3_sitelib}/csmock/plugins/bandit.py* %{python3_sitelib}/csmock/plugins/__pycache__/bandit.* %files -n csmock-plugin-cbmc %{python3_sitelib}/csmock/plugins/cbmc.py* %{python3_sitelib}/csmock/plugins/__pycache__/cbmc.* %files -n csmock-plugin-clang %{python3_sitelib}/csmock/plugins/clang.py* %{python3_sitelib}/csmock/plugins/__pycache__/clang.* %files -n csmock-plugin-cppcheck %{python3_sitelib}/csmock/plugins/cppcheck.py* %{python3_sitelib}/csmock/plugins/__pycache__/cppcheck.* %files -n csmock-plugin-divine %{python3_sitelib}/csmock/plugins/divine.py* %{python3_sitelib}/csmock/plugins/__pycache__/divine.* %files -n csmock-plugin-gitleaks %{python3_sitelib}/csmock/plugins/gitleaks.py* %{python3_sitelib}/csmock/plugins/__pycache__/gitleaks.* %files -n csmock-plugin-infer %{_datadir}/csmock/scripts/filter-infer.py* %{_datadir}/csmock/scripts/install-infer.sh %{python3_sitelib}/csmock/plugins/infer.py* %{python3_sitelib}/csmock/plugins/__pycache__/infer.* %files -n csmock-plugin-pylint %{_datadir}/csmock/scripts/run-pylint.sh %{python3_sitelib}/csmock/plugins/pylint.py* %{python3_sitelib}/csmock/plugins/__pycache__/pylint.* %files -n csmock-plugin-shellcheck %{_datadir}/csmock/scripts/run-shellcheck.sh %{python3_sitelib}/csmock/plugins/shellcheck.py* %{python3_sitelib}/csmock/plugins/__pycache__/shellcheck.* %files -n csmock-plugin-smatch %{python3_sitelib}/csmock/plugins/smatch.py* %{python3_sitelib}/csmock/plugins/__pycache__/smatch.* %files -n csmock-plugin-snyk %{python3_sitelib}/csmock/plugins/snyk.py* %{python3_sitelib}/csmock/plugins/__pycache__/snyk.* %files -n csmock-plugin-strace %{python3_sitelib}/csmock/plugins/strace.py* %{python3_sitelib}/csmock/plugins/__pycache__/strace.* %files -n csmock-plugin-symbiotic %{python3_sitelib}/csmock/plugins/symbiotic.py* %{python3_sitelib}/csmock/plugins/__pycache__/symbiotic.* %files -n csmock-plugin-valgrind %{python3_sitelib}/csmock/plugins/valgrind.py* %{python3_sitelib}/csmock/plugins/__pycache__/valgrind.* %files -n csmock-plugin-unicontrol %{_datadir}/csmock/scripts/find-unicode-control.py* %{python3_sitelib}/csmock/plugins/unicontrol.py* %{python3_sitelib}/csmock/plugins/__pycache__/unicontrol.*