forked from rpm-software-management/rpm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve literal value of quoted %files entries
Turn off the special meaning of metacharacters within a file name enclosed in single or double quotes. Do it by automatically escaping such characters at parse time, as that internally reduces the scenario to the one where the user manually escapes the file name in the spec file (i.e. fewer code paths to worry about), as well as allowing for implementing partial quoting (e.g. /foo"*") in the future if we so choose. Currently, only fully quoted file names are supported. Quotes within quotes of the same type can be escaped. This is a change in quote semantics that should bring it closer to user expectations as well as providing a more convenient way of escaping a lot of characters at once. The negative impact on existing spec files should be minimal, if any, since the only reason to quote a file name right now would be to escape spaces, and that continues to work as expected. One use case that could break is a file that's quoted but contains metacharacters which would previously be expanded (e.g. "/foo[abc]"). Depending on the actual build root contents, this may cause an unpredictable and/or silent change in the resulting file list at build time, compared to the previous builds of the same package. Note that we must keep the behavior of rpmEscapeSpaces() exactly as it is and since isspace(3) is locale-dependent, we need to allow for it to still be used through rpmEscapeChars() while also allowing the caller to specify a static string of characters to escape, hence accepting two argument types to choose from. Fixes: rpm-software-management#1749
- Loading branch information
Showing
5 changed files
with
76 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters