2019-10-02 15:28:11 +02:00
|
|
|
--- ./build/parseSpec.c.orig 2019-10-02 12:38:51.836127743 +0000
|
|
|
|
+++ ./build/parseSpec.c 2019-10-02 12:52:33.818447657 +0000
|
2020-05-15 08:58:45 +02:00
|
|
|
@@ -926,7 +926,22 @@ static rpmSpec parseSpec(const char *spe
|
2019-10-02 15:28:11 +02:00
|
|
|
&(spec->buildrequires));
|
|
|
|
break;
|
|
|
|
case PART_BUILD:
|
|
|
|
- parsePart = parseSimpleScript(spec, "%build", &(spec->build));
|
|
|
|
+ if (spec->build) {
|
|
|
|
+ rpmlog(RPMLOG_ERR, _("line %d: second %s\n"), spec->lineNum, "%build");
|
|
|
|
+ parsePart = PART_ERROR;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ spec->build = newStringBuf();
|
|
|
|
+ appendLineStringBuf(spec->build,
|
2020-05-15 08:58:45 +02:00
|
|
|
+ "ref=/usr/lib/rpm; testarch=$(uname -m)\n"
|
2019-10-02 15:28:11 +02:00
|
|
|
+ "for s in guess sub; do\n"
|
|
|
|
+ " for c in $(find -maxdepth 8 -name \"config.$s\"); do\n"
|
|
|
|
+ " grep -q config-patches@ $c || continue\n"
|
2020-05-15 08:58:45 +02:00
|
|
|
+ " grep -q $testarch\\[-:\\] $c || install -m 755 $ref/config.$s $c\n"
|
2019-10-02 15:28:11 +02:00
|
|
|
+ " done\n"
|
|
|
|
+ "done\n"
|
|
|
|
+ );
|
|
|
|
+ parsePart = parseLines(spec, STRIP_NOTHING, NULL, &(spec->build));
|
|
|
|
break;
|
|
|
|
case PART_INSTALL:
|
|
|
|
parsePart = parseSimpleScript(spec, "%install", &(spec->install));
|