All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [next 00/25] check-symbols v2
@ 2022-11-27 13:07 Ricardo Martincoski
  2022-11-27 13:07 ` [Buildroot] [next 01/25] *: fix typo for separate(d|) in text Ricardo Martincoski
                   ` (24 more replies)
  0 siblings, 25 replies; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

The script check-symbols checks for inconsistencies on symbols declared
in Config.in and used in .mk files.

Patch 25 is actually v2 for
http://patchwork.ozlabs.org/project/buildroot/patch/20220814233845.2247022-34-ricardo.martincoski@gmail.com/
But v1 was only a prototype/WIP.
There was so many changes from v1 that I honestly gave up keeping track
of them. Because of that, no changelog on this patch.

All other patches in the series are new, found while developing this
script. Because of that, no changelog for patches 1 to 24.

Patches 1 and 2 fix typos on text (help text, CHANGES, ...).

Patch 3 fixes a duplicate symbol on Config.in.legacy, result of a
copy&paste error.
Patch 4 makes check-package to warn about occurrences of duplicated
symbols.

Patch 5 makes the test using test-pkg on GitLab CI easier for defconfigs
that contain disabled options. It was used to test patches 9 and 10
without changing the default git configuration.

Patches 6, 7 and 8 fix the use of ifdef on .mk files.
While testing patch 8, an issue passing config options and an
improvement raised for package pugixml.
Patch 9 fixes the issue.
Patch 10 implements the improvement when passing build options.
Patch 11 adds a comment to busybox.mk, copied from uclibc.mk about
overriding a variable.
Patch 12 makes check-package to warn about the use of ifdef in .mk
files.

While developing patch 25, I noticed that toolchain and
toolchain-buildroot are not really virtual packages but both use the
virtual package infra. Patch 13 add comments to explain why.
Patches 14 and 15 remove usage of legacy symbols from packages.
Patch 16 removes an unused symbol.
Patch 17 fixes a select of a config that belongs to a choice.
Patches 18, 19, 20, 21, 22 and 23 fix legacy handling.
Patch 24 fixes a typo just merged only on next branch.
Patch 25 is the actual goal of this series, adding check-symbols script.

Example usage of the script applying only patch 25 to next:
$ time utils/docker-run utils/check-symbols
Config.in.legacy:634: BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 is part of a "choice" and should not be "select"ed
Config.in.legacy:643: BR2_PACKAGE_SUNXI_MALI_UTGARD_R8P1 is part of a "choice" and should not be "select"ed
Config.in.legacy:705: BR2_PACKAGE_OPENJDK_VERSION_11 is part of a "choice" and should not be "select"ed
Config.in.legacy:713: BR2_PACKAGE_OPENJDK_VERSION_17 is part of a "choice" and should not be "select"ed
Config.in.legacy:2097: BR2_PACKAGE_LUA_5_3 is part of a "choice" and should not be "select"ed
Config.in.legacy:2605: BR2_PACKAGE_TI_SGX_AM335X not referenced but has a comment stating it is
Config.in.legacy:2615: BR2_PACKAGE_TI_SGX_AM437X not referenced but has a comment stating it is
Config.in.legacy:2625: BR2_PACKAGE_TI_SGX_AM4430 not referenced but has a comment stating it is
Config.in.legacy:2635: BR2_PACKAGE_TI_SGX_AM5430 not referenced but has a comment stating it is
Config.in.legacy:3973: BR2_GCC_VERSION_ARC is part of a "choice" and should not be "select"ed
Config.in.legacy:4316: BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_STACK_LIB is part of a "choice" and should not be "select"ed
Config.in.legacy:4324: BR2_PACKAGE_OPENPOWERLINK_STACK_USERSPACE_DAEMON_LIB is part of a "choice" and should not be "select"ed
boot/uboot/Config.in:445: BR2_TARGET_XLOADER is a legacy symbol and should not be referenced
package/fwts/Config.in:31: BR2_PACKAGE_FWTS_EFI_RUNTIME_MODULE defined but not referenced
package/gitlab-runner/Config.in:14: BR2_PACKAGE_LIBCURL_OPENSSL is part of a "choice" and should not be "select"ed
package/rpi-userland/Config.in:43: BR2_arch64 referenced but not defined
system/Config.in:81: BR2_TARGET_GENERIC_PASSWD_MD5 is a legacy symbol and should not be referenced
real    0m4,703s
user    0m0,057s
sys     0m0,020s

The new GitLab CI jobs can be seen here, with the whole series applied
to next:
https://gitlab.com/RicardoMartincoski/buildroot/-/pipelines/706073924

Regards,
Ricardo

Ricardo Martincoski (25):
  *: fix typo for separate(d|) in text
  package,legacy: fix typo for "daemon" on help text
  Config.in.legacy: fix typo on BR2_PACKAGE_MEDIAART_BACKEND_QT
  utils/checkpackagelib: warn about redefined config
  support/scripts/generate-gitlab-ci-yml: improve test-pkg support
  package/fwts: use ifeq instead of ifdef
  package/live555: fix build config with locale
  package/pugixml: unconditionally set BUILD_DEFINES
  package/pugixml: fix configuration options
  package/pugixml: use explicit build options
  package/busybox: add comment about variable override
  utils/checkpackagelib: warn about ifdef on .mk
  toolchain/toolchain-buildroot: add comment about using virtual package
    infra
  boot/uboot: remove use of legacy xloader symbol
  system: remove use of legacy md5 option
  package/linux-headers: remove bogus symbol
    BR2_PACKAGE_HOST_LINUX_HEADERS
  package/gitlab-runner: ensure use of LIBCURL_OPENSSL
  package/openpowerlink: properly handle legacy options
  package/gcc: properly handle legacy for renamed ARC option
  package/lua: properly handle legacy for removed version
  package/ti-sgx-km: properly handle legacy for removed options
  package/openjdk: properly handle legacy for renamed options
  package/sunxi-mali-utgard: properly handle legacy for renamed options
  package/rpi-userland: fix typo for BR2_aarch64
  utils/check-symbols: new script

 CHANGES                                       |   4 +-
 Config.in.legacy                              | 101 ++--
 DEVELOPERS                                    |   2 +
 boot/uboot/Config.in                          |   1 -
 package/busybox/busybox.mk                    |   3 +
 package/fwts/fwts.mk                          |   2 +-
 package/gcc/Config.in.host                    |   1 +
 package/gitlab-runner/Config.in               |   1 -
 package/gitlab-runner/gitlab-runner.mk        |   4 +
 package/leafnode2/leafnode2.mk                |   2 +-
 package/linux-headers/Config.in.host          |   3 -
 package/live555/live555.mk                    |   2 +-
 package/lua/Config.in                         |   1 +
 package/ngircd/Config.in                      |   2 +-
 package/openjdk/Config.in                     |   2 +
 package/openpowerlink/Config.in               |   2 +
 package/pugixml/pugixml.mk                    |  24 +-
 package/rp-pppoe/Config.in                    |   2 +-
 package/rpi-userland/Config.in                |   2 +-
 package/sunxi-mali-utgard/Config.in           |   2 +
 package/uclibc/uclibc.mk                      |   1 +
 support/misc/gitlab-ci.yml.in                 |   8 +
 support/scripts/generate-gitlab-ci-yml        |   4 +-
 system/Config.in                              |   3 +-
 .../toolchain-buildroot.mk                    |   3 +
 toolchain/toolchain/toolchain.mk              |   3 +
 utils/check-symbols                           |  78 ++++
 utils/checkpackagelib/lib_config.py           |  38 ++
 utils/checkpackagelib/lib_mk.py               |  18 +
 utils/checkpackagelib/test_lib_config.py      |  78 ++++
 utils/checkpackagelib/test_lib_mk.py          |  48 ++
 utils/checksymbolslib/__init__.py             |   0
 utils/checksymbolslib/br.py                   | 140 ++++++
 utils/checksymbolslib/db.py                   | 205 ++++++++
 utils/checksymbolslib/file.py                 |  83 ++++
 utils/checksymbolslib/kconfig.py              | 139 ++++++
 utils/checksymbolslib/makefile.py             | 100 ++++
 utils/checksymbolslib/test_db.py              | 286 ++++++++++++
 utils/checksymbolslib/test_file.py            | 152 ++++++
 utils/checksymbolslib/test_kconfig.py         | 438 ++++++++++++++++++
 utils/checksymbolslib/test_makefile.py        | 304 ++++++++++++
 utils/checksymbolslib/test_util.py            |  15 +
 42 files changed, 2242 insertions(+), 65 deletions(-)
 create mode 100755 utils/check-symbols
 create mode 100644 utils/checksymbolslib/__init__.py
 create mode 100644 utils/checksymbolslib/br.py
 create mode 100644 utils/checksymbolslib/db.py
 create mode 100644 utils/checksymbolslib/file.py
 create mode 100644 utils/checksymbolslib/kconfig.py
 create mode 100644 utils/checksymbolslib/makefile.py
 create mode 100644 utils/checksymbolslib/test_db.py
 create mode 100644 utils/checksymbolslib/test_file.py
 create mode 100644 utils/checksymbolslib/test_kconfig.py
 create mode 100644 utils/checksymbolslib/test_makefile.py
 create mode 100644 utils/checksymbolslib/test_util.py

-- 
2.34.1

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

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

* [Buildroot] [next 01/25] *: fix typo for separate(d|) in text
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 10:23   ` Peter Korsgaard
  2023-02-22 16:08   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 02/25] package, legacy: fix typo for "daemon" on help text Ricardo Martincoski
                   ` (23 subsequent siblings)
  24 siblings, 2 replies; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot; +Cc: Bernd Kuhls, Ricardo Martincoski

seperate is a common misspelling of separate

Fix all the typos in the tree that are not related to patch files.

CHANGES
  seperate -> separate, in the list of changes
Config.in.legacy
  seperate -> separate, in option name and help texts
package/leafnode2/leafnode2.mk
  seperate -> separate, in a comment
system/Config.in
  seperated -> separated, in a help text

Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 CHANGES                        | 4 ++--
 Config.in.legacy               | 6 +++---
 package/leafnode2/leafnode2.mk | 2 +-
 system/Config.in               | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/CHANGES b/CHANGES
index 3090466d2e..192546993f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -7475,7 +7475,7 @@
 
 	Architecture: Default to bf532 CPU variant for blackfin,
 	Fix flat one memory region support for m68k and disable flat
-	seperate data support because of compatibility issues.
+	separate data support because of compatibility issues.
 
 	Defconfigs: Minnowboard and Raspberrypi: Fix errors with
 	post-build scripts when systemd is used.
@@ -8011,7 +8011,7 @@
 
 	Minor fixes.
 
-	Merged/seperate /usr handling is now also performed for
+	Merged/separate /usr handling is now also performed for
 	staging so cross-gdb / gdbserver can find the libraries.
 
 	Updated/fixed packages: autossh, conntrack-tools, dcron,
diff --git a/Config.in.legacy b/Config.in.legacy
index 17f0858e70..284e7bf887 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -3240,7 +3240,7 @@ config BR2_PACKAGE_POLICYCOREUTILS_RESTORECOND
 	select BR2_PACKAGE_RESTORECOND
 	help
 	  The policycoreutils package no longer offers restorecond
-	  as a option.  This package has been moved into a seperate
+	  as a option.  This package has been moved into a separate
 	  package maintained by the SELinux maintainers.
 
 config BR2_PACKAGE_SEPOLGEN
@@ -3834,7 +3834,7 @@ config BR2_GDB_VERSION_7_9
 comment "Legacy options removed in 2016.11"
 
 config BR2_PACKAGE_PHP_SAPI_CLI_CGI
-	bool "PHP CGI and CLI options are now seperate"
+	bool "PHP CGI and CLI options are now separate"
 	select BR2_PACKAGE_PHP_SAPI_CLI
 	select BR2_PACKAGE_PHP_SAPI_CGI
 	select BR2_LEGACY
@@ -4864,7 +4864,7 @@ config BR2_PACKAGE_KODI_PVR_ADDONS
 	select BR2_PACKAGE_KODI_PVR_VUPLUS
 	select BR2_PACKAGE_KODI_PVR_WMC
 	help
-	  Kodi PVR addon was split into seperate modules
+	  Kodi PVR addon was split into separate modules
 
 config BR2_BINUTILS_VERSION_2_23_2
 	bool "binutils 2.23 option renamed"
diff --git a/package/leafnode2/leafnode2.mk b/package/leafnode2/leafnode2.mk
index a02aad4302..e82ca2e1ee 100644
--- a/package/leafnode2/leafnode2.mk
+++ b/package/leafnode2/leafnode2.mk
@@ -23,7 +23,7 @@ LEAFNODE2_CONF_OPTS = \
 	--enable-runas-user=root
 
 # Leafnode2 needs the host version of b_sortnl during
-# compilation. Instead of creating a seperate host package and
+# compilation. Instead of creating a separate host package and
 # installing b_sortnl to $(HOST_DIR) this binary is compiled
 # on-the-fly, host-pcre is needed for this
 define LEAFNODE2_BUILD_SORTNL_TOOL
diff --git a/system/Config.in b/system/Config.in
index 888c24ce81..e6dcd25455 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -443,7 +443,7 @@ config BR2_ENABLE_LOCALE_WHITELIST
 	default "C en_US"
 	depends on BR2_ENABLE_LOCALE_PURGE
 	help
-	  Whitespace seperated list of locales to allow on target.
+	  Whitespace separated list of locales to allow on target.
 	  Locales not listed here will be removed from the target.
 	  See 'locale -a' on your host for a list of locales available
 	  on your build host, or have a look in /usr/share/locale in
-- 
2.34.1

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

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

