1 diff -ur rpm-4.16.0/build/parseChangelog.c rpm-4.16.0-noexpand/build/parseChangelog.c
2 --- rpm-4.16.0/build/parseChangelog.c 2020-12-18 20:09:28.341535424 +0100
3 +++ rpm-4.16.0-noexpand/build/parseChangelog.c 2020-12-18 20:01:53.963847399 +0100
8 - if ((res = parseLines(spec, STRIP_COMMENTS, &sb, NULL)) == PART_ERROR)
9 + if ((res = parseLines(spec, STRIP_COMMENTS | STRIP_NOEXPAND, &sb, NULL)) == PART_ERROR)
12 if (sb && addChangelog(spec->packages->header, sb)) {
13 diff -ur rpm-4.16.0/build/parseSpec.c rpm-4.16.0-noexpand/build/parseSpec.c
14 --- rpm-4.16.0/build/parseSpec.c 2020-05-28 12:04:25.007136522 +0200
15 +++ rpm-4.16.0-noexpand/build/parseSpec.c 2020-12-18 20:08:13.791373996 +0100
17 if (!spec->readStack->reading)
20 + /* Also don't expand macros in %changelog and %description, where we set STRIP_NOEXPAND flag */
21 + if (strip & STRIP_NOEXPAND)
24 if (specExpand(spec, ofi->lineNum, spec->lbuf, &lbuf))
27 lineType = copyNextLineFinish(spec, strip);
31 + if (!lineType || (strip & STRIP_NOEXPAND))
32 goto after_classification;
34 /* check ordering of the conditional */
35 diff -ur rpm-4.16.0/build/rpmbuild_internal.h rpm-4.16.0-noexpand/build/rpmbuild_internal.h
36 --- rpm-4.16.0/build/rpmbuild_internal.h 2020-12-18 20:09:28.354868788 +0100
37 +++ rpm-4.16.0-noexpand/build/rpmbuild_internal.h 2020-12-18 20:09:09.054827168 +0100
39 #define STRIP_NOTHING 0
40 #define STRIP_TRAILINGSPACE (1 << 0)
41 #define STRIP_COMMENTS (1 << 1)
42 +#define STRIP_NOEXPAND (1 << 2)
44 #define ALLOW_EMPTY (1 << 16)