Hide Forgot
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.
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.
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 =================