[tacacs]: use stg to apply patch

Signed-off-by: Guohan Lu <lguohan@gmail.com>
This commit is contained in:
Guohan Lu 2021-02-05 20:52:10 -08:00
parent b4fc842b70
commit 87ecaebafc
9 changed files with 10 additions and 14 deletions

View File

@ -4,27 +4,16 @@ SHELL = /bin/bash
MAIN_TARGET = libnss-tacplus_$(NSS_TACPLUS_VERSION)_$(CONFIGURED_ARCH).deb
GIT_APPLY = am
ifneq (,$(filter $(CONFIGURED_ARCH), armhf arm64))
# Workaround git am issue "Out of memory getdelim failed"
GIT_APPLY = apply
endif
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Obtain libnss-tacplus
rm -rf ./libnss-tacplus
git clone https://github.com/daveolson53/libnss-tacplus.git
pushd ./libnss-tacplus
git checkout -f 19008ab
git checkout -b test -f 19008ab
# Apply patch
git $(GIT_APPLY) ../0001-Modify-user-map-profile.patch
git $(GIT_APPLY) ../0002-Enable-modifying-local-user-permission.patch
git $(GIT_APPLY) ../0003-management-vrf-support.patch
git $(GIT_APPLY) ../0004-Skip-accessing-tacacs-servers-for-local-non-tacacs-u.patch
git $(GIT_APPLY) ../0005-libnss-Modify-parsing-of-IP-addr-and-port-number-str.patch
git $(GIT_APPLY) ../0006-fix-compiling-warning-about-token-dereference.patch
git $(GIT_APPLY) ../0007-Add-support-for-TACACS-source-address.patch
stg init
stg import -s ../patch/series
dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR)
popd

View File

@ -0,0 +1,7 @@
0001-Modify-user-map-profile.patch
0002-Enable-modifying-local-user-permission.patch
0003-management-vrf-support.patch
0004-Skip-accessing-tacacs-servers-for-local-non-tacacs-u.patch
0005-libnss-Modify-parsing-of-IP-addr-and-port-number-str.patch
0006-fix-compiling-warning-about-token-dereference.patch
0007-Add-support-for-TACACS-source-address.patch