fix the error and warning of spec file