Fix %post script in the spec file.

Fixes #5097