All of lore.kernel.org
 help / color / mirror / Atom feed
* [Fuego] Add bash-completion script for ftc
@ 2019-02-25  0:46 Daniel Sangorrin
  2019-02-25  0:47 ` [Fuego] [PATCH] bash-completion: add completion " Daniel Sangorrin
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Sangorrin @ 2019-02-25  0:46 UTC (permalink / raw)
  To: fuego

Aloha Tim!

I just send to you a couple of patches that enable bash
completion for the ftc command. This is something I proposed
during my talk at Fuego jamboree. Sorry that it took so long
to implement it. There are a few FIXTHIS but I'd say that it
is quite functional.

Regards,
Daniel



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

* [Fuego] [PATCH] bash-completion: add completion script for ftc
  2019-02-25  0:46 [Fuego] Add bash-completion script for ftc Daniel Sangorrin
@ 2019-02-25  0:47 ` Daniel Sangorrin
  2019-02-28  0:21   ` Tim.Bird
  2019-02-28  0:30   ` Tim.Bird
  0 siblings, 2 replies; 9+ messages in thread
From: Daniel Sangorrin @ 2019-02-25  0:47 UTC (permalink / raw)
  To: fuego

Click [Tab] to have bash show you options or try to complete
what you are writting

Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
---
 scripts/ftc_completion.sh | 176 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 176 insertions(+)
 create mode 100755 scripts/ftc_completion.sh

