rpmlint
rpmlint copied to clipboard
Detect undefined macros being used in %files
I had a case where some undefined macro was used in %files section. rpmlint detected no error, but building the RPM failed as the resulting filename to add did not start with a slash.
Like in %{undefined}/bar when %define undefined /foo was expected.
error: File must begin with "/": %{undefined}/bar
Seems like a good idea. Are you willing to prepare a pull request for it?
Isn't this solved here https://github.com/rpm-software-management/rpmlint/blob/main/rpmlint/checks/FilesCheck.py#L632?
Maybe we just need a test for this case.