Bug ID: 1947703
Summary: Fix broken call to perl.prov when filenames contain
QA Contact: extras-qa(a)fedoraproject.org
Target Milestone: ---
Created attachment 1770474
Patch to fix issue
Description of problem:
If %_topdir contains spaces, then RPM package builds produce errors when
calculating perl dependencies. These errors appear to be non-fatal (the RPM
builds run to completion), but given the nature of the problem it does seem
possible that the perl dependencies are not being deduced correctly.
The issue is simple: /usr/lib/rpm/perl.req contains a readpipe call to
"$prov_script $file", which is interpreted by the shell, without properly
quoting or escaping its $file argument.
I've attached a patch which fixes this, patched and tested against Fedora 33.
The patch is simple: it puts single quotes around the argument $file in the
readpipe() call to stop the shell splitting the $file argument (or indeed doing
other unwanted substitutions/code-calling/etc.). Since $file might also
contain single quotes, I've added a substitution regex beforehand that replaces
each ' with '"'"' so that the shell picks up any single quotes
Consistently reproducible; just use a topdir with spaces and then build any
spec file that includes perl scripts.
For me at least the bug was practical, not just theoretical - I encountered
this when building Fedora packages in a continuous integration system, where
the RPM build directories were beneath machine-specific directories with names
such as "Fedora 33", "Fedora 32", etc.
You are receiving this mail because:
You are on the CC list for the bug.