diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.gitignore b/.gitignore index ea2d0cd..9d91033 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,14 @@ verilator-3.803.tgz /verilator-3.845.tgz /verilator-*.tgz /verilator-4.226.tar.gz +/verilator-5.014.tar.gz +/verilator-5.020.tar.gz +/verilator-5.022.tar.gz +/verilator-5.024.tar.gz +/verilator-5.026.tar.gz +/verilator-5.028.tar.gz +/verilator-5.030.tar.gz +/verilator-5.032.tar.gz +/verilator-5.034.tar.gz +/verilator-5.036.tar.gz +/verilator-5.040.tar.gz diff --git a/README.packit b/README.packit new file mode 100644 index 0000000..fb341a1 --- /dev/null +++ b/README.packit @@ -0,0 +1,3 @@ +This repository is maintained by packit. +https://packit.dev/ +The file was generated using packit 1.11.0.post1.dev7+gfdcdf3a32. diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..03d95b2 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,7 @@ +--- !Policy +product_versions: + - fedora-* +decision_contexts: [bodhi_update_push_testing, bodhi_update_push_stable] +subject_type: koji_build +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} \ No newline at end of file diff --git a/packit.yaml b/packit.yaml new file mode 100644 index 0000000..8ed5fe5 --- /dev/null +++ b/packit.yaml @@ -0,0 +1,25 @@ +# See the documentation for more information: +# https://packit.dev/docs/configuration/ + +upstream_project_url: https://github.com/verilator/verilator.git +upstream_tag_template: v{version} + +jobs: +# https://packit.dev/docs/configuration/downstream/pull_from_upstream +# TODO make sure Monitoring status on the left side at https://src.fedoraproject.org/rpms/ is set to Monitoring +- job: pull_from_upstream + trigger: release + dist_git_branches: + - fedora-all + +# https://packit.dev/docs/configuration/downstream/koji_build +- job: koji_build + trigger: commit + dist_git_branches: + - fedora-all + +# https://packit.dev/docs/configuration/downstream/bodhi_update +- job: bodhi_update + trigger: commit + dist_git_branches: + - fedora-branched diff --git a/plans/main.fmf b/plans/main.fmf new file mode 100644 index 0000000..fbc11c1 --- /dev/null +++ b/plans/main.fmf @@ -0,0 +1,10 @@ +discover: + how: fmf +execute: + how: tmt + +/basic: + summary: + Basic functionality + discover+: + filter: "tier:0" diff --git a/sources b/sources index 4a53797..df68504 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (verilator-4.226.tar.gz) = bede9024f45491884533929aa04705908aaf9fda5848a8ee7ca865569b2e5c9267ba20d8e140e67d86f322f7c7cf6d4562014f00e826ec69c8c39a3a3644c5c3 +SHA512 (verilator-5.040.tar.gz) = 3997791963305f4556a8f3b87e050eba5ad9952c0eb041c5ac981276ef385219e5c162a01e1ec966e5e814a334caa4e92f8e939e9cfbc068b30935f5ee6e9804 diff --git a/tests/basic/lint/example.sv b/tests/basic/lint/example.sv new file mode 100644 index 0000000..e578377 --- /dev/null +++ b/tests/basic/lint/example.sv @@ -0,0 +1,6 @@ +module example ( + input bit a_i, + output bit b_o +); + assign b_o = a_i; +endmodule diff --git a/tests/basic/lint/main.fmf b/tests/basic/lint/main.fmf new file mode 100644 index 0000000..894b51e --- /dev/null +++ b/tests/basic/lint/main.fmf @@ -0,0 +1,2 @@ +summary: Basic lint test +tag: basic \ No newline at end of file diff --git a/tests/basic/lint/test.sh b/tests/basic/lint/test.sh new file mode 100755 index 0000000..45d92cc --- /dev/null +++ b/tests/basic/lint/test.sh @@ -0,0 +1,8 @@ +#!/bin/bash +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartTest + rlRun "verilator --lint-only -Wall example.sv" + rlPhaseEnd +rlJournalEnd \ No newline at end of file diff --git a/tests/basic/main.fmf b/tests/basic/main.fmf new file mode 100644 index 0000000..3c4d0f8 --- /dev/null +++ b/tests/basic/main.fmf @@ -0,0 +1 @@ +tier: 0 \ No newline at end of file diff --git a/tests/basic/smoke/main.fmf b/tests/basic/smoke/main.fmf new file mode 100644 index 0000000..e03cdd7 --- /dev/null +++ b/tests/basic/smoke/main.fmf @@ -0,0 +1,2 @@ +summary: Basic smoke test +tag: basic \ No newline at end of file diff --git a/tests/basic/smoke/test.sh b/tests/basic/smoke/test.sh new file mode 100755 index 0000000..1bee41d --- /dev/null +++ b/tests/basic/smoke/test.sh @@ -0,0 +1,8 @@ +#!/bin/bash +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartTest + rlRun "verilator --version" + rlPhaseEnd +rlJournalEnd \ No newline at end of file diff --git a/tests/main.fmf b/tests/main.fmf new file mode 100644 index 0000000..d1ac01b --- /dev/null +++ b/tests/main.fmf @@ -0,0 +1,4 @@ +test: ./test.sh +framework: beakerlib +require: verilator +tier: 1 \ No newline at end of file diff --git a/verilator.spec b/verilator.spec index e93ae01..1ea2d2c 100644 --- a/verilator.spec +++ b/verilator.spec @@ -1,17 +1,46 @@ +# Universal build flags +%bcond longtests 0 + +# Only enable extended warnings on supported platforms +%ifarch x86_64 aarch64 +%bcond ccwarn 1 +%else +%bcond ccwarn 0 +%endif + +# tcmalloc and z3 are not available on EL +%if 0%{?rhel}%{?centos} +%bcond tcmalloc 0 +%bcond z3 0 +%else +%bcond tcmalloc 1 +%bcond z3 1 +%endif + +# These are offered by the build, but there's no real demand to include them. +%bcond ccache 0 +%bcond mold 0 + Name: verilator -Version: 4.226 -Release: 1%{?dist} +Version: 5.040 +Release: %autorelease Summary: A fast simulator for synthesizable Verilog -License: LGPLv3 or Artistic 2.0 +License: LGPL-3.0-only OR Artistic-2.0 URL: https://veripool.org/verilator/ -Source0: https://github.com/verilator/verilator/archive/refs/tags/v%{version}/%{name}-%{version}.tar.gz +Source: https://github.com/verilator/verilator/archive/refs/tags/v%{version}/%{name}-%{version}.tar.gz + +# See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} + BuildRequires: autoconf BuildRequires: bison BuildRequires: coreutils +BuildRequires: cmake BuildRequires: findutils BuildRequires: flex BuildRequires: gcc BuildRequires: gcc-c++ +BuildRequires: help2man BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter @@ -27,7 +56,30 @@ BuildRequires: perl(strict) BuildRequires: perl(Time::HiRes) BuildRequires: perl(vars) BuildRequires: python3-devel +BuildRequires: python3-distro BuildRequires: sed +%if %{with tcmalloc} +BuildRequires: gperftools-libs +BuildRequires: gperftools-devel +%endif +%if %{with mold} +Requires: mold +BuildRequires: mold +%endif +%if %{with ccache} +Requires: ccache +BuildRequires: ccache +%endif +%if %{with z3} +Requires: z3 +BuildRequires: z3 +%endif + +# required for further tests +BuildRequires: gdb + +# devel is required to run verilator at all +Requires: %{name}-devel = %{version}-%{release} %description Verilator is the fastest free Verilog HDL simulator. It compiles @@ -37,54 +89,87 @@ where fast simulation performance is of primary concern, and is especially well suited to create executable models of CPUs for embedded software design teams. +%package devel +Summary: Libraries and header files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package contains library and header files needed to develop +applications based on %{name}. + +%package doc +Summary: Documentation for %{name} +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description doc +This package contains the documentation for %{name}. + + %prep -%autosetup +%autosetup -p1 find . -name .gitignore -delete export VERILATOR_ROOT=%{_datadir} autoconf -%{configure} \ +%configure \ + --disable-partial-static \ + --disable-defenv \ +%if %{with ccwarn} + --enable-ccwarn \ +%else --disable-ccwarn \ - --enable-defenv \ +%endif +%if %{with longtests} + --enable-longtests +%else --disable-longtests +%endif -# We cannot run autoreconf because upstream uses unqualifed stdlib identifiers +# We cannot run autoreconf because upstream uses unqualified stdlib identifiers # that are included by autoconf-generated header files. find -name Makefile_obj -exec sed -i \ -e 's|^\(COPT = .*\)|\1 %{optflags}|' \ -e 's|^#LDFLAGS += .*|LDFLAGS += %{__global_ldflags}|' \ {} \; -%build -%make_build +# Fix /usr/bin/env ("env-script-interpreter") +sed -i 's#/usr/bin/env python3#/usr/bin/python3#g' docs/bin/* -%check -make test +%build +%if 0%{?rhel}%{?centos} +export VERILATOR_SRC_VERSION=epel-%{version} +%else +export VERILATOR_SRC_VERSION=fedora-%{version} +%endif + +%make_build %install %make_install -# remove the copy of examples in the datadir so we could -# mark the copy in the source directory as "doc" -rm -rf %{buildroot}%{_datadir}/verilator/examples - -# remove not needed build directory and bin directory -rm -rf %{buildroot}%{_datadir}/verilator/src -rm -rf %{buildroot}%{_bindir}/verilator_includer - # verilator installs verilator.pc under ${datadir} # but for consistency we want it under ${libdir} mkdir -p %{buildroot}%{_libdir}/pkgconfig mv %{buildroot}%{_datadir}/pkgconfig/verilator.pc %{buildroot}%{_libdir}/pkgconfig +# some tests and examples are CC0 and cannot be packaged into Fedora +rm -rf %{buildroot}%{_datadir}/verilator/examples +rm -rf %{buildroot}%{_datadir}/verilator/tests + + + +# The "tests" are all integration tests. +# They also define their own build flags, +# and fail if they are set to anything else. +%undefine _auto_set_build_flags + +%check +make test + %files %license Artistic LICENSE -%doc Changes README* -%doc docs/ -%doc examples/ %{_mandir}/man1/*.1.gz -%{_datadir}/verilator -%{_libdir}/pkgconfig/verilator.pc %{_bindir}/verilator %{_bindir}/verilator_bin %{_bindir}/verilator_bin_dbg @@ -92,184 +177,18 @@ mv %{buildroot}%{_datadir}/pkgconfig/verilator.pc %{buildroot}%{_libdir}/pkgconf %{_bindir}/verilator_coverage_bin_dbg %{_bindir}/verilator_gantt %{_bindir}/verilator_profcfunc +%{_datadir}/verilator/bin +%files devel +%license Artistic LICENSE +%{_datadir}/verilator/include +%{_libdir}/pkgconfig/verilator.pc +%{_datadir}/verilator/verilator-config*.cmake + +%files doc +%license Artistic LICENSE docs/guide/copyright.rst +%doc Changes README* +%doc docs %changelog -* Sat Sep 24 2022 Filipe Rosset - 4.226-1 -- Update to 4.226, enabled tests, spec cleanup and modernization -- Fixes rhbz#1933296 rhbz#2047099 and rhbz#2026957 - -* Sat Jul 23 2022 Fedora Release Engineering - 4.108-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Sat Jan 22 2022 Fedora Release Engineering - 4.108-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jul 23 2021 Fedora Release Engineering - 4.108-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Wed Jan 27 2021 Fedora Release Engineering - 4.108-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Mon Jan 25 2021 Filipe Rosset - 4.108-1 -- Update to 4.108 fixes rhbz#1901487 - -* Wed Jul 29 2020 Fedora Release Engineering - 4.032-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Fri Apr 24 2020 Filipe Rosset - 4.032-1 -- Update to 4.032 - -* Sun Feb 16 2020 Filipe Rosset - 4.028-1 -- Update to 4.028 - -* Fri Jan 31 2020 Fedora Release Engineering - 4.026-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Wed Jan 22 2020 Filipe Rosset - 4.026-1 -- Update to 4.026 fixes rhbz#1747211 - -* Thu Aug 22 2019 Filipe Rosset - 4.016-1 -- Updated to 4.016 fixes rhbz#1590822 rhbz#1643479 and rhbz#1700228 - -* Sat Jul 27 2019 Fedora Release Engineering - 3.922-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri May 03 2019 Scott Tsai scottt.tw@gmail.com - 3.922-5 -- Remove duplicate copies of 'examples' in /usr/share/doc -- https://bugzilla.redhat.com/show_bug.cgi?id=1592057#c3 - -* Fri May 03 2019 Marcus Müller - 3.922-4 -- Made %{_bindir}/verilator et al executable, fixes rhbz #1592057 - -* Sun Feb 03 2019 Fedora Release Engineering - 3.922-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Sat Jul 14 2018 Fedora Release Engineering - 3.922-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Sun Mar 18 2018 Filipe Rosset - 3.922-1 -- 3.922 bump, fixes rhbz #1557720 - -* Fri Feb 09 2018 Igor Gnatenko - 3.920-2 -- Escape macros in %%changelog - -* Wed Feb 07 2018 Filipe Rosset - 3.920-1 -- 3.920 bump -- Disabled tests until upstream fixes the issue -- Added BR to fix EPEL7 build -- Fixes rhbz #1250122 and rhbz #1494887 - -* Fri Sep 08 2017 Petr Pisar - 3.910-1 -- 3.910 bump -- License corrected to (LGPLv3 or Artistic 2.0) - -* Thu Aug 03 2017 Fedora Release Engineering - 3.890-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Thu Jul 27 2017 Fedora Release Engineering - 3.890-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Mon May 15 2017 Fedora Release Engineering - 3.890-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild - -* Sat Feb 11 2017 Fedora Release Engineering - 3.890-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Mon Nov 28 2016 Filipe Rosset - 3.890-2 -- Attempt to rebuilt on rawhide due dependency problems - -* Mon Nov 28 2016 Filipe Rosset - 3.890-1 -- Rebuilt for new upstream version 3.890 -- Spec clean up plus fixes rhbz #1087393 and rhbz #1358609 - -* Fri Feb 05 2016 Fedora Release Engineering - 3.874-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Fri Jun 19 2015 Fedora Release Engineering - 3.874-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Sun Jun 07 2015 Scott Tsai - 3.874-1 -- Upstream 3.874 - -* Sat May 02 2015 Kalev Lember - 3.864-2 -- Rebuilt for GCC 5 C++11 ABI change - -* Mon Sep 22 2014 Scott Tsai 3.864-1 -- Upstream 3.864 - -* Mon Aug 18 2014 Fedora Release Engineering - 3.862-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Fri Jun 13 2014 Scott Tsai 3.862-1 -- Upstream 3.862 - -* Sun Jun 08 2014 Fedora Release Engineering - 3.845-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Sun Aug 04 2013 Fedora Release Engineering - 3.845-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Sat Feb 16 2013 Chitlesh Goorah - 3.845-1 -- updated to 3.845 - -* Fri Feb 15 2013 Fedora Release Engineering - 3.805-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Sun Jul 22 2012 Fedora Release Engineering - 3.805-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Tue Feb 28 2012 Fedora Release Engineering - 3.805-4 -- Rebuilt for c++ ABI breakage - -* Sat Jan 14 2012 Fedora Release Engineering - 3.805-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Mon Feb 07 2011 Fedora Release Engineering - 3.805-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Sun Nov 07 2010 Chitlesh Goorah - 3.805-1 -- updated to 3.805 - -* Sat Sep 25 2010 Chitlesh Goorah - 3.804-1 -- updated to 3.804 - -* Sun Jul 11 2010 Chitlesh Goorah - 3.803-1 -- updated to 3.803 - -* Fri Jul 24 2009 Lane Brooks - 3.712-1 -- Updated to verilator 3.712 - -* Fri Jun 26 2009 Lane Brooks - 3.711-1 -- Updated to verilator 3.711 -- Added Artistic file -- Fixed permissions on man file - -* Tue Jun 9 2009 Lane Brooks - 3.710-1 -- Updated to verilator 3.710 -- Removed GCC 4.3 patch (no longer necessary) -- Added SYSTEMPERL_INCLUDE to point to perl-SystemPerl rpm install location - -* Fri Jan 9 2009 Lane Brooks - 3.700-1 -- Updated dependancy to newly packaged perl-SystemPerl and removed patch -- Updated to verilator 3.700 -- Added GCC 4.3 patch - -* Fri Jan 2 2009 Lane Brooks - 3.681-2 -- Moved examples from data dir to doc dir - -* Thu Jan 1 2009 Lane Brooks - 3.681-1 -- Updated verilator 3.681 -- Removed gcc 4.3 patch as verilator 3.681 incorporates this fix -- Removed shared object patch as it is possible to do this from Makefile - using environment variables -- Further updates to the spec file per Chitlesh's feedback - -* Sun Oct 26 2008 Lane Brooks - 3.680-3 -- Improved spec file for Fedora integration based on initial feedback - -* Thu Oct 23 2008 Lane Brooks - 3.680-2 -- Added shared object generation patch - -* Thu Oct 16 2008 Lane Brooks - 3.680-1 -- Initial package based on SUSE packages from Guenter Dannoritzer +%autochangelog