diff --git a/scripts/ftc_completion.sh b/scripts/ftc_completion.sh
new file mode 100755
index 0000000..2acb04e
--- /dev/null
+++ b/scripts/ftc_completion.sh
@@ -0,0 +1,176 @@
+# !/bin/bash
+#
+# Copyright (C) 2019 Toshiba corp.
+# Author: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
+#
+# This library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# Bash completion script for Fuego's command line tool 'ftc'
+#
+# To enable the completions copy this file to
+# /etc/bash_completion.d/ftc
+# and make sure that your user's bashrc calls
+# . /etc/bash_completion
+
+in_array() {
+    local i
+    for i in "${@:2}"; do
+        [[ $1 = "$i" ]] && return
+    done
+}
+
+_ftc()
+{
+    local cur prev words cword
+    local global_opts="-h --help -v -q -c -x --debug"
+    declare -A percommand_opts=(
+        ["add-jobs"]="-b -p -t -s --timeout --rebuild --reboot --precleanup --postcleanup"
+        ["add-nodes"]="-f -b"
+        ["add-view"]=""
+        ["build-jobs"]=""
+        ["config"]="-l"
+        ["delete-var"]="-b"
+        ["gen-report"]="--where --format --header_fields --fields --layout -o"
+        ["help"]=""
+        ["install-test"]="-u"
+        ["list-boards"]="-q"
+        ["list-jobs"]="-q"
+        ["list-nodes"]="-q"
+        ["list-plans"]="-q"
+        ["list-requests"]="-q"
+        ["list-runs"]="-q --where"
+        ["list-specs"]="-q -t"
+        ["list-tests"]="-q"
+        ["package-run"]="-o -f"
+        ["package-test"]="-o -f"
+        ["put-request"]="-R -s"
+        ["put-run"]=""
+        ["put-test"]=""
+        ["query-board"]="-b -n"
+        ["release-resource"]="-b"
+        ["reserve-resource"]="-f -b"
+        ["rm-jobs"]="--remove-logs"
+        ["rm-nodes"]=""
+        ["rm-request"]=""
+        ["run-request"]="--put-run"
+        ["run-test"]="-b -t -s -p --timeout --rebuild --reboot --precleanup --postcleanup --dynamic-vars"
+        ["set-var"]="-b"
+        ["version"]=""
+        ["wait-for"]="-i -t")
+
+    _init_completion || return
+
+    command="none"
+    for word in "${COMP_WORDS[@]}"; do
+        if in_array "$word" "${!percommand_opts[@]}"; then
+            command=$word
+            break
+        fi
+    done
+
+    # if no command yet, autocomplete with global options or commands
+    if [ "$command" == "none" ]; then
+        COMPREPLY=( $( compgen -W "$global_opts ${!percommand_opts[*]}" -- "$cur" ) )
+        return 0
+    fi
+
+    # otherwise, autocomplete with per-command options
+    if [[ "$cur" == -* ]]; then
+        COMPREPLY=( $( compgen -W "${percommand_opts[$command]}" -- "$cur" ) )
+        return 0
+    fi
+
+    # if prev is an option, make sure it is allowed for the command
+    if [[ "$prev" == -* ]]; then
+        if [[ "${percommand_opts[$command]}" != *"$prev"* ]]; then
+            return 0
+        fi
+    fi
+
+    # try to autocomplete each option
+    case $prev in
+        '-b')
+            # FIXTHIS: support multiple boards separated by commas
+            COMPREPLY=( $( compgen -W "$(ftc list-boards -q)" -- "$cur" ) )
+            return 0
+            ;;
+        '-t')
+            #FIXTHIS: distinguish test from timeout
+            COMPREPLY=( $( compgen -W "$(ftc list-tests -q)" -- "$cur" ) )
+            return 0
+            ;;
+        '-p')
+            COMPREPLY=( $( compgen -W "$(ftc list-plans -q)" -- "$cur" ) )
+            return 0
+            ;;
+        '--timeout')
+            #FIXTHIS: try to complete
+            return 0
+            ;;
+        '--rebuild' | '--reboot' | '--postcleanup' | '--precleanup')
+            COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
+            return 0
+            ;;
+        'put-run')
+            COMPREPLY=( $( compgen -W "$(ftc list-runs -q)" -- "$cur" ) )
+            return 0
+            ;;
+        'package-test')
+            COMPREPLY=( $( compgen -W "$(ftc list-tests -q)" -- "$cur" ) )
+            return 0
+            ;;
+        '--format')
+            COMPREPLY=( $( compgen -W "txt html pdf excel csv rst" -- "$cur" ) )
+            return 0
+            ;;
+        '-s')
+            local i TEST=""
+            for (( i=0; i < cword; i++ )); do
+                if [[ "${words[i]}" == -t ]]; then
+                TEST="${words[i + 1]}"
+                fi
+            done
+            if [ -z "$TEST" ]; then
+                return 0
+            else
+                COMPREPLY=( $( compgen -W "$(ftc list-specs -t $TEST -q)" -- "$cur" ) )
+            fi
+            return 0
+            ;;
+    esac
+
+    # deal with commands that use no opts
+    if [[ "$command" == "build-jobs" || "$command" == "rm-jobs" ]]; then
+            COMPREPLY=( $( compgen -W "$(ftc list-jobs -q)" -- "$cur" ) )
+            return 0
+    fi
+
+    if [[ "$command" == "rm-nodes" ]]; then
+            COMPREPLY=( $( compgen -W "$(ftc list-nodes -q)" -- "$cur" ) )
+            return 0
+    fi
+
+    if [[ "$command" == "rm-request" ]]; then
+            COMPREPLY=( $( compgen -W "$(ftc list-requests -q)" -- "$cur" ) )
+            return 0
+    fi
+
+    # if we have nothing, show available opts
+    COMPREPLY=( $( compgen -W "${percommand_opts[$command]}" -- "$cur" ) )
+} &&
+complete -F _ftc ftc
+
+# ex: ts=4 sw=4 et filetype=sh
-- 
2.7.4


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

