Showing posts with label cygwin. Show all posts
Showing posts with label cygwin. Show all posts

Friday, September 26, 2014

bash with ShellShock (and variants) fix for MSYS and Cygwin-1.5

bash-3.1 with patch for CVE-2014-7169. Patch comes from https://oss.oracle.com/ol5/SRPMS-updates/bash-3.2-33.el5_11.4.src.rpm + self-porting

for MSYS:
bash-3.1.22-4-msys-1.0.17-bin.tar.lzma
bash-3.1.22-4-msys-1.0.17-src.tar.lzma (Source+Patches)

for Cygwin-1.5:
bash-3.1.22-4-cygwin-1.5.25-bin.tar.lzma (Source is same as bash-3.1.22-4-msys-1.0.17-src.tar.lzma but without applying MSYS patch "01-bash-3.1-msys.patch")

for ClearOS 5 (CentOS 5):
http://roy.orz.hm/rpms/bash-3.2-33.5.i386.rpm
http://roy.orz.hm/rpms/bash-3.2-33.5.src.rpm (SRPM)

official patched build for Cygwin-1.7 :
bash-4.1.16-8.tar.xz

Updated 4 Oct 2014: Updated binaries patched for CVE-2014-6277 segfault

Sunday, December 8, 2013

xmbefed-4.7 cygwin binary

I compiled xmbefed-4.7 and lesstif-0.95.2 in cygwin 1.7.
Binary(7z archive)

You need a X11 server(for example Xming/VcXserv) and set DISPLAY environment variable to run xmbefed, like fontforge and such.
set DISPLAY=:0
xmbdfed

P.S.: You may need installing X11 fonts as well.
Minimal X11 fonts for xmbdfed

Saturday, March 6, 2010

Fix breakage on current Firefox trunk in cygwin build environment

