This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fresh install of Cygwin, not working


On  7 Aug, Larry Hall (Cygwin) wrote:
>  Oliver Jones wrote:
> > Can anyone tell me why the latest version of Cygwin will not work?
> > 
> > I have downloaded the complete version from my local mirror, which is on the
> > mirrors list. When I install, I do not get the X Server icon, or any of the
> > X applications that normally appear, on my desktop (fresh Windows XP
> > install).
> > 
> > Nor does the Cygwin.bat shortcut, placed on my desktop after the install,
> > work. When running from the Windows cmd shell, it reports "Bad command -
> > bash".
> > 
> > I've tried to download from other mirrors, often with the same result. It
> > seems that if I want to actually *use* Cygwin, I'll have to see if I can dig
> > up a version I saved on CD-ROM, because none of the mirrors work anymore.
> > 
> > Anyone else experiencing this issue?
>  
>  Clearly, this is not a wide-spread issue, otherwise you'd see the list
>  swamped by complaints like this.
>  
>  My suggestion is to read and follow the problem reporting guidelines found
>  here - <http://cygwin.com/problems.html>.  This will give folks on this list
>  that wish to help some basic information on which to start a meaningful
>  dialog.  Absent that, my WAG is that your postinstall scripts didn't run
>  for some reason.  Check '/etc/postinstall' to see if there are any scripts
>  that don't have a ".done" suffix.  If there are, you can try rerunning
>  'setup.exe' again.  It should run the remaining postinstall scripts.  If
>  that doesn't help or isn't the obvious issue, a look at /var/log/setup.log*
>  may provide some insight (if the postinstall scripts failed), assuming you
>  haven't rerun 'setup.exe' again since the initial install failure.
>  

Well, we know that frequently the mirror(s) we use are bad, because
after we rsync from them to a local disc for use on our intranet, it
fails the MD5 checks of the files.  I wrote this script to make the
check nightly, after the rsync.

I just wish all the mirrors did this routinely, so we didn't need to
discover it after the rsync.



luke


---- md5cygchk ------
#!/bin/sh
#
# Check all the md5 signatures for a Cygwin mirror.
#
# Author: Luke Kendall
#
CYG_BAD=cygwin-archive-incomplete.txt
CYG_GOOD=cygwin-archive-okay.txt
ECHO=echo
MD5ARG=
MIRROR=/u/mirror/cygwin/release
MYNAME=`basename "$0"`
RECORD=false
TMP=/tmp/md5cyg$$
USAGE="Usage: $MYNAME [-q] [--record] [cygwin-mirror-directory]
Where:
    -q   	means quiet.
    --record	means record a success or failure indicator in the
		the directory above the mirror directory, by making
		$CYG_GOOD & $CYG_BAD files
		appear or disappear (so even DOS batch scripts can test
		the archive's goodness).
		You have to have write permission for this to work.
    cygwin-mirror-directory
		this should be the directory where you find setup.bz2,
		setup.exe, and setup.ini.
		Success/failure files are created in the directory
		above this, if the --record option is used.
		Defaults to /u/mirror/cygwin/release.

    E.g.:

	$MYNAME --record -q /u/mirror/cygwin/release

    NOTE: running md5 over 2GB of files is best done on the host
    machine, to avoid hammering our network.
    (Use 'df -k \$MIRROR' to discover what machine
    hosts \$MIRROR, that you should slogin to,
    to run this $MYNAME.)"

trap 'rm -f $TMP; exit 1'  0 1 2 3 15

usage()
{
    # sed, so that if they specified a mirror, it's used in the usage message.
    echo "$USAGE" | sed "s|\$MIRROR|$MIRROR|" >&2
    exit 1
}

while [ $# -ge 1 ]
do
    case $1 in
	-q)
	    MD5ARG="--status"
	    ECHO=":"
	    ;;
	--record)
	    RECORD=true
	    ;;
	-*)
	    usage
	    ;;
	*)
	    MIRROR="$1"
	    shift
	    break
	    ;;
    esac
    shift
done

if [ $# != 0 ]
then
    usage
fi
cd $MIRROR || exit 1
if [ ! -s ../setup.bz2 ]
then
    echo "$MYNAME: Not a cygwin download (no file setup.bz2 in $MIRROR parent)" >&2
    exit 1
fi
WHERE=`pwd`

find . -type d -print | \
    while read dir
    do
    (
	cd "$dir"
	if [ -s md5.sum ]
	then
	    $ECHO "$dir:"
	    if md5sum $MD5ARG --check md5.sum
	    then
		:
	    else
		{
		    echo
		    echo "In $WHERE/$dir:"
		    md5sum --check md5.sum 2>&1 | grep -v OK
		} >> $TMP
	    fi
	elif [ `ls -l | grep "^-" | wc -l` = 0 ]
	then
	    :
	else
	    echo "Worrying: $dir has no md5.sum file" >&2
	    echo "Worrying: $dir has no md5.sum file" >> $TMP
	fi
	cd $WHERE # Really, the shell popping via (...) does this.
    )
    done

if $RECORD
then
    if [ ! -w $WHERE/.. ]
    then
	echo "$MYNAME: you don't have write permission on $WHERE/.." >&2
	RECORD=false
    else
	# Remove them both, temporarily, in case the previous creator didn't
	# give you file write permissions.
	rm -f $WHERE/../$CYG_BAD $WHERE/../$CYG_GOOD
    fi
fi

if [ -s $TMP ]
then
    #
    # The check is bad.
    #
    if $RECORD
    then
	{
	    printf "Summary of files with broken checksums:\r\n"
	    sed 's/$/\r/' $TMP
	} > $WHERE/../$CYG_BAD
	chmod 664 $WHERE/../$CYG_BAD
    fi
    echo "Summary of files with broken checksums:"
    cat $TMP
    rm $TMP
    [ -s $WHERE/../$CYG_GOOD ]  && echo "$MYNAME: impossible: good and bad!" >&2
    status=1
else
    #
    # The check is good.
    #
    if $RECORD
    then
	printf -- "--- All files checked okay. ---\r\n" > $WHERE/../$CYG_GOOD
	chmod 664 $WHERE/../$CYG_GOOD
    fi
    $ECHO "--- All files checked okay. ---"
    [ -s $WHERE/../$CYG_BAD ]  && echo "$MYNAME: impossible: bad and good!" >&2
    status=0
fi
#
# Also record where we mirrored this from: this assumes we're being run
# immediately after the rsync mirror, by the rsync initiator.
#
if $RECORD
then
    grep cygwin /u/mirror/.mirror | sed '/^#/d;s/ .*//;s/$/\r/' \
	> $WHERE/../mirror-site.txt
    chmod 664 $WHERE/../mirror-site.txt
fi

exit $status
trap '' 0



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]