* Re: [Fuego] [PATCH] bash-completion: add completion script for ftc
  2019-02-25  0:47 ` [Fuego] [PATCH] bash-completion: add completion " Daniel Sangorrin
@ 2019-02-28  0:21   ` Tim.Bird
  2019-02-28  0:30   ` Tim.Bird
  1 sibling, 0 replies; 9+ messages in thread
From: Tim.Bird @ 2019-02-28  0:21 UTC (permalink / raw)
  To: daniel.sangorrin, fuego

This is very great stuff!!  This will be super handy.

One license issue, though.  See below.

> -----Original Message-----
> From: Daniel Sangorrin
> 
> Click [Tab] to have bash show you options or try to complete
> what you are writting
> 
> Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
> ---
>  scripts/ftc_completion.sh | 176
> ++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 176 insertions(+)
>  create mode 100755 scripts/ftc_completion.sh
> 
> diff --git a/scripts/ftc_completion.sh b/scripts/ftc_completion.sh
> new file mode 100755
> index 0000000..2acb04e
> --- /dev/null
> +++ b/scripts/ftc_completion.sh
> @@ -0,0 +1,176 @@
> +# !/bin/bash
> +#
> +# Copyright (C) 2019 Toshiba corp.
> +# Author: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
> +#
> +# This library is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU Lesser General Public License as
> +# published by the Free Software Foundation; either version 2 of the
> +# License, or (at your option) any later version.
I'd rather not accept this contribution under this license.
I'm not sure if any of the material below was derived from somewhere else
or not.  If so, that might pose a problem.  However, the default license
for Fuego is MIT.  I would be willing to allow this particular file, which is 
somewhat separate from the rest of Fuego, to be submitted at LGPL
version 2 only.  However, I really dislike the 'or any later version' clause
in this license header.  I don't want any part of Fuego to be susceptible
to conversion in to GPL or LGPL v3.

Please let me know if this is an issue.

> +#
> +# This library is distributed in the hope that it will be useful, but
> +# WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> GNU
> +# Lesser General Public License for more details.
> +#
> +# You should have received a copy of the GNU Lesser General Public
> +# License along with this library; if not, write to the Free Software
> +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
> +# USA.
> +#
> +# Bash completion script for Fuego's command line tool 'ftc'
> +#
> +# To enable the completions copy this file to
> +# /etc/bash_completion.d/ftc
> +# and make sure that your user's bashrc calls
> +# . /etc/bash_completion
> +
> +in_array() {
> +    local i
> +    for i in "${@:2}"; do
> +        [[ $1 = "$i" ]] && return
> +    done
> +}
> +
> +_ftc()
> +{
> +    local cur prev words cword
> +    local global_opts="-h --help -v -q -c -x --debug"
> +    declare -A percommand_opts=(
> +        ["add-jobs"]="-b -p -t -s --timeout --rebuild --reboot --precleanup --
> postcleanup"
> +        ["add-nodes"]="-f -b"
> +        ["add-view"]=""
> +        ["build-jobs"]=""
> +        ["config"]="-l"
> +        ["delete-var"]="-b"
> +        ["gen-report"]="--where --format --header_fields --fields --layout -o"
> +        ["help"]=""
> +        ["install-test"]="-u"
> +        ["list-boards"]="-q"
> +        ["list-jobs"]="-q"
> +        ["list-nodes"]="-q"
> +        ["list-plans"]="-q"
> +        ["list-requests"]="-q"
> +        ["list-runs"]="-q --where"
> +        ["list-specs"]="-q -t"
> +        ["list-tests"]="-q"
> +        ["package-run"]="-o -f"
> +        ["package-test"]="-o -f"
> +        ["put-request"]="-R -s"
> +        ["put-run"]=""
> +        ["put-test"]=""
> +        ["query-board"]="-b -n"
> +        ["release-resource"]="-b"
> +        ["reserve-resource"]="-f -b"
> +        ["rm-jobs"]="--remove-logs"
> +        ["rm-nodes"]=""
> +        ["rm-request"]=""
> +        ["run-request"]="--put-run"
> +        ["run-test"]="-b -t -s -p --timeout --rebuild --reboot --precleanup --
> postcleanup --dynamic-vars"
> +        ["set-var"]="-b"
> +        ["version"]=""
> +        ["wait-for"]="-i -t")
> +
> +    _init_completion || return
> +
> +    command="none"
> +    for word in "${COMP_WORDS[@]}"; do
> +        if in_array "$word" "${!percommand_opts[@]}"; then
> +            command=$word
> +            break
> +        fi
> +    done
> +
> +    # if no command yet, autocomplete with global options or commands
> +    if [ "$command" == "none" ]; then
> +        COMPREPLY=( $( compgen -W "$global_opts ${!percommand_opts[*]}"
> -- "$cur" ) )
> +        return 0
> +    fi
> +
> +    # otherwise, autocomplete with per-command options
> +    if [[ "$cur" == -* ]]; then
> +        COMPREPLY=( $( compgen -W "${percommand_opts[$command]}" --
> "$cur" ) )
> +        return 0
> +    fi
> +
> +    # if prev is an option, make sure it is allowed for the command
> +    if [[ "$prev" == -* ]]; then
> +        if [[ "${percommand_opts[$command]}" != *"$prev"* ]]; then
> +            return 0
> +        fi
> +    fi
> +
> +    # try to autocomplete each option
> +    case $prev in
> +        '-b')
> +            # FIXTHIS: support multiple boards separated by commas
> +            COMPREPLY=( $( compgen -W "$(ftc list-boards -q)" -- "$cur" ) )
> +            return 0
> +            ;;
> +        '-t')
> +            #FIXTHIS: distinguish test from timeout
> +            COMPREPLY=( $( compgen -W "$(ftc list-tests -q)" -- "$cur" ) )
> +            return 0
> +            ;;
> +        '-p')
> +            COMPREPLY=( $( compgen -W "$(ftc list-plans -q)" -- "$cur" ) )
> +            return 0
> +            ;;
> +        '--timeout')
> +            #FIXTHIS: try to complete
> +            return 0
> +            ;;
> +        '--rebuild' | '--reboot' | '--postcleanup' | '--precleanup')
> +            COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
> +            return 0
> +            ;;
> +        'put-run')
> +            COMPREPLY=( $( compgen -W "$(ftc list-runs -q)" -- "$cur" ) )
> +            return 0
> +            ;;
> +        'package-test')
> +            COMPREPLY=( $( compgen -W "$(ftc list-tests -q)" -- "$cur" ) )
> +            return 0
> +            ;;
> +        '--format')
> +            COMPREPLY=( $( compgen -W "txt html pdf excel csv rst" -- "$cur" ) )
> +            return 0
> +            ;;
> +        '-s')
> +            local i TEST=""
> +            for (( i=0; i < cword; i++ )); do
> +                if [[ "${words[i]}" == -t ]]; then
> +                TEST="${words[i + 1]}"
> +                fi
> +            done
> +            if [ -z "$TEST" ]; then
> +                return 0
> +            else
> +                COMPREPLY=( $( compgen -W "$(ftc list-specs -t $TEST -q)" -- "$cur"
> ) )
> +            fi
> +            return 0
> +            ;;
> +    esac
> +
> +    # deal with commands that use no opts
> +    if [[ "$command" == "build-jobs" || "$command" == "rm-jobs" ]]; then
> +            COMPREPLY=( $( compgen -W "$(ftc list-jobs -q)" -- "$cur" ) )
> +            return 0
> +    fi
> +
> +    if [[ "$command" == "rm-nodes" ]]; then
> +            COMPREPLY=( $( compgen -W "$(ftc list-nodes -q)" -- "$cur" ) )
> +            return 0
> +    fi
> +
> +    if [[ "$command" == "rm-request" ]]; then
> +            COMPREPLY=( $( compgen -W "$(ftc list-requests -q)" -- "$cur" ) )
> +            return 0
> +    fi
> +
> +    # if we have nothing, show available opts
> +    COMPREPLY=( $( compgen -W "${percommand_opts[$command]}" --
> "$cur" ) )
> +} &&
> +complete -F _ftc ftc
> +
> +# ex: ts=4 sw=4 et filetype=sh
> --
> 2.7.4

Other than the license issue, this looks good to me.  I'm not a bash completion
expert, although I did try to make a simple one for one of my other utilities.
I was hoping the '-q' options on the ftc commands would come in handy.  :-)

Let me know about the license issue.

For now, this is NOT applied.

Thanks,
 -- Tim


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

* Re: [Fuego] [PATCH] bash-completion: add completion script for ftc
  2019-02-25  0:47 ` [Fuego] [PATCH] bash-completion: add completion " Daniel Sangorrin
  2019-02-28  0:21   ` Tim.Bird
@ 2019-02-28  0:30   ` Tim.Bird
  2019-02-28  7:47     ` daniel.sangorrin
  1 sibling, 1 reply; 9+ messages in thread
From: Tim.Bird @ 2019-02-28  0:30 UTC (permalink / raw)
  To: daniel.sangorrin, fuego



> -----Original Message-----
> From: Bird, Timothy
> ...However, the default license for Fuego is MIT. 

Nope.  Correction:  The default license for Fuego is BSD 3-clause.
See http://fuegotest.org/wiki/License_And_Contribution_Policy

Apparently ftc is GPL v2 only.  That's probably my fault, for basing
the original code on Sony's 'ttc', which is GPL v2 only.  There's probably
not much of 'ttc' left, but thems the breaks.  With multiple contributors
it would be exceedingly difficult to change the ftc license now.

But if we can keep new code BSD 3-clause that would be my preference.
 -- Tim




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

* Re: [Fuego] [PATCH] bash-completion: add completion script for ftc
  2019-02-28  0:30   ` Tim.Bird
@ 2019-02-28  7:47     ` daniel.sangorrin
  2019-02-28 23:55       ` Tim.Bird
  0 siblings, 1 reply; 9+ messages in thread
From: daniel.sangorrin @ 2019-02-28  7:47 UTC (permalink / raw)
  To: Tim.Bird, fuego

Hi Tim,

I have no problem with changing the License to BSD 3-clause but it seems that bash-completion is GPLv2 

https://github.com/scop/bash-completion/blob/master/COPYING

If we contribute the script to them, it will probably be on any distribution.
For that reason, I think that it is wiser to release it as GPLv2.

The script itself is mostly my code, but I did some copy paste from other scripts such as the function in_array.

Best regards,
Daniel

> -----Original Message-----
> From: Tim.Bird@sony.com <Tim.Bird@sony.com>
> Sent: Thursday, February 28, 2019 9:30 AM
> To: sangorrin daniel(サンゴリン ダニエル ○SWC□OST) <daniel.sangorrin@toshiba.co.jp>;
> fuego@lists.linuxfoundation.org
> Subject: RE: [Fuego] [PATCH] bash-completion: add completion script for ftc
> 
> 
> 
> > -----Original Message-----
> > From: Bird, Timothy
> > ...However, the default license for Fuego is MIT.
> 
> Nope.  Correction:  The default license for Fuego is BSD 3-clause.
> See http://fuegotest.org/wiki/License_And_Contribution_Policy
> 
> Apparently ftc is GPL v2 only.  That's probably my fault, for basing
> the original code on Sony's 'ttc', which is GPL v2 only.  There's probably
> not much of 'ttc' left, but thems the breaks.  With multiple contributors
> it would be exceedingly difficult to change the ftc license now.
> 
> But if we can keep new code BSD 3-clause that would be my preference.
>  -- Tim
> 
> 


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

* Re: [Fuego] [PATCH] bash-completion: add completion script for ftc
  2019-02-28  7:47     ` daniel.sangorrin
@ 2019-02-28 23:55       ` Tim.Bird
  2019-03-01  0:41         ` daniel.sangorrin
  0 siblings, 1 reply; 9+ messages in thread
From: Tim.Bird @ 2019-02-28 23:55 UTC (permalink / raw)
  To: daniel.sangorrin, fuego

OK.  I'd like to apply the patch to Fuego, but with a slight word change
to the notification text.

Here is what you have now:
> +# This library is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU Lesser General Public License as
> +# published by the Free Software Foundation; either version 2 of the
> +# License, or (at your option) any later version.

I propose changing this to:
> +# This library is free software; you can redistribute it and/or modify
> +# it under the terms of version 2 of the GNU Lesser General Public License as
> +# published by the Free Software Foundation.

Note that this doesn't change the current license of the file (it leaves it LGPL v2).
This is not a change of the license, but of the notification text for the license.
This wording is NOT part of the LGPL v2 license.  The change would limit the
license to LGPL v2, and prevent conversion to some successor license (including
a license that is yet-unwritten, and could be substantially different in terms
from LGPL v2.)

Please let me know if that's OK.
 -- Tim


> -----Original Message-----
> From: daniel.sangorrin@toshiba.co.jp
> 
> Hi Tim,
> 
> I have no problem with changing the License to BSD 3-clause but it seems
> that bash-completion is GPLv2
> 
> https://github.com/scop/bash-completion/blob/master/COPYING
> 
> If we contribute the script to them, it will probably be on any distribution.
> For that reason, I think that it is wiser to release it as GPLv2.
> 
> The script itself is mostly my code, but I did some copy paste from other
> scripts such as the function in_array.
> 
> Best regards,
> Daniel
> 
> > -----Original Message-----
> > From: Tim.Bird@sony.com <Tim.Bird@sony.com>
> > Sent: Thursday, February 28, 2019 9:30 AM
> > To: sangorrin daniel(サンゴリン ダニエル ○SWC□OST)
> <daniel.sangorrin@toshiba.co.jp>;
> > fuego@lists.linuxfoundation.org
> > Subject: RE: [Fuego] [PATCH] bash-completion: add completion script for
> ftc
> >
> >
> >
> > > -----Original Message-----
> > > From: Bird, Timothy
> > > ...However, the default license for Fuego is MIT.
> >
> > Nope.  Correction:  The default license for Fuego is BSD 3-clause.
> > See http://fuegotest.org/wiki/License_And_Contribution_Policy
> >
> > Apparently ftc is GPL v2 only.  That's probably my fault, for basing
> > the original code on Sony's 'ttc', which is GPL v2 only.  There's probably
> > not much of 'ttc' left, but thems the breaks.  With multiple contributors
> > it would be exceedingly difficult to change the ftc license now.
> >
> > But if we can keep new code BSD 3-clause that would be my preference.
> >  -- Tim
> >
> >


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

* Re: [Fuego] [PATCH] bash-completion: add completion script for ftc
  2019-02-28 23:55       ` Tim.Bird
