# /usr/bin/sudo get created with non-readable permissions.
find . -not -perm +0600 -exec chmod u+rw {} \;
# Allow user to delete the built RPM(s)
- chown -h -R $SUDO_USER %{_rpmdir}/%{_arch}
+ [ -d %{_rpmdir}/%{_arch} ] && chown -h -R $SUDO_USER %{_rpmdir}/%{_arch}
fi
%pre