All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 00/16] Preventing style regressions using check-package
@ 2022-07-24  5:48 Ricardo Martincoski
  2022-07-24  5:48 ` [Buildroot] [PATCH 01/16] DEVELOPERS: update entries for Ricardo Martincoski Ricardo Martincoski
                   ` (15 more replies)
  0 siblings, 16 replies; 32+ messages in thread
From: Ricardo Martincoski @ 2022-07-24  5:48 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

Hello,

This series:
- adds 'make check-package' to the workflow of sending patches to the
  list;
- ensures reproducible results for check-package (that will call
  shellcheck and flake8);
- merges check-flake8 into check-package;
- makes check-package to check all shell scripts in the tree;
- makes check-package to check new directories in the tree;

The results of 'make check-package' already depends on the version of
shellcheck installed on the host and would also depend on the version of
flake8 installed on the host, making the results even less reproducible.
So in order to ensure reproducible results, this series makes
'make check-package' always run inside the docker image.

After merging check-flake8 into check-package, 'make check-package'
takes much more time to run, 1-2 minutes instead of seconds.
But:
 - it ensures reproducible results, since all tests run inside the
   docker image;
 - it simplifies the dependency to the host tools when checking style:
   instead of installing shellcheck, flake8, and a growing number of
   python modules, the developer only needs docker and the docker image;
 - it standardizes the use and the developer must know only about one
   target: 'make check-package' instead of 'make check-flake8', 'make
   check-shellcheck', 'make check-somethingelse';

Patch 1 is completely unrelated, just to update my entries on DEVELOPERS
file before changing it in a later patch.

Patches 2 to 7 ensure reproducible on check-package results, standardize
the check for all files in the tree (yet limited by the list of
directories the check-package script knows that it understand) and add a
fine-grained ignore list for warnings in the tree, making the creation
of a new check_function in check-package to take effect immediately when
added to the tree.

Patch 8 adds 'make check-package' to the default workflow of sending
patches, since its results are now reproducible and depend only on
docker installed on the host.

Patches 9 to 14 expand the list of files check-package do understand:
all shell scripts, all python scripts, and new directories: board,
support, utils.
At the end of this series, this is the output from check-package:
374966 lines processed
0 warnings generated

Patch 15 is an example of fixing an ignored warning (and removing the
entry from the ignored list).

Patch 16 is an example of adding a new check_function to check-package
without fixing all warnings it would generate first.
Notice that even we are adding warnings to the ignore list, any new
patch sent to the list that triggers that new check_funtion will
generate warnings, preventing regressions.

This series intentionally do NOT make pkg-stats to check shell and
python scripts in the tree. pkg-stats remains counting warnings only to
files that do not depend on external tools (shellcheck, flake8) and
therefore already have reproducible results.
This change of checking all files in pkg-stats to count in the Warning
column is technically feasible, but in order to ensure reproducible
results, pkg-stats would need to run inside the docker image, and new
python modules would need to be added to the image: python3-aiohttp,
requests, ... too much complexity, I think.

Regards,
Ricardo

Ricardo Martincoski (16):
  DEVELOPERS: update entries for Ricardo Martincoski
  utils/check-package: improve shellcheck reproducibility
  utils/check-package: create an ignore list
  support/testing: test check-package ignore list
  utils/check-package: add --failed-only
  Makefile: make check-package assume a git tree
  Makefile: run check-* inside docker image
  docs/manual: check-package before submitting patch
  support/docker: add python3-magic
  utils/check-package: check all shell scripts
  utils/check-package: check files in utils/
  utils/check-package: check files in board/
  utils/check-package: check files in support/
  Makefile: merge check-flake8 into check-package
  utils/docker-run: fix shellcheck warnings
  utils/checkpackagelib: warn about $(HOST_DIR)/usr

 .checkpackageignore                           | 1102 +++++++++++++++++
 .shellcheckrc                                 |    0
 DEVELOPERS                                    |   10 +-
 Makefile                                      |   20 +-
 docs/manual/contribute.txt                    |    6 +
 support/docker/Dockerfile                     |    2 +
 support/misc/gitlab-ci.yml.in                 |    4 -
 support/scripts/generate-gitlab-ci-yml        |    2 +-
 support/scripts/pkg-stats                     |    2 +-
 .../utils/br2-external/.checkpackageignore    |    1 +
 .../br2-external/package/.checkpackageignore  |    1 +
 .../package/.checkpackageignore_outdated      |    1 +
 .../tests/utils/br2-external/utils/x-python   |    2 +
 .../utils/br2-external/utils/x-shellscript    |    2 +
 .../testing/tests/utils/test_check_package.py |   65 +
 utils/check-package                           |  122 +-
 utils/checkpackagelib/lib_mk.py               |   12 +
 utils/checkpackagelib/lib_python.py           |    1 +
 utils/checkpackagelib/lib_shellscript.py      |    5 +
 utils/checkpackagelib/lib_sysv.py             |    3 +
 utils/checkpackagelib/test_lib_mk.py          |   23 +
 utils/checkpackagelib/test_tool.py            |   28 +
 utils/checkpackagelib/tool.py                 |   20 +
 utils/docker-run                              |    2 +-
 24 files changed, 1396 insertions(+), 40 deletions(-)
 create mode 100644 .checkpackageignore
 create mode 100644 .shellcheckrc
 create mode 100644 support/testing/tests/utils/br2-external/.checkpackageignore
 create mode 100644 support/testing/tests/utils/br2-external/package/.checkpackageignore
 create mode 100644 support/testing/tests/utils/br2-external/package/.checkpackageignore_outdated
 create mode 100644 support/testing/tests/utils/br2-external/utils/x-python
 create mode 100755 support/testing/tests/utils/br2-external/utils/x-shellscript
 create mode 100644 utils/checkpackagelib/lib_python.py
 create mode 100644 utils/checkpackagelib/lib_shellscript.py

-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 01/16] DEVELOPERS: update entries for Ricardo Martincoski
  2022-07-24  5:48 [Buildroot] [PATCH 00/16] Preventing style regressions using check-package Ricardo Martincoski
@ 2022-07-24  5:48 ` Ricardo Martincoski
  2022-07-25 22:21   ` Arnout Vandecappelle
  2022-07-24  5:48 ` [Buildroot] [PATCH 02/16] utils/check-package: improve shellcheck reproducibility Ricardo Martincoski
                   ` (14 subsequent siblings)
  15 siblings, 1 reply; 32+ messages in thread
From: Ricardo Martincoski @ 2022-07-24  5:48 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 DEVELOPERS | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/DEVELOPERS b/DEVELOPERS
index ee836266be..00315ffe6f 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2466,21 +2466,16 @@ N:	Renaud Aubin <root@renaud.io>
 F:	package/libhttpparser/
 
 N:	Ricardo Martincoski <ricardo.martincoski@datacom.com.br>
+F:	.flake8
 F:	package/atop/
 F:	package/thermald/
-
-N:	Ricardo Martincoski <ricardo.martincoski@gmail.com>
 F:	support/testing/infra/
 F:	support/testing/run-tests
