SRPM Buildtime macros

All macros in  and   need to be expandable at srpm buildtime. Because SRPMs are built without the package's BuildRequires installed, depending on macros defined outside of the spec file can easily lead to the unexpanded macros showing up in the built SRPM. One way to check is to create a minimal chroot and build the srpm:

mock --init mock --copyin [SRPM] / mock --shell bash rpm -ivh [SRPM] cd /builddir/build/SPECS rpmbuild -bs --nodeps [SRPM] rpm -qpiv /builddir/build/SRPMS/[SRPM] Check the  output for unexpanded macros  or missing information (when  is expanded to the empty string). Even easier is to simply avoid macros in  and   unless they are defined in the current spec file.