diff --git a/backport-add-strerror-to-error-message.patch b/backport-add-strerror-to-error-message.patch new file mode 100644 index 0000000000000000000000000000000000000000..6f4602d42ae15b3db71e613832d87c367ad2d3fe --- /dev/null +++ b/backport-add-strerror-to-error-message.patch @@ -0,0 +1,25 @@ +From a4abd7343145d9050f7b37e7c82f8775f98d01f0 Mon Sep 17 00:00:00 2001 +From: Ryan McCullagh +Date: Wed, 10 Jan 2018 19:06:02 -0600 +Subject: [PATCH] add strerror to error message + +--- + src/scan.l | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/scan.l b/src/scan.l +index 37b37ca..9fd3453 100644 +--- a/src/scan.l ++++ b/src/scan.l +@@ -1078,7 +1078,7 @@ void set_input_file( char *file ) + yyin = fopen( infilename, "r" ); + + if ( yyin == NULL ) +- lerr( _( "can't open %s" ), file ); ++ lerr( _( "can't open %s: %s" ), file, strerror(errno)); + } + + else +-- +2.33.0 + diff --git a/flex.spec b/flex.spec index 82c1c075a4de741e872d8a1f9c5d296ed7896d38..88d50f637ec439b30273efcb904a434968917db4 100644 --- a/flex.spec +++ b/flex.spec @@ -1,6 +1,6 @@ Name: flex Version: 2.6.4 -Release: 5 +Release: 6 Summary: A fast lexical analyzer generator License: BSD URL: https://github.com/westes/flex @@ -17,8 +17,14 @@ Patch0007: scanner-temporarily-protect-against-ccl-overflow-ove.patch Patch0008: scanner-prevent-overflow-in-add_action.patch Patch0009: 0001-scanner-fix-default-of-yy_top_state.patch Patch0010: 0002-scanner-fix-default-of-yy_top_state.patch +Patch0011: backport-add-strerror-to-error-message.patch BuildRequires: gcc gcc-c++ gettext help2man m4 bison texinfo automake autoconf + +#Ensure that the command: flex ,exists in the compilation environment. +#Otherwise, compilation fails. +BuildRequires: flex + Requires: m4 Requires(post): info Requires(preun): info @@ -105,6 +111,9 @@ fi %{_mandir}/man1/* %changelog +* Thu Aug 01 2024 zhangruifang - 2.6.4-6 +- backport patch from upstream + * Tue Jul 12 2022 panxiaohe - 2.6.4-5 - enable check test suite - delete duplicate package files: NEWS,README.md