THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#87 - make install fails with a bash syntax error
User who did this - Dmitry Goncharov (Dmitry)
----------
Hmm, the tracker has spoiled indentation.
Find the same in the attachment.
----------
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=87#comment124
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#87 - make install fails with a bash syntax error
User who did this - Dmitry Goncharov (Dmitry)
----------
make install-sr-man runs w/o errors.
Adding a whitespace between "" and ; makes no difference.
The following is a verbose run which produces an error.
$ git diff |cat
diff --git a/Makefile b/Makefile
index 210d277..cdfc687 100644
--- a/Makefile
+++ b/Makefile
@@ -918,7 +918,7 @@ install-cfg: $(cfg_prefix)/$(cfg_dir)
fi; \
fi
@# other configs
- @for r in $(C_INSTALL_CFGS) ""; do \
+ for r in $(C_INSTALL_CFGS) ""; do \
if [ -n "$$r" ]; then \
if [ -f "$$r" ]; then \
n=`basename "$$r"` ; \
$
$
$ make install-cfg
Makefile.defs defs skipped
for r in ""; do \
if [ -n "$r" ]; then \
if [ -f "$r" ]; then \
n=`basename "$r"` ; \
sed -e "s#/usr/[^:]*lib/kamailio/modules\([:/\"]\)#/usr/local/lib/kamailio/modules\1#g" -e "s#/usr/[^:]*lib/kamailio/modules_k\([:/\"]\)#/usr/local/lib/kamailio/modules_k\1#g" \
< "$r" \
> "//etc/kamailio/$n.sample" ; \
chmod 644 "//etc/kamailio/$n.sample" ; \
if [ -z "" -a \
! -f "//etc/kamailio/$n" ]; \
then \
mv -f "//etc/kamailio/$n.sample" \
"//etc/kamailio/$n"; \
fi ; \
else \
echo "ERROR: $r not found" ; \
if [ 1 =hen \; then \
exit 1; \
fi ; \
fi ; \
fi ; \
done; true
/bin/sh: -c: line 18: syntax error near unexpected token `fi'
/bin/sh: -c: line 18: ` fi ; \'
make: *** [install-cfg] Error 1
$
Note, the line "if [ 1 =hen \; then \". This is the syntax error.
"hen" is a part of "then".
This run with the sed expression moved left a couple of tabs.
$ git diff | cat
diff --git a/Makefile b/Makefile
index 210d277..8ce9429 100644
--- a/Makefile
+++ b/Makefile
@@ -918,12 +918,12 @@ install-cfg: $(cfg_prefix)/$(cfg_dir)
fi; \
fi
@# other configs
- @for r in $(C_INSTALL_CFGS) ""; do \
+ for r in $(C_INSTALL_CFGS) ""; do \
if [ -n "$$r" ]; then \
if [ -f "$$r" ]; then \
n=`basename "$$r"` ; \
sed $(foreach m,$(modules_dirs),\
- -e "s#/usr/[^:]*lib/$(CFG_NAME)/$(m)\([:/\"]\)#$($(m)_target)\1#g") \
+ -e "s#/usr/[^:]*lib/$(CFG_NAME)/$(m)\([:/\"]\)#$($(m)_target)\1#g") \
< "$$r" \
> "$(cfg_prefix)/$(cfg_dir)$$n.sample" ; \
chmod 644 "$(cfg_prefix)/$(cfg_dir)$$n.sample" ; \
$
$
$
$ make install-cfg
Makefile.defs defs skipped
for r in ""; do \
if [ -n "$r" ]; then \
if [ -f "$r" ]; then \
n=`basename "$r"` ; \
sed -e "s#/usr/[^:]*lib/kamailio/modules\([:/\"]\)#/usr/local/lib/kamailio/modules\1#g" -e "s#/usr/[^:]*lib/kamailio/modules_k\([:/\"]\)#/usr/local/lib/kamailio/modules_k\1#g" \
< "$r" \
> "//etc/kamailio/$n.sample" ; \
chmod 644 "//etc/kamailio/$n.sample" ; \
if [ -z "" -a \
! -f "//etc/kamailio/$n" ]; \
then \
mv -f "//etc/kamailio/$n.sample" \
"//etc/kamailio/$n"; \
fi ; \
else \
echo "ERROR: $r not found" ; \
if [ 1 = then \then \
exit 1; \
fi ; \
fi ; \
fi ; \
done; true
/bin/sh: -c: line 18: syntax error near unexpected token `fi'
/bin/sh: -c: line 18: ` fi ; \'
make: *** [install-cfg] Error 1
$
The offending line is different.
"do" moved to the next line.
$ git diff | cat
diff --git a/Makefile b/Makefile
index 210d277..11531bf 100644
--- a/Makefile
+++ b/Makefile
@@ -918,7 +918,8 @@ install-cfg: $(cfg_prefix)/$(cfg_dir)
fi; \
fi
@# other configs
- @for r in $(C_INSTALL_CFGS) ""; do \
+ for r in $(C_INSTALL_CFGS) ""; \
+ do \
if [ -n "$$r" ]; then \
if [ -f "$$r" ]; then \
n=`basename "$$r"` ; \
$
$
$ make install-cfg
Makefile.defs defs skipped
for r in ""; \
do \
if [ -n "$r" ]; then \
if [ -f "$r" ]; then \
n=`basename "$r"` ; \
sed -e "s#/usr/[^:]*lib/kamailio/modules\([:/\"]\)#/usr/local/lib/kamailio/modules\1#g" -e "s#/usr/[^:]*lib/kamailio/modules_k\([:/\"]\)#/usr/local/lib/kamailio/modules_k\1#g" \
< "$r" \
> "//etc/kamailio/$n.sample" ; \
chmod 644 "//etc/kamailio/$n.sample" ; \
if [ -z "" -a \
! -f "//etc/kamailio/$n" ]; \
then \
mv -f "//etc/kamailio/$n.sample" \
"//etc/kamailio/$n"; \
fi ; \
else \
echo "ERROR: $r not found" ; \
if [ 1 = 1 ] ; then \
exit 1; \
fi ; \
fi ; \
fi ; \
done; true
# radius dictionary
touch //etc/kamailio//dictionary.kamailio
install -m 644 etc/dictionary.kamailio //etc/kamailio/
$
The offending line is okay.
Placing a space between , and \ in the sed expression makes the offending line syntactically correct.
The issue looks like a buffer overflow.
Also tried with bash-3.2.51. The result is the same.
HTH
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=87#comment123
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
Module: sip-router
Branch: master
Commit: 35c2d3cd07905fb15faffd289004e1f78c8cc60c
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=35c2d3c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed Sep 8 12:30:19 2010 +0200
dispatcher(k): updated docs for ds_ping_method
- statement was obsoleted
- reported by klaus.lists at inode.at
---
modules_k/dispatcher/README | 4 ++--
modules_k/dispatcher/doc/dispatcher_admin.xml | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules_k/dispatcher/README b/modules_k/dispatcher/README
index b458910..39fb84e 100644
--- a/modules_k/dispatcher/README
+++ b/modules_k/dispatcher/README
@@ -431,8 +431,8 @@ Note
3.16. ds_ping_method (string)
With this Method you can define, with which method you want to probe
- the failed gateways. This method is only available, if compiled with
- the probing of failed gateways enabled.
+ the gateways. Pinging gateways feature depends on ds_ping_interval
+ parameter.
Default value is “OPTIONS”.
diff --git a/modules_k/dispatcher/doc/dispatcher_admin.xml b/modules_k/dispatcher/doc/dispatcher_admin.xml
index 592e7f9..90a8044 100644
--- a/modules_k/dispatcher/doc/dispatcher_admin.xml
+++ b/modules_k/dispatcher/doc/dispatcher_admin.xml
@@ -415,8 +415,8 @@ modparam("dispatcher", "force_dst", 1)
<section>
<title><varname>ds_ping_method</varname> (string)</title>
<para>
- With this Method you can define, with which method you want to probe the failed gateways.
- This method is only available, if compiled with the probing of failed gateways enabled.
+ With this Method you can define, with which method you want to probe the gateways.
+ Pinging gateways feature depends on ds_ping_interval parameter.
</para>
<para>
<emphasis>
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#87 - make install fails with a bash syntax error
User who did this - Daniel-Constantin Mierla (miconda)
----------
What exactly was wrong?
I see you added a whitespace, the patch is harmless, but same constructi is used for target "install-sr-man", do you get error there as well (when man pages are installed)?
Remove the '@' in front of that 'for' and do 'make install-cfg'. It will print the shell script to be executed, paste it here to see what is potentially wrong.
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=87#comment122
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#87 - make install fails with a bash syntax error
User who did this - Dmitry Goncharov (Dmitry)
----------
I figured out what was wrong. Please, have a look at this patch.
----------
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=87#comment121
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task is now closed:
FS#85 - Bug in dispatcher module and fix
User who did this - Daniel-Constantin Mierla (miconda)
Reason for closing: Fixed
Additional comments about closing: Re-open if the fix mentioned in previous comment didn't do it.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=85
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.