[COMMITTED] Fix binutils/gdb snapshot builds after src-release sanity check update

Message ID 20240604212857.308961-1-mark@klomp.org
State New
Headers
Series [COMMITTED] Fix binutils/gdb snapshot builds after src-release sanity check update |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 fail Patch failed to apply

Commit Message

Mark Wielaard June 4, 2024, 9:28 p.m. UTC
  We need to make a "fake" commit with the snapshot version change so
the src-release sanity check doesn't trigger for uncommitted changes.
---
 builder/master.cfg | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
  

Patch

diff --git a/builder/master.cfg b/builder/master.cfg
index 639730b5b12a..ba9aa14b0d4f 100644
--- a/builder/master.cfg
+++ b/builder/master.cfg
@@ -2871,12 +2871,19 @@  binutils_make_clean_step = steps.ShellCommand(
 # Sets version in two places, the bfd/version.m4 and the configure
 # script. We don't regenerate configure, but just replace one line,
 # the bfd/configure --version output, which is used in src-release.sh
-# to determine the directory/tar name.
+# to determine the directory/tar name. We need to make a "fake" commit
+# with this change so the src-release sanity check doesn't trigger for
+# uncommitted changes.
 binutils_step_setversion = steps.ShellCommand(
         workdir='binutils-gdb',
         name="set bfd version",
         command='sed -i "s/\\[BFD_VERSION\\], \\[\\([0-9\\\\.]\\+\\)\\]/\\[BFD_VERSION\\], [\\1-$(git rev-parse --short @)]/" bfd/version.m4;'
-        + 'sed -i "s/^bfd configure \\([0-9\\\\.]\\+\\)$/bfd configure \\1-$(git rev-parse --short @)/" bfd/configure')
+        + 'sed -i "s/^bfd configure \\([0-9\\\\.]\\+\\)$/bfd configure \\1-$(git rev-parse --short @)/" bfd/configure;'
+        + 'git commit -a -m "$(bfd/configure --version | head -1 | cut -f3 -d\\ )"',
+        env={'GIT_AUTHOR_NAME': 'snapshot builder',
+             'GIT_AUTHOR_EMAIL': '',
+             'GIT_COMMITTER_NAME': 'snapshot builder',
+             'GIT_COMMITTER_EMAIL': ''})
 binutils_step_src_release = steps.ShellCommand(
         workdir='binutils-gdb',
         name="src-release",
@@ -3231,7 +3238,12 @@  def make_gdb_check_step(runtestflags = None):
 gdb_step_setversion = steps.ShellCommand(
         workdir='binutils-gdb',
         name="set gdb version",
-        command='sed -i -e "s/DATE/$(date -u +%Y%m%d)/;s/git/$(git rev-parse --short @)/" gdb/version.in')
+        command='sed -i -e "s/DATE/$(date -u +%Y%m%d)/;s/git/$(git rev-parse --short @)/" gdb/version.in;'
+        + 'git commit -m "$(cat gdb/version.in)" gdb/version.in',
+        env={'GIT_AUTHOR_NAME': 'snapshot builder',
+             'GIT_AUTHOR_EMAIL': '',
+             'GIT_COMMITTER_NAME': 'snapshot builder',
+             'GIT_COMMITTER_EMAIL': ''})
 gdb_step_src_release = steps.ShellCommand(
         workdir='binutils-gdb',
         name="src-release",