How do I handle filenames that contain special characters within an rpm's %files section?
I'm building an RPM but I have a few filenames that contain special characters. I'm not the developer so I do not control the filenames checked into the source code repository.
My example %files section is below:
%files -f files.serviceX.list
%defattr(-,serviceXuser,serviceXuser,-)
My files.serviceX.list contains:
%config(noreplace) %attr(-,serviceXuser,serviceXuser) /etc/serviceX/serviceX.conf
%attr(-,serviceXuser,serviceXuser) /opt/serviceX/tests/runtests.sh
%attr(-,serviceXuser,serviceXuser) /opt/serviceX/tests/configtests.sh
%attr(-,serviceXuser,serviceXuser) /opt/serviceX/tests/badinput.sh
%attr(-,serviceXuser,serviceXuser) /opt/serviceX/tests/#1 escaping.sh
%attr(-,serviceXuser,serviceXuser) /opt/serviceX/tests/#2 bad filenames.sh
The only workaround I've found so far is to list the directory which contains the filenames using special characters in files.serviceX.list:
%config(noreplace) %attr(-,serviceXuser,serviceXuser) /etc/serviceX/serviceX.conf
%attr(-,serviceXuser,serviceXuser) /opt/serviceX/tests/
Is there a better way to deal with this?