@ 2019-03-01  0:41         ` daniel.sangorrin
  0 siblings, 0 replies; 9+ messages in thread
From: daniel.sangorrin @ 2019-03-01  0:41 UTC (permalink / raw)
  To: Tim.Bird, fuego

Hi Tim,

Thanks for checking the license. I am fine with that change.

Thanks,
Daniel

> -----Original Message-----
> From: Tim.Bird@sony.com <Tim.Bird@sony.com>
> Sent: Friday, March 1, 2019 8:56 AM
> To: sangorrin daniel(サンゴリン ダニエル ○SWC□OST) <daniel.sangorrin@toshiba.co.jp>;
> fuego@lists.linuxfoundation.org
> Subject: RE: [Fuego] [PATCH] bash-completion: add completion script for ftc
> 
> OK.  I'd like to apply the patch to Fuego, but with a slight word change
> to the notification text.
> 
> Here is what you have now:
> > +# This library is free software; you can redistribute it and/or modify
> > +# it under the terms of the GNU Lesser General Public License as
> > +# published by the Free Software Foundation; either version 2 of the
> > +# License, or (at your option) any later version.
> 
> I propose changing this to:
> > +# This library is free software; you can redistribute it and/or modify
> > +# it under the terms of version 2 of the GNU Lesser General Public License as
> > +# published by the Free Software Foundation.
> 
> Note that this doesn't change the current license of the file (it leaves it LGPL v2).
> This is not a change of the license, but of the notification text for the license.
> This wording is NOT part of the LGPL v2 license.  The change would limit the
> license to LGPL v2, and prevent conversion to some successor license (including
> a license that is yet-unwritten, and could be substantially different in terms
> from LGPL v2.)
> 
> Please let me know if that's OK.
>  -- Tim
> 
> 
> > -----Original Message-----
> > From: daniel.sangorrin@toshiba.co.jp
> >
> > Hi Tim,
> >
> > I have no problem with changing the License to BSD 3-clause but it seems
> > that bash-completion is GPLv2
> >
> > https://github.com/scop/bash-completion/blob/master/COPYING
> >
> > If we contribute the script to them, it will probably be on any distribution.
> > For that reason, I think that it is wiser to release it as GPLv2.
> >
> > The script itself is mostly my code, but I did some copy paste from other
> > scripts such as the function in_array.
> >
> > Best regards,
> > Daniel
> >
> > > -----Original Message-----
> > > From: Tim.Bird@sony.com <Tim.Bird@sony.com>
> > > Sent: Thursday, February 28, 2019 9:30 AM
> > > To: sangorrin daniel(サンゴリン ダニエル ○SWC□OST)
> > <daniel.sangorrin@toshiba.co.jp>;
> > > fuego@lists.linuxfoundation.org
> > > Subject: RE: [Fuego] [PATCH] bash-completion: add completion script for
> > ftc
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: Bird, Timothy
> > > > ...However, the default license for Fuego is MIT.
> > >
> > > Nope.  Correction:  The default license for Fuego is BSD 3-clause.
> > > See http://fuegotest.org/wiki/License_And_Contribution_Policy
> > >
> > > Apparently ftc is GPL v2 only.  That's probably my fault, for basing
> > > the original code on Sony's 'ttc', which is GPL v2 only.  There's probably
> > > not much of 'ttc' left, but thems the breaks.  With multiple contributors
> > > it would be exceedingly difficult to change the ftc license now.
> > >
> > > But if we can keep new code BSD 3-clause that would be my preference.
> > >  -- Tim
> > >
> > >


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

* Re: [Fuego] [PATCH] bash-completion: add completion script for ftc
  2019-02-25  0:42 Daniel Sangorrin
@ 2019-02-28  0:14 ` Tim.Bird
  0 siblings, 0 replies; 9+ messages in thread
