From 65f32962f1c7ba102674fdad59d3c9c68ec37dc2 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 28 Jun 2020 11:16:46 +0200 Subject: T2638: frr: use "git am" to apply patches --- packages/frr/build-frr.sh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'packages/frr/build-frr.sh') diff --git a/packages/frr/build-frr.sh b/packages/frr/build-frr.sh index 59134832..477c41e3 100755 --- a/packages/frr/build-frr.sh +++ b/packages/frr/build-frr.sh @@ -17,19 +17,15 @@ cd ${FRR_SRC} PATCH_DIR=${CWD}/patches +echo "I: Apply FRRouting patches not in main repository:" for patch in $(ls ${PATCH_DIR}) do - echo "I: Apply FRR patch: ${PATCH_DIR}/${patch}" - patch -p1 < ${PATCH_DIR}/${patch} - git add $(lsdiff ${PATCH_DIR}/${patch} | sed -e 's#^[ab]/##') if [ -z "$(git config --list | grep -e user.name -e user.email)" ]; then - # if git user.name and user.email is not set, -c sets temorary user.name and - # user.email variables as these is not set in the build container by default. - git -c user.name="VyOS CI" -c user.email="ci@vyos.io" commit -m "Applied patch: ${patch}" --author "VyOS CI " - else - git commit -m "Applied patch: ${patch}" --author "VyOS CI " + # if git user.name and user.email is not set, -c sets temorary user.name and + # user.email variables as these is not set in the build container by default. + OPTS="-c user.name=VyOS-CI -c user.email=maintainers@vyos.io" fi - + git $OPTS am ${PATCH_DIR}/${patch} done # Prepare FRR source for building -- cgit v1.2.3