[Bug 1947703] New: Fix broken call to perl.prov when filenames contain spaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1947703

            Bug ID: 1947703
           Summary: Fix broken call to perl.prov when filenames contain
                    spaces
           Product: Fedora
           Version: 33
            Status: NEW
         Component: perl-generators
          Assignee: jplesnik@xxxxxxxxxx
          Reporter: bab@xxxxxxxxxx
        QA Contact: extras-qa@xxxxxxxxxxxxxxxxx
                CC: jplesnik@xxxxxxxxxx,
                    perl-devel@xxxxxxxxxxxxxxxxxxxxxxx, ppisar@xxxxxxxxxx
  Target Milestone: ---
    Classification: Fedora



Created attachment 1770474
  --> https://bugzilla.redhat.com/attachment.cgi?id=1770474&action=edit
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 correctly.

How reproducible:

Consistently reproducible; just use a topdir with spaces and then build any
spec file that includes perl scripts.

Additional info:

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.
_______________________________________________
perl-devel mailing list -- perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to perl-devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite Information]

  Powered by Linux