From: Tim.Bird @ 2019-02-28  0:14 UTC (permalink / raw)
  To: daniel.sangorrin, fuego


Applied.  Thanks.
 -- Tim

> -----Original Message-----
> From: fuego-bounces@lists.linuxfoundation.org [mailto:fuego-
> bounces@lists.linuxfoundation.org] On Behalf Of Daniel Sangorrin
> Sent: Sunday, February 24, 2019 4:42 PM
> To: fuego@lists.linuxfoundation.org
> Subject: [Fuego] [PATCH] bash-completion: add completion script for ftc
> 
> As proposed during the Fuego Jamboree I have added bash
> completion for the ftc command.
> 
> Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
> ---
>  Dockerfile           | 5 ++++-
>  Dockerfile.nojenkins | 5 ++++-
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/Dockerfile b/Dockerfile
> index b183e1a..80e799a 100644
> --- a/Dockerfile
> +++ b/Dockerfile
> @@ -45,7 +45,8 @@ RUN pip install filelock
> 
>  # Fuego command dependencies
>  RUN apt-get update && apt-get -yV install \
> -	git sshpass openssh-client sudo net-tools wget curl lava-tool
> +	git sshpass openssh-client sudo net-tools wget curl lava-tool \
> +	bash-completion
> 
>  # Default SDK for testing locally or on an x86 board
>  RUN apt-get update && apt-get -yV install \
> @@ -202,6 +203,8 @@ RUN chown -R jenkins:jenkins $JENKINS_HOME/
>  #
> ==========================================================
> ====================
> 
>  RUN ln -s /fuego-core/scripts/ftc /usr/local/bin/
> +COPY fuego-core/scripts/ftc_completion.sh /etc/bash_completion.d/ftc
> +RUN echo ". /etc/bash_completion" >> /root/.bashrc
> 
>  #
> ==========================================================
> ====================
>  # Lava
> diff --git a/Dockerfile.nojenkins b/Dockerfile.nojenkins
> index f3392f9..2883f54 100644
> --- a/Dockerfile.nojenkins
> +++ b/Dockerfile.nojenkins
> @@ -56,7 +56,8 @@ RUN pip install filelock
> 
>  # Fuego command dependencies
>  RUN apt-get update && apt-get -yV install \
> -	git sshpass openssh-client sudo net-tools wget curl lava-tool
> +	git sshpass openssh-client sudo net-tools wget curl lava-tool \
> +	bash-completion
> 
>  # Default SDK for testing locally or on an x86 board
>  RUN apt-get update && apt-get -yV install \
> @@ -113,6 +114,8 @@ RUN /bin/bash -c 'git clone
> https://github.com/tbird20d/fserver.git /usr/local/l
>  #
> ==========================================================
> ====================
> 
>  RUN ln -s /fuego-core/scripts/ftc /usr/local/bin/
> +COPY fuego-core/scripts/ftc_completion.sh /etc/bash_completion.d/ftc
> +RUN echo ". /etc/bash_completion" >> /root/.bashrc
> 
>  #
> ==========================================================
> ====================
>  # Lava
> --
> 2.7.4
> 
> _______________________________________________
> Fuego mailing list
> Fuego@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/fuego

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

