summaryrefslogtreecommitdiff
path: root/new/scripts
diff options
context:
space:
mode:
authordd <dd@wx.tnyzeq.icu>2024-10-10 18:00:00 +0200
committerdd <dd@wx.tnyzeq.icu>2024-10-10 18:00:00 +0200
commitfb39083b74d2b2a5b4c330c7223031d00c9e289e (patch)
treead8a252af1cb0685ddba3921583b5e3416875018 /new/scripts
parenta0190970a32fb3ab7d41af6cde9d179a03072f87 (diff)
downloadvyos-jenkins-fb39083b74d2b2a5b4c330c7223031d00c9e289e.tar.gz
vyos-jenkins-fb39083b74d2b2a5b4c330c7223031d00c9e289e.zip
added libnss-tacplus workaround for circinus
Diffstat (limited to 'new/scripts')
-rwxr-xr-xnew/scripts/build_py.sh11
-rwxr-xr-xnew/scripts/pam_tacplus.sh40
2 files changed, 51 insertions, 0 deletions
diff --git a/new/scripts/build_py.sh b/new/scripts/build_py.sh
new file mode 100755
index 0000000..c8819bf
--- /dev/null
+++ b/new/scripts/build_py.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+set -e
+package_name="$1"
+
+my_script="/my-build-scripts/$package_name.sh"
+if [ -f "$my_script" ]; then
+ $my_script
+else
+ # It's required to call python explicitly since some scripts don't have correct shebang.
+ python3 ./build.py
+fi
diff --git a/new/scripts/pam_tacplus.sh b/new/scripts/pam_tacplus.sh
new file mode 100755
index 0000000..88a6a76
--- /dev/null
+++ b/new/scripts/pam_tacplus.sh
@@ -0,0 +1,40 @@
+#!/usr/bin/env bash
+set -e
+
+# build libpam-tacplus
+python3 ./build.py
+
+# The libnss-tacplus is missing right now, so we put it here.
+# There is a catch - the libnss-tacplus and libtacplus-map1 won't compile with the used libpam-tacplus 1.7.0.
+# Thus we need to temporarily build the libpam-tacplus 1.4.3, we use it for build and then throw it away.
+if [ ! -d libnss-tacplus ]; then
+ mkdir others && cd others
+
+ # build libtacplus-map
+ sudo apt-get install -y libaudit-dev
+ git clone https://github.com/vyos/libtacplus-map.git
+ cd libtacplus-map
+ git reset --hard fe47203
+ # Make it buildable for newer gcc version:
+ # https://stackoverflow.com/questions/47185819/building-debian-ubuntu-packages-with-old-gcc-cflag-adjustment
+ # map_tacplus_user.c:388:31: error: the comparison will always evaluate as 'true' for the address of 'tac_mappedname' will never be NULL [-Werror=address]
+ # man 1 dpkg-buildflags
+ export DEB_CFLAGS_APPEND="-Wno-address -Wno-stringop-truncation"
+ /my-build-scripts/generic-build-script.sh
+ cd .. && sudo dpkg -i *.deb
+
+ # build libnss-tacplus 1.4.3, install, throw away
+ mkdir temp && cd temp
+ git clone https://github.com/vyos/libpam-tacplus.git
+ cd libpam-tacplus
+ git reset --hard 0d38f9b
+ /my-build-scripts/generic-build-script.sh
+ cd .. && sudo dpkg -i *.deb
+ cd .. && sudo rm -rf temp
+
+ # build libnss-tacplus
+ git clone https://github.com/vyos/libnss-tacplus.git
+ cd libnss-tacplus
+ git reset --hard 049d284
+ /my-build-scripts/generic-build-script.sh
+fi