-F:	support/testing/tests/core/test_file_capabilities.py
-F:	support/testing/tests/download/
-F:	support/testing/tests/package/*_python*.py
 F:	support/testing/tests/package/test_atop.py
-F:	support/testing/tests/package/test_syslog_ng.py
-F:	support/testing/tests/package/test_tmux.py
 F:	support/testing/tests/utils/test_check_package.py
 F:	utils/check-package
 F:	utils/checkpackagelib/
+F:	utils/docker-run
 
 N:	Richard Braun <rbraun@sceen.net>
 F:	package/curlftpfs/
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 02/16] utils/check-package: improve shellcheck reproducibility
  2022-07-24  5:48 [Buildroot] [PATCH 00/16] Preventing style regressions using check-package Ricardo Martincoski
  2022-07-24  5:48 ` [Buildroot] [PATCH 01/16] DEVELOPERS: update entries for Ricardo Martincoski Ricardo Martincoski
@ 2022-07-24  5:48 ` Ricardo Martincoski
  2022-07-25 22:21   ` Arnout Vandecappelle
  2022-07-24  5:48 ` [Buildroot] [PATCH 03/16] utils/check-package: create an ignore list Ricardo Martincoski
                   ` (13 subsequent siblings)
  15 siblings, 1 reply; 32+ messages in thread
From: Ricardo Martincoski @ 2022-07-24  5:48 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

shellcheck is already in use to check SysV init scripts.
Currently its results can be affected by the existence of a
.shellcheckrc file in any parent directory.

For instance, in this example:
(1) /path/.shellcheckrc
(2) /path/to/.shellcheckrc
(3) /path/to/buildroot
the configs from file (1) are ignored and the configs from file (2)
override the default values from the shellcheck binary.
So the config file affects the check-package result for SysV scripts.

Avoid this reproducibility issue by adding an empty config file to the
buildroot topdir.

It can also eventually contain configs (different from default values
from sheelcheck) that we want as a standard to all shell scripts tested
by check-package.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 .shellcheckrc | 0
 DEVELOPERS    | 1 +
 2 files changed, 1 insertion(+)
 create mode 100644 .shellcheckrc

diff --git a/.shellcheckrc b/.shellcheckrc
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/DEVELOPERS b/DEVELOPERS
index 00315ffe6f..8b2fdb8f6c 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2467,6 +2467,7 @@ F:	package/libhttpparser/
 
 N:	Ricardo Martincoski <ricardo.martincoski@datacom.com.br>
 F:	.flake8
+F:	.shellcheckrc
 F:	package/atop/
 F:	package/thermald/
 F:	support/testing/infra/
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 03/16] utils/check-package: create an ignore list
  2022-07-24  5:48 [Buildroot] [PATCH 00/16] Preventing style regressions using check-package Ricardo Martincoski
  2022-07-24  5:48 ` [Buildroot] [PATCH 01/16] DEVELOPERS: update entries for Ricardo Martincoski Ricardo Martincoski
  2022-07-24  5:48 ` [Buildroot] [PATCH 02/16] utils/check-package: improve shellcheck reproducibility Ricardo Martincoski
@ 2022-07-24  5:48 ` Ricardo Martincoski
  2022-07-24  5:49 ` [Buildroot] [PATCH 04/16] support/testing: test check-package " Ricardo Martincoski
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 32+ messages in thread
From: Ricardo Martincoski @ 2022-07-24  5:48 UTC (permalink / raw)
  To: buildroot; +Cc: Sen Hastings, Ricardo Martincoski

When a new check_function is added to check-package, often there are
files in the tree that would generate warnings.

An example is the Sob check_function for patch files:
| $ ./utils/check-package --i Sob $(git ls-files) >/dev/null
| 369301 lines processed
| 46 warnings generated
Currently these warnings are listed when calling check-package directly,
and also at the output of pkg-stats, but the check_function does not run
on 'make check-package' (that is used to catch regressions on GitLab CI
'check-package' job) until all warnings in the tree are fixed.
This (theoretically) allows new .patch files be added without SoB,
without the GitLab CI catching it.

So add a way to check-package itself ignore current warnings, while
still catching new files that do not follow that new check_function.

Add a file named .checkpackageignore to the buildroot topdir.
It contains the list of check_functions that are expected to fail for
each given intree file tested by check-package.
Each entries is in the format:
<filename> <check_function> [<check_function> ...]

These are 2 examples of possible entries:
package/initscripts/init.d/rcK ConsecutiveEmptyLines EmptyLastLine Shellcheck
utils/test-pkg Shellcheck

Keeping such a list allows us to have fine-grained control over which
warning to ignore.

In order to avoid this list to grow indefinitely, containing entries for
files that are already fixed, make each entry an 'expected to fail'
instead of just an 'ignore', and generate a warning if a check_function
that was expect to fail for a given files does not generate that
warning.
Unfortunately one case that do not generate warning is an entry for a
file that is deleted in a later commit.

Add also a new option --ignore-list that can be used:
- by pkg-stats
- by developers willing to reduce the intree ignore list
- by developers of br2-external trees that want its own ignore list
- for debug and tests purposes

When using for a br2-external each entry in the ignore file is relative
to the directory that contains the ignore file. Since calling
check-package -b already uses relative paths to the directory it was
called from, when a developer wants a ignore file for a br2-external
he/she must call check-package from the directory that contains it.
For instance, with these files:
 /path/to/br2-external/.checkpackageignore
 /path/to/br2-external/package/mypackage/mypackage.mk
The file .checkpackageignore must contain entries in the format:
 package/mypackage/mypackage.mk EmptyLastLine
and the developer must call check-package this way:
 $ cd /path/to/br2-external/ && \
   /otherpath/to/check-package \
    --ignore-list=.checkpackageignore \
     -b package/mypackage/mypackage.mk

This is one more step towards standardizing the use of just
'make check-package' before submitting patches to the list.

Cc: Sen Hastings <sen@phobosdpl.com>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
Is is intentional to NOT add .checkpackageignore to my DEVELOPER entry,
I don't want to be notified for every check-package warning that once
was ignored and then becomes fixed.
---
 .checkpackageignore       |  0
 support/scripts/pkg-stats |  2 +-
 utils/check-package       | 87 ++++++++++++++++++++++++++++++++-------
 3 files changed, 72 insertions(+), 17 deletions(-)
 create mode 100644 .checkpackageignore

diff --git a/.checkpackageignore b/.checkpackageignore
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats
index a4bb5ae599..fabdb939aa 100755
--- a/support/scripts/pkg-stats
+++ b/support/scripts/pkg-stats
@@ -251,7 +251,7 @@ class Package:
         """
         Fills in the .warnings and .status['pkg-check'] fields
         """
-        cmd = [os.path.join(brpath, "utils/check-package")]
+        cmd = [os.path.join(brpath, "utils/check-package"), "--ignore-list="]
         pkgdir = os.path.dirname(os.path.join(brpath, self.path))
         self.status['pkg-check'] = ("error", "Missing")
         for root, dirs, files in os.walk(pkgdir):
diff --git a/utils/check-package b/utils/check-package
index f64daed84c..00be29d02a 100755
--- a/utils/check-package
+++ b/utils/check-package
@@ -15,10 +15,37 @@ import checkpackagelib.lib_mk
 import checkpackagelib.lib_patch
 import checkpackagelib.lib_sysv
 
+IGNORE_FILENAME = ".checkpackageignore"
 VERBOSE_LEVEL_TO_SHOW_IGNORED_FILES = 3
 flags = None  # Command line arguments.
 
 
+def get_ignored_parsers_per_file(intree_only, ignore_filename):
+    ignored = dict()
+    entry_base_dir = ''
+
+    if ignore_filename == '':
+        return ignored  # the user explicitly asked to not use any ignore list
+
+    if ignore_filename:
+        filename = os.path.abspath(ignore_filename)
+        if not intree_only:
+            # for br2-external the entries are relative to the path were the ignore list is
+            entry_base_dir = os.path.join(os.path.dirname(filename))
+    else:
+        if not intree_only:
+            return ignored  # do not use the intree ignore list when testing files in a br2-external
+        base_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
+        filename = os.path.join(base_dir, IGNORE_FILENAME)
+
+    with open(filename, "r") as f:
+        for line in f.readlines():
+            filename, warnings_str = line.split(' ', 1)
+            warnings = warnings_str.split()
+            ignored[os.path.join(entry_base_dir, filename)] = warnings
+    return ignored
+
+
 def parse_args():
     parser = argparse.ArgumentParser()
 
@@ -29,6 +56,8 @@ def parse_args():
 
     parser.add_argument("--br2-external", "-b", dest='intree_only', action="store_false",
                         help="do not apply the pathname filters used for intree files")
+    parser.add_argument("--ignore-list", dest='ignore_filename', action="store",
+                        help='override the default list of ignored warnings')
 
     parser.add_argument("--manual-url", action="store",
                         default="http://nightly.buildroot.org/",
@@ -44,7 +73,11 @@ def parse_args():
     parser.add_argument("--dry-run", action="store_true", help="print the "
                         "functions that would be called for each file (debug)")
 
-    return parser.parse_args()
+    flags = parser.parse_args()
+
+    flags.ignore_list = get_ignored_parsers_per_file(flags.intree_only, flags.ignore_filename)
+
+    return flags
 
 
 CONFIG_IN_FILENAME = re.compile(r"Config\.\S*$")
@@ -120,21 +153,25 @@ def is_external_tool(m):
     return common_inspect_rules(m)
 
 
-def print_warnings(warnings):
+def print_warnings(warnings, xfail):
     # Avoid the need to use 'return []' at the end of every check function.
     if warnings is None:
-        return 0  # No warning generated.
+        return 0, 0  # No warning generated.
 
+    if xfail:
+        return 0, 1  # Warning not generated, fail expected for this file.
     for level, message in enumerate(warnings):
         if flags.verbose >= level:
             print(message.replace("\t", "< tab  >").rstrip())
-    return 1  # One more warning to count.
+    return 1, 1  # One more warning to count.
 
 
 def check_file_using_lib(fname):
     # Count number of warnings generated and lines processed.
     nwarnings = 0
     nlines = 0
+    xfail = flags.ignore_list.get(fname, [])
+    failed = set()
 
     lib = get_lib_from_filename(fname)
     if not lib:
@@ -150,10 +187,13 @@ def check_file_using_lib(fname):
         print("{}: would run: {}".format(fname, functions_to_run))
         return nwarnings, nlines
 
-    objects = [c[1](fname, flags.manual_url) for c in internal_functions]
+    objects = [[c[0], c[1](fname, flags.manual_url)] for c in internal_functions]
 
-    for cf in objects:
-        nwarnings += print_warnings(cf.before())
+    for name, cf in objects:
+        warn, fail = print_warnings(cf.before(), name in xfail)
+        if fail > 0:
+            failed.add(name)
+        nwarnings += warn
     if six.PY3:
         f = open(fname, "r", errors="surrogateescape")
     else:
@@ -161,19 +201,34 @@ def check_file_using_lib(fname):
     lastline = ""
     for lineno, text in enumerate(f.readlines()):
         nlines += 1
-        for cf in objects:
+        for name, cf in objects:
             if cf.disable.search(lastline):
                 continue
-            nwarnings += print_warnings(cf.check_line(lineno + 1, text))
+            warn, fail = print_warnings(cf.check_line(lineno + 1, text), name in xfail)
+            if fail > 0:
+                failed.add(name)
+            nwarnings += warn
         lastline = text
     f.close()
-    for cf in objects:
-        nwarnings += print_warnings(cf.after())
-
-    tools = [c[1](fname) for c in external_tools]
-
-    for tool in tools:
-        nwarnings += print_warnings(tool.run())
+    for name, cf in objects:
+        warn, fail = print_warnings(cf.after(), name in xfail)
+        if fail > 0:
+            failed.add(name)
+        nwarnings += warn
+
+    tools = [[c[0], c[1](fname)] for c in external_tools]
+
+    for name, tool in tools:
+        warn, fail = print_warnings(tool.run(), name in xfail)
+        if fail > 0:
+            failed.add(name)
+        nwarnings += warn
+
+    for should_fail in xfail:
+        if should_fail not in failed:
+            print("{}:0: {} was expected to fail, did you fixed the file and forgot to update {}?"
+                  .format(fname, should_fail, IGNORE_FILENAME))
+            nwarnings += 1
 
     return nwarnings, nlines
 
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 04/16] support/testing: test check-package ignore list
  2022-07-24  5:48 [Buildroot] [PATCH 00/16] Preventing style regressions using check-package Ricardo Martincoski
                   ` (2 preceding siblings ...)
  2022-07-24  5:48 ` [Buildroot] [PATCH 03/16] utils/check-package: create an ignore list Ricardo Martincoski
@ 2022-07-24  5:49 ` Ricardo Martincoski
  2022-07-24  5:49 ` [Buildroot] [PATCH 05/16] utils/check-package: add --failed-only Ricardo Martincoski
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 32+ messages in thread
From: Ricardo Martincoski @ 2022-07-24  5:49 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

Extend test_check_package to also check the ignore list functionality.
Check:
- the entries in the ignore list use relative path;
- an entry in the ignore list actually ignores the warning;
- an outdated entry in the ignore list generates a warning by its own,
  preventing the ignoring list to grow indefinitely.

For this to work, add 3 test fixtures, listing entries for an
pre-existing file in the br2-external used in the test.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 .../utils/br2-external/.checkpackageignore    |  1 +
 .../br2-external/package/.checkpackageignore  |  1 +
 .../package/.checkpackageignore_outdated      |  1 +
 .../testing/tests/utils/test_check_package.py | 31 +++++++++++++++++++
 4 files changed, 34 insertions(+)
 create mode 100644 support/testing/tests/utils/br2-external/.checkpackageignore
 create mode 100644 support/testing/tests/utils/br2-external/package/.checkpackageignore
 create mode 100644 support/testing/tests/utils/br2-external/package/.checkpackageignore_outdated

diff --git a/support/testing/tests/utils/br2-external/.checkpackageignore b/support/testing/tests/utils/br2-external/.checkpackageignore
new file mode 100644
index 0000000000..efb7680173
--- /dev/null
+++ b/support/testing/tests/utils/br2-external/.checkpackageignore
@@ -0,0 +1 @@
+package/external/external.mk PackageHeader
diff --git a/support/testing/tests/utils/br2-external/package/.checkpackageignore b/support/testing/tests/utils/br2-external/package/.checkpackageignore
new file mode 100644
index 0000000000..5f4a5e1187
--- /dev/null
+++ b/support/testing/tests/utils/br2-external/package/.checkpackageignore
@@ -0,0 +1 @@
+external/external.mk PackageHeader
diff --git a/support/testing/tests/utils/br2-external/package/.checkpackageignore_outdated b/support/testing/tests/utils/br2-external/package/.checkpackageignore_outdated
new file mode 100644
index 0000000000..1df59f3bed
--- /dev/null
+++ b/support/testing/tests/utils/br2-external/package/.checkpackageignore_outdated
@@ -0,0 +1 @@
+external/external.mk Indent NewlineAtEof PackageHeader
diff --git a/support/testing/tests/utils/test_check_package.py b/support/testing/tests/utils/test_check_package.py
index c70ba02324..f21b9e939f 100644
--- a/support/testing/tests/utils/test_check_package.py
+++ b/support/testing/tests/utils/test_check_package.py
@@ -75,6 +75,12 @@ class TestCheckPackage(unittest.TestCase):
         generated = int(stderr[1].split()[0])
         self.assertGreater(generated, 0)
 
+    def assert_no_warnings_generated_for_file(self, stderr):
+        """Infer from check-package stderr if no warning was generated and fail otherwise."""
+        self.assertIn("warnings generated", stderr[1], stderr)
+        generated = int(stderr[1].split()[0])
+        self.assertEqual(generated, 0)
+
     def test_run(self):
         """Test the various ways the script can be called in a simple top to
         bottom sequence."""
@@ -201,3 +207,28 @@ class TestCheckPackage(unittest.TestCase):
         self.assert_file_was_processed(m)
         self.assert_warnings_generated_for_file(m)
         self.assertIn("{}:1: should be 80 hashes (http://nightly.buildroot.org/#writing-rules-mk)".format(abs_file), w)
+
+        # br2-external with ignore list
+        topdir_path = infra.filepath("tests/utils/br2-external")
+        topdir_file = os.path.join(topdir_path, "package/external/external.mk")
+        subdir_path = infra.filepath("tests/utils/br2-external/package")
+        subdir_file = os.path.join(subdir_path, "external/external.mk")
+
+        w, m = call_script(["check-package", "--ignore-list=./.checkpackageignore", "-b", topdir_file],
+                           self.WITH_UTILS_IN_PATH, topdir_path)
+        self.assert_file_was_processed(m)
+        self.assert_no_warnings_generated_for_file(m)
+
+        w, m = call_script(["check-package", "--ignore-list=./.checkpackageignore", "-b", subdir_file],
+                           self.WITH_UTILS_IN_PATH, subdir_path)
+        self.assert_file_was_processed(m)
+        self.assert_no_warnings_generated_for_file(m)
+
+        w, m = call_script(["check-package", "--ignore-list=./.checkpackageignore_outdated", "-b", subdir_file],
+                           self.WITH_UTILS_IN_PATH, subdir_path)
+        self.assert_file_was_processed(m)
+        self.assert_warnings_generated_for_file(m)
+        self.assertIn("{}:0: Indent was expected to fail, did you fixed the file and forgot to update .checkpackageignore?"
+                      .format(subdir_file), w)
+        self.assertIn("{}:0: NewlineAtEof was expected to fail, did you fixed the file and forgot to update .checkpackageignore?"
+                      .format(subdir_file), w)
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 05/16] utils/check-package: add --failed-only
  2022-07-24  5:48 [Buildroot] [PATCH 00/16] Preventing style regressions using check-package Ricardo Martincoski
                   ` (3 preceding siblings ...)
  2022-07-24  5:49 ` [Buildroot] [PATCH 04/16] support/testing: test check-package " Ricardo Martincoski
@ 2022-07-24  5:49 ` Ricardo Martincoski
  2022-07-24  5:49 ` [Buildroot] [PATCH 06/16] Makefile: make check-package assume a git tree Ricardo Martincoski
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 32+ messages in thread
From: Ricardo Martincoski @ 2022-07-24  5:49 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

Add a debug/test purpose option that generates output in the format:
<filename> <check_function> [<check_function> ...]
This is the very same format used by check-package ignore file.

So one can update the ignore file using:
$ ./utils/docker-run
br-user@...$ ./utils/check-package --failed-only \
               `git ls-tree -r --name-only HEAD` > .checkpackageignore

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 utils/check-package | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/utils/check-package b/utils/check-package
index 00be29d02a..1508e39c37 100755
--- a/utils/check-package
+++ b/utils/check-package
@@ -72,11 +72,17 @@ def parse_args():
                         help="do not run the specified functions (debug)")
     parser.add_argument("--dry-run", action="store_true", help="print the "
                         "functions that would be called for each file (debug)")
+    parser.add_argument("--failed-only", action="store_true", help="print only"
+                        " the name of the functions that failed (debug)")
 
     flags = parser.parse_args()
 
     flags.ignore_list = get_ignored_parsers_per_file(flags.intree_only, flags.ignore_filename)
 
+    if flags.failed_only:
+        flags.dry_run = False
+        flags.verbose = -1
+
     return flags
 
 
@@ -230,6 +236,11 @@ def check_file_using_lib(fname):
                   .format(fname, should_fail, IGNORE_FILENAME))
             nwarnings += 1
 
+    if flags.failed_only:
+        if len(failed) > 0:
+            f = " ".join(sorted(failed))
+            print("{} {}".format(fname, f))
+
     return nwarnings, nlines
 
 
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 06/16] Makefile: make check-package assume a git tree
  2022-07-24  5:48 [Buildroot] [PATCH 00/16] Preventing style regressions using check-package Ricardo Martincoski
                   ` (4 preceding siblings ...)
  2022-07-24  5:49 ` [Buildroot] [PATCH 05/16] utils/check-package: add --failed-only Ricardo Martincoski
@ 2022-07-24  5:49 ` Ricardo Martincoski
  2022-07-27 12:54   ` Romain Naour
  2022-07-24  5:49 ` [Buildroot] [PATCH 07/16] Makefile: run check-* inside docker image Ricardo Martincoski
                   ` (9 subsequent siblings)
  15 siblings, 1 reply; 32+ messages in thread
From: Ricardo Martincoski @ 2022-07-24  5:49 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

... just like check-flake8 already does.

When a new check_function is added to check-package, often there are
files in the tree that would generate warnings.

An example is the Sob check_function for patch files:
| $ ./utils/check-package --i Sob $(git ls-files) >/dev/null
| 369301 lines processed
| 46 warnings generated
Currently these warnings are listed when calling check-package directly,
and also at the output of pkg-stats, but the check_function does not run
on 'make check-package' (that is used to catch regressions on GitLab CI
'check-package' job) until all warnings in the tree are fixed.
This (theoretically) allows new .patch files be added without SoB,
without the GitLab CI catching it.

Since now check-package has an ignore file to list all warnings in the
tree, that will eventually be fixed, there is no need to filter the
files passed to check-package.
So test all files in the tree when 'make check-package' is called.
It brings following advantages;
- any new check_function added to check-package takes place immediately
  for new files;
- adding new check_functions is less traumatic to the developer doing
  this, since he/she does not need anymore to fix all warnings in the
  tree before the new check_function takes effect;
- prevent regressions, e.g. ANY new .hash file must have 2 spaces;
- as a side-effect, print a single statistics line as output of
  'make ckeck-package'.

But just enabling the check would generate many warnings when
'make check-package' is called, so update the ignore file by using:
$ ./utils/docker-run
br-user@...$ ./utils/check-package --failed-only \
               `git ls-tree -r --name-only HEAD` > .checkpackageignore

Notice: in order to ensure reproducible results, one should run
'make check-package' inside the docker image, otherwise a variation in
shellcheck version (installed in the host) can produce different
results.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
NOTE to the maintainer applying this patch: please re-generate the list
of ignored warnings while applying:
$ ./utils/docker-run
br-user@...$ ./utils/check-package --failed-only `git ls-tree -r --name-only HEAD` > .checkpackageignore
---
 .checkpackageignore | 922 ++++++++++++++++++++++++++++++++++++++++++++
 Makefile            |   3 +-
 2 files changed, 923 insertions(+), 2 deletions(-)

diff --git a/.checkpackageignore b/.checkpackageignore
index e69de29bb2..98099508ba 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -0,0 +1,922 @@
+boot/binaries-marvell/binaries-marvell.hash HashSpaces
+boot/s500-bootloader/s500-bootloader.hash HashSpaces
+boot/shim/shim.hash HashSpaces
+package/abootimg/abootimg.hash HashSpaces
+package/acpitool/acpitool.hash HashSpaces
+package/aespipe/aespipe.hash HashSpaces
+package/alsamixergui/0001-misc-fixes.patch Sob
+package/alsamixergui/alsamixergui.hash HashSpaces
+package/alure/alure.hash HashSpaces
+package/am33x-cm3/S93-am335x-pm-firmware-load Variables
+package/android-tools/0008-Include-sysmacros.h-to-compile-with-glibc-2.28.patch Sob
+package/android-tools/android-tools.hash HashSpaces
+package/angular-websocket/angular-websocket.hash HashSpaces
+package/aoetools/aoetools.hash HashSpaces
+package/apache/S50apache Indent Shellcheck Variables
+package/apr-util/apr-util.hash HashSpaces
+package/apr/apr.hash HashSpaces
+package/argparse/argparse.hash HashSpaces
+package/argus/argus.hash HashSpaces
+package/arm-gnu-toolchain/arm-gnu-toolchain.hash HashSpaces
+package/arp-scan/arp-scan.hash HashSpaces
+package/arptables/arptables.hash HashSpaces
+package/ascii-invaders/ascii-invaders.hash HashSpaces
+package/asterisk/asterisk.hash HashSpaces
+package/at/S99at Indent Variables
+package/atest/atest.hash HashSpaces
+package/atf/atf.hash HashSpaces
+package/aubio/aubio.hash HashSpaces
+package/audit/S02auditd Shellcheck Variables
+package/autossh/autossh.hash HashSpaces
+package/avahi/S05avahi-setup.sh Indent Variables
+package/avahi/S50avahi-daemon Indent Variables
+package/avahi/avahi.hash HashSpaces
+package/b43-firmware/b43-firmware.hash HashSpaces
+package/b43-fwcutter/b43-fwcutter.hash HashSpaces
+package/babeld/S50babeld Indent Shellcheck Variables
+package/bc/bc.hash HashSpaces
+package/bcache-tools/bcache-tools.hash HashSpaces
+package/bcg729/bcg729.hash HashSpaces
+package/bdwgc/bdwgc.hash HashSpaces
+package/berkeleydb/berkeleydb.hash HashSpaces
+package/bind/S81named Indent Shellcheck Variables
+package/biosdevname/biosdevname.hash HashSpaces
+package/bitstream/bitstream.hash HashSpaces
+package/bluez5_utils/S40bluetooth NotExecutable Variables
+package/boinc/S99boinc-client Indent Shellcheck Variables
+package/bonnie/bonnie.hash HashSpaces
+package/brickd/S70brickd Indent Shellcheck Variables
+package/brltty/S10brltty Indent Shellcheck Variables
+package/bsdiff/bsdiff.hash HashSpaces
+package/busybox/S02sysctl Variables
+package/busybox/S10mdev ConsecutiveEmptyLines Indent Shellcheck
+package/busybox/S15watchdog Indent Variables
+package/busybox/S50telnet Indent Shellcheck Variables
+package/bzip2/bzip2.hash HashSpaces
+package/c-icap/S96cicap Indent Shellcheck Variables
+package/cache-calibrator/cache-calibrator.hash HashSpaces
+package/cage/cage.hash HashSpaces
+package/cairo/cairo.hash HashSpaces
+package/caps/caps.hash HashSpaces
+package/cbootimage/cbootimage.hash HashSpaces
+package/cctz/cctz.hash HashSpaces
+package/cfm/S65cfm Indent Variables
+package/cgic/cgic.hash HashSpaces
+package/cgilua/cgilua.hash HashSpaces
+package/cgroupfs-mount/S30cgroupfs Indent Shellcheck Variables
+package/chartjs/chartjs.hash HashSpaces
+package/chipmunk/chipmunk.hash HashSpaces
+package/chrony/S49chrony Indent Shellcheck Variables
+package/cmocka/cmocka.hash HashSpaces
+package/collectd/collectd.hash HashSpaces
+package/comix-cursors/comix-cursors.hash HashSpaces
+package/connman-gtk/connman-gtk.hash HashSpaces
+package/connman/S45connman Variables
+package/conntrack-tools/conntrack-tools.hash HashSpaces
+package/copas/copas.hash HashSpaces
+package/coxpcall/coxpcall.hash HashSpaces
+package/cpio/cpio.hash HashSpaces
+package/cppdb/cppdb.hash HashSpaces
+package/cppunit/cppunit.hash HashSpaces
+package/cpuburn-arm/cpuburn-arm.hash HashSpaces
+package/cpuload/cpuload.hash HashSpaces
+package/cracklib/cracklib.hash HashSpaces
+package/ctorrent/ctorrent.hash HashSpaces
+package/cunit/cunit.hash HashSpaces
+package/curlftpfs/0001-fix-CURLOPT_INFILESIZE.patch Sob
+package/curlftpfs/0002-free_ftpfs_file-memleak-fix.patch Sob
+package/curlftpfs/0003-nocache-memleak-fix.patch Sob
+package/curlpp/curlpp.hash HashSpaces
+package/cwiid/cwiid.hash HashSpaces
+package/cxxtest/cxxtest.hash HashSpaces
+package/czmq/czmq.hash HashSpaces
+package/dacapo/dacapo.hash HashSpaces
+package/dado/dado.hash HashSpaces
+package/dante/S50dante Indent Shellcheck Variables
+package/darkhttpd/S50darkhttpd Indent Shellcheck Variables
+package/datatables-buttons/datatables-buttons.hash HashSpaces
+package/datatables-fixedcolumns/datatables-fixedcolumns.hash HashSpaces
+package/datatables-responsive/datatables-responsive.hash HashSpaces
+package/datatables/datatables.hash HashSpaces
+package/dbus/S30dbus Indent Shellcheck TrailingSpace Variables
+package/dc3dd/dc3dd.hash HashSpaces
+package/dcron/S90dcron Variables
+package/debianutils/debianutils.hash HashSpaces
+package/dhcp/S80dhcp-relay Shellcheck Variables
+package/dhcp/S80dhcp-server Shellcheck Variables
+package/dhcpcd/S41dhcpcd Indent Variables
+package/dhcpdump/dhcpdump.hash HashSpaces
+package/dhrystone/0001-cmdline-nruns.patch Sob
+package/dhrystone/0002-HZ.patch Sob
+package/dhrystone/0003-exit.patch Sob
+package/dhrystone/0004-headers.patch Sob
+package/dhrystone/0005-prototypes.patch Sob
+package/dhrystone/dhrystone.hash HashSpaces
+package/dieharder/dieharder.hash HashSpaces
+package/directfb-examples/0001-remove-bzero.patch Sob
+package/dmraid/S20dmraid Variables
+package/dmraid/dmraid.hash HashSpaces
+package/dnsmasq/S80dnsmasq Shellcheck Variables
+package/docker-compose/docker-compose.hash HashSpaces
+package/docker-engine/S60dockerd Indent Shellcheck Variables
+package/domoticz/S99domoticz Shellcheck
+package/doom-wad/doom-wad.hash HashSpaces
+package/dropbear/S50dropbear Indent Shellcheck Variables
+package/dt/dt.hash HashSpaces
+package/dump1090/dump1090.hash HashSpaces
+package/dvblast/dvblast.hash HashSpaces
+package/dvdauthor/dvdauthor.hash HashSpaces
+package/e2tools/e2tools.hash HashSpaces
+package/earlyoom/S02earlyoom Indent Shellcheck
+package/ecryptfs-utils/ecryptfs-utils.hash HashSpaces
+package/efivar/efivar.hash HashSpaces
+package/ejabberd/S50ejabberd Indent Shellcheck Variables
+package/elftosb/elftosb.hash HashSpaces
+package/elixir/elixir.hash HashSpaces
+package/emlog/emlog.hash HashSpaces
+package/enscript/enscript.hash HashSpaces
+package/erlang-base64url/erlang-base64url.hash HashSpaces
+package/erlang-goldrush/erlang-goldrush.hash HashSpaces
+package/erlang-rebar/erlang-rebar.hash HashSpaces
+package/eudev/S10udev ConsecutiveEmptyLines Indent Shellcheck Variables
+package/exfat-utils/exfat-utils.hash HashSpaces
+package/exfat/exfat.hash HashSpaces
+package/exim/S86exim Indent Variables
+package/f2fs-tools/f2fs-tools.hash HashSpaces
+package/fail2ban/S60fail2ban Shellcheck Variables
+package/fan-ctrl/fan-ctrl.hash HashSpaces
+package/fbdump/fbdump.hash HashSpaces
+package/fbterm/fbterm.hash HashSpaces
+package/fbv/0001-cross.patch Sob
+package/fbv/0002-fix-24bpp-support-on-big-endian.patch Sob
+package/fbv/0005-include.patch Sob
+package/feh/feh.hash HashSpaces
+package/fftw/fftw-double/fftw-double.hash HashSpaces
+package/fftw/fftw-long-double/fftw-long-double.hash HashSpaces
+package/fftw/fftw-quad/fftw-quad.hash HashSpaces
+package/fftw/fftw-single/fftw-single.hash HashSpaces
+package/fftw/fftw.hash HashSpaces
+package/flannel/flannel.hash HashSpaces
+package/flex/flex.hash HashSpaces
+package/flickcurl/flickcurl.hash HashSpaces
+package/flot/flot.hash HashSpaces
+package/fluid-soundfont/fluid-soundfont.hash HashSpaces
+package/font-awesome/font-awesome.hash HashSpaces
+package/fontconfig/fontconfig.hash HashSpaces
+package/freescale-imx/imx-m4fwloader/imx-m4fwloader.hash HashSpaces
+package/freescale-imx/imx-uuc/S80imx-uuc Indent Shellcheck Variables
+package/freescale-imx/imx-uuc/imx-uuc.hash HashSpaces
+package/frr/S50frr Shellcheck
+package/fstrcmp/fstrcmp.hash HashSpaces
+package/ftop/ftop.hash HashSpaces
+package/gamin/0002-no-const-return.patch Sob
+package/gcc/arc-2020.09-release/0002-libsanitizer-Remove-cyclades-from-libsanitizer.patch Sob
+package/gconf/gconf.hash HashSpaces
+package/gengetopt/gengetopt.hash HashSpaces
+package/genpart/genpart.hash HashSpaces
+package/genromfs/0001-build-system.patch Sob
+package/geoip/geoip.hash HashSpaces
+package/gerbera/S99gerbera Indent
+package/gflags/gflags.hash HashSpaces
+package/ghostscript-fonts/ghostscript-fonts.hash HashSpaces
+package/giflib/giflib.hash HashSpaces
+package/gli/gli.hash HashSpaces
+package/glm/glm.hash HashSpaces
+package/glorytun/glorytun.hash HashSpaces
+package/gnuradio/gnuradio.hash HashSpaces
+package/go/0002-cmd-dist-use-gohostarch-for-ssa-rewrite-check.patch Sob
+package/gob2/gob2.hash HashSpaces
+package/googlefontdirectory/googlefontdirectory.hash HashSpaces
+package/gperf/gperf.hash HashSpaces
+package/gpsd/S50gpsd Indent Shellcheck Variables
+package/gstreamer1/gst1-imx/gst1-imx.hash HashSpaces
+package/gtkmm3/gtkmm3.hash HashSpaces
+package/gtksourceview/gtksourceview.hash HashSpaces
+package/hans/hans.hash HashSpaces
+package/haveged/S21haveged Shellcheck Variables
+package/heimdal/heimdal.hash HashSpaces
+package/heirloom-mailx/heirloom-mailx.hash HashSpaces
+package/htpdate/S43htpdate Shellcheck
+package/httping/httping.hash HashSpaces
+package/i2pd/S99i2pd Indent Shellcheck Variables
+package/ibrcommon/ibrcommon.hash HashSpaces
+package/ifenslave/ifenslave.hash HashSpaces
+package/ifmetric/ifmetric.hash HashSpaces
+package/ifplugd/0001-cross.patch Sob
+package/ifplugd/0002-fix-headers.patch Sob
+package/ifupdown-scripts/S40network EmptyLastLine Indent Shellcheck Variables
+package/igd2-for-linux/S99upnpd Indent Shellcheck Variables
+package/igh-ethercat/igh-ethercat.hash HashSpaces
+package/ijs/ijs.hash HashSpaces
+package/ima-evm-utils/ima-evm-utils.hash HashSpaces
+package/inadyn/S70inadyn Indent NotExecutable
+package/input-event-daemon/S99input-event-daemon ConsecutiveEmptyLines Indent Variables
+package/intltool/intltool.hash HashSpaces
+package/iodine/iodine.hash HashSpaces
+package/iptables/S35iptables Shellcheck
+package/iputils/iputils.hash HashSpaces
+package/irda-utils/0001-daemon.patch Sob
+package/irda-utils/0002-nommu.patch Sob
+package/irda-utils/0003-subdir.patch Sob
+package/irqbalance/S13irqbalance Indent Shellcheck Variables
+package/irrlicht/irrlicht.hash HashSpaces
+package/iucode-tool/S00iucode-tool Variables
+package/iucode-tool/iucode-tool.hash HashSpaces
+package/iwd/S40iwd Shellcheck Variables
+package/jailhouse/jailhouse.hash HashSpaces
+package/joe/joe.hash HashSpaces
+package/jquery/jquery.hash HashSpaces
+package/jsmin/jsmin.hash HashSpaces
+package/jsmn/jsmn.hash HashSpaces
+package/jszip/jszip.hash HashSpaces
+package/keyutils/0002-cifs.patch Sob
+package/kodi/S50kodi Shellcheck Variables
+package/kyua/kyua.hash HashSpaces
+package/lbreakout2/lbreakout2.hash HashSpaces
+package/lensfun/lensfun.hash HashSpaces
+package/libao/libao.hash HashSpaces
+package/libart/0001-art-config-cross.patch Sob
+package/libart/libart.hash HashSpaces
+package/libasplib/libasplib.hash HashSpaces
+package/libatasmart/libatasmart.hash HashSpaces
+package/libavl/libavl.hash HashSpaces
+package/libbacktrace/libbacktrace.hash HashSpaces
+package/libbson/libbson.hash HashSpaces
+package/libcddb/libcddb.hash HashSpaces
+package/libcdio-paranoia/libcdio-paranoia.hash HashSpaces
+package/libcdio/libcdio.hash HashSpaces
+package/libcgi/libcgi.hash HashSpaces
+package/libcgicc/0001-disable-documentation-option.patch Sob
+package/libcgicc/libcgicc.hash HashSpaces
+package/libcorrect/libcorrect.hash HashSpaces
+package/libcsv/libcsv.hash HashSpaces
+package/libcue/libcue.hash HashSpaces
+package/libcuefile/libcuefile.hash HashSpaces
+package/libcutl/libcutl.hash HashSpaces
+package/libdaemon/libdaemon.hash HashSpaces
+package/libdcadec/libdcadec.hash HashSpaces
+package/libdri2/libdri2.hash HashSpaces
+package/libdvbcsa/libdvbcsa.hash HashSpaces
+package/libdvbpsi/libdvbpsi.hash HashSpaces
+package/libeastl/libeastl.hash HashSpaces
+package/libee/libee.hash HashSpaces
+package/libenca/libenca.hash HashSpaces
+package/libestr/libestr.hash HashSpaces
+package/libfcgi/0002-disable-examples.patch Sob
+package/libfcgi/libfcgi.hash HashSpaces
+package/libfreefare/libfreefare.hash HashSpaces
+package/libfreeimage/libfreeimage.hash HashSpaces
+package/libftdi/0001-pkgconfig_libusb.patch Sob
+package/libftdi/0002-libftdi.pc-requires-libusb-fix-static-build.patch Sob
+package/libfuse/libfuse.hash HashSpaces
+package/libgdiplus/libgdiplus.hash HashSpaces
+package/libglade/libglade.hash HashSpaces
+package/libical/libical.hash HashSpaces
+package/libiconv/libiconv.hash HashSpaces
+package/libiio/S99iiod Shellcheck Variables
+package/libiio/libiio.hash HashSpaces
+package/libimxvpuapi/libimxvpuapi.hash HashSpaces
+package/libiscsi/libiscsi.hash HashSpaces
+package/libkcapi/libkcapi.hash HashSpaces
+package/libllcp/libllcp.hash HashSpaces
+package/liblog4c-localtime/liblog4c-localtime.hash HashSpaces
+package/liblogging/liblogging.hash HashSpaces
+package/libloki/libloki.hash HashSpaces
+package/libmad/0001-mips-h-constraint-removal.patch Sob
+package/libmbus/libmbus.hash HashSpaces
+package/libmemcached/libmemcached.hash HashSpaces
+package/libmng/libmng.hash HashSpaces
+package/libmpd/libmpd.hash HashSpaces
+package/libmspack/libmspack.hash HashSpaces
+package/libnatpmp/libnatpmp.hash HashSpaces
+package/libnet/libnet.hash HashSpaces
+package/libnetfilter_acct/libnetfilter_acct.hash HashSpaces
+package/libnfs/libnfs.hash HashSpaces
+package/libnpth/libnpth.hash HashSpaces
+package/libodb-mysql/libodb-mysql.hash HashSpaces
+package/libodb-pgsql/libodb-pgsql.hash HashSpaces
+package/libodb/libodb.hash HashSpaces
+package/libopenaptx/libopenaptx.hash HashSpaces
+package/liboping/liboping.hash HashSpaces
+package/libpam-radius-auth/libpam-radius-auth.hash HashSpaces
+package/libpciaccess/libpciaccess.hash HashSpaces
+package/libpng/libpng.hash HashSpaces
+package/libpqxx/libpqxx.hash HashSpaces
+package/libpthread-stubs/libpthread-stubs.hash HashSpaces
+package/libraw1394/libraw1394.hash HashSpaces
+package/libreplaygain/libreplaygain.hash HashSpaces
+package/libroxml/libroxml.hash HashSpaces
+package/libserial/libserial.hash HashSpaces
+package/libsha1/libsha1.hash HashSpaces
+package/libsidplay2/libsidplay2.hash HashSpaces
+package/libsigrok/libsigrok.hash HashSpaces
+package/libsigrokdecode/libsigrokdecode.hash HashSpaces
+package/libsodium/libsodium.hash HashSpaces
+package/libsquish/libsquish.hash HashSpaces
+package/libsvg-cairo/libsvg-cairo.hash HashSpaces
+package/libsvg/libsvg.hash HashSpaces
+package/libtelnet/libtelnet.hash HashSpaces
+package/libtheora/libtheora.hash HashSpaces
+package/libtommath/libtommath.hash HashSpaces
+package/libtool/libtool.hash HashSpaces
+package/libtorrent/libtorrent.hash HashSpaces
+package/libucl/libucl.hash HashSpaces
+package/libuecc/libuecc.hash HashSpaces
+package/libwebsock/libwebsock.hash HashSpaces
+package/libxml-parser-perl/libxml-parser-perl.hash HashSpaces
+package/lightning/lightning.hash HashSpaces
+package/lighttpd/S50lighttpd EmptyLastLine Indent Shellcheck Variables
+package/linux-tools/S10hyperv Indent Variables
+package/linux-zigbee/linux-zigbee.hash HashSpaces
+package/linuxptp/S65ptp4l Indent Shellcheck
+package/linuxptp/S66phc2sys Indent Shellcheck
+package/lirc-tools/S25lircd Indent Variables
+package/lirc-tools/lirc-tools.hash HashSpaces
+package/lite/0001-dfbspy-stat.patch Sob
+package/lite/0002-no-tests.patch Sob
+package/lite/0003-pkg-config.patch Sob
+package/ljlinenoise/ljlinenoise.hash HashSpaces
+package/ljsyscall/ljsyscall.hash HashSpaces
+package/lksctp-tools/lksctp-tools.hash HashSpaces
+package/lldpd/S60lldpd Indent Shellcheck Variables
+package/lockfile-progs/0001-sus3v-legacy.patch Sob
+package/log4cpp/log4cpp.hash HashSpaces
+package/logsurfer/logsurfer.hash HashSpaces
+package/lpeg/lpeg.hash HashSpaces
+package/lpty/lpty.hash HashSpaces
+package/lrandom/lrandom.hash HashSpaces
+package/lsqlite3/lsqlite3.hash HashSpaces
+package/lttng-babeltrace/lttng-babeltrace.hash HashSpaces
+package/lua-binaryheap/lua-binaryheap.hash HashSpaces
+package/lua-bit32/lua-bit32.hash HashSpaces
+package/lua-cjson/lua-cjson.hash HashSpaces
+package/lua-coat/lua-coat.hash HashSpaces
+package/lua-coatpersistent/lua-coatpersistent.hash HashSpaces
+package/lua-codegen/lua-codegen.hash HashSpaces
+package/lua-compat53/lua-compat53.hash HashSpaces
+package/lua-csnappy/lua-csnappy.hash HashSpaces
+package/lua-datafile/lua-datafile.hash HashSpaces
+package/lua-fifo/lua-fifo.hash HashSpaces
+package/lua-flu/lua-flu.hash HashSpaces
+package/lua-http/lua-http.hash HashSpaces
+package/lua-iconv/lua-iconv.hash HashSpaces
+package/lua-inotify/lua-inotify.hash HashSpaces
+package/lua-livr-extra/lua-livr-extra.hash HashSpaces
+package/lua-livr/lua-livr.hash HashSpaces
+package/lua-lpeg-patterns/lua-lpeg-patterns.hash HashSpaces
+package/lua-lunitx/lua-lunitx.hash HashSpaces
+package/lua-lunix/lua-lunix.hash HashSpaces
+package/lua-markdown/lua-markdown.hash HashSpaces
+package/lua-messagepack/lua-messagepack.hash HashSpaces
+package/lua-periphery/lua-periphery.hash HashSpaces
+package/lua-resty-http/lua-resty-http.hash HashSpaces
+package/lua-rotas/lua-rotas.hash HashSpaces
+package/lua-sailor/lua-sailor.hash HashSpaces
+package/lua-silva/lua-silva.hash HashSpaces
+package/lua-std-debug/lua-std-debug.hash HashSpaces
+package/lua-std-normalize/lua-std-normalize.hash HashSpaces
+package/lua-stdlib/lua-stdlib.hash HashSpaces
+package/lua-testmore/lua-testmore.hash HashSpaces
+package/lua-utf8/lua-utf8.hash HashSpaces
+package/lua-valua/lua-valua.hash HashSpaces
+package/lua-zlib/lua-zlib.hash HashSpaces
+package/luadbi-sqlite3/luadbi-sqlite3.hash HashSpaces
+package/luadbi/luadbi.hash HashSpaces
+package/luaexpatutils/luaexpatutils.hash HashSpaces
+package/luafilesystem/luafilesystem.hash HashSpaces
+package/luajson/luajson.hash HashSpaces
+package/lualdap/lualdap.hash HashSpaces
+package/lualogging/lualogging.hash HashSpaces
+package/luaossl/luaossl.hash HashSpaces
+package/luasql-sqlite3/luasql-sqlite3.hash HashSpaces
+package/luksmeta/luksmeta.hash HashSpaces
+package/lzma/lzma.hash HashSpaces
+package/lzo/lzo.hash HashSpaces
+package/lzop/lzop.hash HashSpaces
+package/madplay/0001-switch-to-new-alsa-api.patch Sob
+package/make/make.hash HashSpaces
+package/mali-driver/mali-driver.hash HashSpaces
+package/mariadb/S97mysqld Indent Shellcheck Variables
+package/matchbox-common/matchbox-common.hash HashSpaces
+package/matchbox-desktop/matchbox-desktop.hash HashSpaces
+package/matchbox-keyboard/matchbox-keyboard.hash HashSpaces
+package/matchbox-panel/matchbox-panel.hash HashSpaces
+package/matchbox-startup-monitor/matchbox-startup-monitor.hash HashSpaces
+package/memstat/memstat.hash HashSpaces
+package/mender-connect/S43mender-connect Shellcheck
+package/mender-grubenv/mender-grubenv.hash HashSpaces
+package/menu-cache/menu-cache.hash HashSpaces
+package/mesa3d-demos/mesa3d-demos.hash HashSpaces
+package/mg/mg.hash HashSpaces
+package/mii-diag/0001-strchr.patch Sob
+package/mini-snmpd/mini-snmpd.hash HashSpaces
+package/minidlna/S60minidlnad Indent Shellcheck Variables
+package/minimodem/minimodem.hash HashSpaces
+package/minissdpd/S50minissdpd Indent Shellcheck Variables
+package/mjpg-streamer/mjpg-streamer.hash HashSpaces
+package/mobile-broadband-provider-info/mobile-broadband-provider-info.hash HashSpaces
+package/modem-manager/S44modem-manager Shellcheck Variables
+package/monolite/monolite.hash HashSpaces
+package/mosh/mosh.hash HashSpaces
+package/mosquitto/S50mosquitto Indent Shellcheck Variables
+package/most/most.hash HashSpaces
+package/motion/S99motion Indent Shellcheck Variables
+package/mpd/S95mpd Variables
+package/mrouted/S41mrouted NotExecutable
+package/mrp/S65mrp Indent Variables
+package/multicat/multicat.hash HashSpaces
+package/multipath-tools/S60multipathd Shellcheck
+package/mupdf/mupdf.hash HashSpaces
+package/murata-cyw-fw/murata-cyw-fw.hash HashSpaces
+package/musepack/musepack.hash HashSpaces
+package/musl-compat-headers/musl-compat-headers.hash HashSpaces
+package/musl-fts/musl-fts.hash HashSpaces
+package/nanomsg/nanomsg.hash HashSpaces
+package/neard/S53neard Indent Shellcheck Variables
+package/neardal/neardal.hash HashSpaces
+package/netatalk/S50netatalk EmptyLastLine Indent Variables
+package/netcalc/netcalc.hash HashSpaces
+package/netcat/0001-signed-bit-counting.patch Sob
+package/netifrc/netifrc.hash HashSpaces
+package/netopeer2/S52netopeer2 Shellcheck Variables
+package/netplug/0001-makefile-flags.patch Sob
+package/netplug/S29netplug Indent Shellcheck Variables
+package/netsnmp/S59snmpd Indent Shellcheck Variables
+package/network-manager/S45network-manager ConsecutiveEmptyLines EmptyLastLine Shellcheck Variables
+package/newt/newt.hash HashSpaces
+package/nfacct/nfacct.hash HashSpaces
+package/nfs-utils/S60nfs ConsecutiveEmptyLines Shellcheck Variables
+package/nginx-dav-ext/nginx-dav-ext.hash HashSpaces
+package/nginx/S50nginx Indent Variables
+package/nload/nload.hash HashSpaces
+package/nodm/S90nodm Indent Shellcheck Variables
+package/nss-myhostname/nss-myhostname.hash HashSpaces
+package/nss-pam-ldapd/S45nslcd EmptyLastLine Indent Shellcheck Variables
+package/nss-pam-ldapd/nss-pam-ldapd.hash HashSpaces
+package/ntp/S49ntp.in Variables
+package/nvidia-driver/nvidia-driver.hash HashSpaces
+package/nvidia-modprobe/nvidia-modprobe.hash HashSpaces
+package/obsidian-cursors/obsidian-cursors.hash HashSpaces
+package/ocrad/ocrad.hash HashSpaces
+package/odb/odb.hash HashSpaces
+package/ofono/S46ofono Variables
+package/olsr/S50olsr Indent Shellcheck Variables
+package/olsr/olsr.hash HashSpaces
+package/omxplayer/omxplayer.hash HashSpaces
+package/opencore-amr/opencore-amr.hash HashSpaces
+package/openmpi/openmpi.hash HashSpaces
+package/openntpd/S49ntp Shellcheck Variables
+package/openobex/openobex.hash HashSpaces
+package/openpowerlink/openpowerlink.hash HashSpaces
+package/openssh/S50sshd EmptyLastLine Indent Variables
+package/opentyrian-data/opentyrian-data.hash HashSpaces
+package/openvpn/S60openvpn Indent Shellcheck Variables
+package/optee-client/S30optee Indent Shellcheck Variables
+package/opus-tools/opus-tools.hash HashSpaces
+package/opus/opus.hash HashSpaces
+package/oracle-mysql/S97mysqld Shellcheck Variables
+package/oracle-mysql/oracle-mysql.hash HashSpaces
+package/orbit/orbit.hash HashSpaces
+package/owfs/S55owserver Shellcheck Variables
+package/owfs/S60owfs Shellcheck Variables
+package/pamtester/pamtester.hash HashSpaces
+package/patch/patch.hash HashSpaces
+package/patchelf/patchelf.hash HashSpaces
+package/perl-apache-logformat-compiler/perl-apache-logformat-compiler.hash HashSpaces
+package/perl-appconfig/perl-appconfig.hash HashSpaces
+package/perl-astro-suntime/perl-astro-suntime.hash HashSpaces
+package/perl-class-inspector/perl-class-inspector.hash HashSpaces
+package/perl-class-load/perl-class-load.hash HashSpaces
+package/perl-class-method-modifiers/perl-class-method-modifiers.hash HashSpaces
+package/perl-class-std-fast/perl-class-std-fast.hash HashSpaces
+package/perl-class-std/perl-class-std.hash HashSpaces
+package/perl-cookie-baker/perl-cookie-baker.hash HashSpaces
+package/perl-crypt-blowfish/perl-crypt-blowfish.hash HashSpaces
+package/perl-crypt-cbc/perl-crypt-cbc.hash HashSpaces
+package/perl-crypt-openssl-aes/perl-crypt-openssl-aes.hash HashSpaces
+package/perl-crypt-openssl-random/perl-crypt-openssl-random.hash HashSpaces
+package/perl-datetime-tiny/perl-datetime-tiny.hash HashSpaces
+package/perl-dbd-mysql/perl-dbd-mysql.hash HashSpaces
+package/perl-dbi/perl-dbi.hash HashSpaces
+package/perl-devel-globaldestruction/perl-devel-globaldestruction.hash HashSpaces
+package/perl-devel-stacktrace-ashtml/perl-devel-stacktrace-ashtml.hash HashSpaces
+package/perl-devel-stacktrace/perl-devel-stacktrace.hash HashSpaces
+package/perl-device-serialport/perl-device-serialport.hash HashSpaces
+package/perl-digest-sha1/perl-digest-sha1.hash HashSpaces
+package/perl-dist-checkconflicts/perl-dist-checkconflicts.hash HashSpaces
+package/perl-encode-detect/perl-encode-detect.hash HashSpaces
+package/perl-encode-locale/perl-encode-locale.hash HashSpaces
+package/perl-extutils-config/perl-extutils-config.hash HashSpaces
+package/perl-extutils-helpers/perl-extutils-helpers.hash HashSpaces
+package/perl-extutils-installpaths/perl-extutils-installpaths.hash HashSpaces
+package/perl-file-sharedir-install/perl-file-sharedir-install.hash HashSpaces
+package/perl-filesys-notify-simple/perl-filesys-notify-simple.hash HashSpaces
+package/perl-gdgraph/perl-gdgraph.hash HashSpaces
+package/perl-gdtextutil/perl-gdtextutil.hash HashSpaces
+package/perl-hash-multivalue/perl-hash-multivalue.hash HashSpaces
+package/perl-html-tagset/perl-html-tagset.hash HashSpaces
+package/perl-http-date/perl-http-date.hash HashSpaces
+package/perl-http-headers-fast/perl-http-headers-fast.hash HashSpaces
+package/perl-http-multipartparser/perl-http-multipartparser.hash HashSpaces
+package/perl-http-negotiate/perl-http-negotiate.hash HashSpaces
+package/perl-i18n/perl-i18n.hash HashSpaces
+package/perl-io-interface/perl-io-interface.hash HashSpaces
+package/perl-io-socket-multicast/perl-io-socket-multicast.hash HashSpaces
+package/perl-json-tiny/perl-json-tiny.hash HashSpaces
+package/perl-locale-maketext-lexicon/perl-locale-maketext-lexicon.hash HashSpaces
+package/perl-lwp-mediatypes/perl-lwp-mediatypes.hash HashSpaces
+package/perl-mailtools/perl-mailtools.hash HashSpaces
+package/perl-math-prime-util/perl-math-prime-util.hash HashSpaces
+package/perl-mime-base64-urlsafe/perl-mime-base64-urlsafe.hash HashSpaces
+package/perl-mime-tools/perl-mime-tools.hash HashSpaces
+package/perl-module-build-tiny/perl-module-build-tiny.hash HashSpaces
+package/perl-module-build/perl-module-build.hash HashSpaces
+package/perl-module-implementation/perl-module-implementation.hash HashSpaces
+package/perl-module-runtime/perl-module-runtime.hash HashSpaces
+package/perl-mojolicious-plugin-cspheader/perl-mojolicious-plugin-cspheader.hash HashSpaces
+package/perl-mojolicious-plugin-i18n/perl-mojolicious-plugin-i18n.hash HashSpaces
+package/perl-mojolicious-plugin-securityheader/perl-mojolicious-plugin-securityheader.hash HashSpaces
+package/perl-net-snmp/perl-net-snmp.hash HashSpaces
+package/perl-net-ssleay/perl-net-ssleay.hash HashSpaces
+package/perl-netaddr-ip/perl-netaddr-ip.hash HashSpaces
+package/perl-number-bytes-human/perl-number-bytes-human.hash HashSpaces
+package/perl-path-class/perl-path-class.hash HashSpaces
+package/perl-stream-buffered/perl-stream-buffered.hash HashSpaces
+package/perl-sub-exporter-progressive/perl-sub-exporter-progressive.hash HashSpaces
+package/perl-sub-install/perl-sub-install.hash HashSpaces
+package/perl-sub-quote/perl-sub-quote.hash HashSpaces
+package/perl-sys-meminfo/perl-sys-meminfo.hash HashSpaces
+package/perl-sys-mmap/perl-sys-mmap.hash HashSpaces
+package/perl-time-parsedate/perl-time-parsedate.hash HashSpaces
+package/perl-www-form-urlencoded/perl-www-form-urlencoded.hash HashSpaces
+package/perl-www-robotrules/perl-www-robotrules.hash HashSpaces
+package/perl-x10/perl-x10.hash HashSpaces
+package/perl-xml-libxml/perl-xml-libxml.hash HashSpaces
+package/perl-xml-namespacesupport/perl-xml-namespacesupport.hash HashSpaces
+package/perl-xml-sax-base/perl-xml-sax-base.hash HashSpaces
+package/perl-xml-sax/perl-xml-sax.hash HashSpaces
+package/php-pecl-dbus/php-pecl-dbus.hash HashSpaces
+package/physfs/physfs.hash HashSpaces
+package/picocom/picocom.hash HashSpaces
+package/pigpio/S50pigpio Shellcheck Variables
+package/pimd/pimd.hash HashSpaces
+package/pixiewps/pixiewps.hash HashSpaces
+package/policycoreutils/policycoreutils.hash HashSpaces
+package/polkit/S50polkit NotExecutable Shellcheck Variables
+package/popperjs/popperjs.hash HashSpaces
+package/postgresql/S50postgresql Variables
+package/pound/pound.hash HashSpaces
+package/pptp-linux/pptp-linux.hash HashSpaces
+package/procps-ng/S02sysctl Variables
+package/proftpd/S50proftpd Indent Shellcheck Variables
+package/prosody/S50prosody Indent Shellcheck Variables
+package/pru-software-support/pru-software-support.hash HashSpaces
+package/ptm2human/ptm2human.hash HashSpaces
+package/ptpd/S65ptpd Indent Shellcheck Variables
+package/ptpd2/S65ptpd2 Indent Shellcheck Variables
+package/pulseaudio/S50pulseaudio ConsecutiveEmptyLines EmptyLastLine Indent Variables
+package/pwgen/pwgen.hash HashSpaces
+package/python-aiohttp-cors/python-aiohttp-cors.hash HashSpaces
+package/python-aiohttp-debugtoolbar/python-aiohttp-debugtoolbar.hash HashSpaces
+package/python-aiohttp-mako/python-aiohttp-mako.hash HashSpaces
+package/python-aiohttp-security/python-aiohttp-security.hash HashSpaces
+package/python-aiologstash/python-aiologstash.hash HashSpaces
+package/python-aiomonitor/python-aiomonitor.hash HashSpaces
+package/python-alsaaudio/python-alsaaudio.hash HashSpaces
+package/python-argh/python-argh.hash HashSpaces
+package/python-asgiref/python-asgiref.hash HashSpaces
+package/python-bunch/python-bunch.hash HashSpaces
+package/python-canopen/python-canopen.hash HashSpaces
+package/python-cbor/python-cbor.hash HashSpaces
+package/python-channels-redis/python-channels-redis.hash HashSpaces
+package/python-channels/python-channels.hash HashSpaces
+package/python-characteristic/python-characteristic.hash HashSpaces
+package/python-cheetah/python-cheetah.hash HashSpaces
+package/python-cheroot/python-cheroot.hash HashSpaces
+package/python-cherrypy/python-cherrypy.hash HashSpaces
+package/python-constantly/python-constantly.hash HashSpaces
+package/python-couchdb/python-couchdb.hash HashSpaces
+package/python-crcmod/python-crcmod.hash HashSpaces
+package/python-cssselect/python-cssselect.hash HashSpaces
+package/python-daemonize/python-daemonize.hash HashSpaces
+package/python-daphne/python-daphne.hash HashSpaces
+package/python-dialog3/python-dialog3.hash HashSpaces
+package/python-dicttoxml/python-dicttoxml.hash HashSpaces
+package/python-django-enumfields/python-django-enumfields.hash HashSpaces
+package/python-docker-pycreds/python-docker-pycreds.hash HashSpaces
+package/python-docker/python-docker.hash HashSpaces
+package/python-dockerpty/python-dockerpty.hash HashSpaces
+package/python-entrypoints/python-entrypoints.hash HashSpaces
+package/python-fastentrypoints/python-fastentrypoints.hash HashSpaces
+package/python-flask-babel/python-flask-babel.hash HashSpaces
+package/python-flup/python-flup.hash HashSpaces
+package/python-future/python-future.hash HashSpaces
+package/python-gitdb2/python-gitdb2.hash HashSpaces
+package/python-huepy/0001-fix-import-with-python3.patch Sob
+package/python-huepy/python-huepy.hash HashSpaces
+package/python-ibmiotf/python-ibmiotf.hash HashSpaces
+package/python-iniparse/python-iniparse.hash HashSpaces
+package/python-iowait/python-iowait.hash HashSpaces
+package/python-ipython-genutils/python-ipython-genutils.hash HashSpaces
+package/python-jaraco-classes/python-jaraco-classes.hash HashSpaces
+package/python-jaraco-functools/python-jaraco-functools.hash HashSpaces
+package/python-json-schema-validator/python-json-schema-validator.hash HashSpaces
+package/python-jsonmodels/python-jsonmodels.hash HashSpaces
+package/python-keyring/python-keyring.hash HashSpaces
+package/python-kiwisolver/python-kiwisolver.hash HashSpaces
+package/python-libusb1/python-libusb1.hash HashSpaces
+package/python-lockfile/python-lockfile.hash HashSpaces
+package/python-logbook/python-logbook.hash HashSpaces
+package/python-m2r/python-m2r.hash HashSpaces
+package/python-matplotlib/python-matplotlib.hash HashSpaces
+package/python-mimeparse/python-mimeparse.hash HashSpaces
+package/python-mistune/python-mistune.hash HashSpaces
+package/python-nested-dict/python-nested-dict.hash HashSpaces
+package/python-netaddr/python-netaddr.hash HashSpaces
+package/python-networkmanager/python-networkmanager.hash HashSpaces
+package/python-numpy/python-numpy.hash HashSpaces
+package/python-paho-mqtt/python-paho-mqtt.hash HashSpaces
+package/python-pathpy/python-pathpy.hash HashSpaces
+package/python-pathtools/python-pathtools.hash HashSpaces
+package/python-pexpect/python-pexpect.hash HashSpaces
+package/python-pickleshare/python-pickleshare.hash HashSpaces
+package/python-piexif/python-piexif.hash HashSpaces
+package/python-ply/python-ply.hash HashSpaces
+package/python-portend/python-portend.hash HashSpaces
+package/python-pyaes/python-pyaes.hash HashSpaces
+package/python-pyicu/python-pyicu.hash HashSpaces
+package/python-pylibftdi/python-pylibftdi.hash HashSpaces
+package/python-pyqrcode/python-pyqrcode.hash HashSpaces
+package/python-pyratemp/python-pyratemp.hash HashSpaces
+package/python-pyroute2/python-pyroute2.hash HashSpaces
+package/python-pysmi/python-pysmi.hash HashSpaces
+package/python-pysnmp-mibs/python-pysnmp-mibs.hash HashSpaces
+package/python-pysnmp/python-pysnmp.hash HashSpaces
+package/python-pysocks/python-pysocks.hash HashSpaces
+package/python-pytablereader/python-pytablereader.hash HashSpaces
+package/python-pytablewriter/python-pytablewriter.hash HashSpaces
+package/python-pytest/python-pytest.hash HashSpaces
+package/python-pyxb/python-pyxb.hash HashSpaces
+package/python-raven/python-raven.hash HashSpaces
+package/python-requests-toolbelt/python-requests-toolbelt.hash HashSpaces
+package/python-rpi-gpio/python-rpi-gpio.hash HashSpaces
+package/python-scandir/python-scandir.hash HashSpaces
+package/python-sdnotify/python-sdnotify.hash HashSpaces
+package/python-see/python-see.hash HashSpaces
+package/python-setuptools-scm-git-archive/python-setuptools-scm-git-archive.hash HashSpaces
+package/python-shutilwhich/python-shutilwhich.hash HashSpaces
+package/python-simplegeneric/python-simplegeneric.hash HashSpaces
+package/python-simplesqlite/python-simplesqlite.hash HashSpaces
+package/python-smbus-cffi/python-smbus-cffi.hash HashSpaces
+package/python-spidev/python-spidev.hash HashSpaces
+package/python-sqlalchemy/python-sqlalchemy.hash HashSpaces
+package/python-sqlparse/python-sqlparse.hash HashSpaces
+package/python-systemd/python-systemd.hash HashSpaces
+package/python-tempora/python-tempora.hash HashSpaces
+package/python-termcolor/python-termcolor.hash HashSpaces
+package/python-tomako/python-tomako.hash HashSpaces
+package/python-tqdm/python-tqdm.hash HashSpaces
+package/python-txtorcon/python-txtorcon.hash HashSpaces
+package/python-vcversioner/python-vcversioner.hash HashSpaces
+package/python-visitor/python-visitor.hash HashSpaces
+package/python-web2py/S51web2py Shellcheck Variables
+package/python-webencodings/python-webencodings.hash HashSpaces
+package/python-webpy/python-webpy.hash HashSpaces
+package/python-whoosh/python-whoosh.hash HashSpaces
+package/python-ws4py/python-ws4py.hash HashSpaces
+package/python-xlib/python-xlib.hash HashSpaces
+package/python-xlutils/python-xlutils.hash HashSpaces
+package/python-xlwt/python-xlwt.hash HashSpaces
+package/python-zc-lockfile/python-zc-lockfile.hash HashSpaces
+package/qoriq-cadence-dp-firmware/qoriq-cadence-dp-firmware.hash HashSpaces
+package/qt5/qt5enginio/qt5enginio.hash HashSpaces
+package/quagga/quagga.hash HashSpaces
+package/quotatool/quotatool.hash HashSpaces
+package/rabbitmq-server/S50rabbitmq-server Indent Shellcheck Variables
+package/rapidjson/rapidjson.hash HashSpaces
+package/rapidxml/rapidxml.hash HashSpaces
+package/raspi-gpio/raspi-gpio.hash HashSpaces
+package/rcw-smarc-sal28/rcw-smarc-sal28.hash HashSpaces
+package/rdesktop/0001-8bit-colors.patch Sob
+package/reaver/reaver.hash HashSpaces
+package/redis/S50redis Shellcheck Variables
+package/restorecond/S02restorecond Shellcheck
+package/rings/rings.hash HashSpaces
+package/ripgrep/ripgrep.hash HashSpaces
+package/rng-tools/S21rngd Shellcheck Variables
+package/rockchip-mali/rockchip-mali.hash HashSpaces
+package/rpcbind/S30rpcbind EmptyLastLine Indent Variables
+package/rpcbind/rpcbind.hash HashSpaces
+package/rrdtool/rrdtool.hash HashSpaces
+package/rs485conf/rs485conf.hash HashSpaces
+package/rt-tests/rt-tests.hash HashSpaces
+package/rtorrent/rtorrent.hash HashSpaces
+package/rtptools/rtptools.hash HashSpaces
+package/rubix/0002-misc-fixes.patch Sob
+package/rubix/rubix.hash HashSpaces
+package/rygel/S99rygel Indent Shellcheck Variables
+package/samba4/S91smb Indent Shellcheck Variables
+package/sconeserver/sconeserver.hash HashSpaces
+package/sdl/sdl.hash HashSpaces
+package/sdl2_image/sdl2_image.hash HashSpaces
+package/sdl_gfx/sdl_gfx.hash HashSpaces
+package/seatd/S70seatd NotExecutable Variables
+package/sedutil/sedutil.hash HashSpaces
+package/ser2net/S50ser2net Indent Shellcheck Variables
+package/setools/setools.hash HashSpaces
+package/shairport-sync/S99shairport-sync Indent Shellcheck Variables
+package/shapelib/shapelib.hash HashSpaces
+package/shared-mime-info/shared-mime-info.hash HashSpaces
+package/shellinabox/shellinabox.hash HashSpaces
+package/slang/slang.hash HashSpaces
+package/smcroute/S41smcroute Indent NotExecutable Variables
+package/smcroute/smcroute.hash HashSpaces
+package/smstools3/S50smsd Shellcheck Variables
+package/smstools3/smstools3.hash HashSpaces
+package/snmpclitools/snmpclitools.hash HashSpaces
+package/softether/softether.hash HashSpaces
+package/solarus/0002-Add-a-basic-FindOpenGLES2.cmake.patch Sob
+package/sound-theme-borealis/sound-theme-borealis.hash HashSpaces
+package/sound-theme-freedesktop/sound-theme-freedesktop.hash HashSpaces
+package/squeezelite/squeezelite.hash HashSpaces
+package/squid/S97squid Indent Shellcheck Variables
+package/ssdp-responder/S50ssdpd Indent NotExecutable Shellcheck Variables
+package/sshguard/S49sshguard Indent
+package/sslh/S35sslh Indent Shellcheck Variables
+package/stunnel/S50stunnel Indent Shellcheck Variables
+package/supertuxkart/supertuxkart.hash HashSpaces
+package/supervisor/S99supervisord Variables
+package/suricata/S99suricata Shellcheck
+package/swig/swig.hash HashSpaces
+package/sylpheed/sylpheed.hash HashSpaces
+package/synergy/synergy.hash HashSpaces
+package/sysrepo/S51sysrepo-plugind Indent Shellcheck
+package/sysvinit/sysvinit.hash HashSpaces
+package/szip/szip.hash HashSpaces
+package/targetcli-fb/S50target Shellcheck Variables
+package/taskd/taskd.hash HashSpaces
+package/tcf-agent/S55tcf-agent Shellcheck Variables
+package/tcping/tcping.hash HashSpaces
+package/tftpd/S80tftpd-hpa Indent Shellcheck Variables
+package/thttpd/thttpd.hash HashSpaces
+package/ti-cgt-pru/ti-cgt-pru.hash HashSpaces
+package/ti-gfx/S80ti-gfx Shellcheck Variables
+package/ti-sgx-um/S80ti-sgx Variables
+package/time/time.hash HashSpaces
+package/tinc/tinc.hash HashSpaces
+package/tinymembench/tinymembench.hash HashSpaces
+package/tinyxml/tinyxml.hash HashSpaces
+package/tovid/tovid.hash HashSpaces
+package/tpm-tools/tpm-tools.hash HashSpaces
+package/tpm2-abrmd/S80tpm2-abrmd Indent Shellcheck Variables
+package/tpm2-totp/tpm2-totp.hash HashSpaces
+package/traceroute/traceroute.hash HashSpaces
+package/transmission/S92transmission ConsecutiveEmptyLines Indent Shellcheck Variables
+package/triggerhappy/S10triggerhappy Indent Shellcheck Variables
+package/trinity/trinity.hash HashSpaces
+package/tstools/tstools.hash HashSpaces
+package/turbolua/turbolua.hash HashSpaces
+package/tvheadend/S99tvheadend Indent Shellcheck Variables
+package/udev-gentoo-scripts/udev-gentoo-scripts.hash HashSpaces
+package/uftrace/uftrace.hash HashSpaces
+package/ulogd/ulogd.hash HashSpaces
+package/unbound/S70unbound Shellcheck
+package/unscd/S46unscd Indent Shellcheck Variables
+package/upmpdcli/S99upmpdcli Indent Shellcheck Variables
+package/urandom-scripts/S20urandom Variables
+package/urg/urg.hash HashSpaces
+package/usb_modeswitch_data/usb_modeswitch_data.hash HashSpaces
+package/usbguard/S20usbguard Indent Shellcheck Variables
+package/ussp-push/ussp-push.hash HashSpaces
+package/utp_com/utp_com.hash HashSpaces
+package/vdr-plugin-vnsiserver/vdr-plugin-vnsiserver.hash HashSpaces
+package/vmtouch/vmtouch.hash HashSpaces
+package/vsftpd/S70vsftpd Indent Shellcheck Variables
+package/vtun/vtun.hash HashSpaces
+package/watchdogd/S01watchdogd Indent NotExecutable
+package/watchdogd/watchdogd.hash HashSpaces
+package/webrtc-audio-processing/webrtc-audio-processing.hash HashSpaces
+package/wf111/wf111.hash HashSpaces
+package/whetstone/whetstone.hash HashSpaces
+package/wireless_tools/wireless_tools.hash HashSpaces
+package/wpan-tools/wpan-tools.hash HashSpaces
+package/wsapi-fcgi/wsapi-fcgi.hash HashSpaces
+package/wsapi-xavante/wsapi-xavante.hash HashSpaces
+package/wsapi/wsapi.hash HashSpaces
+package/x11r7/xapp_bdftopcf/xapp_bdftopcf.hash HashSpaces
+package/x11r7/xapp_ico/xapp_ico.hash HashSpaces
+package/x11r7/xapp_oclock/xapp_oclock.hash HashSpaces
+package/x11r7/xapp_sessreg/xapp_sessreg.hash HashSpaces
+package/x11r7/xapp_viewres/xapp_viewres.hash HashSpaces
+package/x11r7/xapp_x11perf/xapp_x11perf.hash HashSpaces
+package/x11r7/xapp_xauth/xapp_xauth.hash HashSpaces
+package/x11r7/xapp_xbacklight/xapp_xbacklight.hash HashSpaces
+package/x11r7/xapp_xbiff/xapp_xbiff.hash HashSpaces
+package/x11r7/xapp_xcompmgr/xapp_xcompmgr.hash HashSpaces
+package/x11r7/xapp_xcursorgen/xapp_xcursorgen.hash HashSpaces
+package/x11r7/xapp_xdbedizzy/xapp_xdbedizzy.hash HashSpaces
+package/x11r7/xapp_xditview/xapp_xditview.hash HashSpaces
+package/x11r7/xapp_xdm/S99xdm Indent Variables
+package/x11r7/xapp_xdriinfo/xapp_xdriinfo.hash HashSpaces
+package/x11r7/xapp_xf86dga/xapp_xf86dga.hash HashSpaces
+package/x11r7/xapp_xfd/xapp_xfd.hash HashSpaces
+package/x11r7/xapp_xfontsel/xapp_xfontsel.hash HashSpaces
+package/x11r7/xapp_xfs/xapp_xfs.hash HashSpaces
+package/x11r7/xapp_xfsinfo/xapp_xfsinfo.hash HashSpaces
+package/x11r7/xapp_xhost/xapp_xhost.hash HashSpaces
+package/x11r7/xapp_xinit/xapp_xinit.hash HashSpaces
+package/x11r7/xapp_xinput/xapp_xinput.hash HashSpaces
+package/x11r7/xapp_xkbprint/xapp_xkbprint.hash HashSpaces
+package/x11r7/xapp_xkill/xapp_xkill.hash HashSpaces
+package/x11r7/xapp_xlogo/xapp_xlogo.hash HashSpaces
+package/x11r7/xapp_xlsatoms/xapp_xlsatoms.hash HashSpaces
+package/x11r7/xapp_xlsclients/xapp_xlsclients.hash HashSpaces
+package/x11r7/xapp_xman/xapp_xman.hash HashSpaces
+package/x11r7/xapp_xmessage/xapp_xmessage.hash HashSpaces
+package/x11r7/xapp_xmodmap/xapp_xmodmap.hash HashSpaces
+package/x11r7/xapp_xmore/xapp_xmore.hash HashSpaces
+package/x11r7/xapp_xpr/xapp_xpr.hash HashSpaces
+package/x11r7/xapp_xprop/xapp_xprop.hash HashSpaces
+package/x11r7/xapp_xrandr/xapp_xrandr.hash HashSpaces
+package/x11r7/xapp_xrefresh/xapp_xrefresh.hash HashSpaces
+package/x11r7/xapp_xset/xapp_xset.hash HashSpaces
+package/x11r7/xapp_xsetpointer/xapp_xsetpointer.hash HashSpaces
+package/x11r7/xapp_xsetroot/xapp_xsetroot.hash HashSpaces
+package/x11r7/xapp_xstdcmap/xapp_xstdcmap.hash HashSpaces
+package/x11r7/xapp_xvinfo/xapp_xvinfo.hash HashSpaces
+package/x11r7/xapp_xwininfo/xapp_xwininfo.hash HashSpaces
+package/x11r7/xapp_xwud/xapp_xwud.hash HashSpaces
+package/x11r7/xcb-util-cursor/xcb-util-cursor.hash HashSpaces
+package/x11r7/xcb-util-image/xcb-util-image.hash HashSpaces
+package/x11r7/xcb-util-keysyms/xcb-util-keysyms.hash HashSpaces
+package/x11r7/xcb-util-wm/xcb-util-wm.hash HashSpaces
+package/x11r7/xdata_xbitmaps/xdata_xbitmaps.hash HashSpaces
+package/x11r7/xdata_xcursor-themes/xdata_xcursor-themes.hash HashSpaces
+package/x11r7/xdriver_xf86-input-evdev/xdriver_xf86-input-evdev.hash HashSpaces
+package/x11r7/xdriver_xf86-input-mouse/xdriver_xf86-input-mouse.hash HashSpaces
+package/x11r7/xdriver_xf86-input-synaptics/xdriver_xf86-input-synaptics.hash HashSpaces
+package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib.hash HashSpaces
+package/x11r7/xdriver_xf86-video-ati/xdriver_xf86-video-ati.hash HashSpaces
+package/x11r7/xdriver_xf86-video-fbdev/xdriver_xf86-video-fbdev.hash HashSpaces
+package/x11r7/xdriver_xf86-video-i128/xdriver_xf86-video-i128.hash HashSpaces
+package/x11r7/xdriver_xf86-video-mach64/0001-cross-compile.patch Sob
+package/x11r7/xdriver_xf86-video-mach64/xdriver_xf86-video-mach64.hash HashSpaces
+package/x11r7/xdriver_xf86-video-mga/0001-misc-fixes.patch Sob
+package/x11r7/xdriver_xf86-video-mga/xdriver_xf86-video-mga.hash HashSpaces
+package/x11r7/xdriver_xf86-video-neomagic/xdriver_xf86-video-neomagic.hash HashSpaces
+package/x11r7/xdriver_xf86-video-r128/xdriver_xf86-video-r128.hash HashSpaces
+package/x11r7/xdriver_xf86-video-savage/0001-cross-compile.patch Sob
+package/x11r7/xdriver_xf86-video-siliconmotion/xdriver_xf86-video-siliconmotion.hash HashSpaces
+package/x11r7/xdriver_xf86-video-sis/xdriver_xf86-video-sis.hash HashSpaces
+package/x11r7/xdriver_xf86-video-tdfx/0001-cross.patch Sob
+package/x11r7/xdriver_xf86-video-tdfx/xdriver_xf86-video-tdfx.hash HashSpaces
+package/x11r7/xdriver_xf86-video-trident/xdriver_xf86-video-trident.hash HashSpaces
+package/x11r7/xdriver_xf86-video-vmware/xdriver_xf86-video-vmware.hash HashSpaces
+package/x11r7/xfont_encodings/xfont_encodings.hash HashSpaces
+package/x11r7/xfont_font-bh-ttf/xfont_font-bh-ttf.hash HashSpaces
+package/x11r7/xfont_font-util/xfont_font-util.hash HashSpaces
+package/x11r7/xlib_libFS/xlib_libFS.hash HashSpaces
+package/x11r7/xlib_libICE/xlib_libICE.hash HashSpaces
+package/x11r7/xlib_libSM/xlib_libSM.hash HashSpaces
+package/x11r7/xlib_libXScrnSaver/xlib_libXScrnSaver.hash HashSpaces
+package/x11r7/xlib_libXau/xlib_libXau.hash HashSpaces
+package/x11r7/xlib_libXcomposite/xlib_libXcomposite.hash HashSpaces
+package/x11r7/xlib_libXdamage/xlib_libXdamage.hash HashSpaces
+package/x11r7/xlib_libXdmcp/xlib_libXdmcp.hash HashSpaces
+package/x11r7/xlib_libXext/xlib_libXext.hash HashSpaces
+package/x11r7/xlib_libXfixes/xlib_libXfixes.hash HashSpaces
+package/x11r7/xlib_libXfont/xlib_libXfont.hash HashSpaces
+package/x11r7/xlib_libXinerama/xlib_libXinerama.hash HashSpaces
+package/x11r7/xlib_libXmu/xlib_libXmu.hash HashSpaces
+package/x11r7/xlib_libXpm/xlib_libXpm.hash HashSpaces
+package/x11r7/xlib_libXrandr/xlib_libXrandr.hash HashSpaces
+package/x11r7/xlib_libXrender/xlib_libXrender.hash HashSpaces
+package/x11r7/xlib_libXt/xlib_libXt.hash HashSpaces
+package/x11r7/xlib_libXv/xlib_libXv.hash HashSpaces
+package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga.hash HashSpaces
+package/x11r7/xlib_libXxf86vm/xlib_libXxf86vm.hash HashSpaces
+package/x11r7/xlib_libdmx/xlib_libdmx.hash HashSpaces
+package/x11r7/xlib_libfontenc/xlib_libfontenc.hash HashSpaces
+package/x11r7/xlib_libxkbfile/xlib_libxkbfile.hash HashSpaces
+package/x11r7/xlib_libxshmfence/xlib_libxshmfence.hash HashSpaces
+package/x11r7/xlib_xtrans/xlib_xtrans.hash HashSpaces
+package/x11r7/xserver_xorg-server/S40xorg Shellcheck Variables
+package/x11r7/xutil_makedepend/xutil_makedepend.hash HashSpaces
+package/xavante/xavante.hash HashSpaces
+package/xmlstarlet/xmlstarlet.hash HashSpaces
+package/xutil_util-macros/xutil_util-macros.hash HashSpaces
+package/yad/yad.hash HashSpaces
+package/zip/zip.hash HashSpaces
+package/zmqpp/zmqpp.hash HashSpaces
+package/zxing-cpp/zxing-cpp.hash HashSpaces
+toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.hash HashSpaces
+toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.hash HashSpaces
+toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.hash HashSpaces
+toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.hash HashSpaces
+toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.hash HashSpaces
+toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.hash HashSpaces
+toolchain/toolchain-external/toolchain-external-linaro-aarch64-be/toolchain-external-linaro-aarch64-be.hash HashSpaces
+toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.hash HashSpaces
+toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.hash HashSpaces
+toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.hash HashSpaces
+toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.hash HashSpaces
diff --git a/Makefile b/Makefile
index 4305c8c3dd..bd7ab9675d 100644
--- a/Makefile
+++ b/Makefile
@@ -1245,8 +1245,7 @@ check-flake8:
 	| xargs -- python3 -m flake8 --statistics
 
 check-package:
-	find $(TOPDIR) -type f \( -name '*.mk' -o -name '*.hash' -o -name 'Config.*' -o -name '*.patch' \) \
-		-exec ./utils/check-package --exclude=Sob --exclude=HashSpaces {} +
+	$(Q)./utils/check-package `git ls-tree -r --name-only HEAD`
 
 include docs/manual/manual.mk
 -include $(foreach dir,$(BR2_EXTERNAL_DIRS),$(sort $(wildcard $(dir)/docs/*/*.mk)))
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 07/16] Makefile: run check-* inside docker image
  2022-07-24  5:48 [Buildroot] [PATCH 00/16] Preventing style regressions using check-package Ricardo Martincoski
                   ` (5 preceding siblings ...)
  2022-07-24  5:49 ` [Buildroot] [PATCH 06/16] Makefile: make check-package assume a git tree Ricardo Martincoski
@ 2022-07-24  5:49 ` Ricardo Martincoski
  2022-07-27 13:16   ` Romain Naour
  2022-07-24  5:49 ` [Buildroot] [PATCH 08/16] docs/manual: check-package before submitting patch Ricardo Martincoski
                   ` (8 subsequent siblings)
  15 siblings, 1 reply; 32+ messages in thread
From: Ricardo Martincoski @ 2022-07-24  5:49 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

Currently the result for both check-package and check-flake8 targets
depend on the version of the tools flake8 and shellcheck installed on
the host.

In order to ensure reproducibility across machines of different
developers, always use the docker image to run these targets.

When one of these targets is called, test if it is already running
inside the docker image, and if it not, start the docker image and run
the same command inside it.
Do the check for the docker image in a simple way: just check current
user belongs only to group br-user. It is very unlikely a developer has
exactly this user configuration in the host.

Add a note in the Dockerfile about this use.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 Makefile                  | 10 ++++++++++
 support/docker/Dockerfile |  1 +
 2 files changed, 11 insertions(+)

diff --git a/Makefile b/Makefile
index bd7ab9675d..f42dc3151d 100644
--- a/Makefile
+++ b/Makefile
@@ -1237,6 +1237,15 @@ release:
 print-version:
 	@echo $(BR2_VERSION_FULL)
 
+check_inside_docker := $(shell if [ "`groups`" = 'br-user' ]; then echo y; else echo n; fi)
+
+# List of target that need to run inside docker image to ensure reproducible results
+inside_docker_targets := check-package check-flake8
+
+ifeq ($(check_inside_docker),n)
+$(inside_docker_targets):
+	$(Q)utils/docker-run $(MAKE) V=$(V) $@
+else
 check-flake8:
 	$(Q)git ls-tree -r --name-only HEAD \
 	| xargs file \
@@ -1246,6 +1255,7 @@ check-flake8:
 
 check-package:
 	$(Q)./utils/check-package `git ls-tree -r --name-only HEAD`
