From: Justin Forbes on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1088#note_5661987...
As I recall, the problem with --with-vanilla is rpm complains over -vanilla. I think there are 2 possible fixes, changing the variant from "-vanilla" to ".vanilla", or just dropping the variant all together. In my opinion, I prefer this solution because it cleans up the spec quite a bit, but I am also not a big user of "--with-vanilla". For people wishing to have vanilla marked, you can always 'echo vanilla > localversion", though it wouldn't be automated based on the build args.