* [Buildroot] [next 02/25] package, legacy: fix typo for "daemon" on help text
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
  2022-11-27 13:07 ` [Buildroot] [next 01/25] *: fix typo for separate(d|) in text Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 10:24   ` Peter Korsgaard
  2023-02-22 16:08   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 03/25] Config.in.legacy: fix typo on BR2_PACKAGE_MEDIAART_BACKEND_QT Ricardo Martincoski
                   ` (22 subsequent siblings)
  24 siblings, 2 replies; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

deamon -> daemon

At same time, in Config.in.legacy fix other typos in the same help text:
spae -> space
monolitic -> monolithic

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 Config.in.legacy           | 4 ++--
 package/ngircd/Config.in   | 2 +-
 package/rp-pppoe/Config.in | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Config.in.legacy b/Config.in.legacy
index 284e7bf887..4eff5b55d6 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -4324,8 +4324,8 @@ config BR2_PACKAGE_OPENPOWERLINK_LIBPCAP
 	select BR2_PACKAGE_OPENPOWERLINK_STACK_USERSPACE_DAEMON_LIB
 	help
 	  The user space support has been split in two part:
-	  - a monolitic user space library
-	  - a user spae deamon driver
+	  - a monolithic user space library
+	  - a user space daemon driver
 
 config BR2_LINUX_KERNEL_SAME_AS_HEADERS
 	bool "using the linux headers version for the kernel has been removed"
diff --git a/package/ngircd/Config.in b/package/ngircd/Config.in
index 9b3d430922..1e93a5702c 100644
--- a/package/ngircd/Config.in
+++ b/package/ngircd/Config.in
@@ -2,6 +2,6 @@ config BR2_PACKAGE_NGIRCD
 	bool "ngircd"
 	depends on BR2_USE_MMU # fork()
 	help
-	  Next Generation IRC server deamon.
+	  Next Generation IRC server daemon.
 
 	  http://ngircd.barton.de
diff --git a/package/rp-pppoe/Config.in b/package/rp-pppoe/Config.in
index 2ac81cbb2d..6ff005a1e1 100644
--- a/package/rp-pppoe/Config.in
+++ b/package/rp-pppoe/Config.in
@@ -9,7 +9,7 @@ config BR2_PACKAGE_RP_PPPOE
 	select BR2_PACKAGE_PPPD
 	help
 	  An implementation of the Point-to-point protocol over
-	  Ethernet.  Has userspace client and server deamons. You
+	  Ethernet.  Has userspace client and server daemons. You
 	  likely only need this package if you are implementing the
 	  pppoe server that will service other pppoe client
 	  devices. Otherwise the normal client functionality already
-- 
2.34.1

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

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

* [Buildroot] [next 03/25] Config.in.legacy: fix typo on BR2_PACKAGE_MEDIAART_BACKEND_QT
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
  2022-11-27 13:07 ` [Buildroot] [next 01/25] *: fix typo for separate(d|) in text Ricardo Martincoski
  2022-11-27 13:07 ` [Buildroot] [next 02/25] package, legacy: fix typo for "daemon" on help text Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 10:26   ` Peter Korsgaard
  2023-02-22 16:08   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 04/25] utils/checkpackagelib: warn about redefined config Ricardo Martincoski
                   ` (21 subsequent siblings)
  24 siblings, 2 replies; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni, Ricardo Martincoski

Currently using this minimal .config:
 BR2_PACKAGE_MEDIAART_BACKEND_GDK_PIXBUF=y
triggers:
     *** Legacy options removed in 2018.05 ***
 [ ] libmediaart none backend option renamed (NEW)
 [*] libmediaart gdk-pixbuf backend option renamed
 [*] libmediaart qt backend option renamed

Commit "8553b39887 libmediaart: rename options to have proper prefix",
part of the 2018.05 release had a copy&paste error.

As stated in the beginning of the file:
 The oldest symbols will be removed again after about two years.
But while we carry these legacy symbols, let's fix the typo.

Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
NOTE: Maybe it is time to drop old legacy symbols again?
If so, some patches in this series can be dropped.
---
 Config.in.legacy | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Config.in.legacy b/Config.in.legacy
index 4eff5b55d6..9ce1004b0c 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -2594,7 +2594,7 @@ config BR2_PACKAGE_MEDIAART_BACKEND_GDK_PIXBUF
 	  BR2_PACKAGE_MEDIAART_BACKEND_GDK_PIXBUF has been renamed to
 	  BR2_PACKAGE_LIBMEDIAART_BACKEND_GDK_PIXBUF
 
-config BR2_PACKAGE_MEDIAART_BACKEND_GDK_PIXBUF
+config BR2_PACKAGE_MEDIAART_BACKEND_QT
 	bool "libmediaart qt backend option renamed"
 	select BR2_LEGACY
 	help
-- 
2.34.1

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

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

* [Buildroot] [next 04/25] utils/checkpackagelib: warn about redefined config
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
                   ` (2 preceding siblings ...)
  2022-11-27 13:07 ` [Buildroot] [next 03/25] Config.in.legacy: fix typo on BR2_PACKAGE_MEDIAART_BACKEND_QT Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 11:03   ` Peter Korsgaard
  2023-02-22 16:09   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 05/25] support/scripts/generate-gitlab-ci-yml: improve test-pkg support Ricardo Martincoski
                   ` (20 subsequent siblings)
  24 siblings, 2 replies; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

Warn the developer in the case the same config is declared more than
once in the same Config.in file.
But take into account the conditional code that lets the config be
visible and warn only when it is declared more than once in the same
conditions.
For instance, do not warn for:
 if BR2_PACKAGE_BUSYBOX
 config BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 endif
 if !BR2_PACKAGE_BUSYBOX # kconfig doesn't support else
 config BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 endif

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
Applying only this patch on current master, check-package returns:

Config.in.legacy:2597: config BR2_PACKAGE_MEDIAART_BACKEND_GDK_PIXBUF redeclared (previous line: 2589)
---
 utils/checkpackagelib/lib_config.py      | 38 ++++++++++++
 utils/checkpackagelib/test_lib_config.py | 78 ++++++++++++++++++++++++
 2 files changed, 116 insertions(+)

diff --git a/utils/checkpackagelib/lib_config.py b/utils/checkpackagelib/lib_config.py
index b05831f2c3..f26ca0d898 100644
--- a/utils/checkpackagelib/lib_config.py
+++ b/utils/checkpackagelib/lib_config.py
@@ -233,3 +233,41 @@ class Indent(_CheckFunction):
                 return ["{}:{}: should not be indented"
                         .format(self.filename, lineno),
                         text]
+
+
+class RedefinedConfig(_CheckFunction):
+    CONFIG = re.compile(r"^\s*(menu|)config\s+(BR2_\w+)\b")
+    IF = re.compile(r"^\s*if\s+([^#]*)\b")
+    ENDIF = re.compile(r"^\s*endif\b")
+
+    def before(self):
+        self.configs = {}
+        self.conditional = []
+
+    def check_line(self, lineno, text):
+        if _empty_or_comment(text) or _part_of_help_text(text):
+            return
+
+        m = self.IF.search(text)
+        if m is not None:
+            condition = m.group(1)
+            self.conditional.append(condition)
+            return
+
+        m = self.ENDIF.search(text)
+        if m is not None:
+            self.conditional.pop()
+            return
+
+        m = self.CONFIG.search(text)
+        if m is None:
+            return
+        config = m.group(2)
+
+        key = (config, ' AND '.join(self.conditional))
+        if key in self.configs.keys():
+            previous_line = self.configs[key]
+            return ["{}:{}: config {} redeclared (previous line: {})"
+                    .format(self.filename, lineno, config, previous_line),
+                    text]
+        self.configs[key] = lineno
diff --git a/utils/checkpackagelib/test_lib_config.py b/utils/checkpackagelib/test_lib_config.py
index 91a549adf2..474d17105e 100644
--- a/utils/checkpackagelib/test_lib_config.py
+++ b/utils/checkpackagelib/test_lib_config.py
@@ -385,3 +385,81 @@ Indent = [
 def test_Indent(testname, filename, string, expected):
     warnings = util.check_file(m.Indent, filename, string)
     assert warnings == expected
+
+
+RedefinedConfig = [
+    ('no redefinition',
+     'any',
+     'config BR2_PACKAGE_FOO\n'
+     'bool "foo"\n'
+     'config BR2_PACKAGE_FOO_BAR\n'
+     'bool "foo"\n',
+     []),
+    ('no conditional',
+     'any',
+     'config BR2_PACKAGE_FOO\n'
+     'bool "foo"\n'
+     'config BR2_PACKAGE_BAR\n'
+     'bool "bar"\n'
+     'config BR2_PACKAGE_FOO\n'
+     'bool "foo"\n',
+     [['any:5: config BR2_PACKAGE_FOO redeclared (previous line: 1)',
+       'config BR2_PACKAGE_FOO\n']]),
+    ('three times',
+     'any',
+     'config BR2_PACKAGE_FOO\n'
+     'bool "foo"\n'
+     'config BR2_PACKAGE_FOO\n'
+     'bool "foo"\n'
+     'config BR2_PACKAGE_FOO\n'
+     'bool "foo"\n',
+     [['any:3: config BR2_PACKAGE_FOO redeclared (previous line: 1)',
+       'config BR2_PACKAGE_FOO\n'],
+      ['any:5: config BR2_PACKAGE_FOO redeclared (previous line: 1)',
+       'config BR2_PACKAGE_FOO\n']]),
+    ('same conditional',
+     'any',
+     'if BR2_PACKAGE_BAZ\n'
+     'config BR2_PACKAGE_FOO\n'
+     'bool "foo"\n'
+     'config BR2_PACKAGE_BAR\n'
+     'bool "bar"\n'
+     'config BR2_PACKAGE_FOO\n'
+     'bool "foo"\n'
+     'endif\n',
+     [['any:6: config BR2_PACKAGE_FOO redeclared (previous line: 2)',
+       'config BR2_PACKAGE_FOO\n']]),
+    ('equivalent conditional',
+     'any',
+     'if BR2_PACKAGE_BAZ\n'
+     'config BR2_PACKAGE_FOO\n'
+     'bool "foo"\n'
+     'endif\n'
+     'config BR2_PACKAGE_FOO\n'
+     'bool "foo"\n'
+     'if BR2_PACKAGE_BAZ\n'
+     'config BR2_PACKAGE_FOO\n'
+     'bool "foo"\n'
+     'endif\n',
+     [['any:8: config BR2_PACKAGE_FOO redeclared (previous line: 2)',
+       'config BR2_PACKAGE_FOO\n']]),
+    ('not equivalent conditional',
+     'any',
+     'if BR2_PACKAGE_BAZ\n'
+     'config BR2_PACKAGE_FOO\n'
+     'bool "foo"\n'
+     'endif\n'
+     'config BR2_PACKAGE_FOO\n'
+     'bool "foo"\n'
+     'if !BR2_PACKAGE_BAZ\n'
+     'config BR2_PACKAGE_FOO\n'
+     'bool "foo"\n'
+     'endif\n',
+     []),
+    ]
+
+
+@pytest.mark.parametrize('testname,filename,string,expected', RedefinedConfig)
+def test_RedefinedConfig(testname, filename, string, expected):
+    warnings = util.check_file(m.RedefinedConfig, filename, string)
+    assert warnings == expected
-- 
2.34.1

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

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

* [Buildroot] [next 05/25] support/scripts/generate-gitlab-ci-yml: improve test-pkg support
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
                   ` (3 preceding siblings ...)
  2022-11-27 13:07 ` [Buildroot] [next 04/25] utils/checkpackagelib: warn about redefined config Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 11:04   ` Peter Korsgaard
  2023-02-22 16:38   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 06/25] package/fwts: use ifeq instead of ifdef Ricardo Martincoski
                   ` (19 subsequent siblings)
  24 siblings, 2 replies; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

Following the example of test-pkg config described in commit
"12c7a05da1 utils/test-pkg: add gitlab-ci support" to test a defconfig
fragment that contains a disabled option is currently possible, but
it do requires one to change the git config core.commentChart so the
lines starting with "#" are not discarded by git when creating/editing
the commit message.

For instance, without the indentation the 3rd line below would be
excluded from the commit message when the editor is closed:
    test-pkg config:
    SOME_OPTION=y
    # OTHER_OPTION is not set
    SOME_VARIABLE="some value"

Requiring to change git configs is not very nice.
So make the developer's life easier by changing the sed expression to
remove indentation with spaces from a defconfig fragment found on a
commit message.
For instance these lines become valid and generate a defconfig fragment
without the indentation of one space to be tested in GitLab CI:
test-pkg config:
 SOME_OPTION=y
 # OTHER_OPTION is not set
 SOME_VARIABLE="some value"

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
Example usage:
https://gitlab.com/RicardoMartincoski/buildroot/-/pipelines/704846763
---
 support/scripts/generate-gitlab-ci-yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/support/scripts/generate-gitlab-ci-yml b/support/scripts/generate-gitlab-ci-yml
index aa43aac019..27f586f1b6 100755
--- a/support/scripts/generate-gitlab-ci-yml
+++ b/support/scripts/generate-gitlab-ci-yml
@@ -91,7 +91,7 @@ gen_tests() {
 
     # Retrieve defconfig for test-pkg from the git commit message (if any)
     if grep -q -E '^test-pkg config:$' <<<"${CI_COMMIT_DESCRIPTION}"; then
-        sed -r -n -e '/^test-pkg config:$/{:a;n;p;ba;}' \
+        sed -r -n -e '/^test-pkg config:$/{:a;n;s/^ +//;p;ba;}' \
             <<<"${CI_COMMIT_DESCRIPTION}" \
             >defconfig.frag
         if [ ! -s defconfig.frag ]; then
-- 
2.34.1

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

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

* [Buildroot] [next 06/25] package/fwts: use ifeq instead of ifdef
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
                   ` (4 preceding siblings ...)
  2022-11-27 13:07 ` [Buildroot] [next 05/25] support/scripts/generate-gitlab-ci-yml: improve test-pkg support Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 11:04   ` Peter Korsgaard
  2023-02-22 16:38   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 07/25] package/live555: fix build config with locale Ricardo Martincoski
                   ` (18 subsequent siblings)
  24 siblings, 2 replies; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni, Ricardo Martincoski

The conditional code using ifdef was added in 2018 and works as
expected.
But there is no reason to use ifdef instead of ifeq.

For consistence, switch to use ifeq like almost all packages already do.

Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Erico Nunes <nunes.erico@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 package/fwts/fwts.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/fwts/fwts.mk b/package/fwts/fwts.mk
index b208aa0c14..f04c7a848f 100644
--- a/package/fwts/fwts.mk
+++ b/package/fwts/fwts.mk
@@ -15,7 +15,7 @@ FWTS_DEPENDENCIES = host-bison host-flex host-pkgconf libglib2 libbsd \
 	$(if $(BR2_PACKAGE_BASH_COMPLETION),bash-completion) \
 	$(if $(BR2_PACKAGE_DTC),dtc)
 
-ifdef BR2_PACKAGE_FWTS_EFI_RUNTIME_MODULE
+ifeq ($(BR2_PACKAGE_FWTS_EFI_RUNTIME_MODULE),y)
 FWTS_MODULE_SUBDIRS = efi_runtime
 $(eval $(kernel-module))
 endif
-- 
2.34.1

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

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

* [Buildroot] [next 07/25] package/live555: fix build config with locale
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
                   ` (5 preceding siblings ...)
  2022-11-27 13:07 ` [Buildroot] [next 06/25] package/fwts: use ifeq instead of ifdef Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 11:06   ` Peter Korsgaard
  2023-02-22 16:38   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 08/25] package/pugixml: unconditionally set BUILD_DEFINES Ricardo Martincoski
                   ` (17 subsequent siblings)
  24 siblings, 2 replies; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

Using current conditional code, added in 2014:

ifndef ($(BR2_ENABLE_LOCALE),y)
LIVE555_CFLAGS += -DLOCALE_NOT_USED
endif

the define LOCALE_NOT_USED is always passed on CFLAGS, because there is
no symbol with following names defined:
 "(y,y)" -> not defined when BR2_ENABLE_LOCALE=y
 "(,y)" -> not defined when BR2_ENABLE_LOCALE is not set

So fix the typo, switching ifndef to ifneq.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
test-pkg config 1:
BR2_PACKAGE_LIVE555=y
https://gitlab.com/RicardoMartincoski/buildroot/-/pipelines/705379816
44 builds, 1 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed

test-pkg config 2:
BR2_PACKAGE_LIVE555=y
BR2_PACKAGE_OPENSSL=y
https://gitlab.com/RicardoMartincoski/buildroot/-/pipelines/705388345
44 builds, 1 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed

test-pkg config 3:
BR2_PACKAGE_LIVE555=y
BR2_PACKAGE_OPENSSL=y
BR2_STATIC_LIBS=y
https://gitlab.com/RicardoMartincoski/buildroot/-/pipelines/705391470
44 builds, 22 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed

test-pkg config 4:
BR2_PACKAGE_LIVE555=y
BR2_STATIC_LIBS=y
https://gitlab.com/RicardoMartincoski/buildroot/-/pipelines/705392278
44 builds, 22 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed
---
 package/live555/live555.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/live555/live555.mk b/package/live555/live555.mk
index effd4517cf..56ed705783 100644
--- a/package/live555/live555.mk
+++ b/package/live555/live555.mk
@@ -39,7 +39,7 @@ else
 LIVE555_CFLAGS += -DNO_OPENSSL
 endif
 
-ifndef ($(BR2_ENABLE_LOCALE),y)
+ifneq ($(BR2_ENABLE_LOCALE),y)
 LIVE555_CFLAGS += -DLOCALE_NOT_USED
 endif
 
-- 
2.34.1

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

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

* [Buildroot] [next 08/25] package/pugixml: unconditionally set BUILD_DEFINES
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
                   ` (6 preceding siblings ...)
  2022-11-27 13:07 ` [Buildroot] [next 07/25] package/live555: fix build config with locale Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 11:07   ` Peter Korsgaard
  2023-02-22 16:39   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 09/25] package/pugixml: fix configuration options Ricardo Martincoski
                   ` (16 subsequent siblings)
  24 siblings, 2 replies; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot; +Cc: Theo Debrouwere, Ricardo Martincoski

The ifdef construct intended to avoid passing -DBUILD_DEFINES="" was
never needed, because even upstream version v1.9 used in 2019 when the
configuration options were added, can handle an empty string for
BUILD_DEFINES.
In fact an empty string is the default for v1.9 if it is not passed
during configure.

Also, the host variant already sets BUILD_DEFINES unconditionally.

So remove the unneeded conditional.

Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Theo Debrouwere <t.debrouwere@televic.com>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
NOTE 1:
For versions starting from v1.11 this flag BUILD_DEFINES is ignored, but
it will be fixed in the next patch.
I had split into 2 patches because this first one applies to old
versions of the package too. Someone could theoretically decide to
backport to a local copy of buildroot 2020.05.x for instance.

NOTE 2:
It doesn't test much, since BUILD_DEFINES is ignored, but anyway:
https://gitlab.com/RicardoMartincoski/buildroot/-/pipelines/704554673
44 builds, 1 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed
test-pkg config:
BR2_PACKAGE_PUGIXML=y
---
 package/pugixml/pugixml.mk | 2 --
 1 file changed, 2 deletions(-)

diff --git a/package/pugixml/pugixml.mk b/package/pugixml/pugixml.mk
index 9137f04630..6c756e9c29 100644
--- a/package/pugixml/pugixml.mk
+++ b/package/pugixml/pugixml.mk
@@ -29,9 +29,7 @@ ifeq ($(BR2_PACKAGE_PUGIXML_HEADER_ONLY),y)
 PUGIXML_BUILD_DEFINES += PUGIXML_HEADER_ONLY
 endif
 
-ifdef PUGIXML_BUILD_DEFINES
 PUGIXML_CONF_OPTS += -DBUILD_DEFINES="$(subst $(space),;,$(PUGIXML_BUILD_DEFINES))"
-endif
 
 HOST_PUGIXML_CONF_OPTS += \
 	-DBUILD_PKGCONFIG=ON \
-- 
2.34.1

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

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

* [Buildroot] [next 09/25] package/pugixml: fix configuration options
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
                   ` (7 preceding siblings ...)
  2022-11-27 13:07 ` [Buildroot] [next 08/25] package/pugixml: unconditionally set BUILD_DEFINES Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 11:09   ` Peter Korsgaard
  2023-02-22 16:40   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 10/25] package/pugixml: use explicit build options Ricardo Martincoski
                   ` (15 subsequent siblings)
  24 siblings, 2 replies; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot; +Cc: Theo Debrouwere, Ricardo Martincoski

Commit upstream 1c5a0bb32583fd294022e68e66b541bf6ff71a67
":sparkles: Update CMake to modern approach" removed all feature
toogles, so starting from release v1.11 any flag passed in BUILD_DEFINES
was completely ignored during the build.
Version 1.11.4 was in use in buildroot since February 2021.

Commit upstream 0f1e75a902ef1751dd63a67fe223b5e8daf4c7f1
"Re-introduced the custom build defines" added PUGIXML_BUILD_DEFINES to
release v1.12, but BUILD_DEFINES is still completely ignored during the
build.
Version 1.12.1 is in use in buildroot since March 2022.

So switch the config options to use PUGIXML_BUILD_DEFINES instead of
BUILD_DEFINES.

Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Theo Debrouwere <t.debrouwere@televic.com>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
NOTE 1:
The code below can be useful to verify the statements above, after
commenting some lines:
|PUGIXML_VERSION = 1.11.4
|PUGIXML_VERSION = 1.10
|PUGIXML_VERSION = 1.9
|define PUGIXML_FORCE_BUILD_ERROR
|        echo '#ifdef PUGIXML_COMPACT' >> $(@D)/src/pugixml.cpp
|        echo '#error 111' >> $(@D)/src/pugixml.cpp
|        echo '#else' >> $(@D)/src/pugixml.cpp
|        echo '#error 222' >> $(@D)/src/pugixml.cpp
|        echo '#endif' >> $(@D)/src/pugixml.cpp
|endef
|PUGIXML_POST_PATCH_HOOKS += PUGIXML_FORCE_BUILD_ERROR
|PUGIXML_BUILD_DEFINES += PUGIXML_COMPACT
|PUGIXML_CONF_OPTS += -DBUILD_DEFINES="$(subst $(space),;,$(PUGIXML_BUILD_DEFINES))"
|PUGIXML_CONF_OPTS += -DPUGIXML_BUILD_DEFINES="$(subst $(space),;,$(PUGIXML_BUILD_DEFINES))"
|PUGIXML_CONF_OPTS += -DPUGIXML_COMPACT=ON

NOTE 2:
Current version for each branch:
$ git grep ^PUGIXML_VERSION \
    origin/next origin/master $(git branch -a | grep origin/202) \
    | sed -e 's,^remotes/,,g' -e 's,^origin/,,g' | sort
2020.02.x:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.11.4
2020.05.x:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.10
2020.08.x:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.10
2020.11.x:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.11.4
2021.02.x:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.11.4
2021.05.x:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.11.4
2021.08.x:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.11.4
2021.11.x:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.11.4
2022.02.x:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.11.4
2022.05.x:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.12.1
2022.08.x:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.12.1
master:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.12.1
next:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.12.1

NOTE 3:
local build tests to check size:
pugixml-compact/graphs/package-size-stats.csv:pugixml,165216,1.9q
pugixml-default/graphs/package-size-stats.csv:pugixml,152928,1.8q
pugixml-header-only/graphs/package-size-stats.csv:pugixml,13660,0.2
pugixml-noxpath/graphs/package-size-stats.csv:pugixml,95532,1.1
pugixml-compact/defconfig:BR2_x86_i686=y
pugixml-compact/defconfig:BR2_TOOLCHAIN_EXTERNAL=y
pugixml-compact/defconfig:BR2_PACKAGE_PUGIXML=y
pugixml-compact/defconfig:BR2_PACKAGE_PUGIXML_COMPACT=y
pugixml-default/defconfig:BR2_x86_i686=y
pugixml-default/defconfig:BR2_TOOLCHAIN_EXTERNAL=y
pugixml-default/defconfig:BR2_PACKAGE_PUGIXML=y
pugixml-header-only/defconfig:BR2_x86_i686=y
pugixml-header-only/defconfig:BR2_TOOLCHAIN_EXTERNAL=y
pugixml-header-only/defconfig:BR2_PACKAGE_PUGIXML=y
pugixml-header-only/defconfig:BR2_PACKAGE_PUGIXML_HEADER_ONLY=y
pugixml-noxpath/defconfig:BR2_x86_i686=y
pugixml-noxpath/defconfig:BR2_TOOLCHAIN_EXTERNAL=y
pugixml-noxpath/defconfig:BR2_PACKAGE_PUGIXML=y
pugixml-noxpath/defconfig:# BR2_PACKAGE_PUGIXML_XPATH_SUPPORT is not set

NOTE 4:
build tests on GitLab CI
test-pkg config 1:
 BR2_PACKAGE_PUGIXML=y
https://gitlab.com/RicardoMartincoski/buildroot/-/pipelines/704564417
44 builds, 1 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed
test-pkg config 2:
 BR2_PACKAGE_PUGIXML=y
 BR2_PACKAGE_PUGIXML_COMPACT=y
https://gitlab.com/RicardoMartincoski/buildroot/-/pipelines/704755515
44 builds, 1 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed
test-pkg config 3:
 BR2_PACKAGE_PUGIXML=y
 # BR2_PACKAGE_PUGIXML_XPATH_SUPPORT is not set
https://gitlab.com/RicardoMartincoski/buildroot/-/pipelines/704849811
44 builds, 1 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed
test-pkg config 4:
 BR2_PACKAGE_PUGIXML=y
 BR2_PACKAGE_PUGIXML_HEADER_ONLY=y
https://gitlab.com/RicardoMartincoski/buildroot/-/pipelines/704851087
44 builds, 1 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed
---
 package/pugixml/pugixml.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/pugixml/pugixml.mk b/package/pugixml/pugixml.mk
index 6c756e9c29..c54148d98f 100644
--- a/package/pugixml/pugixml.mk
+++ b/package/pugixml/pugixml.mk
@@ -29,11 +29,11 @@ ifeq ($(BR2_PACKAGE_PUGIXML_HEADER_ONLY),y)
 PUGIXML_BUILD_DEFINES += PUGIXML_HEADER_ONLY
 endif
 
-PUGIXML_CONF_OPTS += -DBUILD_DEFINES="$(subst $(space),;,$(PUGIXML_BUILD_DEFINES))"
+PUGIXML_CONF_OPTS += -DPUGIXML_BUILD_DEFINES="$(subst $(space),;,$(PUGIXML_BUILD_DEFINES))"
 
 HOST_PUGIXML_CONF_OPTS += \
 	-DBUILD_PKGCONFIG=ON \
-	-DBUILD_DEFINES="$(subst $(space),;,$(HOST_PUGIXML_BUILD_DEFINES))"
+	-DPUGIXML_BUILD_DEFINES="$(subst $(space),;,$(HOST_PUGIXML_BUILD_DEFINES))"
 
 $(eval $(cmake-package))
 $(eval $(host-cmake-package))
-- 
2.34.1

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

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

* [Buildroot] [next 10/25] package/pugixml: use explicit build options
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
                   ` (8 preceding siblings ...)
  2022-11-27 13:07 ` [Buildroot] [next 09/25] package/pugixml: fix configuration options Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 11:12   ` Peter Korsgaard
  2023-02-22 16:41   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 11/25] package/busybox: add comment about variable override Ricardo Martincoski
                   ` (14 subsequent siblings)
  24 siblings, 2 replies; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot; +Cc: Theo Debrouwere, Ricardo Martincoski

Commit upstream 986b7ffd01aedcd4f2aa16e78e4cad9313b6d7b2
"Add Cmake options for pugiconfig.hpp" added feature toogles to release
v1.12, including PUGIXML_NO_XPATH and PUGIXML_COMPACT.

Commit upstream 5f49f2c6575cc2b7d343f8d41581fe92d69d7b52
"Mark advanced options and removed redundant ones" removed CMake
specific support for PUGIXML_HEADER_ONLY and PUGIXML_HAS_LONG_LONG, but
they can still be provided using PUGIXML_BUILD_DEFINES, starting from
release v1.12.

So use the explicit build options PUGIXML_NO_XPATH and PUGIXML_COMPACT,
but keep using PUGIXML_BUILD_DEFINES to set PUGIXML_HEADER_ONLY and
PUGIXML_HAS_LONG_LONG.

Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Theo Debrouwere <t.debrouwere@televic.com>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
local build tests to check size:
pugixml-compact/graphs/package-size-stats.csv:pugixml,165216,1.9q
pugixml-default/graphs/package-size-stats.csv:pugixml,152928,1.8q
pugixml-header-only/graphs/package-size-stats.csv:pugixml,13660,0.2
pugixml-noxpath/graphs/package-size-stats.csv:pugixml,95532,1.1
pugixml-compact/defconfig:BR2_x86_i686=y
pugixml-compact/defconfig:BR2_TOOLCHAIN_EXTERNAL=y
pugixml-compact/defconfig:BR2_PACKAGE_PUGIXML=y
pugixml-compact/defconfig:BR2_PACKAGE_PUGIXML_COMPACT=y
pugixml-default/defconfig:BR2_x86_i686=y
pugixml-default/defconfig:BR2_TOOLCHAIN_EXTERNAL=y
pugixml-default/defconfig:BR2_PACKAGE_PUGIXML=y
pugixml-header-only/defconfig:BR2_x86_i686=y
pugixml-header-only/defconfig:BR2_TOOLCHAIN_EXTERNAL=y
pugixml-header-only/defconfig:BR2_PACKAGE_PUGIXML=y
pugixml-header-only/defconfig:BR2_PACKAGE_PUGIXML_HEADER_ONLY=y
pugixml-noxpath/defconfig:BR2_x86_i686=y
pugixml-noxpath/defconfig:BR2_TOOLCHAIN_EXTERNAL=y
pugixml-noxpath/defconfig:BR2_PACKAGE_PUGIXML=y
pugixml-noxpath/defconfig:# BR2_PACKAGE_PUGIXML_XPATH_SUPPORT is not set
---
 package/pugixml/pugixml.mk | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/package/pugixml/pugixml.mk b/package/pugixml/pugixml.mk
index c54148d98f..1cf81c45f3 100644
--- a/package/pugixml/pugixml.mk
+++ b/package/pugixml/pugixml.mk
@@ -12,6 +12,18 @@ PUGIXML_CPE_ID_VENDOR = pugixml_project
 
 PUGIXML_INSTALL_STAGING = YES
 
+ifeq ($(BR2_PACKAGE_PUGIXML_XPATH_SUPPORT),y)
+PUGIXML_CONF_OPTS += -DPUGIXML_NO_XPATH=OFF
+else
+PUGIXML_CONF_OPTS += -DPUGIXML_NO_XPATH=ON
+endif
+
+ifeq ($(BR2_PACKAGE_PUGIXML_COMPACT),y)
+PUGIXML_CONF_OPTS += -DPUGIXML_COMPACT=ON
+else
+PUGIXML_CONF_OPTS += -DPUGIXML_COMPACT=OFF
+endif
+
 # Pugixml will automatically enable 'long long' support on C++11 compilers,
 # which means gcc 4.8+. As gcc always supports the 'long long' type,
 # force-enable this option to support older gcc versions. See also:
@@ -19,12 +31,6 @@ PUGIXML_INSTALL_STAGING = YES
 PUGIXML_BUILD_DEFINES += PUGIXML_HAS_LONG_LONG
 HOST_PUGIXML_BUILD_DEFINES += PUGIXML_HAS_LONG_LONG
 
-ifeq ($(BR2_PACKAGE_PUGIXML_XPATH_SUPPORT),)
-PUGIXML_BUILD_DEFINES += PUGIXML_NO_XPATH
-endif
-ifeq ($(BR2_PACKAGE_PUGIXML_COMPACT),y)
-PUGIXML_BUILD_DEFINES += PUGIXML_COMPACT
-endif
 ifeq ($(BR2_PACKAGE_PUGIXML_HEADER_ONLY),y)
 PUGIXML_BUILD_DEFINES += PUGIXML_HEADER_ONLY
 endif
-- 
2.34.1

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

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

* [Buildroot] [next 11/25] package/busybox: add comment about variable override
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
                   ` (9 preceding siblings ...)
  2022-11-27 13:07 ` [Buildroot] [next 10/25] package/pugixml: use explicit build options Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 11:13   ` Peter Korsgaard
  2023-02-22 16:41   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 12/25] utils/checkpackagelib: warn about ifdef on .mk Ricardo Martincoski
                   ` (13 subsequent siblings)
  24 siblings, 2 replies; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

The same comment already exists for UCLIBC_CONFIG_FILE.
Both variables can be override from command-line, as described in the
manual, at section 'Environment variables'.

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

diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index ef628e90e9..0f14bf999d 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -108,6 +108,8 @@ BUSYBOX_MAKE_OPTS = \
 	CONFIG_PREFIX="$(TARGET_DIR)" \
 	SKIP_STRIP=y
 
+# specifying BUSYBOX_CONFIG_FILE on the command-line overrides the .config
+# setting.
 ifndef BUSYBOX_CONFIG_FILE
 BUSYBOX_CONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_BUSYBOX_CONFIG))
 endif
-- 
2.34.1

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

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

* [Buildroot] [next 12/25] utils/checkpackagelib: warn about ifdef on .mk
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
                   ` (10 preceding siblings ...)
  2022-11-27 13:07 ` [Buildroot] [next 11/25] package/busybox: add comment about variable override Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 11:15   ` Peter Korsgaard
  2023-02-22 16:44   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 13/25] toolchain/toolchain-buildroot: add comment about using virtual package infra Ricardo Martincoski
                   ` (12 subsequent siblings)
  24 siblings, 2 replies; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

There are two legitimate cases to prefer ifdef over ifeq in package
recipes: command-line overrides are allowed for busybox and uclibc
configs.

Except for that, all package in tree already use ifeq, so warn the
developer adding/changing a package to use ifeq instead of ifdef, in
order to keep consistence across packages.
file.mk:2: use ifeq ($(SYMBOL),y) instead of ifdef SYMBOL
file.mk:5: use ifneq ($(SYMBOL),y) instead of ifndef SYMBOL

The difference between ifeq and ifdef is that ifdef doesn't expand
recursively.

Add comments to busybox and uclibc packages to avoid a warning in such
special cases.

Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
NOTE 1:
I only state "all package in tree already use ifeq" because earlier in
the series other 3 (2 ifdef and 1 ifndef) uses were removed.

NOTE 2:
We have both
ifneq ($(BR2_ENABLE_LOCALE),y)
and
ifeq ($(BR2_ENABLE_LOCALE),)
in the tree.
I assume both do the same.
So I choose one for the check-package warning message, for no particular
reason.
package/dialog/dialog.mk:ifneq ($(BR2_ENABLE_LOCALE),y)
package/dosfstools/dosfstools.mk:ifneq ($(BR2_ENABLE_LOCALE),y)
package/dvb-apps/dvb-apps.mk:ifeq ($(BR2_ENABLE_LOCALE),)
package/gettext-gnu/gettext-gnu.mk:ifeq ($(BR2_ENABLE_LOCALE),)
package/guile/guile.mk:ifeq ($(BR2_ENABLE_LOCALE),)
package/kodi-audioencoder-lame/kodi-audioencoder-lame.mk:ifeq ($(BR2_ENABLE_LOCALE),)
package/kodi/kodi.mk:ifeq ($(BR2_ENABLE_LOCALE),)
package/libcddb/libcddb.mk:ifeq ($(BR2_ENABLE_LOCALE),)
package/libcdio/libcdio.mk:ifeq ($(BR2_ENABLE_LOCALE),)
package/libglib2/libglib2.mk:ifneq ($(BR2_ENABLE_LOCALE),y)
package/libpsl/libpsl.mk:ifeq ($(BR2_ENABLE_LOCALE),)
package/lsof/lsof.mk:ifeq ($(BR2_ENABLE_LOCALE),)
package/sdl_sound/sdl_sound.mk:ifneq ($(BR2_ENABLE_LOCALE),y)
package/softether/softether.mk:ifeq ($(BR2_ENABLE_LOCALE),)
package/uclibc-ng-test/uclibc-ng-test.mk:ifeq ($(BR2_ENABLE_LOCALE),)

NOTE 3:
Applying only this patch on current master, check-package returns:
package/pugixml/pugixml.mk:32: use ifeq ($(SYMBOL),y) instead of ifdef SYMBOL
package/live555/live555.mk:42: use ifneq ($(SYMBOL),y) instead of ifndef SYMBOL
package/fwts/fwts.mk:18: use ifeq ($(SYMBOL),y) instead of ifdef SYMBOL
---
 package/busybox/busybox.mk           |  1 +
 package/uclibc/uclibc.mk             |  1 +
 utils/checkpackagelib/lib_mk.py      | 18 +++++++++++
 utils/checkpackagelib/test_lib_mk.py | 48 ++++++++++++++++++++++++++++
 4 files changed, 68 insertions(+)

diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index 0f14bf999d..f8f9cb5616 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -110,6 +110,7 @@ BUSYBOX_MAKE_OPTS = \
 
 # specifying BUSYBOX_CONFIG_FILE on the command-line overrides the .config
 # setting.
+# check-package disable Ifdef
 ifndef BUSYBOX_CONFIG_FILE
 BUSYBOX_CONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_BUSYBOX_CONFIG))
 endif
diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk
index 0ddf7dfa6d..125aa4cdcf 100644
--- a/package/uclibc/uclibc.mk
+++ b/package/uclibc/uclibc.mk
@@ -22,6 +22,7 @@ UCLIBC_DEPENDENCIES = host-gcc-initial linux-headers
 
 # specifying UCLIBC_CONFIG_FILE on the command-line overrides the .config
 # setting.
+# check-package disable Ifdef
 ifndef UCLIBC_CONFIG_FILE
 UCLIBC_CONFIG_FILE = $(call qstrip,$(BR2_UCLIBC_CONFIG))
 endif
diff --git a/utils/checkpackagelib/lib_mk.py b/utils/checkpackagelib/lib_mk.py
index b50a19ac62..8adf844e9a 100644
--- a/utils/checkpackagelib/lib_mk.py
+++ b/utils/checkpackagelib/lib_mk.py
@@ -21,6 +21,24 @@ continue_conditional = ["elif", "else"]
 end_conditional = ["endif"]
 
 
+class Ifdef(_CheckFunction):
+    IFDEF = re.compile(r"^\s*(else\s+|)(ifdef|ifndef)\s")
+
+    def check_line(self, lineno, text):
+        m = self.IFDEF.search(text)
+        if m is None:
+            return
+        word = m.group(2)
+        if word == 'ifdef':
+            return ["{}:{}: use ifeq ($(SYMBOL),y) instead of ifdef SYMBOL"
+                    .format(self.filename, lineno),
+                    text]
+        else:
+            return ["{}:{}: use ifneq ($(SYMBOL),y) instead of ifndef SYMBOL"
+                    .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..80a1736b4e 100644
--- a/utils/checkpackagelib/test_lib_mk.py
+++ b/utils/checkpackagelib/test_lib_mk.py
@@ -3,6 +3,54 @@ import checkpackagelib.test_util as util
 import checkpackagelib.lib_mk as m
 
 
+Ifdef = [
+    ('ignore commented line',
+     'any',
+     '# ifdef\n',
+     []),
+    ('simple',
+     'any',
+     '\n'
+     'ifdef BR2_PACKAGE_FWTS_EFI_RUNTIME_MODULE\n'
+     'endif\n',
+     [['any:2: use ifeq ($(SYMBOL),y) instead of ifdef SYMBOL',
+       'ifdef BR2_PACKAGE_FWTS_EFI_RUNTIME_MODULE\n']]),
+    ('ignore indentation',
+     'any',
+     '  ifdef FOO\n'
+     '  endif\n'
+     '\tifdef BAR\n'
+     'endif\n',
+     [['any:1: use ifeq ($(SYMBOL),y) instead of ifdef SYMBOL',
+       '  ifdef FOO\n'],
+      ['any:3: use ifeq ($(SYMBOL),y) instead of ifdef SYMBOL',
+       '\tifdef BAR\n']]),
+    ('typo',
+     'any',
+     '\n'
+     'ifndef ($(BR2_ENABLE_LOCALE),y)\n'
+     'endif\n',
+     [['any:2: use ifneq ($(SYMBOL),y) instead of ifndef SYMBOL',
+       'ifndef ($(BR2_ENABLE_LOCALE),y)\n']]),
+    ('else ifdef',
+     'any',
+     'else ifdef  SYMBOL # comment\n',
+     [['any:1: use ifeq ($(SYMBOL),y) instead of ifdef SYMBOL',
+       'else ifdef  SYMBOL # comment\n']]),
+    ('else ifndef',
+     'any',
+     '\t else  ifndef\t($(SYMBOL),y) # comment\n',
+     [['any:1: use ifneq ($(SYMBOL),y) instead of ifndef SYMBOL',
+       '\t else  ifndef\t($(SYMBOL),y) # comment\n']]),
+    ]
+
+
+@pytest.mark.parametrize('testname,filename,string,expected', Ifdef)
+def test_Ifdef(testname, filename, string, expected):
+    warnings = util.check_file(m.Ifdef, filename, string)
+    assert warnings == expected
+
+
 Indent = [
     ('ignore comment at beginning of line',
      'any',
-- 
2.34.1

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

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

* [Buildroot] [next 13/25] toolchain/toolchain-buildroot: add comment about using virtual package infra
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
                   ` (11 preceding siblings ...)
  2022-11-27 13:07 ` [Buildroot] [next 12/25] utils/checkpackagelib: warn about ifdef on .mk Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 11:26   ` Peter Korsgaard
  2023-02-22 16:44   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 14/25] boot/uboot: remove use of legacy xloader symbol Ricardo Martincoski
                   ` (11 subsequent siblings)
  24 siblings, 2 replies; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot
  Cc: Yann E . MORIN, Ricardo Martincoski, Thomas Petazzoni,
	Giulio Benetti, Romain Naour, Thomas De Schampheleire

Commit "9a8ec9195c toolchain/toolchain-buildroot: migrate to virtual
package infrastructure" made the packages toolchain and
toolchain-buildroot to use the virtual package infra even they being
generic packages.
This works because on package/pkg-virtual.mk when a package do not
define neither _PROVIDES_ or _HAS_ symbols, only _IS_VIRTUAL is set to
YES and _VERSION and _SOURCE are set to empty before relaying the call
to inner-generic-package.

Add a comment explaining why the virtual package infra is used in these
cases.

Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
Cc: Romain Naour <romain.naour@gmail.com>
Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 toolchain/toolchain-buildroot/toolchain-buildroot.mk | 3 +++
 toolchain/toolchain/toolchain.mk                     | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/toolchain/toolchain-buildroot/toolchain-buildroot.mk b/toolchain/toolchain-buildroot/toolchain-buildroot.mk
index b30cc332d2..6da64b7c77 100644
--- a/toolchain/toolchain-buildroot/toolchain-buildroot.mk
+++ b/toolchain/toolchain-buildroot/toolchain-buildroot.mk
@@ -14,4 +14,7 @@ TOOLCHAIN_BUILDROOT_DEPENDENCIES = host-gcc-final
 
 TOOLCHAIN_BUILDROOT_ADD_TOOLCHAIN_DEPENDENCY = NO
 
+# Not really a virtual package, but we use the virtual package infra here so
+# both the build log and build directory look nicer (toolchain-buildroot-virtual
+# instead of toolchain-buildroot-undefined)
 $(eval $(virtual-package))
diff --git a/toolchain/toolchain/toolchain.mk b/toolchain/toolchain/toolchain.mk
index 18f1dbea1a..ac60a7b248 100644
--- a/toolchain/toolchain/toolchain.mk
+++ b/toolchain/toolchain/toolchain.mk
@@ -47,4 +47,7 @@ endef
 TOOLCHAIN_POST_INSTALL_TARGET_HOOKS += TOOLCHAIN_GLIBC_COPY_NSSWITCH_FILE
 endif
 
+# Not really a virtual package, but we use the virtual package infra here so
+# both the build log and build directory look nicer (toolchain-virtual instead
+# of toolchain-undefined)
 $(eval $(virtual-package))
-- 
2.34.1

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

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

* [Buildroot] [next 14/25] boot/uboot: remove use of legacy xloader symbol
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
                   ` (12 preceding siblings ...)
  2022-11-27 13:07 ` [Buildroot] [next 13/25] toolchain/toolchain-buildroot: add comment about using virtual package infra Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 11:26   ` Peter Korsgaard
  2023-02-22 16:45   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 15/25] system: remove use of legacy md5 option Ricardo Martincoski
                   ` (10 subsequent siblings)
  24 siblings, 2 replies; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

Commit "070b183d0c boot/xloader: remove package", from release 2018.11,
removed the package, but the symbol is still referenced.

Remove the reference to it.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 boot/uboot/Config.in | 1 -
 1 file changed, 1 deletion(-)

diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index a729280060..b37fd4c7be 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -442,7 +442,6 @@ endif
 
 config BR2_TARGET_UBOOT_SPL
 	bool "Install U-Boot SPL binary image"
-	depends on !BR2_TARGET_XLOADER
 	help
 	  Install the U-Boot SPL binary image to the images
 	  directory.
-- 
2.34.1

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

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

* [Buildroot] [next 15/25] system: remove use of legacy md5 option
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
                   ` (13 preceding siblings ...)
  2022-11-27 13:07 ` [Buildroot] [next 14/25] boot/uboot: remove use of legacy xloader symbol Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 11:27   ` Peter Korsgaard
  2023-02-22 16:45   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 16/25] package/linux-headers: remove bogus symbol BR2_PACKAGE_HOST_LINUX_HEADERS Ricardo Martincoski
                   ` (9 subsequent siblings)
  24 siblings, 2 replies; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

Commit "bf3626002f system cfg: remove mkpasswd MD5 format option", from
release 2019.02, moved the symbol to legacy handling, but the symbol is
still referenced.

Remove the reference to it.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 system/Config.in | 1 -
 1 file changed, 1 deletion(-)

diff --git a/system/Config.in b/system/Config.in
index e6dcd25455..bf65b07a76 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -78,7 +78,6 @@ endchoice # Passwd encoding
 
 config BR2_TARGET_GENERIC_PASSWD_METHOD
 	string
-	default "md5"       if BR2_TARGET_GENERIC_PASSWD_MD5
 	default "sha-256"   if BR2_TARGET_GENERIC_PASSWD_SHA256
 	default "sha-512"   if BR2_TARGET_GENERIC_PASSWD_SHA512
 
-- 
2.34.1

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

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

* [Buildroot] [next 16/25] package/linux-headers: remove bogus symbol BR2_PACKAGE_HOST_LINUX_HEADERS
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
                   ` (14 preceding siblings ...)
  2022-11-27 13:07 ` [Buildroot] [next 15/25] system: remove use of legacy md5 option Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 11:29   ` Peter Korsgaard
  2023-02-22 16:46   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 17/25] package/gitlab-runner: ensure use of LIBCURL_OPENSSL Ricardo Martincoski
                   ` (8 subsequent siblings)
  24 siblings, 2 replies; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

The package host-linux-headers does not exist and there were never
references to this symbol in the tree, do drop it.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 package/linux-headers/Config.in.host | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/package/linux-headers/Config.in.host b/package/linux-headers/Config.in.host
index 8679241a2c..b8318a3a67 100644
--- a/package/linux-headers/Config.in.host
+++ b/package/linux-headers/Config.in.host
@@ -1,8 +1,5 @@
 comment "Kernel Header Options"
 
-config BR2_PACKAGE_HOST_LINUX_HEADERS
-	bool
-
 choice
 	prompt "Kernel Headers"
 	default BR2_KERNEL_HEADERS_AS_KERNEL if BR2_LINUX_KERNEL
-- 
2.34.1

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

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

* [Buildroot] [next 17/25] package/gitlab-runner: ensure use of LIBCURL_OPENSSL
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
                   ` (15 preceding siblings ...)
  2022-11-27 13:07 ` [Buildroot] [next 16/25] package/linux-headers: remove bogus symbol BR2_PACKAGE_HOST_LINUX_HEADERS Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 11:37   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 18/25] package/openpowerlink: properly handle legacy options Ricardo Martincoski
                   ` (7 subsequent siblings)
  24 siblings, 1 reply; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour, Marcin Niestroj, Ricardo Martincoski

Currently this minimal config is accepted while it shouldn't:
BR2_x86_i686=y
BR2_PACKAGE_BEARSSL=y
BR2_PACKAGE_LIBCURL_BEARSSL=y
BR2_PACKAGE_GITLAB_RUNNER=y