+endif
 
 include docs/manual/manual.mk
 -include $(foreach dir,$(BR2_EXTERNAL_DIRS),$(sort $(wildcard $(dir)/docs/*/*.mk)))
diff --git a/support/docker/Dockerfile b/support/docker/Dockerfile
index f54c31b54a..afe8911e78 100644
--- a/support/docker/Dockerfile
+++ b/support/docker/Dockerfile
@@ -60,6 +60,7 @@ RUN sed -i 's/# \(en_US.UTF-8\)/\1/' /etc/locale.gen && \
 RUN useradd -ms /bin/bash br-user && \
     chown -R br-user:br-user /home/br-user
 
+# Note: below user is used to check if we are running inside docker
 USER br-user
 WORKDIR /home/br-user
 ENV HOME /home/br-user
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 08/16] docs/manual: check-package before submitting patch
  2022-07-24  5:48 [Buildroot] [PATCH 00/16] Preventing style regressions using check-package Ricardo Martincoski
                   ` (6 preceding siblings ...)
  2022-07-24  5:49 ` [Buildroot] [PATCH 07/16] Makefile: run check-* inside docker image Ricardo Martincoski
@ 2022-07-24  5:49 ` Ricardo Martincoski
  2022-07-27 13:22   ` Romain Naour
  2022-07-24  5:49 ` [Buildroot] [PATCH 09/16] support/docker: add python3-magic Ricardo Martincoski
                   ` (7 subsequent siblings)
  15 siblings, 1 reply; 32+ messages in thread
From: Ricardo Martincoski @ 2022-07-24  5:49 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas De Schampheleire, Ricardo Martincoski

Add 'make check-package' to the default workflow of submitting patches,
just after the rebase and before using format-patch.

Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 docs/manual/contribute.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/docs/manual/contribute.txt b/docs/manual/contribute.txt
index e588c69be6..c5652af7a0 100644
--- a/docs/manual/contribute.txt
+++ b/docs/manual/contribute.txt
@@ -294,6 +294,12 @@ $ git fetch --all --tags
 $ git rebase origin/master
 ---------------------
 
+Now run some basic checks for the changes you committed:
+
+---------------------
+$ make check-package
+---------------------
+
 Now, you are ready to generate then submit your patch set.
 
 To generate it, run:
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 09/16] support/docker: add python3-magic
  2022-07-24  5:48 [Buildroot] [PATCH 00/16] Preventing style regressions using check-package Ricardo Martincoski
                   ` (7 preceding siblings ...)
  2022-07-24  5:49 ` [Buildroot] [PATCH 08/16] docs/manual: check-package before submitting patch Ricardo Martincoski
@ 2022-07-24  5:49 ` Ricardo Martincoski
  2022-07-24  5:49 ` [Buildroot] [PATCH 10/16] utils/check-package: check all shell scripts Ricardo Martincoski
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 32+ messages in thread
From: Ricardo Martincoski @ 2022-07-24  5:49 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

It will be needed by check-package to run checks according to the file
type (the same determined by the command 'file').

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
NOTE to the maintainer applying this patch: all patches after this in
the series assume this patch was applied, a new docker image was
generated and its version was updated in .gitlab.yml
---
 support/docker/Dockerfile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/support/docker/Dockerfile b/support/docker/Dockerfile
index afe8911e78..76501048ff 100644
--- a/support/docker/Dockerfile
+++ b/support/docker/Dockerfile
@@ -39,6 +39,7 @@ RUN apt-get install -y --no-install-recommends \
         openssh-server \
         python3 \
         python3-flake8 \
+        python3-magic \
         python3-nose2 \
         python3-pexpect \
         python3-pytest \
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 10/16] utils/check-package: check all shell scripts
  2022-07-24  5:48 [Buildroot] [PATCH 00/16] Preventing style regressions using check-package Ricardo Martincoski
                   ` (8 preceding siblings ...)
  2022-07-24  5:49 ` [Buildroot] [PATCH 09/16] support/docker: add python3-magic Ricardo Martincoski
@ 2022-07-24  5:49 ` Ricardo Martincoski
  2023-04-09 21:01   ` Arnout Vandecappelle
  2022-07-24  5:49 ` [Buildroot] [PATCH 11/16] utils/check-package: check files in utils/ Ricardo Martincoski
                   ` (5 subsequent siblings)
  15 siblings, 1 reply; 32+ messages in thread
From: Ricardo Martincoski @ 2022-07-24  5:49 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

Currently only SysV init scripts are checked using shellcheck and a few
other rules (e.g. variable naming, file naming).

Extend the check using shellcheck to all shell scripts in the tree.
This is actually limited to the list of directories that check-package
knows that can check, but that list can be expanded later.

In order to apply the check to all shell scripts, use python3-magic to
determine the file type.
Keep testing first for name pattern, and only in the case there is no
match, check the file type. This ensures, for instance, that SysV
init scripts follow specific rules.

Apply these checks for shell scripts:
 - shellcheck;
 - trailing space;
 - consecutive empty lines;
 - empty last line on file;
 - newline at end of file.

Update the list of ignored warnings.

Since 'make check-package' always run using the docker image, there is
no dependency added to the host machine.

Do not add unit tests since no function was added, they were just
reused.
But expand the runtime test for check-package using as fixture a file
that generates a shellcheck warning.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
NOTE to the maintainer applying this patch: please re-generate the list
of ignored warnings while applying:
$ ./utils/docker-run
br-user@...$ ./utils/check-package --failed-only `git ls-tree -r --name-only HEAD` > .checkpackageignore
---
 .checkpackageignore                           | 20 +++++++++++++++++++
 .../utils/br2-external/utils/x-shellscript    |  2 ++
 .../testing/tests/utils/test_check_package.py | 17 ++++++++++++++++
 utils/check-package                           | 13 +++++++++++-
 utils/checkpackagelib/lib_shellscript.py      |  5 +++++
 5 files changed, 56 insertions(+), 1 deletion(-)
 create mode 100755 support/testing/tests/utils/br2-external/utils/x-shellscript
 create mode 100644 utils/checkpackagelib/lib_shellscript.py

diff --git a/.checkpackageignore b/.checkpackageignore
index 98099508ba..541f234bfd 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -52,6 +52,7 @@ package/busybox/S02sysctl Variables
 package/busybox/S10mdev ConsecutiveEmptyLines Indent Shellcheck
 package/busybox/S15watchdog Indent Variables
 package/busybox/S50telnet Indent Shellcheck Variables
+package/busybox/udhcpc.script Shellcheck
 package/bzip2/bzip2.hash HashSpaces
 package/c-icap/S96cicap Indent Shellcheck Variables
 package/cache-calibrator/cache-calibrator.hash HashSpaces
@@ -74,6 +75,7 @@ package/connman-gtk/connman-gtk.hash HashSpaces
 package/connman/S45connman Variables
 package/conntrack-tools/conntrack-tools.hash HashSpaces
 package/copas/copas.hash HashSpaces
+package/coremark-pro/coremark-pro.sh.in Shellcheck
 package/coxpcall/coxpcall.hash HashSpaces
 package/cpio/cpio.hash HashSpaces
 package/cppdb/cppdb.hash HashSpaces
@@ -104,6 +106,7 @@ package/dcron/S90dcron Variables
 package/debianutils/debianutils.hash HashSpaces
 package/dhcp/S80dhcp-relay Shellcheck Variables
 package/dhcp/S80dhcp-server Shellcheck Variables
+package/dhcp/dhclient-script Shellcheck TrailingSpace
 package/dhcpcd/S41dhcpcd Indent Variables
 package/dhcpdump/dhcpdump.hash HashSpaces
 package/dhrystone/0001-cmdline-nruns.patch Sob
@@ -131,6 +134,7 @@ package/earlyoom/S02earlyoom Indent Shellcheck
 package/ecryptfs-utils/ecryptfs-utils.hash HashSpaces
 package/efivar/efivar.hash HashSpaces
 package/ejabberd/S50ejabberd Indent Shellcheck Variables
+package/ejabberd/check-erlang-lib Shellcheck
 package/elftosb/elftosb.hash HashSpaces
 package/elixir/elixir.hash HashSpaces
 package/emlog/emlog.hash HashSpaces
@@ -144,6 +148,7 @@ package/exfat/exfat.hash HashSpaces
 package/exim/S86exim Indent Variables
 package/f2fs-tools/f2fs-tools.hash HashSpaces
 package/fail2ban/S60fail2ban Shellcheck Variables
+package/fakedate/fakedate Shellcheck
 package/fan-ctrl/fan-ctrl.hash HashSpaces
 package/fbdump/fbdump.hash HashSpaces
 package/fbterm/fbterm.hash HashSpaces
@@ -186,6 +191,7 @@ package/glorytun/glorytun.hash HashSpaces
 package/gnuradio/gnuradio.hash HashSpaces
 package/go/0002-cmd-dist-use-gohostarch-for-ssa-rewrite-check.patch Sob
 package/gob2/gob2.hash HashSpaces
+package/google-breakpad/gen-syms.sh Shellcheck
 package/googlefontdirectory/googlefontdirectory.hash HashSpaces
 package/gperf/gperf.hash HashSpaces
 package/gpsd/S50gpsd Indent Shellcheck Variables
@@ -205,11 +211,15 @@ package/ifmetric/ifmetric.hash HashSpaces
 package/ifplugd/0001-cross.patch Sob
 package/ifplugd/0002-fix-headers.patch Sob
 package/ifupdown-scripts/S40network EmptyLastLine Indent Shellcheck Variables
+package/ifupdown-scripts/network/if-pre-up.d/wait_iface EmptyLastLine Shellcheck
+package/ifupdown-scripts/nfs_check Shellcheck
 package/igd2-for-linux/S99upnpd Indent Shellcheck Variables
 package/igh-ethercat/igh-ethercat.hash HashSpaces
 package/ijs/ijs.hash HashSpaces
 package/ima-evm-utils/ima-evm-utils.hash HashSpaces
 package/inadyn/S70inadyn Indent NotExecutable
+package/initscripts/init.d/rcK ConsecutiveEmptyLines EmptyLastLine Shellcheck
+package/initscripts/init.d/rcS ConsecutiveEmptyLines EmptyLastLine Shellcheck
 package/input-event-daemon/S99input-event-daemon ConsecutiveEmptyLines Indent Variables
 package/intltool/intltool.hash HashSpaces
 package/iodine/iodine.hash HashSpaces
@@ -400,6 +410,7 @@ package/mariadb/S97mysqld Indent Shellcheck Variables
 package/matchbox-common/matchbox-common.hash HashSpaces
 package/matchbox-desktop/matchbox-desktop.hash HashSpaces
 package/matchbox-keyboard/matchbox-keyboard.hash HashSpaces
+package/matchbox-keyboard/mb-applet-kbd-wrapper.sh Shellcheck TrailingSpace
 package/matchbox-panel/matchbox-panel.hash HashSpaces
 package/matchbox-startup-monitor/matchbox-startup-monitor.hash HashSpaces
 package/memstat/memstat.hash HashSpaces
@@ -441,6 +452,7 @@ package/netifrc/netifrc.hash HashSpaces
 package/netopeer2/S52netopeer2 Shellcheck Variables
 package/netplug/0001-makefile-flags.patch Sob
 package/netplug/S29netplug Indent Shellcheck Variables
+package/netplug/netplug-script ConsecutiveEmptyLines Shellcheck
 package/netsnmp/S59snmpd Indent Shellcheck Variables
 package/network-manager/S45network-manager ConsecutiveEmptyLines EmptyLastLine Shellcheck Variables
 package/newt/newt.hash HashSpaces
@@ -470,6 +482,7 @@ package/openobex/openobex.hash HashSpaces
 package/openpowerlink/openpowerlink.hash HashSpaces
 package/openssh/S50sshd EmptyLastLine Indent Variables
 package/opentyrian-data/opentyrian-data.hash HashSpaces
+package/openvmtools/shutdown Shellcheck
 package/openvpn/S60openvpn Indent Shellcheck Variables
 package/optee-client/S30optee Indent Shellcheck Variables
 package/opus-tools/opus-tools.hash HashSpaces
@@ -561,6 +574,7 @@ package/picocom/picocom.hash HashSpaces
 package/pigpio/S50pigpio Shellcheck Variables
 package/pimd/pimd.hash HashSpaces
 package/pixiewps/pixiewps.hash HashSpaces
+package/pkgconf/pkg-config.in Shellcheck
 package/policycoreutils/policycoreutils.hash HashSpaces
 package/polkit/S50polkit NotExecutable Shellcheck Variables
 package/popperjs/popperjs.hash HashSpaces
@@ -748,9 +762,11 @@ package/supertuxkart/supertuxkart.hash HashSpaces
 package/supervisor/S99supervisord Variables
 package/suricata/S99suricata Shellcheck
 package/swig/swig.hash HashSpaces
+package/swupdate/swupdate.sh Shellcheck
 package/sylpheed/sylpheed.hash HashSpaces
 package/synergy/synergy.hash HashSpaces
 package/sysrepo/S51sysrepo-plugind Indent Shellcheck
+package/systemd/fakeroot_tmpfiles.sh Shellcheck
 package/sysvinit/sysvinit.hash HashSpaces
 package/szip/szip.hash HashSpaces
 package/targetcli-fb/S50target Shellcheck Variables
@@ -761,6 +777,7 @@ package/tftpd/S80tftpd-hpa Indent Shellcheck Variables
 package/thttpd/thttpd.hash HashSpaces
 package/ti-cgt-pru/ti-cgt-pru.hash HashSpaces
 package/ti-gfx/S80ti-gfx Shellcheck Variables
+package/ti-gfx/esrev.sh Shellcheck
 package/ti-sgx-um/S80ti-sgx Variables
 package/time/time.hash HashSpaces
 package/tinc/tinc.hash HashSpaces
@@ -789,6 +806,7 @@ package/usb_modeswitch_data/usb_modeswitch_data.hash HashSpaces
 package/usbguard/S20usbguard Indent Shellcheck Variables
 package/ussp-push/ussp-push.hash HashSpaces
 package/utp_com/utp_com.hash HashSpaces
+package/vala/vala-wrapper Shellcheck
 package/vdr-plugin-vnsiserver/vdr-plugin-vnsiserver.hash HashSpaces
 package/vmtouch/vmtouch.hash HashSpaces
 package/vsftpd/S70vsftpd Indent Shellcheck Variables
@@ -799,6 +817,7 @@ package/webrtc-audio-processing/webrtc-audio-processing.hash HashSpaces
 package/wf111/wf111.hash HashSpaces
 package/whetstone/whetstone.hash HashSpaces
 package/wireless_tools/wireless_tools.hash HashSpaces
+package/wpa_supplicant/ifupdown.sh Shellcheck
 package/wpan-tools/wpan-tools.hash HashSpaces
 package/wsapi-fcgi/wsapi-fcgi.hash HashSpaces
 package/wsapi-xavante/wsapi-xavante.hash HashSpaces
@@ -903,6 +922,7 @@ package/x11r7/xlib_xtrans/xlib_xtrans.hash HashSpaces
 package/x11r7/xserver_xorg-server/S40xorg Shellcheck Variables
 package/x11r7/xutil_makedepend/xutil_makedepend.hash HashSpaces
 package/xavante/xavante.hash HashSpaces
+package/xl2tp/xl2tpd TrailingSpace
 package/xmlstarlet/xmlstarlet.hash HashSpaces
 package/xutil_util-macros/xutil_util-macros.hash HashSpaces
 package/yad/yad.hash HashSpaces
diff --git a/support/testing/tests/utils/br2-external/utils/x-shellscript b/support/testing/tests/utils/br2-external/utils/x-shellscript
new file mode 100755
index 0000000000..a7de4124bd
--- /dev/null
+++ b/support/testing/tests/utils/br2-external/utils/x-shellscript
@@ -0,0 +1,2 @@
+#!/bin/bash
+unused="text"
diff --git a/support/testing/tests/utils/test_check_package.py b/support/testing/tests/utils/test_check_package.py
index f21b9e939f..aeda0857e3 100644
--- a/support/testing/tests/utils/test_check_package.py
+++ b/support/testing/tests/utils/test_check_package.py
@@ -232,3 +232,20 @@ class TestCheckPackage(unittest.TestCase):
                       .format(subdir_file), w)
         self.assertIn("{}:0: NewlineAtEof was expected to fail, did you fixed the file and forgot to update .checkpackageignore?"
                       .format(subdir_file), w)
+
+        # shell scripts are tested using shellcheck
+        rel_file = "utils/x-shellscript"
+        abs_path = infra.filepath("tests/utils/br2-external")
+        abs_file = os.path.join(abs_path, rel_file)
+
+        w, m = call_script(["check-package", "-b", rel_file],
+                           self.WITH_UTILS_IN_PATH, abs_path)
+        self.assert_file_was_processed(m)
+        self.assert_warnings_generated_for_file(m)
+        self.assertIn("{}:0: run 'shellcheck' and fix the warnings".format(rel_file), w)
+
+        w, m = call_script(["check-package", "-b", abs_file],
+                           self.WITH_UTILS_IN_PATH, infra.basepath())
+        self.assert_file_was_processed(m)
+        self.assert_warnings_generated_for_file(m)
+        self.assertIn("{}:0: run 'shellcheck' and fix the warnings".format(abs_file), w)
diff --git a/utils/check-package b/utils/check-package
index 1508e39c37..6612cee24e 100755
--- a/utils/check-package
+++ b/utils/check-package
@@ -3,6 +3,7 @@
 
 import argparse
 import inspect
+import magic
 import os
 import re
 import six
@@ -13,6 +14,7 @@ import checkpackagelib.lib_config
 import checkpackagelib.lib_hash
 import checkpackagelib.lib_mk
 import checkpackagelib.lib_patch
+import checkpackagelib.lib_shellscript
 import checkpackagelib.lib_sysv
 
 IGNORE_FILENAME = ".checkpackageignore"
@@ -86,6 +88,15 @@ def parse_args():
     return flags
 
 
+def get_lib_from_filetype(fname):
+    if not os.path.isfile(fname):
+        return None
+    filetype = magic.from_file(fname, mime=True)
+    if filetype == "text/x-shellscript":
+        return checkpackagelib.lib_shellscript
+    return None
+
+
 CONFIG_IN_FILENAME = re.compile(r"Config\.\S*$")
 DO_CHECK_INTREE = re.compile(r"|".join([
     r"Config.in",
@@ -129,7 +140,7 @@ def get_lib_from_filename(fname):
         return checkpackagelib.lib_patch
     if SYSV_INIT_SCRIPT_FILENAME.search(fname):
         return checkpackagelib.lib_sysv
-    return None
+    return get_lib_from_filetype(fname)
 
 
 def common_inspect_rules(m):
diff --git a/utils/checkpackagelib/lib_shellscript.py b/utils/checkpackagelib/lib_shellscript.py
new file mode 100644
index 0000000000..9b4f4aed58
--- /dev/null
+++ b/utils/checkpackagelib/lib_shellscript.py
@@ -0,0 +1,5 @@
+from checkpackagelib.lib import ConsecutiveEmptyLines  # noqa: F401
+from checkpackagelib.lib import EmptyLastLine          # noqa: F401
+from checkpackagelib.lib import NewlineAtEof           # noqa: F401
+from checkpackagelib.lib import TrailingSpace          # noqa: F401
+from checkpackagelib.tool import Shellcheck            # noqa: F401
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 11/16] utils/check-package: check files in utils/
  2022-07-24  5:48 [Buildroot] [PATCH 00/16] Preventing style regressions using check-package Ricardo Martincoski
                   ` (9 preceding siblings ...)
  2022-07-24  5:49 ` [Buildroot] [PATCH 10/16] utils/check-package: check all shell scripts Ricardo Martincoski
@ 2022-07-24  5:49 ` Ricardo Martincoski
  2023-04-09 21:02   ` Arnout Vandecappelle
  2022-07-24  5:49 ` [Buildroot] [PATCH 12/16] utils/check-package: check files in board/ Ricardo Martincoski
                   ` (4 subsequent siblings)
  15 siblings, 1 reply; 32+ messages in thread
From: Ricardo Martincoski @ 2022-07-24  5:49 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
NOTE to the maintainer applying this patch: please re-generate the list
of ignored warnings while applying:
$ ./utils/docker-run
br-user@...$ ./utils/check-package --failed-only `git ls-tree -r --name-only HEAD` > .checkpackageignore
---
 .checkpackageignore | 4 ++++
 utils/check-package | 1 +
 2 files changed, 5 insertions(+)

diff --git a/.checkpackageignore b/.checkpackageignore
index 541f234bfd..765e5c1cba 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -940,3 +940,7 @@ toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-externa
 toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.hash HashSpaces
 toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.hash HashSpaces
 toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.hash HashSpaces
+utils/brmake Shellcheck
+utils/config Shellcheck
+utils/docker-run Shellcheck
+utils/test-pkg Shellcheck
diff --git a/utils/check-package b/utils/check-package
index 6612cee24e..880fcfa21e 100755
--- a/utils/check-package
+++ b/utils/check-package
@@ -107,6 +107,7 @@ DO_CHECK_INTREE = re.compile(r"|".join([
     r"package/",
     r"system/",
     r"toolchain/",
+    r"utils/",
     ]))
 DO_NOT_CHECK_INTREE = re.compile(r"|".join([
     r"boot/barebox/barebox\.mk$",
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 12/16] utils/check-package: check files in board/
  2022-07-24  5:48 [Buildroot] [PATCH 00/16] Preventing style regressions using check-package Ricardo Martincoski
                   ` (10 preceding siblings ...)
  2022-07-24  5:49 ` [Buildroot] [PATCH 11/16] utils/check-package: check files in utils/ Ricardo Martincoski
@ 2022-07-24  5:49 ` Ricardo Martincoski
  2023-04-09 21:02   ` Arnout Vandecappelle
  2022-07-24  5:49 ` [Buildroot] [PATCH 13/16] utils/check-package: check files in support/ Ricardo Martincoski
                   ` (3 subsequent siblings)
  15 siblings, 1 reply; 32+ messages in thread
From: Ricardo Martincoski @ 2022-07-24  5:49 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

When a SysV init script is inside package/ it does not need to be
executable.
But this check does not apply in the case the script is in a fs_overlay.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
NOTE to the maintainer applying this patch: please re-generate the list
of ignored warnings while applying:
$ ./utils/docker-run
br-user@...$ ./utils/check-package --failed-only `git ls-tree -r --name-only HEAD` > .checkpackageignore
---
 .checkpackageignore               | 92 +++++++++++++++++++++++++++++++
 utils/check-package               |  1 +
 utils/checkpackagelib/lib_sysv.py |  3 +
 utils/checkpackagelib/tool.py     |  5 ++
 4 files changed, 101 insertions(+)

diff --git a/.checkpackageignore b/.checkpackageignore
index 765e5c1cba..58c05416c4 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -1,3 +1,95 @@
+board/aarch64-efi/post-image.sh Shellcheck
+board/amarula/a64-relic/post-build.sh Shellcheck
+board/amarula/vyasa/post-build.sh Shellcheck
+board/andes/ae350/post-build.sh Shellcheck
+board/arcturus/aarch64-ucls1012a/post-build.sh Shellcheck
+board/arcturus/aarch64-ucls1012a/post-image.sh Shellcheck
+board/aspeed/common/post-image.sh Shellcheck
+board/asus/tinker/post-build.sh Shellcheck
+board/atmel/flasher.sh Shellcheck
+board/beaglebone/post-build.sh Shellcheck
+board/beagleboneai/post-build.sh Shellcheck
+board/beaglev/post-build.sh Shellcheck
+board/beelink/gs1/post-build.sh Shellcheck
+board/boundarydevices/common/post-build.sh Shellcheck
+board/boundarydevices/common/post-image.sh Shellcheck
+board/canaan/k210-soc/post-build.sh Shellcheck
+board/canaan/k210-soc/rootfs_overlay/sbin/init Shellcheck
+board/chromebook/elm/sign.sh Shellcheck
+board/chromebook/mksd.sh Shellcheck
+board/chromebook/snow/linux-4.15-dts-tpm.patch ApplyOrder
+board/chromebook/snow/sign.sh Shellcheck
+board/cubietech/cubieboard2/post-image.sh Shellcheck
+board/firefly/roc-rk3399-pc/post-build.sh Shellcheck
+board/freescale/common/imx/imx8-bootloader-prepare.sh Shellcheck
+board/freescale/common/imx/post-image.sh Shellcheck
+board/freescale/common/mxs/post-image.sh Shellcheck
+board/friendlyarm/nanopc-t4/post-build.sh Shellcheck
+board/friendlyarm/nanopi-m4/post-build.sh Shellcheck
+board/friendlyarm/nanopi-neo-plus2/post-build.sh Shellcheck
+board/friendlyarm/nanopi-neo4/post-build.sh Shellcheck
+board/friendlyarm/nanopi-r2s/post-build.sh Shellcheck
+board/hardkernel/odroidc2/post-image.sh Shellcheck
+board/hardkernel/odroidc2/rootfs_overlay/etc/init.d/S09modload Shellcheck Variables
+board/hardkernel/odroidxu4/post-image.sh EmptyLastLine Shellcheck
+board/intel/galileo/post-build.sh Shellcheck
+board/intel/galileo/rootfs_overlay/etc/init.d/S09modload Shellcheck Variables
+board/kontron/bl-imx8mm/patches/uboot/0001-imx-imx8mm-imx8mm-kontron-n801x-s-convert-options-to.patch NumberedSubject
+board/kontron/bl-imx8mm/patches/uboot/0002-imx-imx8mm-imx8mm-kontron-n801x-s-add-common-board-u.patch NumberedSubject
+board/kontron/bl-imx8mm/post-build.sh Shellcheck
+board/kontron/pitx-imx8m/patches/uboot/2022.04/0001-tools-mkeficapsule-use-pkg-config-to-get-luuid-and-l.patch NumberedSubject
+board/kontron/pitx-imx8m/post-build.sh Shellcheck
+board/kontron/smarc-sal28/post-build.sh Shellcheck
+board/lego/ev3/post-image.sh Shellcheck
+board/lemaker/bananapro/post-build.sh Shellcheck
+board/lemaker/bananapro/post-image.sh Shellcheck
+board/minnowboard/post-build.sh Shellcheck
+board/nexbox/a95x/post-build.sh Shellcheck
+board/nexbox/a95x/post-image.sh Shellcheck
+board/octavo/osd32mp1-red/patches/uboot/0001-Add-OSD32MP1-RED-Device-Tree-support.patch NumberedSubject
+board/octavo/osd32mp1-red/patches/uboot/0002-configs-stm32mp15_trusted_defconfig-disable-environm.patch NumberedSubject
+board/olimex/a13_olinuxino/post-build.sh Shellcheck
+board/olimex/a20_olinuxino/post-build.sh Shellcheck
+board/olimex/a33_olinuxino/post-build.sh Shellcheck
+board/olpc/post-build.sh Shellcheck
+board/orangepi/common/post-build.sh Shellcheck
+board/orangepi/orangepi-lite2/post-build.sh Shellcheck
+board/orangepi/orangepi-one-plus/post-build.sh Shellcheck
+board/orangepi/orangepi-rk3399/post-build.sh Shellcheck
+board/pine64/rock64/post-build.sh Shellcheck
+board/pine64/rockpro64/post-build.sh Shellcheck
+board/qemu/aarch64-sbsa/assemble-flash-images Shellcheck
+board/qemu/post-image.sh Shellcheck
+board/qemu/x86/post-build.sh Shellcheck
+board/qemu/x86_64/post-build.sh Shellcheck
+board/radxa/rockpi-4/post-build.sh Shellcheck
+board/radxa/rockpi-n10/post-build.sh Shellcheck
+board/radxa/rockpi-n8/post-build.sh Shellcheck
+board/raspberrypi/post-build.sh Shellcheck
+board/raspberrypi/post-image.sh Shellcheck
+board/roseapplepi/post-build.sh Shellcheck
+board/sifive/hifive-unleashed/post-build.sh Shellcheck
+board/sinovoip/m1-plus/post-build.sh Shellcheck
+board/solidrun/clearfog/post-build.sh Shellcheck
+board/solidrun/macchiatobin/post-build-mainline.sh Shellcheck
+board/solidrun/macchiatobin/post-build.sh Shellcheck
+board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh Shellcheck
+board/stmicroelectronics/common/stm32mp157/post-image.sh Shellcheck
+board/stmicroelectronics/stm32f429-disco/flash.sh Shellcheck
+board/stmicroelectronics/stm32f469-disco/flash_sd.sh Shellcheck
+board/stmicroelectronics/stm32f469-disco/flash_xip.sh Shellcheck
+board/stmicroelectronics/stm32f469-disco/post-build.sh Shellcheck
+board/synopsys/axs10x/post-build.sh Shellcheck
+board/technologic/ts4900/post-image.sh Shellcheck
+board/toradex/apalis-imx6/post-image.sh Shellcheck
+board/udoo/common/post-build.sh Shellcheck
+board/zynq/post-build.sh Shellcheck
+board/zynq/post-image.sh Shellcheck
+board/zynqmp/kria/kv260/kv260.sh Shellcheck TrailingSpace
+board/zynqmp/kria/patches/uboot/0001-arm64-zynqmp-zynqmp-sm-k26-revA-Fix-DP-PLL-configura.patch NumberedSubject
+board/zynqmp/post-build.sh Shellcheck
+board/zynqmp/post-image.sh Shellcheck
+board/zynqmp/zcu106/patches/uboot/0001-arm64-zynqmp-zynqmp-zcu102-revA-Fix-DP-PLL-configura.patch NumberedSubject
 boot/binaries-marvell/binaries-marvell.hash HashSpaces
 boot/s500-bootloader/s500-bootloader.hash HashSpaces
 boot/shim/shim.hash HashSpaces
diff --git a/utils/check-package b/utils/check-package
index 880fcfa21e..874f58e0d2 100755
--- a/utils/check-package
+++ b/utils/check-package
@@ -101,6 +101,7 @@ CONFIG_IN_FILENAME = re.compile(r"Config\.\S*$")
 DO_CHECK_INTREE = re.compile(r"|".join([
     r"Config.in",
     r"arch/",
+    r"board/",
     r"boot/",
     r"fs/",
     r"linux/",
diff --git a/utils/checkpackagelib/lib_sysv.py b/utils/checkpackagelib/lib_sysv.py
index 386d085afc..dc4afd71b8 100644
--- a/utils/checkpackagelib/lib_sysv.py
+++ b/utils/checkpackagelib/lib_sysv.py
@@ -21,6 +21,9 @@ class Indent(_CheckFunction):
 
 
 class NotExecutable(checkpackagelib.tool.NotExecutable):
+    def ignore(self):
+        return 'etc/init.d/' in self.filename
+
     def hint(self):
         return ", just make sure you use '$(INSTALL) -D -m 0755' in the .mk file"
 
diff --git a/utils/checkpackagelib/tool.py b/utils/checkpackagelib/tool.py
index e719fdd407..632aaa9f9e 100644
--- a/utils/checkpackagelib/tool.py
+++ b/utils/checkpackagelib/tool.py
@@ -4,7 +4,12 @@ from checkpackagelib.base import _Tool
 
 
 class NotExecutable(_Tool):
+    def ignore(self):
+        return False
+
     def run(self):
+        if self.ignore():
+            return
         if os.access(self.filename, os.X_OK):
             return ["{}:0: This file does not need to be executable{}".format(self.filename, self.hint())]
 
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 13/16] utils/check-package: check files in support/
  2022-07-24  5:48 [Buildroot] [PATCH 00/16] Preventing style regressions using check-package Ricardo Martincoski
                   ` (11 preceding siblings ...)
  2022-07-24  5:49 ` [Buildroot] [PATCH 12/16] utils/check-package: check files in board/ Ricardo Martincoski
@ 2022-07-24  5:49 ` Ricardo Martincoski
  2023-04-09 21:03   ` Arnout Vandecappelle
  2022-07-24  5:49 ` [Buildroot] [PATCH 14/16] Makefile: merge check-flake8 into check-package Ricardo Martincoski
                   ` (2 subsequent siblings)
  15 siblings, 1 reply; 32+ messages in thread
From: Ricardo Martincoski @ 2022-07-24  5:49 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

The .mk files inside both support/dependencies and support/misc are not
package recipes, they are makefiles, so check-package doesn't understand
them. Therefore ignore such files.

In the test infra, some br2-externals are used as fixtures to provide
(sometimes) failure cases, so ignore files in these directories.

Files inside support/kconfig are files copied from linux upstream, so do
not generate warnings for them.

support/gnuconfig contains auto-generated config.{guess,sub} files,
so do not generate shellcheck warnings for them.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
NOTE to the maintainer applying this patch: please re-generate the list
of ignored warnings while applying:
$ ./utils/docker-run
br-user@...$ ./utils/check-package --failed-only `git ls-tree -r --name-only HEAD` > .checkpackageignore
---
 .checkpackageignore | 43 +++++++++++++++++++++++++++++++++++++++++++
 utils/check-package |  6 ++++++
 2 files changed, 49 insertions(+)

diff --git a/.checkpackageignore b/.checkpackageignore
index 58c05416c4..8f9ab48674 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -1021,6 +1021,49 @@ package/yad/yad.hash HashSpaces
 package/zip/zip.hash HashSpaces
 package/zmqpp/zmqpp.hash HashSpaces
 package/zxing-cpp/zxing-cpp.hash HashSpaces
+support/dependencies/check-host-asciidoc.sh Shellcheck
+support/dependencies/check-host-cmake.sh Shellcheck
+support/dependencies/check-host-gzip.sh Shellcheck
+support/dependencies/check-host-lzip.sh Shellcheck
+support/dependencies/check-host-make.sh Shellcheck
+support/dependencies/check-host-python3.sh Shellcheck
+support/dependencies/check-host-tar.sh Shellcheck
+support/dependencies/check-host-xzcat.sh Shellcheck
+support/dependencies/dependencies.sh Shellcheck
+support/download/bzr ConsecutiveEmptyLines Shellcheck
+support/download/cargo-post-process Shellcheck
+support/download/check-hash Shellcheck
+support/download/cvs Shellcheck
+support/download/dl-wrapper Shellcheck
+support/download/file Shellcheck
+support/download/git Shellcheck
+support/download/go-post-process Shellcheck
+support/download/hg Shellcheck
+support/download/scp Shellcheck
+support/download/sftp Shellcheck
+support/download/svn Shellcheck
+support/download/wget Shellcheck
+support/gnuconfig/update Shellcheck
+support/legal-info/buildroot.hash HashSpaces
+support/libtool/buildroot-libtool-v1.5.patch ApplyOrder Sob
+support/libtool/buildroot-libtool-v2.2.patch ApplyOrder Sob
+support/libtool/buildroot-libtool-v2.4.4.patch ApplyOrder
+support/libtool/buildroot-libtool-v2.4.patch ApplyOrder Sob
+support/misc/relocate-sdk.sh Shellcheck
+support/scripts/apply-patches.sh Shellcheck
+support/scripts/br2-external Shellcheck
+support/scripts/check-bin-arch Shellcheck
+support/scripts/check-host-rpath Shellcheck
+support/scripts/eclipse-register-toolchain Shellcheck
+support/scripts/fix-configure-powerpc64.sh EmptyLastLine
+support/scripts/fix-rpath Shellcheck
+support/scripts/generate-gitlab-ci-yml Shellcheck
+support/scripts/mkmakefile ConsecutiveEmptyLines Shellcheck
+support/scripts/mkusers Shellcheck
+support/scripts/setlocalversion Shellcheck
+support/testing/tests/core/post-build.sh Shellcheck
+support/testing/tests/package/test_opkg/post-build.sh Shellcheck
+support/testing/tests/utils/test_get_developers/0001-package-binutils-change-.mk.patch NumberedSubject
 toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.hash HashSpaces
 toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.hash HashSpaces
 toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.hash HashSpaces
diff --git a/utils/check-package b/utils/check-package
index 874f58e0d2..601d899d3d 100755
--- a/utils/check-package
+++ b/utils/check-package
@@ -106,6 +106,7 @@ DO_CHECK_INTREE = re.compile(r"|".join([
     r"fs/",
     r"linux/",
     r"package/",
+    r"support/",
     r"system/",
     r"toolchain/",
     r"utils/",
@@ -115,6 +116,11 @@ DO_NOT_CHECK_INTREE = re.compile(r"|".join([
     r"fs/common\.mk$",
     r"package/doc-asciidoc\.mk$",
     r"package/pkg-\S*\.mk$",
+    r"support/dependencies/[^/]+\.mk$",
+    r"support/gnuconfig/config\.",
+    r"support/kconfig/",
+    r"support/misc/[^/]+\.mk$",
+    r"support/testing/tests/.*br2-external/",
     r"toolchain/helpers\.mk$",
     r"toolchain/toolchain-external/pkg-toolchain-external\.mk$",
     ]))
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 14/16] Makefile: merge check-flake8 into check-package
  2022-07-24  5:48 [Buildroot] [PATCH 00/16] Preventing style regressions using check-package Ricardo Martincoski
                   ` (12 preceding siblings ...)
  2022-07-24  5:49 ` [Buildroot] [PATCH 13/16] utils/check-package: check files in support/ Ricardo Martincoski
@ 2022-07-24  5:49 ` Ricardo Martincoski
  2023-04-09 21:04   ` Arnout Vandecappelle
  2022-07-24  5:49 ` [Buildroot] [PATCH 15/16] utils/docker-run: fix shellcheck warnings Ricardo Martincoski
  2022-07-24  5:49 ` [Buildroot] [PATCH 16/16] utils/checkpackagelib: warn about $(HOST_DIR)/usr Ricardo Martincoski
  15 siblings, 1 reply; 32+ messages in thread
From: Ricardo Martincoski @ 2022-07-24  5:49 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

Teach check-package to detect python files by type and check them using
flake8.
Do not use subprocess to call 'python3 -m flake8' in order to avoid too
many spawned shells, which in its turn would slow down the check for
multiple files. (make check-package takes twice the time using a shell
for each flake8 call, when compared of importing the main application)

Expand the runtime test and the unit tests for check-package.

Since 'make check-package' always run using the docker image, there is
no dependency added to the host machine.

Remove check-flake8 from the makefile and also from the GitLab CI
because the exact same checks become part of check-package.

Suggested-by:: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 Makefile                                      | 11 ++------
 support/misc/gitlab-ci.yml.in                 |  4 ---
 support/scripts/generate-gitlab-ci-yml        |  2 +-
 .../tests/utils/br2-external/utils/x-python   |  2 ++
 .../testing/tests/utils/test_check_package.py | 17 +++++++++++
 utils/check-package                           |  3 ++
 utils/checkpackagelib/lib_python.py           |  1 +
 utils/checkpackagelib/test_tool.py            | 28 +++++++++++++++++++
 utils/checkpackagelib/tool.py                 | 15 ++++++++++
 9 files changed, 69 insertions(+), 14 deletions(-)
 create mode 100644 support/testing/tests/utils/br2-external/utils/x-python
 create mode 100644 utils/checkpackagelib/lib_python.py

diff --git a/Makefile b/Makefile
index f42dc3151d..7c7b67a616 100644
--- a/Makefile
+++ b/Makefile
@@ -125,7 +125,7 @@ endif
 noconfig_targets := menuconfig nconfig gconfig xconfig config oldconfig randconfig \
 	defconfig %_defconfig allyesconfig allnoconfig alldefconfig syncconfig release \
 	randpackageconfig allyespackageconfig allnopackageconfig \
-	print-version olddefconfig distclean manual manual-% check-package check-flake8
+	print-version olddefconfig distclean manual manual-% check-package
 
 # Some global targets do not trigger a build, but are used to collect
 # metadata, or do various checks. When such targets are triggered,
@@ -1240,19 +1240,12 @@ print-version:
 check_inside_docker := $(shell if [ "`groups`" = 'br-user' ]; then echo y; else echo n; fi)
 
 # List of target that need to run inside docker image to ensure reproducible results
-inside_docker_targets := check-package check-flake8
+inside_docker_targets := check-package
 
 ifeq ($(check_inside_docker),n)
 $(inside_docker_targets):
 	$(Q)utils/docker-run $(MAKE) V=$(V) $@
 else
-check-flake8:
-	$(Q)git ls-tree -r --name-only HEAD \
-	| xargs file \
-	| grep 'Python script' \
-	| cut -d':' -f1 \
-	| xargs -- python3 -m flake8 --statistics
-
 check-package:
 	$(Q)./utils/check-package `git ls-tree -r --name-only HEAD`
 endif
diff --git a/support/misc/gitlab-ci.yml.in b/support/misc/gitlab-ci.yml.in
index 3ac988a519..2fde904006 100644
--- a/support/misc/gitlab-ci.yml.in
+++ b/support/misc/gitlab-ci.yml.in
@@ -6,10 +6,6 @@
     script:
         - utils/get-developers -v
 
-.check-flake8_base:
-    script:
-        - make check-flake8
-
 .check-package_base:
     script:
         - make check-package
diff --git a/support/scripts/generate-gitlab-ci-yml b/support/scripts/generate-gitlab-ci-yml
index aa43aac019..536ae0f042 100755
--- a/support/scripts/generate-gitlab-ci-yml
+++ b/support/scripts/generate-gitlab-ci-yml
@@ -26,7 +26,7 @@ gen_tests() {
     local do_basics do_defconfigs do_runtime do_testpkg
     local defconfigs_ext cfg tst
 
-    basics=( check-package DEVELOPERS flake8 package )
+    basics=( check-package DEVELOPERS package )
 
     defconfigs=( $(cd configs; LC_ALL=C ls -1 *_defconfig) )
 
diff --git a/support/testing/tests/utils/br2-external/utils/x-python b/support/testing/tests/utils/br2-external/utils/x-python
new file mode 100644
index 0000000000..63f77b6be1
--- /dev/null
+++ b/support/testing/tests/utils/br2-external/utils/x-python
@@ -0,0 +1,2 @@
+#!/usr/bin/env python3
+
diff --git a/support/testing/tests/utils/test_check_package.py b/support/testing/tests/utils/test_check_package.py
index aeda0857e3..e655bff1ec 100644
--- a/support/testing/tests/utils/test_check_package.py
+++ b/support/testing/tests/utils/test_check_package.py
@@ -249,3 +249,20 @@ class TestCheckPackage(unittest.TestCase):
         self.assert_file_was_processed(m)
         self.assert_warnings_generated_for_file(m)
         self.assertIn("{}:0: run 'shellcheck' and fix the warnings".format(abs_file), w)
+
+        # python scripts are tested using flake8
+        rel_file = "utils/x-python"
+        abs_path = infra.filepath("tests/utils/br2-external")
+        abs_file = os.path.join(abs_path, rel_file)
+
+        w, m = call_script(["check-package", "-vvv", "-b", rel_file],
+                           self.WITH_UTILS_IN_PATH, abs_path)
+        self.assert_file_was_processed(m)
+        self.assert_warnings_generated_for_file(m)
+        self.assertIn("{}:0: run 'flake8' and fix the warnings".format(rel_file), w)
+
+        w, m = call_script(["check-package", "-b", abs_file],
+                           self.WITH_UTILS_IN_PATH, infra.basepath())
+        self.assert_file_was_processed(m)
+        self.assert_warnings_generated_for_file(m)
+        self.assertIn("{}:0: run 'flake8' and fix the warnings".format(abs_file), w)
diff --git a/utils/check-package b/utils/check-package
index 601d899d3d..beebef0ddb 100755
--- a/utils/check-package
+++ b/utils/check-package
@@ -14,6 +14,7 @@ import checkpackagelib.lib_config
 import checkpackagelib.lib_hash
 import checkpackagelib.lib_mk
 import checkpackagelib.lib_patch
+import checkpackagelib.lib_python
 import checkpackagelib.lib_shellscript
 import checkpackagelib.lib_sysv
 
@@ -94,6 +95,8 @@ def get_lib_from_filetype(fname):
     filetype = magic.from_file(fname, mime=True)
     if filetype == "text/x-shellscript":
         return checkpackagelib.lib_shellscript
+    if filetype in ["text/x-python", "text/x-script.python"]:
+        return checkpackagelib.lib_python
     return None
 
 
diff --git a/utils/checkpackagelib/lib_python.py b/utils/checkpackagelib/lib_python.py
new file mode 100644
index 0000000000..f8c17ddc10
--- /dev/null
+++ b/utils/checkpackagelib/lib_python.py
@@ -0,0 +1 @@
+from checkpackagelib.tool import Flake8                # noqa: F401
diff --git a/utils/checkpackagelib/test_tool.py b/utils/checkpackagelib/test_tool.py
index a0bf88001d..cfa826f57c 100644
--- a/utils/checkpackagelib/test_tool.py
+++ b/utils/checkpackagelib/test_tool.py
@@ -66,6 +66,34 @@ def test_NotExecutable_hint(testname, hint, filename, permissions, string, expec
     assert warnings == expected
 
 
+Flake8 = [
+    ('empty',
+     'empty.py',
+     '',
+     []),
+    ('W391',
+     'blank-line.py',
+     '\n',
+     ["dir/blank-line.py:0: run 'flake8' and fix the warnings",
+      "dir/blank-line.py:1:1: W391 blank line at end of file"]),
+    ('more than one warning',
+     'file',
+     'import os\n'
+     'import re\n'
+     '\n',
+     ["dir/file:0: run 'flake8' and fix the warnings",
+      "dir/file:1:1: F401 'os' imported but unused\n"
+      "dir/file:2:1: F401 're' imported but unused\n"
+      'dir/file:3:1: W391 blank line at end of file']),
+    ]
+
+
+@pytest.mark.parametrize('testname,filename,string,expected', Flake8)
+def test_Flake8(testname, filename, string, expected):
+    warnings = check_file(m.Flake8, filename, string)
+    assert warnings == expected
+
+
 Shellcheck = [
     ('missing shebang',
      'empty.sh',
diff --git a/utils/checkpackagelib/tool.py b/utils/checkpackagelib/tool.py
index 632aaa9f9e..907ada704f 100644
--- a/utils/checkpackagelib/tool.py
+++ b/utils/checkpackagelib/tool.py
@@ -1,5 +1,7 @@
+import flake8.main.application
 import os
 import subprocess
+import tempfile
 from checkpackagelib.base import _Tool
 
 
@@ -14,6 +16,19 @@ class NotExecutable(_Tool):
             return ["{}:0: This file does not need to be executable{}".format(self.filename, self.hint())]
 
 
+class Flake8(_Tool):
+    def run(self):
+        with tempfile.NamedTemporaryFile() as output:
+            app = flake8.main.application.Application()
+            app.run(['--output-file={}'.format(output.name), self.filename])
+            stdout = output.readlines()
+            processed_output = [str(line.decode().rstrip()) for line in stdout if line]
+            if len(stdout) == 0:
+                return
+            return ["{}:0: run 'flake8' and fix the warnings".format(self.filename),
+                    '\n'.join(processed_output)]
+
+
 class Shellcheck(_Tool):
     def run(self):
         cmd = ['shellcheck', self.filename]
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 15/16] utils/docker-run: fix shellcheck warnings
  2022-07-24  5:48 [Buildroot] [PATCH 00/16] Preventing style regressions using check-package Ricardo Martincoski
                   ` (13 preceding siblings ...)
  2022-07-24  5:49 ` [Buildroot] [PATCH 14/16] Makefile: merge check-flake8 into check-package Ricardo Martincoski
@ 2022-07-24  5:49 ` Ricardo Martincoski
  2023-04-09 21:05   ` Arnout Vandecappelle
  2022-07-24  5:49 ` [Buildroot] [PATCH 16/16] utils/checkpackagelib: warn about $(HOST_DIR)/usr Ricardo Martincoski
  15 siblings, 1 reply; 32+ messages in thread
From: Ricardo Martincoski @ 2022-07-24  5:49 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

SC2046: Quote this to prevent word splitting.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 .checkpackageignore | 1 -
 utils/docker-run    | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/.checkpackageignore b/.checkpackageignore
index 8f9ab48674..6f1a838562 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -1077,5 +1077,4 @@ toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-
 toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.hash HashSpaces
 utils/brmake Shellcheck
 utils/config Shellcheck
-utils/docker-run Shellcheck
 utils/test-pkg Shellcheck
diff --git a/utils/docker-run b/utils/docker-run
index 5653764254..f42dc33d0e 100755
--- a/utils/docker-run
+++ b/utils/docker-run
@@ -7,7 +7,7 @@ IMAGE=$(grep ^image: "${MAIN_DIR}/.gitlab-ci.yml" | \
         sed -e 's,^image: ,,g' | sed -e 's,\$CI_REGISTRY,registry.gitlab.com,g')
 
 exec docker run -it --rm \
-    --user $(id -u):$(id -g) \
+    --user "$(id -u)":"$(id -g)" \
     --mount "type=bind,src=${MAIN_DIR},dst=${MAIN_DIR}" \
     --workdir "${MAIN_DIR}" \
     "${IMAGE}" "${@}"
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 16/16] utils/checkpackagelib: warn about $(HOST_DIR)/usr
  2022-07-24  5:48 [Buildroot] [PATCH 00/16] Preventing style regressions using check-package Ricardo Martincoski
                   ` (14 preceding siblings ...)
  2022-07-24  5:49 ` [Buildroot] [PATCH 15/16] utils/docker-run: fix shellcheck warnings Ricardo Martincoski
@ 2022-07-24  5:49 ` Ricardo Martincoski
  15 siblings, 0 replies; 32+ messages in thread
From: Ricardo Martincoski @ 2022-07-24  5:49 UTC (permalink / raw)
  To: buildroot; +Cc: Yann E . MORIN, Ricardo Martincoski

It's been ages (5 years at the next release) that we've not installed
host packages in $(HOST_DIR)/usr, but we still have a few packages that
reference it or install things in there. See [1]

Add a new check_function that warns when a file is added installing to
or referencing $(HOST_DIR)/usr .

[1] http://patchwork.ozlabs.org/project/buildroot/patch/bc16adfe3d7143105e840072edb169e4cb7354cc.1658007000.git.yann.morin.1998@free.fr/

Cc: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
NOTE to the maintainer applying this patch: please re-generate the list
of ignored warnings while applying:
$ ./utils/docker-run
br-user@...$ ./utils/check-package --failed-only `git ls-tree -r --name-only HEAD` > .checkpackageignore

Run of unit tests:
$ utils/docker-run python3 -m pytest -vv utils/checkpackagelib/
232 passed in 0.86s
---
 .checkpackageignore                  | 22 ++++++++++++++++++++++
 utils/checkpackagelib/lib_mk.py      | 12 ++++++++++++
 utils/checkpackagelib/test_lib_mk.py | 23 +++++++++++++++++++++++
 3 files changed, 57 insertions(+)

diff --git a/.checkpackageignore b/.checkpackageignore
index 6f1a838562..92ab426685 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -91,9 +91,11 @@ board/zynqmp/post-build.sh Shellcheck
 board/zynqmp/post-image.sh Shellcheck
 board/zynqmp/zcu106/patches/uboot/0001-arm64-zynqmp-zynqmp-zcu102-revA-Fix-DP-PLL-configura.patch NumberedSubject
 boot/binaries-marvell/binaries-marvell.hash HashSpaces
+boot/grub2/grub2.mk DoNotInstallToHostdirUsr
 boot/s500-bootloader/s500-bootloader.hash HashSpaces
 boot/shim/shim.hash HashSpaces
 package/abootimg/abootimg.hash HashSpaces
+package/abootimg/abootimg.mk DoNotInstallToHostdirUsr
 package/acpitool/acpitool.hash HashSpaces
 package/aespipe/aespipe.hash HashSpaces
 package/alsamixergui/0001-misc-fixes.patch Sob
@@ -132,6 +134,7 @@ package/bcg729/bcg729.hash HashSpaces
 package/bdwgc/bdwgc.hash HashSpaces
 package/berkeleydb/berkeleydb.hash HashSpaces
 package/bind/S81named Indent Shellcheck Variables
+package/bind/bind.mk DoNotInstallToHostdirUsr
 package/biosdevname/biosdevname.hash HashSpaces
 package/bitstream/bitstream.hash HashSpaces
 package/bluez5_utils/S40bluetooth NotExecutable Variables
@@ -163,6 +166,7 @@ package/chrony/S49chrony Indent Shellcheck Variables
 package/cmocka/cmocka.hash HashSpaces
 package/collectd/collectd.hash HashSpaces
 package/comix-cursors/comix-cursors.hash HashSpaces
+package/compiler-rt/compiler-rt.mk DoNotInstallToHostdirUsr
 package/connman-gtk/connman-gtk.hash HashSpaces
 package/connman/S45connman Variables
 package/conntrack-tools/conntrack-tools.hash HashSpaces
@@ -192,6 +196,7 @@ package/datatables-buttons/datatables-buttons.hash HashSpaces
 package/datatables-fixedcolumns/datatables-fixedcolumns.hash HashSpaces
 package/datatables-responsive/datatables-responsive.hash HashSpaces
 package/datatables/datatables.hash HashSpaces
+package/dbus-python/dbus-python.mk DoNotInstallToHostdirUsr
 package/dbus/S30dbus Indent Shellcheck TrailingSpace Variables
 package/dc3dd/dc3dd.hash HashSpaces
 package/dcron/S90dcron Variables
@@ -267,6 +272,7 @@ package/frr/S50frr Shellcheck
 package/fstrcmp/fstrcmp.hash HashSpaces
 package/ftop/ftop.hash HashSpaces
 package/gamin/0002-no-const-return.patch Sob
+package/gawk/gawk.mk DoNotInstallToHostdirUsr
 package/gcc/arc-2020.09-release/0002-libsanitizer-Remove-cyclades-from-libsanitizer.patch Sob
 package/gconf/gconf.hash HashSpaces
 package/gengetopt/gengetopt.hash HashSpaces
@@ -274,6 +280,7 @@ package/genpart/genpart.hash HashSpaces
 package/genromfs/0001-build-system.patch Sob
 package/geoip/geoip.hash HashSpaces
 package/gerbera/S99gerbera Indent
+package/gettext-tiny/gettext-tiny.mk DoNotInstallToHostdirUsr
 package/gflags/gflags.hash HashSpaces
 package/ghostscript-fonts/ghostscript-fonts.hash HashSpaces
 package/giflib/giflib.hash HashSpaces
@@ -282,6 +289,7 @@ package/glm/glm.hash HashSpaces
 package/glorytun/glorytun.hash HashSpaces
 package/gnuradio/gnuradio.hash HashSpaces
 package/go/0002-cmd-dist-use-gohostarch-for-ssa-rewrite-check.patch Sob
+package/go/go.mk DoNotInstallToHostdirUsr
 package/gob2/gob2.hash HashSpaces
 package/google-breakpad/gen-syms.sh Shellcheck
 package/googlefontdirectory/googlefontdirectory.hash HashSpaces
@@ -326,6 +334,7 @@ package/iucode-tool/S00iucode-tool Variables
 package/iucode-tool/iucode-tool.hash HashSpaces
 package/iwd/S40iwd Shellcheck Variables
 package/jailhouse/jailhouse.hash HashSpaces
+package/jimtcl/jimtcl.mk DoNotInstallToHostdirUsr
 package/joe/joe.hash HashSpaces
 package/jquery/jquery.hash HashSpaces
 package/jsmin/jsmin.hash HashSpaces
@@ -337,6 +346,7 @@ package/kyua/kyua.hash HashSpaces
 package/lbreakout2/lbreakout2.hash HashSpaces
 package/lensfun/lensfun.hash HashSpaces
 package/libao/libao.hash HashSpaces
+package/libapparmor/libapparmor.mk DoNotInstallToHostdirUsr
 package/libart/0001-art-config-cross.patch Sob
 package/libart/libart.hash HashSpaces
 package/libasplib/libasplib.hash HashSpaces
@@ -424,6 +434,7 @@ package/libtool/libtool.hash HashSpaces
 package/libtorrent/libtorrent.hash HashSpaces
 package/libucl/libucl.hash HashSpaces
 package/libuecc/libuecc.hash HashSpaces
+package/libva/libva.mk DoNotInstallToHostdirUsr
 package/libwebsock/libwebsock.hash HashSpaces
 package/libxml-parser-perl/libxml-parser-perl.hash HashSpaces
 package/lightning/lightning.hash HashSpaces
@@ -482,6 +493,7 @@ package/lua-testmore/lua-testmore.hash HashSpaces
 package/lua-utf8/lua-utf8.hash HashSpaces
 package/lua-valua/lua-valua.hash HashSpaces
 package/lua-zlib/lua-zlib.hash HashSpaces
+package/lua/lua.mk DoNotInstallToHostdirUsr
 package/luadbi-sqlite3/luadbi-sqlite3.hash HashSpaces
 package/luadbi/luadbi.hash HashSpaces
 package/luaexpatutils/luaexpatutils.hash HashSpaces
@@ -564,10 +576,12 @@ package/obsidian-cursors/obsidian-cursors.hash HashSpaces
 package/ocrad/ocrad.hash HashSpaces
 package/odb/odb.hash HashSpaces
 package/ofono/S46ofono Variables
+package/ola/ola.mk DoNotInstallToHostdirUsr
 package/olsr/S50olsr Indent Shellcheck Variables
 package/olsr/olsr.hash HashSpaces
 package/omxplayer/omxplayer.hash HashSpaces
 package/opencore-amr/opencore-amr.hash HashSpaces
+package/openjdk-bin/openjdk-bin.mk DoNotInstallToHostdirUsr
 package/openmpi/openmpi.hash HashSpaces
 package/openntpd/S49ntp Shellcheck Variables
 package/openobex/openobex.hash HashSpaces
@@ -660,7 +674,11 @@ package/perl-xml-libxml/perl-xml-libxml.hash HashSpaces
 package/perl-xml-namespacesupport/perl-xml-namespacesupport.hash HashSpaces
 package/perl-xml-sax-base/perl-xml-sax-base.hash HashSpaces
 package/perl-xml-sax/perl-xml-sax.hash HashSpaces
+package/php-apcu/php-apcu.mk DoNotInstallToHostdirUsr
+package/php-lua/php-lua.mk DoNotInstallToHostdirUsr
+package/php-pam/php-pam.mk DoNotInstallToHostdirUsr
 package/php-pecl-dbus/php-pecl-dbus.hash HashSpaces
+package/php-pecl-dbus/php-pecl-dbus.mk DoNotInstallToHostdirUsr
 package/physfs/physfs.hash HashSpaces
 package/picocom/picocom.hash HashSpaces
 package/pigpio/S50pigpio Shellcheck Variables
@@ -703,6 +721,7 @@ package/python-cherrypy/python-cherrypy.hash HashSpaces
 package/python-constantly/python-constantly.hash HashSpaces
 package/python-couchdb/python-couchdb.hash HashSpaces
 package/python-crcmod/python-crcmod.hash HashSpaces
+package/python-cryptography/python-cryptography.mk DoNotInstallToHostdirUsr
 package/python-cssselect/python-cssselect.hash HashSpaces
 package/python-daemonize/python-daemonize.hash HashSpaces
 package/python-daphne/python-daphne.hash HashSpaces
@@ -750,6 +769,7 @@ package/python-piexif/python-piexif.hash HashSpaces
 package/python-ply/python-ply.hash HashSpaces
 package/python-portend/python-portend.hash HashSpaces
 package/python-pyaes/python-pyaes.hash HashSpaces
+package/python-pybind/python-pybind.mk DoNotInstallToHostdirUsr
 package/python-pyicu/python-pyicu.hash HashSpaces
 package/python-pylibftdi/python-pylibftdi.hash HashSpaces
 package/python-pyqrcode/python-pyqrcode.hash HashSpaces
@@ -806,6 +826,7 @@ package/rcw-smarc-sal28/rcw-smarc-sal28.hash HashSpaces
 package/rdesktop/0001-8bit-colors.patch Sob
 package/reaver/reaver.hash HashSpaces
 package/redis/S50redis Shellcheck Variables
+package/refpolicy/refpolicy.mk DoNotInstallToHostdirUsr
 package/restorecond/S02restorecond Shellcheck
 package/rings/rings.hash HashSpaces
 package/ripgrep/ripgrep.hash HashSpaces
@@ -1018,6 +1039,7 @@ package/xl2tp/xl2tpd TrailingSpace
 package/xmlstarlet/xmlstarlet.hash HashSpaces
 package/xutil_util-macros/xutil_util-macros.hash HashSpaces
 package/yad/yad.hash HashSpaces
+package/zfs/zfs.mk DoNotInstallToHostdirUsr
 package/zip/zip.hash HashSpaces
 package/zmqpp/zmqpp.hash HashSpaces
 package/zxing-cpp/zxing-cpp.hash HashSpaces
diff --git a/utils/checkpackagelib/lib_mk.py b/utils/checkpackagelib/lib_mk.py
index b50a19ac62..eaef19b2ec 100644
--- a/utils/checkpackagelib/lib_mk.py
+++ b/utils/checkpackagelib/lib_mk.py
@@ -21,6 +21,18 @@ continue_conditional = ["elif", "else"]
 end_conditional = ["endif"]
 
 
+class DoNotInstallToHostdirUsr(_CheckFunction):
+    INSTALL_TO_HOSTDIR_USR = re.compile(r"^[^#].*\$\(HOST_DIR\)/usr")
+
+    def check_line(self, lineno, text):
+        if self.INSTALL_TO_HOSTDIR_USR.match(text.rstrip()):
+            if self.filename in ['package/skeleton/skeleton.mk']:
+                return
+            return ["{}:{}: install files to $(HOST_DIR)/ instead of $(HOST_DIR)/usr/"
+                    .format(self.filename, lineno),
+                    text]
+
+
 class Indent(_CheckFunction):
     COMMENT = re.compile(r"^\s*#")
     CONDITIONAL = re.compile(r"^\s*({})\s".format("|".join(start_conditional + end_conditional + continue_conditional)))
diff --git a/utils/checkpackagelib/test_lib_mk.py b/utils/checkpackagelib/test_lib_mk.py
index 49fa216fcd..db6641f14c 100644
--- a/utils/checkpackagelib/test_lib_mk.py
+++ b/utils/checkpackagelib/test_lib_mk.py
@@ -3,6 +3,29 @@ import checkpackagelib.test_util as util
 import checkpackagelib.lib_mk as m
 
 
+DoNotInstallToHostdirUsr = [
+    ('real case',
+     'libapparmor.mk',
+     'LIBAPPARMOR_CONF_OPTS += \\\n'
+     '\t--with-python \\\n'
+     '\tPYTHON=$(HOST_DIR)/usr/bin/python3 \\\n'
+     '\tPYTHON_CONFIG=$(STAGING_DIR)/usr/bin/python3-config \\\n'
+     '\tSWIG=$(SWIG)\n',
+     [['libapparmor.mk:3: install files to $(HOST_DIR)/ instead of $(HOST_DIR)/usr/',
+       '\tPYTHON=$(HOST_DIR)/usr/bin/python3 \\\n']]),
+    ('ignore comment',
+     'any',
+     '# following code do not install to $(HOST_DIR)/usr/\n',
+     []),
+    ]
+
+
+@pytest.mark.parametrize('testname,filename,string,expected', DoNotInstallToHostdirUsr)
+def test_DoNotInstallToHostdirUsr(testname, filename, string, expected):
+    warnings = util.check_file(m.DoNotInstallToHostdirUsr, filename, string)
+    assert warnings == expected
+
+
 Indent = [
     ('ignore comment at beginning of line',
      'any',
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 01/16] DEVELOPERS: update entries for Ricardo Martincoski
  2022-07-24  5:48 ` [Buildroot] [PATCH 01/16] DEVELOPERS: update entries for Ricardo Martincoski Ricardo Martincoski
@ 2022-07-25 22:21   ` Arnout Vandecappelle
  0 siblings, 0 replies; 32+ messages in thread
From: Arnout Vandecappelle @ 2022-07-25 22:21 UTC (permalink / raw)
  To: Ricardo Martincoski, buildroot



On 24/07/2022 07:48, Ricardo Martincoski wrote:
> Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   DEVELOPERS | 9 ++-------
>   1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index ee836266be..00315ffe6f 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -2466,21 +2466,16 @@ N:	Renaud Aubin <root@renaud.io>
>   F:	package/libhttpparser/
>   
>   N:	Ricardo Martincoski <ricardo.martincoski@datacom.com.br>
> +F:	.flake8
>   F:	package/atop/
>   F:	package/thermald/
> -
> -N:	Ricardo Martincoski <ricardo.martincoski@gmail.com>
>   F:	support/testing/infra/
>   F:	support/testing/run-tests
> -F:	support/testing/tests/core/test_file_capabilities.py
> -F:	support/testing/tests/download/
> -F:	support/testing/tests/package/*_python*.py
>   F:	support/testing/tests/package/test_atop.py
> -F:	support/testing/tests/package/test_syslog_ng.py
> -F:	support/testing/tests/package/test_tmux.py
>   F:	support/testing/tests/utils/test_check_package.py
>   F:	utils/check-package
>   F:	utils/checkpackagelib/
> +F:	utils/docker-run
>   
>   N:	Richard Braun <rbraun@sceen.net>
>   F:	package/curlftpfs/
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 02/16] utils/check-package: improve shellcheck reproducibility
  2022-07-24  5:48 ` [Buildroot] [PATCH 02/16] utils/check-package: improve shellcheck reproducibility Ricardo Martincoski
@ 2022-07-25 22:21   ` Arnout Vandecappelle
  0 siblings, 0 replies; 32+ messages in thread
From: Arnout Vandecappelle @ 2022-07-25 22:21 UTC (permalink / raw)
  To: Ricardo Martincoski, buildroot



On 24/07/2022 07:48, Ricardo Martincoski wrote:
> shellcheck is already in use to check SysV init scripts.
> Currently its results can be affected by the existence of a
> .shellcheckrc file in any parent directory.
> 
> For instance, in this example:
> (1) /path/.shellcheckrc
> (2) /path/to/.shellcheckrc
> (3) /path/to/buildroot
> the configs from file (1) are ignored and the configs from file (2)
> override the default values from the shellcheck binary.
> So the config file affects the check-package result for SysV scripts.
> 
> Avoid this reproducibility issue by adding an empty config file to the
> buildroot topdir.
> 
> It can also eventually contain configs (different from default values
> from sheelcheck) that we want as a standard to all shell scripts tested
> by check-package.
> 
> Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   .shellcheckrc | 0
>   DEVELOPERS    | 1 +
>   2 files changed, 1 insertion(+)
>   create mode 100644 .shellcheckrc
> 
> diff --git a/.shellcheckrc b/.shellcheckrc
> new file mode 100644
> index 0000000000..e69de29bb2
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 00315ffe6f..8b2fdb8f6c 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -2467,6 +2467,7 @@ F:	package/libhttpparser/
>   
>   N:	Ricardo Martincoski <ricardo.martincoski@datacom.com.br>
>   F:	.flake8
> +F:	.shellcheckrc
>   F:	package/atop/
>   F:	package/thermald/
>   F:	support/testing/infra/
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 06/16] Makefile: make check-package assume a git tree
  2022-07-24  5:49 ` [Buildroot] [PATCH 06/16] Makefile: make check-package assume a git tree Ricardo Martincoski
@ 2022-07-27 12:54   ` Romain Naour
  2022-07-31 14:31     ` Ricardo Martincoski
  0 siblings, 1 reply; 32+ messages in thread
From: Romain Naour @ 2022-07-27 12:54 UTC (permalink / raw)
  To: Ricardo Martincoski, buildroot; +Cc: Thomas Petazzoni

Hello Ricardo,

Le 24/07/2022 à 07:49, Ricardo Martincoski a écrit :
> ... just like check-flake8 already does.
> 
> When a new check_function is added to check-package, often there are
> files in the tree that would generate warnings.
> 
> An example is the Sob check_function for patch files:
> | $ ./utils/check-package --i Sob $(git ls-files) >/dev/null
> | 369301 lines processed
> | 46 warnings generated
> Currently these warnings are listed when calling check-package directly,
> and also at the output of pkg-stats, but the check_function does not run
> on 'make check-package' (that is used to catch regressions on GitLab CI
> 'check-package' job) until all warnings in the tree are fixed.
> This (theoretically) allows new .patch files be added without SoB,
> without the GitLab CI catching it.
> 
> Since now check-package has an ignore file to list all warnings in the
> tree, that will eventually be fixed, there is no need to filter the
> files passed to check-package.
> So test all files in the tree when 'make check-package' is called.
> It brings following advantages;
> - any new check_function added to check-package takes place immediately
>   for new files;
> - adding new check_functions is less traumatic to the developer doing
>   this, since he/she does not need anymore to fix all warnings in the
>   tree before the new check_function takes effect;
> - prevent regressions, e.g. ANY new .hash file must have 2 spaces;
> - as a side-effect, print a single statistics line as output of
>   'make ckeck-package'.
> 
> But just enabling the check would generate many warnings when
> 'make check-package' is called, so update the ignore file by using:
> $ ./utils/docker-run
> br-user@...$ ./utils/check-package --failed-only \
>                `git ls-tree -r --name-only HEAD` > .checkpackageignore

I guess the ultimate goal of check-package is to make .checkpackageignore empty,
so at some point this feature should not be useful :)

checkpackageignore is actually needed to convert smoothly the code base to the
new coding style in order to not conflict too much with pending patches in
patchwork.

But patchwork is currently "almost" empty (compared to normal) with less than
200 patches, so it may be the good opportunity to apply right now a big patch
removing all HashSpaces and shellcheck warnings (Sob warning are bit more
complicated to handle though).

The issue with the big patch approach is that the patch must be applied right
away. Similar to the big patch adding hashes for SourceForge-hosted packages [1].

Otherwise we have to not forget to update checkpackageignore file when fixing a
warning in a package.

[1]
https://git.buildroot.net/buildroot/commit/?id=2ced21f8f982ef199b99ccc1f35dff6611b90c89

Best regards,
Romain


> 
> Notice: in order to ensure reproducible results, one should run
> 'make check-package' inside the docker image, otherwise a variation in
> shellcheck version (installed in the host) can produce different
> results.
> 
> Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
> ---
> NOTE to the maintainer applying this patch: please re-generate the list
> of ignored warnings while applying:
> $ ./utils/docker-run
> br-user@...$ ./utils/check-package --failed-only `git ls-tree -r --name-only HEAD` > .checkpackageignore
> ---
>  .checkpackageignore | 922 ++++++++++++++++++++++++++++++++++++++++++++
>  Makefile            |   3 +-
>  2 files changed, 923 insertions(+), 2 deletions(-)
> 
> diff --git a/.checkpackageignore b/.checkpackageignore
> index e69de29bb2..98099508ba 100644
> --- a/.checkpackageignore
> +++ b/.checkpackageignore
> @@ -0,0 +1,922 @@
> +boot/binaries-marvell/binaries-marvell.hash HashSpaces
> +boot/s500-bootloader/s500-bootloader.hash HashSpaces
> +boot/shim/shim.hash HashSpaces
> +package/abootimg/abootimg.hash HashSpaces
> +package/acpitool/acpitool.hash HashSpaces
> +package/aespipe/aespipe.hash HashSpaces
> +package/alsamixergui/0001-misc-fixes.patch Sob
> +package/alsamixergui/alsamixergui.hash HashSpaces
> +package/alure/alure.hash HashSpaces
> +package/am33x-cm3/S93-am335x-pm-firmware-load Variables
> +package/android-tools/0008-Include-sysmacros.h-to-compile-with-glibc-2.28.patch Sob
> +package/android-tools/android-tools.hash HashSpaces
> +package/angular-websocket/angular-websocket.hash HashSpaces
> +package/aoetools/aoetools.hash HashSpaces
> +package/apache/S50apache Indent Shellcheck Variables
> +package/apr-util/apr-util.hash HashSpaces
> +package/apr/apr.hash HashSpaces
> +package/argparse/argparse.hash HashSpaces
> +package/argus/argus.hash HashSpaces
> +package/arm-gnu-toolchain/arm-gnu-toolchain.hash HashSpaces
> +package/arp-scan/arp-scan.hash HashSpaces
> +package/arptables/arptables.hash HashSpaces
> +package/ascii-invaders/ascii-invaders.hash HashSpaces
> +package/asterisk/asterisk.hash HashSpaces
> +package/at/S99at Indent Variables
> +package/atest/atest.hash HashSpaces
> +package/atf/atf.hash HashSpaces
> +package/aubio/aubio.hash HashSpaces
> +package/audit/S02auditd Shellcheck Variables
> +package/autossh/autossh.hash HashSpaces
> +package/avahi/S05avahi-setup.sh Indent Variables
> +package/avahi/S50avahi-daemon Indent Variables
> +package/avahi/avahi.hash HashSpaces
> +package/b43-firmware/b43-firmware.hash HashSpaces
> +package/b43-fwcutter/b43-fwcutter.hash HashSpaces
> +package/babeld/S50babeld Indent Shellcheck Variables
> +package/bc/bc.hash HashSpaces
> +package/bcache-tools/bcache-tools.hash HashSpaces
> +package/bcg729/bcg729.hash HashSpaces
> +package/bdwgc/bdwgc.hash HashSpaces
> +package/berkeleydb/berkeleydb.hash HashSpaces
> +package/bind/S81named Indent Shellcheck Variables
> +package/biosdevname/biosdevname.hash HashSpaces
> +package/bitstream/bitstream.hash HashSpaces
> +package/bluez5_utils/S40bluetooth NotExecutable Variables
> +package/boinc/S99boinc-client Indent Shellcheck Variables
> +package/bonnie/bonnie.hash HashSpaces
> +package/brickd/S70brickd Indent Shellcheck Variables
> +package/brltty/S10brltty Indent Shellcheck Variables
> +package/bsdiff/bsdiff.hash HashSpaces
> +package/busybox/S02sysctl Variables
> +package/busybox/S10mdev ConsecutiveEmptyLines Indent Shellcheck
> +package/busybox/S15watchdog Indent Variables
> +package/busybox/S50telnet Indent Shellcheck Variables
> +package/bzip2/bzip2.hash HashSpaces
> +package/c-icap/S96cicap Indent Shellcheck Variables
> +package/cache-calibrator/cache-calibrator.hash HashSpaces
> +package/cage/cage.hash HashSpaces
> +package/cairo/cairo.hash HashSpaces
> +package/caps/caps.hash HashSpaces
> +package/cbootimage/cbootimage.hash HashSpaces
> +package/cctz/cctz.hash HashSpaces
> +package/cfm/S65cfm Indent Variables
> +package/cgic/cgic.hash HashSpaces
> +package/cgilua/cgilua.hash HashSpaces
> +package/cgroupfs-mount/S30cgroupfs Indent Shellcheck Variables
> +package/chartjs/chartjs.hash HashSpaces
> +package/chipmunk/chipmunk.hash HashSpaces
> +package/chrony/S49chrony Indent Shellcheck Variables
> +package/cmocka/cmocka.hash HashSpaces
> +package/collectd/collectd.hash HashSpaces
> +package/comix-cursors/comix-cursors.hash HashSpaces
> +package/connman-gtk/connman-gtk.hash HashSpaces
> +package/connman/S45connman Variables
> +package/conntrack-tools/conntrack-tools.hash HashSpaces
> +package/copas/copas.hash HashSpaces
> +package/coxpcall/coxpcall.hash HashSpaces
> +package/cpio/cpio.hash HashSpaces
> +package/cppdb/cppdb.hash HashSpaces
> +package/cppunit/cppunit.hash HashSpaces
> +package/cpuburn-arm/cpuburn-arm.hash HashSpaces
> +package/cpuload/cpuload.hash HashSpaces
> +package/cracklib/cracklib.hash HashSpaces
> +package/ctorrent/ctorrent.hash HashSpaces
> +package/cunit/cunit.hash HashSpaces
> +package/curlftpfs/0001-fix-CURLOPT_INFILESIZE.patch Sob
> +package/curlftpfs/0002-free_ftpfs_file-memleak-fix.patch Sob
> +package/curlftpfs/0003-nocache-memleak-fix.patch Sob
> +package/curlpp/curlpp.hash HashSpaces
> +package/cwiid/cwiid.hash HashSpaces
> +package/cxxtest/cxxtest.hash HashSpaces
> +package/czmq/czmq.hash HashSpaces
> +package/dacapo/dacapo.hash HashSpaces
> +package/dado/dado.hash HashSpaces
> +package/dante/S50dante Indent Shellcheck Variables
> +package/darkhttpd/S50darkhttpd Indent Shellcheck Variables
> +package/datatables-buttons/datatables-buttons.hash HashSpaces
> +package/datatables-fixedcolumns/datatables-fixedcolumns.hash HashSpaces
> +package/datatables-responsive/datatables-responsive.hash HashSpaces
> +package/datatables/datatables.hash HashSpaces
> +package/dbus/S30dbus Indent Shellcheck TrailingSpace Variables
> +package/dc3dd/dc3dd.hash HashSpaces
> +package/dcron/S90dcron Variables
> +package/debianutils/debianutils.hash HashSpaces
> +package/dhcp/S80dhcp-relay Shellcheck Variables
> +package/dhcp/S80dhcp-server Shellcheck Variables
> +package/dhcpcd/S41dhcpcd Indent Variables
> +package/dhcpdump/dhcpdump.hash HashSpaces
> +package/dhrystone/0001-cmdline-nruns.patch Sob
> +package/dhrystone/0002-HZ.patch Sob
> +package/dhrystone/0003-exit.patch Sob
> +package/dhrystone/0004-headers.patch Sob
> +package/dhrystone/0005-prototypes.patch Sob
> +package/dhrystone/dhrystone.hash HashSpaces
> +package/dieharder/dieharder.hash HashSpaces
> +package/directfb-examples/0001-remove-bzero.patch Sob
> +package/dmraid/S20dmraid Variables
> +package/dmraid/dmraid.hash HashSpaces
> +package/dnsmasq/S80dnsmasq Shellcheck Variables
> +package/docker-compose/docker-compose.hash HashSpaces
> +package/docker-engine/S60dockerd Indent Shellcheck Variables
> +package/domoticz/S99domoticz Shellcheck
> +package/doom-wad/doom-wad.hash HashSpaces
> +package/dropbear/S50dropbear Indent Shellcheck Variables
> +package/dt/dt.hash HashSpaces
> +package/dump1090/dump1090.hash HashSpaces
> +package/dvblast/dvblast.hash HashSpaces
> +package/dvdauthor/dvdauthor.hash HashSpaces
> +package/e2tools/e2tools.hash HashSpaces
> +package/earlyoom/S02earlyoom Indent Shellcheck
> +package/ecryptfs-utils/ecryptfs-utils.hash HashSpaces
> +package/efivar/efivar.hash HashSpaces
> +package/ejabberd/S50ejabberd Indent Shellcheck Variables
> +package/elftosb/elftosb.hash HashSpaces
> +package/elixir/elixir.hash HashSpaces
> +package/emlog/emlog.hash HashSpaces
> +package/enscript/enscript.hash HashSpaces
> +package/erlang-base64url/erlang-base64url.hash HashSpaces
> +package/erlang-goldrush/erlang-goldrush.hash HashSpaces
> +package/erlang-rebar/erlang-rebar.hash HashSpaces
> +package/eudev/S10udev ConsecutiveEmptyLines Indent Shellcheck Variables
> +package/exfat-utils/exfat-utils.hash HashSpaces
> +package/exfat/exfat.hash HashSpaces
> +package/exim/S86exim Indent Variables
> +package/f2fs-tools/f2fs-tools.hash HashSpaces
> +package/fail2ban/S60fail2ban Shellcheck Variables
> +package/fan-ctrl/fan-ctrl.hash HashSpaces
> +package/fbdump/fbdump.hash HashSpaces
> +package/fbterm/fbterm.hash HashSpaces
> +package/fbv/0001-cross.patch Sob
> +package/fbv/0002-fix-24bpp-support-on-big-endian.patch Sob
> +package/fbv/0005-include.patch Sob
> +package/feh/feh.hash HashSpaces
> +package/fftw/fftw-double/fftw-double.hash HashSpaces
> +package/fftw/fftw-long-double/fftw-long-double.hash HashSpaces
> +package/fftw/fftw-quad/fftw-quad.hash HashSpaces
> +package/fftw/fftw-single/fftw-single.hash HashSpaces
> +package/fftw/fftw.hash HashSpaces
> +package/flannel/flannel.hash HashSpaces
> +package/flex/flex.hash HashSpaces
> +package/flickcurl/flickcurl.hash HashSpaces
> +package/flot/flot.hash HashSpaces
> +package/fluid-soundfont/fluid-soundfont.hash HashSpaces
> +package/font-awesome/font-awesome.hash HashSpaces
> +package/fontconfig/fontconfig.hash HashSpaces
> +package/freescale-imx/imx-m4fwloader/imx-m4fwloader.hash HashSpaces
> +package/freescale-imx/imx-uuc/S80imx-uuc Indent Shellcheck Variables
> +package/freescale-imx/imx-uuc/imx-uuc.hash HashSpaces
> +package/frr/S50frr Shellcheck
> +package/fstrcmp/fstrcmp.hash HashSpaces
> +package/ftop/ftop.hash HashSpaces
> +package/gamin/0002-no-const-return.patch Sob
> +package/gcc/arc-2020.09-release/0002-libsanitizer-Remove-cyclades-from-libsanitizer.patch Sob
> +package/gconf/gconf.hash HashSpaces
> +package/gengetopt/gengetopt.hash HashSpaces
> +package/genpart/genpart.hash HashSpaces
> +package/genromfs/0001-build-system.patch Sob
> +package/geoip/geoip.hash HashSpaces
> +package/gerbera/S99gerbera Indent
> +package/gflags/gflags.hash HashSpaces
> +package/ghostscript-fonts/ghostscript-fonts.hash HashSpaces
> +package/giflib/giflib.hash HashSpaces
> +package/gli/gli.hash HashSpaces
> +package/glm/glm.hash HashSpaces
> +package/glorytun/glorytun.hash HashSpaces
> +package/gnuradio/gnuradio.hash HashSpaces
> +package/go/0002-cmd-dist-use-gohostarch-for-ssa-rewrite-check.patch Sob
> +package/gob2/gob2.hash HashSpaces
> +package/googlefontdirectory/googlefontdirectory.hash HashSpaces
> +package/gperf/gperf.hash HashSpaces
> +package/gpsd/S50gpsd Indent Shellcheck Variables
> +package/gstreamer1/gst1-imx/gst1-imx.hash HashSpaces
> +package/gtkmm3/gtkmm3.hash HashSpaces
> +package/gtksourceview/gtksourceview.hash HashSpaces
> +package/hans/hans.hash HashSpaces
> +package/haveged/S21haveged Shellcheck Variables
> +package/heimdal/heimdal.hash HashSpaces
> +package/heirloom-mailx/heirloom-mailx.hash HashSpaces
> +package/htpdate/S43htpdate Shellcheck
> +package/httping/httping.hash HashSpaces
> +package/i2pd/S99i2pd Indent Shellcheck Variables
> +package/ibrcommon/ibrcommon.hash HashSpaces
> +package/ifenslave/ifenslave.hash HashSpaces
> +package/ifmetric/ifmetric.hash HashSpaces
> +package/ifplugd/0001-cross.patch Sob
> +package/ifplugd/0002-fix-headers.patch Sob
> +package/ifupdown-scripts/S40network EmptyLastLine Indent Shellcheck Variables
> +package/igd2-for-linux/S99upnpd Indent Shellcheck Variables
> +package/igh-ethercat/igh-ethercat.hash HashSpaces
> +package/ijs/ijs.hash HashSpaces
> +package/ima-evm-utils/ima-evm-utils.hash HashSpaces
> +package/inadyn/S70inadyn Indent NotExecutable
> +package/input-event-daemon/S99input-event-daemon ConsecutiveEmptyLines Indent Variables
> +package/intltool/intltool.hash HashSpaces
> +package/iodine/iodine.hash HashSpaces
> +package/iptables/S35iptables Shellcheck
> +package/iputils/iputils.hash HashSpaces
> +package/irda-utils/0001-daemon.patch Sob
> +package/irda-utils/0002-nommu.patch Sob
> +package/irda-utils/0003-subdir.patch Sob
> +package/irqbalance/S13irqbalance Indent Shellcheck Variables
> +package/irrlicht/irrlicht.hash HashSpaces
> +package/iucode-tool/S00iucode-tool Variables
> +package/iucode-tool/iucode-tool.hash HashSpaces
> +package/iwd/S40iwd Shellcheck Variables
> +package/jailhouse/jailhouse.hash HashSpaces
> +package/joe/joe.hash HashSpaces
> +package/jquery/jquery.hash HashSpaces
> +package/jsmin/jsmin.hash HashSpaces
> +package/jsmn/jsmn.hash HashSpaces
> +package/jszip/jszip.hash HashSpaces
> +package/keyutils/0002-cifs.patch Sob
> +package/kodi/S50kodi Shellcheck Variables
> +package/kyua/kyua.hash HashSpaces
> +package/lbreakout2/lbreakout2.hash HashSpaces
> +package/lensfun/lensfun.hash HashSpaces
> +package/libao/libao.hash HashSpaces
> +package/libart/0001-art-config-cross.patch Sob
> +package/libart/libart.hash HashSpaces
> +package/libasplib/libasplib.hash HashSpaces
> +package/libatasmart/libatasmart.hash HashSpaces
> +package/libavl/libavl.hash HashSpaces
> +package/libbacktrace/libbacktrace.hash HashSpaces
> +package/libbson/libbson.hash HashSpaces
> +package/libcddb/libcddb.hash HashSpaces
> +package/libcdio-paranoia/libcdio-paranoia.hash HashSpaces
> +package/libcdio/libcdio.hash HashSpaces
> +package/libcgi/libcgi.hash HashSpaces
> +package/libcgicc/0001-disable-documentation-option.patch Sob
> +package/libcgicc/libcgicc.hash HashSpaces
> +package/libcorrect/libcorrect.hash HashSpaces
> +package/libcsv/libcsv.hash HashSpaces
> +package/libcue/libcue.hash HashSpaces
> +package/libcuefile/libcuefile.hash HashSpaces
> +package/libcutl/libcutl.hash HashSpaces
> +package/libdaemon/libdaemon.hash HashSpaces
> +package/libdcadec/libdcadec.hash HashSpaces
> +package/libdri2/libdri2.hash HashSpaces
> +package/libdvbcsa/libdvbcsa.hash HashSpaces
> +package/libdvbpsi/libdvbpsi.hash HashSpaces
> +package/libeastl/libeastl.hash HashSpaces
> +package/libee/libee.hash HashSpaces
> +package/libenca/libenca.hash HashSpaces
> +package/libestr/libestr.hash HashSpaces
> +package/libfcgi/0002-disable-examples.patch Sob
> +package/libfcgi/libfcgi.hash HashSpaces
> +package/libfreefare/libfreefare.hash HashSpaces
> +package/libfreeimage/libfreeimage.hash HashSpaces
> +package/libftdi/0001-pkgconfig_libusb.patch Sob
> +package/libftdi/0002-libftdi.pc-requires-libusb-fix-static-build.patch Sob
> +package/libfuse/libfuse.hash HashSpaces
> +package/libgdiplus/libgdiplus.hash HashSpaces
> +package/libglade/libglade.hash HashSpaces
> +package/libical/libical.hash HashSpaces
> +package/libiconv/libiconv.hash HashSpaces
> +package/libiio/S99iiod Shellcheck Variables
> +package/libiio/libiio.hash HashSpaces
> +package/libimxvpuapi/libimxvpuapi.hash HashSpaces
> +package/libiscsi/libiscsi.hash HashSpaces
> +package/libkcapi/libkcapi.hash HashSpaces
> +package/libllcp/libllcp.hash HashSpaces
> +package/liblog4c-localtime/liblog4c-localtime.hash HashSpaces
> +package/liblogging/liblogging.hash HashSpaces
> +package/libloki/libloki.hash HashSpaces
> +package/libmad/0001-mips-h-constraint-removal.patch Sob
> +package/libmbus/libmbus.hash HashSpaces
> +package/libmemcached/libmemcached.hash HashSpaces
> +package/libmng/libmng.hash HashSpaces
> +package/libmpd/libmpd.hash HashSpaces
> +package/libmspack/libmspack.hash HashSpaces
> +package/libnatpmp/libnatpmp.hash HashSpaces
> +package/libnet/libnet.hash HashSpaces
> +package/libnetfilter_acct/libnetfilter_acct.hash HashSpaces
> +package/libnfs/libnfs.hash HashSpaces
> +package/libnpth/libnpth.hash HashSpaces
> +package/libodb-mysql/libodb-mysql.hash HashSpaces
> +package/libodb-pgsql/libodb-pgsql.hash HashSpaces
> +package/libodb/libodb.hash HashSpaces
> +package/libopenaptx/libopenaptx.hash HashSpaces
> +package/liboping/liboping.hash HashSpaces
> +package/libpam-radius-auth/libpam-radius-auth.hash HashSpaces
> +package/libpciaccess/libpciaccess.hash HashSpaces
> +package/libpng/libpng.hash HashSpaces
> +package/libpqxx/libpqxx.hash HashSpaces
> +package/libpthread-stubs/libpthread-stubs.hash HashSpaces
> +package/libraw1394/libraw1394.hash HashSpaces
> +package/libreplaygain/libreplaygain.hash HashSpaces
> +package/libroxml/libroxml.hash HashSpaces
> +package/libserial/libserial.hash HashSpaces
> +package/libsha1/libsha1.hash HashSpaces
> +package/libsidplay2/libsidplay2.hash HashSpaces
> +package/libsigrok/libsigrok.hash HashSpaces
> +package/libsigrokdecode/libsigrokdecode.hash HashSpaces
> +package/libsodium/libsodium.hash HashSpaces
> +package/libsquish/libsquish.hash HashSpaces
> +package/libsvg-cairo/libsvg-cairo.hash HashSpaces
> +package/libsvg/libsvg.hash HashSpaces
> +package/libtelnet/libtelnet.hash HashSpaces
> +package/libtheora/libtheora.hash HashSpaces
> +package/libtommath/libtommath.hash HashSpaces
> +package/libtool/libtool.hash HashSpaces
> +package/libtorrent/libtorrent.hash HashSpaces
> +package/libucl/libucl.hash HashSpaces
> +package/libuecc/libuecc.hash HashSpaces
> +package/libwebsock/libwebsock.hash HashSpaces
> +package/libxml-parser-perl/libxml-parser-perl.hash HashSpaces
> +package/lightning/lightning.hash HashSpaces
> +package/lighttpd/S50lighttpd EmptyLastLine Indent Shellcheck Variables
> +package/linux-tools/S10hyperv Indent Variables
> +package/linux-zigbee/linux-zigbee.hash HashSpaces
> +package/linuxptp/S65ptp4l Indent Shellcheck
> +package/linuxptp/S66phc2sys Indent Shellcheck
> +package/lirc-tools/S25lircd Indent Variables
> +package/lirc-tools/lirc-tools.hash HashSpaces
> +package/lite/0001-dfbspy-stat.patch Sob
> +package/lite/0002-no-tests.patch Sob
> +package/lite/0003-pkg-config.patch Sob
> +package/ljlinenoise/ljlinenoise.hash HashSpaces
> +package/ljsyscall/ljsyscall.hash HashSpaces
> +package/lksctp-tools/lksctp-tools.hash HashSpaces
> +package/lldpd/S60lldpd Indent Shellcheck Variables
> +package/lockfile-progs/0001-sus3v-legacy.patch Sob
> +package/log4cpp/log4cpp.hash HashSpaces
> +package/logsurfer/logsurfer.hash HashSpaces
> +package/lpeg/lpeg.hash HashSpaces
> +package/lpty/lpty.hash HashSpaces
> +package/lrandom/lrandom.hash HashSpaces
> +package/lsqlite3/lsqlite3.hash HashSpaces
> +package/lttng-babeltrace/lttng-babeltrace.hash HashSpaces
> +package/lua-binaryheap/lua-binaryheap.hash HashSpaces
> +package/lua-bit32/lua-bit32.hash HashSpaces
> +package/lua-cjson/lua-cjson.hash HashSpaces
> +package/lua-coat/lua-coat.hash HashSpaces
> +package/lua-coatpersistent/lua-coatpersistent.hash HashSpaces
> +package/lua-codegen/lua-codegen.hash HashSpaces
> +package/lua-compat53/lua-compat53.hash HashSpaces
> +package/lua-csnappy/lua-csnappy.hash HashSpaces
> +package/lua-datafile/lua-datafile.hash HashSpaces
> +package/lua-fifo/lua-fifo.hash HashSpaces
> +package/lua-flu/lua-flu.hash HashSpaces
> +package/lua-http/lua-http.hash HashSpaces
> +package/lua-iconv/lua-iconv.hash HashSpaces
> +package/lua-inotify/lua-inotify.hash HashSpaces
> +package/lua-livr-extra/lua-livr-extra.hash HashSpaces
> +package/lua-livr/lua-livr.hash HashSpaces
> +package/lua-lpeg-patterns/lua-lpeg-patterns.hash HashSpaces
> +package/lua-lunitx/lua-lunitx.hash HashSpaces
> +package/lua-lunix/lua-lunix.hash HashSpaces
> +package/lua-markdown/lua-markdown.hash HashSpaces
> +package/lua-messagepack/lua-messagepack.hash HashSpaces
> +package/lua-periphery/lua-periphery.hash HashSpaces
> +package/lua-resty-http/lua-resty-http.hash HashSpaces
> +package/lua-rotas/lua-rotas.hash HashSpaces
> +package/lua-sailor/lua-sailor.hash HashSpaces
> +package/lua-silva/lua-silva.hash HashSpaces
> +package/lua-std-debug/lua-std-debug.hash HashSpaces
> +package/lua-std-normalize/lua-std-normalize.hash HashSpaces
> +package/lua-stdlib/lua-stdlib.hash HashSpaces
> +package/lua-testmore/lua-testmore.hash HashSpaces
> +package/lua-utf8/lua-utf8.hash HashSpaces
> +package/lua-valua/lua-valua.hash HashSpaces
> +package/lua-zlib/lua-zlib.hash HashSpaces
> +package/luadbi-sqlite3/luadbi-sqlite3.hash HashSpaces
> +package/luadbi/luadbi.hash HashSpaces
> +package/luaexpatutils/luaexpatutils.hash HashSpaces
> +package/luafilesystem/luafilesystem.hash HashSpaces
> +package/luajson/luajson.hash HashSpaces
> +package/lualdap/lualdap.hash HashSpaces
> +package/lualogging/lualogging.hash HashSpaces
> +package/luaossl/luaossl.hash HashSpaces
> +package/luasql-sqlite3/luasql-sqlite3.hash HashSpaces
> +package/luksmeta/luksmeta.hash HashSpaces
> +package/lzma/lzma.hash HashSpaces
> +package/lzo/lzo.hash HashSpaces
> +package/lzop/lzop.hash HashSpaces
> +package/madplay/0001-switch-to-new-alsa-api.patch Sob
> +package/make/make.hash HashSpaces
> +package/mali-driver/mali-driver.hash HashSpaces
> +package/mariadb/S97mysqld Indent Shellcheck Variables
> +package/matchbox-common/matchbox-common.hash HashSpaces
> +package/matchbox-desktop/matchbox-desktop.hash HashSpaces
> +package/matchbox-keyboard/matchbox-keyboard.hash HashSpaces
> +package/matchbox-panel/matchbox-panel.hash HashSpaces
> +package/matchbox-startup-monitor/matchbox-startup-monitor.hash HashSpaces
> +package/memstat/memstat.hash HashSpaces
> +package/mender-connect/S43mender-connect Shellcheck
> +package/mender-grubenv/mender-grubenv.hash HashSpaces
> +package/menu-cache/menu-cache.hash HashSpaces
> +package/mesa3d-demos/mesa3d-demos.hash HashSpaces
> +package/mg/mg.hash HashSpaces
> +package/mii-diag/0001-strchr.patch Sob
> +package/mini-snmpd/mini-snmpd.hash HashSpaces
> +package/minidlna/S60minidlnad Indent Shellcheck Variables
> +package/minimodem/minimodem.hash HashSpaces
> +package/minissdpd/S50minissdpd Indent Shellcheck Variables
> +package/mjpg-streamer/mjpg-streamer.hash HashSpaces
> +package/mobile-broadband-provider-info/mobile-broadband-provider-info.hash HashSpaces
> +package/modem-manager/S44modem-manager Shellcheck Variables
> +package/monolite/monolite.hash HashSpaces
> +package/mosh/mosh.hash HashSpaces
> +package/mosquitto/S50mosquitto Indent Shellcheck Variables
> +package/most/most.hash HashSpaces
> +package/motion/S99motion Indent Shellcheck Variables
> +package/mpd/S95mpd Variables
> +package/mrouted/S41mrouted NotExecutable
> +package/mrp/S65mrp Indent Variables
> +package/multicat/multicat.hash HashSpaces
> +package/multipath-tools/S60multipathd Shellcheck
> +package/mupdf/mupdf.hash HashSpaces
> +package/murata-cyw-fw/murata-cyw-fw.hash HashSpaces
> +package/musepack/musepack.hash HashSpaces
> +package/musl-compat-headers/musl-compat-headers.hash HashSpaces
> +package/musl-fts/musl-fts.hash HashSpaces
> +package/nanomsg/nanomsg.hash HashSpaces
> +package/neard/S53neard Indent Shellcheck Variables
> +package/neardal/neardal.hash HashSpaces
> +package/netatalk/S50netatalk EmptyLastLine Indent Variables
> +package/netcalc/netcalc.hash HashSpaces
> +package/netcat/0001-signed-bit-counting.patch Sob
> +package/netifrc/netifrc.hash HashSpaces
> +package/netopeer2/S52netopeer2 Shellcheck Variables
> +package/netplug/0001-makefile-flags.patch Sob
> +package/netplug/S29netplug Indent Shellcheck Variables
> +package/netsnmp/S59snmpd Indent Shellcheck Variables
> +package/network-manager/S45network-manager ConsecutiveEmptyLines EmptyLastLine Shellcheck Variables
> +package/newt/newt.hash HashSpaces
> +package/nfacct/nfacct.hash HashSpaces
> +package/nfs-utils/S60nfs ConsecutiveEmptyLines Shellcheck Variables
> +package/nginx-dav-ext/nginx-dav-ext.hash HashSpaces
> +package/nginx/S50nginx Indent Variables
> +package/nload/nload.hash HashSpaces
> +package/nodm/S90nodm Indent Shellcheck Variables
> +package/nss-myhostname/nss-myhostname.hash HashSpaces
> +package/nss-pam-ldapd/S45nslcd EmptyLastLine Indent Shellcheck Variables
> +package/nss-pam-ldapd/nss-pam-ldapd.hash HashSpaces
> +package/ntp/S49ntp.in Variables
> +package/nvidia-driver/nvidia-driver.hash HashSpaces
> +package/nvidia-modprobe/nvidia-modprobe.hash HashSpaces
> +package/obsidian-cursors/obsidian-cursors.hash HashSpaces
> +package/ocrad/ocrad.hash HashSpaces
> +package/odb/odb.hash HashSpaces
> +package/ofono/S46ofono Variables
> +package/olsr/S50olsr Indent Shellcheck Variables
> +package/olsr/olsr.hash HashSpaces
> +package/omxplayer/omxplayer.hash HashSpaces
> +package/opencore-amr/opencore-amr.hash HashSpaces
> +package/openmpi/openmpi.hash HashSpaces
> +package/openntpd/S49ntp Shellcheck Variables
> +package/openobex/openobex.hash HashSpaces
> +package/openpowerlink/openpowerlink.hash HashSpaces
> +package/openssh/S50sshd EmptyLastLine Indent Variables
> +package/opentyrian-data/opentyrian-data.hash HashSpaces
> +package/openvpn/S60openvpn Indent Shellcheck Variables
> +package/optee-client/S30optee Indent Shellcheck Variables
> +package/opus-tools/opus-tools.hash HashSpaces
> +package/opus/opus.hash HashSpaces
> +package/oracle-mysql/S97mysqld Shellcheck Variables
> +package/oracle-mysql/oracle-mysql.hash HashSpaces
> +package/orbit/orbit.hash HashSpaces
> +package/owfs/S55owserver Shellcheck Variables
> +package/owfs/S60owfs Shellcheck Variables
> +package/pamtester/pamtester.hash HashSpaces
> +package/patch/patch.hash HashSpaces
> +package/patchelf/patchelf.hash HashSpaces
> +package/perl-apache-logformat-compiler/perl-apache-logformat-compiler.hash HashSpaces
> +package/perl-appconfig/perl-appconfig.hash HashSpaces
> +package/perl-astro-suntime/perl-astro-suntime.hash HashSpaces
> +package/perl-class-inspector/perl-class-inspector.hash HashSpaces
> +package/perl-class-load/perl-class-load.hash HashSpaces
> +package/perl-class-method-modifiers/perl-class-method-modifiers.hash HashSpaces
> +package/perl-class-std-fast/perl-class-std-fast.hash HashSpaces
> +package/perl-class-std/perl-class-std.hash HashSpaces
> +package/perl-cookie-baker/perl-cookie-baker.hash HashSpaces
> +package/perl-crypt-blowfish/perl-crypt-blowfish.hash HashSpaces
> +package/perl-crypt-cbc/perl-crypt-cbc.hash HashSpaces
> +package/perl-crypt-openssl-aes/perl-crypt-openssl-aes.hash HashSpaces
> +package/perl-crypt-openssl-random/perl-crypt-openssl-random.hash HashSpaces
> +package/perl-datetime-tiny/perl-datetime-tiny.hash HashSpaces
> +package/perl-dbd-mysql/perl-dbd-mysql.hash HashSpaces
> +package/perl-dbi/perl-dbi.hash HashSpaces
> +package/perl-devel-globaldestruction/perl-devel-globaldestruction.hash HashSpaces
> +package/perl-devel-stacktrace-ashtml/perl-devel-stacktrace-ashtml.hash HashSpaces
> +package/perl-devel-stacktrace/perl-devel-stacktrace.hash HashSpaces
> +package/perl-device-serialport/perl-device-serialport.hash HashSpaces
> +package/perl-digest-sha1/perl-digest-sha1.hash HashSpaces
> +package/perl-dist-checkconflicts/perl-dist-checkconflicts.hash HashSpaces
> +package/perl-encode-detect/perl-encode-detect.hash HashSpaces
> +package/perl-encode-locale/perl-encode-locale.hash HashSpaces
> +package/perl-extutils-config/perl-extutils-config.hash HashSpaces
> +package/perl-extutils-helpers/perl-extutils-helpers.hash HashSpaces
> +package/perl-extutils-installpaths/perl-extutils-installpaths.hash HashSpaces
> +package/perl-file-sharedir-install/perl-file-sharedir-install.hash HashSpaces
> +package/perl-filesys-notify-simple/perl-filesys-notify-simple.hash HashSpaces
> +package/perl-gdgraph/perl-gdgraph.hash HashSpaces
> +package/perl-gdtextutil/perl-gdtextutil.hash HashSpaces
> +package/perl-hash-multivalue/perl-hash-multivalue.hash HashSpaces
> +package/perl-html-tagset/perl-html-tagset.hash HashSpaces
> +package/perl-http-date/perl-http-date.hash HashSpaces
> +package/perl-http-headers-fast/perl-http-headers-fast.hash HashSpaces
> +package/perl-http-multipartparser/perl-http-multipartparser.hash HashSpaces
> +package/perl-http-negotiate/perl-http-negotiate.hash HashSpaces
> +package/perl-i18n/perl-i18n.hash HashSpaces
> +package/perl-io-interface/perl-io-interface.hash HashSpaces
> +package/perl-io-socket-multicast/perl-io-socket-multicast.hash HashSpaces
> +package/perl-json-tiny/perl-json-tiny.hash HashSpaces
> +package/perl-locale-maketext-lexicon/perl-locale-maketext-lexicon.hash HashSpaces
> +package/perl-lwp-mediatypes/perl-lwp-mediatypes.hash HashSpaces
> +package/perl-mailtools/perl-mailtools.hash HashSpaces
> +package/perl-math-prime-util/perl-math-prime-util.hash HashSpaces
> +package/perl-mime-base64-urlsafe/perl-mime-base64-urlsafe.hash HashSpaces
> +package/perl-mime-tools/perl-mime-tools.hash HashSpaces
> +package/perl-module-build-tiny/perl-module-build-tiny.hash HashSpaces
> +package/perl-module-build/perl-module-build.hash HashSpaces
> +package/perl-module-implementation/perl-module-implementation.hash HashSpaces
> +package/perl-module-runtime/perl-module-runtime.hash HashSpaces
> +package/perl-mojolicious-plugin-cspheader/perl-mojolicious-plugin-cspheader.hash HashSpaces
> +package/perl-mojolicious-plugin-i18n/perl-mojolicious-plugin-i18n.hash HashSpaces
> +package/perl-mojolicious-plugin-securityheader/perl-mojolicious-plugin-securityheader.hash HashSpaces
> +package/perl-net-snmp/perl-net-snmp.hash HashSpaces
> +package/perl-net-ssleay/perl-net-ssleay.hash HashSpaces
> +package/perl-netaddr-ip/perl-netaddr-ip.hash HashSpaces
> +package/perl-number-bytes-human/perl-number-bytes-human.hash HashSpaces
> +package/perl-path-class/perl-path-class.hash HashSpaces
> +package/perl-stream-buffered/perl-stream-buffered.hash HashSpaces
> +package/perl-sub-exporter-progressive/perl-sub-exporter-progressive.hash HashSpaces
> +package/perl-sub-install/perl-sub-install.hash HashSpaces
> +package/perl-sub-quote/perl-sub-quote.hash HashSpaces
> +package/perl-sys-meminfo/perl-sys-meminfo.hash HashSpaces
> +package/perl-sys-mmap/perl-sys-mmap.hash HashSpaces
> +package/perl-time-parsedate/perl-time-parsedate.hash HashSpaces
> +package/perl-www-form-urlencoded/perl-www-form-urlencoded.hash HashSpaces
> +package/perl-www-robotrules/perl-www-robotrules.hash HashSpaces
> +package/perl-x10/perl-x10.hash HashSpaces
> +package/perl-xml-libxml/perl-xml-libxml.hash HashSpaces
> +package/perl-xml-namespacesupport/perl-xml-namespacesupport.hash HashSpaces
> +package/perl-xml-sax-base/perl-xml-sax-base.hash HashSpaces
> +package/perl-xml-sax/perl-xml-sax.hash HashSpaces
> +package/php-pecl-dbus/php-pecl-dbus.hash HashSpaces
> +package/physfs/physfs.hash HashSpaces
> +package/picocom/picocom.hash HashSpaces
> +package/pigpio/S50pigpio Shellcheck Variables
> +package/pimd/pimd.hash HashSpaces
> +package/pixiewps/pixiewps.hash HashSpaces
> +package/policycoreutils/policycoreutils.hash HashSpaces
> +package/polkit/S50polkit NotExecutable Shellcheck Variables
> +package/popperjs/popperjs.hash HashSpaces
> +package/postgresql/S50postgresql Variables
> +package/pound/pound.hash HashSpaces
> +package/pptp-linux/pptp-linux.hash HashSpaces
> +package/procps-ng/S02sysctl Variables
> +package/proftpd/S50proftpd Indent Shellcheck Variables
> +package/prosody/S50prosody Indent Shellcheck Variables
> +package/pru-software-support/pru-software-support.hash HashSpaces
> +package/ptm2human/ptm2human.hash HashSpaces
> +package/ptpd/S65ptpd Indent Shellcheck Variables
> +package/ptpd2/S65ptpd2 Indent Shellcheck Variables
> +package/pulseaudio/S50pulseaudio ConsecutiveEmptyLines EmptyLastLine Indent Variables
> +package/pwgen/pwgen.hash HashSpaces
> +package/python-aiohttp-cors/python-aiohttp-cors.hash HashSpaces
> +package/python-aiohttp-debugtoolbar/python-aiohttp-debugtoolbar.hash HashSpaces
> +package/python-aiohttp-mako/python-aiohttp-mako.hash HashSpaces
> +package/python-aiohttp-security/python-aiohttp-security.hash HashSpaces
> +package/python-aiologstash/python-aiologstash.hash HashSpaces
> +package/python-aiomonitor/python-aiomonitor.hash HashSpaces
> +package/python-alsaaudio/python-alsaaudio.hash HashSpaces
> +package/python-argh/python-argh.hash HashSpaces
> +package/python-asgiref/python-asgiref.hash HashSpaces
> +package/python-bunch/python-bunch.hash HashSpaces
> +package/python-canopen/python-canopen.hash HashSpaces
> +package/python-cbor/python-cbor.hash HashSpaces
> +package/python-channels-redis/python-channels-redis.hash HashSpaces
> +package/python-channels/python-channels.hash HashSpaces
> +package/python-characteristic/python-characteristic.hash HashSpaces
> +package/python-cheetah/python-cheetah.hash HashSpaces
> +package/python-cheroot/python-cheroot.hash HashSpaces
> +package/python-cherrypy/python-cherrypy.hash HashSpaces
> +package/python-constantly/python-constantly.hash HashSpaces
> +package/python-couchdb/python-couchdb.hash HashSpaces
> +package/python-crcmod/python-crcmod.hash HashSpaces
> +package/python-cssselect/python-cssselect.hash HashSpaces
> +package/python-daemonize/python-daemonize.hash HashSpaces
> +package/python-daphne/python-daphne.hash HashSpaces
> +package/python-dialog3/python-dialog3.hash HashSpaces
> +package/python-dicttoxml/python-dicttoxml.hash HashSpaces
> +package/python-django-enumfields/python-django-enumfields.hash HashSpaces
> +package/python-docker-pycreds/python-docker-pycreds.hash HashSpaces
> +package/python-docker/python-docker.hash HashSpaces
> +package/python-dockerpty/python-dockerpty.hash HashSpaces
> +package/python-entrypoints/python-entrypoints.hash HashSpaces
> +package/python-fastentrypoints/python-fastentrypoints.hash HashSpaces
> +package/python-flask-babel/python-flask-babel.hash HashSpaces
> +package/python-flup/python-flup.hash HashSpaces
> +package/python-future/python-future.hash HashSpaces
> +package/python-gitdb2/python-gitdb2.hash HashSpaces
> +package/python-huepy/0001-fix-import-with-python3.patch Sob
> +package/python-huepy/python-huepy.hash HashSpaces
> +package/python-ibmiotf/python-ibmiotf.hash HashSpaces
> +package/python-iniparse/python-iniparse.hash HashSpaces
> +package/python-iowait/python-iowait.hash HashSpaces
> +package/python-ipython-genutils/python-ipython-genutils.hash HashSpaces
> +package/python-jaraco-classes/python-jaraco-classes.hash HashSpaces
> +package/python-jaraco-functools/python-jaraco-functools.hash HashSpaces
> +package/python-json-schema-validator/python-json-schema-validator.hash HashSpaces
> +package/python-jsonmodels/python-jsonmodels.hash HashSpaces
> +package/python-keyring/python-keyring.hash HashSpaces
> +package/python-kiwisolver/python-kiwisolver.hash HashSpaces
> +package/python-libusb1/python-libusb1.hash HashSpaces
> +package/python-lockfile/python-lockfile.hash HashSpaces
> +package/python-logbook/python-logbook.hash HashSpaces
> +package/python-m2r/python-m2r.hash HashSpaces
> +package/python-matplotlib/python-matplotlib.hash HashSpaces
> +package/python-mimeparse/python-mimeparse.hash HashSpaces
> +package/python-mistune/python-mistune.hash HashSpaces
> +package/python-nested-dict/python-nested-dict.hash HashSpaces
> +package/python-netaddr/python-netaddr.hash HashSpaces
> +package/python-networkmanager/python-networkmanager.hash HashSpaces
> +package/python-numpy/python-numpy.hash HashSpaces
> +package/python-paho-mqtt/python-paho-mqtt.hash HashSpaces
> +package/python-pathpy/python-pathpy.hash HashSpaces
> +package/python-pathtools/python-pathtools.hash HashSpaces
> +package/python-pexpect/python-pexpect.hash HashSpaces
> +package/python-pickleshare/python-pickleshare.hash HashSpaces
> +package/python-piexif/python-piexif.hash HashSpaces
> +package/python-ply/python-ply.hash HashSpaces
> +package/python-portend/python-portend.hash HashSpaces
> +package/python-pyaes/python-pyaes.hash HashSpaces
> +package/python-pyicu/python-pyicu.hash HashSpaces
> +package/python-pylibftdi/python-pylibftdi.hash HashSpaces
> +package/python-pyqrcode/python-pyqrcode.hash HashSpaces
> +package/python-pyratemp/python-pyratemp.hash HashSpaces
> +package/python-pyroute2/python-pyroute2.hash HashSpaces
> +package/python-pysmi/python-pysmi.hash HashSpaces
> +package/python-pysnmp-mibs/python-pysnmp-mibs.hash HashSpaces
> +package/python-pysnmp/python-pysnmp.hash HashSpaces
> +package/python-pysocks/python-pysocks.hash HashSpaces
> +package/python-pytablereader/python-pytablereader.hash HashSpaces
> +package/python-pytablewriter/python-pytablewriter.hash HashSpaces
> +package/python-pytest/python-pytest.hash HashSpaces
> +package/python-pyxb/python-pyxb.hash HashSpaces
> +package/python-raven/python-raven.hash HashSpaces
> +package/python-requests-toolbelt/python-requests-toolbelt.hash HashSpaces
> +package/python-rpi-gpio/python-rpi-gpio.hash HashSpaces
> +package/python-scandir/python-scandir.hash HashSpaces
> +package/python-sdnotify/python-sdnotify.hash HashSpaces
> +package/python-see/python-see.hash HashSpaces
> +package/python-setuptools-scm-git-archive/python-setuptools-scm-git-archive.hash HashSpaces
> +package/python-shutilwhich/python-shutilwhich.hash HashSpaces
> +package/python-simplegeneric/python-simplegeneric.hash HashSpaces
> +package/python-simplesqlite/python-simplesqlite.hash HashSpaces
> +package/python-smbus-cffi/python-smbus-cffi.hash HashSpaces
> +package/python-spidev/python-spidev.hash HashSpaces
> +package/python-sqlalchemy/python-sqlalchemy.hash HashSpaces
> +package/python-sqlparse/python-sqlparse.hash HashSpaces
> +package/python-systemd/python-systemd.hash HashSpaces
> +package/python-tempora/python-tempora.hash HashSpaces
> +package/python-termcolor/python-termcolor.hash HashSpaces
> +package/python-tomako/python-tomako.hash HashSpaces
> +package/python-tqdm/python-tqdm.hash HashSpaces
> +package/python-txtorcon/python-txtorcon.hash HashSpaces
> +package/python-vcversioner/python-vcversioner.hash HashSpaces
> +package/python-visitor/python-visitor.hash HashSpaces
> +package/python-web2py/S51web2py Shellcheck Variables
> +package/python-webencodings/python-webencodings.hash HashSpaces
> +package/python-webpy/python-webpy.hash HashSpaces
> +package/python-whoosh/python-whoosh.hash HashSpaces
> +package/python-ws4py/python-ws4py.hash HashSpaces
> +package/python-xlib/python-xlib.hash HashSpaces
> +package/python-xlutils/python-xlutils.hash HashSpaces
> +package/python-xlwt/python-xlwt.hash HashSpaces
> +package/python-zc-lockfile/python-zc-lockfile.hash HashSpaces
> +package/qoriq-cadence-dp-firmware/qoriq-cadence-dp-firmware.hash HashSpaces
> +package/qt5/qt5enginio/qt5enginio.hash HashSpaces
> +package/quagga/quagga.hash HashSpaces
> +package/quotatool/quotatool.hash HashSpaces
> +package/rabbitmq-server/S50rabbitmq-server Indent Shellcheck Variables
> +package/rapidjson/rapidjson.hash HashSpaces
> +package/rapidxml/rapidxml.hash HashSpaces
> +package/raspi-gpio/raspi-gpio.hash HashSpaces
> +package/rcw-smarc-sal28/rcw-smarc-sal28.hash HashSpaces
> +package/rdesktop/0001-8bit-colors.patch Sob
> +package/reaver/reaver.hash HashSpaces
> +package/redis/S50redis Shellcheck Variables
> +package/restorecond/S02restorecond Shellcheck
> +package/rings/rings.hash HashSpaces
> +package/ripgrep/ripgrep.hash HashSpaces
> +package/rng-tools/S21rngd Shellcheck Variables
> +package/rockchip-mali/rockchip-mali.hash HashSpaces
> +package/rpcbind/S30rpcbind EmptyLastLine Indent Variables
> +package/rpcbind/rpcbind.hash HashSpaces
> +package/rrdtool/rrdtool.hash HashSpaces
> +package/rs485conf/rs485conf.hash HashSpaces
> +package/rt-tests/rt-tests.hash HashSpaces
> +package/rtorrent/rtorrent.hash HashSpaces
> +package/rtptools/rtptools.hash HashSpaces
> +package/rubix/0002-misc-fixes.patch Sob
> +package/rubix/rubix.hash HashSpaces
> +package/rygel/S99rygel Indent Shellcheck Variables
> +package/samba4/S91smb Indent Shellcheck Variables
> +package/sconeserver/sconeserver.hash HashSpaces
> +package/sdl/sdl.hash HashSpaces
> +package/sdl2_image/sdl2_image.hash HashSpaces
> +package/sdl_gfx/sdl_gfx.hash HashSpaces
> +package/seatd/S70seatd NotExecutable Variables
> +package/sedutil/sedutil.hash HashSpaces
> +package/ser2net/S50ser2net Indent Shellcheck Variables
> +package/setools/setools.hash HashSpaces
> +package/shairport-sync/S99shairport-sync Indent Shellcheck Variables
> +package/shapelib/shapelib.hash HashSpaces
> +package/shared-mime-info/shared-mime-info.hash HashSpaces
> +package/shellinabox/shellinabox.hash HashSpaces
> +package/slang/slang.hash HashSpaces
> +package/smcroute/S41smcroute Indent NotExecutable Variables
> +package/smcroute/smcroute.hash HashSpaces
> +package/smstools3/S50smsd Shellcheck Variables
> +package/smstools3/smstools3.hash HashSpaces
> +package/snmpclitools/snmpclitools.hash HashSpaces
> +package/softether/softether.hash HashSpaces
> +package/solarus/0002-Add-a-basic-FindOpenGLES2.cmake.patch Sob
> +package/sound-theme-borealis/sound-theme-borealis.hash HashSpaces
> +package/sound-theme-freedesktop/sound-theme-freedesktop.hash HashSpaces
> +package/squeezelite/squeezelite.hash HashSpaces
> +package/squid/S97squid Indent Shellcheck Variables
> +package/ssdp-responder/S50ssdpd Indent NotExecutable Shellcheck Variables
> +package/sshguard/S49sshguard Indent
> +package/sslh/S35sslh Indent Shellcheck Variables
> +package/stunnel/S50stunnel Indent Shellcheck Variables
> +package/supertuxkart/supertuxkart.hash HashSpaces
> +package/supervisor/S99supervisord Variables
> +package/suricata/S99suricata Shellcheck
> +package/swig/swig.hash HashSpaces
> +package/sylpheed/sylpheed.hash HashSpaces
> +package/synergy/synergy.hash HashSpaces
> +package/sysrepo/S51sysrepo-plugind Indent Shellcheck
> +package/sysvinit/sysvinit.hash HashSpaces
> +package/szip/szip.hash HashSpaces
> +package/targetcli-fb/S50target Shellcheck Variables
> +package/taskd/taskd.hash HashSpaces
> +package/tcf-agent/S55tcf-agent Shellcheck Variables
> +package/tcping/tcping.hash HashSpaces
> +package/tftpd/S80tftpd-hpa Indent Shellcheck Variables
> +package/thttpd/thttpd.hash HashSpaces
> +package/ti-cgt-pru/ti-cgt-pru.hash HashSpaces
> +package/ti-gfx/S80ti-gfx Shellcheck Variables
> +package/ti-sgx-um/S80ti-sgx Variables
> +package/time/time.hash HashSpaces
> +package/tinc/tinc.hash HashSpaces
> +package/tinymembench/tinymembench.hash HashSpaces
> +package/tinyxml/tinyxml.hash HashSpaces
> +package/tovid/tovid.hash HashSpaces
> +package/tpm-tools/tpm-tools.hash HashSpaces
> +package/tpm2-abrmd/S80tpm2-abrmd Indent Shellcheck Variables
> +package/tpm2-totp/tpm2-totp.hash HashSpaces
> +package/traceroute/traceroute.hash HashSpaces
> +package/transmission/S92transmission ConsecutiveEmptyLines Indent Shellcheck Variables
> +package/triggerhappy/S10triggerhappy Indent Shellcheck Variables
> +package/trinity/trinity.hash HashSpaces
> +package/tstools/tstools.hash HashSpaces
> +package/turbolua/turbolua.hash HashSpaces
> +package/tvheadend/S99tvheadend Indent Shellcheck Variables
> +package/udev-gentoo-scripts/udev-gentoo-scripts.hash HashSpaces
> +package/uftrace/uftrace.hash HashSpaces
> +package/ulogd/ulogd.hash HashSpaces
> +package/unbound/S70unbound Shellcheck
> +package/unscd/S46unscd Indent Shellcheck Variables
> +package/upmpdcli/S99upmpdcli Indent Shellcheck Variables
> +package/urandom-scripts/S20urandom Variables
> +package/urg/urg.hash HashSpaces
> +package/usb_modeswitch_data/usb_modeswitch_data.hash HashSpaces
> +package/usbguard/S20usbguard Indent Shellcheck Variables
> +package/ussp-push/ussp-push.hash HashSpaces
> +package/utp_com/utp_com.hash HashSpaces
> +package/vdr-plugin-vnsiserver/vdr-plugin-vnsiserver.hash HashSpaces
> +package/vmtouch/vmtouch.hash HashSpaces
> +package/vsftpd/S70vsftpd Indent Shellcheck Variables
> +package/vtun/vtun.hash HashSpaces
> +package/watchdogd/S01watchdogd Indent NotExecutable
> +package/watchdogd/watchdogd.hash HashSpaces
> +package/webrtc-audio-processing/webrtc-audio-processing.hash HashSpaces
> +package/wf111/wf111.hash HashSpaces
> +package/whetstone/whetstone.hash HashSpaces
> +package/wireless_tools/wireless_tools.hash HashSpaces
> +package/wpan-tools/wpan-tools.hash HashSpaces
> +package/wsapi-fcgi/wsapi-fcgi.hash HashSpaces
> +package/wsapi-xavante/wsapi-xavante.hash HashSpaces
> +package/wsapi/wsapi.hash HashSpaces
> +package/x11r7/xapp_bdftopcf/xapp_bdftopcf.hash HashSpaces
> +package/x11r7/xapp_ico/xapp_ico.hash HashSpaces
> +package/x11r7/xapp_oclock/xapp_oclock.hash HashSpaces
> +package/x11r7/xapp_sessreg/xapp_sessreg.hash HashSpaces
> +package/x11r7/xapp_viewres/xapp_viewres.hash HashSpaces
> +package/x11r7/xapp_x11perf/xapp_x11perf.hash HashSpaces
> +package/x11r7/xapp_xauth/xapp_xauth.hash HashSpaces
> +package/x11r7/xapp_xbacklight/xapp_xbacklight.hash HashSpaces
> +package/x11r7/xapp_xbiff/xapp_xbiff.hash HashSpaces
> +package/x11r7/xapp_xcompmgr/xapp_xcompmgr.hash HashSpaces
> +package/x11r7/xapp_xcursorgen/xapp_xcursorgen.hash HashSpaces
> +package/x11r7/xapp_xdbedizzy/xapp_xdbedizzy.hash HashSpaces
> +package/x11r7/xapp_xditview/xapp_xditview.hash HashSpaces
> +package/x11r7/xapp_xdm/S99xdm Indent Variables
> +package/x11r7/xapp_xdriinfo/xapp_xdriinfo.hash HashSpaces
> +package/x11r7/xapp_xf86dga/xapp_xf86dga.hash HashSpaces
> +package/x11r7/xapp_xfd/xapp_xfd.hash HashSpaces
> +package/x11r7/xapp_xfontsel/xapp_xfontsel.hash HashSpaces
> +package/x11r7/xapp_xfs/xapp_xfs.hash HashSpaces
> +package/x11r7/xapp_xfsinfo/xapp_xfsinfo.hash HashSpaces
> +package/x11r7/xapp_xhost/xapp_xhost.hash HashSpaces
> +package/x11r7/xapp_xinit/xapp_xinit.hash HashSpaces
> +package/x11r7/xapp_xinput/xapp_xinput.hash HashSpaces
> +package/x11r7/xapp_xkbprint/xapp_xkbprint.hash HashSpaces
> +package/x11r7/xapp_xkill/xapp_xkill.hash HashSpaces
> +package/x11r7/xapp_xlogo/xapp_xlogo.hash HashSpaces
> +package/x11r7/xapp_xlsatoms/xapp_xlsatoms.hash HashSpaces
> +package/x11r7/xapp_xlsclients/xapp_xlsclients.hash HashSpaces
> +package/x11r7/xapp_xman/xapp_xman.hash HashSpaces
> +package/x11r7/xapp_xmessage/xapp_xmessage.hash HashSpaces
> +package/x11r7/xapp_xmodmap/xapp_xmodmap.hash HashSpaces
> +package/x11r7/xapp_xmore/xapp_xmore.hash HashSpaces
> +package/x11r7/xapp_xpr/xapp_xpr.hash HashSpaces
> +package/x11r7/xapp_xprop/xapp_xprop.hash HashSpaces
> +package/x11r7/xapp_xrandr/xapp_xrandr.hash HashSpaces
> +package/x11r7/xapp_xrefresh/xapp_xrefresh.hash HashSpaces
> +package/x11r7/xapp_xset/xapp_xset.hash HashSpaces
> +package/x11r7/xapp_xsetpointer/xapp_xsetpointer.hash HashSpaces
> +package/x11r7/xapp_xsetroot/xapp_xsetroot.hash HashSpaces
> +package/x11r7/xapp_xstdcmap/xapp_xstdcmap.hash HashSpaces
> +package/x11r7/xapp_xvinfo/xapp_xvinfo.hash HashSpaces
> +package/x11r7/xapp_xwininfo/xapp_xwininfo.hash HashSpaces
> +package/x11r7/xapp_xwud/xapp_xwud.hash HashSpaces
> +package/x11r7/xcb-util-cursor/xcb-util-cursor.hash HashSpaces
> +package/x11r7/xcb-util-image/xcb-util-image.hash HashSpaces
> +package/x11r7/xcb-util-keysyms/xcb-util-keysyms.hash HashSpaces
> +package/x11r7/xcb-util-wm/xcb-util-wm.hash HashSpaces
> +package/x11r7/xdata_xbitmaps/xdata_xbitmaps.hash HashSpaces
> +package/x11r7/xdata_xcursor-themes/xdata_xcursor-themes.hash HashSpaces
> +package/x11r7/xdriver_xf86-input-evdev/xdriver_xf86-input-evdev.hash HashSpaces
> +package/x11r7/xdriver_xf86-input-mouse/xdriver_xf86-input-mouse.hash HashSpaces
> +package/x11r7/xdriver_xf86-input-synaptics/xdriver_xf86-input-synaptics.hash HashSpaces
> +package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib.hash HashSpaces
> +package/x11r7/xdriver_xf86-video-ati/xdriver_xf86-video-ati.hash HashSpaces
> +package/x11r7/xdriver_xf86-video-fbdev/xdriver_xf86-video-fbdev.hash HashSpaces
> +package/x11r7/xdriver_xf86-video-i128/xdriver_xf86-video-i128.hash HashSpaces
> +package/x11r7/xdriver_xf86-video-mach64/0001-cross-compile.patch Sob
> +package/x11r7/xdriver_xf86-video-mach64/xdriver_xf86-video-mach64.hash HashSpaces
> +package/x11r7/xdriver_xf86-video-mga/0001-misc-fixes.patch Sob
> +package/x11r7/xdriver_xf86-video-mga/xdriver_xf86-video-mga.hash HashSpaces
> +package/x11r7/xdriver_xf86-video-neomagic/xdriver_xf86-video-neomagic.hash HashSpaces
> +package/x11r7/xdriver_xf86-video-r128/xdriver_xf86-video-r128.hash HashSpaces
> +package/x11r7/xdriver_xf86-video-savage/0001-cross-compile.patch Sob
> +package/x11r7/xdriver_xf86-video-siliconmotion/xdriver_xf86-video-siliconmotion.hash HashSpaces
> +package/x11r7/xdriver_xf86-video-sis/xdriver_xf86-video-sis.hash HashSpaces
> +package/x11r7/xdriver_xf86-video-tdfx/0001-cross.patch Sob
> +package/x11r7/xdriver_xf86-video-tdfx/xdriver_xf86-video-tdfx.hash HashSpaces
> +package/x11r7/xdriver_xf86-video-trident/xdriver_xf86-video-trident.hash HashSpaces
> +package/x11r7/xdriver_xf86-video-vmware/xdriver_xf86-video-vmware.hash HashSpaces
> +package/x11r7/xfont_encodings/xfont_encodings.hash HashSpaces
> +package/x11r7/xfont_font-bh-ttf/xfont_font-bh-ttf.hash HashSpaces
> +package/x11r7/xfont_font-util/xfont_font-util.hash HashSpaces
> +package/x11r7/xlib_libFS/xlib_libFS.hash HashSpaces
> +package/x11r7/xlib_libICE/xlib_libICE.hash HashSpaces
> +package/x11r7/xlib_libSM/xlib_libSM.hash HashSpaces
> +package/x11r7/xlib_libXScrnSaver/xlib_libXScrnSaver.hash HashSpaces
> +package/x11r7/xlib_libXau/xlib_libXau.hash HashSpaces
> +package/x11r7/xlib_libXcomposite/xlib_libXcomposite.hash HashSpaces
> +package/x11r7/xlib_libXdamage/xlib_libXdamage.hash HashSpaces
> +package/x11r7/xlib_libXdmcp/xlib_libXdmcp.hash HashSpaces
> +package/x11r7/xlib_libXext/xlib_libXext.hash HashSpaces
> +package/x11r7/xlib_libXfixes/xlib_libXfixes.hash HashSpaces
> +package/x11r7/xlib_libXfont/xlib_libXfont.hash HashSpaces
> +package/x11r7/xlib_libXinerama/xlib_libXinerama.hash HashSpaces
> +package/x11r7/xlib_libXmu/xlib_libXmu.hash HashSpaces
> +package/x11r7/xlib_libXpm/xlib_libXpm.hash HashSpaces
> +package/x11r7/xlib_libXrandr/xlib_libXrandr.hash HashSpaces
> +package/x11r7/xlib_libXrender/xlib_libXrender.hash HashSpaces
> +package/x11r7/xlib_libXt/xlib_libXt.hash HashSpaces
> +package/x11r7/xlib_libXv/xlib_libXv.hash HashSpaces
> +package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga.hash HashSpaces
> +package/x11r7/xlib_libXxf86vm/xlib_libXxf86vm.hash HashSpaces
> +package/x11r7/xlib_libdmx/xlib_libdmx.hash HashSpaces
> +package/x11r7/xlib_libfontenc/xlib_libfontenc.hash HashSpaces
> +package/x11r7/xlib_libxkbfile/xlib_libxkbfile.hash HashSpaces
> +package/x11r7/xlib_libxshmfence/xlib_libxshmfence.hash HashSpaces
> +package/x11r7/xlib_xtrans/xlib_xtrans.hash HashSpaces
> +package/x11r7/xserver_xorg-server/S40xorg Shellcheck Variables
> +package/x11r7/xutil_makedepend/xutil_makedepend.hash HashSpaces
> +package/xavante/xavante.hash HashSpaces
> +package/xmlstarlet/xmlstarlet.hash HashSpaces
> +package/xutil_util-macros/xutil_util-macros.hash HashSpaces
> +package/yad/yad.hash HashSpaces
> +package/zip/zip.hash HashSpaces
> +package/zmqpp/zmqpp.hash HashSpaces
> +package/zxing-cpp/zxing-cpp.hash HashSpaces
> +toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.hash HashSpaces
> +toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.hash HashSpaces
> +toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.hash HashSpaces
> +toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.hash HashSpaces
> +toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.hash HashSpaces
> +toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.hash HashSpaces
> +toolchain/toolchain-external/toolchain-external-linaro-aarch64-be/toolchain-external-linaro-aarch64-be.hash HashSpaces
> +toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.hash HashSpaces
> +toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.hash HashSpaces
> +toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.hash HashSpaces
> +toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.hash HashSpaces
> diff --git a/Makefile b/Makefile
> index 4305c8c3dd..bd7ab9675d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1245,8 +1245,7 @@ check-flake8:
>  	| xargs -- python3 -m flake8 --statistics
>  
>  check-package:
> -	find $(TOPDIR) -type f \( -name '*.mk' -o -name '*.hash' -o -name 'Config.*' -o -name '*.patch' \) \
> -		-exec ./utils/check-package --exclude=Sob --exclude=HashSpaces {} +
> +	$(Q)./utils/check-package `git ls-tree -r --name-only HEAD`
>  
>  include docs/manual/manual.mk
>  -include $(foreach dir,$(BR2_EXTERNAL_DIRS),$(sort $(wildcard $(dir)/docs/*/*.mk)))

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 07/16] Makefile: run check-* inside docker image
  2022-07-24  5:49 ` [Buildroot] [PATCH 07/16] Makefile: run check-* inside docker image Ricardo Martincoski
@ 2022-07-27 13:16   ` Romain Naour
  2022-07-31 14:34     ` Ricardo Martincoski
  0 siblings, 1 reply; 32+ messages in thread
From: Romain Naour @ 2022-07-27 13:16 UTC (permalink / raw)
  To: Ricardo Martincoski, buildroot

Hello Ricardo,

Le 24/07/2022 à 07:49, Ricardo Martincoski a écrit :
> Currently the result for both check-package and check-flake8 targets
> depend on the version of the tools flake8 and shellcheck installed on
> the host.
> 
> In order to ensure reproducibility across machines of different
> developers, always use the docker image to run these targets.
> 
> When one of these targets is called, test if it is already running
> inside the docker image, and if it not, start the docker image and run
> the same command inside it.
> Do the check for the docker image in a simple way: just check current
> user belongs only to group br-user. It is very unlikely a developer has
> exactly this user configuration in the host.
> 
> Add a note in the Dockerfile about this use.
> 
> Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
> ---
>  Makefile                  | 10 ++++++++++
>  support/docker/Dockerfile |  1 +
>  2 files changed, 11 insertions(+)
> 
> diff --git a/Makefile b/Makefile
> index bd7ab9675d..f42dc3151d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1237,6 +1237,15 @@ release:
>  print-version:
>  	@echo $(BR2_VERSION_FULL)
>  
> +check_inside_docker := $(shell if [ "`groups`" = 'br-user' ]; then echo y; else echo n; fi)
> +
> +# List of target that need to run inside docker image to ensure reproducible results
> +inside_docker_targets := check-package check-flake8
> +
> +ifeq ($(check_inside_docker),n)
> +$(inside_docker_targets):
> +	$(Q)utils/docker-run $(MAKE) V=$(V) $@

While I understand the reproducibility issue, I'm not sure I really wand my make
check-package command starting starting a docker container.

I guess Buildroot user (or CI build machine) can do the same if they want.

Best regards,
Romain


> +else
>  check-flake8:
>  	$(Q)git ls-tree -r --name-only HEAD \
>  	| xargs file \
> @@ -1246,6 +1255,7 @@ check-flake8:
>  
>  check-package:
>  	$(Q)./utils/check-package `git ls-tree -r --name-only HEAD`
> +endif
>  
>  include docs/manual/manual.mk
>  -include $(foreach dir,$(BR2_EXTERNAL_DIRS),$(sort $(wildcard $(dir)/docs/*/*.mk)))
> diff --git a/support/docker/Dockerfile b/support/docker/Dockerfile
> index f54c31b54a..afe8911e78 100644
> --- a/support/docker/Dockerfile
> +++ b/support/docker/Dockerfile
> @@ -60,6 +60,7 @@ RUN sed -i 's/# \(en_US.UTF-8\)/\1/' /etc/locale.gen && \
>  RUN useradd -ms /bin/bash br-user && \
>      chown -R br-user:br-user /home/br-user
>  
> +# Note: below user is used to check if we are running inside docker
>  USER br-user
>  WORKDIR /home/br-user
>  ENV HOME /home/br-user

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 08/16] docs/manual: check-package before submitting patch
  2022-07-24  5:49 ` [Buildroot] [PATCH 08/16] docs/manual: check-package before submitting patch Ricardo Martincoski
