-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the RPMs more rpmlint compliant. #78
Conversation
The script-without-shebang warning does not necessarily mean the shebang is missing - it can also mean a file was marked as executable by mistake. That is true for ccm.pm in the source code, so it is likely valid in the RPM too (I did not check). |
I'm in favour of getting rid of all explicit dependencies, incl |
<provides> | ||
<provide>ncm-${project.artifactId}</provide> | ||
</provides> | ||
<url>https://github.com/quattor/configuration-modules-core/tree/master/ncm-${project.artifactId}</url> | ||
<needarch>noarch</needarch> | ||
<description>${project.name}</description> | ||
<requires> | ||
<require>ncm-ncd</require> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not this one too?
@ajf8 also can you share the rpmlint script (or commandline to use). |
You can find rpmlint here: https://github.com/rpm-software-management/rpmlint It seems to be packaged by Red Hat. It is run against all packages distributed by Red Hat and Fedora. While these checks are great for enforcing consistency across a big distribution, maybe some are not so useful for us and we can disable them. For example, the RPM group. I don't really see any value in changing this from Quattor. On the shebang one, should I create a PR which does a sweep of executable permissions on *.pm in configuration-modules-core? Finally, the changelog error. Not sure this is worth the effort. The changelogs we install into /usr/share/doc seem quite out of date, so I guess we would need to come up with some way of autogenerating useful changelogs first and then feeding them into the maven RPM plugin. Or maybe we just remove the ChangeLog files completely, if they aren't going to be maintained. |
@ajf8 any details how you run this? i opened quattor/release#243 to track this. wrt exectable bits, sure why not. should be easy to merge in. wrt the changelog, @jrha creates the releasenotes, maybe we can integrate that as ChangeLog somehow? |
re: ChangeLog. ISTR this file is required to exist by pom.xml but given they are never updated, we should just delete them all, or auto-generate them from the commit log. |
@ajf8 wrt the executable bits, it is probably because of the settings in the pom.xml file. All perl modules are added with |
You're right, it was because of the pom.xml settings, should be fixed now. I found we can just set default{Filemode,Dirmode,Groupname,Username} in the top level rpm-build-plugin config and then delete all those settings from the mappings. http://www.mojohaus.org/rpm-maven-plugin/rpm-mojo.html#defaultFilemode |
nice! |
Regarding running rpmlint, you just run rpmlint rpm_path and check the status code |
I'm not sure we can do anything useful with the Changelog other than replacing it with a link to the release notes... |
"Discuss at workshop" label added to resolve the future of ChangeLog. |
Discussed at 21st workshop: no-one wants the Changelog so we will try to ship nothing or an empty one. |
LGTM. @ajf8 can you nuke the Changelog and see if |
@ajf8 ping |
@jrha @ned21 i opened ajf8#1 to fix the changelog error. it includes a changelog template.
(if @ajf8 is too busy, i can open a PR to master and that will auto-merge this one upon merge) |
@stdweird either is fine by me! |
Merged in #81. |
Thanks, sorry for radio silence. |
We have started running our RPM packages through rpmlint, and it flagged up a few issues with the RPMs produced by maven for NCM components.
I guess some discussion will be needed about which ones we actually care about, and how/if to fix them, but I've made a few changes to the build-profile pom.xml which addresses some of them.
Do we even need the libuser dependency? Maybe some RPM needs it, but I doubt it should be a dependency of every RPM built. In any case, RPM packaging guidelines say autodetecting libraries is preferred to explicitly putting them in.
Before:
ncm-ccm.noarch: E: explicit-lib-dependency libuser
ncm-ccm.noarch: W: summary-not-capitalized C ncm-ccm
ncm-ccm.noarch: W: name-repeated-in-summary C ncm-ccm
ncm-ccm.noarch: W: non-standard-group Quattor
ncm-ccm.noarch: E: no-changelogname-tag
ncm-ccm.noarch: W: invalid-license c
ncm-ccm.noarch: W: invalid-license Quattor
ncm-ccm.noarch: W: invalid-url URL: http://quattor.org/cfg-modules/ccm/ HTTP Error 404: Not Found
ncm-ccm.noarch: E: useless-provides ncm-ccm
ncm-ccm.noarch: E: script-without-shebang /usr/lib/perl/NCM/Component/ccm.pm
1 packages and 0 specfiles checked; 4 errors, 6 warnings.
After:
ncm-ccm.noarch: W: non-standard-group Quattor
ncm-ccm.noarch: E: no-changelogname-tag
ncm-ccm.noarch: E: script-without-shebang /usr/lib/perl/NCM/Component/ccm.pm
1 packages and 0 specfiles checked; 2 errors, 1 warnings.
The script-without-shebang one seems bogus, obviously we don't put that in .pm files, so we'll probably just ignore it.