[Rpm-maint] [rpm-software-management/rpm] Add proper quotation support to %files (PR #2206)

Michal Domonkos notifications at github.com
Tue Sep 27 13:21:00 UTC 2022


Treat globs in a quoted filename as literal (not just spaces). This makes the behavior consistent with the typical shell quotation and also makes the escaping of a large file list easier to automate.

Only double quotes are supported for now. Adding single quotes as an alternative to mix & match isn't difficult, but would just make things needlessly more complicated to document and review.

This is the last PR in the long-running series of glob revamps that all started with #1749, which this PR, if merged, also concludes. :partying_face: 
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/2206

-- Commit Summary --

  * Refactor strtokWithQuotes()
  * Add support for whitespace escaping in %files
  * Check for missing quote in %files
  * Preserve literal value of quoted paths in %files
  * Update docs for new quotation semantics in %files

-- File Changes --

    M build/files.c (63)
    M docs/manual/spec.md (11)
    M include/rpm/rpmfileutil.h (15)
    M rpmio/rpmfileutil.c (34)
    A tests/data/SPECS/badescape.spec (19)
    A tests/data/SPECS/badquote.spec (18)
    M tests/data/SPECS/globesctest.spec (34)
    M tests/rpmbuild.at (46)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/2206.patch
https://github.com/rpm-software-management/rpm/pull/2206.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2206
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2206 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220927/799e30c0/attachment.html>


More information about the Rpm-maint mailing list