]>
Commit | Line | Data |
---|---|---|
365b751e | 1 | #!/bin/sh |
2 | set -e # exit on any error | |
365b751e | 3 | GLOBUS_LOCATION=$_CONDOR_SCRATCH_DIR/globus |
753b352b | 4 | ZLIB_LOCATION=$_CONDOR_SCRATCH_DIR/zlib |
365b751e | 5 | LOGNAME=$USER |
6 | X509_CERT_DIR=$GLOBUS_LOCATION/share/certificates | |
7 | export GLOBUS_LOCATION LOGNAME X509_CERT_DIR | |
8 | ( | |
e4500fc3 | 9 | if test -n "${_NMI_PREREQ_openssl_0_9_8k_shared_ROOT}"; then |
10 | PKG_CONFIG_PATH="${_NMI_PREREQ_openssl_0_9_8k_shared_ROOT}/lib/pkgconfig" | |
11 | OPENSSL_CFLAGS="-I${_NMI_PREREQ_openssl_0_9_8k_shared_ROOT}/include" | |
12 | OPENSSL_INCLUDES="-I${_NMI_PREREQ_openssl_0_9_8k_shared_ROOT}/include" | |
13 | OPENSSL_LDFLAGS="-L${_NMI_PREREQ_openssl_0_9_8k_shared_ROOT}/lib" | |
14 | OPENSSL_LIBS="-lssl -lcrypto" | |
15 | export PKG_CONFIG_PATH | |
16 | export OPENSSL_CFLAGS OPENSSL_INCLUDES OPENSSL_LDFLAGS OPENSSL_LIBS | |
17 | elif test -n "${_NMI_PREREQ_openssl_0_9_8e_shared_ROOT}"; then | |
ba95588b | 18 | PKG_CONFIG_PATH="${_NMI_PREREQ_openssl_0_9_8e_shared_ROOT}/lib/pkgconfig" |
19 | OPENSSL_CFLAGS="-I${_NMI_PREREQ_openssl_0_9_8e_shared_ROOT}/include" | |
20 | OPENSSL_INCLUDES="-I${_NMI_PREREQ_openssl_0_9_8e_shared_ROOT}/include" | |
21 | OPENSSL_LDFLAGS="-L${_NMI_PREREQ_openssl_0_9_8e_shared_ROOT}/lib" | |
22 | OPENSSL_LIBS="-lssl -lcrypto" | |
23 | export PKG_CONFIG_PATH | |
24 | export OPENSSL_CFLAGS OPENSSL_INCLUDES OPENSSL_LDFLAGS OPENSSL_LIBS | |
25 | elif test -n "${_NMI_PREREQ_openssl_0_9_7_shared_ROOT}"; then | |
26 | PKG_CONFIG_PATH="${_NMI_PREREQ_openssl_0_9_7_shared_ROOT}/lib/pkgconfig" | |
27 | OPENSSL_CFLAGS="-I${_NMI_PREREQ_openssl_0_9_7_shared_ROOT}/include" | |
28 | OPENSSL_INCLUDES="-I${_NMI_PREREQ_openssl_0_9_7_shared_ROOT}/include" | |
29 | OPENSSL_LDFLAGS="-L${_NMI_PREREQ_openssl_0_9_7_shared_ROOT}/lib" | |
30 | OPENSSL_LIBS="-lssl -lcrypto" | |
31 | export PKG_CONFIG_PATH | |
32 | export OPENSSL_CFLAGS OPENSSL_INCLUDES OPENSSL_LDFLAGS OPENSSL_LIBS | |
33 | fi | |
34 | if test -n "${LD_LIBRARY_PATH}" -a -z "${LIBPATH}"; then | |
35 | LIBPATH=$LD_LIBRARY_PATH | |
36 | export LIBPATH | |
37 | fi | |
365b751e | 38 | echo ================================================== |
39 | echo Environment variables: | |
40 | env | |
41 | echo ================================================== | |
42 | echo Directory contents: | |
43 | ls -Rl | |
44 | echo ================================================== | |
9de400ec | 45 | if test -d /prereq/zlib-1.2.3; then |
46 | ZLIB_LOCATION=/prereq/zlib-1.2.3 | |
47 | echo zlib found in $ZLIB_LOCATION | |
48 | else | |
49 | echo Building zlib-1.2.3... | |
50 | cd zlib-1.2.3 | |
51 | ./configure --prefix=$ZLIB_LOCATION | |
52 | make | |
53 | make install | |
54 | cd .. | |
55 | fi | |
791bf08c | 56 | for installer in `ls gt*-all-source-installer.tar.gz *nightly.tar.gz`; do |
67b4c7ad | 57 | echo ================================================== |
791bf08c | 58 | echo Installing Globus Toolkit \($installer\)... |
59 | tar xfz $installer | |
60 | cd gt*-installer | |
61 | ./configure --prefix=$GLOBUS_LOCATION --with-buildopts="-verbose" \ | |
62 | --with-gsiopensshargs="--with-zlib=$ZLIB_LOCATION" | |
3d61c531 | 63 | make globus_usage gsi-openssh install |
791bf08c | 64 | . $GLOBUS_LOCATION/etc/globus-user-env.sh |
67b4c7ad | 65 | cd .. |
66 | echo ================================================== | |
791bf08c | 67 | echo Environment variables: |
68 | env | |
69 | echo ================================================== | |
70 | GLOBUS_FLAVOR_NAME=`gpt-query -name=gsi_openssh | perl -n -e 'if (/gsi_openssh-(.*)-pgm/){print "$1\n";}'|head -1` | |
71 | export GLOBUS_FLAVOR_NAME | |
72 | echo GPT GLOBUS_FLAVOR_NAME is $GLOBUS_FLAVOR_NAME. | |
73 | if test -f gsi_openssh_bundle-*.tar.gz; then | |
74 | echo ================================================== | |
75 | echo Building GSI-OpenSSH GPT bundle... | |
5a591e4f | 76 | rm -rf BUILD |
791bf08c | 77 | gpt-build -force -verbose gsi_openssh_bundle-*.tar.gz $GLOBUS_FLAVOR_NAME \ |
bf43e758 | 78 | GSI_OPENSSH_GPTMACRO="--with-zlib=$ZLIB_LOCATION" |
bf43e758 | 79 | fi |
791bf08c | 80 | if test -d gssapi-openssh/openssh; then |
4d997295 | 81 | echo ================================================== |
791bf08c | 82 | echo Installing autotools... |
83 | cd autotools | |
84 | ./install-autotools $GLOBUS_LOCATION | |
4d997295 | 85 | cd .. |
86 | echo ================================================== | |
5a591e4f | 87 | cd gssapi-openssh |
88 | cp -r openssh openssh.build | |
89 | cd openssh.build | |
791bf08c | 90 | if test -f make_gpt_dist; then |
91 | echo Building GSI-OpenSSH GPT package from CVS... | |
19ba7c71 | 92 | rm -f gsi_openssh-*.tar.gz |
791bf08c | 93 | ./make_gpt_dist |
94 | gpt-build -force -verbose gsi_openssh-*.tar.gz $GLOBUS_FLAVOR_NAME \ | |
95 | GSI_OPENSSH_GPTMACRO="--with-zlib=$ZLIB_LOCATION" | |
96 | else | |
97 | echo Building GSI-OpenSSH from CVS trunk... | |
98 | autoreconf | |
99 | ./configure --prefix=$GLOBUS_LOCATION \ | |
100 | --with-globus-flavor=$GLOBUS_FLAVOR_NAME \ | |
101 | --with-zlib=$ZLIB_LOCATION \ | |
102 | --with-privsep-user=$USER --with-privsep-path=$GLOBUS_LOCATION/var/empty | |
103 | make install-nokeys # nonroot | |
4d997295 | 104 | fi |
5a591e4f | 105 | cd .. |
106 | rm -rf openssh.build | |
107 | cd .. | |
791bf08c | 108 | fi |
109 | rm -rf gt*-installer $GLOBUS_LOCATION | |
110 | done | |
365b751e | 111 | ) 2>&1 # we want stdout & stderr mixed in the output file |