From 6e80675f9431fae04bd0d88fc27ac94018b7abb9 Mon Sep 17 00:00:00 2001
From: lcappelli <laura.cappelli@cnaf.infn.it>
Date: Thu, 23 Jun 2022 14:18:19 +0000
Subject: [PATCH] Bug Fix in devcontainer script

Specify the correct location of the nginx-httpg_no_delegation.patch file in the script for installing openresty-voms in the devcontainer
---
 .devcontainer/assets/build-install-openresty-voms.sh | 6 +++---
 .devcontainer/library-scripts/provide-user.sh        | 1 -
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/.devcontainer/assets/build-install-openresty-voms.sh b/.devcontainer/assets/build-install-openresty-voms.sh
index 334ba19..a1d25c6 100644
--- a/.devcontainer/assets/build-install-openresty-voms.sh
+++ b/.devcontainer/assets/build-install-openresty-voms.sh
@@ -102,8 +102,8 @@ if [ ! -d "${module_root}" ]; then
     exit 1
 fi
 
-if [ ! -f "./nginx-httpg_no_delegation.patch" ]; then
-    >&2 echo 'nginx-httpg_no_delegation.patch not found in current dir.'
+if [ ! -f "/workspaces/ngx_http_voms_module/nginx-httpg_no_delegation.patch" ]; then
+    >&2 echo "nginx-httpg_no_delegation.patch not found in ${module_root} dir."
     exit 1
 fi
 
@@ -126,7 +126,7 @@ cd ${openresty_root}
 
 nginx_version=$(find build -name nginx.h | xargs awk '/define NGINX_VERSION/ {print $3}' | tr -d '"')
 cd build/nginx-${nginx_version}
-patch -p1 < nginx-httpg_no_delegation.patch
+patch -p1 < ${module_root}/nginx-httpg_no_delegation.patch
 cd -
 
 make -j $(nproc)
diff --git a/.devcontainer/library-scripts/provide-user.sh b/.devcontainer/library-scripts/provide-user.sh
index d766d61..27248ae 100644
--- a/.devcontainer/library-scripts/provide-user.sh
+++ b/.devcontainer/library-scripts/provide-user.sh
@@ -63,7 +63,6 @@ if [ -n "\${PS1}" ]; then
     echo
     echo "To build and install openresty with the ngx_http_voms_module run"
     echo "    sh build-install-openresty-voms.sh"
-    echo "The file 'nginx-httpg_no_delegation.patch' is needed in the directory where the user runs the script"
     echo
 fi
 EOF
-- 
GitLab