<feed xmlns='http://www.w3.org/2005/Atom'>
<title>staging/nbd/scripts/getver.sh, branch master</title>
<subtitle>Felix Fietkaus staging tree</subtitle>
<id>https://git-03.infra.openwrt.org/openwrt/staging/nbd/atom?h=master</id>
<link rel='self' href='https://git-03.infra.openwrt.org/openwrt/staging/nbd/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/nbd/'/>
<updated>2025-09-23T19:49:54Z</updated>
<entry>
<title>build: parsing "git log" breaks with gpg signature verification</title>
<updated>2025-09-23T19:49:54Z</updated>
<author>
<name>Bjørn Mork</name>
</author>
<published>2024-12-27T11:43:18Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/nbd/commit/?id=ae9c9d0f8e41621c1bde94a43ec463052fa58c8a'/>
<id>urn:sha1:ae9c9d0f8e41621c1bde94a43ec463052fa58c8a</id>
<content type='text'>
Parsing "git log" is fragile.  The actual output depends on both global and
local configuration files. Enabling "log.showSignature" makes "git log" prefix
signed commits with multiple lines of gpg verify output, regardless of the
configured log format.

Add "--no-show-signature" to "git log" commands to work around this particular
issue.

Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Link: https://github.com/openwrt/openwrt/pull/20127
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>scripts: getver.sh: approximate version from date</title>
<updated>2025-06-26T08:29:50Z</updated>
<author>
<name>Eric Fahlgren</name>
</author>
<published>2025-02-01T16:12:07Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/nbd/commit/?id=e56845fae3c05463a57ba8e0e104d6d8d8cd96ed'/>
<id>urn:sha1:e56845fae3c05463a57ba8e0e104d6d8d8cd96ed</id>
<content type='text'>
When doing package support and management it is often the case that
knowing the corresponding openwrt repo's release version is useful.

For example, when adding package changes to the ASU server, the
openwrt revision is used as the cutoff for applying those changes.
Knowing a package change's hash in its remote feed repo allows us
to look up its change date, which we can now use with getver.sh
to approximate the revision in openwrt at which it was made.

Signed-off-by: Eric Fahlgren &lt;ericfahlgren@gmail.com&gt;
Link: https://github.com/openwrt/openwrt/pull/17817
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>scripts: fix revision calculation using new "main" branch</title>
<updated>2024-05-21T15:53:33Z</updated>
<author>
<name>Marius Dinu</name>
</author>
<published>2024-05-21T15:08:33Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/nbd/commit/?id=9db53fb6aa261c4aa73da7d1ec6cf2d3b06b8fb8'/>
<id>urn:sha1:9db53fb6aa261c4aa73da7d1ec6cf2d3b06b8fb8</id>
<content type='text'>
Fix revision calculation when local branch is rebased on new "main" branch
instead of "master".

Signed-off-by: Marius Dinu &lt;m95d+git@psihoexpert.ro&gt;
Link: https://github.com/openwrt/openwrt/pull/15538
Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
</content>
</entry>
<entry>
<title>scripts/getver.sh: prevent asking for negative rev-parse</title>
<updated>2023-11-12T15:19:04Z</updated>
<author>
<name>Christian Marangi</name>
</author>
<published>2023-11-12T15:15:07Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/nbd/commit/?id=9e49e0a6c4535d345084cc62c594be5cad23b911'/>
<id>urn:sha1:9e49e0a6c4535d345084cc62c594be5cad23b911</id>
<content type='text'>
With the case of asking an invalid version that is too big, getver.sh
might return an invalid output in the form of HEAD~-2260475641.

This is caused by BASE_REV - GET_REV using a negative number.

