[jira] [Commented] (DERBY-6925) Bug in derby_common.sh

2022-09-19 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/DERBY-6925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17606622#comment-17606622
 ] 

ASF subversion and git services commented on DERBY-6925:


Commit 1904148 from Richard N. Hillegas in branch 'code/trunk'
[ https://svn.apache.org/r1904148 ]

DERBY-6925: Add defensive code to startup scripts; commit patch DERBY-6925.diff 
contributed by Piotr Zigielo.

> Bug in derby_common.sh
> --
>
> Key: DERBY-6925
> URL: https://issues.apache.org/jira/browse/DERBY-6925
> Project: Derby
>  Issue Type: Bug
>Reporter: Eli Barzilay
>Priority: Minor
> Attachments: DERBY-6925.diff
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> At the end of the `derby_common.sh` file, as I currently see in the GH
> mirror:
> 
> https://github.com/apache/derby/blob/trunk/bin/templates/derby_common.sh#L166
> there is an unquoted use of $SHELL which should really be quoted.  We
> have run into this bug trying to start the server in a docker image,
> with a setup that has no SHELL variable, which results in a syntax
> error.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (DERBY-6925) Bug in derby_common.sh

2022-09-19 Thread Bryan Pendleton (Jira)


[ 
https://issues.apache.org/jira/browse/DERBY-6925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17606615#comment-17606615
 ] 

Bryan Pendleton commented on DERBY-6925:


+1 to Piotr's change; thanks for the patch!

I, too, always use derbyrun.jar (and I don't use Docker very often); I guess 
that's why I've never encountered this issue in my own work.

> Bug in derby_common.sh
> --
>
> Key: DERBY-6925
> URL: https://issues.apache.org/jira/browse/DERBY-6925
> Project: Derby
>  Issue Type: Bug
>Reporter: Eli Barzilay
>Priority: Minor
> Attachments: DERBY-6925.diff
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> At the end of the `derby_common.sh` file, as I currently see in the GH
> mirror:
> 
> https://github.com/apache/derby/blob/trunk/bin/templates/derby_common.sh#L166
> there is an unquoted use of $SHELL which should really be quoted.  We
> have run into this bug trying to start the server in a docker image,
> with a setup that has no SHELL variable, which results in a syntax
> error.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (DERBY-6925) Bug in derby_common.sh

2022-09-19 Thread Piotr Zygielo (Jira)


[ 
https://issues.apache.org/jira/browse/DERBY-6925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17606472#comment-17606472
 ] 

Piotr Zygielo commented on DERBY-6925:
--

Thanks for reminding the tip for runnable jar (I completely forgot DERBY-7046 
that [easier 
way|https://db.apache.org/derby/papers/DerbyTut/ns_intro.html#ns_easier_way] 
was mentioned in).
For the project that this one is observed in, SHELL is just set to some 
nonsense before start/stop scripts execution to avoid mentioned syntax error.

> Bug in derby_common.sh
> --
>
> Key: DERBY-6925
> URL: https://issues.apache.org/jira/browse/DERBY-6925
> Project: Derby
>  Issue Type: Bug
>Reporter: Eli Barzilay
>Priority: Minor
> Attachments: DERBY-6925.diff
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> At the end of the `derby_common.sh` file, as I currently see in the GH
> mirror:
> 
> https://github.com/apache/derby/blob/trunk/bin/templates/derby_common.sh#L166
> there is an unquoted use of $SHELL which should really be quoted.  We
> have run into this bug trying to start the server in a docker image,
> with a setup that has no SHELL variable, which results in a syntax
> error.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (DERBY-6925) Bug in derby_common.sh

2022-09-18 Thread Richard N. Hillegas (Jira)


[ 
https://issues.apache.org/jira/browse/DERBY-6925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17606355#comment-17606355
 ] 

Richard N. Hillegas commented on DERBY-6925:


Thanks for the patch, Piotr. It looks simple enough. Unless Bryan objects, I 
will commit it later this week.

The whole issue can be side-stepped by using derbyrun.jar to setup the 
classpath:

{noformat}
java -jar lib/derbyrun.jar server start
{noformat}

I wonder if we should deprecate the shell/batch scripts. They were introduced 
before derbyrun.jar. The derbyrun.jar idiom seems less brittle to me.


> Bug in derby_common.sh
> --
>
> Key: DERBY-6925
> URL: https://issues.apache.org/jira/browse/DERBY-6925
> Project: Derby
>  Issue Type: Bug
>Reporter: Eli Barzilay
>Priority: Minor
> Attachments: DERBY-6925.diff
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> At the end of the `derby_common.sh` file, as I currently see in the GH
> mirror:
> 
> https://github.com/apache/derby/blob/trunk/bin/templates/derby_common.sh#L166
> there is an unquoted use of $SHELL which should really be quoted.  We
> have run into this bug trying to start the server in a docker image,
> with a setup that has no SHELL variable, which results in a syntax
> error.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (DERBY-6925) Bug in derby_common.sh

2022-09-18 Thread Piotr Zygielo (Jira)


[ 
https://issues.apache.org/jira/browse/DERBY-6925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17606329#comment-17606329
 ] 

Piotr Zygielo commented on DERBY-6925:
--

Hi [~rhillegas]

Could you please check attached patch? It's just a wrap in additional condition 
on SHELL to prevent this embarrassment.

> Bug in derby_common.sh
> --
>
> Key: DERBY-6925
> URL: https://issues.apache.org/jira/browse/DERBY-6925
> Project: Derby
>  Issue Type: Bug
>Reporter: Eli Barzilay
>Priority: Minor
> Attachments: DERBY-6925.diff
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> At the end of the `derby_common.sh` file, as I currently see in the GH
> mirror:
> 
> https://github.com/apache/derby/blob/trunk/bin/templates/derby_common.sh#L166
> there is an unquoted use of $SHELL which should really be quoted.  We
> have run into this bug trying to start the server in a docker image,
> with a setup that has no SHELL variable, which results in a syntax
> error.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (DERBY-6925) Bug in derby_common.sh

2022-09-18 Thread Piotr Zygielo (Jira)


[ 
https://issues.apache.org/jira/browse/DERBY-6925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17606301#comment-17606301
 ] 

Piotr Zygielo commented on DERBY-6925:
--

Still getting


{code:bash}
expr: syntax error: unexpected argument ‘.*sh.exe$’
db-derby-10.16.1.1-bin/bin/startNetworkServer: 166: [: Illegal number: 
Sun Sep 18 13:17:19 UTC 2022 : Apache Derby Network Server - 10.16.1.1 - 
(1901046) started and ready to accept connections on port 1527
{code}


> Bug in derby_common.sh
> --
>
> Key: DERBY-6925
> URL: https://issues.apache.org/jira/browse/DERBY-6925
> Project: Derby
>  Issue Type: Bug
>Reporter: Eli Barzilay
>Priority: Minor
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> At the end of the `derby_common.sh` file, as I currently see in the GH
> mirror:
> 
> https://github.com/apache/derby/blob/trunk/bin/templates/derby_common.sh#L166
> there is an unquoted use of $SHELL which should really be quoted.  We
> have run into this bug trying to start the server in a docker image,
> with a setup that has no SHELL variable, which results in a syntax
> error.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (DERBY-6925) Bug in derby_common.sh

2017-03-09 Thread Eli Barzilay (JIRA)

[ 
https://issues.apache.org/jira/browse/DERBY-6925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15903066#comment-15903066
 ] 

Eli Barzilay commented on DERBY-6925:
-

1. Yes, I haven't seen that file distributed, but I have seen its
   contents in other places (IIIRC, it was in the start script version
   for linux).

2. To see the failure, try

   expr $foo : '.*sh.exe$'

   and you'll get a syntax error since $foo doesn't exist; but if you
   quote it:

   expr "$foo" : '.*sh.exe$'

   it works fine whether it exists or not.  It's true that the chances
   of $SHELL not being set are small, but in a docker environment that's
   exactly what I ran into...


> Bug in derby_common.sh
> --
>
> Key: DERBY-6925
> URL: https://issues.apache.org/jira/browse/DERBY-6925
> Project: Derby
>  Issue Type: Bug
>Reporter: Eli Barzilay
>Priority: Minor
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> At the end of the `derby_common.sh` file, as I currently see in the GH
> mirror:
> 
> https://github.com/apache/derby/blob/trunk/bin/templates/derby_common.sh#L166
> there is an unquoted use of $SHELL which should really be quoted.  We
> have run into this bug trying to start the server in a docker image,
> with a setup that has no SHELL variable, which results in a syntax
> error.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (DERBY-6925) Bug in derby_common.sh

2017-03-08 Thread Bryan Pendleton (JIRA)

[ 
https://issues.apache.org/jira/browse/DERBY-6925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15902454#comment-15902454
 ] 

Bryan Pendleton commented on DERBY-6925:


As of DERBY-3207, derby_common.sh is not directly part of the release.

However, the contents of that file are present in the other scripts, e.g., 
bin/startNetworkServer contains:
{code}
if [ \( "`expr $SHELL : '.*sh.exe$'`" -gt 0 \) -a \( "$cygwin" = "false" \) ]; 
then
  LOCALCLASSPATH=`echo $LOCALCLASSPATH | sed -E 's/([\d\w]*):([\d\w]*)/\1;\2/g'`
fi
{code}

The Derby build tools construct the release version of the Unix scripts in the
bin directory by including the contents of the derby_common.sh script inside the
containing scripts, that is what was done by DERBY-3207.

I still don't understand what the particular problem is with quotes on your 
system,
nor do I understand what you think would be an improvement to these scripts.

Please clarify, if you can.

> Bug in derby_common.sh
> --
>
> Key: DERBY-6925
> URL: https://issues.apache.org/jira/browse/DERBY-6925
> Project: Derby
>  Issue Type: Bug
>Reporter: Eli Barzilay
>Priority: Minor
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> At the end of the `derby_common.sh` file, as I currently see in the GH
> mirror:
> 
> https://github.com/apache/derby/blob/trunk/bin/templates/derby_common.sh#L166
> there is an unquoted use of $SHELL which should really be quoted.  We
> have run into this bug trying to start the server in a docker image,
> with a setup that has no SHELL variable, which results in a syntax
> error.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (DERBY-6925) Bug in derby_common.sh

2017-03-07 Thread Bryan Pendleton (JIRA)

[ 
https://issues.apache.org/jira/browse/DERBY-6925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15900695#comment-15900695
 ] 

Bryan Pendleton commented on DERBY-6925:


I thought we stopped shipping derby_common.sh as part of the release many years 
ago.

It isn't in the Derby 10.13 release that I downloaded from the Apache site.

Can you provide complete details about how to reproduce this problem, starting 
with
information about which Derby release you downloaded, what command you ran, etc?

Thanks!


> Bug in derby_common.sh
> --
>
> Key: DERBY-6925
> URL: https://issues.apache.org/jira/browse/DERBY-6925
> Project: Derby
>  Issue Type: Bug
>Reporter: Eli Barzilay
>Priority: Minor
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> At the end of the `derby_common.sh` file, as I currently see in the GH
> mirror:
> 
> https://github.com/apache/derby/blob/trunk/bin/templates/derby_common.sh#L166
> there is an unquoted use of $SHELL which should really be quoted.  We
> have run into this bug trying to start the server in a docker image,
> with a setup that has no SHELL variable, which results in a syntax
> error.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)