Backstory / Motivation
When I overhauled the spec file for PDF Arranger to the latest packaging guidelines, I accidentally removed the %install
makro. It took me over a year to realize this mistake which only became apparent by a rpmlint warning, saysing the man file would not be compressed. Try searching that issue, at least for me it took some time to realize that the missing %install was the issue all along. Otherwise there were no noticeable effects at least for this package no one and nothing complained.
Now I’d like to keep others from going through the same head scratching moments and therefore I’m thinking that a quick check for %install somewhere in the package building process would be a good idea.
Research
A quick search through all the current spec files (Direct download of 27 MiB; I always struggled to find this link when I need it.) reveals eight files which would currently fail this test.
comm -23 <(ls *.spec) <(grep -l “^%install” *.spec)
Let’s split those in two categories:
Meta packages
- exim-doc.spec
- fedora-obsolete-packages.spec
- xorg-x11-drivers.spec
New “BuildSystem: pyproject” packaging
- pyshp.spec
- python-absl-py.spec
- python-asyncpg.spec
- python-frozenlist.spec
- python-typeguard.spec
Good news: During the writing of this I realize those Python packages are intentionally missing the %install
makro, that means no other packages are currently making the same mistake!
Input wanted
Do you think an automatic check would be useful here? Where and how could it be easily implemented?
How could we deal with those packages that don’t have an explicit call to the %install makro or don’t need it being a metapackage? Could we just add it there without any negative effects to satisfy the check or make it a warning only which can easily be ignored?