* [PATCH] insane.bbclass: Warning for so file version mismatch
@ 2020-04-14 18:08 mwillard
2020-04-14 18:08 ` [PATCH 1/1] " Mike Willard
0 siblings, 1 reply; 3+ messages in thread
From: mwillard @ 2020-04-14 18:08 UTC (permalink / raw)
To: openembedded-core; +Cc: Mike Willard
Adds a warning if a package produces a .so file with a
version that doesn't match the package PV.
This will catch issues like the one in a recent lua version
where the .so file was getting the wrong version number.
The following changes since commit 5d47cdf448b6cff5bb7cc5b0ba0426b8235ec478:
build-appliance-image: Update to master head revision (2020-04-07 22:15:35 +0100)
are available in the Git repository at:
git://push.yoctoproject.org/poky-contrib mwillard/so-version-warning
Mike Willard (1):
insane.bbclass: Warning for so file version mismatch
meta/classes/insane.bbclass | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
--
2.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] insane.bbclass: Warning for so file version mismatch
2020-04-14 18:08 [PATCH] insane.bbclass: Warning for so file version mismatch mwillard
@ 2020-04-14 18:08 ` Mike Willard
2020-04-14 18:54 ` [OE-core] " Andre McCurdy
0 siblings, 1 reply; 3+ messages in thread
From: Mike Willard @ 2020-04-14 18:08 UTC (permalink / raw)
To: openembedded-core; +Cc: Mike Willard
Adds a warning if a package produces a .so file with a
version that doesn't match the package PV.
Signed-off-by: Mike Willard <mwillard@izotope.com>
---
meta/classes/insane.bbclass | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 478240fa57..bb7f625667 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -28,7 +28,7 @@ WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \
pn-overrides infodir build-deps src-uri-bad \
unknown-configure-option symlink-to-sysroot multilib \
invalid-packageconfig host-user-contaminated uppercase-pn patch-fuzz \
- mime mime-xdg \
+ mime mime-xdg so-file-version \
"
ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
@@ -488,6 +488,24 @@ def package_qa_check_symlink_to_sysroot(path, name, d, elf, messages):
trimmed = path.replace(os.path.join (d.getVar("PKGDEST"), name), "")
package_qa_add_message(messages, "symlink-to-sysroot", "Symlink %s in %s points to TMPDIR" % (trimmed, name))
+QAPATHTEST[so-file-version] = "package_qa_check_so_file_version"
+def package_qa_check_so_file_version(path, name, d, elf, messages):
+ """
+ Check for ".so" files that do not match the package version
+ """
+ import re
+
+ pv = d.getVar('PV')
+ # Search for .so file with version number following
+ prog = re.compile(r'.*\.so\.(\d+\.\d+\.\d+)')
+ matches = prog.findall(path)
+ if len(matches) > 0:
+ so_file_version = matches[0]
+ if so_file_version != pv:
+ package_qa_add_message(messages, "so-file-version",
+ ".so file version does not match package version:\nFile: {}\nFile version:\t{}\nPV:\t\t{}\n".format(
+ path, so_file_version, pv))
+
# Check license variables
do_populate_lic[postfuncs] += "populate_lic_qa_checksum"
python populate_lic_qa_checksum() {
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH 1/1] insane.bbclass: Warning for so file version mismatch
2020-04-14 18:08 ` [PATCH 1/1] " Mike Willard
@ 2020-04-14 18:54 ` Andre McCurdy
0 siblings, 0 replies; 3+ messages in thread
From: Andre McCurdy @ 2020-04-14 18:54 UTC (permalink / raw)
To: Mike Willard; +Cc: OE Core mailing list
On Tue, Apr 14, 2020 at 11:08 AM Mike Willard <mwillard@izotope.com> wrote:
>
> Adds a warning if a package produces a .so file with a
> version that doesn't match the package PV.
These versions are not expected to match and it's easy to find
examples where they do not, e.g. curl 7.69.1 creates libcurl.so.4.6.0.
> Signed-off-by: Mike Willard <mwillard@izotope.com>
> ---
> meta/classes/insane.bbclass | 20 +++++++++++++++++++-
> 1 file changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
> index 478240fa57..bb7f625667 100644
> --- a/meta/classes/insane.bbclass
> +++ b/meta/classes/insane.bbclass
> @@ -28,7 +28,7 @@ WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \
> pn-overrides infodir build-deps src-uri-bad \
> unknown-configure-option symlink-to-sysroot multilib \
> invalid-packageconfig host-user-contaminated uppercase-pn patch-fuzz \
> - mime mime-xdg \
> + mime mime-xdg so-file-version \
> "
> ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
> perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
> @@ -488,6 +488,24 @@ def package_qa_check_symlink_to_sysroot(path, name, d, elf, messages):
> trimmed = path.replace(os.path.join (d.getVar("PKGDEST"), name), "")
> package_qa_add_message(messages, "symlink-to-sysroot", "Symlink %s in %s points to TMPDIR" % (trimmed, name))
>
> +QAPATHTEST[so-file-version] = "package_qa_check_so_file_version"
> +def package_qa_check_so_file_version(path, name, d, elf, messages):
> + """
> + Check for ".so" files that do not match the package version
> + """
> + import re
> +
> + pv = d.getVar('PV')
> + # Search for .so file with version number following
> + prog = re.compile(r'.*\.so\.(\d+\.\d+\.\d+)')
> + matches = prog.findall(path)
> + if len(matches) > 0:
> + so_file_version = matches[0]
> + if so_file_version != pv:
> + package_qa_add_message(messages, "so-file-version",
> + ".so file version does not match package version:\nFile: {}\nFile version:\t{}\nPV:\t\t{}\n".format(
> + path, so_file_version, pv))
> +
> # Check license variables
> do_populate_lic[postfuncs] += "populate_lic_qa_checksum"
> python populate_lic_qa_checksum() {
> --
> 2.17.1
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-14 18:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-14 18:08 [PATCH] insane.bbclass: Warning for so file version mismatch mwillard
2020-04-14 18:08 ` [PATCH 1/1] " Mike Willard
2020-04-14 18:54 ` [OE-core] " Andre McCurdy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox