All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ipset: Fix syntax error of bash completion in Debian environment
@ 2013-05-12  9:28 Neutron Soutmun
  2013-05-12 12:07 ` Neutron Soutmun
  0 siblings, 1 reply; 4+ messages in thread
From: Neutron Soutmun @ 2013-05-12  9:28 UTC (permalink / raw)
  To: kadlec; +Cc: netfilter-devel, neo.neutron

Debian packaging tool (lintian) warns the syntax error of bash completion
as it uses the extglob shell option that should be run in
the ** #!/usr/bin/env bash ** and the shell option set should be moved to
global scope.

Signed-off-by: Neutron Soutmun <neo.neutron@gmail.com>
---
 utils/ipset_bash_completion/ipset_bash_completion |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/utils/ipset_bash_completion/ipset_bash_completion b/utils/ipset_bash_completion/ipset_bash_completion
index cc7ea7b..8a0b91d 100644
--- a/utils/ipset_bash_completion/ipset_bash_completion
+++ b/utils/ipset_bash_completion/ipset_bash_completion
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # -----------------------------------------------------------------
 # Programmable completion code for ipset (netfilter.org)
@@ -47,6 +47,8 @@
 #
 # -----------------------------------------------------------------
 
+shopt -s extglob
+
 # -----------------------------------------------------------------
 # Functions
 # -----------------------------------------------------------------
@@ -537,7 +539,6 @@ done < "${_IPSET_IPLIST_FILE}"
 # -----------------------------------------------------------------
 
 _ipset_complete() {
-shopt -s extglob
 local cur prev cword words ips_version
 local str_action str_setname str_type str_filename
 local str_glob str_regex str_prefix str_suffix
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ipset: Fix syntax error of bash completion in Debian environment
  2013-05-12  9:28 [PATCH] ipset: Fix syntax error of bash completion in Debian environment Neutron Soutmun
@ 2013-05-12 12:07 ` Neutron Soutmun
  2013-05-15 19:24   ` Bourne Without
  0 siblings, 1 reply; 4+ messages in thread
From: Neutron Soutmun @ 2013-05-12 12:07 UTC (permalink / raw)
  To: kadlec; +Cc: netfilter-devel, neo.neutron, Born Without

Cc-d script's author

On Sun, May 12, 2013 at 4:28 PM, Neutron Soutmun <neo.neutron@gmail.com> wrote:
> Debian packaging tool (lintian) warns the syntax error of bash completion
> as it uses the extglob shell option that should be run in
> the ** #!/usr/bin/env bash ** and the shell option set should be moved to
> global scope.
>
> Signed-off-by: Neutron Soutmun <neo.neutron@gmail.com>
> ---
>  utils/ipset_bash_completion/ipset_bash_completion |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/utils/ipset_bash_completion/ipset_bash_completion b/utils/ipset_bash_completion/ipset_bash_completion
> index cc7ea7b..8a0b91d 100644
> --- a/utils/ipset_bash_completion/ipset_bash_completion
> +++ b/utils/ipset_bash_completion/ipset_bash_completion
> @@ -1,4 +1,4 @@
> -#!/bin/bash
> +#!/usr/bin/env bash
>
>  # -----------------------------------------------------------------
>  # Programmable completion code for ipset (netfilter.org)
> @@ -47,6 +47,8 @@
>  #
>  # -----------------------------------------------------------------
>
> +shopt -s extglob
> +
>  # -----------------------------------------------------------------
>  # Functions
>  # -----------------------------------------------------------------
> @@ -537,7 +539,6 @@ done < "${_IPSET_IPLIST_FILE}"
>  # -----------------------------------------------------------------
>
>  _ipset_complete() {
> -shopt -s extglob
>  local cur prev cword words ips_version
>  local str_action str_setname str_type str_filename
>  local str_glob str_regex str_prefix str_suffix
> --
> 1.7.10.4
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ipset: Fix syntax error of bash completion in Debian environment
  2013-05-12 12:07 ` Neutron Soutmun
@ 2013-05-15 19:24   ` Bourne Without
  2013-05-16  9:46     ` Neutron Soutmun
  0 siblings, 1 reply; 4+ messages in thread
