[Freeipa-devel] Why is RPM posttrans quiet?
Martin Kosek
mkosek at redhat.com
Wed Jan 15 09:27:58 UTC 2014
On 01/15/2014 10:11 AM, Petr Spacek wrote:
> Hello list,
>
> I just found that freeipa.spec silences all messages from %posttrans scripts,
> which makes me a bit nervous:
>
> %posttrans server
> # This must be run in posttrans so that updates from previous
> # execution that may no longer be shipped are not applied.
> /usr/sbin/ipa-ldap-updater --upgrade --quiet >/dev/null || :
> /usr/sbin/ipa-upgradeconfig --quiet >/dev/null || :
>
> # Restart IPA processes. This must be also run in postrans so that plugins
> # and software is in consistent state
> python -c "import sys; from ipaserver.install import installutils; sys.exit(0
> if installutils.is_ipa_configured() else 1);" > /dev/null 2>&1
> # NOTE: systemd specific section
> if [ $? -eq 0 ]; then
> /bin/systemctl try-restart ipa.service >/dev/null 2>&1 || :
> fi
> # END
>
>
> I can't find such requirement in
> https://fedoraproject.org/wiki/Packaging:Guidelines
>
> Is there any particular reason for that?
>
> Does anybody have objections against removing redirection to /dev/null? (With
> appropriate handling for non-existent binaries, of course.)
IIRC, we decided to only print errors in the RPM updater, thus the --quiet
option. We do not print INFO and DEBUG logs to avoid cluttering RPM update
transcript and only display meaningful information.
This is a bit related:
https://git.fedorahosted.org/cgit/freeipa.git/commit/?id=79a427277a12925bca3f170cc7a255a2a9e45a10
Martin
More information about the Freeipa-devel
mailing list