#902 Cleanup & ehnance spec files
Opened 2 months ago by pvalena. Modified a month ago

As mentioned in [1] by Tomasz Kłoczko, some macros are needlessly used in numerous spec files.

I have prepared scriplets which can fix that (to ease work on others), and as no proven packager want's to pick up the work, could you please make the changes?

Fixes:

1) (over)use %verify() with %ghost

find -maxdepth 2 -name '*.spec' -exec sed -i '/%ghost/ s/%verify\s*([^)]*)//g' "{}" \;

2) Using .gz suffix with man and info pages %files entries (The same is with info pages)

find -maxdepth 2 -name '*.spec' -exec sed -i '/%{_mandir}/ s/\.gz/.*/g' "{}" \;
find -maxdepth 2 -name '*.spec' -exec sed -i '/%{_infodir}/ s/\.gz/.*/g' "{}" \;

3) (over)use %doc in case of man pages entries in %files

find -maxdepth 2 -name '*.spec' -exec sed -i '/%{_mandir}/ s/%doc //g' "{}" \;

[1] https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/2WZ5E6YDJXCWVLCMUTPUMX7K3XVRPHFE/


well, there is a problem that people will put it again =(

I guess the real question is whether these hurt anything. Not that I'm personally above doing cleanups, but I prefer to have them backed up by packaging guidelines or else it does cross over onto the wrong side of pointless churn. And the only thing that appears to be potentially against a guideline would be the explicit compression suffix, though a quick read of the text (https://docs.fedoraproject.org/en-US/packaging-guidelines/#_manpages) shows that the language could use a cleanup to indicate that there's actually a prohibition there (by adding SHOULD or SHOULD NOT appropriately).

If I get a few minutes I'll add checks to the fedora-misc-package-utilities repo, which is where things like this have been collecting.

Metadata Update from @tibbs:
- Issue assigned to tibbs

2 months ago

I guess the real question is whether these hurt anything. Not that I'm personally above doing cleanups, but I prefer to have them backed up by packaging guidelines or else it does cross over onto the wrong side of pointless churn. And the only thing that appears to be potentially against a guideline would be the explicit compression suffix, though a quick read of the text (https://docs.fedoraproject.org/en-US/packaging-guidelines/#_manpages) shows that the language could use a cleanup to indicate that there's actually a prohibition there (by adding SHOULD or SHOULD NOT appropriately).

If I get a few minutes I'll add checks to the fedora-misc-package-utilities repo, which is where things like this have been collecting.

Metadata Update from @tibbs:
- Assignee reset

2 months ago

Somehow that reposted when I restarted my browser. Weird.

Metadata Update from @tibbs:
- Issue assigned to tibbs

2 months ago

Metadata Update from @james:
- Issue tagged with: meeting

2 months ago

find -maxdepth 2 -name '*.spec' -exec sed -i '/%{_mandir}/ s/\.gz/.*/g' "{}" \;

Instead of .* please use * so that the glob works when there is no man page compression (this is currently the case for flatpaks).

@kalev yeah, I agree.

FTR, I'm huge +1 to cleanups which were proposed in this ticket. I think exact scripts need a bit more love, but…

Also I agree with @tibbs that we need to have those things baked by guidelines.

We talked about this issue this week:

https://meetbot-raw.fedoraproject.org/fedora-meeting-1/2019-07-11/fpc.2019-07-11-16.00.txt

  • #902 Cleanup & enhance spec files (geppetto, 16:33:51)
  • Propose guideline changes we can vote on, if those pass then it's
    fine to do scripted cleanups (geppetto, 16:44:11)

Login to comment on this ticket.

Metadata