Return-Path: Delivered-To: apmail-incubator-hama-dev-archive@minotaur.apache.org Received: (qmail 63005 invoked from network); 17 Mar 2011 04:47:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Mar 2011 04:47:56 -0000 Received: (qmail 78552 invoked by uid 500); 17 Mar 2011 04:47:56 -0000 Delivered-To: apmail-incubator-hama-dev-archive@incubator.apache.org Received: (qmail 78483 invoked by uid 500); 17 Mar 2011 04:47:55 -0000 Mailing-List: contact hama-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hama-dev@incubator.apache.org Delivered-To: mailing list hama-dev@incubator.apache.org Received: (qmail 78474 invoked by uid 99); 17 Mar 2011 04:47:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Mar 2011 04:47:54 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Mar 2011 04:47:51 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 81EAF3AD6A2 for ; Thu, 17 Mar 2011 04:47:29 +0000 (UTC) Date: Thu, 17 Mar 2011 04:47:29 +0000 (UTC) From: "Edward J. Yoon (JIRA)" To: hama-dev@incubator.apache.org Message-ID: <239483323.8313.1300337249514.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <908700617.8209.1300329689994.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (HAMA-368) Zookeeper for Hama wouldn't run on Cygwin (Win7) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HAMA-368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13007809#comment-13007809 ] Edward J. Yoon commented on HAMA-368: ------------------------------------- See this: http://cygwin.com/ml/cygwin-announce/2006-12/msg00026.html A new release of bash, 3.2.9-10, has been uploaded, replacing 3.2.9-9 as current. NEWS: ===== This is a minor patch release. It undoes the asprintf workaround added in 3.2.5-7, now that cygwin 1.5.23 has been released which overcomes the need for the workaround. It also improves the postinstall script to deal with /bin/sh being stuck at version 3.0, which is incompatible with the current libreadline6. There are a few things you should be aware of before using this version: 1. When using binary mounts, cygwin programs try to emulate Linux. Bash on Linux does not understand \r\n line endings, but interprets the \r literally, which leads to syntax errors or odd variable assignments. Therefore, you will get the same behavior on Cygwin binary mounts by default. 2. d2u is your friend. You can use it to convert any problematic script into binary line endings. 3. Cygwin text mounts automatically work with either line ending style, because the \r is stripped before bash reads the file. If you absolutely must use files with \r\n line endings, consider mounting the directory where those files live as a text mount. However, text mounts are not as well tested or supported on the cygwin mailing list, so you may encounter other problems with other cygwin tools in those directories. 4. This version of bash has a cygwin-specific shell option, named "igncr" to force bash to ignore \r, independently of cygwin's mount style. As of bash-3.2.3-5, it controls regular scripts, command substitution, and sourced files. I hope to convince the upstream bash maintainer to accept this patch into the future bash 4.0 even on Linux, rather than keeping it a cygwin-specific patch, but only time will tell. There are several ways to activate this option: 4a. For a single affected script, add this line just after the she-bang: (set -o igncr) 2>/dev/null && set -o igncr; # comment is needed 4b. For a single script, invoke bash explicitly with the shopt, as in 'bash -o igncr ./myscript' rather than the simpler './myscript'. 4c. To affect all scripts, export the environment variable BASH_ENV, pointing to a file that sets the shell option as desired. Bash will source this file on startup for every script. 4d. Added in the bash-3.2-2 release: export the environment variable SHELLOPTS with igncr included in it. It is read-only from within bash, but you can set it before invoking bash; once in bash, it auto-tracks the current state of 'set -o igncr' or 'shopt -s igncr'. If exported, then all bash child processes inherit the same option settings. 5. You can also experiment with the IFS variable for controlling how bash will treat \r during variable expansion. 6. Normally, cygwin treats DOS-style paths as binary only. This release of bash includes a hack to check the underlying mount point of files, even when passed as DOS style paths, but other cygwin tools do not. You are better off learning how to use POSIX-style paths. 7. There are varying levels of speed at which bash operates. The fastest is on a binary mount with igncr disabled (the default behavior). Next would be text mounts with igncr disabled and no \r in the underlying file. Next would be binary mounts with igncr enabled. And the slowest that bash will operate is on text mounts with igncr enabled. 8. If you don't like how bash behaves, then propose a patch, rather than proposing idle ideas. This turn of events has already been talked to death on the mailing lists by people with many ideas, but few patches. 9. If you forget to read this release announcement, the best you can expect when you complain to the list is a link back to this email. Remember, you must not have any bash or /bin/sh instances running when you upgrade the bash package. This release requires cygwin-1.5.23-1 or later; and it requires libreadline6-5.2.1-4. DESCRIPTION: ============ Bash is an sh-compatible shell that incorporates useful features from the Korn shell (ksh) and C shell (csh). It is intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools standard. It offers functional improvements over sh for both programming and interactive use. In addition, most sh scripts can be run by Bash without modification. As of the bash 3.0 series, cygwin /bin/sh defaults to bash, not ash, similar to Linux distributions. > Zookeeper for Hama wouldn't run on Cygwin (Win7) > ------------------------------------------------ > > Key: HAMA-368 > URL: https://issues.apache.org/jira/browse/HAMA-368 > Project: Hama > Issue Type: Bug > Components: scripts > Affects Versions: 0.2.0 > Environment: Cygwin, Win7 > Reporter: Frederick Haebin Na > Priority: Trivial > Fix For: 0.2.0 > > > bash -x ./zookeeper --config ../conf start > ----- > hosts=`"$bin"/hama org.apache.hama.zookeeper.ZKServerTool` > for zookeeper in $hosts; do > ----- > while looping $hosts, each $zookeeper contains trailing \r. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira