From: "Maciej W. Rozycki" <macro@imgtec.com>
To: Alexander Kapshuk <alexander.kapshuk@gmail.com>
Cc: Daniel Sanders <Daniel.Sanders@imgtec.com>,
James Hogan <James.Hogan@imgtec.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
Michal Marek <mmarek@suse.com>,
"linux-kbuild@vger.kernel.org" <linux-kbuild@vger.kernel.org>,
Linux MIPS Mailing List <linux-mips@linux-mips.org>,
Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH] ld-version: fix it on Fedora
Date: Sat, 30 Jan 2016 13:38:03 +0000 [thread overview]
Message-ID: <alpine.DEB.2.00.1601301311170.5958@tp.orcam.me.uk> (raw)
In-Reply-To: <CAJ1xhMVbxoag7psNg+5L6AmL4WYXKyBYNuVGjJcfqe6Km_10SQ@mail.gmail.com>
On Mon, 25 Jan 2016, Alexander Kapshuk wrote:
> > > At the moment, I'm wondering whether we really need to handle more
> > > than three version number components. Another thought is that the
> > > comparison could be inside ld-version.sh (or a replacement) so that
> > > it can compare the array of version components directly instead of
> > > using a constructed integer as a proxy.
I don't think going beyond three version number components makes sense,
to be honest. Any such numbers will be non-standard third-party releases.
Upstream binutils use a three-component versioning scheme. Even the third
component only makes sense because sometime we may actually rely on a bug
fix first available with a maintenance release; these reach single-digit
numbers only and hardly ever above 1 actually as another base release is
usually made quickly enough (the usual schedule was annual, although as
from 2.26, out last Monday, it has been switched to a semi-annual cycle).
> I put the latter of the two methods that worked for you it into a
> script, shown below:
>
> #!/usr/bin/awk -f
> # extract linker version number from stdin and turn into single number
>
> /[0-9]+([.]?[0-9]+)+/ && !/not found$/{
> match($0, /[0-9]+([.]?[0-9]+)+/)
> ver=substr($0,RSTART,RLENGTH)
> split(ver, a, ".")
> print a[1]*10000000 + a[2]*100000 + a[3]*1000
> exit
> }
>
> And tried it out on the following input:
>
> % echo 2.24.51.20140217 | ld-version.sh
> 22451000
So the above version is a non-release snapshot from the development tree
as the repository trunk is switched to x.y+1.51 once a release branch for
x.y has been made. Then the release branch is switched to x.y-1.90 for
prereleases, before settling on x.y or x.y.0 (this hasn't been consistent)
for the actual base release. Any subsequent maintenance releases will
then have their version set to x.y.1, x.y.2, and so on. We shouldn't ever
rely on versions that are not proper releases.
> % echo 'GNU ld version 2.25-15.fc23' | ld-version.sh
> 22500000
So this is a base 2.25 release (obviously with vendor patches, hopefully
not breaking what we might rely on).
FWIW,
Maciej
next prev parent reply other threads:[~2016-01-30 13:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-07 17:55 [PATCH] ld-version: fix it on Fedora Michael S. Tsirkin
2016-01-07 18:19 ` Ralf Baechle
2016-02-11 13:00 ` Maciej W. Rozycki
2016-01-07 18:42 ` Alexandre Oliva
2016-01-13 17:05 ` James Hogan
2016-01-13 17:30 ` Daniel Sanders
[not found] ` <CAJ1xhMWth4kNuEkuVEUiUEz=d_9dmKxh0+Z_GrRcKB+F72W91w@mail.gmail.com>
2016-01-25 10:49 ` Daniel Sanders
2016-01-25 17:30 ` Alexander Kapshuk
2016-01-30 13:38 ` Maciej W. Rozycki [this message]
2016-01-31 15:05 ` Maciej W. Rozycki
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=alpine.DEB.2.00.1601301311170.5958@tp.orcam.me.uk \
--to=macro@imgtec.com \
--cc=Daniel.Sanders@imgtec.com \
--cc=James.Hogan@imgtec.com \
--cc=alexander.kapshuk@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=mmarek@suse.com \
--cc=mst@redhat.com \
--cc=ralf@linux-mips.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).