BR2_PACKAGE_GITLAB_RUNNER selects BR2_PACKAGE_LIBCURL_OPENSSL.
Kconfig does not enforce a select when the symbol selected is part of a
choice. See similar explanation on [1] and [2].

Doing something similar to [3] and depending on the choice option
instead of selecting it would create a Kconfig recursive dependency.

Just dropping the ineffective select would keep the above defconfig
snippet as an accepted one.

Adding a comment to the menu, i.e.:
comment "gitlab-runner must use BR2_PACKAGE_LIBCURL_OPENSSL"
       depends on BR2_PACKAGE_GITLAB_RUNNER
       depends on !BR2_PACKAGE_LIBCURL_OPENSSL
could improve user experience but it also keeps the above defconfig
snippet as an accepted one.

So bail out the build when gitlab-runner is enabled and libcurl-openssl
is not selected, similar to what is done in [4].

[1] "a44b1c1405 legacy: update the BR2_PREFER_STATIC_LIB option"
[2] "b1d5aa1bc2 package/qwt: Fix selecting OpenGL support in qt4"
[3] "9fc652a373 package/libmodsecurity: needs dynamic library with
     libcurl and mbedtls"
[4] "fda53f0791 package/Makefile.in: add detection for the lack of C
     library"

Cc: Marcin Niestroj <m.niestroj@grinn-global.com>
Cc: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 package/gitlab-runner/Config.in        | 1 -
 package/gitlab-runner/gitlab-runner.mk | 4 ++++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/package/gitlab-runner/Config.in b/package/gitlab-runner/Config.in
index 89e3e87b5c..5b8a6cacbe 100644
--- a/package/gitlab-runner/Config.in
+++ b/package/gitlab-runner/Config.in
@@ -11,7 +11,6 @@ config BR2_PACKAGE_GITLAB_RUNNER
 	select BR2_PACKAGE_GIT # runtime
 	select BR2_PACKAGE_LIBCURL # runtime
 	select BR2_PACKAGE_LIBCURL_CURL # runtime
-	select BR2_PACKAGE_LIBCURL_OPENSSL # runtime, for ca-certificates.
 	select BR2_PACKAGE_OPENSSL # runtime
 	select BR2_PACKAGE_OPENSSL_FORCE_LIBOPENSSL # runtime
 	select BR2_PACKAGE_LIBOPENSSL_BIN # runtime
diff --git a/package/gitlab-runner/gitlab-runner.mk b/package/gitlab-runner/gitlab-runner.mk
index c7c2da2fe1..c997785d90 100644
--- a/package/gitlab-runner/gitlab-runner.mk
+++ b/package/gitlab-runner/gitlab-runner.mk
@@ -12,6 +12,10 @@ GITLAB_RUNNER_LICENSE_FILES = LICENSE
 GITLAB_RUNNER_LDFLAGS = \
 	-X gitlab.com/gitlab-org/gitlab-runner/common.VERSION=$(GITLAB_RUNNER_VERSION)
 
+ifeq ($(BR2_PACKAGE_GITLAB_RUNNER):$(BR2_PACKAGE_LIBCURL_OPENSSL):$(BR_BUILDING),y::y)
+$(error gitlab-runner must use BR2_PACKAGE_LIBCURL_OPENSSL for ca-certificates at runtime)
+endif
+
 # Don't run gitlab runner as root.
 define GITLAB_RUNNER_USERS
 	gitlab-runner -1 gitlab-runner -1 * /var/run/dbus /bin/false - Gitlab Runner
-- 
2.34.1

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

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

* [Buildroot] [next 18/25] package/openpowerlink: properly handle legacy options
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
                   ` (16 preceding siblings ...)
  2022-11-27 13:07 ` [Buildroot] [next 17/25] package/gitlab-runner: ensure use of LIBCURL_OPENSSL Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 11:45   ` Peter Korsgaard
  2023-02-22 16:47   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 19/25] package/gcc: properly handle legacy for renamed ARC option Ricardo Martincoski
                   ` (6 subsequent siblings)
  24 siblings, 2 replies; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour, Ricardo Martincoski

Commit "b1063a0136 package/openpowerlink: bump to v2.2.2" tried to add
legacy handling but the new symbols are part of a choice, and Kconfig
does not enforce the select of a option from a choice.

Update the legacy entry for 2016.02, following the example described in
the beginning of the file.

Cc: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
test config 1:
BR2_PACKAGE_OPENPOWERLINK_LIBPCAP=y
BR2_PACKAGE_OPENPOWERLINK=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y

test config 2:
BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE=y
BR2_PACKAGE_OPENPOWERLINK=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_LINUX_KERNEL=y
---
 Config.in.legacy                | 6 ++++--
 package/openpowerlink/Config.in | 2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Config.in.legacy b/Config.in.legacy
index 9ce1004b0c..e489458270 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -4313,19 +4313,21 @@ config BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL
 config BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE
 	bool "openpowerlink package has been updated"
 	select BR2_LEGACY
-	select BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_STACK_LIB
 	help
 	  openpowerlink kernel modules are built if the
 	  kernel stack library is selected.
+# Note: BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE is still referenced from
+# package/openpowerlink/Config.in
 
 config BR2_PACKAGE_OPENPOWERLINK_LIBPCAP
 	bool "openpowerlink package has been updated"
 	select BR2_LEGACY
-	select BR2_PACKAGE_OPENPOWERLINK_STACK_USERSPACE_DAEMON_LIB
 	help
 	  The user space support has been split in two part:
 	  - a monolithic user space library
 	  - a user space daemon driver
+# Note: BR2_PACKAGE_OPENPOWERLINK_LIBPCAP is still referenced from
+# package/openpowerlink/Config.in
 
 config BR2_LINUX_KERNEL_SAME_AS_HEADERS
 	bool "using the linux headers version for the kernel has been removed"
diff --git a/package/openpowerlink/Config.in b/package/openpowerlink/Config.in
index 1a3dd62acd..ef59a04baf 100644
--- a/package/openpowerlink/Config.in
+++ b/package/openpowerlink/Config.in
@@ -38,6 +38,8 @@ endchoice
 
 choice
 	prompt "stack type"
+	default BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_STACK_LIB if BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE # legacy
+	default BR2_PACKAGE_OPENPOWERLINK_STACK_USERSPACE_DAEMON_LIB if BR2_PACKAGE_OPENPOWERLINK_LIBPCAP # legacy
 
 config BR2_PACKAGE_OPENPOWERLINK_STACK_MONOLITHIC_USER_STACK_LIB
 	bool "linked into application"
-- 
2.34.1

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

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

* [Buildroot] [next 19/25] package/gcc: properly handle legacy for renamed ARC option
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
                   ` (17 preceding siblings ...)
  2022-11-27 13:07 ` [Buildroot] [next 18/25] package/openpowerlink: properly handle legacy options Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 11:48   ` Peter Korsgaard
  2023-02-22 16:47   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 20/25] package/lua: properly handle legacy for removed version Ricardo Martincoski
                   ` (5 subsequent siblings)
  24 siblings, 2 replies; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot
  Cc: Thomas Petazzoni, Giulio Benetti, Romain Naour, Ricardo Martincoski

Commit "50332a530b gcc: rename option for ARC gcc" tried to add legacy
handling but the new symbol is part of a choice, and Kconfig does not
enforce the select of a option from a choice.

Update the legacy entry for 2016.11, following the example described in
the beginning of the file.

Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
Cc: Romain Naour <romain.naour@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
test config 1:
BR2_GCC_VERSION_4_8_ARC=y
BR2_arcle=y
NOTE that in order to test this other line must be commented out:
default BR2_GCC_VERSION_ARC if BR2_GCC_VERSION_ARC
---
 Config.in.legacy           | 3 ++-
 package/gcc/Config.in.host | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/Config.in.legacy b/Config.in.legacy
index e489458270..8861b0d704 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -3970,10 +3970,11 @@ config BR2_LINUX_KERNEL_TOOL_SELFTESTS
 config BR2_GCC_VERSION_4_8_ARC
 	bool "gcc arc option renamed"
 	select BR2_LEGACY
-	select BR2_GCC_VERSION_ARC
 	help
 	  The option that selects the gcc version for the ARC
 	  architecture has been renamed to BR2_GCC_VERSION_ARC.
+# Note: BR2_GCC_VERSION_4_8_ARC is still referenced from
+# package/gcc/Config.in.host
 
 config BR2_KERNEL_HEADERS_4_0
 	bool "kernel headers version 4.0.x are no longer supported"
diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index d7fedc9591..cd1b9fa46d 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -2,6 +2,7 @@ comment "GCC Options"
 
 choice
 	prompt "GCC compiler Version"
+	default BR2_GCC_VERSION_ARC if BR2_GCC_VERSION_4_8_ARC # legacy
 	default BR2_GCC_VERSION_ARC if BR2_arc
 	default BR2_GCC_VERSION_POWERPC_SPE if BR2_powerpc_SPE
 	default BR2_GCC_VERSION_11_X
-- 
2.34.1

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

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

* [Buildroot] [next 20/25] package/lua: properly handle legacy for removed version
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
                   ` (18 preceding siblings ...)
  2022-11-27 13:07 ` [Buildroot] [next 19/25] package/gcc: properly handle legacy for renamed ARC option Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 13:22   ` Peter Korsgaard
  2023-02-22 16:48   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 21/25] package/ti-sgx-km: properly handle legacy for removed options Ricardo Martincoski
                   ` (4 subsequent siblings)
  24 siblings, 2 replies; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

Commit "297613f1c7 package/lua: remove 5.2.x version" tried to add
legacy handling but the new symbols are part of a choice, and Kconfig
does not enforce the select of a option from a choice.

Update the legacy entry for 2019.02, following the example described in
the beginning of the file.

Cc: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
test config 1:
BR2_PACKAGE_LUA_5_2=y
BR2_PACKAGE_LUA=y
---
 Config.in.legacy      | 2 +-
 package/lua/Config.in | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/Config.in.legacy b/Config.in.legacy
index 8861b0d704..3131c31e68 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -2094,9 +2094,9 @@ config BR2_PACKAGE_FFTW_PRECISION_QUAD
 config BR2_PACKAGE_LUA_5_2
 	bool "Lua 5.2.x version removed"
 	select BR2_LEGACY
-	select BR2_PACKAGE_LUA_5_3
 	help
 	  The Lua 5.2.x version was removed.
+# Note: BR2_PACKAGE_LUA_5_2 is still referenced from package/lua/Config.in
 
 config BR2_TARGET_GENERIC_PASSWD_MD5
 	bool "target passwd md5 format support has been removed"
diff --git a/package/lua/Config.in b/package/lua/Config.in
index 309dd6eec2..8fa9f9b7ab 100644
--- a/package/lua/Config.in
+++ b/package/lua/Config.in
@@ -14,6 +14,7 @@ config BR2_PACKAGE_PROVIDES_LUAINTERPRETER
 
 choice
 	prompt "Lua Version"
+	default BR2_PACKAGE_LUA_5_3 if BR2_PACKAGE_LUA_5_2 # legacy
 	default BR2_PACKAGE_LUA_5_4
 	help
 	  Select the version of Lua API/ABI you wish to use.
-- 
2.34.1

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

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

* [Buildroot] [next 21/25] package/ti-sgx-km: properly handle legacy for removed options
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
                   ` (19 preceding siblings ...)
  2022-11-27 13:07 ` [Buildroot] [next 20/25] package/lua: properly handle legacy for removed version Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 13:25   ` Peter Korsgaard
  2023-02-22 16:49   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 22/25] package/openjdk: properly handle legacy for renamed options Ricardo Martincoski
                   ` (3 subsequent siblings)
  24 siblings, 2 replies; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot; +Cc: Ricardo Martincoski

Commit "c38b5566fe package/ti-sgx-{km, um, demos}: bump to latest TI
version", added in release 2020.02, removed some options that were
previously renamed in release 2018.05.

Update the legacy entry for 2018.05 and add the corresponding legacy
entries for 2020.02.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
test config 1:
BR2_PACKAGE_TI_SGX_KM=y
BR2_PACKAGE_TI_SGX_AM5430=y
BR2_LINUX_KERNEL=y
BR2_arm=y

test config 2:
BR2_PACKAGE_TI_SGX_KM=y
BR2_PACKAGE_TI_SGX_KM_AM5430=y
BR2_LINUX_KERNEL=y
BR2_arm=y

test config 3:
BR2_PACKAGE_TI_SGX_AM335X=y
BR2_LINUX_KERNEL=y
BR2_arm=y

test config 4:
BR2_PACKAGE_TI_SGX_KM_AM335X=y
BR2_LINUX_KERNEL=y
BR2_arm=y
---
 Config.in.legacy | 66 ++++++++++++++++++++++++++++++------------------
 1 file changed, 42 insertions(+), 24 deletions(-)

diff --git a/Config.in.legacy b/Config.in.legacy
index 3131c31e68..5dfbd8b831 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -1629,6 +1629,35 @@ config BR2_PACKAGE_RPI_USERLAND_START_VCFILED
 	help
 	  The vcfiled support was removed upstream.
 
+config BR2_PACKAGE_TI_SGX_KM_AM335X
+	bool "ti-sgx-km AM335X option removed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_TI_SGX_KM
+	help
+	  Starting from buildroot release 2020.02, the buildroot package
+	  only supports the target am335x.
+
+config BR2_PACKAGE_TI_SGX_KM_AM437X
+	bool "ti-sgx-km AM437X option removed"
+	select BR2_LEGACY
+	help
+	  Starting from buildroot release 2020.02, the buildroot package
+	  only supports the target am335x.
+
+config BR2_PACKAGE_TI_SGX_KM_AM4430
+	bool "ti-sgx-km AM4430 option removed"
+	select BR2_LEGACY
+	help
+	  Starting from buildroot release 2020.02, the buildroot package
+	  only supports the target am335x.
+
+config BR2_PACKAGE_TI_SGX_KM_AM5430
+	bool "ti-sgx-km AM5430 option removed"
+	select BR2_LEGACY
+	help
+	  Starting from buildroot release 2020.02, the buildroot package
+	  only supports the target am335x.
+
 comment "Legacy options removed in 2019.11"
 
 config BR2_PACKAGE_OPENVMTOOLS_PROCPS
@@ -2602,45 +2631,34 @@ config BR2_PACKAGE_MEDIAART_BACKEND_QT
 	  BR2_PACKAGE_MEDIAART_BACKEND_QT has been renamed to
 	  BR2_PACKAGE_LIBMEDIAART_BACKEND_QT
 
-# Note: BR2_PACKAGE_TI_SGX_AM335X is still referenced from
-# package/ti-sgx-km/Config.in
 config BR2_PACKAGE_TI_SGX_AM335X
-	bool "ti-sgx-km AM335X option renamed"
+	bool "ti-sgx-km AM335X option removed"
 	select BR2_LEGACY
+	select BR2_PACKAGE_TI_SGX_KM
 	help
-	  For consistency reasons, the option
-	  BR2_PACKAGE_TI_SGX_AM335X has been renamed to
-	  BR2_PACKAGE_TI_SGX_KM_AM335X.
+	  Starting from buildroot release 2020.02, the buildroot package
+	  only supports the target am335x.
 
-# Note: BR2_PACKAGE_TI_SGX_AM437X is still referenced from
-# package/ti-sgx-km/Config.in
 config BR2_PACKAGE_TI_SGX_AM437X
-	bool "ti-sgx-km AM437X option renamed"
+	bool "ti-sgx-km AM437X option removed"
 	select BR2_LEGACY
 	help
-	  For consistency reasons, the option
-	  BR2_PACKAGE_TI_SGX_AM437X has been renamed to
-	  BR2_PACKAGE_TI_SGX_KM_AM437X.
+	  Starting from buildroot release 2020.02, the buildroot package
+	  only supports the target am335x.
 
-# Note: BR2_PACKAGE_TI_SGX_AM4430 is still referenced from
-# package/ti-sgx-km/Config.in
 config BR2_PACKAGE_TI_SGX_AM4430
-	bool "ti-sgx-km AM4430 option renamed"
+	bool "ti-sgx-km AM4430 option removed"
 	select BR2_LEGACY
 	help
-	  For consistency reasons, the option
-	  BR2_PACKAGE_TI_SGX_AM4430 has been renamed to
-	  BR2_PACKAGE_TI_SGX_KM_AM4430.
+	  Starting from buildroot release 2020.02, the buildroot package
+	  only supports the target am335x.
 
-# Note: BR2_PACKAGE_TI_SGX_AM5430 is still referenced from
-# package/ti-sgx-km/Config.in
 config BR2_PACKAGE_TI_SGX_AM5430
-	bool "ti-sgx-km AM5430 option renamed"
+	bool "ti-sgx-km AM5430 option removed"
 	select BR2_LEGACY
 	help
-	  For consistency reasons, the option
-	  BR2_PACKAGE_TI_SGX_AM5430 has been renamed to
-	  BR2_PACKAGE_TI_SGX_KM_AM5430.
+	  Starting from buildroot release 2020.02, the buildroot package
+	  only supports the target am335x.
 
 config BR2_PACKAGE_JANUS_AUDIO_BRIDGE
 	bool "janus-gateway audio-bridge option renamed"
-- 
2.34.1

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

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

* [Buildroot] [next 22/25] package/openjdk: properly handle legacy for renamed options
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
                   ` (20 preceding siblings ...)
  2022-11-27 13:07 ` [Buildroot] [next 21/25] package/ti-sgx-km: properly handle legacy for removed options Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 13:27   ` Peter Korsgaard
  2023-02-22 16:49   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 23/25] package/sunxi-mali-utgard: " Ricardo Martincoski
                   ` (2 subsequent siblings)
  24 siblings, 2 replies; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot; +Cc: Tudor Holton, Ricardo Martincoski

Commit "a610bf9967 package/openjdk{-bin}: bump version to 17.0.1+12"
tried to add legacy handling but the new symbols are part of a choice,
and Kconfig does not enforce the select of a option from a choice.

Update the legacy entry for 2021.11, following the example described in
the beginning of the file.

Cc: Tudor Holton <buildroot@tudorholton.com>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
test config 1:
BR2_x86_64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_PACKAGE_XORG7=y
BR2_PACKAGE_OPENJDK=y
BR2_OPENJDK_VERSION_LTS=y
---
 Config.in.legacy          | 6 ++++--
 package/openjdk/Config.in | 2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Config.in.legacy b/Config.in.legacy
index 5dfbd8b831..27f5602d19 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -702,18 +702,20 @@ comment "Legacy options removed in 2021.11"
 config BR2_OPENJDK_VERSION_LTS
 	bool "OpenJDK LTS version was renamed to OpenJDK 11"
 	select BR2_LEGACY
-	select BR2_PACKAGE_OPENJDK_VERSION_11
 	help
 	  The LTS version option was renamed to OpenJDK 11 to make it
 	  clear what LTS version is.
+# Note: BR2_OPENJDK_VERSION_LTS is still referenced from
+# package/openjdk/Config.in
 
 config BR2_OPENJDK_VERSION_LATEST
 	bool "OpenJDK latest version (16.x) was removed"
 	select BR2_LEGACY
-	select BR2_PACKAGE_OPENJDK_VERSION_17
 	help
 	  OpenJDK 16.x is no longer mainted, so the option has been
 	  removed. Use OpenJDK 17.x instead.
+# Note: BR2_OPENJDK_VERSION_LATEST is still referenced from
+# package/openjdk/Config.in
 
 config BR2_PACKAGE_MPD_TIDAL
 	bool "mpd tidal option removed"
diff --git a/package/openjdk/Config.in b/package/openjdk/Config.in
index 8fbe51a27f..24a56e6b84 100644
--- a/package/openjdk/Config.in
+++ b/package/openjdk/Config.in
@@ -57,6 +57,8 @@ if BR2_PACKAGE_OPENJDK
 
 choice
 	prompt "openjdk version"
+	default BR2_PACKAGE_OPENJDK_VERSION_11 if BR2_OPENJDK_VERSION_LTS # legacy
+	default BR2_PACKAGE_OPENJDK_VERSION_17 if BR2_OPENJDK_VERSION_LATEST # legacy
 	default BR2_PACKAGE_OPENJDK_VERSION_17
 	help
 	  Select the version of OpenJDK you wish to use.
-- 
2.34.1

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

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

* [Buildroot] [next 23/25] package/sunxi-mali-utgard: properly handle legacy for renamed options
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
                   ` (21 preceding siblings ...)
  2022-11-27 13:07 ` [Buildroot] [next 22/25] package/openjdk: properly handle legacy for renamed options Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 13:28   ` Peter Korsgaard
  2023-02-22 16:50   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 24/25] package/rpi-userland: fix typo for BR2_aarch64 Ricardo Martincoski
  2022-11-27 13:07 ` [Buildroot] [next 25/25] utils/check-symbols: new script Ricardo Martincoski
  24 siblings, 2 replies; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot; +Cc: Giulio Benetti, Ricardo Martincoski

Commit "6a7a652b14 package/sunxi-mali-utgard: rename from
sunxi-mali-mainline" tried to add legacy handling but the new symbols
are part of a choice, and Kconfig does not enforce the select of a
option from a choice.

Update the legacy entry for 2022.02, following the example described in
the beginning of the file.

Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
test config 1:
BR2_aarch64=y
BR2_ARM_FPU_VFPV2=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_PACKAGE_SUNXI_MALI_MAINLINE=y
BR2_PACKAGE_SUNXI_MALI_MAINLINE_R8P1=y
---
 Config.in.legacy                    | 6 ++++--
 package/sunxi-mali-utgard/Config.in | 2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Config.in.legacy b/Config.in.legacy
index 27f5602d19..ad2598f7a1 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -631,20 +631,22 @@ config BR2_PACKAGE_SUNXI_MALI_MAINLINE
 config BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2
 	bool "sunxi-mali-mainline-r6p2 was renamed"
 	select BR2_LEGACY
-	select BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2
 	help
 	  The sunxi-mali-mainline package has been renamed
 	  sunxi-mali-utgard, the suboptions of this package have also
 	  been renamed accordingly.
+# Note: BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 is still referenced from
+# package/sunxi-mali-utgard/Config.in
 
 config BR2_PACKAGE_SUNXI_MALI_MAINLINE_R8P1
 	bool "sunxi-mali-mainline-r8p1 was renamed"
 	select BR2_LEGACY
-	select BR2_PACKAGE_SUNXI_MALI_UTGARD_R8P1
 	help
 	  The sunxi-mali-mainline package has been renamed
 	  sunxi-mali-utgard, the suboptions of this package have also
 	  been renamed accordingly.
+# Note: BR2_PACKAGE_SUNXI_MALI_MAINLINE_R8P1 is still referenced from
+# package/sunxi-mali-utgard/Config.in
 
 config BR2_PACKAGE_QT5WEBKIT_EXAMPLES
 	bool "qt5webkit-examples removed"
diff --git a/package/sunxi-mali-utgard/Config.in b/package/sunxi-mali-utgard/Config.in
index ff49ea03f1..59ac21f5ab 100644
--- a/package/sunxi-mali-utgard/Config.in
+++ b/package/sunxi-mali-utgard/Config.in
@@ -20,6 +20,8 @@ config BR2_PACKAGE_PROVIDES_LIBGLES
 
 choice
 	prompt "Version"
+	default BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 if BR2_PACKAGE_SUNXI_MALI_MAINLINE_R6P2 # legacy
+	default BR2_PACKAGE_SUNXI_MALI_UTGARD_R8P1 if BR2_PACKAGE_SUNXI_MALI_MAINLINE_R8P1 # legacy
 	default BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2
 	help
 	  Select the version of the userspace module.
-- 
2.34.1

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

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

