live-bootstrap/steps/flex-2.5.11/patches/scan_l.patch
fosslinux a67db8fcbd Make patches relative to where tarballs are extracted
Ever since an old patch version, it has (for reasonable security
reasons) not supported patched with ../ in the filename.
Many of our patches have been relying on this behaviour being OK,
because we start off with an ancient patch version that didn't perform
such checks. As soon as we need this behaviour after we build a newer
patch though, we will have problems.

So, let's change the policy.
Patches are relative to where tarballs are extracted, rather than the
"working directory" - e.g. have patches for `coreutils-9.4/src/cp.c`
instead of `src/cp.c`.
Keeping this consistent has a few implications;
- patches are applied from the build/ directory in bash era now, with
  `-p0`
- when patches are manually applied in the bash era, use `-p` as
  required, usually `-p1`
- in kaem era where patches are always manually applied, `-p1` is used
2024-12-23 15:20:42 +11:00

36 lines
1 KiB
Diff

SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
SPDX-FileCopyrightText: 2019-2020 Giovanni Mascellani <gio@debian.org>
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
SPDX-License-Identifier: BSD-2-Clause
Comments are unsupported by our flex.
diff --git scan.l scan.l
index 18d0de8..c251a5e 100644
--- flex-2.5.11/scan.l
+++ flex-2.5.11/scan.l
@@ -335,8 +335,8 @@ LEXOPT [aceknopr]
<SECT2PROLOG>{
- ^"%{".* ++bracelevel; yyless( 2 ); /* eat only %{ */
- ^"%}".* --bracelevel; yyless( 2 ); /* eat only %} */
+ ^"%{".* ++bracelevel; yyless( 2 );
+ ^"%}".* --bracelevel; yyless( 2 );
^{WS}.* ACTION_ECHO; /* indented code in prolog */
@@ -481,11 +481,11 @@ LEXOPT [aceknopr]
}
}
+ "{"{NAME}"}"[[:space:]]? {
/* Check for :space: at the end of the rule so we don't
* wrap the expanded regex in '(' ')' -- breaking trailing
* context.
*/
- "{"{NAME}"}"[[:space:]]? {
register Char *nmdefptr;
int end_is_ws, end_ch;