mirror of
https://github.com/pissnet/pissircd.git
synced 2025-08-13 13:41:37 +01:00
Fix "./unrealircd upgrade" (and ./Config -quick) problem with local-curl.
First, what we call local-curl is a situation where the system does not have the cURL library installed and UnrealIRCd offers to compile and use it. The problem is that CURLDIR in config.settings may refer to an old directory such as /home/xyz/unrealircd-5.2.1/extras/curl and UnrealIRCd 6 would try to use it. That would be problematic as it would result in: 1) no cURL updates anymore since it is only half-detected as local-curl, and 2) once you remove the unrealircd-5.2.1 directory (since you are on U6) it breaks as well. So, we now check for this situation and in case of something that looks like a local-curl situation, change the path to <currentunreal>/extras/curl and download and compile cURL fresh, as expected. All this is only for the like 1% users that uses local-curl, which then used ./unrealircd upgrade or ./Config -quick. Reported by CrazyCat on the forums.
This commit is contained in:
parent
73be662db2
commit
c5cb19dc5d
1 changed files with 12 additions and 4 deletions
16
Config
16
Config
|
@ -50,6 +50,18 @@ ARG="$ARG--enable-ssl "
|
|||
else
|
||||
ARG="$ARG--enable-ssl=$SSLDIR "
|
||||
fi
|
||||
# Ensure we install curl even if someone does ./Config -quick...
|
||||
if [ "x$CURLDIR" = "x$UNREALCWD/extras/curl" ]; then
|
||||
INSTALLCURL=1
|
||||
else
|
||||
# And that the path does not refer to eg an old unrealircd-1.2.3 either ;)
|
||||
if echo "$CURLDIR"|egrep -qi extras.*curl; then
|
||||
echo "WARNING: Potentially old cURL directory encountered ($CURLDIR)."
|
||||
echo "I am changing the cURL directory to $UNREALCWD/extras/curl and forcing a rebuild of cURL."
|
||||
CURLDIR="$UNREALCWD/extras/curl"
|
||||
INSTALLCURL=1
|
||||
fi
|
||||
fi
|
||||
if [ "$REMOTEINC" = "1" ] ; then
|
||||
ARG="$ARG--enable-libcurl=$CURLDIR "
|
||||
fi
|
||||
|
@ -84,10 +96,6 @@ ARG="$ARG $EXTRAPARA "
|
|||
CONF="./configure $ARG"
|
||||
# remove possibly old instances of curl in ~/unrealircd/lib/
|
||||
rm -f $PRIVATELIBDIR/*curl* 1>/dev/null 2>&1
|
||||
# Ensure we install curl even if someone does ./Config -quick...
|
||||
if [ "x$CURLDIR" = "x$UNREALCWD/extras/curl" ]; then
|
||||
INSTALLCURL=1
|
||||
fi
|
||||
if [ "x$INSTALLCURL" = "x1" ]; then
|
||||
extras/curlinstall "$PRIVATELIBDIR" || exit 1
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue