rpmlint icon indicating copy to clipboard operation
rpmlint copied to clipboard

Detect undefined macros being used in %files

Open sjvudp opened this issue 4 years ago • 2 comments

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

sjvudp avatar Mar 17 '21 09:03 sjvudp

Seems like a good idea. Are you willing to prepare a pull request for it?

marxin avatar Mar 17 '21 11:03 marxin

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.

danigm avatar Mar 15 '23 08:03 danigm