1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-15 03:43:53 +02:00
openwrt-packages/net/haproxy/get-latest-patches.sh
Christian Lachner 8fac9fc114 haproxy: update to v2.2.29
- Update haproxy download URL and hash
- This release fixes a critial flaw known as CVE-2023-25725. See:
  http://git.haproxy.org/?p=haproxy-2.2.git;a=commit;h=4a4c90c2b04444d92c58873cfb19052f20280bc2

Signed-off-by: Christian Lachner <gladiac@gmail.com>
2023-03-08 20:38:07 +08:00

28 lines
752 B
Bash
Executable File

#!/bin/sh
CLONEURL=https://git.haproxy.org/git/haproxy-2.2.git
BASE_TAG=v2.2.29
TMP_REPODIR=tmprepo
PATCHESDIR=patches
if test -d "${TMP_REPODIR}"; then rm -rf "${TMP_REPODIR}"; fi
git clone "${CLONEURL}" "${TMP_REPODIR}"
printf "Cleaning patches\n"
find ${PATCHESDIR} -type f -name "*.patch" -exec rm -f "{}" \;
i=0
for cid in $(git -C "${TMP_REPODIR}" rev-list ${BASE_TAG}..HEAD | tac); do
filename="$(printf "%03d" $i)-$(git -C "${TMP_REPODIR}" log --format=%s -n 1 "$cid" | sed -e"s/[()']//g" -e's/[^_a-zA-Z0-9+-]\+/-/g' -e's/-$//').patch"
printf "Creating %s\n" "${filename}"
git -C "${TMP_REPODIR}" show "$cid" > "${PATCHESDIR}/$filename"
git add "${PATCHESDIR}/$filename"
i=$((i+1))
done
rm -rf "${TMP_REPODIR}"
printf "finished\n"