* [Buildroot] [next 24/25] package/rpi-userland: fix typo for BR2_aarch64
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
                   ` (22 preceding siblings ...)
  2022-11-27 13:07 ` [Buildroot] [next 23/25] package/sunxi-mali-utgard: " Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 13:28   ` Peter Korsgaard
  2022-11-27 13:07 ` [Buildroot] [next 25/25] utils/check-symbols: new script Ricardo Martincoski
  24 siblings, 1 reply; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot
  Cc: Thomas Petazzoni, Tim Gover, Mahyar Koshkouei, Ricardo Martincoski

Commit "59adb53c4c package/rpi-userland: add support for aarch64"
introduced a typo in the condition that shows a comment in menuconfig.

Fix the typo: BR2_arch64 -> BR2_aarch64

Cc: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
Cc: Tim Gover <tim.gover@raspberrypi.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 package/rpi-userland/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/rpi-userland/Config.in b/package/rpi-userland/Config.in
index cfb472808b..4219bdb9c4 100644
--- a/package/rpi-userland/Config.in
+++ b/package/rpi-userland/Config.in
@@ -40,6 +40,6 @@ config BR2_PACKAGE_RPI_USERLAND_HELLO
 endif
 
 comment "rpi-userland needs a toolchain w/ C++, threads, dynamic library"
-	depends on BR2_arm || BR2_arch64
+	depends on BR2_arm || BR2_aarch64
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
 		BR2_STATIC_LIBS
-- 
2.34.1

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

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

* [Buildroot] [next 25/25] utils/check-symbols: new script
  2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
                   ` (23 preceding siblings ...)
  2022-11-27 13:07 ` [Buildroot] [next 24/25] package/rpi-userland: fix typo for BR2_aarch64 Ricardo Martincoski
@ 2022-11-27 13:07 ` Ricardo Martincoski
  2023-02-06 15:30   ` Peter Korsgaard
  24 siblings, 1 reply; 74+ messages in thread
From: Ricardo Martincoski @ 2022-11-27 13:07 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni, Ricardo Martincoski

This script checks for inconsistencies on symbols declared in Config.in
and used in .mk files.
Currently it checks only symbols following the pattern BR2_\w+ .

The script first gets the list of all files in the repository (using git
ls-files like 'make check-flake8' already do).

Then it parses all relevant files, searching for symbol definitions and
usages, and add entries into a database.

At the end, the database is searched for inconsistencies:
- symbol that is part of "choice" and is referenced with "select";
- legacy symbol being referenced in packages;
- legacy symbol being redefined in packages;
- symbol referenced but not defined;
- symbol defined but not referenced;
- legacy symbol that has a Note stating it is referenced by a package
  (for legacy handling) but is referenced in the package without a
  comment "# legacy";
- legacy symbol that has a Note stating it is referenced by a package
  but it is not actually referenced.

There is also a debug parameter --search that dumps any filename or
symbol entries from the database that matches a regexp.

Sample usages:
$ utils/check-symbols
$ utils/docker-run utils/check-symbols
$ utils/check-symbols --search 'GETTEXT\b|\/openssl'

At same time the script is created:
- add unit tests for it, they can be run using:
  utils/docker-run python3 -m pytest -v utils/checksymbolslib/
- add two more GitLab CI jobs: check-symbols (to check current tree
  using the script) and check-check-symbols (to check the script against
  its unit tests)

Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
This is actually v2 of the script.
v1: http://patchwork.ozlabs.org/project/buildroot/patch/20220814233845.2247022-34-ricardo.martincoski@gmail.com/
But v1 was only a prototype/WIP.
There was so many changes from v1 that I honestly gave up keeping track
of them. Because of that, no changelog on this patch.

All other patches in the series are new, found while developing this
script. Because of that, no changelog in all previous patches.

NOTE 1:
Example usage with only this patch applied to next:
$ time utils/docker-run utils/check-symbols
Config.in.legacy:634: BR2_PACKAGE_SUNXI_MALI_UTGARD_R6P2 is part of a "choice" and should not be "select"ed
Config.in.legacy:643: BR2_PACKAGE_SUNXI_MALI_UTGARD_R8P1 is part of a "choice" and should not be "select"ed
Config.in.legacy:705: BR2_PACKAGE_OPENJDK_VERSION_11 is part of a "choice" and should not be "select"ed
Config.in.legacy:713: BR2_PACKAGE_OPENJDK_VERSION_17 is part of a "choice" and should not be "select"ed
Config.in.legacy:2097: BR2_PACKAGE_LUA_5_3 is part of a "choice" and should not be "select"ed
Config.in.legacy:2605: BR2_PACKAGE_TI_SGX_AM335X not referenced but has a comment stating it is
Config.in.legacy:2615: BR2_PACKAGE_TI_SGX_AM437X not referenced but has a comment stating it is
Config.in.legacy:2625: BR2_PACKAGE_TI_SGX_AM4430 not referenced but has a comment stating it is
Config.in.legacy:2635: BR2_PACKAGE_TI_SGX_AM5430 not referenced but has a comment stating it is
Config.in.legacy:3973: BR2_GCC_VERSION_ARC is part of a "choice" and should not be "select"ed
Config.in.legacy:4316: BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_STACK_LIB is part of a "choice" and should not be "select"ed
Config.in.legacy:4324: BR2_PACKAGE_OPENPOWERLINK_STACK_USERSPACE_DAEMON_LIB is part of a "choice" and should not be "select"ed
boot/uboot/Config.in:445: BR2_TARGET_XLOADER is a legacy symbol and should not be referenced
package/fwts/Config.in:31: BR2_PACKAGE_FWTS_EFI_RUNTIME_MODULE defined but not referenced
package/gitlab-runner/Config.in:14: BR2_PACKAGE_LIBCURL_OPENSSL is part of a "choice" and should not be "select"ed
package/rpi-userland/Config.in:43: BR2_arch64 referenced but not defined
system/Config.in:81: BR2_TARGET_GENERIC_PASSWD_MD5 is a legacy symbol and should not be referenced
real    0m4,703s
user    0m0,057s
sys     0m0,020s

NOTE 2:
Example usage with the whole series applied to next:
$ time utils/check-symbols --search 'GETTEXT\b|\/openssl'
========== filenames found with pattern "GETTEXT\b|\/openssl": 2
package/openssl/Config.in
package/openssl/openssl.mk
========== ignored filenames with pattern "GETTEXT\b|\/openssl": 0
========== symbols with pattern "GETTEXT\b|\/openssl": 8
BR2_PACKAGE_GETTEXT {'normal usage': {'package/ecryptfs-utils/Config.in'
: [13], 'package/gettext/gettext.mk': [9], 'system/Config.in': [478]}, '
selected': {'package/ecryptfs-utils/Config.in': [13], 'system/Config.in'
: [478]}, 'definition': {'package/gettext/Config.in': [1]}, 'possible co
nfig helper': {'package/gettext/Config.in': [1]}, 'virtual': {'package/g
ettext/gettext.mk': [9]}}
BR2_PACKAGE_HAS_GETTEXT {'normal usage': {'package/gettext-gnu/Config.in
': [4], 'package/gettext-tiny/Config.in': [3], 'package/gettext/gettext.
mk': [9]}, 'selected': {'package/gettext-gnu/Config.in': [4], 'package/g
ettext-tiny/Config.in': [3]}, 'definition': {'package/gettext/Config.in'
: [11]}}
BR2_PACKAGE_PROVIDES_GETTEXT {'definition': {'package/gettext-gnu/Config
.in': [18], 'package/gettext-tiny/Config.in': [12], 'package/gettext/Con
fig.in': [14]}, 'normal usage': {'package/gettext/gettext.mk': [9]}}
BR2_PACKAGE_PROVIDES_HOST_GETTEXT {'definition': {'package/gettext-gnu/C
onfig.in': [23], 'package/gettext-tiny/Config.in': [17], 'package/gettex
t/Config.in': [17]}, 'normal usage': {'package/gettext/gettext.mk': [10]
}}
BR2_TOOLCHAIN_HAS_FULL_GETTEXT {'normal usage': {'package/gettext/Config
.in': [9], 'system/Config.in': [478], 'toolchain/Config.in': [14]}, 'sel
ected': {'toolchain/Config.in': [14]}, 'definition': {'toolchain/Config.
in': [313]}}
BR2_PACKAGE_HOST_GETTEXT {'normal usage': {'package/gettext/gettext.mk':
 [10]}}
BR2_PACKAGE_HAS_HOST_GETTEXT {'normal usage': {'package/gettext/gettext.
mk': [10]}}
BR2_PACKAGE_PHP_EXT_GETTEXT {'definition': {'package/php/Config.ext': [2
11]}, 'normal usage': {'package/php/php.mk': [164]}}
========== warnings:
real    0m1,337s
user    0m1,270s
sys     0m0,068s

NOTE 3:
The new GitLab CI jobs can be seen here:
https://gitlab.com/RicardoMartincoski/buildroot/-/pipelines/706073924
---
 DEVELOPERS                             |   2 +
 support/misc/gitlab-ci.yml.in          |   8 +
 support/scripts/generate-gitlab-ci-yml |   2 +-
 utils/check-symbols                    |  78 +++++
 utils/checksymbolslib/__init__.py      |   0
 utils/checksymbolslib/br.py            | 140 ++++++++
 utils/checksymbolslib/db.py            | 205 ++++++++++++
 utils/checksymbolslib/file.py          |  83 +++++
 utils/checksymbolslib/kconfig.py       | 139 ++++++++
 utils/checksymbolslib/makefile.py      | 100 ++++++
 utils/checksymbolslib/test_db.py       | 286 ++++++++++++++++
 utils/checksymbolslib/test_file.py     | 152 +++++++++
 utils/checksymbolslib/test_kconfig.py  | 438 +++++++++++++++++++++++++
 utils/checksymbolslib/test_makefile.py | 304 +++++++++++++++++
 utils/checksymbolslib/test_util.py     |  15 +
 15 files changed, 1951 insertions(+), 1 deletion(-)
 create mode 100755 utils/check-symbols
 create mode 100644 utils/checksymbolslib/__init__.py
 create mode 100644 utils/checksymbolslib/br.py
 create mode 100644 utils/checksymbolslib/db.py
 create mode 100644 utils/checksymbolslib/file.py
 create mode 100644 utils/checksymbolslib/kconfig.py
 create mode 100644 utils/checksymbolslib/makefile.py
 create mode 100644 utils/checksymbolslib/test_db.py
 create mode 100644 utils/checksymbolslib/test_file.py
 create mode 100644 utils/checksymbolslib/test_kconfig.py
 create mode 100644 utils/checksymbolslib/test_makefile.py
 create mode 100644 utils/checksymbolslib/test_util.py

diff --git a/DEVELOPERS b/DEVELOPERS
index ab9cfe5ee9..889d622cdb 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2522,7 +2522,9 @@ F:	support/testing/run-tests
 F:	support/testing/tests/package/test_atop.py
 F:	support/testing/tests/utils/test_check_package.py
 F:	utils/check-package
+F:	utils/check-symbols
 F:	utils/checkpackagelib/
+F:	utils/checksymbolslib/
 F:	utils/docker-run
 
 N:	Richard Braun <rbraun@sceen.net>
diff --git a/support/misc/gitlab-ci.yml.in b/support/misc/gitlab-ci.yml.in
index 3ac988a519..0ccf36665e 100644
--- a/support/misc/gitlab-ci.yml.in
+++ b/support/misc/gitlab-ci.yml.in
@@ -2,6 +2,10 @@
     script:
         - python3 -m pytest -v utils/checkpackagelib/
 
+.check-check-symbol_base:
+    script:
+        - python3 -m pytest -v utils/checksymbolslib/
+
 .check-DEVELOPERS_base:
     script:
         - utils/get-developers -v
@@ -14,6 +18,10 @@
     script:
         - make check-package
 
+.check-symbol_base:
+    script:
+        - utils/check-symbols
+
 .defconfig_check:
     before_script:
         - DEFCONFIG_NAME=$(echo ${CI_JOB_NAME} | sed -e 's,_check$,,g')
diff --git a/support/scripts/generate-gitlab-ci-yml b/support/scripts/generate-gitlab-ci-yml
index 27f586f1b6..e2fb2228b3 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 check-symbol DEVELOPERS flake8 package symbol )
 
     defconfigs=( $(cd configs; LC_ALL=C ls -1 *_defconfig) )
 
diff --git a/utils/check-symbols b/utils/check-symbols
new file mode 100755
index 0000000000..ba2e760b59
--- /dev/null
+++ b/utils/check-symbols
@@ -0,0 +1,78 @@
+#!/usr/bin/env python3
+
+import argparse
+import os
+import sys
+
+import checksymbolslib.file as file
+from checksymbolslib.db import DB
+
+
+def parse_args():
+    parser = argparse.ArgumentParser()
+    parser.add_argument('--search', action='store', default=None,
+                        help='print all symbols matching a given regular expression')
+    return parser.parse_args()
+
+
+def change_current_dir():
+    base_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
+    os.chdir(base_dir)
+
+
+def get_full_db(files_to_process):
+    db = DB()
+    for f in files_to_process:
+        file.populate_db_from_file(db, f)
+    return db
+
+
+def print_filenames_with_pattern(all_files, files_to_process, pattern):
+    ignored_filenames = file.get_list_of_filenames_with_pattern(all_files, files_to_process, pattern)
+    processed_filenames = file.get_list_of_filenames_with_pattern(files_to_process, [], pattern)
+    print('========== filenames found with pattern "{}": {}'.format(pattern, len(processed_filenames)))
+    for f in processed_filenames:
+        print(f)
+    print('========== ignored filenames with pattern "{}": {}'.format(pattern, len(ignored_filenames)))
+    for f in ignored_filenames:
+        print(f)
+
+
+def print_symbols_with_pattern(db, pattern):
+    symbols = db.get_symbols_with_pattern(pattern)
+    print('========== symbols with pattern "{}": {}'.format(pattern, len(symbols)))
+    for s in symbols:
+        print(s, str(symbols[s]))
+
+
+def __main__():
+    flags = parse_args()
+
+    change_current_dir()
+    all_files = file.get_list_of_files_in_the_repo()
+    files_to_process = file.get_list_of_files_to_process(all_files)
+    db = get_full_db(files_to_process)
+
+    if flags.search:
+        print_filenames_with_pattern(all_files, files_to_process, flags.search)
+        print_symbols_with_pattern(db, flags.search)
+        print('========== warnings:')
+
+    warnings = []
+    warnings += db.get_warnings_for_choices_selected()
+    warnings += db.get_warnings_for_legacy_symbols_being_defined()
+    warnings += db.get_warnings_for_legacy_symbols_being_used()
+    warnings += db.get_warnings_for_symbols_with_legacy_note_and_no_comment_on_usage()
+    warnings += db.get_warnings_for_symbols_with_legacy_note_and_no_usage()
+    warnings += db.get_warnings_for_symbols_without_definition()
+    warnings += db.get_warnings_for_symbols_without_usage()
+
+    for filename, lineno, msg in sorted(warnings):
+        print('{}:{}: {}'.format(filename, lineno, msg))
+
+    if len(warnings) > 0:
+        sys.exit(1)
+
+
+if __name__ == '__main__':
+    __main__()
diff --git a/utils/checksymbolslib/__init__.py b/utils/checksymbolslib/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/utils/checksymbolslib/br.py b/utils/checksymbolslib/br.py
new file mode 100644
index 0000000000..846a609829
--- /dev/null
+++ b/utils/checksymbolslib/br.py
@@ -0,0 +1,140 @@
+import os
+import re
+
+
+ignored_directories = [
+    'support/testing/',
+]
+# Makefile
+symbols_used_only_in_source_code = [
+    'BR2_USE_CCACHE',
+]
+# package/skeleton/Config.in
+symbols_used_only_for_host_variant = [
+    'BR2_PACKAGE_SKELETON',
+]
+# Makefile
+# package/pkg-generic.mk
+symbols_defined_only_at_command_line = [
+    'BR2_GRAPH_ALT',
+    'BR2_GRAPH_DEPS_OPTS',
+    'BR2_GRAPH_DOT_OPTS',
+    'BR2_GRAPH_OUT',
+    'BR2_GRAPH_SIZE_OPTS',
+    'BR2_INSTRUMENTATION_SCRIPTS',
+]
+# Makefile
+symbols_defined_only_when_using_br2_external = [
+    'BR2_EXTERNAL',
+    'BR2_EXTERNAL_DIRS',
+    'BR2_EXTERNAL_MKS',
+    'BR2_EXTERNAL_NAMES',
+]
+# boot/barebox/barebox.mk
+symbols_defined_only_for_barebox_variant = [
+    'BR2_TARGET_BAREBOX_AUX_BAREBOXENV',
+]
+# toolchain/toolchain/toolchain.mk
+# toolchain/toolchain-buildroot/toolchain-buildroot.mk
+symbols_not_defined_for_fake_virtual_packages = [
+    'BR2_PACKAGE_HAS_TOOLCHAIN',
+    'BR2_PACKAGE_HAS_TOOLCHAIN_BUILDROOT',
+    'BR2_PACKAGE_PROVIDES_TOOLCHAIN',
+    'BR2_PACKAGE_PROVIDES_TOOLCHAIN_BUILDROOT',
+]
+# fs/common.mk
+suffixes_not_defined_for_all_rootfs_types = [
+    '_BZIP2',
+    '_GZIP',
+    '_LZ4',
+    '_LZMA',
+    '_LZO',
+    '_XZ',
+    '_ZSTD',
+]
+# fs/common.mk
+rootfs_prefix = 'BR2_TARGET_ROOTFS_'
+# package/pkg-generic.mk
+package_prefix = 'BR2_PACKAGE_'
+# package/pkg-generic.mk
+boot_prefix = 'BR2_TARGET_'
+# package/pkg-generic.mk
+toolchain_prefix = 'BR2_'
+# boot/barebox/barebox.mk
+barebox_infra_suffixes = [
+    '',
+    '_BAREBOXENV',
+    '_BOARD_DEFCONFIG',
+    '_CONFIG_FRAGMENT_FILES',
+    '_CUSTOM_CONFIG_FILE',
+    '_CUSTOM_EMBEDDED_ENV_PATH',
+    '_CUSTOM_ENV',
+    '_CUSTOM_ENV_PATH',
+    '_IMAGE_FILE',
+    '_USE_CUSTOM_CONFIG',
+    '_USE_DEFCONFIG',
+]
+re_kconfig_symbol = re.compile(r'\b(BR2_\w+)\b')
+# Example lines to be handled:
+# config BR2_TOOLCHAIN_EXTERNAL_PREFIX
+# menuconfig BR2_PACKAGE_GST1_PLUGINS_BASE
+re_kconfig_config = re.compile(r'^\s*(menu|)config\s+(BR2_\w+)')
+# Example lines to be handled:
+# default "uclibc" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC
+# default BR2_TARGET_GRUB2_BUILTIN_MODULES if BR2_TARGET_GRUB2_BUILTIN_MODULES != ""
+# default y if BR2_HOSTARCH = "powerpc"
+re_kconfig_default = re.compile(r'^\s*default\s')
+re_kconfig_default_before_conditional = re.compile(r'^.*\bif\b')
+re_kconfig_default_legacy_comment = re.compile(r'#\s*legacy')
+# Example lines to be handled:
+# depends on !(BR2_TOOLCHAIN_USES_GLIBC && BR2_TOOLCHAIN_USES_MUSL)
+# depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+re_kconfig_depends = re.compile(r'^\s*depends on\s')
+# Example lines to be handled:
+# select BR2_PACKAGE_HOST_NODEJS if BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL != ""
+# select BR2_PACKAGE_LIBDRM if !(BR2_arm && BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_FB)
+# select BR2_PACKAGE_OPENSSL if !(BR2_PACKAGE_GNUTLS || BR2_PACKAGE_MBEDTLS)
+re_kconfig_select = re.compile(r'^\s*select\s')
+re_kconfig_select_conditional = re.compile(r'\bif\s.*')
+# Example lines to be handled:
+# if !BR2_SKIP_LEGACY
+# if (BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51 || BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53)
+# if BR2_PACKAGE_HAS_LUAINTERPRETER && !BR2_STATIC_LIBS
+# if BR2_PACKAGE_QEMU_CUSTOM_TARGETS = ""
+re_kconfig_if = re.compile(r'^\s*if\s')
+# Example lines to be handled:
+# source "$BR2_BASE_DIR/.br2-external.in.jpeg"
+re_kconfig_source = re.compile(r'^\s*source\b')
+
+re_kconfig_choice = re.compile(r'^\s*choice\b')
+re_kconfig_endchoice = re.compile(r'^\s*endchoice\b')
+re_makefile_eval = re.compile(r'^\s*\$\(eval\b')
+re_menu = re.compile(r'^\s*menu\b')
+re_endmenu = re.compile(r'^\s*endmenu\b')
+re_comments = re.compile(r'#.*$')
+re_legacy_special_comment = re.compile(r'#.*(BR2_\w+)\s.*still referenced')
+re_host_symbol = re.compile(r'(BR2_PACKAGE_HOST_\w+|BR2_PACKAGE_HAS_HOST_\w+)')
+re_makefile_symbol_usage = re.compile(r'\$\((BR2_\w+)\)')
+re_makefile_symbol_export = re.compile(r'export\s*(BR2_\w+)')
+re_makefile_symbol_attribution = re.compile(r'^\s*(BR2_\w+)\s*[?:=]')
+
+
+def get_package_from_filename(filename):
+    package = os.path.basename(filename)[:-3].upper().replace('-', '_')
+    return package
+
+
+def is_an_optional_symbol_for_a_roofts(symbol):
+    if not symbol.startswith(rootfs_prefix):
+        return False
+    for sufix in suffixes_not_defined_for_all_rootfs_types:
+        if symbol.endswith(sufix):
+            return True
+    return False
+
+
+def file_belongs_to_an_ignored_diretory(filename):
+    for d in ignored_directories:
+        if filename.startswith(d):
+            return True
+    return False
diff --git a/utils/checksymbolslib/db.py b/utils/checksymbolslib/db.py
new file mode 100644
index 0000000000..71b1e9e816
--- /dev/null
+++ b/utils/checksymbolslib/db.py
@@ -0,0 +1,205 @@
+import re
+
+import checksymbolslib.br as br
+
+
+choice = 'part of a choice'
+definition = 'definition'
+helper = 'possible config helper'
+legacy_definition = 'legacy definition'
+legacy_note = 'legacy note'
+legacy_usage = 'legacy usage'
+select = 'selected'
+usage = 'normal usage'
+usage_in_legacy = 'usage inside legacy'
+virtual = 'virtual'
+
+
+class DB:
+    def __init__(self):
+        self.all_symbols = {}
+
+    def __str__(self):
+        return str(self.all_symbols)
+
+    def add_symbol_entry(self, symbol, filename, lineno, entry_type):
+        if symbol not in self.all_symbols:
+            self.all_symbols[symbol] = {}
+        if entry_type not in self.all_symbols[symbol]:
+            self.all_symbols[symbol][entry_type] = {}
+        if filename not in self.all_symbols[symbol][entry_type]:
+            self.all_symbols[symbol][entry_type][filename] = []
+        self.all_symbols[symbol][entry_type][filename].append(lineno)
+
+    def add_symbol_choice(self, symbol, filename, lineno):
+        self.add_symbol_entry(symbol, filename, lineno, choice)
+
+    def add_symbol_definition(self, symbol, filename, lineno):
+        self.add_symbol_entry(symbol, filename, lineno, definition)
+
+    def add_symbol_helper(self, symbol, filename, lineno):
+        self.add_symbol_entry(symbol, filename, lineno, helper)
+
+    def add_symbol_legacy_definition(self, symbol, filename, lineno):
+        self.add_symbol_entry(symbol, filename, lineno, legacy_definition)
+
+    def add_symbol_legacy_note(self, symbol, filename, lineno):
+        self.add_symbol_entry(symbol, filename, lineno, legacy_note)
+
+    def add_symbol_legacy_usage(self, symbol, filename, lineno):
+        self.add_symbol_entry(symbol, filename, lineno, legacy_usage)
+
+    def add_symbol_select(self, symbol, filename, lineno):
+        self.add_symbol_entry(symbol, filename, lineno, select)
+
+    def add_symbol_usage(self, symbol, filename, lineno):
+        self.add_symbol_entry(symbol, filename, lineno, usage)
+
+    def add_symbol_usage_in_legacy(self, symbol, filename, lineno):
+        self.add_symbol_entry(symbol, filename, lineno, usage_in_legacy)
+
+    def add_symbol_virtual(self, symbol, filename, lineno):
+        self.add_symbol_entry(symbol, filename, lineno, virtual)
+
+    def get_symbols_with_pattern(self, pattern):
+        re_pattern = re.compile(r'{}'.format(pattern))
+        found_symbols = {}
+        for symbol, entries in self.all_symbols.items():
+            if not re_pattern.search(symbol):
+                continue
+            found_symbols[symbol] = entries
+        return found_symbols
+
+    def get_warnings_for_choices_selected(self):
+        warnings = []
+        for symbol, entries in self.all_symbols.items():
+            if choice not in entries:
+                continue
+            if select not in entries:
+                continue
+            all_items = []
+            all_items += entries.get(select, {}).items()
+            for filename, linenos in all_items:
+                for lineno in linenos:
+                    msg = '{} is part of a "choice" and should not be "select"ed'.format(symbol)
+                    warnings.append((filename, lineno, msg))
+        return warnings
+
+    def get_warnings_for_legacy_symbols_being_used(self):
+        warnings = []
+        for symbol, entries in self.all_symbols.items():
+            if legacy_definition not in entries:
+                continue
+            if usage not in entries:
+                continue
+            all_items = []
+            all_items += entries.get(usage, {}).items()
+            for filename, linenos in all_items:
+                for lineno in linenos:
+                    msg = '{} is a legacy symbol and should not be referenced'.format(symbol)
+                    warnings.append((filename, lineno, msg))
+        return warnings
+
+    def get_warnings_for_legacy_symbols_being_defined(self):
+        warnings = []
+        for symbol, entries in self.all_symbols.items():
+            if legacy_definition not in entries:
+                continue
+            if definition not in entries:
+                continue
+            all_items = []
+            all_items += entries.get(definition, {}).items()
+            for filename, linenos in all_items:
+                for lineno in linenos:
+                    msg = '{} is a legacy symbol and should not be redefined'.format(symbol)
+                    warnings.append((filename, lineno, msg))
+        return warnings
+
+    def get_warnings_for_symbols_without_definition(self):
+        warnings = []
+        for symbol, entries in self.all_symbols.items():
+            if definition in entries:
+                continue
+            if legacy_definition in entries:
+                continue
+            if br.re_host_symbol.search(symbol):
+                continue
+            if br.is_an_optional_symbol_for_a_roofts(symbol):
+                continue
+            if symbol in br.symbols_defined_only_at_command_line:
+                continue
+            if symbol in br.symbols_defined_only_when_using_br2_external:
+                continue
+            if symbol in br.symbols_defined_only_for_barebox_variant:
+                continue
+            if symbol in br.symbols_not_defined_for_fake_virtual_packages:
+                continue
+            if virtual in entries:
+                continue
+            all_items = []
+            all_items += entries.get(usage, {}).items()
+            all_items += entries.get(legacy_usage, {}).items()
+            all_items += entries.get(usage_in_legacy, {}).items()
+            for filename, linenos in all_items:
+                for lineno in linenos:
+                    msg = '{} referenced but not defined'.format(symbol)
+                    warnings.append((filename, lineno, msg))
+        return warnings
+
+    def get_warnings_for_symbols_without_usage(self):
+        warnings = []
+        for symbol, entries in self.all_symbols.items():
+            if usage in entries:
+                continue
+            if usage_in_legacy in entries:
+                continue
+            if legacy_usage in entries:
+                continue
+            if symbol in br.symbols_used_only_in_source_code:
+                continue
+            if symbol in br.symbols_used_only_for_host_variant:
+                continue
+            if helper in entries:
+                continue
+            if choice in entries:
+                continue
+            all_items = []
+            all_items += entries.get(definition, {}).items()
+            all_items += entries.get(legacy_definition, {}).items()
+            for filename, linenos in all_items:
+                for lineno in linenos:
+                    msg = '{} defined but not referenced'.format(symbol)
+                    warnings.append((filename, lineno, msg))
+        return warnings
+
+    def get_warnings_for_symbols_with_legacy_note_and_no_comment_on_usage(self):
+        warnings = []
+        for symbol, entries in self.all_symbols.items():
+            if legacy_note not in entries:
+                continue
+            if legacy_usage in entries:
+                continue
+            all_items = []
+            all_items += entries.get(usage, {}).items()
+            for filename, linenos in all_items:
+                for lineno in linenos:
+                    msg = '{} missing "# legacy"'.format(symbol)
+                    warnings.append((filename, lineno, msg))
+        return warnings
+
+    def get_warnings_for_symbols_with_legacy_note_and_no_usage(self):
+        warnings = []
+        for symbol, entries in self.all_symbols.items():
+            if legacy_note not in entries:
+                continue
+            if legacy_usage in entries:
+                continue
+            if usage in entries:
+                continue
+            all_items = []
+            all_items += entries.get(legacy_note, {}).items()
+            for filename, linenos in all_items:
+                for lineno in linenos:
+                    msg = '{} not referenced but has a comment stating it is'.format(symbol)
+                    warnings.append((filename, lineno, msg))
+        return warnings
diff --git a/utils/checksymbolslib/file.py b/utils/checksymbolslib/file.py
new file mode 100644
index 0000000000..0d3315bdc7
--- /dev/null
+++ b/utils/checksymbolslib/file.py
@@ -0,0 +1,83 @@
+import re
+import subprocess
+
+import checksymbolslib.br as br
+import checksymbolslib.kconfig as kconfig
+import checksymbolslib.makefile as makefile
+
+
+file_types = [
+    kconfig,
+    makefile,
+]
+
+
+def get_list_of_files_in_the_repo():
+    cmd = ['git', 'ls-files']
+    p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+    stdout = p.communicate()[0]
+    processed_output = [str(line.decode().rstrip()) for line in stdout.splitlines() if line]
+    return processed_output
+
+
+def get_list_of_files_to_process(all_files):
+    files_to_process = []
+    for f in all_files:
+        if br.file_belongs_to_an_ignored_diretory(f):
+            continue
+        for t in file_types:
+            if t.check_filename(f):
+                files_to_process.append(f)
+                break
+    return files_to_process
+
+
+def get_list_of_filenames_with_pattern(all_files, exclude_list, pattern):
+    re_pattern = re.compile(r'{}'.format(pattern))
+    matching_filenames = []
+    for filename in all_files:
+        if re_pattern.search(filename):
+            if filename not in exclude_list:
+                matching_filenames.append(filename)
+    return matching_filenames
+
+
+def read_file(filename):
+    file_content_raw = []
+    with open(filename, 'r', errors='surrogateescape') as f:
+        for lineno, text in enumerate(f.readlines()):
+            file_content_raw.append([lineno + 1, text])
+    return file_content_raw
+
+
+def cleanup_file_content(file_content_raw):
+    cleaned_up_content = []
+    continuation = False
+    last_line = None
+    first_lineno = None
+    for cur_lineno, cur_line in file_content_raw:
+        if continuation:
+            line = last_line + cur_line
+            lineno = first_lineno
+        else:
+            line = cur_line
+            lineno = cur_lineno
+        continuation = False
+        last_line = None
+        first_lineno = None
+        clean_line = line.rstrip('\n')
+        if clean_line.endswith('\\'):
+            continuation = True
+            last_line = clean_line.rstrip('\\')
+            first_lineno = lineno
+            continue
+        cleaned_up_content.append([lineno, clean_line])
+    return cleaned_up_content
+
+
+def populate_db_from_file(db, filename):
+    file_content_raw = read_file(filename)
+    file_content_to_process = cleanup_file_content(file_content_raw)
+    for t in file_types:
+        if t.check_filename(filename):
+            t.populate_db(db, filename, file_content_to_process)
diff --git a/utils/checksymbolslib/kconfig.py b/utils/checksymbolslib/kconfig.py
new file mode 100644
index 0000000000..9ad6030305
--- /dev/null
+++ b/utils/checksymbolslib/kconfig.py
@@ -0,0 +1,139 @@
+import os
+
+import checksymbolslib.br as br
+
+
+def all_symbols_from(line):
+    clean_line = br.re_comments.sub('', line)
+    symbols = br.re_kconfig_symbol.findall(clean_line)
+    return symbols
+
+
+def handle_definition(db, filename, lineno, line, legacy):
+    for symbol in all_symbols_from(line):
+        if legacy:
+            db.add_symbol_legacy_definition(symbol, filename, lineno)
+        else:
+            db.add_symbol_definition(symbol, filename, lineno)
+
+
+def handle_usage(db, filename, lineno, line, legacy):
+    for symbol in all_symbols_from(line):
+        if legacy:
+            db.add_symbol_usage_in_legacy(symbol, filename, lineno)
+        else:
+            db.add_symbol_usage(symbol, filename, lineno)
+
+
+def handle_default(db, filename, lineno, line, legacy):
+    if legacy:
+        handle_usage(db, filename, lineno, line, legacy)
+        return
+    if not br.re_kconfig_default_legacy_comment.search(line):
+        handle_usage(db, filename, lineno, line, legacy)
+        return
+    after = br.re_kconfig_default_before_conditional.sub('', line)
+    for symbol in all_symbols_from(after):
+        db.add_symbol_legacy_usage(symbol, filename, lineno)
+
+
+def handle_select(db, filename, lineno, line, legacy):
+    handle_usage(db, filename, lineno, line, legacy)
+    before = br.re_kconfig_select_conditional.sub('', line)
+    for symbol in all_symbols_from(before):
+        db.add_symbol_select(symbol, filename, lineno)
+
+
+line_type_handlers = {
+    br.re_kconfig_config: handle_definition,
+    br.re_kconfig_default: handle_default,
+    br.re_kconfig_depends: handle_usage,
+    br.re_kconfig_if: handle_usage,
+    br.re_kconfig_select: handle_select,
+    br.re_kconfig_source: handle_usage,
+}
+
+
+def handle_line(db, filename, lineno, line, legacy):
+    if not br.re_kconfig_symbol.search(line):
+        return
+
+    for regexp, line_type_handler in line_type_handlers.items():
+        if regexp.search(line):
+            line_type_handler(db, filename, lineno, line, legacy)
+
+
+def handle_config_helper(db, filename, file_content):
+    symbol = None
+    lineno = None
+    state = 'none'
+    for cur_lineno, line in file_content:
+        if state == 'none':
+            m = br.re_kconfig_config.search(line)
+            if m is not None:
+                symbol = m.group(2)
+                lineno = cur_lineno
+                state = 'config'
+            continue
+        if state == 'config':
+            if br.re_kconfig_select.search(line):
+                db.add_symbol_helper(symbol, filename, lineno)
+                state = 'none'
+                continue
+            m = br.re_kconfig_config.search(line)
+            if m is not None:
+                symbol = m.group(2)
+                lineno = cur_lineno
+            continue
+
+
+def handle_config_choice(db, filename, file_content):
+    state = 'none'
+    for lineno, line in file_content:
+        if state == 'none':
+            if br.re_kconfig_choice.search(line):
+                state = 'choice'
+                continue
+        if state == 'choice':
+            if br.re_kconfig_endchoice.search(line):
+                state = 'none'
+                continue
+            m = br.re_kconfig_config.search(line)
+            if m is not None:
+                symbol = m.group(2)
+                db.add_symbol_choice(symbol, filename, lineno)
+                continue
+
+
+def handle_note(db, filename, file_content):
+    state = 'none'
+    for lineno, line in file_content:
+        if state == 'none':
+            if br.re_menu.search(line):
+                state = 'menu'
+                continue
+        if state == 'menu':
+            if br.re_endmenu.search(line):
+                state = 'none'
+                continue
+            m = br.re_legacy_special_comment.search(line)
+            if m is not None:
+                symbol = m.group(1)
+                db.add_symbol_legacy_note(symbol, filename, lineno)
+                continue
+
+
+def populate_db(db, filename, file_content):
+    legacy = filename.endswith('.legacy')
+    for lineno, line in file_content:
+        handle_line(db, filename, lineno, line, legacy)
+    handle_config_helper(db, filename, file_content)
+    handle_config_choice(db, filename, file_content)
+    if legacy:
+        handle_note(db, filename, file_content)
+
+
+def check_filename(filename):
+    if os.path.basename(filename).startswith('Config.'):
+        return True
+    return False
diff --git a/utils/checksymbolslib/makefile.py b/utils/checksymbolslib/makefile.py
new file mode 100644
index 0000000000..e3894dd1f9
--- /dev/null
+++ b/utils/checksymbolslib/makefile.py
@@ -0,0 +1,100 @@
+import checksymbolslib.br as br
+
+
+def handle_eval(db, filename, lineno, line):
+    def add_multiple_symbol_usages(package, prefixes=None, suffixes=None):
+        for prefix in prefixes or ['']:
+            for sufix in suffixes or ['']:
+                symbol = prefix + package + sufix
+                db.add_symbol_usage(symbol, filename, lineno)
+
+    package = br.get_package_from_filename(filename)
+    if '$(rootfs)' in line:
+        suffixes = [''] + br.suffixes_not_defined_for_all_rootfs_types
+        add_multiple_symbol_usages(package, prefixes=[br.rootfs_prefix], suffixes=suffixes)
+        return
+    if '$(kernel-module)' in line:
+        add_multiple_symbol_usages(package, prefixes=[br.package_prefix])
+        return
+    if '$(barebox-package)' in line:
+        add_multiple_symbol_usages(package, prefixes=[br.boot_prefix], suffixes=br.barebox_infra_suffixes)
+        return
+
+    if '-package)' not in line:
+        return
+    if package == 'LINUX':
+        # very special case at package/pkg-generic.mk
+        add_multiple_symbol_usages('BR2_LINUX_KERNEL')
+        return
+
+    # mimic package/pkg-generic.mk and package/pkg-virtual.mk
+    if '$(virtual-' in line:
+        prefixes = ['BR2_PACKAGE_PROVIDES_', 'BR2_PACKAGE_HAS_']
+        if filename.startswith('toolchain/'):
+            prefix = br.toolchain_prefix
+        else:
+            prefix = br.package_prefix
+        symbol = prefix + package
+        db.add_symbol_virtual(symbol, filename, lineno)
+        prefixes.append(prefix)
+    elif '$(host-virtual-' in line:
+        prefixes = ['BR2_PACKAGE_HOST_', 'BR2_PACKAGE_PROVIDES_HOST_', 'BR2_PACKAGE_HAS_HOST_']
+    elif '$(host-' in line:
+        prefixes = ['BR2_PACKAGE_HOST_']
+    elif filename.startswith('boot/'):
+        prefixes = [br.boot_prefix]
+    elif filename.startswith('toolchain/'):
+        prefixes = [br.toolchain_prefix]
+    elif '$(toolchain-' in line:
+        prefixes = [br.toolchain_prefix]
+    else:
+        prefixes = [br.package_prefix]
+
+    add_multiple_symbol_usages(package, prefixes=prefixes)
+
+
+def handle_definition(db, filename, lineno, line, legacy):
+    symbols = br.re_makefile_symbol_attribution.findall(line)
+    symbols += br.re_makefile_symbol_export.findall(line)
+    for symbol in symbols:
+        if legacy:
+            db.add_symbol_legacy_definition(symbol, filename, lineno)
+        else:
+            db.add_symbol_definition(symbol, filename, lineno)
+
+
+def handle_usage(db, filename, lineno, line, legacy):
+    if br.re_makefile_eval.search(line):
+        handle_eval(db, filename, lineno, line)
+        return
+
+    symbols = br.re_makefile_symbol_usage.findall(line)
+    for symbol in symbols:
+        if legacy:
+            db.add_symbol_usage_in_legacy(symbol, filename, lineno)
+        else:
+            db.add_symbol_usage(symbol, filename, lineno)
+
+
+def populate_db(db, filename, file_content):
+    legacy = filename.endswith('.legacy')
+    for lineno, raw_line in file_content:
+        line = br.re_comments.sub('', raw_line)
+        handle_definition(db, filename, lineno, line, legacy)
+        handle_usage(db, filename, lineno, line, legacy)
+
+
+def check_filename(filename):
+    if filename.endswith('.mk'):
+        return True
+    if filename.endswith('.mk.in'):
+        return True
+    if filename.startswith('arch/arch.mk.'):
+        return True
+    if filename in [
+            'Makefile',
+            'Makefile.legacy',
+            'package/Makefile.in'
+            ]:
+        return True
+    return False
diff --git a/utils/checksymbolslib/test_db.py b/utils/checksymbolslib/test_db.py
new file mode 100644
index 0000000000..15576fa897
--- /dev/null
+++ b/utils/checksymbolslib/test_db.py
@@ -0,0 +1,286 @@
+import checksymbolslib.db as m
+
+
+def test_empty_db():
+    db = m.DB()
+    assert str(db) == '{}'
+
+
+def test_one_definition():
+    db = m.DB()
+    db.add_symbol_definition('BR2_foo', 'foo/Config.in', 7)
+    assert str(db) == str({
+        'BR2_foo': {'definition': {'foo/Config.in': [7]}},
+        })
+
+
+def test_three_definitions():
+    db = m.DB()
+    db.add_symbol_definition('BR2_foo', 'foo/Config.in', 7)
+    db.add_symbol_definition('BR2_foo', 'foo/Config.in', 9)
+    db.add_symbol_definition('BR2_bar', 'bar/Config.in', 5)
+    assert str(db) == str({
+        'BR2_foo': {'definition': {'foo/Config.in': [7, 9]}},
+        'BR2_bar': {'definition': {'bar/Config.in': [5]}},
+        })
+
+
+def test_definition_and_usage():
+    db = m.DB()
+    db.add_symbol_definition('BR2_foo', 'foo/Config.in', 7)
+    db.add_symbol_usage('BR2_foo', 'foo/Config.in', 9)
+    assert str(db) == str({
+        'BR2_foo': {'definition': {'foo/Config.in': [7]}, 'normal usage': {'foo/Config.in': [9]}},
+        })
+
+
+def test_all_entry_types():
+    db = m.DB()
+    db.add_symbol_choice('BR2_foo', 'foo/Config.in', 7)
+    db.add_symbol_definition('BR2_foo', 'foo/Config.in', 7)
+    db.add_symbol_definition('BR2_bar', 'bar/Config.in', 700)
+    db.add_symbol_helper('BR2_bar', 'bar/Config.in', 700)
+    db.add_symbol_legacy_definition('BR2_baz', 'Config.in.legacy', 7000)
+    db.add_symbol_legacy_note('BR2_baz', 'Config.in.legacy', 7001)
+    db.add_symbol_legacy_usage('BR2_bar', 'Config.in.legacy', 7001)
+    db.add_symbol_select('BR2_bar', 'Config.in.legacy', 7001)
+    db.add_symbol_usage('BR2_foo', 'foo/Config.in', 9)
+    db.add_symbol_usage_in_legacy('BR2_bar', 'Config.in.legacy', 9)
+    db.add_symbol_virtual('BR2_foo', 'foo/Config.in', 7)
+    assert str(db) == str({
+        'BR2_foo': {
+            'part of a choice': {'foo/Config.in': [7]},
+            'definition': {'foo/Config.in': [7]},
+            'normal usage': {'foo/Config.in': [9]},
+            'virtual': {'foo/Config.in': [7]}},
+        'BR2_bar': {
+            'definition': {'bar/Config.in': [700]},
+            'possible config helper': {'bar/Config.in': [700]},
+            'legacy usage': {'Config.in.legacy': [7001]},
+            'selected': {'Config.in.legacy': [7001]},
+            'usage inside legacy': {'Config.in.legacy': [9]}},
+        'BR2_baz': {
+            'legacy definition': {'Config.in.legacy': [7000]},
+            'legacy note': {'Config.in.legacy': [7001]}},
+        })
+
+
+def test_get_symbols_with_pattern():
+    db = m.DB()
+    db.add_symbol_definition('BR2_foo', 'foo/Config.in', 7)
+    db.add_symbol_usage('BR2_foo', 'foo/Config.in', 9)
+    db.add_symbol_definition('BR2_bar', 'bar/Config.in', 5)
+    assert str(db) == str({
+        'BR2_foo': {'definition': {'foo/Config.in': [7]}, 'normal usage': {'foo/Config.in': [9]}},
+        'BR2_bar': {'definition': {'bar/Config.in': [5]}},
+        })
+    symbols = db.get_symbols_with_pattern('foo')
+    assert str(symbols) == str({
+        'BR2_foo': {'definition': {'foo/Config.in': [7]}, 'normal usage': {'foo/Config.in': [9]}},
+        })
+    symbols = db.get_symbols_with_pattern('FOO')
+    assert str(symbols) == str({
+        })
+    symbols = db.get_symbols_with_pattern('foo|FOO')
+    assert str(symbols) == str({
+        'BR2_foo': {'definition': {'foo/Config.in': [7]}, 'normal usage': {'foo/Config.in': [9]}},
+        })
+    symbols = db.get_symbols_with_pattern('^foo')
+    assert str(symbols) == str({
+        })
+    symbols = db.get_symbols_with_pattern('foo|bar')
+    assert str(symbols) == str({
+        'BR2_foo': {'definition': {'foo/Config.in': [7]}, 'normal usage': {'foo/Config.in': [9]}},
+        'BR2_bar': {'definition': {'bar/Config.in': [5]}},
+        })
+
+
+def test_get_warnings_for_choices_selected():
+    db = m.DB()
+    db.add_symbol_choice('BR2_foo', 'foo/Config.in', 1)
+    db.add_symbol_choice('BR2_bar', 'bar/Config.in', 1)
+    db.add_symbol_select('BR2_foo', 'bar/Config.in', 2)
+    assert str(db) == str({
+        'BR2_foo': {'part of a choice': {'foo/Config.in': [1]}, 'selected': {'bar/Config.in': [2]}},
+        'BR2_bar': {'part of a choice': {'bar/Config.in': [1]}},
+        })
+    warnings = db.get_warnings_for_choices_selected()
+    assert warnings == [
+        ('bar/Config.in', 2, 'BR2_foo is part of a "choice" and should not be "select"ed'),
+        ]
+
+
+def test_get_warnings_for_legacy_symbols_being_used():
+    db = m.DB()
+    db.add_symbol_legacy_definition('BR2_foo', 'Config.in.legacy', 1)
+    db.add_symbol_usage('BR2_foo', 'bar/Config.in', 2)
+    db.add_symbol_legacy_definition('BR2_bar', 'Config.in.legacy', 10)
+    db.add_symbol_usage_in_legacy('BR2_bar', 'Config.in.legacy', 11)
+    assert str(db) == str({
+        'BR2_foo': {'legacy definition': {'Config.in.legacy': [1]}, 'normal usage': {'bar/Config.in': [2]}},
+        'BR2_bar': {'legacy definition': {'Config.in.legacy': [10]}, 'usage inside legacy': {'Config.in.legacy': [11]}},
+        })
+    warnings = db.get_warnings_for_legacy_symbols_being_used()
+    assert warnings == [
+        ('bar/Config.in', 2, 'BR2_foo is a legacy symbol and should not be referenced'),
+        ]
+
+
+def test_get_warnings_for_legacy_symbols_being_defined():
+    db = m.DB()
+    db.add_symbol_legacy_definition('BR2_foo', 'Config.in.legacy', 1)
+    db.add_symbol_legacy_definition('BR2_bar', 'Config.in.legacy', 10)
+    db.add_symbol_definition('BR2_foo', 'foo/Config.in', 7)
+    db.add_symbol_definition('BR2_foo', 'foo/Config.in', 8)
+    assert str(db) == str({
+        'BR2_foo': {'legacy definition': {'Config.in.legacy': [1]}, 'definition': {'foo/Config.in': [7, 8]}},
+        'BR2_bar': {'legacy definition': {'Config.in.legacy': [10]}},
+        })
+    warnings = db.get_warnings_for_legacy_symbols_being_defined()
+    assert warnings == [
+        ('foo/Config.in', 7, 'BR2_foo is a legacy symbol and should not be redefined'),
+        ('foo/Config.in', 8, 'BR2_foo is a legacy symbol and should not be redefined'),
+        ]
+
+
+def test_get_warnings_for_symbols_without_definition():
+    db = m.DB()
+    db.add_symbol_definition('BR2_foo', 'foo/Config.in', 7)
+    db.add_symbol_legacy_definition('BR2_bar', 'Config.in.legacy', 10)
+    db.add_symbol_virtual('BR2_baz', 'baz/Config.in', 7)
+    db.add_symbol_usage('BR2_foo', 'file', 1)
+    db.add_symbol_usage('BR2_bar', 'file', 1)
+    db.add_symbol_usage('BR2_baz', 'file', 1)
+    db.add_symbol_usage('BR2_undef1', 'file', 1)
+    db.add_symbol_legacy_usage('BR2_undef2', 'file', 2)
+    db.add_symbol_usage_in_legacy('BR2_undef3', 'file', 3)
+    db.add_symbol_usage('BR2_undef3', 'another', 1)
+    db.add_symbol_legacy_usage('BR2_undef3', 'another', 2)
+    db.add_symbol_usage('BR2_PACKAGE_HOST_undef', 'file', 1)
+    db.add_symbol_usage('BR2_PACKAGE_HAS_HOST_undef', 'file', 1)
+    db.add_symbol_usage('BR2_TARGET_ROOTFS_undef_XZ', 'file', 1)
+    db.add_symbol_usage('BR2_GRAPH_ALT', 'file', 1)
+    db.add_symbol_usage('BR2_EXTERNAL', 'file', 1)
+    db.add_symbol_usage('BR2_TARGET_BAREBOX_AUX_BAREBOXENV', 'file', 1)
+    db.add_symbol_usage('BR2_PACKAGE_HAS_TOOLCHAIN_BUILDROOT', 'file', 1)
+    assert str(db) == str({
+        'BR2_foo': {'definition': {'foo/Config.in': [7]}, 'normal usage': {'file': [1]}},
+        'BR2_bar': {'legacy definition': {'Config.in.legacy': [10]}, 'normal usage': {'file': [1]}},
+        'BR2_baz': {'virtual': {'baz/Config.in': [7]}, 'normal usage': {'file': [1]}},
+        'BR2_undef1': {'normal usage': {'file': [1]}},
+        'BR2_undef2': {'legacy usage': {'file': [2]}},
+        'BR2_undef3': {'usage inside legacy': {'file': [3]}, 'normal usage': {'another': [1]}, 'legacy usage': {'another': [2]}},
+        'BR2_PACKAGE_HOST_undef': {'normal usage': {'file': [1]}},
+        'BR2_PACKAGE_HAS_HOST_undef': {'normal usage': {'file': [1]}},
+        'BR2_TARGET_ROOTFS_undef_XZ': {'normal usage': {'file': [1]}},
+        'BR2_GRAPH_ALT': {'normal usage': {'file': [1]}},
+        'BR2_EXTERNAL': {'normal usage': {'file': [1]}},
+        'BR2_TARGET_BAREBOX_AUX_BAREBOXENV': {'normal usage': {'file': [1]}},
+        'BR2_PACKAGE_HAS_TOOLCHAIN_BUILDROOT': {'normal usage': {'file': [1]}},
+        })
+    warnings = db.get_warnings_for_symbols_without_definition()
+    assert warnings == [
+        ('file', 1, 'BR2_undef1 referenced but not defined'),
+        ('file', 2, 'BR2_undef2 referenced but not defined'),
+        ('another', 1, 'BR2_undef3 referenced but not defined'),
+        ('another', 2, 'BR2_undef3 referenced but not defined'),
+        ('file', 3, 'BR2_undef3 referenced but not defined'),
+        ]
+
+
+def test_get_warnings_for_symbols_without_usage():
+    db = m.DB()
+    db.add_symbol_definition('BR2_a', 'a/Config.in', 1)
+    db.add_symbol_definition('BR2_a', 'a/Config.in', 2)
+    db.add_symbol_usage('BR2_a', 'file', 1)
+    db.add_symbol_usage('BR2_a', 'file', 2)
+    db.add_symbol_definition('BR2_b', 'b/Config.in', 2)
+    db.add_symbol_usage_in_legacy('BR2_b', 'file', 1)
+    db.add_symbol_definition('BR2_c', 'c/Config.in', 2)
+    db.add_symbol_legacy_usage('BR2_c', 'file', 1)
+    db.add_symbol_definition('BR2_USE_CCACHE', 'file', 1)
+    db.add_symbol_definition('BR2_PACKAGE_SKELETON', 'file', 1)
+    db.add_symbol_definition('BR2_d', 'd/Config.in', 2)
+    db.add_symbol_helper('BR2_d', 'd/Config.in', 2)
+    db.add_symbol_definition('BR2_e', 'e/Config.in', 2)
+    db.add_symbol_choice('BR2_e', 'e/Config.in', 2)
+    db.add_symbol_definition('BR2_f', 'f/Config.in', 2)
+    db.add_symbol_definition('BR2_g', 'g/Config.in', 2)
+    db.add_symbol_definition('BR2_g', 'g/Config.in', 3)
+    db.add_symbol_legacy_definition('BR2_h', 'Config.in.legacy', 1)
+    db.add_symbol_usage('BR2_h', 'file', 2)
+    db.add_symbol_usage('BR2_h', 'file', 3)
+    db.add_symbol_legacy_definition('BR2_i', 'Config.in.legacy', 2)
+    db.add_symbol_usage_in_legacy('BR2_i', 'file', 2)
+    db.add_symbol_legacy_definition('BR2_j', 'Config.in.legacy', 2)
+    db.add_symbol_legacy_usage('BR2_j', 'file', 2)
+    db.add_symbol_legacy_definition('BR2_k', 'Config.in.legacy', 2)
+    db.add_symbol_usage('BR2_k', 'file', 5)
+    db.add_symbol_usage_in_legacy('BR2_k', 'file', 6)
+    db.add_symbol_legacy_usage('BR2_k', 'file', 7)
+    db.add_symbol_legacy_definition('BR2_l', 'Config.in.legacy', 2)
+    assert str(db) == str({
+        'BR2_a': {'definition': {'a/Config.in': [1, 2]}, 'normal usage': {'file': [1, 2]}},
+        'BR2_b': {'definition': {'b/Config.in': [2]}, 'usage inside legacy': {'file': [1]}},
+        'BR2_c': {'definition': {'c/Config.in': [2]}, 'legacy usage': {'file': [1]}},
+        'BR2_USE_CCACHE': {'definition': {'file': [1]}},
+        'BR2_PACKAGE_SKELETON': {'definition': {'file': [1]}},
+        'BR2_d': {'definition': {'d/Config.in': [2]}, 'possible config helper': {'d/Config.in': [2]}},
+        'BR2_e': {'definition': {'e/Config.in': [2]}, 'part of a choice': {'e/Config.in': [2]}},
+        'BR2_f': {'definition': {'f/Config.in': [2]}},
+        'BR2_g': {'definition': {'g/Config.in': [2, 3]}},
+        'BR2_h': {'legacy definition': {'Config.in.legacy': [1]}, 'normal usage': {'file': [2, 3]}},
+        'BR2_i': {'legacy definition': {'Config.in.legacy': [2]}, 'usage inside legacy': {'file': [2]}},
+        'BR2_j': {'legacy definition': {'Config.in.legacy': [2]}, 'legacy usage': {'file': [2]}},
+        'BR2_k': {
+            'legacy definition': {'Config.in.legacy': [2]},
+            'normal usage': {'file': [5]},
+            'usage inside legacy': {'file': [6]},
+            'legacy usage': {'file': [7]}},
+        'BR2_l': {'legacy definition': {'Config.in.legacy': [2]}},
+        })
+    warnings = db.get_warnings_for_symbols_without_usage()
+    assert warnings == [
+        ('f/Config.in', 2, 'BR2_f defined but not referenced'),
+        ('g/Config.in', 2, 'BR2_g defined but not referenced'),
+        ('g/Config.in', 3, 'BR2_g defined but not referenced'),
+        ('Config.in.legacy', 2, 'BR2_l defined but not referenced'),
+        ]
+
+
+def test_get_warnings_for_symbols_with_legacy_note_and_no_comment_on_usage():
+    db = m.DB()
+    db.add_symbol_legacy_note('BR2_foo', 'Config.in.legacy', 1)
+    db.add_symbol_legacy_usage('BR2_foo', 'package/bar/Config.in', 2)
+    db.add_symbol_legacy_note('BR2_baz', 'Config.in.legacy', 7001)
+    db.add_symbol_usage('BR2_baz', 'package/foo/Config.in', 1)
+    assert str(db) == str({
+        'BR2_foo': {'legacy note': {'Config.in.legacy': [1]}, 'legacy usage': {'package/bar/Config.in': [2]}},
+        'BR2_baz': {'legacy note': {'Config.in.legacy': [7001]}, 'normal usage': {'package/foo/Config.in': [1]}},
+        })
+    warnings = db.get_warnings_for_symbols_with_legacy_note_and_no_comment_on_usage()
+    assert warnings == [
+        ('package/foo/Config.in', 1, 'BR2_baz missing "# legacy"'),
+        ]
+
+
+def test_get_warnings_for_symbols_with_legacy_note_and_no_usage():
+    db = m.DB()
+    db.add_symbol_legacy_note('BR2_foo', 'Config.in.legacy', 1)
+    db.add_symbol_legacy_usage('BR2_foo', 'package/bar/Config.in', 2)
+    db.add_symbol_legacy_note('BR2_bar', 'Config.in.legacy', 1)
+    db.add_symbol_usage_in_legacy('BR2_bar', 'Config.in.legacy', 7001)
+    db.add_symbol_legacy_note('BR2_baz', 'Config.in.legacy', 7001)
+    db.add_symbol_legacy_note('BR2_no_comment', 'Config.in.legacy', 1)
+    db.add_symbol_usage('BR2_no_comment', 'package/bar/Config.in', 2)
+    assert str(db) == str({
+        'BR2_foo': {'legacy note': {'Config.in.legacy': [1]}, 'legacy usage': {'package/bar/Config.in': [2]}},
+        'BR2_bar': {'legacy note': {'Config.in.legacy': [1]}, 'usage inside legacy': {'Config.in.legacy': [7001]}},
+        'BR2_baz': {'legacy note': {'Config.in.legacy': [7001]}},
+        'BR2_no_comment': {'legacy note': {'Config.in.legacy': [1]}, 'normal usage': {'package/bar/Config.in': [2]}},
+        })
+    warnings = db.get_warnings_for_symbols_with_legacy_note_and_no_usage()
+    assert warnings == [
+        ('Config.in.legacy', 1, 'BR2_bar not referenced but has a comment stating it is'),
+        ('Config.in.legacy', 7001, 'BR2_baz not referenced but has a comment stating it is'),
+        ]
diff --git a/utils/checksymbolslib/test_file.py b/utils/checksymbolslib/test_file.py
new file mode 100644
index 0000000000..3b4ee108d1
--- /dev/null
+++ b/utils/checksymbolslib/test_file.py
@@ -0,0 +1,152 @@
+import os
+import pytest
+import tempfile
+import checksymbolslib.file as m
+
+
+def test_get_list_of_files_in_the_repo():
+    all_files = m.get_list_of_files_in_the_repo()
+    assert 'Makefile' in all_files
+    assert 'package/Config.in' in all_files
+    assert len(all_files) > 1000
+
+
+get_list_of_files_to_process = [
+    ('unknown file type',
+     ['a/file/Config.in',
+      'another/file.mk',
+      'unknown/file/type'],
+     ['a/file/Config.in',
+      'another/file.mk']),
+    ('runtime test infra fixtures',
+     ['a/file/Config.in',
+      'support/testing/a/broken/Config.in',
+      'another/file.mk'],
+     ['a/file/Config.in',
+      'another/file.mk']),
+    ]
+
+
+@pytest.mark.parametrize('testname,all_files,expected', get_list_of_files_to_process)
+def test_get_list_of_files_to_process(testname, all_files, expected):
+    files_to_process = m.get_list_of_files_to_process(all_files)
+    assert files_to_process == expected
+
+
+get_list_of_filenames_with_pattern = [
+    ('ignored directories',
+     ['a/file/Config.in',
+      'support/testing/a/broken/file/Config.in',
+      'not/found.mk',
+      'another/file.mk'],
+     ['a/file/Config.in',
+      'not/found.mk',
+      'another/file.mk'],
+     'file',
+     ['support/testing/a/broken/file/Config.in']),
+    ('processed files',
+     ['a/file/Config.in',
+      'not/found.mk',
+      'another/file.mk'],
+     [],
+     'file',
+     ['a/file/Config.in',
+      'another/file.mk']),
+    ('case sensitive',
+     ['a/file/Config.in',
+      'not/found.mk',
+      'another/file.mk'],
+     [],
+     'FILE',
+     []),
+    ('or',
+     ['a/file/Config.in',
+      'not/found.mk',
+      'another/file.mk'],
+     [],
+     'file|FILE',
+     ['a/file/Config.in',
+      'another/file.mk']),
+    ('complex regexp',
+     ['a/file/Config.in',
+      'not/found.mk',
+      'another/file.mk'],
+     [],
+     '^n[oO]+t.*mk$',
+     ['not/found.mk']),
+    ]
+
+
+@pytest.mark.parametrize('testname,all_files,files_to_process,pattern,expected', get_list_of_filenames_with_pattern)
+def test_get_list_of_filenames_with_pattern(testname, all_files, files_to_process, pattern, expected):
+    files_to_process = m.get_list_of_filenames_with_pattern(all_files, files_to_process, pattern)
+    assert files_to_process == expected
+
+
+read_file = [
+    ('indent',
+     'file1',
+     ' content1\n'
+     '\t# comment1',
+     [[1, ' content1\n'],
+      [2, '\t# comment1']]),
+    ('trailing space',
+     'file2',
+     'content2 \n'
+     '# comment2\t\n',
+     [[1, 'content2 \n'],
+      [2, '# comment2\t\n']]),
+    ('empty line',
+     'file3',
+     '\n'
+     '\n',
+     [[1, '\n'],
+      [2, '\n']]),
+    ('missing newline at EOF',
+     'file4',
+     '\n'
+     ' text\t',
+     [[1, '\n'],
+      [2, ' text\t']]),
+    ]
+
+
+@pytest.mark.parametrize('testname,filename,content,,expected', read_file)
+def test_read_file(testname, filename, content, expected):
+    with tempfile.TemporaryDirectory(suffix='-checksymbolslib-test-file') as workdir:
+        full_filename = os.path.join(workdir, filename)
+        with open(full_filename, 'wb') as f:
+            f.write(content.encode())
+        read_file_content = m.read_file(full_filename)
+    assert read_file_content == expected
+
+
+cleanup_file_content = [
+    ('empty file',
+     [],
+     []),
+    ('empty line',
+     [[5, '\n']],
+     [[5, '']]),
+    ('trailing space',
+     [[3, '    \n']],
+     [[3, '    ']]),
+    ('trailing tab',
+     [[3, '\t\n']],
+     [[3, '\t']]),
+    ('1 continuation',
+     [[1, 'foo \\\n'],
+      [2, 'bar\n']],
+     [[1, 'foo bar']]),
+    ('2 continuations',
+     [[1, 'foo \\\n'],
+      [2, 'bar  \\\n'],
+      [3, 'baz\n']],
+     [[1, 'foo bar  baz']]),
+    ]
+
+
+@pytest.mark.parametrize('testname,file_content_raw,expected', cleanup_file_content)
+def test_cleanup_file_content(testname, file_content_raw, expected):
+    cleaned_up_content = m.cleanup_file_content(file_content_raw)
+    assert cleaned_up_content == expected
diff --git a/utils/checksymbolslib/test_kconfig.py b/utils/checksymbolslib/test_kconfig.py
new file mode 100644
index 0000000000..ab2008df6c
--- /dev/null
+++ b/utils/checksymbolslib/test_kconfig.py
@@ -0,0 +1,438 @@
+import pytest
+from unittest.mock import Mock
+from unittest.mock import call
+from checksymbolslib.test_util import assert_db_calls
+import checksymbolslib.kconfig as m
+
+
+all_symbols_from = [
+    ('no prefix',
+     'config PACKAGE_FOO',
+     []),
+    ('simple',
+     'config BR2_PACKAGE_FOO',
+     ['BR2_PACKAGE_FOO']),
+    ('ignore comment',
+     'config BR2_PACKAGE_FOO # BR2_PACKAGE_BAR',
+     ['BR2_PACKAGE_FOO']),
+    ('ignore whitespace',
+     '\tconfig  BR2_PACKAGE_FOO\t # BR2_PACKAGE_BAR',
+     ['BR2_PACKAGE_FOO']),
+    ('2 occurrences',
+     '\tdefault BR2_PACKAGE_FOO_BAR if BR2_PACKAGE_FOO_BAR != ""',
+     ['BR2_PACKAGE_FOO_BAR', 'BR2_PACKAGE_FOO_BAR']),
+    ]
+
+
+@pytest.mark.parametrize('testname,line,expected', all_symbols_from)
+def test_all_symbols_from(testname, line, expected):
+    symbols = m.all_symbols_from(line)
+    assert symbols == expected
+
+
+handle_definition = [
+    ('config',
+     'package/foo/Config.in',
+     5,
+     'config BR2_PACKAGE_FOO',
+     False,
+     {'add_symbol_definition': [call('BR2_PACKAGE_FOO', 'package/foo/Config.in', 5)]}),
+    ('ignore comment',
+     'package/foo/Config.in',
+     5,
+     'config BR2_PACKAGE_FOO # BR2_PACKAGE_BAR',
+     False,
+     {'add_symbol_definition': [call('BR2_PACKAGE_FOO', 'package/foo/Config.in', 5)]}),
+    ('ignore whitespace',
+     'package/foo/Config.in',
+     5,
+     '\tconfig  BR2_PACKAGE_FOO\t # BR2_PACKAGE_BAR',
+     False,
+     {'add_symbol_definition': [call('BR2_PACKAGE_FOO', 'package/foo/Config.in', 5)]}),
+    ('menuconfig',
+     'package/gd/Config.in',
+     1,
+     'menuconfig BR2_PACKAGE_GD',
+     False,
+     {'add_symbol_definition': [call('BR2_PACKAGE_GD', 'package/gd/Config.in', 1)]}),
+    ('menu',
+     'package/Config.in',
+     100,
+     'menu "Database"',
+     False,
+     {}),
+    ('legacy config',
+     'Config.in.legacy',
+     50,
+     'config BR2_PACKAGE_FOO',
+     True,
+     {'add_symbol_legacy_definition': [call('BR2_PACKAGE_FOO', 'Config.in.legacy', 50)]}),
+    ]
+
+
+@pytest.mark.parametrize('testname,filename,lineno,line,legacy,expected_calls', handle_definition)
+def test_handle_definition(testname, filename, lineno, line, legacy, expected_calls):
+    db = Mock()
+    m.handle_definition(db, filename, lineno, line, legacy)
+    assert_db_calls(db, expected_calls)
+
+
+handle_usage = [
+    ('default with comparison',
+     'package/openblas/Config.in',
+     60,
+     '\tdefault y if BR2_PACKAGE_OPENBLAS_DEFAULT_TARGET != ""',
+     False,
+     {'add_symbol_usage': [call('BR2_PACKAGE_OPENBLAS_DEFAULT_TARGET', 'package/openblas/Config.in', 60)]}),
+    ('default with logical operators',
+     'toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options',
+     47,
+     '\tdefault y if BR2_i386 && !BR2_x86_i486 && !BR2_x86_i586 && !BR2_x86_x1000 && !BR2_x86_pentium_mmx && !BR2_x86_geode '
+     '&& !BR2_x86_c3 && !BR2_x86_winchip_c6 && !BR2_x86_winchip2',
+     False,
+     {'add_symbol_usage': [
+         call('BR2_i386', 'toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options', 47),
+         call('BR2_x86_c3', 'toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options', 47),
+         call('BR2_x86_geode', 'toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options', 47),
+         call('BR2_x86_i486', 'toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options', 47),
+         call('BR2_x86_i586', 'toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options', 47),
+         call('BR2_x86_pentium_mmx', 'toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options', 47),
+         call('BR2_x86_winchip2', 'toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options', 47),
+         call('BR2_x86_winchip_c6', 'toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options', 47),
+         call('BR2_x86_x1000', 'toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options', 47)]}),
+    ('legacy depends on',
+     'Config.in.legacy',
+     3000,
+     '\tdepends on BR2_LINUX_KERNEL',
+     True,
+     {'add_symbol_usage_in_legacy': [call('BR2_LINUX_KERNEL', 'Config.in.legacy', 3000)]}),
+    ('legacy if',
+     'Config.in.legacy',
+     97,
+     'if !BR2_SKIP_LEGACY',
+     True,
+     {'add_symbol_usage_in_legacy': [call('BR2_SKIP_LEGACY', 'Config.in.legacy', 97)]}),
+    ('source',
+     'system/Config.in',
+     152,
+     'source "$BR2_BASE_DIR/.br2-external.in.init"',
+     False,
+     {'add_symbol_usage': [call('BR2_BASE_DIR', 'system/Config.in', 152)]}),
+    ]
+
+
+@pytest.mark.parametrize('testname,filename,lineno,line,legacy,expected_calls', handle_usage)
+def test_handle_usage(testname, filename, lineno, line, legacy, expected_calls):
+    db = Mock()
+    m.handle_usage(db, filename, lineno, line, legacy)
+    assert_db_calls(db, expected_calls)
+
+
+handle_default = [
+    ('default with comparison',
+     'package/openblas/Config.in',
+     60,
+     '\tdefault y if BR2_PACKAGE_OPENBLAS_DEFAULT_TARGET != ""',
+     False,
+     {'add_symbol_usage': [call('BR2_PACKAGE_OPENBLAS_DEFAULT_TARGET', 'package/openblas/Config.in', 60)]}),
+    ('default with logical operators',
+     'toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options',
+     47,
+     '\tdefault y if BR2_i386 && !BR2_x86_i486 && !BR2_x86_i586 && !BR2_x86_x1000 && !BR2_x86_pentium_mmx && !BR2_x86_geode '
+     '&& !BR2_x86_c3 && !BR2_x86_winchip_c6 && !BR2_x86_winchip2',
+     False,
+     {'add_symbol_usage': [
+         call('BR2_i386', 'toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options', 47),
+         call('BR2_x86_c3', 'toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options', 47),
+         call('BR2_x86_geode', 'toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options', 47),
+         call('BR2_x86_i486', 'toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options', 47),
+         call('BR2_x86_i586', 'toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options', 47),
+         call('BR2_x86_pentium_mmx', 'toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options', 47),
+         call('BR2_x86_winchip2', 'toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options', 47),
+         call('BR2_x86_winchip_c6', 'toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options', 47),
+         call('BR2_x86_x1000', 'toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options', 47)]}),
+    ('legacy default',
+     'Config.in.legacy',
+     3000,
+     'default y if BR2_PACKAGE_REFPOLICY_POLICY_VERSION != ""',
+     True,
+     {'add_symbol_usage_in_legacy': [call('BR2_PACKAGE_REFPOLICY_POLICY_VERSION', 'Config.in.legacy', 3000)]}),
+    ('legacy handling on package',
+     'package/uboot-tools/Config.in.host',
+     105,
+     '\tdefault BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE if BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE != "" # legacy',
+     False,
+     {'add_symbol_legacy_usage': [call('BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE', 'package/uboot-tools/Config.in.host', 105)]}),
+    ('default on package',
+     'package/uboot-tools/Config.in.host',
+     105,
+     '\tdefault BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE if BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE != ""',
+     False,
+     {'add_symbol_usage': [
+         call('BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE', 'package/uboot-tools/Config.in.host', 105),
+         call('BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE', 'package/uboot-tools/Config.in.host', 105)]}),
+    ]
+
+
+@pytest.mark.parametrize('testname,filename,lineno,line,legacy,expected_calls', handle_default)
+def test_handle_default(testname, filename, lineno, line, legacy, expected_calls):
+    db = Mock()
+    m.handle_default(db, filename, lineno, line, legacy)
+    assert_db_calls(db, expected_calls)
+
+
+handle_select = [
+    ('select with comparison',
+     'package/bcusdk/Config.in',
+     6,
+     '\tselect BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL',
+     False,
+     {'add_symbol_select': [call('BR2_PACKAGE_ARGP_STANDALONE', 'package/bcusdk/Config.in', 6)],
+      'add_symbol_usage': [
+          call('BR2_PACKAGE_ARGP_STANDALONE', 'package/bcusdk/Config.in', 6),
+          call('BR2_TOOLCHAIN_USES_UCLIBC', 'package/bcusdk/Config.in', 6),
+          call('BR2_TOOLCHAIN_USES_MUSL', 'package/bcusdk/Config.in', 6)]}),
+    ('legacy select',
+     'Config.in.legacy',
+     100,
+     '\tselect BR2_PACKAGE_WPA_SUPPLICANT_DBUS if BR2_TOOLCHAIN_HAS_THREADS',
+     True,
+     {'add_symbol_select': [call('BR2_PACKAGE_WPA_SUPPLICANT_DBUS', 'Config.in.legacy', 100)],
+      'add_symbol_usage_in_legacy': [
+          call('BR2_PACKAGE_WPA_SUPPLICANT_DBUS', 'Config.in.legacy', 100),
+          call('BR2_TOOLCHAIN_HAS_THREADS', 'Config.in.legacy', 100)]}),
+    ]
+
+
+@pytest.mark.parametrize('testname,filename,lineno,line,legacy,expected_calls', handle_select)
+def test_handle_select(testname, filename, lineno, line, legacy, expected_calls):
+    db = Mock()
+    m.handle_select(db, filename, lineno, line, legacy)
+    assert_db_calls(db, expected_calls)
+
+
+handle_line = [
+    ('select with comparison',
+     'package/bcusdk/Config.in',
+     6,
+     '\tselect BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL',
+     False,
+     {'add_symbol_select': [call('BR2_PACKAGE_ARGP_STANDALONE', 'package/bcusdk/Config.in', 6)],
+      'add_symbol_usage': [
+         call('BR2_PACKAGE_ARGP_STANDALONE', 'package/bcusdk/Config.in', 6),
+         call('BR2_TOOLCHAIN_USES_UCLIBC', 'package/bcusdk/Config.in', 6),
+         call('BR2_TOOLCHAIN_USES_MUSL', 'package/bcusdk/Config.in', 6)]}),
+    ('legacy select',
+     'Config.in.legacy',
+     100,
+     '\tselect BR2_PACKAGE_WPA_SUPPLICANT_DBUS if BR2_TOOLCHAIN_HAS_THREADS',
+     True,
+     {'add_symbol_select': [call('BR2_PACKAGE_WPA_SUPPLICANT_DBUS', 'Config.in.legacy', 100)],
+      'add_symbol_usage_in_legacy': [
+          call('BR2_PACKAGE_WPA_SUPPLICANT_DBUS', 'Config.in.legacy', 100),
+          call('BR2_TOOLCHAIN_HAS_THREADS', 'Config.in.legacy', 100)]}),
+    ('comment with symbol',
+     'Config.in',
+     6,
+     '\tselect # BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL',
+     False,
+     {}),
+    ('comment',
+     'Config.in',
+     6,
+     '# just a comment',
+     False,
+     {}),
+    ]
+
+
+@pytest.mark.parametrize('testname,filename,lineno,line,legacy,expected_calls', handle_line)
+def test_handle_line(testname, filename, lineno, line, legacy, expected_calls):
+    db = Mock()
+    m.handle_line(db, filename, lineno, line, legacy)
+    assert_db_calls(db, expected_calls)
+
+
+handle_config_helper = [
+    ('no select',
+     'package/foo/Config.in',
+     [[5, 'config BR2_PACKAGE_FOO']],
+     {}),
+    ('select',
+     'package/foo/Config.in',
+     [[5, 'config BR2_PACKAGE_FOO'],
+      [6, '\tselect BR2_PACKAGE_BAR']],
+     {'add_symbol_helper': [call('BR2_PACKAGE_FOO', 'package/foo/Config.in', 5)]}),
+    ('ignore comment',
+     'package/foo/Config.in',
+     [[5, 'config BR2_PACKAGE_FOO # BR2_PACKAGE_BAR'],
+      [6, '\tselect BR2_PACKAGE_BAR # BR2_PACKAGE_FOO']],
+     {'add_symbol_helper': [call('BR2_PACKAGE_FOO', 'package/foo/Config.in', 5)]}),
+    ('correct symbol',
+     'package/foo/Config.in',
+     [[5, 'config BR2_PACKAGE_FOO'],
+      [6, 'config BR2_PACKAGE_BAR'],
+      [7, '\tselect BR2_PACKAGE_BAZ']],
+     {'add_symbol_helper': [call('BR2_PACKAGE_BAR', 'package/foo/Config.in', 6)]}),
+    ('2 selects',
+     'package/foo/Config.in',
+     [[5, 'config BR2_PACKAGE_FOO'],
+      [6, '\tselect BR2_PACKAGE_BAR'],
+      [7, ' select BR2_PACKAGE_BAR']],
+     {'add_symbol_helper': [call('BR2_PACKAGE_FOO', 'package/foo/Config.in', 5)]}),
+    ]
+
+
+@pytest.mark.parametrize('testname,filename,file_content,expected_calls', handle_config_helper)
+def test_handle_config_helper(testname, filename, file_content, expected_calls):
+    db = Mock()
+    m.handle_config_helper(db, filename, file_content)
+    assert_db_calls(db, expected_calls)
+
+
+handle_config_choice = [
+    ('no choice',
+     'package/foo/Config.in',
+     [[5, 'config BR2_PACKAGE_FOO']],
+     {}),
+    ('after',
+     'package/foo/Config.in',
+     [[3, 'choice'],
+      [4, '\tprompt "your choice"'],
+      [5, 'config BR2_PACKAGE_FOO'],
+      [6, 'config BR2_PACKAGE_BAR'],
+      [10, 'endchoice'],
+      [19, 'config BR2_PACKAGE_BAZ']],
+     {'add_symbol_choice': [
+         call('BR2_PACKAGE_FOO', 'package/foo/Config.in', 5),
+         call('BR2_PACKAGE_BAR', 'package/foo/Config.in', 6)]}),
+    ('before',
+     'package/foo/Config.in',
+     [[1, 'config BR2_PACKAGE_BAZ'],
+      [3, 'choice'],
+      [4, '\tprompt "your choice"'],
+      [5, 'config BR2_PACKAGE_FOO'],
+      [6, 'config BR2_PACKAGE_BAR'],
+      [10, 'endchoice']],
+     {'add_symbol_choice': [
+         call('BR2_PACKAGE_FOO', 'package/foo/Config.in', 5),
+         call('BR2_PACKAGE_BAR', 'package/foo/Config.in', 6)]}),
+    ]
+
+
+@pytest.mark.parametrize('testname,filename,file_content,expected_calls', handle_config_choice)
+def test_handle_config_choice(testname, filename, file_content, expected_calls):
+    db = Mock()
+    m.handle_config_choice(db, filename, file_content)
+    assert_db_calls(db, expected_calls)
+
+
+handle_note = [
+    ('example',
+     'Config.in.legacy',
+     [[51, '#   # Note: BR2_FOO_1 is still referenced from package/foo/Config.in']],
+     {}),
+    ('ok',
+     'Config.in.legacy',
+     [[112, 'menu "Legacy config options"'],
+      [2132, '# Note: BR2_PACKAGE_FOO is still referenced from package/foo/Config.in'],
+      [4958, 'endmenu']],
+     {'add_symbol_legacy_note': [call('BR2_PACKAGE_FOO', 'Config.in.legacy', 2132)]}),
+    ('before and after',
+     'Config.in.legacy',
+     [[100, '# Note: BR2_PACKAGE_BAR is still referenced from package/foo/Config.in'],
+      [112, 'menu "Legacy config options"'],
+      [2132, '# Note: BR2_PACKAGE_FOO is still referenced from package/foo/Config.in'],
+      [4958, 'endmenu'],
+      [5000, '# Note: BR2_PACKAGE_BAR is still referenced from package/foo/Config.in']],
+     {'add_symbol_legacy_note': [call('BR2_PACKAGE_FOO', 'Config.in.legacy', 2132)]}),
+    ]
+
+
+@pytest.mark.parametrize('testname,filename,file_content,expected_calls', handle_note)
+def test_handle_note(testname, filename, file_content, expected_calls):
+    db = Mock()
+    m.handle_note(db, filename, file_content)
+    assert_db_calls(db, expected_calls)
+
+
+populate_db = [
+    ('legacy',
+     'Config.in.legacy',
+     [[112, 'menu "Legacy config options"'],
+      [2100, 'config BR2_PACKAGE_FOO'],
+      [2101, '\tselect BR2_PACKAGE_BAR'],
+      [2132, '# Note: BR2_PACKAGE_FOO is still referenced from package/foo/Config.in'],
+      [4958, 'endmenu']],
+     {'add_symbol_legacy_note': [call('BR2_PACKAGE_FOO', 'Config.in.legacy', 2132)],
+      'add_symbol_helper': [call('BR2_PACKAGE_FOO', 'Config.in.legacy', 2100)],
+      'add_symbol_legacy_definition': [call('BR2_PACKAGE_FOO', 'Config.in.legacy', 2100)],
+      'add_symbol_usage_in_legacy': [call('BR2_PACKAGE_BAR', 'Config.in.legacy', 2101)],
+      'add_symbol_select': [call('BR2_PACKAGE_BAR', 'Config.in.legacy', 2101)]}),
+    ('normal',
+     'package/foo/Config.in',
+     [[1, 'config BR2_PACKAGE_BAZ'],
+      [3, 'choice'],
+      [4, '\tprompt "your choice"'],
+      [5, 'config BR2_PACKAGE_FOO'],
+      [6, 'config BR2_PACKAGE_BAR'],
+      [7, '\t select BR2_PACKAGE_FOO_BAR'],
+      [10, 'endchoice']],
+     {'add_symbol_choice': [
+         call('BR2_PACKAGE_FOO', 'package/foo/Config.in', 5),
+         call('BR2_PACKAGE_BAR', 'package/foo/Config.in', 6)],
+      'add_symbol_usage': [
+         call('BR2_PACKAGE_FOO_BAR', 'package/foo/Config.in', 7)],
+      'add_symbol_select': [
+         call('BR2_PACKAGE_FOO_BAR', 'package/foo/Config.in', 7)],
+      'add_symbol_definition': [
+         call('BR2_PACKAGE_BAZ', 'package/foo/Config.in', 1),
+         call('BR2_PACKAGE_FOO', 'package/foo/Config.in', 5),
+         call('BR2_PACKAGE_BAR', 'package/foo/Config.in', 6)],
+      'add_symbol_helper': [
+         call('BR2_PACKAGE_BAR', 'package/foo/Config.in', 6)]}),
+    ]
+
+
+@pytest.mark.parametrize('testname,filename,file_content,expected_calls', populate_db)
+def test_populate_db(testname, filename, file_content, expected_calls):
+    db = Mock()
+    m.populate_db(db, filename, file_content)
+    assert_db_calls(db, expected_calls)
+
+
+check_filename = [
+    ('Config.in',
+     'Config.in',
+     True),
+    ('Config.in.legacy',
+     'Config.in.legacy',
+     True),
+    ('arch/Config.in.microblaze',
+     'arch/Config.in.microblaze',
+     True),
+    ('package/php/Config.ext',
+     'package/php/Config.ext',
+     True),
+    ('package/pru-software-support/Config.in.host',
+     'package/pru-software-support/Config.in.host',
+     True),
+    ('toolchain/toolchain-external/toolchain-external-custom/Config.in.options',
+     'toolchain/toolchain-external/toolchain-external-custom/Config.in.options',
+     True),
+    ('package/foo/0001-Config.patch',
+     'package/foo/0001-Config.patch',
+     False),
+    ('package/pkg-generic.mk',
+     'package/pkg-generic.mk',
+     False),
+    ('Makefile',
+     'Makefile',
+     False),
+    ]
+
+
+@pytest.mark.parametrize('testname,filename,expected', check_filename)
+def test_check_filename(testname, filename, expected):
+    symbols = m.check_filename(filename)
+    assert symbols == expected
diff --git a/utils/checksymbolslib/test_makefile.py b/utils/checksymbolslib/test_makefile.py
new file mode 100644
index 0000000000..14d07eaa45
--- /dev/null
+++ b/utils/checksymbolslib/test_makefile.py
@@ -0,0 +1,304 @@
+import pytest
+from unittest.mock import Mock
+from unittest.mock import call
+from checksymbolslib.test_util import assert_db_calls
+import checksymbolslib.makefile as m
+
+
+handle_eval = [
+    ('generic',
+     'package/foo/foo.mk',
+     5,
+     '$(eval $(generic-package))',
+     {'add_symbol_usage': [call('BR2_PACKAGE_FOO', 'package/foo/foo.mk', 5)]}),
+    ('ignore trailing whitespace',
+     'package/foo/foo.mk',
+     5,
+     '$(eval $(generic-package)) ',
+     {'add_symbol_usage': [call('BR2_PACKAGE_FOO', 'package/foo/foo.mk', 5)]}),
+    ('ignore indent',
+     'package/foo/foo.mk',
+     5,
+     '\t$(eval $(generic-package))',
+     {'add_symbol_usage': [call('BR2_PACKAGE_FOO', 'package/foo/foo.mk', 5)]}),
+    ('rootfs',
+     'fs/foo/foo.mk',
+     5,
+     '$(eval $(rootfs))',
+     {'add_symbol_usage': [
+         call('BR2_TARGET_ROOTFS_FOO', 'fs/foo/foo.mk', 5),
+         call('BR2_TARGET_ROOTFS_FOO_BZIP2', 'fs/foo/foo.mk', 5),
+         call('BR2_TARGET_ROOTFS_FOO_GZIP', 'fs/foo/foo.mk', 5),
+         call('BR2_TARGET_ROOTFS_FOO_LZ4', 'fs/foo/foo.mk', 5),
+         call('BR2_TARGET_ROOTFS_FOO_LZMA', 'fs/foo/foo.mk', 5),
+         call('BR2_TARGET_ROOTFS_FOO_LZO', 'fs/foo/foo.mk', 5),
+         call('BR2_TARGET_ROOTFS_FOO_XZ', 'fs/foo/foo.mk', 5),
+         call('BR2_TARGET_ROOTFS_FOO_ZSTD', 'fs/foo/foo.mk', 5)]}),
+    ('kernel module',
+     'package/foo/foo.mk',
+     6,
+     '$(eval $(kernel-module))',
+     {'add_symbol_usage': [call('BR2_PACKAGE_FOO', 'package/foo/foo.mk', 6)]}),
+    ('not an eval for package infra',
+     'docs/manual/manual.mk',
+     10,
+     '$(eval $(call asciidoc-document))',
+     {}),
+    ('linux',
+     'linux/linux.mk',
+     617,
+     '$(eval $(kconfig-package))',
+     {'add_symbol_usage': [call('BR2_LINUX_KERNEL', 'linux/linux.mk', 617)]}),
+    ('virtual toolchain',
+     'toolchain/toolchain-external/toolchain-external.mk',
+     18,
+     '$(eval $(virtual-package))',
+     {'add_symbol_usage': [
+         call('BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL', 'toolchain/toolchain-external/toolchain-external.mk', 18),
+         call('BR2_PACKAGE_HAS_TOOLCHAIN_EXTERNAL', 'toolchain/toolchain-external/toolchain-external.mk', 18),
+         call('BR2_TOOLCHAIN_EXTERNAL', 'toolchain/toolchain-external/toolchain-external.mk', 18)],
+      'add_symbol_virtual': [call('BR2_TOOLCHAIN_EXTERNAL', 'toolchain/toolchain-external/toolchain-external.mk', 18)]}),
+    ('virtual package',
+     'package/foo/foo.mk',
+     18,
+     '$(eval $(virtual-package))',
+     {'add_symbol_usage': [
+         call('BR2_PACKAGE_PROVIDES_FOO', 'package/foo/foo.mk', 18),
+         call('BR2_PACKAGE_HAS_FOO', 'package/foo/foo.mk', 18),
+         call('BR2_PACKAGE_FOO', 'package/foo/foo.mk', 18)],
+      'add_symbol_virtual': [call('BR2_PACKAGE_FOO', 'package/foo/foo.mk', 18)]}),
+    ('host virtual package',
+     'package/foo/foo.mk',
+     18,
+     '$(eval $(host-virtual-package))',
+     {'add_symbol_usage': [
+         call('BR2_PACKAGE_PROVIDES_HOST_FOO', 'package/foo/foo.mk', 18),
+         call('BR2_PACKAGE_HAS_HOST_FOO', 'package/foo/foo.mk', 18),
+         call('BR2_PACKAGE_HOST_FOO', 'package/foo/foo.mk', 18)]}),
+    ('host generic package',
+     'package/foo/foo.mk',
+     18,
+     '$(eval $(host-package))',
+     {'add_symbol_usage': [call('BR2_PACKAGE_HOST_FOO', 'package/foo/foo.mk', 18)]}),
+    ('boot package',
+     'boot/foo/foo.mk',
+     18,
+     '$(eval $(generic-package))',
+     {'add_symbol_usage': [call('BR2_TARGET_FOO', 'boot/foo/foo.mk', 18)]}),
+    ('toolchain package',
+     'toolchain/foo/foo.mk',
+     18,
+     '$(eval $(generic-package))',
+     {'add_symbol_usage': [call('BR2_FOO', 'toolchain/foo/foo.mk', 18)]}),
+    ('generic package',
+     'package/foo/foo.mk',
+     18,
+     '$(eval $(generic-package))',
+     {'add_symbol_usage': [call('BR2_PACKAGE_FOO', 'package/foo/foo.mk', 18)]}),
+    ('cmake package',
+     'package/foo/foo.mk',
+     18,
+     '$(eval $(cmake-package))',
+     {'add_symbol_usage': [call('BR2_PACKAGE_FOO', 'package/foo/foo.mk', 18)]}),
+    ]
+
+
+@pytest.mark.parametrize('testname,filename,lineno,line,expected_calls', handle_eval)
+def test_handle_eval(testname, filename, lineno, line, expected_calls):
+    db = Mock()
+    m.handle_eval(db, filename, lineno, line)
+    assert_db_calls(db, expected_calls)
+
+
+handle_definition = [
+    ('legacy attribution',
+     'Makefile.legacy',
+     9,
+     'BR2_LEGACY_FOO := foo',
+     True,
+     {'add_symbol_legacy_definition': [call('BR2_LEGACY_FOO', 'Makefile.legacy', 9)]}),
+    ('attribution 1',
+     'Makefile',
+     9,
+     'BR2_FOO ?= foo',
+     False,
+     {'add_symbol_definition': [call('BR2_FOO', 'Makefile', 9)]}),
+    ('attribution 2',
+     'Makefile',
+     9,
+     'BR2_FOO = $(BR2_BAR)',
+     False,
+     {'add_symbol_definition': [call('BR2_FOO', 'Makefile', 9)]}),
+    ('attribution 3',
+     'Makefile',
+     9,
+     'BR2_FOO := foo',
+     False,
+     {'add_symbol_definition': [call('BR2_FOO', 'Makefile', 9)]}),
+    ('normal export',
+     'Makefile',
+     90,
+     'export BR2_FOO',
+     False,
+     {'add_symbol_definition': [call('BR2_FOO', 'Makefile', 90)]}),
+    ('legacy export',
+     'Makefile.legacy',
+     90,
+     'export BR2_FOO',
+     True,
+     {'add_symbol_legacy_definition': [call('BR2_FOO', 'Makefile.legacy', 90)]}),
+    ]
+
+
+@pytest.mark.parametrize('testname,filename,lineno,line,legacy,expected_calls', handle_definition)
+def test_handle_definition(testname, filename, lineno, line, legacy, expected_calls):
+    db = Mock()
+    m.handle_definition(db, filename, lineno, line, legacy)
+    assert_db_calls(db, expected_calls)
+
+
+handle_usage = [
+    ('legacy',
+     'Makefile.legacy',
+     8,
+     'ifeq ($(BR2_LEGACY),y)',
+     True,
+     {'add_symbol_usage_in_legacy': [call('BR2_LEGACY', 'Makefile.legacy', 8)]}),
+    ('attribution',
+     'Makefile',
+     9,
+     'BR2_FOO = $(BR2_BAR)',
+     False,
+     {'add_symbol_usage': [call('BR2_BAR', 'Makefile', 9)]}),
+    ('host virtual package',
+     'package/foo/foo.mk',
+     18,
+     '$(eval $(host-virtual-package))',
+     False,
+     {'add_symbol_usage': [
+         call('BR2_PACKAGE_PROVIDES_HOST_FOO', 'package/foo/foo.mk', 18),
+         call('BR2_PACKAGE_HAS_HOST_FOO', 'package/foo/foo.mk', 18),
+         call('BR2_PACKAGE_HOST_FOO', 'package/foo/foo.mk', 18)]}),
+    ]
+
+
+@pytest.mark.parametrize('testname,filename,lineno,line,legacy,expected_calls', handle_usage)
+def test_handle_usage(testname, filename, lineno, line, legacy, expected_calls):
+    db = Mock()
+    m.handle_usage(db, filename, lineno, line, legacy)
+    assert_db_calls(db, expected_calls)
+
+
+populate_db = [
+    ('legacy',
+     'Makefile.legacy',
+     [[8, 'ifeq ($(BR2_LEGACY),y)'],
+      [9, 'BR2_LEGACY_FOO := foo'],
+      [34, 'ifneq ($(BUILDROOT_CONFIG),$(BR2_CONFIG))']],
+     {'add_symbol_usage_in_legacy': [
+         call('BR2_LEGACY', 'Makefile.legacy', 8),
+         call('BR2_CONFIG', 'Makefile.legacy', 34)],
+      'add_symbol_legacy_definition': [call('BR2_LEGACY_FOO', 'Makefile.legacy', 9)]}),
+    ('attribution',
+     'Makefile',
+     [[9, 'BR2_FOO = $(BR2_BAR)']],
+     {'add_symbol_definition': [call('BR2_FOO', 'Makefile', 9)],
+      'add_symbol_usage': [call('BR2_BAR', 'Makefile', 9)]}),
+    ('legacy attribution',
+     'Makefile.legacy',
+     [[9, 'BR2_FOO = $(BR2_BAR)']],
+     {'add_symbol_legacy_definition': [call('BR2_FOO', 'Makefile.legacy', 9)],
+      'add_symbol_usage_in_legacy': [call('BR2_BAR', 'Makefile.legacy', 9)]}),
+    ('generic',
+     'package/foo/foo.mk',
+     [[3, 'ifeq ($(BR2_PACKAGE_FOO_BAR):$(BR2_BAR),y:)'],
+      [4, 'export BR2_PACKAGE_FOO_BAZ'],
+      [5, '$(eval $(generic-package))']],
+     {'add_symbol_usage': [
+         call('BR2_PACKAGE_FOO_BAR', 'package/foo/foo.mk', 3),
+         call('BR2_BAR', 'package/foo/foo.mk', 3),
+         call('BR2_PACKAGE_FOO', 'package/foo/foo.mk', 5)],
+      'add_symbol_definition': [call('BR2_PACKAGE_FOO_BAZ', 'package/foo/foo.mk', 4)]}),
+    ('rootfs',
+     'fs/foo/foo.mk',
+     [[4, 'ifeq ($(BR2_TARGET_ROOTFS_FOO_LZ4),y)'],
+      [5, '$(eval $(rootfs))']],
+     {'add_symbol_usage': [
+         call('BR2_TARGET_ROOTFS_FOO', 'fs/foo/foo.mk', 5),
+         call('BR2_TARGET_ROOTFS_FOO_BZIP2', 'fs/foo/foo.mk', 5),
+         call('BR2_TARGET_ROOTFS_FOO_GZIP', 'fs/foo/foo.mk', 5),
+         call('BR2_TARGET_ROOTFS_FOO_LZ4', 'fs/foo/foo.mk', 4),
+         call('BR2_TARGET_ROOTFS_FOO_LZ4', 'fs/foo/foo.mk', 5),
+         call('BR2_TARGET_ROOTFS_FOO_LZMA', 'fs/foo/foo.mk', 5),
+         call('BR2_TARGET_ROOTFS_FOO_LZO', 'fs/foo/foo.mk', 5),
+         call('BR2_TARGET_ROOTFS_FOO_XZ', 'fs/foo/foo.mk', 5),
+         call('BR2_TARGET_ROOTFS_FOO_ZSTD', 'fs/foo/foo.mk', 5)]}),
+    ]
+
+
+@pytest.mark.parametrize('testname,filename,file_content,expected_calls', populate_db)
+def test_populate_db(testname, filename, file_content, expected_calls):
+    db = Mock()
+    m.populate_db(db, filename, file_content)
+    assert_db_calls(db, expected_calls)
+
+
+check_filename = [
+    ('arch/arch.mk.riscv',
+     'arch/arch.mk.riscv',
+     True),
+    ('boot/lpc32xxcdl/lpc32xxcdl.mk',
+     'boot/lpc32xxcdl/lpc32xxcdl.mk',
+     True),
+    ('fs/cramfs/cramfs.mk',
+     'fs/cramfs/cramfs.mk',
+     True),
+    ('linux/linux-ext-fbtft.mk',
+     'linux/linux-ext-fbtft.mk',
+     True),
+    ('package/ace/ace.mk',
+     'package/ace/ace.mk',
+     True),
+    ('package/linux-tools/linux-tool-hv.mk.in',
+     'package/linux-tools/linux-tool-hv.mk.in',
+     True),
+    ('package/pkg-generic.mk',
+     'package/pkg-generic.mk',
+     True),
+    ('package/x11r7/xlib_libXt/xlib_libXt.mk',
+     'package/x11r7/xlib_libXt/xlib_libXt.mk',
+     True),
+    ('support/dependencies/check-host-make.mk',
+     'support/dependencies/check-host-make.mk',
+     True),
+    ('toolchain/toolchain-external/toolchain-external-arm-aarch64-be/toolchain-external-arm-aarch64-be.mk',
+     'toolchain/toolchain-external/toolchain-external-arm-aarch64-be/toolchain-external-arm-aarch64-be.mk',
+     True),
+    ('Makefile.legacy',
+     'Makefile.legacy',
+     True),
+    ('boot/common.mk',
+     'boot/common.mk',
+     True),
+    ('fs/common.mk',
+     'fs/common.mk',
+     True),
+    ('Makefile',
+     'Makefile',
+     True),
+    ('package/Makefile.in',
+     'package/Makefile.in',
+     True),
+    ('Config.in',
+     'Config.in',
+     False),
+    ('package/foo/0001-Makefile.patch',
+     'package/foo/0001-Makefile.patch',
+     False),
+    ]
+
+
+@pytest.mark.parametrize('testname,filename,expected', check_filename)
+def test_check_filename(testname, filename, expected):
+    symbols = m.check_filename(filename)
+    assert symbols == expected
diff --git a/utils/checksymbolslib/test_util.py b/utils/checksymbolslib/test_util.py
new file mode 100644
index 0000000000..166785ba1d
--- /dev/null
+++ b/utils/checksymbolslib/test_util.py
@@ -0,0 +1,15 @@
+def assert_calls(method, expected_calls):
+    method.assert_has_calls(expected_calls, any_order=True)
+    assert method.call_count == len(expected_calls)
+
+
+def assert_db_calls(db, expected_calls):
+    assert_calls(db.add_symbol_legacy_definition, expected_calls.get('add_symbol_legacy_definition', []))
+    assert_calls(db.add_symbol_definition, expected_calls.get('add_symbol_definition', []))
+    assert_calls(db.add_symbol_usage_in_legacy, expected_calls.get('add_symbol_usage_in_legacy', []))
+    assert_calls(db.add_symbol_usage, expected_calls.get('add_symbol_usage', []))
+    assert_calls(db.add_symbol_legacy_usage, expected_calls.get('add_symbol_legacy_usage', []))
+    assert_calls(db.add_symbol_select, expected_calls.get('add_symbol_select', []))
+    assert_calls(db.add_symbol_helper, expected_calls.get('add_symbol_helper', []))
+    assert_calls(db.add_symbol_legacy_note, expected_calls.get('add_symbol_legacy_note', []))
+    assert_calls(db.add_symbol_virtual, expected_calls.get('add_symbol_virtual', []))
-- 
2.34.1

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

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

* Re: [Buildroot] [next 01/25] *: fix typo for separate(d|) in text
  2022-11-27 13:07 ` [Buildroot] [next 01/25] *: fix typo for separate(d|) in text Ricardo Martincoski
