Buildroot Archive on 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

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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox