http://bugs.winehq.org/show_bug.cgi?id=19859
Summary: cygwin's rsync -aq --delete-before crashes; breaks cygwin bash build Product: Wine Version: 1.1.23 Platform: PC URL: http://cygwin.com OS/Version: Linux Status: NEW Keywords: download, source Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com
[This is the next problem after bug 19858.) To debug bug 19856, I decided to try to build cygwin's bash from source so I could see why it refuses to run some commands. Hilarity ensued.
To repeat: 1) run $ winetricks cygwin and select gcc, automake, patch, and cygport
2) start a cygwin shell $ cd ~/.wine/drive_c/cygwin $ wine wineconsole cmd /c cygwin.bat then use that for all further commands
3) read 'man cygport'
4) download the bash source package from your favorite cygwin mirror, e.g. $ wget http://cygwin.osuosl.org/release/bash/bash-3.2.49-22-src.tar.bz2
To work around bug 19858, edit cygwin's /bin/cygport and change the two lines warn "${unpack_cmd} ${unpack_file_name} failed" to say echo "${unpack_cmd} ${unpack_file_name} failed"
5) unpack the source tarball and use cygport to prepare and build it $ mkdir temp $ cd temp $ tar -xjvf ../bash-3.2.49-22-src.tar.bz2 $ cygport prep bash*cygport
This takes a couple minutes, and fails at the very end with
Preparing working source directory
+ rsync -aq --delete-before /cygdrive/c/bb/bash-3.2.49-22/origsrc/ /cygdrive/c/bb/bash-3.2.49-22/src/ /usr/bin/cygport: line 779: 67 Segmentation fault (core dumped) rsync -aq --delete-before ${origsrcdir}/ ${srcdir}/
You can reproduce this almost on its own by running that rsync inside wineconsole yourself. (Doing it noninteractively doesn't seem to crash :-( ) Leaving off the --delete-before avoids the crash.
Workaround: edit cygwin's /bin/cygport to use cp -a instead of rsync, e.g. change rsync -aq --delete-before ${origsrcdir}/ ${srcdir}/; to rm -rf ${srcdir}/ cp -a ${origsrcdir}/ ${srcdir}/;