[Rpm-maint] [rpm-software-management/rpm] Avoid special characters from %{VERSION} in %builddir (PR #3160)

Panu Matilainen notifications at github.com
Wed Jun 12 07:36:01 UTC 2024


%setup always defaulted to %{name}-%{version} as the directory name, but most projects would only have regular characters in their tarball path components (and those that did, could be expected to deal with it). And when using tilde/caret in Version you'd use `%setup -n <path>` instead. This changed with the new %builddir in 4.20 where caret and tilde from version leak into build paths, and nowhere near all build systems, helper scripts and whatnot properly escape/quote all the paths they handle. Such as apparently ninja-build, reported in https://bugzilla.redhat.com/show_bug.cgi?id=2290987

Convert ^ and ~ in builddir to underscores. Note we specifically only convert that for the per-package %builddir we create, if somebody sets the top build directory to a path that includes such oddities, that's explicitly *their* responsibility.

Fixes: #3159
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Avoid special characters from %{VERSION} in %builddir

-- File Changes --

    M build/parsePreamble.c (10)
    M tests/data/SPECS/weirdnames.spec (7)
    M tests/rpmbuild.at (6)

-- Patch Links --

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

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

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


More information about the Rpm-maint mailing list