@ 2023-02-06 10:23   ` Peter Korsgaard
  2023-02-22 16:08   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 10:23 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: Bernd Kuhls, buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > seperate is a common misspelling of separate
 > Fix all the typos in the tree that are not related to patch files.

 > CHANGES
 >   seperate -> separate, in the list of changes
 > Config.in.legacy
 >   seperate -> separate, in option name and help texts
 > package/leafnode2/leafnode2.mk
 >   seperate -> separate, in a comment
 > system/Config.in
 >   seperated -> separated, in a help text

 > Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 02/25] package, legacy: fix typo for "daemon" on help text
  2022-11-27 13:07 ` [Buildroot] [next 02/25] package, legacy: fix typo for "daemon" on help text Ricardo Martincoski
@ 2023-02-06 10:24   ` Peter Korsgaard
  2023-02-22 16:08   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 10:24 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > deamon -> daemon
 > At same time, in Config.in.legacy fix other typos in the same help text:
 > spae -> space
 > monolitic -> monolithic

 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 03/25] Config.in.legacy: fix typo on BR2_PACKAGE_MEDIAART_BACKEND_QT
  2022-11-27 13:07 ` [Buildroot] [next 03/25] Config.in.legacy: fix typo on BR2_PACKAGE_MEDIAART_BACKEND_QT Ricardo Martincoski
