All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mikko Rapeli" <mikko.rapeli@bmw.de>
To: <richard.purdie@linuxfoundation.org>
Cc: <chee.yang.lee@intel.com>, <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [PATCH 2/2] openssl: set CVE_VERSION_SUFFIX
Date: Wed, 27 Jan 2021 17:11:42 +0000	[thread overview]
Message-ID: <YBGezLdwMjy/faKV@korppu> (raw)
In-Reply-To: <fd0a039b6db0bfa994bf606d6fd54a10b22afdca.camel@linuxfoundation.org>

Hi,

On Wed, Jan 27, 2021 at 05:01:38PM +0000, Richard Purdie wrote:
> On Wed, 2021-01-27 at 09:12 +0000, Mikko Rapeli wrote:
> > On Wed, Jan 27, 2021 at 05:03:54PM +0800, Lee Chee Yang wrote:
> > > From: Lee Chee Yang <chee.yang.lee@intel.com>
> > > 
> > > Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
> > > ---
> > >  meta/recipes-connectivity/openssl/openssl_1.1.1i.bb | 2 ++
> > >  1 file changed, 2 insertions(+)
> > > 
> > > diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1i.bb b/meta/recipes-connectivity/openssl/openssl_1.1.1i.bb
> > > index 52e96b7831..9ff80b3d4f 100644
> > > --- a/meta/recipes-connectivity/openssl/openssl_1.1.1i.bb
> > > +++ b/meta/recipes-connectivity/openssl/openssl_1.1.1i.bb
> > > @@ -230,6 +230,8 @@ BBCLASSEXTEND = "native nativesdk"
> > >  
> > > 
> > > 
> > > 
> > >  CVE_PRODUCT = "openssl:openssl"
> > >  
> > > 
> > > 
> > > 
> > > +CVE_VERSION_SUFFIX = "alphabetical"
> > > +
> > 
> > I have to say that I don't like this. I'd prefer automation
> > which works like dpkg --compare-versions:
> > 
> >        --compare-versions ver1 op ver2
> >               Compare version numbers, where op is a binary operator. dpkg returns true (0) if the specified condition is satisfied,
> >               and  false  (1)  otherwise.  There  are two groups of operators, which differ in how they treat an empty ver1 or ver2.
> >               These treat an empty version as earlier than any version: lt le eq ne ge gt. These treat an  empty  version  as  later
> >               than any version: lt-nl le-nl ge-nl gt-nl. These are provided only for compatibility with control file syntax: < << <=
> >               = >= >> >. The < and > operators are obsolete and should not be used, due to confusing semantics. To illustrate: 0.1 <
> >               0.1 evaluates to true.
> 
> The trouble is we have no control over what versions end up in the CPEs
> and I suspect that even dpkg's version comparison doesn't work for some
> of our test cases?

For example:

$ dpkg --compare-versions 1.1.1i lt 1.1.1j && echo true
true

dpkg can tell that 1.1.1i older version than 1.1.1j.

$ dpkg --compare-versions 1.1.1i lt 1.1.1e || echo not older
not older

and dpkg can tell that 1.1.1i is not older than 1.1.1e.

Hope this helps,

-Mikko

> If it does, it would be useful to understand how they're managing to do
> that as I think some of the patterns conflict as I understand it.
> 
> Debian can make it work for their packages since they control what
> version they ultimately assign to them.

Yes but the tool does seem to work for most SW version identifiers in Debian and
can deduce which one is newer. openssl version numbers work correctly out of the box.

Cheers,

-Mikko

  reply	other threads:[~2021-01-27 17:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27  9:03 [PATCH 1/2] cve_check: add CVE_VERSION_SUFFIX to indicate suffix in versioning Lee Chee Yang
2021-01-27  9:03 ` [PATCH 2/2] openssl: set CVE_VERSION_SUFFIX Lee Chee Yang
2021-01-27  9:12   ` [OE-core] " Mikko Rapeli
2021-01-27 17:01     ` Richard Purdie
2021-01-27 17:11       ` Mikko Rapeli [this message]
2021-01-27 17:40         ` Richard Purdie
2021-01-28 11:49 ` [OE-core] [PATCH 1/2] cve_check: add CVE_VERSION_SUFFIX to indicate suffix in versioning Alexandre Belloni

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=YBGezLdwMjy/faKV@korppu \
    --to=mikko.rapeli@bmw.de \
    --cc=chee.yang.lee@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    /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 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.