[OpenWrt-Devel] [PATCH v2] wireguard-tools: fix version indicator

Paul Fertser fercerpav at gmail.com
Mon May 11 11:53:16 EDT 2020

On Mon, May 11, 2020 at 05:43:56PM +0300, Paul Fertser wrote:
> Probably the right way to solve this would be to have means to
> override the default git describe behaviour (and force specific
> version string instead) by a configure (or similar) flag.

Another (probably sick) idea: after cloning from git OpenWrt can
remove original .git/ and add to the archive a fake one with just a
single object and tag. I've just checked and it seems to have "git
describe --tags" working it's enough to add just three files:


First two files with identical content, the last should be a valid
object of type "commit" (no need to store a tree object even though
it's referenced from it).

To make "git rev-parse --verify --short HEAD" work as expected too one
can preserve just the HEAD commit object (not a tree). This way the
space requirements to store additional data inside the source archives
will be really small. This would require moving and unpacking the pack
that's usually created by git fetch --depth=1 and then removing all
the objects but one. Does this sound like a plan?

Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com

openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list