From: Collin Funk Date: Sat, 6 Apr 2024 13:04:52 +0000 (-0700) Subject: gnulib-tool.py: Don't allow path normalization to delete a variable. X-Git-Tag: v1.0~153 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=2c49dc450543fcf61a380fc62b494367dee274e1;p=gnulib.git 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(). --- diff --git a/ChangeLog b/ChangeLog index 197b2fae76..201eafa9b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024-04-07 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-07 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'