@ 2022-07-27 13:22   ` Romain Naour
  2022-07-31 14:37     ` Ricardo Martincoski
  0 siblings, 1 reply; 32+ messages in thread
From: Romain Naour @ 2022-07-27 13:22 UTC (permalink / raw)
  To: Ricardo Martincoski, buildroot; +Cc: Thomas De Schampheleire

Hello Ricardo,

Le 24/07/2022 à 07:49, Ricardo Martincoski a écrit :
> Add 'make check-package' to the default workflow of submitting patches,
> just after the rebase and before using format-patch.
> 
> Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
> ---
>  docs/manual/contribute.txt | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/docs/manual/contribute.txt b/docs/manual/contribute.txt
> index e588c69be6..c5652af7a0 100644
> --- a/docs/manual/contribute.txt
> +++ b/docs/manual/contribute.txt
> @@ -294,6 +294,12 @@ $ git fetch --all --tags
>  $ git rebase origin/master
>  ---------------------
>  
> +Now run some basic checks for the changes you committed:

"some basic checks" may be not really meaningful for newcomers.

I would add a small description of what check-package really does.

Best regards,
Romain


> +
> +---------------------
> +$ make check-package
> +---------------------
> +
>  Now, you are ready to generate then submit your patch set.
>  
>  To generate it, run:

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 06/16] Makefile: make check-package assume a git tree
  2022-07-27 12:54   ` Romain Naour
@ 2022-07-31 14:31     ` Ricardo Martincoski
  2022-07-31 19:23       ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 32+ messages in thread