@ 2023-02-06 10:26   ` Peter Korsgaard
  2023-02-22 16:08   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 10:26 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: Thomas Petazzoni, buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Currently using this minimal .config:
 >  BR2_PACKAGE_MEDIAART_BACKEND_GDK_PIXBUF=y
 > triggers:
 >      *** Legacy options removed in 2018.05 ***
 >  [ ] libmediaart none backend option renamed (NEW)
 >  [*] libmediaart gdk-pixbuf backend option renamed
 >  [*] libmediaart qt backend option renamed

 > Commit "8553b39887 libmediaart: rename options to have proper prefix",
 > part of the 2018.05 release had a copy&paste error.

 > As stated in the beginning of the file:
 >  The oldest symbols will be removed again after about two years.
 > But while we carry these legacy symbols, let's fix the typo.

 > Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
 > ---
 > NOTE: Maybe it is time to drop old legacy symbols again?
 > If so, some patches in this series can be dropped.

Possibly, but they don't really cause a big maintenance issue, so I've
left them for now.

Committed, thanks.

> ---
 >  Config.in.legacy | 2 +-
 >  1 file changed, 1 insertion(+), 1 deletion(-)

 > diff --git a/Config.in.legacy b/Config.in.legacy
 > index 4eff5b55d6..9ce1004b0c 100644
 > --- a/Config.in.legacy
 > +++ b/Config.in.legacy
 > @@ -2594,7 +2594,7 @@ config BR2_PACKAGE_MEDIAART_BACKEND_GDK_PIXBUF
 >  	  BR2_PACKAGE_MEDIAART_BACKEND_GDK_PIXBUF has been renamed to
 >  	  BR2_PACKAGE_LIBMEDIAART_BACKEND_GDK_PIXBUF
 
 > -config BR2_PACKAGE_MEDIAART_BACKEND_GDK_PIXBUF
 > +config BR2_PACKAGE_MEDIAART_BACKEND_QT
 >  	bool "libmediaart qt backend option renamed"
 >  	select BR2_LEGACY
 >  	help
 > -- 

 > 2.34.1

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


-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 04/25] utils/checkpackagelib: warn about redefined config
  2022-11-27 13:07 ` [Buildroot] [next 04/25] utils/checkpackagelib: warn about redefined config Ricardo Martincoski
