From b7aed4701bf3885880b2696470a357b23b584bbd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Mon, 13 Jan 2020 23:32:34 +0100 Subject: [PATCH] - try checking and creating build dirs after spec parse (PLD _specdir dir contains %{name} macro what is filled in during parse) --- create-build-tree-after-parse.patch | 30 +++++++++++++++++++++++++++++ rpm.spec | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 create-build-tree-after-parse.patch diff --git a/create-build-tree-after-parse.patch b/create-build-tree-after-parse.patch new file mode 100644 index 0000000..f81468a --- /dev/null +++ b/create-build-tree-after-parse.patch @@ -0,0 +1,30 @@ +--- rpm-4.15.1/rpmbuild.c~ 2019-06-26 16:17:31.000000000 +0200 ++++ rpm-4.15.1/rpmbuild.c 2020-01-13 23:29:36.442259031 +0100 +@@ -435,13 +435,6 @@ + if (ba->buildRootOverride) + buildRootURL = rpmGenPath(NULL, ba->buildRootOverride, NULL); + +- /* Create build tree if necessary */ +- const char * buildtree = "%{_topdir}:%{_specdir}:%{_sourcedir}:%{_builddir}:%{_rpmdir}:%{_srcrpmdir}:%{_buildrootdir}"; +- const char * rootdir = rpmtsRootDir(ts); +- if (rpmMkdirs(!rstreq(rootdir, "/") ? rootdir : NULL , buildtree)) { +- goto exit; +- } +- + if (buildMode == 't') { + char *srcdir = NULL, *dir; + +@@ -508,6 +501,13 @@ + goto exit; + } + ++ /* Create build tree if necessary */ ++ const char * buildtree = "%{_topdir}:%{_specdir}:%{_sourcedir}:%{_builddir}:%{_rpmdir}:%{_srcrpmdir}:%{_buildrootdir}"; ++ const char * rootdir = rpmtsRootDir(ts); ++ if (rpmMkdirs(!rstreq(rootdir, "/") ? rootdir : NULL , buildtree)) { ++ goto exit; ++ } ++ + if ((rc = rpmSpecBuild(ts, spec, ba))) { + goto exit; + } diff --git a/rpm.spec b/rpm.spec index 16bc4ec..93459ce 100644 --- a/rpm.spec +++ b/rpm.spec @@ -80,6 +80,7 @@ Patch15: x32.patch Patch16: %{name}-add-compress-doc.patch Patch17: rpm5-db-compat.patch Patch18: python-internal-build.patch +Patch19: create-build-tree-after-parse.patch URL: https://rpm.org/ BuildRequires: %{reqdb_pkg}-devel >= %{reqdb_pkgver} BuildRequires: %{reqdb_pkg}-sql-devel >= %{reqdb_pkgver} @@ -596,6 +597,7 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze %patch16 -p1 %patch17 -p1 %patch18 -p1 +%patch19 -p1 install %{SOURCE16} scripts/perl.prov.in -- 2.43.0