* [Fuego] [PATCH] bash-completion: add completion script for ftc
@ 2019-02-25  0:42 Daniel Sangorrin
  2019-02-28  0:14 ` Tim.Bird
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Sangorrin @ 2019-02-25  0:42 UTC (permalink / raw)
  To: fuego

As proposed during the Fuego Jamboree I have added bash
completion for the ftc command.

Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
---
 Dockerfile           | 5 ++++-
 Dockerfile.nojenkins | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index b183e1a..80e799a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -45,7 +45,8 @@ RUN pip install filelock
 
 # Fuego command dependencies
 RUN apt-get update && apt-get -yV install \
-	git sshpass openssh-client sudo net-tools wget curl lava-tool
+	git sshpass openssh-client sudo net-tools wget curl lava-tool \
+	bash-completion
 
 # Default SDK for testing locally or on an x86 board
 RUN apt-get update && apt-get -yV install \
@@ -202,6 +203,8 @@ RUN chown -R jenkins:jenkins $JENKINS_HOME/
 # ==============================================================================
 
 RUN ln -s /fuego-core/scripts/ftc /usr/local/bin/
+COPY fuego-core/scripts/ftc_completion.sh /etc/bash_completion.d/ftc
+RUN echo ". /etc/bash_completion" >> /root/.bashrc
 
 # ==============================================================================
 # Lava
diff --git a/Dockerfile.nojenkins b/Dockerfile.nojenkins
index f3392f9..2883f54 100644
--- a/Dockerfile.nojenkins
+++ b/Dockerfile.nojenkins
@@ -56,7 +56,8 @@ RUN pip install filelock
 
 # Fuego command dependencies
 RUN apt-get update && apt-get -yV install \
-	git sshpass openssh-client sudo net-tools wget curl lava-tool
+	git sshpass openssh-client sudo net-tools wget curl lava-tool \
+	bash-completion
 
 # Default SDK for testing locally or on an x86 board
 RUN apt-get update && apt-get -yV install \
@@ -113,6 +114,8 @@ RUN /bin/bash -c 'git clone https://github.com/tbird20d/fserver.git /usr/local/l
 # ==============================================================================
 
 RUN ln -s /fuego-core/scripts/ftc /usr/local/bin/
+COPY fuego-core/scripts/ftc_completion.sh /etc/bash_completion.d/ftc
+RUN echo ". /etc/bash_completion" >> /root/.bashrc
 
 # ==============================================================================
 # Lava
-- 
2.7.4


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

end of thread, other threads:[~2019-03-01  0:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-25  0:46 [Fuego] Add bash-completion script for ftc Daniel Sangorrin
2019-02-25  0:47 ` [Fuego] [PATCH] bash-completion: add completion " Daniel Sangorrin
2019-02-28  0:21   ` Tim.Bird
2019-02-28  0:30   ` Tim.Bird
2019-02-28  7:47     ` daniel.sangorrin
2019-02-28 23:55       ` Tim.Bird
2019-03-01  0:41         ` daniel.sangorrin
  -- strict thread matches above, loose matches on Subject: below --
2019-02-25  0:42 Daniel Sangorrin
2019-02-28  0:14 ` Tim.Bird

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.