Hi, On 6/17/24 21:13, Ian Jackson wrote:
Your WTF seems to be from a false assumption that git is central to Debian package maintenance. It isn't. It is popular, but not central, nor standardized.
git is central to most software maintenance in the world at large. Not all, by any means. But, overwhelmingly, most.
We are, however, not using git for software maintenance. We are using git as a versioned network file system below our package maintenance tools.
Each of the git workflows then tries a different mapping of the packaging metadata onto git metadata. They all fall short, because git cannot represent the data model of Debian source packages, so each tool makes a different trade off where some of our metadata is then represented as data inside the git model.
Because that mapping misrepresents what is data and what is metadata, using any git tools beyond versioned object storage has the potential to break the invariants of the higher layers, so maintainers need to unlearn some of the git recipes they know.
If pristine-tar is in use, a special branch full of special commits must exist, but git cannot provide referential integrity for us here because this is stored as data, not metadata.
Importing a new upstream version via merge commit also breaks the higher layers' invariant that patches apply cleanly, but git is not aware that these are patches, because again we are storing metadata as data, because there is not accurate mapping.
Generating the Debian changelog from git commits then has the opposite problem: we need to convert metadata back into data, but some of the metadata was created by git, outside the packaging workflow, so we need to filter the commit messages.
There are lots of other problems with the various mappings in use, each makes different trade-offs. Accommodating them all inside tag2upload is an ab-initio commitment to technical debt.
A git based workflow that has a lossless mapping would probably require special git objects that the base git tools refuse to handle (because they would mess it up), and that are explicit about what is happening.
This would not be an incremental approach, but I think we cannot increment ourselves into a good solution here.
Simon