Bug 707596 - Rpmlint shows error when there's comment after %postun
Summary: Rpmlint shows error when there's comment after %postun
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: rpmlint
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-25 13:27 UTC by Jan Kaluža
Modified: 2018-03-23 05:44 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-25 17:20:23 UTC
Type: ---


Attachments (Terms of Use)

Description Jan Kaluža 2011-05-25 13:27:27 UTC
Description of problem:

If I create comment between "%postun -p /sbin/ldconfig" and next section, rpmlint shows following error when executed on the final .rpm package:

libircclient-qt.x86_64: E: postun-without-ldconfig /usr/lib64/libircclient-qt.so.0.5.0
libircclient-qt.x86_64: E: non-empty-%postun /sbin/ldconfig

Spec file fragment:
%postun -p /sbin/ldconfig

# ------------------------------ libircclient-qt -----------------------------

%files

Version-Release number of selected component (if applicable):

rpm.x86_64                          4.8.1-5.fc14              @fedora           
rpm-build.x86_64                    4.8.1-5.fc14              @fedora           
rpm-cron.noarch                     4.8.1-5.fc14              @fedora           
rpm-libs.x86_64                     4.8.1-5.fc14              @fedora           
rpm-python.x86_64                   4.8.1-5.fc14              @fedora           
rpmdevtools.noarch                  7.10-1.fc14               @fedora           
rpmlint.noarch                      1.2-1.fc14                @updates          
rpmorphan.noarch                    1.7-4.fc14                @updates

How reproducible:
always


Steps to Reproduce:
1. Create .spec file as described in description
2. Build package
3. Run RPM lint on that package
  
Actual results:
rpmlint shows:

libircclient-qt.x86_64: E: postun-without-ldconfig /usr/lib64/libircclient-qt.so.0.5.0
libircclient-qt.x86_64: E: non-empty-%postun /sbin/ldconfig

Expected results:
Those errors won't be showed.

Additional info:
I'm not sure if it's bug in rpmlint or rpmbuild. Maybe it's not bug at all, but I would expected that this syntax is allowed from what I've read.

Comment 1 Ville Skyttä 2011-05-25 17:20:23 UTC
There are two bugs in your package:

> libircclient-qt.x86_64: E: postun-without-ldconfig
> /usr/lib64/libircclient-qt.so.0.5.0

Without seeing the complete specfile, I guess you have a libircclient-qt subpackage with shared libs in it.  You need to add a %postun script for that subpackage; the fragment you posted does it only for the main package.

> libircclient-qt.x86_64: E: non-empty-%postun /sbin/ldconfig

run "rpm -qp --scripts" on the binary package to show the scriptlet contents.  rpm ends up passing your "# --------..." to /sbin/ldconfig as a script which was a common source of breakage some time ago when ldconfig didn't tolerate that.  The fix is to remove the comment.

Comment 2 Michal Ambroz 2018-03-23 02:29:47 UTC
I like these visual separators as well and run into same issue.
Workaround is to move that comment to the next section (where it really belongs)

So instead of:
# ========== files =================
%files

To have for example:
%files
# ========== files =================


Note You need to log in before you can comment on or make changes to this bug.