From: Bourne Without @ 2013-05-15 19:24 UTC (permalink / raw)
  To: Neutron Soutmun; +Cc: kadlec, netfilter-devel

On 12.05.2013 14:07, Neutron Soutmun wrote:
> Cc-d script's author
>

Hello,

thanks for reporting.

> On Sun, May 12, 2013 at 4:28 PM, Neutron Soutmun <neo.neutron@gmail.com> wrote:
>> Debian packaging tool (lintian) warns the syntax error of bash completion
>> as it uses the extglob shell option that should be run in
>> the ** #!/usr/bin/env bash ** and the shell option set should be moved to
>> global scope.
>>
>> Signed-off-by: Neutron Soutmun <neo.neutron@gmail.com>
>> ---
>>   utils/ipset_bash_completion/ipset_bash_completion |    5 +++--
>>   1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/utils/ipset_bash_completion/ipset_bash_completion b/utils/ipset_bash_completion/ipset_bash_completion
>> index cc7ea7b..8a0b91d 100644
>> --- a/utils/ipset_bash_completion/ipset_bash_completion
>> +++ b/utils/ipset_bash_completion/ipset_bash_completion
>> @@ -1,4 +1,4 @@
>> -#!/bin/bash
>> +#!/usr/bin/env bash

Actually I think the shebang isn't required at all.
Does the debian tool just warn?

>>
>>   # -----------------------------------------------------------------
>>   # Programmable completion code for ipset (netfilter.org)
>> @@ -47,6 +47,8 @@
>>   #
>>   # -----------------------------------------------------------------
>>
>> +shopt -s extglob
>> +

updated this in the dev branch (github / sourceforge).

[...]

Best regards

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ipset: Fix syntax error of bash completion in Debian environment
  2013-05-15 19:24   ` Bourne Without
@ 2013-05-16  9:46     ` Neutron Soutmun
  0 siblings, 0 replies; 4+ messages in thread
From: Neutron Soutmun @ 2013-05-16  9:46 UTC (permalink / raw)
  To: blackhole; +Cc: kadlec, netfilter-devel

Hello,

On Thu, May 16, 2013 at 2:24 AM, Bourne Without <blackhole@airpost.net> wrote:
> On 12.05.2013 14:07, Neutron Soutmun wrote:
>>
>> Cc-d script's author
>>
>
> Hello,
>
> thanks for reporting.
>
>
>> On Sun, May 12, 2013 at 4:28 PM, Neutron Soutmun <neo.neutron@gmail.com>
>> wrote:
>>>
>>> Debian packaging tool (lintian) warns the syntax error of bash completion
>>> as it uses the extglob shell option that should be run in
>>> the ** #!/usr/bin/env bash ** and the shell option set should be moved to
>>> global scope.
>>>
>>> Signed-off-by: Neutron Soutmun <neo.neutron@gmail.com>
>>> ---
>>>   utils/ipset_bash_completion/ipset_bash_completion |    5 +++--
>>>   1 file changed, 3 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/utils/ipset_bash_completion/ipset_bash_completion
>>> b/utils/ipset_bash_completion/ipset_bash_completion
>>> index cc7ea7b..8a0b91d 100644
>>> --- a/utils/ipset_bash_completion/ipset_bash_completion
>>> +++ b/utils/ipset_bash_completion/ipset_bash_completion
>>> @@ -1,4 +1,4 @@
>>> -#!/bin/bash
>>> +#!/usr/bin/env bash
>
>
> Actually I think the shebang isn't required at all.
> Does the debian tool just warn?

Sorry for the noise, I just search the BTS and found this
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=699410

It seems to be the false positive of lintian.
However, the #!/usr/bin/env bash is the workaround for this issue :)

Thanks for your kindness to review it.

Best regards,
Neutron Soutmun

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-16  9:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-12  9:28 [PATCH] ipset: Fix syntax error of bash completion in Debian environment Neutron Soutmun
2013-05-12 12:07 ` Neutron Soutmun
2013-05-15 19:24   ` Bourne Without
2013-05-16  9:46     ` Neutron Soutmun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.