You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Richard \"Trey\" Hyde (JIRA)" <ji...@apache.org> on 2008/06/23 23:23:46 UTC

[jira] Commented: (SOLR-93) scripts don't work cleanly on FreeBSD

    [ https://issues.apache.org/jira/browse/SOLR-93?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12607381#action_12607381 ] 

Richard "Trey" Hyde commented on SOLR-93:
-----------------------------------------

snapshooter will also fail on FreeBSD systems.   In the 1.3 dailys (big improvement from 1.2) there is a big if block that needs to change

{code}
if [[ "${OS}" == "SunOS" || "${OS}" == "Darwin" ]]
then
  orig_dir=$(pwd)
  mkdir ${temp}
  cd ${data_dir}/index
  find . -print|cpio -pdlmu ${temp} 1>/dev/null 2>&1
  cd ${orig_dir}
else
  cp -lr ${data_dir}/index ${temp}
fi
{code}

Need to add a || "${OS}" == "FreeBSD" .. and NetBSD .. OpenBSD... *BSD   The  find/cpio snippet appears to work as expected.

I wonder if the cases should be flipped though.  I think most *NIX systems DON'T use GNU cp (and thus lack the -l option).

> scripts don't work cleanly on FreeBSD
> -------------------------------------
>
>                 Key: SOLR-93
>                 URL: https://issues.apache.org/jira/browse/SOLR-93
>             Project: Solr
>          Issue Type: Bug
>          Components: replication
>    Affects Versions: 1.1.0
>            Reporter: Hoss Man
>
> As first reported by liuping.james in this thread...
> http://www.nabble.com/SolrDistribution-is-tested-by-FreeBSD--tf2869098.html#a8019145
> ...the various distribution scripts have issues using the FreeBSD version of bash ... more specificly, they don't run cleanly via "bash script-name" on FreeBSD systems.
> notes from when i verified this...
> --------------------------------------------------
> I just tried this out on the only FreeBSD system i have access to
> (minotaur.apache.org) and found a few things...
> 1) /bin/bash doesn't exist
> 2) /bin/sh is true sh, not bash
> 3) bash is installed in /usr/local/bin/bash
> ...i'm not sure how standard these are among FreeBSD systems.
> I also verified that rsyncd-enable and rsyncd-disable do work if you run
> them explicitly through bash, but for some reason you must use the -u
> option, and even then it logs a straing warning about scripts.conf...
> hossman@minotaur$ bash solr/bin/rsyncd-enable -h
> /home/hossman/tmp/apache-solr-1.1.0-incubating/example/solr/conf/scripts.conf:
> l: command not found
> solr/bin/rsyncd-enable: illegal option -- h
> usage: rsyncd-enable [-u username] [-v]
>        -u          specify user to sudo to before running script
>        -v          increase verbosity
>        -V          output debugging info
> hossman@minotaur$ ls solr/logs/
> hossman@minotaur$ bash solr/bin/rsyncd-enable
> /home/hossman/tmp/apache-solr-1.1.0-incubating/example/solr/conf/scripts.conf: l: command not found
> !udo: no passwd entry for
> hossman@minotaur$ ls solr/logs/
> hossman@minotaur$ bash solr/bin/rsyncd-enable -u hossman
> /home/hossman/tmp/apache-solr-1.1.0-incubating/example/solr/conf/scripts.conf: l: command not found
> hossman@minotaur$ ls solr/logs/
> rsyncd-enabled  rsyncd.log
> ...so above and beyond the sh vs bash and patch issues .. there does seem
> to be a compatibility issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.