From b089780d0be6c157ac87e29ed3952d4061009629 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jul 2019 00:42:58 +0000 Subject: [PATCH 01/22] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- flex.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flex.spec b/flex.spec index a7fffe5..7652790 100644 --- a/flex.spec +++ b/flex.spec @@ -3,7 +3,7 @@ Summary: A tool for creating scanners (text pattern recognizers) Name: flex Version: 2.6.4 -Release: 2%{?dist} +Release: 3%{?dist} # parse.c and parse.h are under GPLv3+ with exception which allows # relicensing. Since flex is shipped under BDS-style license, # let's assume that the relicensing was done. @@ -110,6 +110,9 @@ echo ============END TESTING=========== %{_pkgdocdir} %changelog +* Thu Jul 25 2019 Fedora Release Engineering - 2.6.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Thu Jan 31 2019 Fedora Release Engineering - 2.6.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From ad90513c6be11a74624e75cae3a2c3df31543fb8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jan 2020 18:39:36 +0000 Subject: [PATCH 02/22] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- flex.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flex.spec b/flex.spec index 7652790..3a6f25c 100644 --- a/flex.spec +++ b/flex.spec @@ -3,7 +3,7 @@ Summary: A tool for creating scanners (text pattern recognizers) Name: flex Version: 2.6.4 -Release: 3%{?dist} +Release: 4%{?dist} # parse.c and parse.h are under GPLv3+ with exception which allows # relicensing. Since flex is shipped under BDS-style license, # let's assume that the relicensing was done. @@ -110,6 +110,9 @@ echo ============END TESTING=========== %{_pkgdocdir} %changelog +* Tue Jan 28 2020 Fedora Release Engineering - 2.6.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Thu Jul 25 2019 Fedora Release Engineering - 2.6.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From f0b1e7d68b13d787f04321aa691c10c8640f95ff Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 27 Jul 2020 17:34:32 +0000 Subject: [PATCH 03/22] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- flex.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flex.spec b/flex.spec index 3a6f25c..a07ca11 100644 --- a/flex.spec +++ b/flex.spec @@ -3,7 +3,7 @@ Summary: A tool for creating scanners (text pattern recognizers) Name: flex Version: 2.6.4 -Release: 4%{?dist} +Release: 5%{?dist} # parse.c and parse.h are under GPLv3+ with exception which allows # relicensing. Since flex is shipped under BDS-style license, # let's assume that the relicensing was done. @@ -110,6 +110,9 @@ echo ============END TESTING=========== %{_pkgdocdir} %changelog +* Mon Jul 27 2020 Fedora Release Engineering - 2.6.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Tue Jan 28 2020 Fedora Release Engineering - 2.6.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 9adf2296f3603e2ee68328283ad625d080ae1c2a Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Fri, 21 Aug 2020 11:57:37 +0200 Subject: [PATCH 04/22] Re-work and rename flex subpackages, and provide shared libraries This resolves a user request for a shared library (#1327851) and harmonizes package names and content with Debian and SUSE. The following subpackage changes have been made: - Remove and obsolete the flex-devel subpackage containing static libraries - Provide shared libraries in a new subpackage named libfl2 - Provide development files in a new subpackage named libfl-devel - Provide static libraries in a new subpackage named libfl-static --- flex.spec | 76 +++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 57 insertions(+), 19 deletions(-) diff --git a/flex.spec b/flex.spec index a07ca11..3bc94c0 100644 --- a/flex.spec +++ b/flex.spec @@ -1,9 +1,9 @@ %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} -Summary: A tool for creating scanners (text pattern recognizers) +Summary: A tool for generating scanners (text pattern recognizers) Name: flex Version: 2.6.4 -Release: 5%{?dist} +Release: 6%{?dist} # parse.c and parse.h are under GPLv3+ with exception which allows # relicensing. Since flex is shipped under BDS-style license, # let's assume that the relicensing was done. @@ -33,23 +33,54 @@ application development. # We keep the libraries in separate sub-package to allow for multilib # installations of flex. -%package devel -Summary: Libraries for flex scanner generator + +%define somajor 2 + +%package -n libfl%{somajor} +Summary: Libraries for the flex scanner generator + +%description -n libfl%{somajor} +flex is a tool for generating scanners. + +This package contains the shared library with default implementations of +`main' and `yywrap' functions that binaries using flex can choose to link +against instead of implementing on their own. + +%package -n libfl-devel +Summary: Development files for the flex scanner generator +Requires: libfl%{somajor} = %{version}-%{release} + +%description -n libfl-devel +flex is a tool for generating scanners. + +This package contains files required to build programs that use flex +libraries. + +%package -n libfl-static +Summary: Static libraries for the flex scanner generator +# We renamed flex-static to flex-devel in version 2.5.35-15: Obsoletes: flex-static < 2.5.35-15 Provides: flex-static +# We renamed flex-devel to libfl-static in version 2.6.4-6. This clarifies +# the nature of the package and brings us in line with naming used by SUSE +# and Debian: +Obsoletes: flex-devel < 2.6.4-6 +Provides: flex-devel -%description devel +%description -n libfl-static -This package contains the library with default implementations of -`main' and `yywrap' functions that the client binary can choose to use -instead of implementing their own. +flex is a tool for generating scanners. + +This package contains the static library with default implementations of +`main' and `yywrap' functions that binaries using flex can choose to +statically link against instead of implementing their own. %package doc -Summary: Documentation for flex scanner generator +Summary: Documentation for the flex scanner generator %description doc -This package contains documentation for flex scanner generator in +This package contains documentation for the flex scanner generator in plain text and PDF formats. %prep @@ -66,15 +97,8 @@ rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install rm -f $RPM_BUILD_ROOT/%{_infodir}/dir rm -f $RPM_BUILD_ROOT/%{_pkgdocdir}/{README.cvs,TODO} -# For now, excluding the new .la and .so files as we haven't had -# any requests for them and adding them will require a new subpackage. -# The .so files contain 2 optional implementations of main and yywrap -# for developer convenience. They are also available in the .a file -# provided in flex-devel. +# Exclude libtool archives (.la) as per Fedora packaging guidelines find %{buildroot} -name '*.la' -delete -find %{buildroot} -name '*.so' -delete -find %{buildroot} -name '*.so.2' -delete -find %{buildroot} -name '*.so.2.0.0' -delete ( cd ${RPM_BUILD_ROOT} ln -sf flex .%{_bindir}/lex @@ -101,7 +125,14 @@ echo ============END TESTING=========== %{_includedir}/FlexLexer.h %{_infodir}/flex.info* -%files devel +%files -n libfl%{somajor} +%{_libdir}/libfl.so.%{somajor}* + +%files -n libfl-devel +%{_includedir}/FlexLexer.h +%{_libdir}/libfl.so + +%files -n libfl-static %dir %{_pkgdocdir} %license COPYING %{_libdir}/*.a @@ -110,6 +141,13 @@ echo ============END TESTING=========== %{_pkgdocdir} %changelog +* Fri Aug 21 2020 Arjun Shankar - 2.6.4-6 +- Re-work flex subpackages and provide shared libraries (#1327851): +- Remove and obsolete the flex-devel subpackage containing static libraries +- Provide shared libraries in a new subpackage named libfl2 +- Provide development files in a new subpackage named libfl-devel +- Provide static libraries in a new subpackage named libfl-static + * Mon Jul 27 2020 Fedora Release Engineering - 2.6.4-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From bfe32fe72b83edec7756c4174b913f47b9cde9c5 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 18 Dec 2020 22:42:41 +0000 Subject: [PATCH 05/22] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- flex.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/flex.spec b/flex.spec index 3bc94c0..288fe2f 100644 --- a/flex.spec +++ b/flex.spec @@ -16,6 +16,7 @@ Patch0: flex-rh1389575.patch Requires: m4 BuildRequires: gettext gettext-devel bison m4 help2man gcc gcc-c++ automake libtool +BuildRequires: make %description The flex program generates scanners. Scanners are programs which can From d13f0a58066616f854749da1b196bacb941dfdea Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 05:40:01 +0000 Subject: [PATCH 06/22] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- flex.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flex.spec b/flex.spec index 288fe2f..fdd19fb 100644 --- a/flex.spec +++ b/flex.spec @@ -3,7 +3,7 @@ Summary: A tool for generating scanners (text pattern recognizers) Name: flex Version: 2.6.4 -Release: 6%{?dist} +Release: 7%{?dist} # parse.c and parse.h are under GPLv3+ with exception which allows # relicensing. Since flex is shipped under BDS-style license, # let's assume that the relicensing was done. @@ -142,6 +142,9 @@ echo ============END TESTING=========== %{_pkgdocdir} %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 2.6.4-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Fri Aug 21 2020 Arjun Shankar - 2.6.4-6 - Re-work flex subpackages and provide shared libraries (#1327851): - Remove and obsolete the flex-devel subpackage containing static libraries From 8a8070ad74c0fa674f7f2b20a782284f6b69e752 Mon Sep 17 00:00:00 2001 From: Edjunior Machado Date: Mon, 18 Jan 2021 22:11:55 +0100 Subject: [PATCH 07/22] Introduce CI gating --- .fmf/version | 1 + gating.yaml | 19 +++++ plans/ci.fmf | 6 ++ tests/Sanity/smoke-check-flex-runs/Makefile | 63 +++++++++++++++ tests/Sanity/smoke-check-flex-runs/PURPOSE | 3 + .../smoke-check-flex-runs/calc-grammar.y | 36 +++++++++ .../Sanity/smoke-check-flex-runs/calc-lexer.l | 15 ++++ .../count_chars_and_lines.l | 21 +++++ .../expected_calc_output.txt | 3 + tests/Sanity/smoke-check-flex-runs/main.fmf | 15 ++++ tests/Sanity/smoke-check-flex-runs/runtest.sh | 78 +++++++++++++++++++ 11 files changed, 260 insertions(+) create mode 100644 .fmf/version create mode 100644 gating.yaml create mode 100644 plans/ci.fmf create mode 100644 tests/Sanity/smoke-check-flex-runs/Makefile create mode 100644 tests/Sanity/smoke-check-flex-runs/PURPOSE create mode 100644 tests/Sanity/smoke-check-flex-runs/calc-grammar.y create mode 100644 tests/Sanity/smoke-check-flex-runs/calc-lexer.l create mode 100644 tests/Sanity/smoke-check-flex-runs/count_chars_and_lines.l create mode 100644 tests/Sanity/smoke-check-flex-runs/expected_calc_output.txt create mode 100644 tests/Sanity/smoke-check-flex-runs/main.fmf create mode 100755 tests/Sanity/smoke-check-flex-runs/runtest.sh 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/gating.yaml b/gating.yaml new file mode 100644 index 0000000..ce3cdc1 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,19 @@ +--- !Policy +product_versions: + - fedora-* +decision_context: bodhi_update_push_stable +subject_type: koji_build +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} +--- !Policy +product_versions: + - rhel-8 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional} +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional} diff --git a/plans/ci.fmf b/plans/ci.fmf new file mode 100644 index 0000000..1ad2c12 --- /dev/null +++ b/plans/ci.fmf @@ -0,0 +1,6 @@ +summary: CI Gating Plan +discover: + how: fmf + directory: tests +execute: + how: beakerlib diff --git a/tests/Sanity/smoke-check-flex-runs/Makefile b/tests/Sanity/smoke-check-flex-runs/Makefile new file mode 100644 index 0000000..3abe871 --- /dev/null +++ b/tests/Sanity/smoke-check-flex-runs/Makefile @@ -0,0 +1,63 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/flex/Sanity/smoke-check-flex-runs +# Description: Show your version. Build a one-file project. +# Author: Vaclav Kadlcik +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2015 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# 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, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/tools/flex/Sanity/smoke-check-flex-runs +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE count_chars_and_lines.l calc-lexer.l calc-grammar.y expected_calc_output.txt + +.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: Vaclav Kadlcik " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Show your version. Build a one-file project." >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 15m" >> $(METADATA) + @echo "RunFor: flex" >> $(METADATA) + @echo "Requires: flex bison gcc" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2+" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Sanity/smoke-check-flex-runs/PURPOSE b/tests/Sanity/smoke-check-flex-runs/PURPOSE new file mode 100644 index 0000000..ed0f21f --- /dev/null +++ b/tests/Sanity/smoke-check-flex-runs/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /tools/flex/Sanity/smoke-check-flex-runs +Description: Show your version. Build a one-file project. +Author: Vaclav Kadlcik diff --git a/tests/Sanity/smoke-check-flex-runs/calc-grammar.y b/tests/Sanity/smoke-check-flex-runs/calc-grammar.y new file mode 100644 index 0000000..53d4a85 --- /dev/null +++ b/tests/Sanity/smoke-check-flex-runs/calc-grammar.y @@ -0,0 +1,36 @@ +%{ +#include +%} + +%token NUMBER +%token ADD SUB MUL DIV +%token EOL + +%% + +input: + | input EOL { } + | input expression EOL { printf("%d\n", $2); } + ; + +expression: + factor + | expression ADD factor { $$ = $1 + $3; } + | expression SUB factor { $$ = $1 - $3; } + ; + +factor: + NUMBER + | factor MUL NUMBER { $$ = $1 * $3; } + | factor DIV NUMBER { $$ = $1 / $3; } + ; + +%% + +int main(int argc, char ** argv) { + yyparse(); +} + +yyerror(char *s) { + fprintf(stderr, "ERROR: %s\n", s); +} diff --git a/tests/Sanity/smoke-check-flex-runs/calc-lexer.l b/tests/Sanity/smoke-check-flex-runs/calc-lexer.l new file mode 100644 index 0000000..fa9ac41 --- /dev/null +++ b/tests/Sanity/smoke-check-flex-runs/calc-lexer.l @@ -0,0 +1,15 @@ +%option noyywrap +%{ +#include "calc-grammar.tab.h" +%} + +%% +"+" { return ADD; } +"-" { return SUB; } +"*" { return MUL; } +"/" { return DIV; } +[0-9]+ { yylval = atoi(yytext); return NUMBER; } +\n { return EOL; } +[ \t] { /* ignore whitespaces */ } +. { yyerror("unexpected character %c", *yytext); } +%% diff --git a/tests/Sanity/smoke-check-flex-runs/count_chars_and_lines.l b/tests/Sanity/smoke-check-flex-runs/count_chars_and_lines.l new file mode 100644 index 0000000..7b90045 --- /dev/null +++ b/tests/Sanity/smoke-check-flex-runs/count_chars_and_lines.l @@ -0,0 +1,21 @@ +%option noyywrap +%{ +#include + +int chars = 0; +int lines = 0; +%} + +%% + +\n { lines++; chars++; } +. { chars++; } + +%% + +int main(int argc, char ** argv) { + yylex(); + printf("chars: %d\n", chars); + printf("lines: %d\n", lines); + return 0; +} diff --git a/tests/Sanity/smoke-check-flex-runs/expected_calc_output.txt b/tests/Sanity/smoke-check-flex-runs/expected_calc_output.txt new file mode 100644 index 0000000..7baa841 --- /dev/null +++ b/tests/Sanity/smoke-check-flex-runs/expected_calc_output.txt @@ -0,0 +1,3 @@ +STDOUT: 7 +STDOUT: -221 +STDOUT: 42 diff --git a/tests/Sanity/smoke-check-flex-runs/main.fmf b/tests/Sanity/smoke-check-flex-runs/main.fmf new file mode 100644 index 0000000..2b25e69 --- /dev/null +++ b/tests/Sanity/smoke-check-flex-runs/main.fmf @@ -0,0 +1,15 @@ +summary: Show your version. Build a one-file project. +description: '' +contact: +- Vaclav Kadlcik +component: +- flex +test: ./runtest.sh +framework: beakerlib +recommend: +- flex +- bison +- gcc +duration: 15m +extra-summary: /tools/flex/Sanity/smoke-check-flex-runs +extra-task: /tools/flex/Sanity/smoke-check-flex-runs diff --git a/tests/Sanity/smoke-check-flex-runs/runtest.sh b/tests/Sanity/smoke-check-flex-runs/runtest.sh new file mode 100755 index 0000000..68ee8a3 --- /dev/null +++ b/tests/Sanity/smoke-check-flex-runs/runtest.sh @@ -0,0 +1,78 @@ +#!/usr/bin/env bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/flex/Sanity/smoke-check-flex-runs +# Description: Show your version. Build a one-file project. +# Author: Vaclav Kadlcik +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2015 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# 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, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="flex" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + yum -y install bison gcc + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "cp count_chars_and_lines.l calc-lexer.l calc-grammar.y expected_calc_output.txt $TmpDir" + rlRun "pushd $TmpDir" + rlPhaseEnd + + rlPhaseStartTest 'Show version' + + rlRun -t -s 'flex -V' + rlAssertNotGrep '^STDERR:' $rlRun_LOG + rlAssertGrep '^STDOUT: flex [0-9]' $rlRun_LOG + + rlPhaseEnd + + rlPhaseStartTest 'Flex works standalone' + + rlRun 'flex -o count_chars_and_lines.c count_chars_and_lines.l' + rlRun 'gcc -o count_chars_and_lines count_chars_and_lines.c' + rlAssertExists 'count_chars_and_lines' + rlRun -t -s 'echo -e "nazdar\nbazar" | ./count_chars_and_lines' + rlAssertNotGrep '^STDERR:' $rlRun_LOG + rlAssertGrep '^STDOUT: chars: 13$' $rlRun_LOG + rlAssertGrep '^STDOUT: lines: 2$' $rlRun_LOG + + rlPhaseEnd + + rlPhaseStartTest 'Flex works with Bison' + + rlRun 'bison -d calc-grammar.y' + rlRun 'flex calc-lexer.l' + rlRun 'gcc -o calc calc-grammar.tab.c lex.yy.c' + rlAssertExists 'calc' + rlRun -t -s 'echo -e "1 + 2 * 3\n1 - 666 / 3\n42" | ./calc' + rlAssertNotDiffer expected_calc_output.txt $rlRun_LOG + + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd From e7d1e0be2590517693c9c541f1b6d9f00641c000 Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Thu, 6 May 2021 00:49:44 +0200 Subject: [PATCH 08/22] Remove and obsolete the flex-doc subpackage (#1915609) The flex-doc subpackage hasn't contained any documentation for quite a while. It is supposed to contain the manual in PDF format, but `make && make install' does not produce a PDF. Since info and man pages are provided in the main package itself, this leaves flex-doc redundant. This commit removes and obsoletes the flex-doc subpackage. No Fedora packages are currently dependent on or build-dependent on flex-doc: $ dnf repoquery --whatdepends flex-doc $ dnf repoquery --disablerepo="*" --enablerepo="*-source" --arch=src \ --whatdepends flex-doc Therefore, only an "Obsoletes: flex-doc" line is added, with no accompanying "Provides: flex-doc" line. --- flex.spec | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/flex.spec b/flex.spec index fdd19fb..e7ce7fc 100644 --- a/flex.spec +++ b/flex.spec @@ -3,7 +3,7 @@ Summary: A tool for generating scanners (text pattern recognizers) Name: flex Version: 2.6.4 -Release: 7%{?dist} +Release: 8%{?dist} # parse.c and parse.h are under GPLv3+ with exception which allows # relicensing. Since flex is shipped under BDS-style license, # let's assume that the relicensing was done. @@ -18,6 +18,8 @@ Requires: m4 BuildRequires: gettext gettext-devel bison m4 help2man gcc gcc-c++ automake libtool BuildRequires: make +Obsoletes: flex-doc < 2.6.4-8 + %description The flex program generates scanners. Scanners are programs which can recognize lexical patterns in text. Flex takes pairs of regular @@ -61,12 +63,12 @@ libraries. Summary: Static libraries for the flex scanner generator # We renamed flex-static to flex-devel in version 2.5.35-15: Obsoletes: flex-static < 2.5.35-15 -Provides: flex-static +Provides: flex-static = %{version}-%{release} # We renamed flex-devel to libfl-static in version 2.6.4-6. This clarifies # the nature of the package and brings us in line with naming used by SUSE # and Debian: Obsoletes: flex-devel < 2.6.4-6 -Provides: flex-devel +Provides: flex-devel = %{version}-%{release} %description -n libfl-static @@ -76,14 +78,6 @@ This package contains the static library with default implementations of `main' and `yywrap' functions that binaries using flex can choose to statically link against instead of implementing their own. -%package doc -Summary: Documentation for the flex scanner generator - -%description doc - -This package contains documentation for the flex scanner generator in -plain text and PDF formats. - %prep %setup -q %patch0 -p1 @@ -97,7 +91,7 @@ make %{?_smp_mflags} rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install rm -f $RPM_BUILD_ROOT/%{_infodir}/dir -rm -f $RPM_BUILD_ROOT/%{_pkgdocdir}/{README.cvs,TODO} +rm -f $RPM_BUILD_ROOT/%{_pkgdocdir}/{README.cvs,TODO,AUTHORS,COPYING,ONEWS} # Exclude libtool archives (.la) as per Fedora packaging guidelines find %{buildroot} -name '*.la' -delete @@ -138,10 +132,12 @@ echo ============END TESTING=========== %license COPYING %{_libdir}/*.a -%files doc -%{_pkgdocdir} - %changelog +* Thu May 06 2021 Arjun Shankar - 2.6.4-8 +- Remove and obsolete the flex-doc subpackage; documention is provided in the + main package itself +- Specify versions in "Provides:" lines for flex-static and flex-devel + * Tue Jan 26 2021 Fedora Release Engineering - 2.6.4-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 4157a4f3d3576acd52fa2c36f9826b9699174336 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 21 Jul 2021 23:05:27 +0000 Subject: [PATCH 09/22] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- flex.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flex.spec b/flex.spec index e7ce7fc..1ba82bc 100644 --- a/flex.spec +++ b/flex.spec @@ -3,7 +3,7 @@ Summary: A tool for generating scanners (text pattern recognizers) Name: flex Version: 2.6.4 -Release: 8%{?dist} +Release: 9%{?dist} # parse.c and parse.h are under GPLv3+ with exception which allows # relicensing. Since flex is shipped under BDS-style license, # let's assume that the relicensing was done. @@ -133,6 +133,9 @@ echo ============END TESTING=========== %{_libdir}/*.a %changelog +* Wed Jul 21 2021 Fedora Release Engineering - 2.6.4-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Thu May 06 2021 Arjun Shankar - 2.6.4-8 - Remove and obsolete the flex-doc subpackage; documention is provided in the main package itself From 76db1a4296d20225d190e474fc8818c0f1e988ee Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 03:08:04 +0000 Subject: [PATCH 10/22] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- flex.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flex.spec b/flex.spec index 1ba82bc..a648749 100644 --- a/flex.spec +++ b/flex.spec @@ -3,7 +3,7 @@ Summary: A tool for generating scanners (text pattern recognizers) Name: flex Version: 2.6.4 -Release: 9%{?dist} +Release: 10%{?dist} # parse.c and parse.h are under GPLv3+ with exception which allows # relicensing. Since flex is shipped under BDS-style license, # let's assume that the relicensing was done. @@ -133,6 +133,9 @@ echo ============END TESTING=========== %{_libdir}/*.a %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 2.6.4-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Wed Jul 21 2021 Fedora Release Engineering - 2.6.4-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From a2246316dcbae02384c9368458777393b60fbc4f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 03:18:28 +0000 Subject: [PATCH 11/22] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- flex.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flex.spec b/flex.spec index a648749..2dde357 100644 --- a/flex.spec +++ b/flex.spec @@ -3,7 +3,7 @@ Summary: A tool for generating scanners (text pattern recognizers) Name: flex Version: 2.6.4 -Release: 10%{?dist} +Release: 11%{?dist} # parse.c and parse.h are under GPLv3+ with exception which allows # relicensing. Since flex is shipped under BDS-style license, # let's assume that the relicensing was done. @@ -133,6 +133,9 @@ echo ============END TESTING=========== %{_libdir}/*.a %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 2.6.4-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Thu Jan 20 2022 Fedora Release Engineering - 2.6.4-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From abdaa050fff6039b68186148201b8b83af727bb9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 03:34:41 +0000 Subject: [PATCH 12/22] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- flex.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flex.spec b/flex.spec index 2dde357..71ca4e6 100644 --- a/flex.spec +++ b/flex.spec @@ -3,7 +3,7 @@ Summary: A tool for generating scanners (text pattern recognizers) Name: flex Version: 2.6.4 -Release: 11%{?dist} +Release: 12%{?dist} # parse.c and parse.h are under GPLv3+ with exception which allows # relicensing. Since flex is shipped under BDS-style license, # let's assume that the relicensing was done. @@ -133,6 +133,9 @@ echo ============END TESTING=========== %{_libdir}/*.a %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 2.6.4-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Thu Jul 21 2022 Fedora Release Engineering - 2.6.4-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 711ba9a8ad3b803be027481e1ce61a45c97a04e4 Mon Sep 17 00:00:00 2001 From: Edjunior Machado Date: Fri, 9 Dec 2022 16:55:43 +0100 Subject: [PATCH 13/22] tests: Fix fmf plan attributes --- plans/ci.fmf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plans/ci.fmf b/plans/ci.fmf index 1ad2c12..3fd3ab7 100644 --- a/plans/ci.fmf +++ b/plans/ci.fmf @@ -1,6 +1,5 @@ summary: CI Gating Plan discover: how: fmf - directory: tests execute: - how: beakerlib + how: tmt From 12a46b39b610c4c66cc6c863de00d9e054603797 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jul 2023 19:52:01 +0000 Subject: [PATCH 14/22] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- flex.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flex.spec b/flex.spec index 71ca4e6..1f10541 100644 --- a/flex.spec +++ b/flex.spec @@ -3,7 +3,7 @@ Summary: A tool for generating scanners (text pattern recognizers) Name: flex Version: 2.6.4 -Release: 12%{?dist} +Release: 13%{?dist} # parse.c and parse.h are under GPLv3+ with exception which allows # relicensing. Since flex is shipped under BDS-style license, # let's assume that the relicensing was done. @@ -133,6 +133,9 @@ echo ============END TESTING=========== %{_libdir}/*.a %changelog +* Wed Jul 19 2023 Fedora Release Engineering - 2.6.4-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Thu Jan 19 2023 Fedora Release Engineering - 2.6.4-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From d687d8a4131309aafaed893f27058d3007a6910a Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Mon, 30 Oct 2023 12:14:26 +0100 Subject: [PATCH 15/22] Migrate License field to SPDX identifiers https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_2 --- flex.spec | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/flex.spec b/flex.spec index 1f10541..05fc914 100644 --- a/flex.spec +++ b/flex.spec @@ -3,12 +3,13 @@ Summary: A tool for generating scanners (text pattern recognizers) Name: flex Version: 2.6.4 -Release: 13%{?dist} -# parse.c and parse.h are under GPLv3+ with exception which allows -# relicensing. Since flex is shipped under BDS-style license, -# let's assume that the relicensing was done. -# gettext.h (copied from gnulib) is under LGPLv2+ -License: BSD and LGPLv2+ +Release: 14%{?dist} + +# An SPDX license string check done against flex-2.6.4 using fossology +# found strings corresponding to the licenses noted below across the flex +# source tree. +License: BSD-3-Clause-flex AND GPL-3.0-or-later WITH Autoconf-exception-generic-3.0 AND GPL-3.0-or-later WITH Bison-exception-2.2 AND GPL-3.0-or-later WITH Texinfo-exception AND FSFAP AND FSFUL AND FSFULLR AND FSFULLRWD AND GPL-2.0-or-later AND X11 + URL: https://github.com/westes/flex Source: https://github.com/westes/flex/releases/download/v%{version}/flex-%{version}.tar.gz @@ -133,6 +134,12 @@ echo ============END TESTING=========== %{_libdir}/*.a %changelog +* Mon Oct 30 2023 Arjun Shankar - 2.6.4-14 +- Analyse flex sources for license information +- Migrate License field to SPDX identifiers for + https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_2 + (#2222083) + * Wed Jul 19 2023 Fedora Release Engineering - 2.6.4-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 2b40fc115363a9dd45a70b1f7b502360382952e6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 19:28:13 +0000 Subject: [PATCH 16/22] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- flex.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flex.spec b/flex.spec index 05fc914..b1719bd 100644 --- a/flex.spec +++ b/flex.spec @@ -3,7 +3,7 @@ Summary: A tool for generating scanners (text pattern recognizers) Name: flex Version: 2.6.4 -Release: 14%{?dist} +Release: 15%{?dist} # An SPDX license string check done against flex-2.6.4 using fossology # found strings corresponding to the licenses noted below across the flex @@ -134,6 +134,9 @@ echo ============END TESTING=========== %{_libdir}/*.a %changelog +* Fri Jan 19 2024 Fedora Release Engineering - 2.6.4-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Oct 30 2023 Arjun Shankar - 2.6.4-14 - Analyse flex sources for license information - Migrate License field to SPDX identifiers for From e2cfee03f981f42a53da6e3b2d02d428ca9b53d2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 11:43:21 +0000 Subject: [PATCH 17/22] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- flex.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flex.spec b/flex.spec index b1719bd..bcba896 100644 --- a/flex.spec +++ b/flex.spec @@ -3,7 +3,7 @@ Summary: A tool for generating scanners (text pattern recognizers) Name: flex Version: 2.6.4 -Release: 15%{?dist} +Release: 16%{?dist} # An SPDX license string check done against flex-2.6.4 using fossology # found strings corresponding to the licenses noted below across the flex @@ -134,6 +134,9 @@ echo ============END TESTING=========== %{_libdir}/*.a %changelog +* Wed Jan 24 2024 Fedora Release Engineering - 2.6.4-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Fedora Release Engineering - 2.6.4-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 992cb3242a5cd8648c38d610ddfd0c9bcb4238d7 Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Tue, 23 Apr 2024 17:16:04 +0200 Subject: [PATCH 18/22] Switch to %autosetup --- flex.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flex.spec b/flex.spec index bcba896..bec4b6d 100644 --- a/flex.spec +++ b/flex.spec @@ -80,8 +80,7 @@ This package contains the static library with default implementations of statically link against instead of implementing their own. %prep -%setup -q -%patch0 -p1 +%autosetup -p1 %build autoreconf -i From 6e3f209ce3390dbc83041818632a75940b52461d Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Tue, 23 Apr 2024 15:45:25 +0200 Subject: [PATCH 19/22] Provide flex-doc via the main flex package Commit e7d1e0be2590517693c9c541f1b6d9f00641c000 removed and obsoleted flex-doc, but did not 'Provides:' it. This commit fixes that. --- flex.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/flex.spec b/flex.spec index bec4b6d..a39f9e2 100644 --- a/flex.spec +++ b/flex.spec @@ -3,7 +3,7 @@ Summary: A tool for generating scanners (text pattern recognizers) Name: flex Version: 2.6.4 -Release: 16%{?dist} +Release: 17%{?dist} # An SPDX license string check done against flex-2.6.4 using fossology # found strings corresponding to the licenses noted below across the flex @@ -20,6 +20,7 @@ BuildRequires: gettext gettext-devel bison m4 help2man gcc gcc-c++ automake libt BuildRequires: make Obsoletes: flex-doc < 2.6.4-8 +Provides: flex-doc = %{version}-%{release} %description The flex program generates scanners. Scanners are programs which can @@ -133,6 +134,9 @@ echo ============END TESTING=========== %{_libdir}/*.a %changelog +* Tue Apr 23 2024 Arjun Shankar - 2.6.4-17 +- Provide flex-doc via the main flex package + * Wed Jan 24 2024 Fedora Release Engineering - 2.6.4-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From dc359e98697ef6da7bc6abc0674bbd0b31ef7915 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 23:17:23 +0000 Subject: [PATCH 20/22] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- flex.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flex.spec b/flex.spec index a39f9e2..661ccd8 100644 --- a/flex.spec +++ b/flex.spec @@ -3,7 +3,7 @@ Summary: A tool for generating scanners (text pattern recognizers) Name: flex Version: 2.6.4 -Release: 17%{?dist} +Release: 18%{?dist} # An SPDX license string check done against flex-2.6.4 using fossology # found strings corresponding to the licenses noted below across the flex @@ -134,6 +134,9 @@ echo ============END TESTING=========== %{_libdir}/*.a %changelog +* Wed Jul 17 2024 Fedora Release Engineering - 2.6.4-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Tue Apr 23 2024 Arjun Shankar - 2.6.4-17 - Provide flex-doc via the main flex package From 92050e21e824d7b90d5f98d3e0cb6a33531e15e3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 18:26:34 +0000 Subject: [PATCH 21/22] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- flex.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flex.spec b/flex.spec index 661ccd8..7499e27 100644 --- a/flex.spec +++ b/flex.spec @@ -3,7 +3,7 @@ Summary: A tool for generating scanners (text pattern recognizers) Name: flex Version: 2.6.4 -Release: 18%{?dist} +Release: 19%{?dist} # An SPDX license string check done against flex-2.6.4 using fossology # found strings corresponding to the licenses noted below across the flex @@ -134,6 +134,9 @@ echo ============END TESTING=========== %{_libdir}/*.a %changelog +* Thu Jan 16 2025 Fedora Release Engineering - 2.6.4-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Wed Jul 17 2024 Fedora Release Engineering - 2.6.4-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 642acc32b575e39c52b22d87aca21250a18ff1cb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 20:36:11 +0000 Subject: [PATCH 22/22] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- flex.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flex.spec b/flex.spec index 7499e27..90a52a3 100644 --- a/flex.spec +++ b/flex.spec @@ -3,7 +3,7 @@ Summary: A tool for generating scanners (text pattern recognizers) Name: flex Version: 2.6.4 -Release: 19%{?dist} +Release: 20%{?dist} # An SPDX license string check done against flex-2.6.4 using fossology # found strings corresponding to the licenses noted below across the flex @@ -134,6 +134,9 @@ echo ============END TESTING=========== %{_libdir}/*.a %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 2.6.4-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Thu Jan 16 2025 Fedora Release Engineering - 2.6.4-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild