I keep running into the KERNELRELEASE 64 bytes limit when building a modular kernel. This limit can't be changed and the "solution" proposed in #373 turned out to be ineffective -- the kernel package is now built differently, with even longer release strings.
So I was thinking... given that the current %dist tags don't really carry any informational value (despite what people might think they cannot be parsed as there's no way to tell where the module name ends and the stream name begins, and with the component re-use, you can't really associate them with a specific module release either), we could just "compress" them a bit -- their only purpose is to provide unique NVRs in the buildsystem, after all.
One idea was to just use the short modulemd git commit hashes but that wouldn't be sufficient as you can have the same commit in two different branches (streams) which can be built at different times, therefore in potentially different buildroots. I would propose taking the module name, the stream name and the dist-git commit hash (or module version), concatenating them, with a dot let's say (this is perfectly unimportant -- let's bikeshed about that!), then getting the hash of the resulting string and shortening it.
For example, if I wanted to build base-runtime:master now, with its latest commit 4fe30568ad9800c1883d26235c159335cce5ec95, I would get "base-runtime.master.4fe30568ad9800c1883d26235c159335cce5ec95". The SHA1 (choose whatever alg you think makes sense) hash of this string is feb233e40be0bcf249e3e41fe05d26821c5fb0fb. Shortened to, say, 8 characters, it'd be feb233e4. The resulting dist tag could therefore be just that and the debug kernel build on x86_64 would carry "kernel-4.11.0-0.rc0.git9.1.feb233e4.x86_64+debug" (49 bytes, 15 to spare) in its KERNELRELEASE.
Additionally, to add some flavour, I think it'd be nice to have a configuration option for a dist tag prefix, so you could easily switch between "feb233e4", "module_feb233e4" or "fc_feb233e4" just by editing the MBS configuration file. We may decide to use some flavour prefixes later so let's be ready for that.
By the way, I hate to say that but this currently blocks the Base Runtime build.
Note: we are prioritizing this since it is blocking base-runtime.
Metadata Update from @jkaluza: - Issue assigned to jkaluza
Metadata Update from @jkaluza: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)
This issue has been migrated to Fedora Forge: https://forge.fedoraproject.org/koji/mbs/issues/414
Please continue any further discussion there.