@ 2023-02-06 11:03   ` Peter Korsgaard
  2023-02-22 16:09   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 11:03 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Warn the developer in the case the same config is declared more than
 > once in the same Config.in file.
 > But take into account the conditional code that lets the config be
 > visible and warn only when it is declared more than once in the same
 > conditions.
 > For instance, do not warn for:
 >  if BR2_PACKAGE_BUSYBOX
 >  config BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 >  endif
 >  if !BR2_PACKAGE_BUSYBOX # kconfig doesn't support else
 >  config BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 >  endif

 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 05/25] support/scripts/generate-gitlab-ci-yml: improve test-pkg support
  2022-11-27 13:07 ` [Buildroot] [next 05/25] support/scripts/generate-gitlab-ci-yml: improve test-pkg support Ricardo Martincoski
@ 2023-02-06 11:04   ` Peter Korsgaard
  2023-02-22 16:38   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 11:04 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Following the example of test-pkg config described in commit
 > "12c7a05da1 utils/test-pkg: add gitlab-ci support" to test a defconfig
 > fragment that contains a disabled option is currently possible, but
 > it do requires one to change the git config core.commentChart so the
 > lines starting with "#" are not discarded by git when creating/editing
 > the commit message.

 > For instance, without the indentation the 3rd line below would be
 > excluded from the commit message when the editor is closed:
 >     test-pkg config:
 >     SOME_OPTION=y
 >     # OTHER_OPTION is not set
 >     SOME_VARIABLE="some value"

 > Requiring to change git configs is not very nice.
 > So make the developer's life easier by changing the sed expression to
 > remove indentation with spaces from a defconfig fragment found on a
 > commit message.
 > For instance these lines become valid and generate a defconfig fragment
 > without the indentation of one space to be tested in GitLab CI:
 > test-pkg config:
 >  SOME_OPTION=y
 >  # OTHER_OPTION is not set
 >  SOME_VARIABLE="some value"

 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
 > ---
 > Example usage:
 > https://gitlab.com/RicardoMartincoski/buildroot/-/pipelines/704846763

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 06/25] package/fwts: use ifeq instead of ifdef
  2022-11-27 13:07 ` [Buildroot] [next 06/25] package/fwts: use ifeq instead of ifdef Ricardo Martincoski
@ 2023-02-06 11:04   ` Peter Korsgaard
  2023-02-22 16:38   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 11:04 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: Thomas Petazzoni, buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > The conditional code using ifdef was added in 2018 and works as
 > expected.
 > But there is no reason to use ifdef instead of ifeq.

 > For consistence, switch to use ifeq like almost all packages already do.

 > Cc: Arnout Vandecappelle <arnout@mind.be>
 > Cc: Erico Nunes <nunes.erico@gmail.com>
 > Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 07/25] package/live555: fix build config with locale
  2022-11-27 13:07 ` [Buildroot] [next 07/25] package/live555: fix build config with locale Ricardo Martincoski
@ 2023-02-06 11:06   ` Peter Korsgaard
  2023-02-22 16:38   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 11:06 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Using current conditional code, added in 2014:
 > ifndef ($(BR2_ENABLE_LOCALE),y)
 > LIVE555_CFLAGS += -DLOCALE_NOT_USED
 > endif

 > the define LOCALE_NOT_USED is always passed on CFLAGS, because there is
 > no symbol with following names defined:
 >  "(y,y)" -> not defined when BR2_ENABLE_LOCALE=y
 >  "(,y)" -> not defined when BR2_ENABLE_LOCALE is not set

 > So fix the typo, switching ifndef to ifneq.

 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 08/25] package/pugixml: unconditionally set BUILD_DEFINES
  2022-11-27 13:07 ` [Buildroot] [next 08/25] package/pugixml: unconditionally set BUILD_DEFINES Ricardo Martincoski
@ 2023-02-06 11:07   ` Peter Korsgaard
  2023-02-22 16:39   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 11:07 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: Theo Debrouwere, buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > The ifdef construct intended to avoid passing -DBUILD_DEFINES="" was
 > never needed, because even upstream version v1.9 used in 2019 when the
 > configuration options were added, can handle an empty string for
 > BUILD_DEFINES.
 > In fact an empty string is the default for v1.9 if it is not passed
 > during configure.

 > Also, the host variant already sets BUILD_DEFINES unconditionally.

 > So remove the unneeded conditional.

 > Cc: Arnout Vandecappelle <arnout@mind.be>
 > Cc: Theo Debrouwere <t.debrouwere@televic.com>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
 > ---
 > NOTE 1:
 > For versions starting from v1.11 this flag BUILD_DEFINES is ignored, but
 > it will be fixed in the next patch.
 > I had split into 2 patches because this first one applies to old
 > versions of the package too. Someone could theoretically decide to
 > backport to a local copy of buildroot 2020.05.x for instance.

 > NOTE 2:
 > It doesn't test much, since BUILD_DEFINES is ignored, but anyway:
 > https://gitlab.com/RicardoMartincoski/buildroot/-/pipelines/704554673
 > 44 builds, 1 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed
 > test-pkg config:
 > BR2_PACKAGE_PUGIXML=y

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 09/25] package/pugixml: fix configuration options
  2022-11-27 13:07 ` [Buildroot] [next 09/25] package/pugixml: fix configuration options Ricardo Martincoski
@ 2023-02-06 11:09   ` Peter Korsgaard
  2023-02-22 16:40   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 11:09 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: Theo Debrouwere, buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Commit upstream 1c5a0bb32583fd294022e68e66b541bf6ff71a67
 > ":sparkles: Update CMake to modern approach" removed all feature
 > toogles, so starting from release v1.11 any flag passed in BUILD_DEFINES
 > was completely ignored during the build.
 > Version 1.11.4 was in use in buildroot since February 2021.

 > Commit upstream 0f1e75a902ef1751dd63a67fe223b5e8daf4c7f1
 > "Re-introduced the custom build defines" added PUGIXML_BUILD_DEFINES to
 > release v1.12, but BUILD_DEFINES is still completely ignored during the
 > build.
 > Version 1.12.1 is in use in buildroot since March 2022.

 > So switch the config options to use PUGIXML_BUILD_DEFINES instead of
 > BUILD_DEFINES.

 > Cc: Arnout Vandecappelle <arnout@mind.be>
 > Cc: Theo Debrouwere <t.debrouwere@televic.com>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
 > ---
 > NOTE 1:
 > The code below can be useful to verify the statements above, after
 > commenting some lines:
 > |PUGIXML_VERSION = 1.11.4
 > |PUGIXML_VERSION = 1.10
 > |PUGIXML_VERSION = 1.9
 > |define PUGIXML_FORCE_BUILD_ERROR
 > |        echo '#ifdef PUGIXML_COMPACT' >> $(@D)/src/pugixml.cpp
 > |        echo '#error 111' >> $(@D)/src/pugixml.cpp
 > |        echo '#else' >> $(@D)/src/pugixml.cpp
 > |        echo '#error 222' >> $(@D)/src/pugixml.cpp
 > |        echo '#endif' >> $(@D)/src/pugixml.cpp
 > |endef
 > |PUGIXML_POST_PATCH_HOOKS += PUGIXML_FORCE_BUILD_ERROR
 > |PUGIXML_BUILD_DEFINES += PUGIXML_COMPACT
 > |PUGIXML_CONF_OPTS += -DBUILD_DEFINES="$(subst $(space),;,$(PUGIXML_BUILD_DEFINES))"
 > |PUGIXML_CONF_OPTS += -DPUGIXML_BUILD_DEFINES="$(subst $(space),;,$(PUGIXML_BUILD_DEFINES))"
 > |PUGIXML_CONF_OPTS += -DPUGIXML_COMPACT=ON

 > NOTE 2:
 > Current version for each branch:
 > $ git grep ^PUGIXML_VERSION \
 >     origin/next origin/master $(git branch -a | grep origin/202) \
 >     | sed -e 's,^remotes/,,g' -e 's,^origin/,,g' | sort
 > 2020.02.x:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.11.4
 > 2020.05.x:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.10
 > 2020.08.x:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.10
 > 2020.11.x:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.11.4
 > 2021.02.x:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.11.4
 > 2021.05.x:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.11.4
 > 2021.08.x:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.11.4
 > 2021.11.x:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.11.4
 > 2022.02.x:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.11.4
 > 2022.05.x:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.12.1
 > 2022.08.x:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.12.1
 > master:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.12.1
 > next:package/pugixml/pugixml.mk:PUGIXML_VERSION = 1.12.1

 > NOTE 3:
 > local build tests to check size:
 > pugixml-compact/graphs/package-size-stats.csv:pugixml,165216,1.9q
 > pugixml-default/graphs/package-size-stats.csv:pugixml,152928,1.8q
 > pugixml-header-only/graphs/package-size-stats.csv:pugixml,13660,0.2
 > pugixml-noxpath/graphs/package-size-stats.csv:pugixml,95532,1.1
 > pugixml-compact/defconfig:BR2_x86_i686=y
 > pugixml-compact/defconfig:BR2_TOOLCHAIN_EXTERNAL=y
 > pugixml-compact/defconfig:BR2_PACKAGE_PUGIXML=y
 > pugixml-compact/defconfig:BR2_PACKAGE_PUGIXML_COMPACT=y
 > pugixml-default/defconfig:BR2_x86_i686=y
 > pugixml-default/defconfig:BR2_TOOLCHAIN_EXTERNAL=y
 > pugixml-default/defconfig:BR2_PACKAGE_PUGIXML=y
 > pugixml-header-only/defconfig:BR2_x86_i686=y
 > pugixml-header-only/defconfig:BR2_TOOLCHAIN_EXTERNAL=y
 > pugixml-header-only/defconfig:BR2_PACKAGE_PUGIXML=y
 > pugixml-header-only/defconfig:BR2_PACKAGE_PUGIXML_HEADER_ONLY=y
 > pugixml-noxpath/defconfig:BR2_x86_i686=y
 > pugixml-noxpath/defconfig:BR2_TOOLCHAIN_EXTERNAL=y
 > pugixml-noxpath/defconfig:BR2_PACKAGE_PUGIXML=y
 > pugixml-noxpath/defconfig:# BR2_PACKAGE_PUGIXML_XPATH_SUPPORT is not set

 > NOTE 4:
 > build tests on GitLab CI
 > test-pkg config 1:
 >  BR2_PACKAGE_PUGIXML=y
 > https://gitlab.com/RicardoMartincoski/buildroot/-/pipelines/704564417
 > 44 builds, 1 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed
 > test-pkg config 2:
 >  BR2_PACKAGE_PUGIXML=y
 >  BR2_PACKAGE_PUGIXML_COMPACT=y
 > https://gitlab.com/RicardoMartincoski/buildroot/-/pipelines/704755515
 > 44 builds, 1 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed
 > test-pkg config 3:
 >  BR2_PACKAGE_PUGIXML=y
 >  # BR2_PACKAGE_PUGIXML_XPATH_SUPPORT is not set
 > https://gitlab.com/RicardoMartincoski/buildroot/-/pipelines/704849811
 > 44 builds, 1 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed
 > test-pkg config 4:
 >  BR2_PACKAGE_PUGIXML=y
 >  BR2_PACKAGE_PUGIXML_HEADER_ONLY=y
 > https://gitlab.com/RicardoMartincoski/buildroot/-/pipelines/704851087
 > 44 builds, 1 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed

Committed, thanks. It's great with all these details!

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 10/25] package/pugixml: use explicit build options
  2022-11-27 13:07 ` [Buildroot] [next 10/25] package/pugixml: use explicit build options Ricardo Martincoski
@ 2023-02-06 11:12   ` Peter Korsgaard
  2023-02-22 16:41   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 11:12 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: Theo Debrouwere, buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Commit upstream 986b7ffd01aedcd4f2aa16e78e4cad9313b6d7b2
 > "Add Cmake options for pugiconfig.hpp" added feature toogles to release
 > v1.12, including PUGIXML_NO_XPATH and PUGIXML_COMPACT.

 > Commit upstream 5f49f2c6575cc2b7d343f8d41581fe92d69d7b52
 > "Mark advanced options and removed redundant ones" removed CMake
 > specific support for PUGIXML_HEADER_ONLY and PUGIXML_HAS_LONG_LONG, but
 > they can still be provided using PUGIXML_BUILD_DEFINES, starting from
 > release v1.12.

 > So use the explicit build options PUGIXML_NO_XPATH and PUGIXML_COMPACT,
 > but keep using PUGIXML_BUILD_DEFINES to set PUGIXML_HEADER_ONLY and
 > PUGIXML_HAS_LONG_LONG.

 > Cc: Arnout Vandecappelle <arnout@mind.be>
 > Cc: Theo Debrouwere <t.debrouwere@televic.com>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
 > ---
 > local build tests to check size:
 > pugixml-compact/graphs/package-size-stats.csv:pugixml,165216,1.9q
 > pugixml-default/graphs/package-size-stats.csv:pugixml,152928,1.8q
 > pugixml-header-only/graphs/package-size-stats.csv:pugixml,13660,0.2
 > pugixml-noxpath/graphs/package-size-stats.csv:pugixml,95532,1.1
 > pugixml-compact/defconfig:BR2_x86_i686=y
 > pugixml-compact/defconfig:BR2_TOOLCHAIN_EXTERNAL=y
 > pugixml-compact/defconfig:BR2_PACKAGE_PUGIXML=y
 > pugixml-compact/defconfig:BR2_PACKAGE_PUGIXML_COMPACT=y
 > pugixml-default/defconfig:BR2_x86_i686=y
 > pugixml-default/defconfig:BR2_TOOLCHAIN_EXTERNAL=y
 > pugixml-default/defconfig:BR2_PACKAGE_PUGIXML=y
 > pugixml-header-only/defconfig:BR2_x86_i686=y
 > pugixml-header-only/defconfig:BR2_TOOLCHAIN_EXTERNAL=y
 > pugixml-header-only/defconfig:BR2_PACKAGE_PUGIXML=y
 > pugixml-header-only/defconfig:BR2_PACKAGE_PUGIXML_HEADER_ONLY=y
 > pugixml-noxpath/defconfig:BR2_x86_i686=y
 > pugixml-noxpath/defconfig:BR2_TOOLCHAIN_EXTERNAL=y
 > pugixml-noxpath/defconfig:BR2_PACKAGE_PUGIXML=y
 > pugixml-noxpath/defconfig:# BR2_PACKAGE_PUGIXML_XPATH_SUPPORT is not set

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 11/25] package/busybox: add comment about variable override
  2022-11-27 13:07 ` [Buildroot] [next 11/25] package/busybox: add comment about variable override Ricardo Martincoski
@ 2023-02-06 11:13   ` Peter Korsgaard
  2023-02-22 16:41   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 11:13 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > The same comment already exists for UCLIBC_CONFIG_FILE.
 > Both variables can be override from command-line, as described in the
 > manual, at section 'Environment variables'.

 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 12/25] utils/checkpackagelib: warn about ifdef on .mk
  2022-11-27 13:07 ` [Buildroot] [next 12/25] utils/checkpackagelib: warn about ifdef on .mk Ricardo Martincoski
@ 2023-02-06 11:15   ` Peter Korsgaard
  2023-02-22 16:44   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 11:15 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > There are two legitimate cases to prefer ifdef over ifeq in package
 > recipes: command-line overrides are allowed for busybox and uclibc
 > configs.

 > Except for that, all package in tree already use ifeq, so warn the
 > developer adding/changing a package to use ifeq instead of ifdef, in
 > order to keep consistence across packages.
 > file.mk:2: use ifeq ($(SYMBOL),y) instead of ifdef SYMBOL
 > file.mk:5: use ifneq ($(SYMBOL),y) instead of ifndef SYMBOL

 > The difference between ifeq and ifdef is that ifdef doesn't expand
 > recursively.

 > Add comments to busybox and uclibc packages to avoid a warning in such
 > special cases.

 > Cc: Arnout Vandecappelle <arnout@mind.be>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
 > ---
 > NOTE 1:
 > I only state "all package in tree already use ifeq" because earlier in
 > the series other 3 (2 ifdef and 1 ifndef) uses were removed.

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 13/25] toolchain/toolchain-buildroot: add comment about using virtual package infra
  2022-11-27 13:07 ` [Buildroot] [next 13/25] toolchain/toolchain-buildroot: add comment about using virtual package infra Ricardo Martincoski
@ 2023-02-06 11:26   ` Peter Korsgaard
  2023-02-22 16:44   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 11:26 UTC (permalink / raw)
  To: Ricardo Martincoski
  Cc: Yann E . MORIN, Thomas Petazzoni, buildroot, Romain Naour,
	Giulio Benetti, Thomas De Schampheleire

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Commit "9a8ec9195c toolchain/toolchain-buildroot: migrate to virtual
 > package infrastructure" made the packages toolchain and
 > toolchain-buildroot to use the virtual package infra even they being
 > generic packages.
 > This works because on package/pkg-virtual.mk when a package do not
 > define neither _PROVIDES_ or _HAS_ symbols, only _IS_VIRTUAL is set to
 > YES and _VERSION and _SOURCE are set to empty before relaying the call
 > to inner-generic-package.

 > Add a comment explaining why the virtual package infra is used in these
 > cases.

 > Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
 > Cc: Romain Naour <romain.naour@gmail.com>
 > Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
 > Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 > Cc: Yann E. MORIN <yann.morin.1998@free.fr>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 14/25] boot/uboot: remove use of legacy xloader symbol
  2022-11-27 13:07 ` [Buildroot] [next 14/25] boot/uboot: remove use of legacy xloader symbol Ricardo Martincoski
@ 2023-02-06 11:26   ` Peter Korsgaard
  2023-02-22 16:45   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 11:26 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Commit "070b183d0c boot/xloader: remove package", from release 2018.11,
 > removed the package, but the symbol is still referenced.

 > Remove the reference to it.

 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 15/25] system: remove use of legacy md5 option
  2022-11-27 13:07 ` [Buildroot] [next 15/25] system: remove use of legacy md5 option Ricardo Martincoski
@ 2023-02-06 11:27   ` Peter Korsgaard
  2023-02-22 16:45   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 11:27 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Commit "bf3626002f system cfg: remove mkpasswd MD5 format option", from
 > release 2019.02, moved the symbol to legacy handling, but the symbol is
 > still referenced.

 > Remove the reference to it.

 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 16/25] package/linux-headers: remove bogus symbol BR2_PACKAGE_HOST_LINUX_HEADERS
  2022-11-27 13:07 ` [Buildroot] [next 16/25] package/linux-headers: remove bogus symbol BR2_PACKAGE_HOST_LINUX_HEADERS Ricardo Martincoski
@ 2023-02-06 11:29   ` Peter Korsgaard
  2023-02-22 16:46   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 11:29 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > The package host-linux-headers does not exist and there were never
 > references to this symbol in the tree, do drop it.

 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 17/25] package/gitlab-runner: ensure use of LIBCURL_OPENSSL
  2022-11-27 13:07 ` [Buildroot] [next 17/25] package/gitlab-runner: ensure use of LIBCURL_OPENSSL Ricardo Martincoski
@ 2023-02-06 11:37   ` Peter Korsgaard
  2023-02-06 15:05     ` Peter Korsgaard
  0 siblings, 1 reply; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 11:37 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: Romain Naour, Marcin Niestroj, buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Currently this minimal config is accepted while it shouldn't:
 > BR2_x86_i686=y
 > BR2_PACKAGE_BEARSSL=y
 > BR2_PACKAGE_LIBCURL_BEARSSL=y
 > BR2_PACKAGE_GITLAB_RUNNER=y

 > BR2_PACKAGE_GITLAB_RUNNER selects BR2_PACKAGE_LIBCURL_OPENSSL.
 > Kconfig does not enforce a select when the symbol selected is part of a
 > choice. See similar explanation on [1] and [2].

 > Doing something similar to [3] and depending on the choice option
 > instead of selecting it would create a Kconfig recursive dependency.

 > Just dropping the ineffective select would keep the above defconfig
 > snippet as an accepted one.

 > Adding a comment to the menu, i.e.:
 > comment "gitlab-runner must use BR2_PACKAGE_LIBCURL_OPENSSL"
 >        depends on BR2_PACKAGE_GITLAB_RUNNER
 >        depends on !BR2_PACKAGE_LIBCURL_OPENSSL
 > could improve user experience but it also keeps the above defconfig
 > snippet as an accepted one.

 > So bail out the build when gitlab-runner is enabled and libcurl-openssl
 > is not selected, similar to what is done in [4].

 > [1] "a44b1c1405 legacy: update the BR2_PREFER_STATIC_LIB option"
 > [2] "b1d5aa1bc2 package/qwt: Fix selecting OpenGL support in qt4"
 > [3] "9fc652a373 package/libmodsecurity: needs dynamic library with
 >      libcurl and mbedtls"
 > [4] "fda53f0791 package/Makefile.in: add detection for the lack of C
 >      library"

 > Cc: Marcin Niestroj <m.niestroj@grinn-global.com>
 > Cc: Romain Naour <romain.naour@gmail.com>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

The change as such is fine, but why does gitlab-runner really need the
curl binary to use the openssl backend? Perhaps it is just about curl
having HTTPS support?



> ---
 >  package/gitlab-runner/Config.in        | 1 -
 >  package/gitlab-runner/gitlab-runner.mk | 4 ++++
 >  2 files changed, 4 insertions(+), 1 deletion(-)

 > diff --git a/package/gitlab-runner/Config.in b/package/gitlab-runner/Config.in
 > index 89e3e87b5c..5b8a6cacbe 100644
 > --- a/package/gitlab-runner/Config.in
 > +++ b/package/gitlab-runner/Config.in
 > @@ -11,7 +11,6 @@ config BR2_PACKAGE_GITLAB_RUNNER
 >  	select BR2_PACKAGE_GIT # runtime
 >  	select BR2_PACKAGE_LIBCURL # runtime
 >  	select BR2_PACKAGE_LIBCURL_CURL # runtime
 > -	select BR2_PACKAGE_LIBCURL_OPENSSL # runtime, for ca-certificates.
 >  	select BR2_PACKAGE_OPENSSL # runtime
 >  	select BR2_PACKAGE_OPENSSL_FORCE_LIBOPENSSL # runtime
 >  	select BR2_PACKAGE_LIBOPENSSL_BIN # runtime
 > diff --git a/package/gitlab-runner/gitlab-runner.mk b/package/gitlab-runner/gitlab-runner.mk
 > index c7c2da2fe1..c997785d90 100644
 > --- a/package/gitlab-runner/gitlab-runner.mk
 > +++ b/package/gitlab-runner/gitlab-runner.mk
 > @@ -12,6 +12,10 @@ GITLAB_RUNNER_LICENSE_FILES = LICENSE
 >  GITLAB_RUNNER_LDFLAGS = \
 >  	-X gitlab.com/gitlab-org/gitlab-runner/common.VERSION=$(GITLAB_RUNNER_VERSION)
 
 > +ifeq ($(BR2_PACKAGE_GITLAB_RUNNER):$(BR2_PACKAGE_LIBCURL_OPENSSL):$(BR_BUILDING),y::y)
 > +$(error gitlab-runner must use BR2_PACKAGE_LIBCURL_OPENSSL for ca-certificates at runtime)
 > +endif
 > +
 >  # Don't run gitlab runner as root.
 >  define GITLAB_RUNNER_USERS
 >  	gitlab-runner -1 gitlab-runner -1 * /var/run/dbus /bin/false - Gitlab Runner
 > -- 

 > 2.34.1

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


-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 18/25] package/openpowerlink: properly handle legacy options
  2022-11-27 13:07 ` [Buildroot] [next 18/25] package/openpowerlink: properly handle legacy options Ricardo Martincoski
@ 2023-02-06 11:45   ` Peter Korsgaard
  2023-02-22 16:47   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 11:45 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: Romain Naour, buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Commit "b1063a0136 package/openpowerlink: bump to v2.2.2" tried to add
 > legacy handling but the new symbols are part of a choice, and Kconfig
 > does not enforce the select of a option from a choice.

 > Update the legacy entry for 2016.02, following the example described in
 > the beginning of the file.

 > Cc: Romain Naour <romain.naour@gmail.com>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 19/25] package/gcc: properly handle legacy for renamed ARC option
  2022-11-27 13:07 ` [Buildroot] [next 19/25] package/gcc: properly handle legacy for renamed ARC option Ricardo Martincoski
@ 2023-02-06 11:48   ` Peter Korsgaard
  2023-02-22 16:47   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 11:48 UTC (permalink / raw)
  To: Ricardo Martincoski
  Cc: Giulio Benetti, Romain Naour, Thomas Petazzoni, buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Commit "50332a530b gcc: rename option for ARC gcc" tried to add legacy
 > handling but the new symbol is part of a choice, and Kconfig does not
 > enforce the select of a option from a choice.

 > Update the legacy entry for 2016.11, following the example described in
 > the beginning of the file.

 > Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
 > Cc: Romain Naour <romain.naour@gmail.com>
 > Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 20/25] package/lua: properly handle legacy for removed version
  2022-11-27 13:07 ` [Buildroot] [next 20/25] package/lua: properly handle legacy for removed version Ricardo Martincoski
@ 2023-02-06 13:22   ` Peter Korsgaard
  2023-02-22 16:48   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 13:22 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Commit "297613f1c7 package/lua: remove 5.2.x version" tried to add
 > legacy handling but the new symbols are part of a choice, and Kconfig
 > does not enforce the select of a option from a choice.

 > Update the legacy entry for 2019.02, following the example described in
 > the beginning of the file.

 > Cc: Francois Perrad <francois.perrad@gadz.org>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 21/25] package/ti-sgx-km: properly handle legacy for removed options
  2022-11-27 13:07 ` [Buildroot] [next 21/25] package/ti-sgx-km: properly handle legacy for removed options Ricardo Martincoski
@ 2023-02-06 13:25   ` Peter Korsgaard
  2023-02-22 16:49   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 13:25 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Commit "c38b5566fe package/ti-sgx-{km, um, demos}: bump to latest TI
 > version", added in release 2020.02, removed some options that were
 > previously renamed in release 2018.05.

 > Update the legacy entry for 2018.05 and add the corresponding legacy
 > entries for 2020.02.

 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 22/25] package/openjdk: properly handle legacy for renamed options
  2022-11-27 13:07 ` [Buildroot] [next 22/25] package/openjdk: properly handle legacy for renamed options Ricardo Martincoski
@ 2023-02-06 13:27   ` Peter Korsgaard
  2023-02-22 16:49   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 13:27 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: Tudor Holton, buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Commit "a610bf9967 package/openjdk{-bin}: bump version to 17.0.1+12"
 > tried to add legacy handling but the new symbols are part of a choice,
 > and Kconfig does not enforce the select of a option from a choice.

 > Update the legacy entry for 2021.11, following the example described in
 > the beginning of the file.

 > Cc: Tudor Holton <buildroot@tudorholton.com>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 23/25] package/sunxi-mali-utgard: properly handle legacy for renamed options
  2022-11-27 13:07 ` [Buildroot] [next 23/25] package/sunxi-mali-utgard: " Ricardo Martincoski
@ 2023-02-06 13:28   ` Peter Korsgaard
  2023-02-22 16:50   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 13:28 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: Giulio Benetti, buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Commit "6a7a652b14 package/sunxi-mali-utgard: rename from
 > sunxi-mali-mainline" tried to add legacy handling but the new symbols
 > are part of a choice, and Kconfig does not enforce the select of a
 > option from a choice.

 > Update the legacy entry for 2022.02, following the example described in
 > the beginning of the file.

 > Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 24/25] package/rpi-userland: fix typo for BR2_aarch64
  2022-11-27 13:07 ` [Buildroot] [next 24/25] package/rpi-userland: fix typo for BR2_aarch64 Ricardo Martincoski
@ 2023-02-06 13:28   ` Peter Korsgaard
  0 siblings, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 13:28 UTC (permalink / raw)
  To: Ricardo Martincoski
  Cc: Mahyar Koshkouei, Tim Gover, Thomas Petazzoni, buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Commit "59adb53c4c package/rpi-userland: add support for aarch64"
 > introduced a typo in the condition that shows a comment in menuconfig.

 > Fix the typo: BR2_arch64 -> BR2_aarch64

 > Cc: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
 > Cc: Tim Gover <tim.gover@raspberrypi.com>
 > Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 17/25] package/gitlab-runner: ensure use of LIBCURL_OPENSSL
  2023-02-06 11:37   ` Peter Korsgaard
@ 2023-02-06 15:05     ` Peter Korsgaard
  0 siblings, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 15:05 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: Romain Naour, Marcin Niestroj, buildroot

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:
 >> Currently this minimal config is accepted while it shouldn't:
 >> BR2_x86_i686=y
 >> BR2_PACKAGE_BEARSSL=y
 >> BR2_PACKAGE_LIBCURL_BEARSSL=y
 >> BR2_PACKAGE_GITLAB_RUNNER=y

 >> BR2_PACKAGE_GITLAB_RUNNER selects BR2_PACKAGE_LIBCURL_OPENSSL.
 >> Kconfig does not enforce a select when the symbol selected is part of a
 >> choice. See similar explanation on [1] and [2].

 >> Doing something similar to [3] and depending on the choice option
 >> instead of selecting it would create a Kconfig recursive dependency.

 >> Just dropping the ineffective select would keep the above defconfig
 >> snippet as an accepted one.

 >> Adding a comment to the menu, i.e.:
 >> comment "gitlab-runner must use BR2_PACKAGE_LIBCURL_OPENSSL"
 >> depends on BR2_PACKAGE_GITLAB_RUNNER
 >> depends on !BR2_PACKAGE_LIBCURL_OPENSSL
 >> could improve user experience but it also keeps the above defconfig
 >> snippet as an accepted one.

 >> So bail out the build when gitlab-runner is enabled and libcurl-openssl
 >> is not selected, similar to what is done in [4].

 >> [1] "a44b1c1405 legacy: update the BR2_PREFER_STATIC_LIB option"
 >> [2] "b1d5aa1bc2 package/qwt: Fix selecting OpenGL support in qt4"
 >> [3] "9fc652a373 package/libmodsecurity: needs dynamic library with
 >> libcurl and mbedtls"
 >> [4] "fda53f0791 package/Makefile.in: add detection for the lack of C
 >> library"

 >> Cc: Marcin Niestroj <m.niestroj@grinn-global.com>
 >> Cc: Romain Naour <romain.naour@gmail.com>
 >> Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

 > The change as such is fine, but why does gitlab-runner really need the
 > curl binary to use the openssl backend? Perhaps it is just about curl
 > having HTTPS support?

