To include comments in the spec file, use a #
character at the start of the line. That way, the line will be ignored by RPM.
Because macros are expanded first, do not insert any multiline macros in a comment. If you want to comment out a line with a macro, double the percent signs (%%
) as in the following example:
Also, do not use inline comments ("#") on the same line after a script command.