99c8749f70
(cherry picked from commit2821511444
) Require openssh-clients scp >= 8.7p1 See: https://bugzilla.redhat.com/show_bug.cgi?id=2027673e2af12ba69
(cherry picked from commitd58960176f
) Fix previous commit Apparently versioned filenames are not allowed: error: line 121: Versioned file name not permitted: Requires: /usr/bin/scp >= 8.7p1 (cherry picked from commitdf4a127b93
) resolves: rhbz#2011713, rhbz#1961107, rhbz#2027673
61 lines
1.4 KiB
Bash
Executable File
61 lines
1.4 KiB
Bash
Executable File
#!/bin/bash -
|
|
|
|
set -e
|
|
|
|
# Maintainer script to copy patches from the git repo to the current
|
|
# directory. Use it like this:
|
|
# ./copy-patches.sh
|
|
|
|
project=virt-v2v
|
|
rhel_version=9.0.0
|
|
|
|
# Check we're in the right directory.
|
|
if [ ! -f $project.spec ]; then
|
|
echo "$0: run this from the directory containing '$project.spec'"
|
|
exit 1
|
|
fi
|
|
|
|
case `id -un` in
|
|
rjones) git_checkout=$HOME/d/$project-rhel-$rhel_version ;;
|
|
lersek) git_checkout=$HOME/src/v2v/$project ;;
|
|
*) git_checkout=$HOME/d/$project-rhel-$rhel_version ;;
|
|
esac
|
|
if [ ! -d $git_checkout ]; then
|
|
echo "$0: $git_checkout does not exist"
|
|
echo "This script is only for use by the maintainer when preparing a"
|
|
echo "$project release on RHEL."
|
|
exit 1
|
|
fi
|
|
|
|
# Get the base version of the project.
|
|
version=`grep '^Version:' $project.spec | awk '{print $2}'`
|
|
tag="v$version"
|
|
|
|
# Remove any existing patches.
|
|
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)
|
|
mv $git_checkout/[0-9]*.patch .
|
|
|
|
# Remove any not to be applied.
|
|
rm -f *NOT-FOR-RPM*.patch
|
|
|
|
# Add the patches.
|
|
git add [0-9]*.patch
|
|
|
|
# Print out the patch lines.
|
|
echo
|
|
echo "--- Copy the following text into $project.spec file"
|
|
echo
|
|
|
|
echo "# Patches."
|
|
for f in [0-9]*.patch; do
|
|
n=`echo $f | awk -F- '{print $1}'`
|
|
echo "Patch$n: $f"
|
|
done
|
|
|
|
echo
|
|
echo "--- End of text"
|