Skip to content

Commit

Permalink
[tacacs]: use stg to apply patch
Browse files Browse the repository at this point in the history
Signed-off-by: Guohan Lu <[email protected]>
  • Loading branch information
lguohan committed Feb 6, 2021
1 parent b4fc842 commit 87ecaeb
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 14 deletions.
17 changes: 3 additions & 14 deletions src/tacacs/nss/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions src/tacacs/nss/patch/series
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 87ecaeb

Please sign in to comment.