Re: [PATCH net-next 01/15] batman-adv: drop batman-adv specific version

Sven Eckelmann <[email protected]>
Newsgroups org.open-mesh.lists.batman,org.kernel.vger.netdev
Message-ID <3637868.44csPzL39Z@sven-desktop>
On Friday, 29 May 2026 20:24:30 CEST Jakub Kicinski wrote:
> > > To be clear, definitely a move in the right direction. I hope we can
> > > move _all the way_ in the right direction, tho, without still defining
> > > OOT-feeling version.h file with a dedicated BATADV_SOURCE_VERSION  
> > 
> > version.c and version.h are there to not recompile more parts of batman-adv 
> > than necessary when the linux kernel version changes. Has nothing to do
> > with OOT. If you consider this a no-go, I can also just place 
> > generated/utsrelease.h + UTS_RELEASE in the three different files.
> 
> Ah! My bad, sorry for the accusation! 🙂
> 
> The re-compilation thing is annoying but it's solvable.
> Please TAL at commit 3f9ed5f5aa9ecffd2 for inspiration.

Interesting, didn't knew about it. This should work for the in-function ones 
and avoids the const batadv_version string + version.h.

https://git.open-mesh.org/batadv.git/commit/?id=6f864eb5cfd8315b8f9a29167263282fe4593f3a


Now we are left with version.c. MODULE_VERSION doesn't accept "dynamically 
generated" strings for obvious reasons. Which could be handled via:

* MODULE_VERSION(UTS_RELEASE) in version.c (keeping it in a separate file)
* MODULE_VERSION(UTS_RELEASE) in main.c (requires recompilation of main.c)
* MODULE_VERSION($STATIC_STRING) in main.c (then somebody needs to come up 
  with one)
* something else

What would you prefer?

Regards,
	Sven
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQS81G/PswftH/OW8cVND3cr0xT1ywUCahnnqQAKCRBND3cr0xT1
y9ZnAQD24lphhoj0ZUTST9soYaVsHJ0FJgejx6k7ey/9Ps5UuQEA7HgjYVaP8kbT
7C5kaF6r/QybbZuI6TPdYX+n+8+3Zws=
=7rgI
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.