diff options
author | Michal Domonkos <mdomonko@redhat.com> | 2022-06-15 17:36:55 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2022-06-27 08:42:36 +0300 |
commit | c10e2310e4c41a626b524ae71b3c4f87a29134b2 (patch) | |
tree | 828b0b6c062bfacb706b9c1c25a700425dd70caf /include | |
parent | f1dc0287e3f2a9b8d6be682498cce503783b9a23 (diff) | |
download | rpm-c10e2310e4c41a626b524ae71b3c4f87a29134b2.tar.gz |
Add shell-like escape support to %files
Make sure any quoted metacharacters in a pattern are unescaped before
it's passed to addFile() and subsequently lstat(2). Do this by always
letting such patterns through rpmGlob() which now handles backslashes
properly since commit 4030062f2bf16d7a4540c78c1e61706f3810fe9b. Don't
expand globs twice in processSpecialDir(), though.
Axe the public rpmIsGlob() which is no longer needed, we'll be bumping
the soname in 4.19.
Construct absolute file names directly without going through
rpmGenPath() so that literal (double) percent signs are not expanded
twice and can be used the same way as in other parts of a spec file.
This means URLs are not handled anymore but we're dealing with local
files here so that should be fine.
Add the "cp" binary to the test environment, it's needed for the %doc
directives which copy stuff around.
Fixes: #1749
Diffstat (limited to 'include')
-rw-r--r-- | include/rpm/rpmfileutil.h | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/include/rpm/rpmfileutil.h b/include/rpm/rpmfileutil.h index 31420e174..21d8bc702 100644 --- a/include/rpm/rpmfileutil.h +++ b/include/rpm/rpmfileutil.h @@ -108,14 +108,6 @@ char * rpmGenPath (const char * urlroot, char * rpmGetPath (const char * path, ...) RPM_GNUC_NULL_TERMINATED; /** \ingroup rpmfileutil - * Check whether pattern contains any glob metacharacters. - * @param pattern glob pattern - * @param quote allow backslash quoting of metacharacters? - * @return 1 if pattern contains globs, 0 otherwise - */ -int rpmIsGlob(const char * pattern, int quote); - -/** \ingroup rpmfileutil * Return URL path(s) from a (URL prefixed) pattern glob. * @param pattern glob pattern * @param[out] *argcPtr no. of paths |