Skip to content

Commit 9968fcc

Browse files
committed
Fixed haproxytech#9 : The master branch of the luaossl library has an issue that makes it not work on CentOS 8. I have pinned the version we install to 'rel-20181207', which is older, but works. I am also cleaning up zip files after we no longer need them.
1 parent d1b9268 commit 9968fcc

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

install.sh

+13-10
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ display_working() {
3535
download_haproxy_rhel() {
3636
printf "\r[+] Downloading HAProxy\n"
3737
curl -sLO https://www.haproxy.org/download/1.9/src/haproxy-$HAPROXY_VERSION.tar.gz
38-
tar xf haproxy-$HAPROXY_VERSION.tar.gz
38+
tar xf haproxy-$HAPROXY_VERSION.tar.gz && rm haproxy-$HAPROXY_VERSION.tar.gz
3939
}
4040

4141
download_rhel_lua() {
4242
printf "\r[+] Downloading Lua\n"
4343
curl -sLO https://www.lua.org/ftp/lua-$LUA_VERSION.tar.gz
44-
tar xf lua-$LUA_VERSION.tar.gz
44+
tar xf lua-$LUA_VERSION.tar.gz && rm lua-$LUA_VERSION.tar.gz
4545
}
4646

4747
install_yum_deps() {
@@ -105,19 +105,22 @@ download_luajwt() {
105105
printf "\r[+] Downloading haproxy-lua-jwt\n"
106106
cd $SOURCE_DIR
107107
curl -sLO https://github.com/haproxytech/haproxy-lua-jwt/archive/master.zip
108-
unzip -qo master.zip
108+
unzip -qo master.zip && rm master.zip
109109
}
110110

111111
download_luajwt_deps() {
112112
printf "\r[+] Downloading haproxy-lua-jwt dependencies\n"
113113
cd $SOURCE_DIR
114114
apt-get install -y unzip >/dev/null 2>&1
115+
115116
curl -sLO https://github.com/diegonehab/luasocket/archive/master.zip
116-
unzip -qo master.zip
117+
unzip -qo master.zip && mv luasocket-master luasocket && rm master.zip
118+
117119
curl -sLO https://github.com/rxi/json.lua/archive/master.zip
118-
unzip -qo master.zip
119-
curl -sLO https://github.com/wahern/luaossl/archive/master.zip
120-
unzip -qo master.zip
120+
unzip -qo master.zip && mv json.lua-master json && rm master.zip
121+
122+
curl -sLO https://github.com/wahern/luaossl/archive/rel-20181207.zip
123+
unzip -qo rel-20181207.zip && mv luaossl-rel-20181207 luaossl && rm rel-20181207.zip
121124
}
122125

123126
install_luajwt() {
@@ -131,13 +134,13 @@ install_luajwt() {
131134
install_luajwt_deps() {
132135
printf "\r[+] Installing haproxy-lua-jwt dependencies\n"
133136
cd $SOURCE_DIR
134-
cd luasocket-master/
137+
cd luasocket/
135138
make clean all install-both LUAINC=/usr/include/lua5.3/ >/dev/null
136139
cd ..
137-
cd luaossl-master/
140+
cd luaossl/
138141
make install >/dev/null
139142
cd ..
140-
mv json.lua-master/json.lua $lua_dep_dir
143+
mv json/json.lua $lua_dep_dir
141144
}
142145

143146
case $1 in

0 commit comments

Comments
 (0)