Bug 192506
Summary: | rpmlint incorrectly sees comments as code in %post and %postun | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Chris Petersen <lists> |
Component: | rpmlint | Assignee: | Ville Skyttä <scop> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 5 | CC: | extras-qa |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2006-05-20 07:19:55 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Chris Petersen
2006-05-20 06:44:24 UTC
Turns out that the problematic formatting mentioned above also causes script execution errors during rpm installation and removal. Since I'm trying to update this package to work, I've replaced the broken script with one that works... Works: http://forevermore.net/files/packages/lineak/lineakd.spec Broken: http://forevermore.net/files/packages/lineak/lineakd.brokenscript.spec The only difference between these (for now) is that I applied the fix I mentioned above. Anyway, I still think this is a bug, but obviously extends beyond just rpmlint. Feel free to close this or move it over to rpm as needed. Try running "rpm -q --specfile lineakd.spec --scripts" on your specfile. The problem with those comments is that they get passed on to the corresponding script interpreter (/bin/bash by default, /sbin/ldconfig if you use eg. %post -p /sbin/ldconfig). So depending on the interpreter, they may not be actually comments, and some versions of ldconfig at least used to choke on things like "###########" being fed to it. So, you're looking for comment syntax for specfiles. As far as I know, such a thing doesn't not exist. When you don't use the %post -p /sbin/ldconfig syntax, your %post script is executed with the default script interpreter, /bin/bash. ######... is a comment in bash, so it works. However, because you're not using the %post -p /sbin/ldconfig syntax, rpmbuild won't autogenerate the dependency on /sbin/ldconfig for your %post and friends scripts, and results in a unneeded shell invocation to run your one-liner script, which is why rpmlint whines about one line commands in scriptlets and asks one to use the -p syntax instead. |