From: Ricardo Martincoski @ 2022-07-31 14:31 UTC (permalink / raw)
  To: romain.naour; +Cc: thomas.petazzoni, buildroot

[-- Attachment #1: Type: text/plain, Size: 4308 bytes --]

Hello Romain,

Thank you for your review on the series.
I will respin. I just changed the series to Changes Requested.

On Wed, Jul 27, 2022 at 09:54 AM, Romain Naour wrote:

> Le 24/07/2022 à 07:49, Ricardo Martincoski a écrit :
>> ... just like check-flake8 already does.
>> 
>> When a new check_function is added to check-package, often there are
>> files in the tree that would generate warnings.
>> 
>> An example is the Sob check_function for patch files:
>> | $ ./utils/check-package --i Sob $(git ls-files) >/dev/null
>> | 369301 lines processed
>> | 46 warnings generated
>> Currently these warnings are listed when calling check-package directly,
>> and also at the output of pkg-stats, but the check_function does not run
>> on 'make check-package' (that is used to catch regressions on GitLab CI
>> 'check-package' job) until all warnings in the tree are fixed.
>> This (theoretically) allows new .patch files be added without SoB,
>> without the GitLab CI catching it.
>> 
>> Since now check-package has an ignore file to list all warnings in the
>> tree, that will eventually be fixed, there is no need to filter the
>> files passed to check-package.
>> So test all files in the tree when 'make check-package' is called.
>> It brings following advantages;
>> - any new check_function added to check-package takes place immediately
>>   for new files;
>> - adding new check_functions is less traumatic to the developer doing
>>   this, since he/she does not need anymore to fix all warnings in the
>>   tree before the new check_function takes effect;
>> - prevent regressions, e.g. ANY new .hash file must have 2 spaces;
>> - as a side-effect, print a single statistics line as output of
>>   'make ckeck-package'.
>> 
>> But just enabling the check would generate many warnings when
>> 'make check-package' is called, so update the ignore file by using:
>> $ ./utils/docker-run
>> br-user@...$ ./utils/check-package --failed-only \
>>                `git ls-tree -r --name-only HEAD` > .checkpackageignore
> 
> I guess the ultimate goal of check-package is to make .checkpackageignore empty,
> so at some point this feature should not be useful :)

