From 819d7b50a98a74c8892c5a2282e349a2c07949c5 Mon Sep 17 00:00:00 2001 From: Guohan Lu Date: Fri, 5 Feb 2021 20:52:10 -0800 Subject: [PATCH] [tacacs]: use stg to apply patch Signed-off-by: Guohan Lu --- src/tacacs/nss/Makefile | 17 +++-------------- .../0001-Modify-user-map-profile.patch | 0 ...Enable-modifying-local-user-permission.patch | 0 .../0003-management-vrf-support.patch | 0 ...-tacacs-servers-for-local-non-tacacs-u.patch | 0 ...parsing-of-IP-addr-and-port-number-str.patch | 0 ...piling-warning-about-token-dereference.patch | 0 ...-Add-support-for-TACACS-source-address.patch | 0 src/tacacs/nss/patch/series | 7 +++++++ 9 files changed, 10 insertions(+), 14 deletions(-) rename src/tacacs/nss/{ => patch}/0001-Modify-user-map-profile.patch (100%) rename src/tacacs/nss/{ => patch}/0002-Enable-modifying-local-user-permission.patch (100%) rename src/tacacs/nss/{ => patch}/0003-management-vrf-support.patch (100%) rename src/tacacs/nss/{ => patch}/0004-Skip-accessing-tacacs-servers-for-local-non-tacacs-u.patch (100%) rename src/tacacs/nss/{ => patch}/0005-libnss-Modify-parsing-of-IP-addr-and-port-number-str.patch (100%) rename src/tacacs/nss/{ => patch}/0006-fix-compiling-warning-about-token-dereference.patch (100%) rename src/tacacs/nss/{ => patch}/0007-Add-support-for-TACACS-source-address.patch (100%) create mode 100644 src/tacacs/nss/patch/series diff --git a/src/tacacs/nss/Makefile b/src/tacacs/nss/Makefile index 5fafd93b87..0c8f25f44e 100644 --- a/src/tacacs/nss/Makefile +++ b/src/tacacs/nss/Makefile @@ -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 diff --git a/src/tacacs/nss/0001-Modify-user-map-profile.patch b/src/tacacs/nss/patch/0001-Modify-user-map-profile.patch similarity index 100% rename from src/tacacs/nss/0001-Modify-user-map-profile.patch rename to src/tacacs/nss/patch/0001-Modify-user-map-profile.patch diff --git a/src/tacacs/nss/0002-Enable-modifying-local-user-permission.patch b/src/tacacs/nss/patch/0002-Enable-modifying-local-user-permission.patch similarity index 100% rename from src/tacacs/nss/0002-Enable-modifying-local-user-permission.patch rename to src/tacacs/nss/patch/0002-Enable-modifying-local-user-permission.patch diff --git a/src/tacacs/nss/0003-management-vrf-support.patch b/src/tacacs/nss/patch/0003-management-vrf-support.patch similarity index 100% rename from src/tacacs/nss/0003-management-vrf-support.patch rename to src/tacacs/nss/patch/0003-management-vrf-support.patch diff --git a/src/tacacs/nss/0004-Skip-accessing-tacacs-servers-for-local-non-tacacs-u.patch b/src/tacacs/nss/patch/0004-Skip-accessing-tacacs-servers-for-local-non-tacacs-u.patch similarity index 100% rename from src/tacacs/nss/0004-Skip-accessing-tacacs-servers-for-local-non-tacacs-u.patch rename to src/tacacs/nss/patch/0004-Skip-accessing-tacacs-servers-for-local-non-tacacs-u.patch diff --git a/src/tacacs/nss/0005-libnss-Modify-parsing-of-IP-addr-and-port-number-str.patch b/src/tacacs/nss/patch/0005-libnss-Modify-parsing-of-IP-addr-and-port-number-str.patch similarity index 100% rename from src/tacacs/nss/0005-libnss-Modify-parsing-of-IP-addr-and-port-number-str.patch rename to src/tacacs/nss/patch/0005-libnss-Modify-parsing-of-IP-addr-and-port-number-str.patch diff --git a/src/tacacs/nss/0006-fix-compiling-warning-about-token-dereference.patch b/src/tacacs/nss/patch/0006-fix-compiling-warning-about-token-dereference.patch similarity index 100% rename from src/tacacs/nss/0006-fix-compiling-warning-about-token-dereference.patch rename to src/tacacs/nss/patch/0006-fix-compiling-warning-about-token-dereference.patch diff --git a/src/tacacs/nss/0007-Add-support-for-TACACS-source-address.patch b/src/tacacs/nss/patch/0007-Add-support-for-TACACS-source-address.patch similarity index 100% rename from src/tacacs/nss/0007-Add-support-for-TACACS-source-address.patch rename to src/tacacs/nss/patch/0007-Add-support-for-TACACS-source-address.patch diff --git a/src/tacacs/nss/patch/series b/src/tacacs/nss/patch/series new file mode 100644 index 0000000000..51a87171fb --- /dev/null +++ b/src/tacacs/nss/patch/series @@ -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