1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-16 12:23:59 +02:00
openwrt-packages/net/haproxy/get-latest-patches.sh
Christian Lachner 76cb3f09fd haproxy: Update HAProxy to v2.4.4
- This update fixes CVE-2021-40346; see: https://jfrog.com/blog/critical-vulnerability-in-haproxy-cve-2021-40346-integer-overflow-enables-http-smuggling/
- Update haproxy download URL and hash
- Make use of $(AUTORELEASE) for PKG_RELEASE

Signed-off-by: Christian Lachner <gladiac@gmail.com>
2021-09-08 07:32:53 -07:00

28 lines
751 B
Bash
Executable File

#!/bin/sh
CLONEURL=https://git.haproxy.org/git/haproxy-2.4.git
BASE_TAG=v2.4.4
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"