Prevent this by checking if BASE_REV - GET_REV actually return 0 or a
positive number and set REV variable accordingly. With the following
change, invalid revision number will result in unknown printed instead
of the invalid HEAD~-NUMBERS output.

Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
</content>
</entry>
<entry>
<title>scripts/getver.sh: silence rev-list errors</title>
<updated>2020-11-02T07:39:49Z</updated>
<author>
<name>Petr Štetiar</name>
</author>
<published>2020-03-03T11:47:07Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/nbd/commit/?id=f52aee0455f6ce77b16a78ddf17f1ef49ddc2380'/>
<id>urn:sha1:f52aee0455f6ce77b16a78ddf17f1ef49ddc2380</id>
<content type='text'>
Shallow copies are quite common on CI platforms nowadays, making REBOOT
tag unavailable, thus producing following confusing errors in the build
logs:

 fatal: Invalid revision range ee53a240ac902dc83209008a2671e7fdcf55957a..HEAD
 fatal: Invalid revision range ee53a240ac902dc83209008a2671e7fdcf55957a..0493d57e04774d47921a7d2014b567455d5dc16b

Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
</content>
</entry>
<entry>
<title>scripts/getver.sh: append short git hash based on upstream commit</title>
<updated>2017-02-01T16:48:45Z</updated>
<author>
<name>Magnus Kroken</name>
</author>
<published>2017-01-14T21:34:01Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/nbd/commit/?id=289f2a8ce36caff6c9ec65585b397f64ffd0f244'/>
<id>urn:sha1:289f2a8ce36caff6c9ec65585b397f64ffd0f244</id>
<content type='text'>
The short git hash suffix printed by getver.sh is taken from the
latest local commit, change this to use the hash from latest
upstream commit if available. This is considered the intended
behavior based on commit message a642a11faca87e2a7bddc1fadb54253e2fc26e84,
introducing getver.sh.

Signed-off-by: Magnus Kroken &lt;mkroken@gmail.com&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>scripts: getver.sh: append Git short hash to revision</title>
<updated>2016-12-02T15:38:55Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2016-12-02T11:07:19Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/nbd/commit/?id=a642a11faca87e2a7bddc1fadb54253e2fc26e84'/>
<id>urn:sha1:a642a11faca87e2a7bddc1fadb54253e2fc26e84</id>
<content type='text'>
Change getver.sh to append a short Git commit hash to the end of the artifical
revision number. This way we still have order- and comparable commit numbers
but also a direct relation to the Git commit.

The new output format will look like "r2400+2-882472e" for dirty trees or like
"r2402-882472e" for clean ones.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>scripts/getver.sh: treat all commits as local if can't find upstream</title>
<updated>2016-11-21T13:36:04Z</updated>
<author>
<name>Rafał Miłecki</name>
</author>
<published>2016-11-17T06:25:21Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/nbd/commit/?id=bf3d92f0cdcea5cd9ec30f54d6e4d350cda1bb41'/>
<id>urn:sha1:bf3d92f0cdcea5cd9ec30f54d6e4d350cda1bb41</id>
<content type='text'>
If something goes wrong and script can't find upstream revision it will
return something like:
r2220
which looks like a valid upstream revision 2220. We cant' distinguish it
from e.g. 2200 upstream commits and 20 local ones.

The new format still provides revision number but also points clearly
that is may be not the upstream one:
r0+2220

Signed-off-by: Rafał Miłecki &lt;rafal@milecki.pl&gt;
Acked-by: John Crispin &lt; john@phrozen.org&gt;
</content>
</entry>
<entry>
<title>scripts/getver.sh: fix older git versions from printing stuff to stdout</title>
<updated>2016-07-16T18:50:56Z</updated>
<author>
<name>Jonas Gorski</name>
</author>
<published>2016-07-16T14:57:05Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/nbd/commit/?id=efdd3bf5fbab94b3f84e8a285e83ef36e39b3e8b'/>
<id>urn:sha1:efdd3bf5fbab94b3f84e8a285e83ef36e39b3e8b</id>
<content type='text'>
Older git versions seem output the original argument to stdout if there
is no upstream, presumably because they try to do things with it
internally. This can be prevented by passing --verify to it, which
should be safe on newer git versions.

Signed-off-by: Jonas Gorski &lt;jonas.gorski@gmail.com&gt;
</content>
</entry>
<entry>
<title>scripts/getver.sh: stop relying on the reboot tag</title>
<updated>2016-07-14T11:37:58Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2016-07-14T11:30:54Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/nbd/commit/?id=7ed215437c784eb466302a5c01a4ee2fff9eac2d'/>
<id>urn:sha1:7ed215437c784eb466302a5c01a4ee2fff9eac2d</id>
<content type='text'>
It may not be present when cloning a staging tree or another fork

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
</feed>
