From fa145a94ab9b742f0c1e2d36e0c1aed195db3732 Mon Sep 17 00:00:00 2001 From: Emanuele Aina <emanuele.aina@collabora.com> Date: Mon, 15 Mar 2021 11:17:44 +0100 Subject: [PATCH] pkg-pull-updates: Avoid oversized commit messages `gbp import-dsc` puts all the new changelog entries in the commit message, generating big walls of text when, for instance, importing the version from Bullseye on top of the Buster one. GitLab then puts the whole log message in the `CI_COMMIT_MESSAGE` env var, which is passed on the docker command line, resulting in a error: standard_init_linux.go:219: exec user process caused: argument list too long See https://gitlab.com/gitlab-org/gitlab-runner/-/issues/26624#note_529234097 To avoid that, trim the message to only keep the first line. Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com> --- .../overlay/usr/bin/apertis-pkg-pull-updates | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/package-source-builder/overlay/usr/bin/apertis-pkg-pull-updates b/package-source-builder/overlay/usr/bin/apertis-pkg-pull-updates index 4c47139..d69809d 100755 --- a/package-source-builder/overlay/usr/bin/apertis-pkg-pull-updates +++ b/package-source-builder/overlay/usr/bin/apertis-pkg-pull-updates @@ -220,6 +220,16 @@ def import_sources(local_dsc, upstream_suite): ], env={'GBP_CONF_FILES': '/dev/null' }, # prevent the debian/gbp.conf in packages from interfering check=True) + # gbp puts all the new changelog entries in the commit message, generating + # big walls of text when, for instance, importing the version from bullseye + # on top of the buster one + # GitLab then puts the whole log message in the CI_COMMIT_MESSAGE env var, + # which is passed on the docker command line, resulting in a error: + # standard_init_linux.go:219: exec user process caused: argument list too long + # https://gitlab.com/gitlab-org/gitlab-runner/-/issues/26624#note_529234097 + # to avoid that, trim the message to only keep the first line + shortmessage = git("log", "--format=%s", "-n1") + git("commit", "--amend", f"--message={shortmessage}") def main(): parser = argparse.ArgumentParser(description='Pull updates from the upstream repositories') -- GitLab