I don't think we will reach the goal of 0 warnings.
From time to time we can expect new coding style rules to be added to
check-package.

> 
> checkpackageignore is actually needed to convert smoothly the code base to the
> new coding style in order to not conflict too much with pending patches in
> patchwork.

No. It is needed to decouple:
- the style rules we want to enforce for new patches submitted to the list
- from the fix for all files in the tree that does not follow yet the added rule

For instance, this series enforces all new shell scripts to fix (or explicitly
ignore) shellcheck warnings, but it does not change the hundreds of files in
the tree that do not follow that rule just because the rule was not in place
when they were added.

$ grep Shellcheck .checkpackageignore | wc -l
241

> 
> But patchwork is currently "almost" empty (compared to normal) with less than
> 200 patches, so it may be the good opportunity to apply right now a big patch
> removing all HashSpaces and shellcheck warnings (Sob warning are bit more
> complicated to handle though).

shellcheck is not so trivial too.

With this series applied any new patch applied that:
 - adds a patch file without SoB
 - adds a shell script that does not follow shellcheck
will trigger the warning in the CI build.

Someone could even come up with a git pre-commit hook to be used by maintainers ;-)

> 
> The issue with the big patch approach is that the patch must be applied right
> away. Similar to the big patch adding hashes for SourceForge-hosted packages [1].
> 
> Otherwise we have to not forget to update checkpackageignore file when fixing a
> warning in a package.

For developers, even newcomers, that follow the manual 'make check-package'
will warn about it.

And for big patches, it can be updated mechanically using patch 5.

I could also add a helper. When someone calls:
make .checkpackageignore
the file gets updated.


Regards,
Ricardo

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 07/16] Makefile: run check-* inside docker image
  2022-07-27 13:16   ` Romain Naour
@ 2022-07-31 14:34     ` Ricardo Martincoski
  0 siblings, 0 replies; 32+ messages in thread
From: Ricardo Martincoski @ 2022-07-31 14:34 UTC (permalink / raw)
  To: romain.naour; +Cc: buildroot

[-- Attachment #1: Type: text/plain, Size: 2176 bytes --]

Hello,

On Wed, Jul 27, 2022 at 10:16 AM, Romain Naour wrote:

[snip]
>> +check_inside_docker := $(shell if [ "`groups`" = 'br-user' ]; then echo y; else echo n; fi)
>> +
>> +# List of target that need to run inside docker image to ensure reproducible results
>> +inside_docker_targets := check-package check-flake8
>> +
>> +ifeq ($(check_inside_docker),n)
>> +$(inside_docker_targets):
>> +	$(Q)utils/docker-run $(MAKE) V=$(V) $@
> 
> While I understand the reproducibility issue, I'm not sure I really wand my make
> check-package command starting starting a docker container.

I really prefer a 'good default' with reproducible results.
Advanced users can always call check-package directly.

But perhaps some developer can hit some corporate policies when developing
patches inside the company:
- can't run docker at all
- can't download docker images from the internet
For that poor souls, I will withdraw this patch and resend. :)

Well... we could instead change de manual to say:

299 ---------------------
300 $ utils/docker-run make check-package
301 ---------------------

> 
> I guess Buildroot user (or CI build machine) can do the same if they want.

CI builds already run inside the same docker image, so no change there.

I was trying to accomplish with this series, among other things, a way to
ensure the same results locally when compared to CI builds.

One interesting reproducibility issue that is already taken into account by this
series, even outside the docker image:
patch 14
file utils/check-package
line 98

I developed outside the docker image and when I run on CI build the python files
were being not tested and ignored by check-package.
See the reason:

$ utils/docker-run python3 -c \
  "import magic;" \
  "print(magic.from_file('utils/brmake', mime=True));" \
  "print(magic.from_file('utils/check-package', mime=True))"; 
text/x-shellscript
text/x-script.python

$ python3 -c \
  "import magic;" \
  "print(magic.from_file('utils/brmake', mime=True));" \
  "print(magic.from_file('utils/check-package', mime=True))"; 
text/x-shellscript
text/x-python

But as I say above, I will withdraw this patch and resend the series.


Regards,
Ricardo

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 08/16] docs/manual: check-package before submitting patch
  2022-07-27 13:22   ` Romain Naour
@ 2022-07-31 14:37     ` Ricardo Martincoski
  0 siblings, 0 replies; 32+ messages in thread
From: Ricardo Martincoski @ 2022-07-31 14:37 UTC (permalink / raw)
  To: romain.naour; +Cc: thomas.de_schampheleire, buildroot

[-- Attachment #1: Type: text/plain, Size: 2044 bytes --]

Hello,

On Wed, Jul 27, 2022 at 10:22 AM, Romain Naour wrote:

> Le 24/07/2022 à 07:49, Ricardo Martincoski a écrit :
>> Add 'make check-package' to the default workflow of submitting patches,
>> just after the rebase and before using format-patch.
>> 
>> Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
>> Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
>> ---
>>  docs/manual/contribute.txt | 6 ++++++
>>  1 file changed, 6 insertions(+)
>> 
>> diff --git a/docs/manual/contribute.txt b/docs/manual/contribute.txt
>> index e588c69be6..c5652af7a0 100644
>> --- a/docs/manual/contribute.txt
>> +++ b/docs/manual/contribute.txt
>> @@ -294,6 +294,12 @@ $ git fetch --all --tags
>>  $ git rebase origin/master
>>  ---------------------
>>  
>> +Now run some basic checks for the changes you committed:
> 
> "some basic checks" may be not really meaningful for newcomers.

Indeed.

> 
> I would add a small description of what check-package really does.

Maybe:
Now check the coding style for the changes you committed:

Notice that the hyperlink to the section that describes what it does is right
above the added text.

282 Buildroot provides a handy tool to check for common coding style
283 mistakes on files you created or modified, called +check-package+ (see
284 xref:check-package[] for more information).
285
286 ==== Preparing a patch series
287
288 Starting from the changes committed in your local git view, _rebase_
289 your development branch on top of the upstream tree before generating
290 a patch set. To do so, run:
291
292 ---------------------
293 $ git fetch --all --tags
294 $ git rebase origin/master
295 ---------------------
296 
297 Now check the coding style for the changes you committed:
298 
299 ---------------------
300 $ make check-package
301 ---------------------
302 
303 Now, you are ready to generate then submit your patch set.


Regards,
Ricardo

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 06/16] Makefile: make check-package assume a git tree
  2022-07-31 14:31     ` Ricardo Martincoski
@ 2022-07-31 19:23       ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 32+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-07-31 19:23 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: romain.naour, buildroot

Hello Ricardo,

On Sun, 31 Jul 2022 11:31:10 -0300
Ricardo Martincoski <ricardo.martincoski@gmail.com> wrote:

> Thank you for your review on the series.
> I will respin. I just changed the series to Changes Requested.

You have probably seen that we have fixed all hash files in one big
commit. The trigger for this was your series, for which the "warning
ignore" file was mostly filled with ignores for hash file formatting
issues.

So it will be one thing less to worry about in your series, as all
hashes are now correct.

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 10/16] utils/check-package: check all shell scripts
  2022-07-24  5:49 ` [Buildroot] [PATCH 10/16] utils/check-package: check all shell scripts Ricardo Martincoski
@ 2023-04-09 21:01   ` Arnout Vandecappelle
  0 siblings, 0 replies; 32+ messages in thread
From: Arnout Vandecappelle @ 2023-04-09 21:01 UTC (permalink / raw)
  To: Ricardo Martincoski, buildroot



On 24/07/2022 07:49, Ricardo Martincoski wrote:
> Currently only SysV init scripts are checked using shellcheck and a few
> other rules (e.g. variable naming, file naming).
> 
> Extend the check using shellcheck to all shell scripts in the tree.
> This is actually limited to the list of directories that check-package
> knows that can check, but that list can be expanded later.
> 
> In order to apply the check to all shell scripts, use python3-magic to
> determine the file type.
> Keep testing first for name pattern, and only in the case there is no
> match, check the file type. This ensures, for instance, that SysV
> init scripts follow specific rules.
> 
> Apply these checks for shell scripts:
>   - shellcheck;
>   - trailing space;
>   - consecutive empty lines;
>   - empty last line on file;
>   - newline at end of file.
> 
> Update the list of ignored warnings.
> 
> Since 'make check-package' always run using the docker image, there is
> no dependency added to the host machine.
> 
> Do not add unit tests since no function was added, they were just
> reused.
> But expand the runtime test for check-package using as fixture a file
> that generates a shellcheck warning.
> 
> Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
> ---
> NOTE to the maintainer applying this patch: please re-generate the list
> of ignored warnings while applying:
> $ ./utils/docker-run
> br-user@...$ ./utils/check-package --failed-only `git ls-tree -r --name-only HEAD` > .checkpackageignore


  Applied to master, after regenerating the list thanks.

  Regards,
  Arnout

> ---
>   .checkpackageignore                           | 20 +++++++++++++++++++
>   .../utils/br2-external/utils/x-shellscript    |  2 ++
>   .../testing/tests/utils/test_check_package.py | 17 ++++++++++++++++
>   utils/check-package                           | 13 +++++++++++-
>   utils/checkpackagelib/lib_shellscript.py      |  5 +++++
>   5 files changed, 56 insertions(+), 1 deletion(-)
>   create mode 100755 support/testing/tests/utils/br2-external/utils/x-shellscript
>   create mode 100644 utils/checkpackagelib/lib_shellscript.py
> 
> diff --git a/.checkpackageignore b/.checkpackageignore
> index 98099508ba..541f234bfd 100644
> --- a/.checkpackageignore
> +++ b/.checkpackageignore
> @@ -52,6 +52,7 @@ package/busybox/S02sysctl Variables
>   package/busybox/S10mdev ConsecutiveEmptyLines Indent Shellcheck
>   package/busybox/S15watchdog Indent Variables
>   package/busybox/S50telnet Indent Shellcheck Variables
> +package/busybox/udhcpc.script Shellcheck
>   package/bzip2/bzip2.hash HashSpaces
>   package/c-icap/S96cicap Indent Shellcheck Variables
>   package/cache-calibrator/cache-calibrator.hash HashSpaces
> @@ -74,6 +75,7 @@ package/connman-gtk/connman-gtk.hash HashSpaces
>   package/connman/S45connman Variables
>   package/conntrack-tools/conntrack-tools.hash HashSpaces
>   package/copas/copas.hash HashSpaces
> +package/coremark-pro/coremark-pro.sh.in Shellcheck
>   package/coxpcall/coxpcall.hash HashSpaces
>   package/cpio/cpio.hash HashSpaces
>   package/cppdb/cppdb.hash HashSpaces
> @@ -104,6 +106,7 @@ package/dcron/S90dcron Variables
>   package/debianutils/debianutils.hash HashSpaces
>   package/dhcp/S80dhcp-relay Shellcheck Variables
>   package/dhcp/S80dhcp-server Shellcheck Variables
> +package/dhcp/dhclient-script Shellcheck TrailingSpace
>   package/dhcpcd/S41dhcpcd Indent Variables
>   package/dhcpdump/dhcpdump.hash HashSpaces
>   package/dhrystone/0001-cmdline-nruns.patch Sob
> @@ -131,6 +134,7 @@ package/earlyoom/S02earlyoom Indent Shellcheck
>   package/ecryptfs-utils/ecryptfs-utils.hash HashSpaces
>   package/efivar/efivar.hash HashSpaces
>   package/ejabberd/S50ejabberd Indent Shellcheck Variables
> +package/ejabberd/check-erlang-lib Shellcheck
>   package/elftosb/elftosb.hash HashSpaces
>   package/elixir/elixir.hash HashSpaces
>   package/emlog/emlog.hash HashSpaces
> @@ -144,6 +148,7 @@ package/exfat/exfat.hash HashSpaces
>   package/exim/S86exim Indent Variables
>   package/f2fs-tools/f2fs-tools.hash HashSpaces
>   package/fail2ban/S60fail2ban Shellcheck Variables
> +package/fakedate/fakedate Shellcheck
>   package/fan-ctrl/fan-ctrl.hash HashSpaces
>   package/fbdump/fbdump.hash HashSpaces
>   package/fbterm/fbterm.hash HashSpaces
> @@ -186,6 +191,7 @@ package/glorytun/glorytun.hash HashSpaces
>   package/gnuradio/gnuradio.hash HashSpaces
>   package/go/0002-cmd-dist-use-gohostarch-for-ssa-rewrite-check.patch Sob
>   package/gob2/gob2.hash HashSpaces
> +package/google-breakpad/gen-syms.sh Shellcheck
>   package/googlefontdirectory/googlefontdirectory.hash HashSpaces
>   package/gperf/gperf.hash HashSpaces
>   package/gpsd/S50gpsd Indent Shellcheck Variables
> @@ -205,11 +211,15 @@ package/ifmetric/ifmetric.hash HashSpaces
>   package/ifplugd/0001-cross.patch Sob
>   package/ifplugd/0002-fix-headers.patch Sob
>   package/ifupdown-scripts/S40network EmptyLastLine Indent Shellcheck Variables
> +package/ifupdown-scripts/network/if-pre-up.d/wait_iface EmptyLastLine Shellcheck
> +package/ifupdown-scripts/nfs_check Shellcheck
>   package/igd2-for-linux/S99upnpd Indent Shellcheck Variables
>   package/igh-ethercat/igh-ethercat.hash HashSpaces
>   package/ijs/ijs.hash HashSpaces
>   package/ima-evm-utils/ima-evm-utils.hash HashSpaces
>   package/inadyn/S70inadyn Indent NotExecutable
> +package/initscripts/init.d/rcK ConsecutiveEmptyLines EmptyLastLine Shellcheck
> +package/initscripts/init.d/rcS ConsecutiveEmptyLines EmptyLastLine Shellcheck
>   package/input-event-daemon/S99input-event-daemon ConsecutiveEmptyLines Indent Variables
>   package/intltool/intltool.hash HashSpaces
>   package/iodine/iodine.hash HashSpaces
> @@ -400,6 +410,7 @@ package/mariadb/S97mysqld Indent Shellcheck Variables
>   package/matchbox-common/matchbox-common.hash HashSpaces
>   package/matchbox-desktop/matchbox-desktop.hash HashSpaces
>   package/matchbox-keyboard/matchbox-keyboard.hash HashSpaces
> +package/matchbox-keyboard/mb-applet-kbd-wrapper.sh Shellcheck TrailingSpace
>   package/matchbox-panel/matchbox-panel.hash HashSpaces
>   package/matchbox-startup-monitor/matchbox-startup-monitor.hash HashSpaces
>   package/memstat/memstat.hash HashSpaces
> @@ -441,6 +452,7 @@ package/netifrc/netifrc.hash HashSpaces
>   package/netopeer2/S52netopeer2 Shellcheck Variables
>   package/netplug/0001-makefile-flags.patch Sob
>   package/netplug/S29netplug Indent Shellcheck Variables
> +package/netplug/netplug-script ConsecutiveEmptyLines Shellcheck
>   package/netsnmp/S59snmpd Indent Shellcheck Variables
>   package/network-manager/S45network-manager ConsecutiveEmptyLines EmptyLastLine Shellcheck Variables
>   package/newt/newt.hash HashSpaces
> @@ -470,6 +482,7 @@ package/openobex/openobex.hash HashSpaces
>   package/openpowerlink/openpowerlink.hash HashSpaces
>   package/openssh/S50sshd EmptyLastLine Indent Variables
>   package/opentyrian-data/opentyrian-data.hash HashSpaces
> +package/openvmtools/shutdown Shellcheck
>   package/openvpn/S60openvpn Indent Shellcheck Variables
>   package/optee-client/S30optee Indent Shellcheck Variables
>   package/opus-tools/opus-tools.hash HashSpaces
> @@ -561,6 +574,7 @@ package/picocom/picocom.hash HashSpaces
>   package/pigpio/S50pigpio Shellcheck Variables
>   package/pimd/pimd.hash HashSpaces
>   package/pixiewps/pixiewps.hash HashSpaces
> +package/pkgconf/pkg-config.in Shellcheck
>   package/policycoreutils/policycoreutils.hash HashSpaces
>   package/polkit/S50polkit NotExecutable Shellcheck Variables
>   package/popperjs/popperjs.hash HashSpaces
> @@ -748,9 +762,11 @@ package/supertuxkart/supertuxkart.hash HashSpaces
>   package/supervisor/S99supervisord Variables
>   package/suricata/S99suricata Shellcheck
>   package/swig/swig.hash HashSpaces
> +package/swupdate/swupdate.sh Shellcheck
>   package/sylpheed/sylpheed.hash HashSpaces
>   package/synergy/synergy.hash HashSpaces
>   package/sysrepo/S51sysrepo-plugind Indent Shellcheck
> +package/systemd/fakeroot_tmpfiles.sh Shellcheck
>   package/sysvinit/sysvinit.hash HashSpaces
>   package/szip/szip.hash HashSpaces
>   package/targetcli-fb/S50target Shellcheck Variables
> @@ -761,6 +777,7 @@ package/tftpd/S80tftpd-hpa Indent Shellcheck Variables
>   package/thttpd/thttpd.hash HashSpaces
>   package/ti-cgt-pru/ti-cgt-pru.hash HashSpaces
>   package/ti-gfx/S80ti-gfx Shellcheck Variables
> +package/ti-gfx/esrev.sh Shellcheck
>   package/ti-sgx-um/S80ti-sgx Variables
>   package/time/time.hash HashSpaces
>   package/tinc/tinc.hash HashSpaces
> @@ -789,6 +806,7 @@ package/usb_modeswitch_data/usb_modeswitch_data.hash HashSpaces
>   package/usbguard/S20usbguard Indent Shellcheck Variables
>   package/ussp-push/ussp-push.hash HashSpaces
>   package/utp_com/utp_com.hash HashSpaces
> +package/vala/vala-wrapper Shellcheck
>   package/vdr-plugin-vnsiserver/vdr-plugin-vnsiserver.hash HashSpaces
>   package/vmtouch/vmtouch.hash HashSpaces
>   package/vsftpd/S70vsftpd Indent Shellcheck Variables
> @@ -799,6 +817,7 @@ package/webrtc-audio-processing/webrtc-audio-processing.hash HashSpaces
>   package/wf111/wf111.hash HashSpaces
>   package/whetstone/whetstone.hash HashSpaces
>   package/wireless_tools/wireless_tools.hash HashSpaces
> +package/wpa_supplicant/ifupdown.sh Shellcheck
>   package/wpan-tools/wpan-tools.hash HashSpaces
>   package/wsapi-fcgi/wsapi-fcgi.hash HashSpaces
>   package/wsapi-xavante/wsapi-xavante.hash HashSpaces
> @@ -903,6 +922,7 @@ package/x11r7/xlib_xtrans/xlib_xtrans.hash HashSpaces
>   package/x11r7/xserver_xorg-server/S40xorg Shellcheck Variables
>   package/x11r7/xutil_makedepend/xutil_makedepend.hash HashSpaces
>   package/xavante/xavante.hash HashSpaces
> +package/xl2tp/xl2tpd TrailingSpace
>   package/xmlstarlet/xmlstarlet.hash HashSpaces
>   package/xutil_util-macros/xutil_util-macros.hash HashSpaces
>   package/yad/yad.hash HashSpaces
> diff --git a/support/testing/tests/utils/br2-external/utils/x-shellscript b/support/testing/tests/utils/br2-external/utils/x-shellscript
> new file mode 100755
> index 0000000000..a7de4124bd
> --- /dev/null
> +++ b/support/testing/tests/utils/br2-external/utils/x-shellscript
> @@ -0,0 +1,2 @@
> +#!/bin/bash
> +unused="text"
> diff --git a/support/testing/tests/utils/test_check_package.py b/support/testing/tests/utils/test_check_package.py
> index f21b9e939f..aeda0857e3 100644
> --- a/support/testing/tests/utils/test_check_package.py
> +++ b/support/testing/tests/utils/test_check_package.py
> @@ -232,3 +232,20 @@ class TestCheckPackage(unittest.TestCase):
>                         .format(subdir_file), w)
>           self.assertIn("{}:0: NewlineAtEof was expected to fail, did you fixed the file and forgot to update .checkpackageignore?"
>                         .format(subdir_file), w)
> +
> +        # shell scripts are tested using shellcheck
> +        rel_file = "utils/x-shellscript"
> +        abs_path = infra.filepath("tests/utils/br2-external")
> +        abs_file = os.path.join(abs_path, rel_file)
> +
> +        w, m = call_script(["check-package", "-b", rel_file],
> +                           self.WITH_UTILS_IN_PATH, abs_path)
> +        self.assert_file_was_processed(m)
> +        self.assert_warnings_generated_for_file(m)
> +        self.assertIn("{}:0: run 'shellcheck' and fix the warnings".format(rel_file), w)
> +
> +        w, m = call_script(["check-package", "-b", abs_file],
> +                           self.WITH_UTILS_IN_PATH, infra.basepath())
> +        self.assert_file_was_processed(m)
> +        self.assert_warnings_generated_for_file(m)
> +        self.assertIn("{}:0: run 'shellcheck' and fix the warnings".format(abs_file), w)
> diff --git a/utils/check-package b/utils/check-package
> index 1508e39c37..6612cee24e 100755
> --- a/utils/check-package
> +++ b/utils/check-package
> @@ -3,6 +3,7 @@
>   
>   import argparse
>   import inspect
> +import magic
>   import os
>   import re
>   import six
> @@ -13,6 +14,7 @@ import checkpackagelib.lib_config
>   import checkpackagelib.lib_hash
>   import checkpackagelib.lib_mk
>   import checkpackagelib.lib_patch
> +import checkpackagelib.lib_shellscript
>   import checkpackagelib.lib_sysv
>   
>   IGNORE_FILENAME = ".checkpackageignore"
> @@ -86,6 +88,15 @@ def parse_args():
>       return flags
>   
>   
> +def get_lib_from_filetype(fname):
> +    if not os.path.isfile(fname):
> +        return None
> +    filetype = magic.from_file(fname, mime=True)
> +    if filetype == "text/x-shellscript":
> +        return checkpackagelib.lib_shellscript
> +    return None
> +
> +
>   CONFIG_IN_FILENAME = re.compile(r"Config\.\S*$")
>   DO_CHECK_INTREE = re.compile(r"|".join([
>       r"Config.in",
> @@ -129,7 +140,7 @@ def get_lib_from_filename(fname):
>           return checkpackagelib.lib_patch
>       if SYSV_INIT_SCRIPT_FILENAME.search(fname):
>           return checkpackagelib.lib_sysv
> -    return None
> +    return get_lib_from_filetype(fname)
>   
>   
>   def common_inspect_rules(m):
> diff --git a/utils/checkpackagelib/lib_shellscript.py b/utils/checkpackagelib/lib_shellscript.py
> new file mode 100644
> index 0000000000..9b4f4aed58
> --- /dev/null
> +++ b/utils/checkpackagelib/lib_shellscript.py
> @@ -0,0 +1,5 @@
> +from checkpackagelib.lib import ConsecutiveEmptyLines  # noqa: F401
> +from checkpackagelib.lib import EmptyLastLine          # noqa: F401
> +from checkpackagelib.lib import NewlineAtEof           # noqa: F401
> +from checkpackagelib.lib import TrailingSpace          # noqa: F401
> +from checkpackagelib.tool import Shellcheck            # noqa: F401
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 11/16] utils/check-package: check files in utils/
  2022-07-24  5:49 ` [Buildroot] [PATCH 11/16] utils/check-package: check files in utils/ Ricardo Martincoski
