Trying to build an rpm package, I receive an error:
. Error: [Errno 2] No such file or directory: ‘xt_ndpi-kmod-2.8.1-1.16.g9370ad4.ns7.src.rpm\r’
Pay attention to the trailing “\r”. I think that the problem appeared after I upgraded to Fedora 31.
To workaround the problem @giacomo suggested this change:
-srpm=$(basename "$(grep '^Wrote: ' build.log | tail -1 )") +srpm=$(basename "$(grep '^Wrote: ' build.log | tail -1 | tr -d '\r')")