I have found a bug in an RPM that I have been provided.

rpm -qp --scripts foo.rpm > /tmp/badscript

cat /tmp/badscript
postinstall scriptlet (using /bin/sh):
if [ 'some bug' == true ]....

I have access to the source code and the spec files, but I am unable to find which file is the postinstall scriptlet.

Is it possible for me to fix this bug? If so where do I find the script?

I assumed it would be in buildutils/rpmbuild/SPEC, yet when I grep the entire source code, I can't find the string that contains the bug.

  • Could you change your example with the actual code? Is it really called basdscript and postinstall scriptlet and 'some bug'? What rpm is this? How can we help with the information provided?
    – terdon
    Mar 27, 2014 at 23:08

1 Answer 1


They are in the spec file itself. See


In your case search for a %post section.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .