accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Havanki (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-2956) bootstrap_config.sh relies on GNU getopt for long opts, which doesn't work in OS X
Date Fri, 27 Jun 2014 16:52:24 GMT

    [ https://issues.apache.org/jira/browse/ACCUMULO-2956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14046137#comment-14046137
] 

Bill Havanki commented on ACCUMULO-2956:
----------------------------------------

There are warnings about using getopt(1). From [here|http://mywiki.wooledge.org/BashFAQ/035],
via [here|http://stackoverflow.com/questions/2721946/cross-platform-getopt-for-a-shell-script]:

bq. Unless it's the version from util-linux, and you use its advanced mode, never use getopt(1).
Traditional versions of getopt cannot handle empty argument strings, or arguments with embedded
whitespace. The POSIX shell (and others) offer getopts which is safe to use instead.

FWIW you can hack getopts usage to do long options. But, generally, I think for simplicity
we should just lose the long options and use getopts. The bootstrap_config.sh isn't documented
anywhere, so isn't very much "public", and the impact is limited to folks who already use
it and are familiar with the command line and so can be told "Oh, use short options from now
on, we're being more portable".

> bootstrap_config.sh relies on GNU getopt for long opts, which doesn't work in OS X
> ----------------------------------------------------------------------------------
>
>                 Key: ACCUMULO-2956
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2956
>             Project: Accumulo
>          Issue Type: Bug
>    Affects Versions: 1.6.0
>            Reporter: Christopher Tubbs
>             Fix For: 1.6.1, 1.7.0
>
>
> Discovered while working on ACCUMULO-2646, bootstrap_config.sh's command line options
don't work without GNU getopt. This means that this script doesn't work on OS X or BSD systems
without modification.
> The bootstrap_config.sh script should be modified to detect the OS and fall back to a
compatible argument parsing when not in Linux. The long opts should be preserved in Linux,
since these were available in Accumulo 1.6.0.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message