Patch borrowed from OpenSUSE rpm.
We have many packages with old config.sub and config.guess files which don't
have aarch64 support. In order not to patch every separate package, just update
them from rpmbuild during build initialization
Change-Id: I040bab160864edad84fd9cffcff2c9226ef3a4d0
Signed-off-by: Vyacheslav Barinov <v.barinov@samsung.com>
} else if (rc < 0) {
goto exit;
}
-
+
+ if (parsePart == PART_BUILD) {
+ char* buf = strdup(
+ "if [[ `uname -m` == \"aarch64\" ]]; then\n"
+ "ref=/usr/lib/rpm\n"
+ "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"
+ " grep -q aarch64 $c || install -m 755 $ref/config.$s $c\n"
+ " grep -q ppc64le $c || install -m 755 $ref/config.$s $c\n"
+ " done\n"
+ "done\n"
+ "fi\n"
+ );
+ appendLineStringBuf(*sbp, buf);
+ free(buf);
+ }
+
while (! (nextPart = isPart(spec->line))) {
appendStringBuf(*sbp, spec->line);
if ((rc = readLine(spec, STRIP_NOTHING)) > 0) {
fi
done
popd
+%ifarch aarch64 ppc64le
+install -m 755 config.guess %{buildroot}/usr/lib/rpm
+install -m 755 config.sub %{buildroot}/usr/lib/rpm
+%endif
rm -f %{buildroot}%{_libdir}/*.la
rm -f %{buildroot}%{__plugindir}/*.la
%{rpmhome}/*.req
%{rpmhome}/macros.*
%{rpmhome}/fileattrs
+%ifarch aarch64 ppc64le
+%{rpmhome}/config.*
+%endif
%files devel
%manifest %{name}.manifest