Commit Graph

9 Commits

Author SHA1 Message Date
Denis 'GNUtoo' Carikli 2d11302693
tests: lint: fix u-boot-libre test.
In the commit 4744953f73 ("u-boot-libre:
move to different tasks."), the distclean task of u-boot-libre was
removed, so this broke the lint tests as that file was not removed
from the list of files to check in tests/lint.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-12-11 11:41:37 +01:00
Denis 'GNUtoo' Carikli 190d9f37bd
packages: also ship website tarball.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-12-09 16:00:05 +01:00
Denis 'GNUtoo' Carikli 1943c8ce72
tests: lint: sort files to check alphabetically.
This helps avoiding duplicate lines and make it easier to find things.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-12-09 15:57:38 +01:00
Denis 'GNUtoo' Carikli 7bf153a207
update: make it pass shellcheck
Without that fix, running 'shellcheck -x build' produces the following
errors/warnings:
    In update line 81:
    case "${option}" in
    ^-- SC1009 (info):
    The mentioned syntax error was in this case expression.

    In update line 82:
    list)
    ^-- SC1073 (error):
    Couldn't parse this case item. Fix to allow more checks.

    In update line 92:
    all)
       ^-- SC1072 (error):
       Fix any mentioned problems and try again.
       ^-- SC1074 (error):
       Did you forget the ;; after the previous case item?

After fixing these and rerunning 'shellcheck -x build', we then have
the following errors/warnings:
    In update line 23:
    [ "x${DEBUG+set}" = 'xset' ] && set -v
      ^-------------^ SC2268 (style):
    Avoid x-prefix in comparisons as it no longer serves a purpose.

    In update line 32:
    ls -d resources/packages/*/update/ | \
    ^-- SC2012 (info):
    Use find instead of ls to better handle non-alphanumeric filenames.

    In update line 40:
    ls -d resources/packages/"${package}"/update/* | \
    ^-- SC2012 (info):
    Use find instead of ls to better handle non-alphanumeric filenames.

    In update line 95:
    resources/packages/"${package}"/update/"${option}" $@
                                                       ^-- SC2068 (error):
    Double quote array expansions to avoid re-splitting elements.

    In update line 102:
    "${pkg_dir}"/update/"${option}" $@
                                    ^-- SC2068 (error):
    Double quote array expansions to avoid re-splitting elements.
so we fix them as well.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-12-06 17:32:33 +01:00
Denis 'GNUtoo' Carikli 68cb3ac110
download: make it pass shellcheck
Without that fix, running 'shellcheck -x build' produces the following
errors/warnings:
    In download line 26:
    [ "x${DEBUG+set}" = 'xset' ] && set -v
      ^-------------^ SC2268 (style):
    Avoid x-prefix in comparisons as it no longer serves a purpose.

    In download line 37:
    [ "x${NODELETE+set}" = 'xset' ] && deleteblobs="false"
      ^----------------^ SC2268 (style):
    Avoid x-prefix in comparisons as it no longer serves a purpose.

    In download line 102:
    NODELETE= "${script}"
             ^-- SC1007 (warning):
    Remove space after = if trying to assign a value (for empty string,
    use var='' ... ).

    In download line 117:
    NODELETE= resources/packages/"${package}"/download
             ^-- SC1007 (warning):
    Remove space after = if trying to assign a value (for empty string,
    use var='' ... ).

    In download line 123:
    NODELETE= resources/packages/"${package}"/download $@
             ^-- SC1007 (warning):
    Remove space after = if trying to assign a value (for empty string,
    use var='' ... ).
                                                       ^-- SC2068 (error):
    Double quote array expansions to avoid re-splitting elements.

    In download line 125:
    resources/packages/"${package}"/download $@
                                             ^-- SC2068 (error):
    Double quote array expansions to avoid re-splitting elements.

    In download line 131:
    ./.gitcheck clean
    ^---------------^ SC2317 (info):
    Command appears to be unreachable. Check usage (or ignore if invoked
    indirectly).

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-12-06 17:32:30 +01:00
Denis 'GNUtoo' Carikli 2a5e494ac9
modify: make it pass shellcheck
Without that fix, running 'shellcheck -x build' produces the following
errors/warnings:
    In modify line 23:
    [ "x${DEBUG+set}" = 'xset' ] && set -v
      ^-------------^ SC2268 (style):
      Avoid x-prefix in comparisons as it no longer serves a purpose.

    In modify line 106:
    resources/packages/"${package}"/modify/"${option}" $@
                                                       ^-- SC2068 (error):
    Double quote array expansions to avoid re-splitting elements.

    In modify line 113:
    "${pkg_dir}"/modify/"${option}" $@
                                    ^-- SC2068 (error):
    Double quote array expansions to avoid re-splitting elements.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-12-06 17:32:28 +01:00
Denis 'GNUtoo' Carikli e0159d22f4
build: make it pass shellcheck
Without that fix, running 'shellcheck -x build' produces the following
errors/warnings:
    In build line 25:
    [ "x${DEBUG+set}" = 'xset' ] && set -v
      ^-------------^ SC2268 (style): Avoid x-prefix in comparisons
                                      as it no longer serves a purpose.
    In build line 131:
    resources/packages/"${package}"/"${task}" $@
                                              ^-- SC2068 (error):
    Double quote array expansions to avoid re-splitting elements.

    In build line 138:
    "${pkg_dir}"/"${task}" $@
                           ^-- SC2068 (error):
    Double quote array expansions to avoid re-splitting elements.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-12-06 17:32:25 +01:00
Denis 'GNUtoo' Carikli c7e28dc660
packages: Add distclean
The various scripts present in GNU Boot are very fragile, so it's a
good idea to have a pristine GNU Boot source code for making releases.

The issue is that 'git clean -dfx' doesn't remove existing git
repositories like coreboot/ grub/ etc, so we need additional code to
take care of that.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-12-06 17:32:18 +01:00
Denis 'GNUtoo' Carikli 25c5ac1d8d
Add code style checks to track regressions.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-11-12 01:42:03 +01:00