Today's update in Firefox trunk breaks in my cygwin build environment, following modifications applied and fix building breakage.

  • cygwin_wrapper: escape <xxx> to \<xxx\>, new cygwin_wrapper look like this:
    #!/usr/bin/perl
    $prog=$ARGV[0];
    shift;
    exit 1 if(!length($prog));
    
    # If $CYGDRIVE_MOUNT was not set in configure, give $mountpoint the results of mount -p
    $mountpoint=$ENV{'CYGDRIVE_MOUNT'};
    if(!length($mountpoint)) {
     $mountpoint=`mount -p`;
     if(!length($mountpoint)) {
      print "Cannot determine cygwin mount points. Exiting";
      exit 1;
     }
    }
    
    # Delete everything but "/cygdrive" (or other mountpoint) from mount=`mount -p`
    ($dummy,$mountpoint) = split(/\//,$mountpoint);
    ($mountpoint,$dummy) = split(/\s/,$mountpoint);
    
    $args="";
    $up="";
    $process=1;
    
    if($prog eq "-up") {
     $up=1;
     $prog=$ARGV[0];
     shift;
    }
    
    foreach my $arg (@ARGV) {
     if($arg eq "-wrap") {
      $process=1;
     } elsif($arg eq "-nowrap") {
       $process=0;
     } else {
       if($up) {
        $arg =~ s|-I([a-zA-Z]):/|-I/${mountpoint}/\1/|g;
       } else {
        $arg =~ s|/${mountpoint}/([a-zA-Z])/|\1:/|g;
       }
       $arg =~ s/\\/\\\\/g;
       $arg =~ s/"/\\"/g;
    
    # replace <xxx> to \<xxx\> only
       $arg =~ s/<([^\s]+)>/\\<\1\\>/g;
    
    #   $arg =~ s/</\\</g;
    #   $arg =~ s/>/\\>/g;
    #   $arg =~ s/\(/\\(/g;
    #   $arg =~ s/\)/\\)/g;
       $args.=($arg =~ / /)?" \"".$arg."\"":" ".$arg;
     }
    }
    
    #print "$prog $args";
    exec "$prog $args";
    
  • configure.in: add $CYGWIN_WRAPPER to libffi configure command, configure.in diff:
    diff -r c05d0ac56307 configure.in
    --- a/configure.in      Fri Mar 05 14:19:30 2010 -0800
    +++ b/configure.in      Sat Mar 06 12:28:24 2010 +0800
    @@ -2292,7 +2292,7 @@
             AC_MSG_ERROR([MOZ_TOOLS is not set])
         fi
    
    -    MOZ_TOOLS_DIR=`cd $MOZ_TOOLS && pwd -W`
    +    MOZ_TOOLS_DIR=`cd $MOZ_TOOLS && pwd`
         if test "$?" != "0" || test -z "$MOZ_TOOLS_DIR"; then
             AC_MSG_ERROR([cd \$MOZ_TOOLS failed. MOZ_TOOLS ==? $MOZ_TOOLS])
         fi
    @@ -2303,7 +2303,7 @@
         MOZ_TOOLS_DIR=`$CYGPATH_W $MOZ_TOOLS_DIR | $CYGPATH_S`
    
         if test -n "$GLIB_PREFIX"; then
    -        _GLIB_PREFIX_DIR=`cd $GLIB_PREFIX && pwd -W`
    +        _GLIB_PREFIX_DIR=`cd $GLIB_PREFIX && pwd`
             if test "$?" = "0"; then
                 if test `echo ${PATH}: | grep -ic "$_GLIB_PREFIX_DIR/bin:"` = 0; then
                     AC_MSG_ERROR([GLIB_PREFIX must be in your \$PATH.])
    @@ -2328,7 +2328,7 @@
         fi
    
         if test -n "$LIBIDL_PREFIX"; then
    -        _LIBIDL_PREFIX_DIR=`cd $LIBIDL_PREFIX && pwd -W`
    +        _LIBIDL_PREFIX_DIR=`cd $LIBIDL_PREFIX && pwd`
             if test "$?" = "0"; then
                 if test `echo ${PATH}: | grep -ic "$_LIBIDL_PREFIX_DIR/bin:"` = 0; then
                     AC_MSG_ERROR([LIBIDL_PREFIX must be in your \$PATH.])
    @@ -6890,8 +6890,12 @@
         if test ! -d "$WIN32_CRT_SRC_DIR"; then
           AC_MSG_ERROR([Invalid Win32 CRT source directory: ${WIN32_CRT_SRC_DIR}])
         fi
    -    WIN32_CRT_SRC_DIR=`cd "$WIN32_CRT_SRC_DIR" && pwd -W`
    -    _objdir_win=`pwd -W`
    +#    WIN32_CRT_SRC_DIR=`cd "$WIN32_CRT_SRC_DIR" && pwd -W`
    +#    _objdir_win=`pwd -W`
    +
    +    WIN32_CRT_SRC_DIR=`$CYGPATH_W "$WIN32_CRT_SRC_DIR" | $CYGPATH_S`
    +    _objdir_win=`$CYGPATH_W . | $CYGPATH_S`
    +
         WIN32_CUSTOM_CRT_DIR="$_objdir_win/memory/jemalloc/crtsrc/build/$_WIN32_CRT_CPU"
         MOZ_MEMORY_LDFLAGS="-MANIFEST:NO -LIBPATH:\"$WIN32_CUSTOM_CRT_DIR\" -NODEFAULTLIB:msvcrt -NODEFAULTLIB:msvcrtd -NODEFAULTLIB:msvcprt -NODEFAULTLIB:msvcprtd -DEFAULTLIB:mozcrt19 -DEFAULTLIB:mozcpp19"
         dnl Also pass this to NSPR/NSS
    @@ -8496,8 +8500,8 @@
         WIN_TOP_SRC=`cd $srcdir; pwd -W`
         ;;
     cygwin*|msvc*|mks*)
    -    HOST_CC="\$(CYGWIN_WRAPPER) $HOST_CC"
    -    HOST_CXX="\$(CYGWIN_WRAPPER) $HOST_CXX"
    +#    HOST_CC="\$(CYGWIN_WRAPPER) $HOST_CC"
    +#    HOST_CXX="\$(CYGWIN_WRAPPER) $HOST_CXX"
         CC="\$(CYGWIN_WRAPPER) $CC"
         CXX="\$(CYGWIN_WRAPPER) $CXX"
         CPP="\$(CYGWIN_WRAPPER) $CPP"
    @@ -8738,7 +8742,7 @@
       if test "$_MSC_VER"; then
         # Use a wrapper script for cl and ml that looks more like gcc.
         # autotools can't quite handle an MSVC build environment yet.
    -    ac_configure_args="$ac_configure_args CC=$_topsrcdir/js/ctypes/libffi/msvcc.sh LD=link CPP=\"cl -nologo -EP\""
    +    ac_configure_args="$ac_configure_args CC=\"$CYGWIN_WRAPPER $_topsrcdir/js/ctypes/libffi/msvcc.sh\" LD=\"$CYGWIN_WRAPPER link\" CPP=\"$CYGWIN_WRAPPER cl -nologo -EP\""
       fi
       if test "$SOLARIS_SUNPRO_CC"; then
         # Always use gcc for libffi on Solaris
  • cygwin/bin/ln: rename ln.exe to cygln.exe (prevert libffi's configure from using ln and break the build process)
  • cygwin/bin/arch: create a program/script to print "i686" to STDOUT and name it "arch" in cygwin's bin directory
  • msvcc.sh: add "-wd4826" in nowarn (for Platform SDK 2003)