/[pkg-mixmaster]/trunk/Mix/Install
ViewVC logotype

Diff of /trunk/Mix/Install

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1 by rabbi, Wed Oct 31 08:19:51 2001 UTC revision 379 by rabbi, Fri Oct 18 22:04:13 2002 UTC
# Line 6  Line 6 
6  # ANY KIND, either express or implied. See the file COPYRIGHT for  # ANY KIND, either express or implied. See the file COPYRIGHT for
7  # details.  # details.
8    
9  # $Id: Install,v 1.1 2001/10/31 08:19:52 rabbi Exp $  # $Id: Install,v 1.21 2002/10/18 22:04:13 rabbi Exp $
10    
11  #whereis program default-path  #whereis program default-path
12  whereis()  whereis()
# Line 127  findlib() Line 127  findlib()
127   then   then
128    echo "Found source directory $source."    echo "Found source directory $source."
129    if [ "$found" = "" ]    if [ "$found" = "" ]
130    then    then
131     ans=y     ans=y
132    else    else
133     echo "Use the source if the pre-installed library causes compilation problems."     echo "Use the source if the pre-installed library causes compilation problems."
# Line 263  if [ -f $MIXSRC/Makefile ] Line 263  if [ -f $MIXSRC/Makefile ]
263  then  then
264   if grep "#Makefile generated.*$HOSTNAME" $MIXSRC/Makefile   if grep "#Makefile generated.*$HOSTNAME" $MIXSRC/Makefile
265   then   then
266    echo "Found a Makefile."    echo "Found a Makefile for this system."
267      readln "Use this Makefile?" y
268      if [ "$ans" = n ]
269      then
270       rm -f $MIXSRC/Makefile
271      fi
272   else   else
273    readln "Remove old Makefile?" y    readln "Remove old Makefile?" y
274    if [ "$ans" = y ]    if [ "$ans" = y ]
# Line 307  then Line 312  then
312    if [ -f $MIXDEST/secring.mix ]    if [ -f $MIXDEST/secring.mix ]
313    then    then
314      remailer=y      remailer=y
315        if grep PASSPHRASE $MIXDEST/mix.cfg >/dev/null
316        then
317          PASSINCONFIG=1
318        fi
319    else    else
320      readln "Do you want to set up a remailer?" n      readln "Do you want to set up a remailer?" n
321      remailer=$ans      remailer=$ans
# Line 320  else Line 329  else
329    remailer=$ans    remailer=$ans
330  fi  fi
331    
332    
333    ans=""
334    if [ "$remailer" = "y" ]
335    then
336      ans="n"
337      if [ "$PASSINCONFIG" != 1 ]
338      then
339        echo ""
340        echo "You can either compile your secret passphrase into the binary
341    or you can set it in your config file. Note that the former does not
342    really increase security as the passphrase can still be discovered by
343    running something like »strings mix«."
344        echo ""
345        echo "Most users should answer »n« to this question:"
346        echo ""
347        readln "Do you want to compile the passphrase into the binary?" n
348      fi
349    
350      rm -f "$MIXSRC/mix.o" # make sure our new passphrase takes effect
351      if [ "$ans" = "y" ]
352      then
353        ans=""
354        echo "Please enter a passphrase for your remailer (must be the same
355    whenever you re-compile Mixmaster)."
356        read ans
357    
358        if [ "$ans" != "" ]
359        then
360          PASS="PASS=$ans"
361        else
362          echo "WARNING: not setting a passphrase"
363        fi
364      else
365        if [ "$PASSINCONFIG" != 1 ]
366        then
367          ans=""
368          echo "Please enter a passphrase for your remailer (it will be
369    stored in mix.cfg in clear)."
370          read ans
371    
372          if [ "$ans" = "" ]
373          then
374            echo "WARNING: setting empty passphrase"
375          fi
376          PASSPHRASE="PASSPHRASE    $ans"
377          if [ -f $MIXDEST/mix.cfg ]
378          then
379            echo "$PASSPHRASE" >> $MIXDEST/mix.cfg
380          fi
381        fi
382      fi
383    fi
384    
385    
386  cd $MIXSRC  cd $MIXSRC
387  if [ ! -f Makefile ]  if [ ! -f Makefile ]
388  then  then
# Line 328  then Line 391  then
391   DEF=   DEF=
392   LDFLAGS=   LDFLAGS=
393    
394     if [ ! -z "$PASS" ]
395     then
396       DEF="$DEF -DCOMPILEDPASS='\"\$(PASS)\"'"
397     fi
398    
399   if [ "$system" = msdos ]   if [ "$system" = msdos ]
400   then   then
401    readln "Use WIN32 GUI?" y    readln "Use WIN32 GUI?" y
# Line 351  then Line 419  then
419    readln "Continue anyway?" n    readln "Continue anyway?" n
420    if [ "$ans" = "n" ]    if [ "$ans" = "n" ]
421    then    then
422     echo "Please install zlib now."     echo "Please install zlib 1.1.4 or greater now."
423     exit 1     exit 1
424    fi    fi
425   else   else
# Line 381  then Line 449  then
449    fi    fi
450   fi   fi
451    
452   opensslinfo="Please get OpenSSL 0.9.4 from http://www.openssl.org/"   opensslinfo="Please get OpenSSL 0.9.6f or greater from http://www.openssl.org/"
453     opensslwarning="WARNING: This version of OpenSSL contains known vulnerabilities. Please upgrade to OpenSSL 0.9.6f or greater!"
454   LIBDIR=/usr/local/ssl/lib   LIBDIR=/usr/local/ssl/lib
455   INCDIR="/usr/include /usr/include/ssl /usr/lib/ssl/include /usr/local/ssl/include"   INCDIR="/usr/include /usr/include/ssl /usr/lib/ssl/include /usr/local/ssl/include"
456   SRCDIR="openssl*"   SRCDIR="openssl*"
457    
458     opensslwarn()
459     {
460     echo $opensslwarning
461      readln "Continue anyway?" y
462      if [ "$ans" = "n" ]
463      then
464       echo $opensslinfo
465       exit 1
466      fi
467     }
468    
469   if [ "$system" = win32 ]   if [ "$system" = win32 ]
470   then   then
471    findlib libeay32.a    findlib libeay32.a
# Line 418  then Line 498  then
498      version=920      version=920
499     fi     fi
500    fi    fi
501   fi   fi
502    
503   # Find the OpenSSL version header   # Find the OpenSSL version header
504   if [ -f $INCDIR/openssl/opensslv.h ]   if [ -f $INCDIR/openssl/opensslv.h ]
505   then   then
506    version=`grep 'SSL.*_VERSION_NUMBER.*0x' $INCDIR/openssl/opensslv.h | sed 's/.*0x0*//;s/[     ].*//;s/L$//'`    version=`grep 'SSL.*_VERSION_NUMBER.*0x' $INCDIR/openssl/opensslv.h | sed 's/.*0x0*//;s/[     ].*//;s/L$//'`
507     elif [ -f $INCDIR/opensslv.h ]
508     then
509      version=`grep 'SSL.*_VERSION_NUMBER.*0x' $INCDIR/opensslv.h | sed 's/.*0x0*//;s/[     ].*//;s/L$//'`
510   fi   fi
511   if [ "$version" = "" ]   if [ "$version" = "" ]
512   then   then
# Line 434  then Line 517  then
517     echo $opensslinfo     echo $opensslinfo
518     exit 1     exit 1
519    fi    fi
520     elif [ "$version" = "90581f" ]
521     then
522      echo "Compiling with OpenSSL 0.9.5a."
523      opensslwarn
524     elif [ "$version" = "90601f" ]
525     then
526      echo "Compiling with OpenSSL 0.9.6a."
527      opensslwarn
528     elif [ "$version" = "90602f" ]
529     then
530      echo "Compiling with OpenSSL 0.9.6b."
531      opensslwarn
532     elif [ "$version" = "90603f" ]
533     then
534      echo "Compiling with OpenSSL 0.9.6c."
535      opensslwarn
536     elif [ "$version" = "90604f" ]
537     then
538      echo "Compiling with OpenSSL 0.9.6d."
539      opensslwarn
540     elif [ "$version" = "90605f" ]
541     then
542      echo "Compiling with OpenSSL 0.9.6e."
543      opensslwarn
544     elif [ "$version" = "90606f" ]
545     then
546      echo "Compiling with OpenSSL 0.9.6f."
547     elif [ "$version" = "90607f" ]
548     then
549      echo "Compiling with OpenSSL 0.9.6g."
550     elif [ "$version" = "907001" ]
551     then
552      echo "Compiling with OpenSSL 0.9.7beta1."
553      opensslwarn
554     elif [ "$version" = "907002" ]
555     then
556      echo "Compiling with OpenSSL 0.9.7beta2."
557      opensslwarn
558     elif [ "$version" = "907003" ]
559     then
560      echo "Compiling with OpenSSL 0.9.7beta3."
561   elif [ "$version" -lt "920" ]   elif [ "$version" -lt "920" ]
562   then   then
563    echo "This version of SSLeay is not supported."    echo "This version: ${version} of SSLeay is not supported."
564    echo $opensslinfo    echo $opensslinfo
565    exit 1    exit 1
566   elif [ "$version" -lt "903100" ]   elif [ "$version" -lt "903100" ]
567   then   then
568    echo "This version of OpenSSL is not supported."    echo "This version: ${version} of OpenSSL is not supported."
569    echo $opensslinfo    echo $opensslinfo
570    exit 1    exit 1
571   elif [ "$version" -gt "906000" ]   elif [ "$version" -gt "906000" ]
572   then   then
573    echo "Warning: This version of OpenSSL is untested."    echo "Warning: This version: ${version} of OpenSSL is untested."
574    readln "Continue anyway?" y    readln "Continue anyway?" y
575    if [ "$ans" = "n" ]    if [ "$ans" = "n" ]
576    then    then
# Line 478  then Line 602  then
602    else    else
603     findlib libncurses.a     findlib libncurses.a
604    fi    fi
605   if [ "$found" = "" ]   if [ "$found" = "" ]
606   then   then
607    if [ "$system" != win32 ]    if [ "$system" != win32 ]
608    then    then
609     readln "Do you want to use Mixmaster's menu-based user interface?" y     readln "Do you want to use Mixmaster's menu-based user interface?" y
610     if [ "$ans" = "y" ]     if [ "$ans" = "y" ]
611     then     then
612      echo "Please install ncurses now. It is available from      echo "Please install ncurses now. It is available from
613  http://www.clark.net/pub/dickey/ncurses/ncurses.tar.gz"  http://www.clark.net/pub/dickey/ncurses/ncurses.tar.gz"
614      exit 1      exit 1
615     fi     fi
616    fi    fi
# Line 510  http://www.clark.net/pub/dickey/ncurses/ Line 634  http://www.clark.net/pub/dickey/ncurses/
634    fi    fi
635   fi   fi
636    
637     if [ "$system" = OpenBSD ]
638     then
639      LIBDIR=
640      INCDIR=
641      SRCDIR=idea*
642      findlib libidea.a
643      if [ "$found" = "" ]
644      then
645        echo "WARNING: Building without IDEA. This means (among other things) that
646    Mixmaster will not create an RSA OpenPGP key (to cut down mail loss)"
647      else
648       DEF="$DEF -DUSE_IDEA"
649       IDEALIB="$MAKELIB"
650       LIBS="$LIBS $LIB"
651       LDFLAGS="$LDFLAGS $LDFLAG"
652       if [ "$INCDIR" != "" ]
653       then
654        INC="$INC -I$INCDIR"
655       fi
656      fi
657     elif [ "$system" = msdos -o "$system" = win32 ]
658     then
659      DEF="$DEF -DUSE_IDEA"
660     else
661       cat <<END >tmptst.c
662    #include <openssl/idea.h>
663    int main() {
664      exit(0);
665    }
666    END
667       if gcc $INC tmptst.c -c -o /dev/null
668       then
669         DEF="$DEF -DUSE_IDEA"
670       else
671         echo "WARNING: Building without IDEA. This means (among other things) that
672    Mixmaster will not create an RSA OpenPGP key (to cut down mail loss)"
673       fi
674       rm -f tmptst.c
675     fi
676    
677    
678  # if [ "$MIXDEST" = "$HOME/Mix" ]  # if [ "$MIXDEST" = "$HOME/Mix" ]
679  # then  # then
680  #  SPOOL=  #  SPOOL=
# Line 523  http://www.clark.net/pub/dickey/ncurses/ Line 688  http://www.clark.net/pub/dickey/ncurses/
688       -e "s#%LIBS#$LIBS#" \       -e "s#%LIBS#$LIBS#" \
689       -e "s#%LDFLAGS#$LDFLAGS#" \       -e "s#%LDFLAGS#$LDFLAGS#" \
690       -e "s#%INC#$INC#" \       -e "s#%INC#$INC#" \
691       -e "s#%DEF#$DEF#" < Makefile.in >> Makefile       -e "s#%DEF#$DEF#" < Makefile-sh.in >> Makefile
692   echo "$ZLIB" >>Makefile   echo "$ZLIB" >>Makefile
693   echo "$PCRE" >>Makefile   echo "$PCRE" >>Makefile
694     echo "$IDEALIB" >>Makefile
695   echo "$NCURSES" >>Makefile   echo "$NCURSES" >>Makefile
696   echo "$OPENSSL" >>Makefile   echo "$OPENSSL" >>Makefile
697  fi  fi
698    
 ans=""  
 if [ "$remailer" = "y" ]  
 then  
   echo "Please enter a pass phrase for your remailer (must be the same  
 whenever you re-compile Mixmaster)."  
   read ans  
 fi  