@ 2023-04-09 21:02   ` Arnout Vandecappelle
  0 siblings, 0 replies; 32+ messages in thread
From: Arnout Vandecappelle @ 2023-04-09 21:02 UTC (permalink / raw)
  To: Ricardo Martincoski, buildroot



On 24/07/2022 07:49, Ricardo Martincoski wrote:
> Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
> ---
> NOTE to the maintainer applying this patch: please re-generate the list
> of ignored warnings while applying:
> $ ./utils/docker-run
> br-user@...$ ./utils/check-package --failed-only `git ls-tree -r --name-only HEAD` > .checkpackageignore

  Applied to master after updating the ignore list, thanks.

  Regards,
  Arnout

> ---
>   .checkpackageignore | 4 ++++
>   utils/check-package | 1 +
>   2 files changed, 5 insertions(+)
> 
> diff --git a/.checkpackageignore b/.checkpackageignore
> index 541f234bfd..765e5c1cba 100644
> --- a/.checkpackageignore
> +++ b/.checkpackageignore
> @@ -940,3 +940,7 @@ toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-externa
>   toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.hash HashSpaces
>   toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.hash HashSpaces
>   toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.hash HashSpaces
> +utils/brmake Shellcheck
> +utils/config Shellcheck
> +utils/docker-run Shellcheck
> +utils/test-pkg Shellcheck
> diff --git a/utils/check-package b/utils/check-package
> index 6612cee24e..880fcfa21e 100755
> --- a/utils/check-package
> +++ b/utils/check-package
> @@ -107,6 +107,7 @@ DO_CHECK_INTREE = re.compile(r"|".join([
>       r"package/",
>       r"system/",
>       r"toolchain/",
> +    r"utils/",
>       ]))
>   DO_NOT_CHECK_INTREE = re.compile(r"|".join([
>       r"boot/barebox/barebox\.mk$",
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 12/16] utils/check-package: check files in board/
  2022-07-24  5:49 ` [Buildroot] [PATCH 12/16] utils/check-package: check files in board/ Ricardo Martincoski
@ 2023-04-09 21:02   ` Arnout Vandecappelle
  0 siblings, 0 replies; 32+ messages in thread
From: Arnout Vandecappelle @ 2023-04-09 21:02 UTC (permalink / raw)
  To: Ricardo Martincoski, buildroot



On 24/07/2022 07:49, Ricardo Martincoski wrote:
> When a SysV init script is inside package/ it does not need to be
> executable.
> But this check does not apply in the case the script is in a fs_overlay.

  I reformulated this a bit because I didn't understand it first.

> 
> Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
> ---
> NOTE to the maintainer applying this patch: please re-generate the list
> of ignored warnings while applying:
> $ ./utils/docker-run
> br-user@...$ ./utils/check-package --failed-only `git ls-tree -r --name-only HEAD` > .checkpackageignore

  Applied to master after regenerating the ignore list.

  Regards,
  Arnout

> ---
>   .checkpackageignore               | 92 +++++++++++++++++++++++++++++++
>   utils/check-package               |  1 +
>   utils/checkpackagelib/lib_sysv.py |  3 +
>   utils/checkpackagelib/tool.py     |  5 ++
>   4 files changed, 101 insertions(+)
> 
> diff --git a/.checkpackageignore b/.checkpackageignore
> index 765e5c1cba..58c05416c4 100644
> --- a/.checkpackageignore
> +++ b/.checkpackageignore
> @@ -1,3 +1,95 @@
> +board/aarch64-efi/post-image.sh Shellcheck
> +board/amarula/a64-relic/post-build.sh Shellcheck
> +board/amarula/vyasa/post-build.sh Shellcheck
> +board/andes/ae350/post-build.sh Shellcheck
> +board/arcturus/aarch64-ucls1012a/post-build.sh Shellcheck
> +board/arcturus/aarch64-ucls1012a/post-image.sh Shellcheck
> +board/aspeed/common/post-image.sh Shellcheck
> +board/asus/tinker/post-build.sh Shellcheck
> +board/atmel/flasher.sh Shellcheck
> +board/beaglebone/post-build.sh Shellcheck
> +board/beagleboneai/post-build.sh Shellcheck
> +board/beaglev/post-build.sh Shellcheck
> +board/beelink/gs1/post-build.sh Shellcheck
> +board/boundarydevices/common/post-build.sh Shellcheck
> +board/boundarydevices/common/post-image.sh Shellcheck
> +board/canaan/k210-soc/post-build.sh Shellcheck
> +board/canaan/k210-soc/rootfs_overlay/sbin/init Shellcheck
> +board/chromebook/elm/sign.sh Shellcheck
> +board/chromebook/mksd.sh Shellcheck
> +board/chromebook/snow/linux-4.15-dts-tpm.patch ApplyOrder
> +board/chromebook/snow/sign.sh Shellcheck
> +board/cubietech/cubieboard2/post-image.sh Shellcheck
> +board/firefly/roc-rk3399-pc/post-build.sh Shellcheck
> +board/freescale/common/imx/imx8-bootloader-prepare.sh Shellcheck
> +board/freescale/common/imx/post-image.sh Shellcheck
> +board/freescale/common/mxs/post-image.sh Shellcheck
> +board/friendlyarm/nanopc-t4/post-build.sh Shellcheck
> +board/friendlyarm/nanopi-m4/post-build.sh Shellcheck
> +board/friendlyarm/nanopi-neo-plus2/post-build.sh Shellcheck
> +board/friendlyarm/nanopi-neo4/post-build.sh Shellcheck
> +board/friendlyarm/nanopi-r2s/post-build.sh Shellcheck
> +board/hardkernel/odroidc2/post-image.sh Shellcheck
> +board/hardkernel/odroidc2/rootfs_overlay/etc/init.d/S09modload Shellcheck Variables
> +board/hardkernel/odroidxu4/post-image.sh EmptyLastLine Shellcheck
> +board/intel/galileo/post-build.sh Shellcheck
> +board/intel/galileo/rootfs_overlay/etc/init.d/S09modload Shellcheck Variables
> +board/kontron/bl-imx8mm/patches/uboot/0001-imx-imx8mm-imx8mm-kontron-n801x-s-convert-options-to.patch NumberedSubject
> +board/kontron/bl-imx8mm/patches/uboot/0002-imx-imx8mm-imx8mm-kontron-n801x-s-add-common-board-u.patch NumberedSubject
> +board/kontron/bl-imx8mm/post-build.sh Shellcheck
> +board/kontron/pitx-imx8m/patches/uboot/2022.04/0001-tools-mkeficapsule-use-pkg-config-to-get-luuid-and-l.patch NumberedSubject
> +board/kontron/pitx-imx8m/post-build.sh Shellcheck
> +board/kontron/smarc-sal28/post-build.sh Shellcheck
> +board/lego/ev3/post-image.sh Shellcheck
> +board/lemaker/bananapro/post-build.sh Shellcheck
> +board/lemaker/bananapro/post-image.sh Shellcheck
> +board/minnowboard/post-build.sh Shellcheck
> +board/nexbox/a95x/post-build.sh Shellcheck
> +board/nexbox/a95x/post-image.sh Shellcheck
> +board/octavo/osd32mp1-red/patches/uboot/0001-Add-OSD32MP1-RED-Device-Tree-support.patch NumberedSubject
> +board/octavo/osd32mp1-red/patches/uboot/0002-configs-stm32mp15_trusted_defconfig-disable-environm.patch NumberedSubject
> +board/olimex/a13_olinuxino/post-build.sh Shellcheck
> +board/olimex/a20_olinuxino/post-build.sh Shellcheck
> +board/olimex/a33_olinuxino/post-build.sh Shellcheck
> +board/olpc/post-build.sh Shellcheck
> +board/orangepi/common/post-build.sh Shellcheck
> +board/orangepi/orangepi-lite2/post-build.sh Shellcheck
> +board/orangepi/orangepi-one-plus/post-build.sh Shellcheck
> +board/orangepi/orangepi-rk3399/post-build.sh Shellcheck
> +board/pine64/rock64/post-build.sh Shellcheck
> +board/pine64/rockpro64/post-build.sh Shellcheck
> +board/qemu/aarch64-sbsa/assemble-flash-images Shellcheck
> +board/qemu/post-image.sh Shellcheck
> +board/qemu/x86/post-build.sh Shellcheck
> +board/qemu/x86_64/post-build.sh Shellcheck
> +board/radxa/rockpi-4/post-build.sh Shellcheck
> +board/radxa/rockpi-n10/post-build.sh Shellcheck
> +board/radxa/rockpi-n8/post-build.sh Shellcheck
> +board/raspberrypi/post-build.sh Shellcheck
> +board/raspberrypi/post-image.sh Shellcheck
> +board/roseapplepi/post-build.sh Shellcheck
> +board/sifive/hifive-unleashed/post-build.sh Shellcheck
> +board/sinovoip/m1-plus/post-build.sh Shellcheck
> +board/solidrun/clearfog/post-build.sh Shellcheck
> +board/solidrun/macchiatobin/post-build-mainline.sh Shellcheck
> +board/solidrun/macchiatobin/post-build.sh Shellcheck
> +board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh Shellcheck
> +board/stmicroelectronics/common/stm32mp157/post-image.sh Shellcheck
> +board/stmicroelectronics/stm32f429-disco/flash.sh Shellcheck
> +board/stmicroelectronics/stm32f469-disco/flash_sd.sh Shellcheck
> +board/stmicroelectronics/stm32f469-disco/flash_xip.sh Shellcheck
> +board/stmicroelectronics/stm32f469-disco/post-build.sh Shellcheck
> +board/synopsys/axs10x/post-build.sh Shellcheck
> +board/technologic/ts4900/post-image.sh Shellcheck
> +board/toradex/apalis-imx6/post-image.sh Shellcheck
> +board/udoo/common/post-build.sh Shellcheck
> +board/zynq/post-build.sh Shellcheck
> +board/zynq/post-image.sh Shellcheck
> +board/zynqmp/kria/kv260/kv260.sh Shellcheck TrailingSpace
> +board/zynqmp/kria/patches/uboot/0001-arm64-zynqmp-zynqmp-sm-k26-revA-Fix-DP-PLL-configura.patch NumberedSubject
> +board/zynqmp/post-build.sh Shellcheck
> +board/zynqmp/post-image.sh Shellcheck
> +board/zynqmp/zcu106/patches/uboot/0001-arm64-zynqmp-zynqmp-zcu102-revA-Fix-DP-PLL-configura.patch NumberedSubject
>   boot/binaries-marvell/binaries-marvell.hash HashSpaces
>   boot/s500-bootloader/s500-bootloader.hash HashSpaces
>   boot/shim/shim.hash HashSpaces
> diff --git a/utils/check-package b/utils/check-package
> index 880fcfa21e..874f58e0d2 100755
> --- a/utils/check-package
> +++ b/utils/check-package
> @@ -101,6 +101,7 @@ CONFIG_IN_FILENAME = re.compile(r"Config\.\S*$")
>   DO_CHECK_INTREE = re.compile(r"|".join([
>       r"Config.in",
>       r"arch/",
> +    r"board/",
>       r"boot/",
>       r"fs/",
>       r"linux/",
> diff --git a/utils/checkpackagelib/lib_sysv.py b/utils/checkpackagelib/lib_sysv.py
> index 386d085afc..dc4afd71b8 100644
> --- a/utils/checkpackagelib/lib_sysv.py
> +++ b/utils/checkpackagelib/lib_sysv.py
> @@ -21,6 +21,9 @@ class Indent(_CheckFunction):
>   
>   
>   class NotExecutable(checkpackagelib.tool.NotExecutable):
> +    def ignore(self):
> +        return 'etc/init.d/' in self.filename
> +
>       def hint(self):
>           return ", just make sure you use '$(INSTALL) -D -m 0755' in the .mk file"
>   
> diff --git a/utils/checkpackagelib/tool.py b/utils/checkpackagelib/tool.py
> index e719fdd407..632aaa9f9e 100644
> --- a/utils/checkpackagelib/tool.py
> +++ b/utils/checkpackagelib/tool.py
> @@ -4,7 +4,12 @@ from checkpackagelib.base import _Tool
>   
>   
>   class NotExecutable(_Tool):
> +    def ignore(self):
> +        return False
> +
>       def run(self):
> +        if self.ignore():
> +            return
>           if os.access(self.filename, os.X_OK):
>               return ["{}:0: This file does not need to be executable{}".format(self.filename, self.hint())]
>   
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 13/16] utils/check-package: check files in support/
  2022-07-24  5:49 ` [Buildroot] [PATCH 13/16] utils/check-package: check files in support/ Ricardo Martincoski
@ 2023-04-09 21:03   ` Arnout Vandecappelle
  0 siblings, 0 replies; 32+ messages in thread
From: Arnout Vandecappelle @ 2023-04-09 21:03 UTC (permalink / raw)
  To: Ricardo Martincoski, buildroot



On 24/07/2022 07:49, Ricardo Martincoski wrote:
> The .mk files inside both support/dependencies and support/misc are not
> package recipes, they are makefiles, so check-package doesn't understand
> them. Therefore ignore such files.
> 
> In the test infra, some br2-externals are used as fixtures to provide
> (sometimes) failure cases, so ignore files in these directories.
> 
> Files inside support/kconfig are files copied from linux upstream, so do
> not generate warnings for them.
> 
> support/gnuconfig contains auto-generated config.{guess,sub} files,
> so do not generate shellcheck warnings for them.
> 
> Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
> ---
> NOTE to the maintainer applying this patch: please re-generate the list
> of ignored warnings while applying:
> $ ./utils/docker-run
> br-user@...$ ./utils/check-package --failed-only `git ls-tree -r --name-only HEAD` > .checkpackageignore

  Applied to master after regenerating the ignore list.

  Regards,
  Arnout

> ---
>   .checkpackageignore | 43 +++++++++++++++++++++++++++++++++++++++++++
>   utils/check-package |  6 ++++++
>   2 files changed, 49 insertions(+)
> 
> diff --git a/.checkpackageignore b/.checkpackageignore
> index 58c05416c4..8f9ab48674 100644
> --- a/.checkpackageignore
> +++ b/.checkpackageignore
> @@ -1021,6 +1021,49 @@ package/yad/yad.hash HashSpaces
>   package/zip/zip.hash HashSpaces
>   package/zmqpp/zmqpp.hash HashSpaces
>   package/zxing-cpp/zxing-cpp.hash HashSpaces
> +support/dependencies/check-host-asciidoc.sh Shellcheck
> +support/dependencies/check-host-cmake.sh Shellcheck
> +support/dependencies/check-host-gzip.sh Shellcheck
> +support/dependencies/check-host-lzip.sh Shellcheck
> +support/dependencies/check-host-make.sh Shellcheck
> +support/dependencies/check-host-python3.sh Shellcheck
> +support/dependencies/check-host-tar.sh Shellcheck
> +support/dependencies/check-host-xzcat.sh Shellcheck
> +support/dependencies/dependencies.sh Shellcheck
> +support/download/bzr ConsecutiveEmptyLines Shellcheck
> +support/download/cargo-post-process Shellcheck
> +support/download/check-hash Shellcheck
> +support/download/cvs Shellcheck
> +support/download/dl-wrapper Shellcheck
> +support/download/file Shellcheck
> +support/download/git Shellcheck
> +support/download/go-post-process Shellcheck
> +support/download/hg Shellcheck
> +support/download/scp Shellcheck
> +support/download/sftp Shellcheck
> +support/download/svn Shellcheck
> +support/download/wget Shellcheck
> +support/gnuconfig/update Shellcheck
> +support/legal-info/buildroot.hash HashSpaces
> +support/libtool/buildroot-libtool-v1.5.patch ApplyOrder Sob
> +support/libtool/buildroot-libtool-v2.2.patch ApplyOrder Sob
> +support/libtool/buildroot-libtool-v2.4.4.patch ApplyOrder
> +support/libtool/buildroot-libtool-v2.4.patch ApplyOrder Sob
> +support/misc/relocate-sdk.sh Shellcheck
> +support/scripts/apply-patches.sh Shellcheck
> +support/scripts/br2-external Shellcheck
> +support/scripts/check-bin-arch Shellcheck
> +support/scripts/check-host-rpath Shellcheck
> +support/scripts/eclipse-register-toolchain Shellcheck
> +support/scripts/fix-configure-powerpc64.sh EmptyLastLine
> +support/scripts/fix-rpath Shellcheck
> +support/scripts/generate-gitlab-ci-yml Shellcheck
> +support/scripts/mkmakefile ConsecutiveEmptyLines Shellcheck
> +support/scripts/mkusers Shellcheck
> +support/scripts/setlocalversion Shellcheck
> +support/testing/tests/core/post-build.sh Shellcheck
> +support/testing/tests/package/test_opkg/post-build.sh Shellcheck
> +support/testing/tests/utils/test_get_developers/0001-package-binutils-change-.mk.patch NumberedSubject
>   toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.hash HashSpaces
>   toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.hash HashSpaces
>   toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.hash HashSpaces
> diff --git a/utils/check-package b/utils/check-package
> index 874f58e0d2..601d899d3d 100755
> --- a/utils/check-package
> +++ b/utils/check-package
> @@ -106,6 +106,7 @@ DO_CHECK_INTREE = re.compile(r"|".join([
>       r"fs/",
>       r"linux/",
>       r"package/",
> +    r"support/",
>       r"system/",
>       r"toolchain/",
>       r"utils/",
> @@ -115,6 +116,11 @@ DO_NOT_CHECK_INTREE = re.compile(r"|".join([
>       r"fs/common\.mk$",
>       r"package/doc-asciidoc\.mk$",
>       r"package/pkg-\S*\.mk$",
> +    r"support/dependencies/[^/]+\.mk$",
> +    r"support/gnuconfig/config\.",
> +    r"support/kconfig/",
> +    r"support/misc/[^/]+\.mk$",
> +    r"support/testing/tests/.*br2-external/",
>       r"toolchain/helpers\.mk$",
>       r"toolchain/toolchain-external/pkg-toolchain-external\.mk$",
>       ]))
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 14/16] Makefile: merge check-flake8 into check-package
  2022-07-24  5:49 ` [Buildroot] [PATCH 14/16] Makefile: merge check-flake8 into check-package Ricardo Martincoski
@ 2023-04-09 21:04   ` Arnout Vandecappelle
  0 siblings, 0 replies; 32+ messages in thread
From: Arnout Vandecappelle @ 2023-04-09 21:04 UTC (permalink / raw)
  To: Ricardo Martincoski, buildroot



On 24/07/2022 07:49, Ricardo Martincoski wrote:
> Teach check-package to detect python files by type and check them using
> flake8.
> Do not use subprocess to call 'python3 -m flake8' in order to avoid too
> many spawned shells, which in its turn would slow down the check for
> multiple files. (make check-package takes twice the time using a shell
> for each flake8 call, when compared of importing the main application)
> 
> Expand the runtime test and the unit tests for check-package.
> 
> Since 'make check-package' always run using the docker image, there is
> no dependency added to the host machine.
> 
> Remove check-flake8 from the makefile and also from the GitLab CI
> because the exact same checks become part of check-package.
> 
> Suggested-by:: Arnout Vandecappelle <arnout@mind.be>
> Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   Makefile                                      | 11 ++------
>   support/misc/gitlab-ci.yml.in                 |  4 ---
>   support/scripts/generate-gitlab-ci-yml        |  2 +-
>   .../tests/utils/br2-external/utils/x-python   |  2 ++
>   .../testing/tests/utils/test_check_package.py | 17 +++++++++++
>   utils/check-package                           |  3 ++
>   utils/checkpackagelib/lib_python.py           |  1 +
>   utils/checkpackagelib/test_tool.py            | 28 +++++++++++++++++++
>   utils/checkpackagelib/tool.py                 | 15 ++++++++++
>   9 files changed, 69 insertions(+), 14 deletions(-)
>   create mode 100644 support/testing/tests/utils/br2-external/utils/x-python
>   create mode 100644 utils/checkpackagelib/lib_python.py
> 
> diff --git a/Makefile b/Makefile
> index f42dc3151d..7c7b67a616 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -125,7 +125,7 @@ endif
>   noconfig_targets := menuconfig nconfig gconfig xconfig config oldconfig randconfig \
>   	defconfig %_defconfig allyesconfig allnoconfig alldefconfig syncconfig release \
>   	randpackageconfig allyespackageconfig allnopackageconfig \
> -	print-version olddefconfig distclean manual manual-% check-package check-flake8
> +	print-version olddefconfig distclean manual manual-% check-package
>   
>   # Some global targets do not trigger a build, but are used to collect
>   # metadata, or do various checks. When such targets are triggered,
> @@ -1240,19 +1240,12 @@ print-version:
>   check_inside_docker := $(shell if [ "`groups`" = 'br-user' ]; then echo y; else echo n; fi)
>   
>   # List of target that need to run inside docker image to ensure reproducible results
> -inside_docker_targets := check-package check-flake8
> +inside_docker_targets := check-package
>   
>   ifeq ($(check_inside_docker),n)
>   $(inside_docker_targets):
>   	$(Q)utils/docker-run $(MAKE) V=$(V) $@
>   else
> -check-flake8:
> -	$(Q)git ls-tree -r --name-only HEAD \
> -	| xargs file \
> -	| grep 'Python script' \
> -	| cut -d':' -f1 \
> -	| xargs -- python3 -m flake8 --statistics
> -
>   check-package:
>   	$(Q)./utils/check-package `git ls-tree -r --name-only HEAD`
>   endif
> diff --git a/support/misc/gitlab-ci.yml.in b/support/misc/gitlab-ci.yml.in
> index 3ac988a519..2fde904006 100644
> --- a/support/misc/gitlab-ci.yml.in
> +++ b/support/misc/gitlab-ci.yml.in
> @@ -6,10 +6,6 @@
>       script:
>           - utils/get-developers -v
>   
> -.check-flake8_base:
> -    script:
> -        - make check-flake8
> -
>   .check-package_base:
>       script:
>           - make check-package
> diff --git a/support/scripts/generate-gitlab-ci-yml b/support/scripts/generate-gitlab-ci-yml
> index aa43aac019..536ae0f042 100755
> --- a/support/scripts/generate-gitlab-ci-yml
> +++ b/support/scripts/generate-gitlab-ci-yml
> @@ -26,7 +26,7 @@ gen_tests() {
>       local do_basics do_defconfigs do_runtime do_testpkg
>       local defconfigs_ext cfg tst
>   
> -    basics=( check-package DEVELOPERS flake8 package )
> +    basics=( check-package DEVELOPERS package )
>   
>       defconfigs=( $(cd configs; LC_ALL=C ls -1 *_defconfig) )
>   
> diff --git a/support/testing/tests/utils/br2-external/utils/x-python b/support/testing/tests/utils/br2-external/utils/x-python
> new file mode 100644
> index 0000000000..63f77b6be1
> --- /dev/null
> +++ b/support/testing/tests/utils/br2-external/utils/x-python
> @@ -0,0 +1,2 @@
> +#!/usr/bin/env python3
> +
> diff --git a/support/testing/tests/utils/test_check_package.py b/support/testing/tests/utils/test_check_package.py
> index aeda0857e3..e655bff1ec 100644
> --- a/support/testing/tests/utils/test_check_package.py
> +++ b/support/testing/tests/utils/test_check_package.py
> @@ -249,3 +249,20 @@ class TestCheckPackage(unittest.TestCase):
>           self.assert_file_was_processed(m)
>           self.assert_warnings_generated_for_file(m)
>           self.assertIn("{}:0: run 'shellcheck' and fix the warnings".format(abs_file), w)
> +
> +        # python scripts are tested using flake8
> +        rel_file = "utils/x-python"
> +        abs_path = infra.filepath("tests/utils/br2-external")
> +        abs_file = os.path.join(abs_path, rel_file)
> +
> +        w, m = call_script(["check-package", "-vvv", "-b", rel_file],
> +                           self.WITH_UTILS_IN_PATH, abs_path)
> +        self.assert_file_was_processed(m)
> +        self.assert_warnings_generated_for_file(m)
> +        self.assertIn("{}:0: run 'flake8' and fix the warnings".format(rel_file), w)
> +
> +        w, m = call_script(["check-package", "-b", abs_file],
> +                           self.WITH_UTILS_IN_PATH, infra.basepath())
> +        self.assert_file_was_processed(m)
> +        self.assert_warnings_generated_for_file(m)
> +        self.assertIn("{}:0: run 'flake8' and fix the warnings".format(abs_file), w)
> diff --git a/utils/check-package b/utils/check-package
> index 601d899d3d..beebef0ddb 100755
> --- a/utils/check-package
> +++ b/utils/check-package
> @@ -14,6 +14,7 @@ import checkpackagelib.lib_config
>   import checkpackagelib.lib_hash
>   import checkpackagelib.lib_mk
>   import checkpackagelib.lib_patch
> +import checkpackagelib.lib_python
>   import checkpackagelib.lib_shellscript
>   import checkpackagelib.lib_sysv
>   
> @@ -94,6 +95,8 @@ def get_lib_from_filetype(fname):
>       filetype = magic.from_file(fname, mime=True)
>       if filetype == "text/x-shellscript":
>           return checkpackagelib.lib_shellscript
> +    if filetype in ["text/x-python", "text/x-script.python"]:
> +        return checkpackagelib.lib_python
>       return None
>   
>   
> diff --git a/utils/checkpackagelib/lib_python.py b/utils/checkpackagelib/lib_python.py
> new file mode 100644
> index 0000000000..f8c17ddc10
> --- /dev/null
> +++ b/utils/checkpackagelib/lib_python.py
> @@ -0,0 +1 @@
> +from checkpackagelib.tool import Flake8                # noqa: F401
> diff --git a/utils/checkpackagelib/test_tool.py b/utils/checkpackagelib/test_tool.py
> index a0bf88001d..cfa826f57c 100644
> --- a/utils/checkpackagelib/test_tool.py
> +++ b/utils/checkpackagelib/test_tool.py
> @@ -66,6 +66,34 @@ def test_NotExecutable_hint(testname, hint, filename, permissions, string, expec
>       assert warnings == expected
>   
>   
> +Flake8 = [
> +    ('empty',
> +     'empty.py',
> +     '',
> +     []),
> +    ('W391',
> +     'blank-line.py',
> +     '\n',
> +     ["dir/blank-line.py:0: run 'flake8' and fix the warnings",
> +      "dir/blank-line.py:1:1: W391 blank line at end of file"]),
> +    ('more than one warning',
> +     'file',
> +     'import os\n'
> +     'import re\n'
> +     '\n',
> +     ["dir/file:0: run 'flake8' and fix the warnings",
> +      "dir/file:1:1: F401 'os' imported but unused\n"
> +      "dir/file:2:1: F401 're' imported but unused\n"
> +      'dir/file:3:1: W391 blank line at end of file']),
> +    ]
> +
> +
> +@pytest.mark.parametrize('testname,filename,string,expected', Flake8)
> +def test_Flake8(testname, filename, string, expected):
> +    warnings = check_file(m.Flake8, filename, string)
> +    assert warnings == expected
> +
> +
>   Shellcheck = [
>       ('missing shebang',
>        'empty.sh',
> diff --git a/utils/checkpackagelib/tool.py b/utils/checkpackagelib/tool.py
> index 632aaa9f9e..907ada704f 100644
> --- a/utils/checkpackagelib/tool.py
> +++ b/utils/checkpackagelib/tool.py
> @@ -1,5 +1,7 @@
> +import flake8.main.application
>   import os
>   import subprocess
> +import tempfile
>   from checkpackagelib.base import _Tool
>   
>   
> @@ -14,6 +16,19 @@ class NotExecutable(_Tool):
>               return ["{}:0: This file does not need to be executable{}".format(self.filename, self.hint())]
>   
>   
> +class Flake8(_Tool):
> +    def run(self):
> +        with tempfile.NamedTemporaryFile() as output:
> +            app = flake8.main.application.Application()
> +            app.run(['--output-file={}'.format(output.name), self.filename])
> +            stdout = output.readlines()
> +            processed_output = [str(line.decode().rstrip()) for line in stdout if line]
> +            if len(stdout) == 0:
> +                return
> +            return ["{}:0: run 'flake8' and fix the warnings".format(self.filename),
> +                    '\n'.join(processed_output)]
> +
> +
>   class Shellcheck(_Tool):
>       def run(self):
>           cmd = ['shellcheck', self.filename]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 15/16] utils/docker-run: fix shellcheck warnings
  2022-07-24  5:49 ` [Buildroot] [PATCH 15/16] utils/docker-run: fix shellcheck warnings Ricardo Martincoski
@ 2023-04-09 21:05   ` Arnout Vandecappelle
  0 siblings, 0 replies; 32+ messages in thread
From: Arnout Vandecappelle @ 2023-04-09 21:05 UTC (permalink / raw)
  To: Ricardo Martincoski, buildroot



On 24/07/2022 07:49, Ricardo Martincoski wrote:
> SC2046: Quote this to prevent word splitting.
> 
> Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

  I hadn't noticed this patch when I applied the beginning of the series, and 
instead fixed docker-run myself (and pushed directly). Therefore, marked as 
superseded.

  Regards,
  Arnout

> ---
>   .checkpackageignore | 1 -
>   utils/docker-run    | 2 +-
>   2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/.checkpackageignore b/.checkpackageignore
> index 8f9ab48674..6f1a838562 100644
> --- a/.checkpackageignore
> +++ b/.checkpackageignore
> @@ -1077,5 +1077,4 @@ toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-
>   toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.hash HashSpaces
>   utils/brmake Shellcheck
>   utils/config Shellcheck
> -utils/docker-run Shellcheck
>   utils/test-pkg Shellcheck
> diff --git a/utils/docker-run b/utils/docker-run
> index 5653764254..f42dc33d0e 100755
> --- a/utils/docker-run
> +++ b/utils/docker-run
> @@ -7,7 +7,7 @@ IMAGE=$(grep ^image: "${MAIN_DIR}/.gitlab-ci.yml" | \
>           sed -e 's,^image: ,,g' | sed -e 's,\$CI_REGISTRY,registry.gitlab.com,g')
>   
>   exec docker run -it --rm \
> -    --user $(id -u):$(id -g) \
> +    --user "$(id -u)":"$(id -g)" \
>       --mount "type=bind,src=${MAIN_DIR},dst=${MAIN_DIR}" \
>       --workdir "${MAIN_DIR}" \
>       "${IMAGE}" "${@}"
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2023-04-09 21:05 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-24  5:48 [Buildroot] [PATCH 00/16] Preventing style regressions using check-package Ricardo Martincoski
2022-07-24  5:48 ` [Buildroot] [PATCH 01/16] DEVELOPERS: update entries for Ricardo Martincoski Ricardo Martincoski
2022-07-25 22:21   ` Arnout Vandecappelle
2022-07-24  5:48 ` [Buildroot] [PATCH 02/16] utils/check-package: improve shellcheck reproducibility Ricardo Martincoski
2022-07-25 22:21   ` Arnout Vandecappelle
2022-07-24  5:48 ` [Buildroot] [PATCH 03/16] utils/check-package: create an ignore list Ricardo Martincoski
2022-07-24  5:49 ` [Buildroot] [PATCH 04/16] support/testing: test check-package " Ricardo Martincoski
2022-07-24  5:49 ` [Buildroot] [PATCH 05/16] utils/check-package: add --failed-only Ricardo Martincoski
2022-07-24  5:49 ` [Buildroot] [PATCH 06/16] Makefile: make check-package assume a git tree Ricardo Martincoski
2022-07-27 12:54   ` Romain Naour
2022-07-31 14:31     ` Ricardo Martincoski
2022-07-31 19:23       ` Thomas Petazzoni via buildroot
2022-07-24  5:49 ` [Buildroot] [PATCH 07/16] Makefile: run check-* inside docker image Ricardo Martincoski
2022-07-27 13:16   ` Romain Naour
2022-07-31 14:34     ` Ricardo Martincoski
2022-07-24  5:49 ` [Buildroot] [PATCH 08/16] docs/manual: check-package before submitting patch Ricardo Martincoski
2022-07-27 13:22   ` Romain Naour
2022-07-31 14:37     ` Ricardo Martincoski
2022-07-24  5:49 ` [Buildroot] [PATCH 09/16] support/docker: add python3-magic Ricardo Martincoski
2022-07-24  5:49 ` [Buildroot] [PATCH 10/16] utils/check-package: check all shell scripts Ricardo Martincoski
2023-04-09 21:01   ` Arnout Vandecappelle
2022-07-24  5:49 ` [Buildroot] [PATCH 11/16] utils/check-package: check files in utils/ Ricardo Martincoski
2023-04-09 21:02   ` Arnout Vandecappelle
2022-07-24  5:49 ` [Buildroot] [PATCH 12/16] utils/check-package: check files in board/ Ricardo Martincoski
2023-04-09 21:02   ` Arnout Vandecappelle
2022-07-24  5:49 ` [Buildroot] [PATCH 13/16] utils/check-package: check files in support/ Ricardo Martincoski
2023-04-09 21:03   ` Arnout Vandecappelle
2022-07-24  5:49 ` [Buildroot] [PATCH 14/16] Makefile: merge check-flake8 into check-package Ricardo Martincoski
2023-04-09 21:04   ` Arnout Vandecappelle
2022-07-24  5:49 ` [Buildroot] [PATCH 15/16] utils/docker-run: fix shellcheck warnings Ricardo Martincoski
2023-04-09 21:05   ` Arnout Vandecappelle
2022-07-24  5:49 ` [Buildroot] [PATCH 16/16] utils/checkpackagelib: warn about $(HOST_DIR)/usr Ricardo Martincoski

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.