[packages/rpm/rpm.org] - try checking and creating build dirs after spec parse (PLD _specdir dir contains %{name} macro wha

baggins baggins at pld-linux.org
Mon Jan 13 23:33:55 CET 2020


commit b7aed4701bf3885880b2696470a357b23b584bbd
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Jan 13 23:32:34 2020 +0100

    - 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(+)
---
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
 
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;
+     }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/b7aed4701bf3885880b2696470a357b23b584bbd



More information about the pld-cvs-commit mailing list