699    
700  if [ "$ans" != "" ]  
701  then  
  PASS="PASS=$ans"  
 fi  
702    
703  echo "Compiling. Please wait."  echo "Compiling. Please wait."
704  whereis gmake make  whereis gmake make
# Line 646  then Line 803  then
803   then   then
804    installed=y    installed=y
805   fi   fi
806  fi  fi
807    
808  if [ "$installed" = "n" ]  if [ "$installed" = "n" ]
809  then  then
# Line 697  understand (If the address <$RMA> is als Line 854  understand (If the address <$RMA> is als
854   readln "Accept Mixmaster (Type II) messages?" y   readln "Accept Mixmaster (Type II) messages?" y
855   mix=$ans   mix=$ans
856    
857   readln "Accept PGP (Type I) remailer messages?" y   readln "Accept PGP (Type I) remailer messages?" n
858   pgp=$ans   pgp=$ans
859    
860   unencrypted=n   unencrypted=n
# Line 708  understand (If the address <$RMA> is als Line 865  understand (If the address <$RMA> is als
865   fi   fi
866    
867   echo "Mixmaster will log error messages and warnings. Do you want to log"   echo "Mixmaster will log error messages and warnings. Do you want to log"
868   readln "informational messages about normal operation as well?" y   readln "informational messages about normal operation as well?" y
869   if [ "$ans" = y ]   if [ "$ans" = y ]
870   then   then
871    verbose=2    verbose=2
872   else   else
873    verbose=1    verbose=1
# Line 800  MIDDLEMAN      $middle Line 957  MIDDLEMAN      $middle
957  BINFILTER       $binfilter  BINFILTER       $binfilter
958  AUTOBLOCK       $autoblock  AUTOBLOCK       $autoblock
959    
960  ERRLOG          errlog  ERRLOG          error.log
961  VERBOSE         $verbose  VERBOSE         $verbose
962    
963  # Remailer name and addresses  # Remailer name and addresses
# Line 826  ORGANIZATION   $orga Line 983  ORGANIZATION   $orga
983  MID             $mid  MID             $mid
984    
985  # Remailing strategy:  # Remailing strategy:
986  SENDPOOLTIME    0h  SENDPOOLTIME    1h
987  POOLSIZE        $poolsize  POOLSIZE        $poolsize
988  RATE            100  RATE            95
989    INDUMMYP        20
990    OUTDUMMYP       67
991  IDEXP           7d  IDEXP           7d
992  PACKETEXP       7d  PACKETEXP       7d
993    
994    $PASSPHRASE
995    
996  END  END
997  fi  
998    fi # not yet installed
999    
1000    
1001  REPLACE="s/%RMN/$RMN/g;s/%RMA/$RMA/g;s/%CA/$CA/g;s/%RAA/$RAA/g"  REPLACE="s/%RMN/$RMN/g;s/%RMA/$RMA/g;s/%CA/$CA/g;s/%RAA/$RAA/g"
1002  if [ "$installed" = "n" ]  if [ "$installed" = "n" ]
# Line 946  then Line 1108  then
1108   then   then
1109    readln "Overwrite now?" n    readln "Overwrite now?" n
1110   else   else
1111    readln "Do that now?" y    readln "Do that now?" n
1112   fi   fi
1113   if [ "$ans" = "y" ]   if [ "$ans" = "y" ]
1114   then   then

Legend:
Removed from v.1  
changed lines
  Added in v.379

  ViewVC Help
Powered by ViewVC 1.1.5