From b7a0847f6d5125985be2760a57efbf54c8dae7d6 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Thu, 8 Jun 2023 15:31:54 +0200 Subject: [PATCH] copy-patches.sh: sync with libguestfs dist-git @ 4a6d9a7c7447 (Nothing to do with RHBZ#2209280, but the bots don't let us commit maintenance-only patches to dist-git, IIRC.) One difference where we diverge from "copy-patches.sh" in libguestfs dist-git is the "core.abbrev" setting. In order to minimize the churn for patches backported earlier, I'm keeping the 9 nibbles that those patches were formatted with. Noteworthy is also the fact that we can't really undo a "--no-signature" setting. I have that in my local environment, and I can't undo it on the git-format-patch command line. "--signature" requires an argument; there doesn't seem to be a way to use a "default" argument (which would mean the git version number). As a result, I'm just sticking with "--no-signature" explicitly (matching both my local env and libguestfs dist-git); thus, the "signature block" on previously backported patches will soon disappear. resolves: rhbz#2209280 Signed-off-by: Laszlo Ersek --- copy-patches.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/copy-patches.sh b/copy-patches.sh index e718c54..b596395 100755 --- a/copy-patches.sh +++ b/copy-patches.sh @@ -17,7 +17,7 @@ fi case `id -un` in rjones) git_checkout=$HOME/d/$project-rhel-$rhel_version ;; - lersek) git_checkout=$HOME/src/guestfs-tools/$project ;; + lacos) git_checkout=$HOME/src/v2v/$project ;; *) git_checkout=$HOME/d/$project-rhel-$rhel_version ;; esac if [ ! -d $git_checkout ]; then @@ -36,7 +36,12 @@ git rm -f [0-9]*.patch ||: rm -f [0-9]*.patch # Get the patches. -(cd $git_checkout; rm -f [0-9]*.patch; git format-patch -N --submodule=diff $tag) +( + cd $git_checkout + rm -f [0-9]*.patch + git -c core.abbrev=9 format-patch -O/dev/null --subject-prefix=PATCH -N \ + --submodule=diff --no-signature --patience $tag +) mv $git_checkout/[0-9]*.patch . # Remove any not to be applied.