A that is presumably what was meant I have instead changed it to use
the BR2_PACKAGE_LIBCURL_FORCE_TLS option.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 25/25] utils/check-symbols: new script
  2022-11-27 13:07 ` [Buildroot] [next 25/25] utils/check-symbols: new script Ricardo Martincoski
@ 2023-02-06 15:30   ` Peter Korsgaard
  0 siblings, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-06 15:30 UTC (permalink / raw)
  To: Ricardo Martincoski, Thomas Petazzoni, arnout, yann.morin.1998; +Cc: buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

Hi,

 > This script checks for inconsistencies on symbols declared in Config.in
 > and used in .mk files.
 > Currently it checks only symbols following the pattern BR2_\w+ .

 > The script first gets the list of all files in the repository (using git
 > ls-files like 'make check-flake8' already do).

 > Then it parses all relevant files, searching for symbol definitions and
 > usages, and add entries into a database.

 > At the end, the database is searched for inconsistencies:
 > - symbol that is part of "choice" and is referenced with "select";
 > - legacy symbol being referenced in packages;
 > - legacy symbol being redefined in packages;
 > - symbol referenced but not defined;
 > - symbol defined but not referenced;
 > - legacy symbol that has a Note stating it is referenced by a package
 >   (for legacy handling) but is referenced in the package without a
 >   comment "# legacy";
 > - legacy symbol that has a Note stating it is referenced by a package
 >   but it is not actually referenced.

 > There is also a debug parameter --search that dumps any filename or
 > symbol entries from the database that matches a regexp.

 > Sample usages:
 > $ utils/check-symbols
 > $ utils/docker-run utils/check-symbols
 > $ utils/check-symbols --search 'GETTEXT\b|\/openssl'

 > At same time the script is created:
 > - add unit tests for it, they can be run using:
 >   utils/docker-run python3 -m pytest -v utils/checksymbolslib/
 > - add two more GitLab CI jobs: check-symbols (to check current tree
 >   using the script) and check-check-symbols (to check the script against
 >   its unit tests)

Cool! It is somewhat annoying that it is separate from check-package,
but given that it needs to work on all files and check-package doesn't,
I indeed also cannot see a good way to fix that.

We should probably add a small notice about it in the manual, E.G. in
adding-packages-tips.txt. Care to send a patch for that?


 > +++ b/utils/check-symbols
 > @@ -0,0 +1,78 @@
 > +#!/usr/bin/env python3
 > +
 > +import argparse
 > +import os
 > +import sys
 > +
 > +import checksymbolslib.file as file
 > +from checksymbolslib.db import DB
 > +
 > +
 > +def parse_args():
 > +    parser = argparse.ArgumentParser()
 > +    parser.add_argument('--search', action='store', default=None,
 > +                        help='print all symbols matching a given regular expression')
 > +    return parser.parse_args()
 > +
 > +
 > +def change_current_dir():
 > +    base_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
 > +    os.chdir(base_dir)

change_current_dir() is IMHO not a very clear name, so I've changed it
to change_to_top_dir() instead.
 > +
 > +    warnings = []
 > +    warnings += db.get_warnings_for_choices_selected()
 > +    warnings += db.get_warnings_for_legacy_symbols_being_defined()
 > +    warnings += db.get_warnings_for_legacy_symbols_being_used()
 > +    warnings += db.get_warnings_for_symbols_with_legacy_note_and_no_comment_on_usage()
 > +    warnings += db.get_warnings_for_symbols_with_legacy_note_and_no_usage()
 > +    warnings += db.get_warnings_for_symbols_without_definition()
 > +    warnings += db.get_warnings_for_symbols_without_usage()
 > +
 > +    for filename, lineno, msg in sorted(warnings):
 > +        print('{}:{}: {}'.format(filename, lineno, msg))

Warnings typically go to stderr, so I changed this to print to stderr.

Committed with the above changes, thanks.

Arnout/Thomas/Yann, please update your post-applypatch script to also
run check-symbols.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 01/25] *: fix typo for separate(d|) in text
  2022-11-27 13:07 ` [Buildroot] [next 01/25] *: fix typo for separate(d|) in text Ricardo Martincoski
  2023-02-06 10:23   ` Peter Korsgaard
@ 2023-02-22 16:08   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-22 16:08 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: Bernd Kuhls, buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > seperate is a common misspelling of separate
 > Fix all the typos in the tree that are not related to patch files.

 > CHANGES
 >   seperate -> separate, in the list of changes
 > Config.in.legacy
 >   seperate -> separate, in option name and help texts
 > package/leafnode2/leafnode2.mk
 >   seperate -> separate, in a comment
 > system/Config.in
 >   seperated -> separated, in a help text

 > Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed to 2022.11.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 02/25] package, legacy: fix typo for "daemon" on help text
  2022-11-27 13:07 ` [Buildroot] [next 02/25] package, legacy: fix typo for "daemon" on help text Ricardo Martincoski
  2023-02-06 10:24   ` Peter Korsgaard
@ 2023-02-22 16:08   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-22 16:08 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > deamon -> daemon
 > At same time, in Config.in.legacy fix other typos in the same help text:
 > spae -> space
 > monolitic -> monolithic

 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed to 2022.11.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 03/25] Config.in.legacy: fix typo on BR2_PACKAGE_MEDIAART_BACKEND_QT
  2022-11-27 13:07 ` [Buildroot] [next 03/25] Config.in.legacy: fix typo on BR2_PACKAGE_MEDIAART_BACKEND_QT Ricardo Martincoski
  2023-02-06 10:26   ` Peter Korsgaard
@ 2023-02-22 16:08   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-22 16:08 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: Thomas Petazzoni, buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Currently using this minimal .config:
 >  BR2_PACKAGE_MEDIAART_BACKEND_GDK_PIXBUF=y
 > triggers:
 >      *** Legacy options removed in 2018.05 ***
 >  [ ] libmediaart none backend option renamed (NEW)
 >  [*] libmediaart gdk-pixbuf backend option renamed
 >  [*] libmediaart qt backend option renamed

 > Commit "8553b39887 libmediaart: rename options to have proper prefix",
 > part of the 2018.05 release had a copy&paste error.

 > As stated in the beginning of the file:
 >  The oldest symbols will be removed again after about two years.
 > But while we carry these legacy symbols, let's fix the typo.

 > Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
 > ---
 > NOTE: Maybe it is time to drop old legacy symbols again?
 > If so, some patches in this series can be dropped.

Committed to 2022.11.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 04/25] utils/checkpackagelib: warn about redefined config
  2022-11-27 13:07 ` [Buildroot] [next 04/25] utils/checkpackagelib: warn about redefined config Ricardo Martincoski
  2023-02-06 11:03   ` Peter Korsgaard
@ 2023-02-22 16:09   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-22 16:09 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Warn the developer in the case the same config is declared more than
 > once in the same Config.in file.
 > But take into account the conditional code that lets the config be
 > visible and warn only when it is declared more than once in the same
 > conditions.
 > For instance, do not warn for:
 >  if BR2_PACKAGE_BUSYBOX
 >  config BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 >  endif
 >  if !BR2_PACKAGE_BUSYBOX # kconfig doesn't support else
 >  config BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 >  endif

 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
 > ---
 > Applying only this patch on current master, check-package returns:

 > Config.in.legacy:2597: config BR2_PACKAGE_MEDIAART_BACKEND_GDK_PIXBUF
 > redeclared (previous line: 2589)

Committed to 2022.11.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 05/25] support/scripts/generate-gitlab-ci-yml: improve test-pkg support
  2022-11-27 13:07 ` [Buildroot] [next 05/25] support/scripts/generate-gitlab-ci-yml: improve test-pkg support Ricardo Martincoski
  2023-02-06 11:04   ` Peter Korsgaard
@ 2023-02-22 16:38   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-22 16:38 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Following the example of test-pkg config described in commit
 > "12c7a05da1 utils/test-pkg: add gitlab-ci support" to test a defconfig
 > fragment that contains a disabled option is currently possible, but
 > it do requires one to change the git config core.commentChart so the
 > lines starting with "#" are not discarded by git when creating/editing
 > the commit message.

 > For instance, without the indentation the 3rd line below would be
 > excluded from the commit message when the editor is closed:
 >     test-pkg config:
 >     SOME_OPTION=y
 >     # OTHER_OPTION is not set
 >     SOME_VARIABLE="some value"

 > Requiring to change git configs is not very nice.
 > So make the developer's life easier by changing the sed expression to
 > remove indentation with spaces from a defconfig fragment found on a
 > commit message.
 > For instance these lines become valid and generate a defconfig fragment
 > without the indentation of one space to be tested in GitLab CI:
 > test-pkg config:
 >  SOME_OPTION=y
 >  # OTHER_OPTION is not set
 >  SOME_VARIABLE="some value"

 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
 > ---
 > Example usage:
 > https://gitlab.com/RicardoMartincoski/buildroot/-/pipelines/704846763

Committed to 2022.11.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 06/25] package/fwts: use ifeq instead of ifdef
  2022-11-27 13:07 ` [Buildroot] [next 06/25] package/fwts: use ifeq instead of ifdef Ricardo Martincoski
  2023-02-06 11:04   ` Peter Korsgaard
@ 2023-02-22 16:38   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-22 16:38 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: Thomas Petazzoni, buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > The conditional code using ifdef was added in 2018 and works as
 > expected.
 > But there is no reason to use ifdef instead of ifeq.

 > For consistence, switch to use ifeq like almost all packages already do.

 > Cc: Arnout Vandecappelle <arnout@mind.be>
 > Cc: Erico Nunes <nunes.erico@gmail.com>
 > Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed to 2022.11.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 07/25] package/live555: fix build config with locale
  2022-11-27 13:07 ` [Buildroot] [next 07/25] package/live555: fix build config with locale Ricardo Martincoski
  2023-02-06 11:06   ` Peter Korsgaard
@ 2023-02-22 16:38   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-22 16:38 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Using current conditional code, added in 2014:
 > ifndef ($(BR2_ENABLE_LOCALE),y)
 > LIVE555_CFLAGS += -DLOCALE_NOT_USED
 > endif

 > the define LOCALE_NOT_USED is always passed on CFLAGS, because there is
 > no symbol with following names defined:
 >  "(y,y)" -> not defined when BR2_ENABLE_LOCALE=y
 >  "(,y)" -> not defined when BR2_ENABLE_LOCALE is not set

 > So fix the typo, switching ifndef to ifneq.

 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed to 2022.11.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 08/25] package/pugixml: unconditionally set BUILD_DEFINES
  2022-11-27 13:07 ` [Buildroot] [next 08/25] package/pugixml: unconditionally set BUILD_DEFINES Ricardo Martincoski
  2023-02-06 11:07   ` Peter Korsgaard
@ 2023-02-22 16:39   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-22 16:39 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: Theo Debrouwere, buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > The ifdef construct intended to avoid passing -DBUILD_DEFINES="" was
 > never needed, because even upstream version v1.9 used in 2019 when the
 > configuration options were added, can handle an empty string for
 > BUILD_DEFINES.
 > In fact an empty string is the default for v1.9 if it is not passed
 > during configure.

 > Also, the host variant already sets BUILD_DEFINES unconditionally.

 > So remove the unneeded conditional.

 > Cc: Arnout Vandecappelle <arnout@mind.be>
 > Cc: Theo Debrouwere <t.debrouwere@televic.com>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
 > ---
 > NOTE 1:
 > For versions starting from v1.11 this flag BUILD_DEFINES is ignored, but
 > it will be fixed in the next patch.
 > I had split into 2 patches because this first one applies to old
 > versions of the package too. Someone could theoretically decide to
 > backport to a local copy of buildroot 2020.05.x for instance.

 > NOTE 2:
 > It doesn't test much, since BUILD_DEFINES is ignored, but anyway:
 > https://gitlab.com/RicardoMartincoski/buildroot/-/pipelines/704554673
 > 44 builds, 1 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed
 > test-pkg config:
 > BR2_PACKAGE_PUGIXML=y

Committed to 2022.11.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 09/25] package/pugixml: fix configuration options
  2022-11-27 13:07 ` [Buildroot] [next 09/25] package/pugixml: fix configuration options Ricardo Martincoski
  2023-02-06 11:09   ` Peter Korsgaard
@ 2023-02-22 16:40   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-22 16:40 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: Theo Debrouwere, buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Commit upstream 1c5a0bb32583fd294022e68e66b541bf6ff71a67
 > ":sparkles: Update CMake to modern approach" removed all feature
 > toogles, so starting from release v1.11 any flag passed in BUILD_DEFINES
 > was completely ignored during the build.
 > Version 1.11.4 was in use in buildroot since February 2021.

 > Commit upstream 0f1e75a902ef1751dd63a67fe223b5e8daf4c7f1
 > "Re-introduced the custom build defines" added PUGIXML_BUILD_DEFINES to
 > release v1.12, but BUILD_DEFINES is still completely ignored during the
 > build.
 > Version 1.12.1 is in use in buildroot since March 2022.

 > So switch the config options to use PUGIXML_BUILD_DEFINES instead of
 > BUILD_DEFINES.

 > Cc: Arnout Vandecappelle <arnout@mind.be>
 > Cc: Theo Debrouwere <t.debrouwere@televic.com>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed to 2022.11.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 10/25] package/pugixml: use explicit build options
  2022-11-27 13:07 ` [Buildroot] [next 10/25] package/pugixml: use explicit build options Ricardo Martincoski
  2023-02-06 11:12   ` Peter Korsgaard
@ 2023-02-22 16:41   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-22 16:41 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: Theo Debrouwere, buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Commit upstream 986b7ffd01aedcd4f2aa16e78e4cad9313b6d7b2
 > "Add Cmake options for pugiconfig.hpp" added feature toogles to release
 > v1.12, including PUGIXML_NO_XPATH and PUGIXML_COMPACT.

 > Commit upstream 5f49f2c6575cc2b7d343f8d41581fe92d69d7b52
 > "Mark advanced options and removed redundant ones" removed CMake
 > specific support for PUGIXML_HEADER_ONLY and PUGIXML_HAS_LONG_LONG, but
 > they can still be provided using PUGIXML_BUILD_DEFINES, starting from
 > release v1.12.

 > So use the explicit build options PUGIXML_NO_XPATH and PUGIXML_COMPACT,
 > but keep using PUGIXML_BUILD_DEFINES to set PUGIXML_HEADER_ONLY and
 > PUGIXML_HAS_LONG_LONG.

 > Cc: Arnout Vandecappelle <arnout@mind.be>
 > Cc: Theo Debrouwere <t.debrouwere@televic.com>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed to 2022.11.x, thanks (2022.02.x uses v1.11.4).

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 11/25] package/busybox: add comment about variable override
  2022-11-27 13:07 ` [Buildroot] [next 11/25] package/busybox: add comment about variable override Ricardo Martincoski
  2023-02-06 11:13   ` Peter Korsgaard
@ 2023-02-22 16:41   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-22 16:41 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > The same comment already exists for UCLIBC_CONFIG_FILE.
 > Both variables can be override from command-line, as described in the
 > manual, at section 'Environment variables'.

 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed to 2022.11.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 12/25] utils/checkpackagelib: warn about ifdef on .mk
  2022-11-27 13:07 ` [Buildroot] [next 12/25] utils/checkpackagelib: warn about ifdef on .mk Ricardo Martincoski
  2023-02-06 11:15   ` Peter Korsgaard
@ 2023-02-22 16:44   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-22 16:44 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > There are two legitimate cases to prefer ifdef over ifeq in package
 > recipes: command-line overrides are allowed for busybox and uclibc
 > configs.

 > Except for that, all package in tree already use ifeq, so warn the
 > developer adding/changing a package to use ifeq instead of ifdef, in
 > order to keep consistence across packages.
 > file.mk:2: use ifeq ($(SYMBOL),y) instead of ifdef SYMBOL
 > file.mk:5: use ifneq ($(SYMBOL),y) instead of ifndef SYMBOL

 > The difference between ifeq and ifdef is that ifdef doesn't expand
 > recursively.

 > Add comments to busybox and uclibc packages to avoid a warning in such
 > special cases.

 > Cc: Arnout Vandecappelle <arnout@mind.be>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
 > ---
 > NOTE 1:
 > I only state "all package in tree already use ifeq" because earlier in
 > the series other 3 (2 ifdef and 1 ifndef) uses were removed.

Committed to 2022.11.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 13/25] toolchain/toolchain-buildroot: add comment about using virtual package infra
  2022-11-27 13:07 ` [Buildroot] [next 13/25] toolchain/toolchain-buildroot: add comment about using virtual package infra Ricardo Martincoski
  2023-02-06 11:26   ` Peter Korsgaard
@ 2023-02-22 16:44   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-22 16:44 UTC (permalink / raw)
  To: Ricardo Martincoski
  Cc: Yann E . MORIN, Thomas Petazzoni, buildroot, Romain Naour,
	Giulio Benetti, Thomas De Schampheleire

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Commit "9a8ec9195c toolchain/toolchain-buildroot: migrate to virtual
 > package infrastructure" made the packages toolchain and
 > toolchain-buildroot to use the virtual package infra even they being
 > generic packages.
 > This works because on package/pkg-virtual.mk when a package do not
 > define neither _PROVIDES_ or _HAS_ symbols, only _IS_VIRTUAL is set to
 > YES and _VERSION and _SOURCE are set to empty before relaying the call
 > to inner-generic-package.

 > Add a comment explaining why the virtual package infra is used in these
 > cases.

 > Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
 > Cc: Romain Naour <romain.naour@gmail.com>
 > Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
 > Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 > Cc: Yann E. MORIN <yann.morin.1998@free.fr>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed to 2022.11.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 14/25] boot/uboot: remove use of legacy xloader symbol
  2022-11-27 13:07 ` [Buildroot] [next 14/25] boot/uboot: remove use of legacy xloader symbol Ricardo Martincoski
  2023-02-06 11:26   ` Peter Korsgaard
@ 2023-02-22 16:45   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-22 16:45 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Commit "070b183d0c boot/xloader: remove package", from release 2018.11,
 > removed the package, but the symbol is still referenced.

 > Remove the reference to it.

 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed to 2022.11.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 15/25] system: remove use of legacy md5 option
  2022-11-27 13:07 ` [Buildroot] [next 15/25] system: remove use of legacy md5 option Ricardo Martincoski
  2023-02-06 11:27   ` Peter Korsgaard
@ 2023-02-22 16:45   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-22 16:45 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Commit "bf3626002f system cfg: remove mkpasswd MD5 format option", from
 > release 2019.02, moved the symbol to legacy handling, but the symbol is
 > still referenced.

 > Remove the reference to it.

 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed to 2022.11.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 16/25] package/linux-headers: remove bogus symbol BR2_PACKAGE_HOST_LINUX_HEADERS
  2022-11-27 13:07 ` [Buildroot] [next 16/25] package/linux-headers: remove bogus symbol BR2_PACKAGE_HOST_LINUX_HEADERS Ricardo Martincoski
  2023-02-06 11:29   ` Peter Korsgaard
@ 2023-02-22 16:46   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-22 16:46 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > The package host-linux-headers does not exist and there were never
 > references to this symbol in the tree, do drop it.

 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed to 2022.11.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 18/25] package/openpowerlink: properly handle legacy options
  2022-11-27 13:07 ` [Buildroot] [next 18/25] package/openpowerlink: properly handle legacy options Ricardo Martincoski
  2023-02-06 11:45   ` Peter Korsgaard
@ 2023-02-22 16:47   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-22 16:47 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: Romain Naour, buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Commit "b1063a0136 package/openpowerlink: bump to v2.2.2" tried to add
 > legacy handling but the new symbols are part of a choice, and Kconfig
 > does not enforce the select of a option from a choice.

 > Update the legacy entry for 2016.02, following the example described in
 > the beginning of the file.

 > Cc: Romain Naour <romain.naour@gmail.com>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed to 2022.11.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 19/25] package/gcc: properly handle legacy for renamed ARC option
  2022-11-27 13:07 ` [Buildroot] [next 19/25] package/gcc: properly handle legacy for renamed ARC option Ricardo Martincoski
  2023-02-06 11:48   ` Peter Korsgaard
@ 2023-02-22 16:47   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-22 16:47 UTC (permalink / raw)
  To: Ricardo Martincoski
  Cc: Giulio Benetti, Romain Naour, Thomas Petazzoni, buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Commit "50332a530b gcc: rename option for ARC gcc" tried to add legacy
 > handling but the new symbol is part of a choice, and Kconfig does not
 > enforce the select of a option from a choice.

 > Update the legacy entry for 2016.11, following the example described in
 > the beginning of the file.

 > Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
 > Cc: Romain Naour <romain.naour@gmail.com>
 > Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed to 2022.11.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 20/25] package/lua: properly handle legacy for removed version
  2022-11-27 13:07 ` [Buildroot] [next 20/25] package/lua: properly handle legacy for removed version Ricardo Martincoski
  2023-02-06 13:22   ` Peter Korsgaard
@ 2023-02-22 16:48   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-22 16:48 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Commit "297613f1c7 package/lua: remove 5.2.x version" tried to add
 > legacy handling but the new symbols are part of a choice, and Kconfig
 > does not enforce the select of a option from a choice.

 > Update the legacy entry for 2019.02, following the example described in
 > the beginning of the file.

 > Cc: Francois Perrad <francois.perrad@gadz.org>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed to 2022.11.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 21/25] package/ti-sgx-km: properly handle legacy for removed options
  2022-11-27 13:07 ` [Buildroot] [next 21/25] package/ti-sgx-km: properly handle legacy for removed options Ricardo Martincoski
  2023-02-06 13:25   ` Peter Korsgaard
@ 2023-02-22 16:49   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-22 16:49 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Commit "c38b5566fe package/ti-sgx-{km, um, demos}: bump to latest TI
 > version", added in release 2020.02, removed some options that were
 > previously renamed in release 2018.05.

 > Update the legacy entry for 2018.05 and add the corresponding legacy
 > entries for 2020.02.

 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed to 2022.11.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 22/25] package/openjdk: properly handle legacy for renamed options
  2022-11-27 13:07 ` [Buildroot] [next 22/25] package/openjdk: properly handle legacy for renamed options Ricardo Martincoski
  2023-02-06 13:27   ` Peter Korsgaard
@ 2023-02-22 16:49   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-22 16:49 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: Tudor Holton, buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Commit "a610bf9967 package/openjdk{-bin}: bump version to 17.0.1+12"
 > tried to add legacy handling but the new symbols are part of a choice,
 > and Kconfig does not enforce the select of a option from a choice.

 > Update the legacy entry for 2021.11, following the example described in
 > the beginning of the file.

 > Cc: Tudor Holton <buildroot@tudorholton.com>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed to 2022.11.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [next 23/25] package/sunxi-mali-utgard: properly handle legacy for renamed options
  2022-11-27 13:07 ` [Buildroot] [next 23/25] package/sunxi-mali-utgard: " Ricardo Martincoski
  2023-02-06 13:28   ` Peter Korsgaard
@ 2023-02-22 16:50   ` Peter Korsgaard
  1 sibling, 0 replies; 74+ messages in thread
From: Peter Korsgaard @ 2023-02-22 16:50 UTC (permalink / raw)
  To: Ricardo Martincoski; +Cc: Giulio Benetti, buildroot

>>>>> "Ricardo" == Ricardo Martincoski <ricardo.martincoski@gmail.com> writes:

 > Commit "6a7a652b14 package/sunxi-mali-utgard: rename from
 > sunxi-mali-mainline" tried to add legacy handling but the new symbols
 > are part of a choice, and Kconfig does not enforce the select of a
 > option from a choice.

 > Update the legacy entry for 2022.02, following the example described in
 > the beginning of the file.

 > Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
 > Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>

Committed to 2022.11.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2023-02-22 16:50 UTC | newest]

Thread overview: 74+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-27 13:07 [Buildroot] [next 00/25] check-symbols v2 Ricardo Martincoski
2022-11-27 13:07 ` [Buildroot] [next 01/25] *: fix typo for separate(d|) in text Ricardo Martincoski
2023-02-06 10:23   ` Peter Korsgaard
2023-02-22 16:08   ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 02/25] package, legacy: fix typo for "daemon" on help text Ricardo Martincoski
2023-02-06 10:24   ` Peter Korsgaard
2023-02-22 16:08   ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 03/25] Config.in.legacy: fix typo on BR2_PACKAGE_MEDIAART_BACKEND_QT Ricardo Martincoski
2023-02-06 10:26   ` Peter Korsgaard
2023-02-22 16:08   ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 04/25] utils/checkpackagelib: warn about redefined config Ricardo Martincoski
2023-02-06 11:03   ` Peter Korsgaard
2023-02-22 16:09   ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 05/25] support/scripts/generate-gitlab-ci-yml: improve test-pkg support Ricardo Martincoski
2023-02-06 11:04   ` Peter Korsgaard
2023-02-22 16:38   ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 06/25] package/fwts: use ifeq instead of ifdef Ricardo Martincoski
2023-02-06 11:04   ` Peter Korsgaard
2023-02-22 16:38   ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 07/25] package/live555: fix build config with locale Ricardo Martincoski
2023-02-06 11:06   ` Peter Korsgaard
2023-02-22 16:38   ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 08/25] package/pugixml: unconditionally set BUILD_DEFINES Ricardo Martincoski
2023-02-06 11:07   ` Peter Korsgaard
2023-02-22 16:39   ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 09/25] package/pugixml: fix configuration options Ricardo Martincoski
2023-02-06 11:09   ` Peter Korsgaard
2023-02-22 16:40   ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 10/25] package/pugixml: use explicit build options Ricardo Martincoski
2023-02-06 11:12   ` Peter Korsgaard
2023-02-22 16:41   ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 11/25] package/busybox: add comment about variable override Ricardo Martincoski
2023-02-06 11:13   ` Peter Korsgaard
2023-02-22 16:41   ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 12/25] utils/checkpackagelib: warn about ifdef on .mk Ricardo Martincoski
2023-02-06 11:15   ` Peter Korsgaard
2023-02-22 16:44   ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 13/25] toolchain/toolchain-buildroot: add comment about using virtual package infra Ricardo Martincoski
2023-02-06 11:26   ` Peter Korsgaard
2023-02-22 16:44   ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 14/25] boot/uboot: remove use of legacy xloader symbol Ricardo Martincoski
2023-02-06 11:26   ` Peter Korsgaard
2023-02-22 16:45   ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 15/25] system: remove use of legacy md5 option Ricardo Martincoski
2023-02-06 11:27   ` Peter Korsgaard
2023-02-22 16:45   ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 16/25] package/linux-headers: remove bogus symbol BR2_PACKAGE_HOST_LINUX_HEADERS Ricardo Martincoski
2023-02-06 11:29   ` Peter Korsgaard
2023-02-22 16:46   ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 17/25] package/gitlab-runner: ensure use of LIBCURL_OPENSSL Ricardo Martincoski
2023-02-06 11:37   ` Peter Korsgaard
2023-02-06 15:05     ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 18/25] package/openpowerlink: properly handle legacy options Ricardo Martincoski
2023-02-06 11:45   ` Peter Korsgaard
2023-02-22 16:47   ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 19/25] package/gcc: properly handle legacy for renamed ARC option Ricardo Martincoski
2023-02-06 11:48   ` Peter Korsgaard
2023-02-22 16:47   ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 20/25] package/lua: properly handle legacy for removed version Ricardo Martincoski
2023-02-06 13:22   ` Peter Korsgaard
2023-02-22 16:48   ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 21/25] package/ti-sgx-km: properly handle legacy for removed options Ricardo Martincoski
2023-02-06 13:25   ` Peter Korsgaard
2023-02-22 16:49   ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 22/25] package/openjdk: properly handle legacy for renamed options Ricardo Martincoski
2023-02-06 13:27   ` Peter Korsgaard
2023-02-22 16:49   ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 23/25] package/sunxi-mali-utgard: " Ricardo Martincoski
2023-02-06 13:28   ` Peter Korsgaard
2023-02-22 16:50   ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 24/25] package/rpi-userland: fix typo for BR2_aarch64 Ricardo Martincoski
2023-02-06 13:28   ` Peter Korsgaard
2022-11-27 13:07 ` [Buildroot] [next 25/25] utils/check-symbols: new script Ricardo Martincoski
2023-02-06 15:30   ` Peter Korsgaard

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.