From d93e3cd4657a3fa9c05bee6b1249cf5d9d6fe3d4 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sat, 6 Apr 2024 06:04:52 -0700 Subject: [PATCH 3/3] gnulib-tool.py: Don't allow path normalization to delete a variable. * pygnulib/GLModuleSystem.py (GLModule.getAutomakeSnippet_Unconditional): Use os.path.join() on the Makefile variable so it isn't deleted by a following '..' from os.path.norm(). --- ChangeLog | 8 ++++++++ pygnulib/GLModuleSystem.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9e94583721..2b633d174a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024-04-06 Collin Funk + + gnulib-tool.py: Don't allow path normalization to delete a variable. + * pygnulib/GLModuleSystem.py + (GLModule.getAutomakeSnippet_Unconditional): Use os.path.join() on the + Makefile variable so it isn't deleted by a following '..' from + os.path.norm(). + 2024-04-06 Collin Funk gnulib-tool.py: Use auxdir as given by AC_CONFIG_AUX_DIR. diff --git a/pygnulib/GLModuleSystem.py b/pygnulib/GLModuleSystem.py index 98a21c4696..f8ff71383a 100644 --- a/pygnulib/GLModuleSystem.py +++ b/pygnulib/GLModuleSystem.py @@ -645,7 +645,7 @@ class GLModule: buildaux_files = filter_filelist(constants.NL, all_files, 'build-aux/', '', 'build-aux/', '') if buildaux_files != '': - buildaux_files = [ joinpath('$(top_srcdir)', auxdir, filename) + buildaux_files = [ os.path.join('$(top_srcdir)', joinpath(auxdir, filename)) for filename in buildaux_files.split(constants.NL) ] result += 'EXTRA_DIST += %s' % ' '.join(buildaux_files) result += '\n\n' -- 2.44.0