Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Randle, William C" <william.c.randle@intel.com>
To: "Burton, Ross" <ross.burton@intel.com>
Cc: "openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] insane.bbclass: tighten lib_re and exec_re patterns to avoid false positive
Date: Wed, 23 Mar 2016 16:40:05 +0000	[thread overview]
Message-ID: <1458751207.2442.11.camel@intel.com> (raw)
In-Reply-To: <CAJTo0LYjV1OROv5oO3_Wi8638pnnhOh3SgEp31yJ8GRk2XfsfQ@mail.gmail.com>

On Wed, 2016-03-23 at 16:23 +0000, Burton, Ross wrote:

On 23 March 2016 at 15:54, Bill Randle <william.c.randle@intel.com<mailto:william.c.randle@intel.com>> wrote:
+    lib_re = re.compile("^/lib.+\.so(\.\d+){0,3}$")
+    exec_re = re.compile("^%s.*/lib.+\.so(\.\d+){0,3}$" % exec_prefix)


I worry that this goes too far in the other way, my Debian host has a library called /usr/lib/libblas.so.3gf.

Maybe we should add a "is this an ELF" test into the libdir check instead?  That might kill performance though, and this is just a sanity check.

Any other thoughts?

Ross

Ok, I found a library on my FC23 system named "libdmraid.so.1.0.0.rc16" in /usr/lib64. The available documentation on sonames I found states:


"Every shared library has a special name called the ``soname''. The soname has the prefix ``lib'', the name of the library, the phrase ``.so'', followed by a period and a version number that is incremented whenever the interface changes (as a special exception, the lowest-level C libraries don't start with ``lib''). A fully-qualified soname includes as a prefix the directory it's in; on a working system a fully-qualified soname is simply a symbolic link to the shared library's ``real name''.


"Every shared library also has a ``real name'', which is the filename containing the actual library code. The real name adds to the soname a period, a minor number, another period, and the release number. The last period and release number are optional. The minor number and release number support configuration control by letting you know exactly what version(s) of the library are installed. Note that these numbers might not be the same as the numbers used to describe the library in documentation, although that does make things easier."


That implies there should only be upto three numbers after the .so, to the ".rc16" on the end violates that rule, and the implication is these should be version *numbers*, not version strings, which would mean your library ending in .3gf violates that rule.


I guess some rules are just meant to be broken. Sigh.


    -Bill


  reply	other threads:[~2016-03-23 16:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-23 15:54 [PATCH] insane.bbclass: tighten lib_re and exec_re patterns to avoid false positive Bill Randle
2016-03-23 16:23 ` Burton, Ross
2016-03-23 16:40   ` Randle, William C [this message]
2016-03-23 17:56 ` Phil Blundell
2016-03-23 17:59   ` Burton, Ross
2016-03-23 18:03     ` Phil Blundell
2016-03-23 21:17       ` Burton, Ross
2016-03-23 21:36         ` Randle, William C

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1458751207.2442.11.camel@intel.com \
    --to=william.c.randle@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=ross.burton@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox