<p><b>@mlschroe</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/rpm-software-management/rpm/pull/1053#discussion_r375751321">build/rpmfc.c</a>:</p>
<pre style='color:#555'>> @@ -514,6 +514,22 @@ static ARGV_t runCmd(const char *cmd,
     return output;
 }
 
+static ARGV_t runCall(const char *cmd,
+                    const char *buildRoot, const char *fn)
+{
+
+    ARGV_t output = NULL;
+    char *fullcmd = rstrscat(NULL, "%{", cmd, " ", "%{?buildroot:buildroot/}", fn, "}", NULL);
</pre>
<p>This doesn't work for file names like <code>foo}bar</code> or <code>foo%%bar</code>. To make that bulletproof, you'd need a <code>rpmMacroExpandParametric(rpmMacroContext mc, const char *n, ARGV_t argv)</code> function.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/rpm-software-management/rpm/pull/1053?email_source=notifications&email_token=ADLPZU33FE65BWOAR7VLJZ3RBPQJFA5CNFSM4KQY4CV2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCUPM62Q#pullrequestreview-354340714">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ADLPZUZZLRGH7OJ4QDLGRTDRBPQJFANCNFSM4KQY4CVQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ADLPZU4NBO2A5GERHSYHIZLRBPQJFA5CNFSM4KQY4CV2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCUPM62Q.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/rpm-software-management/rpm/pull/1053?email_source=notifications\u0026email_token=ADLPZU33FE65BWOAR7VLJZ3RBPQJFA5CNFSM4KQY4CV2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCUPM62Q#pullrequestreview-354340714",
"url": "https://github.com/rpm-software-management/rpm/pull/1053?email_source=notifications\u0026email_token=ADLPZU33FE65BWOAR7VLJZ3RBPQJFA5CNFSM4KQY4CV2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCUPM62Q#pullrequestreview-354340714",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>