[packages/rpm/rpm.org] - ghost files must exist

baggins baggins at pld-linux.org
Fri Dec 18 19:42:09 CET 2020


commit 4401c4393a36bee6859860a7cb99338ee15f1918
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri Dec 18 19:41:46 2020 +0100

    - ghost files must exist

 missing-ghost-terminate-build.patch | 19 +++++++++++++++++++
 rpm.spec                            |  4 +++-
 2 files changed, 22 insertions(+), 1 deletion(-)
---
diff --git a/rpm.spec b/rpm.spec
index 6329cb1..9244714 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -26,7 +26,7 @@ Summary(ru.UTF-8):	Менеджер пакетов от RPM
 Summary(uk.UTF-8):	Менеджер пакетів від RPM
 Name:		rpm
 Version:	4.16.0
-Release:	0.10
+Release:	0.11
 Epoch:		1
 License:	GPL v2 / LGPL v2.1
 Group:		Base
@@ -80,6 +80,7 @@ Patch26:	allow-at-in-ver-rel.patch
 Patch27:	no-exeonly-for-elf-reqprov.patch
 Patch28:	default-patch-flags.patch
 Patch29:	%{name}-noarch_py_prov.patch
+Patch30:	missing-ghost-terminate-build.patch
 URL:		https://rpm.org/
 BuildRequires:	acl-devel
 BuildRequires:	db-devel >= %{db_ver}
@@ -575,6 +576,7 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze
 %patch27 -p1
 %patch28 -p1
 %patch29 -p1
+%patch30 -p1
 
 install %{SOURCE15} scripts/perl.prov.in
 
diff --git a/missing-ghost-terminate-build.patch b/missing-ghost-terminate-build.patch
new file mode 100644
index 0000000..9e7ef7a
--- /dev/null
+++ b/missing-ghost-terminate-build.patch
@@ -0,0 +1,19 @@
+--- rpm-4.16.0/build/files.c~	2020-12-18 19:15:59.000000000 +0100
++++ rpm-4.16.0/build/files.c	2020-12-18 19:34:33.456509321 +0100
+@@ -1401,7 +1401,6 @@
+      * various cases, preserving historical behavior wrt %dev():
+      * - for %dev() entries we fake it up whether the file exists or not
+      * - otherwise try to grab the data by lstat()
+-     * - %ghost entries might not exist, fake it up
+      */
+     if (statp == NULL) {
+ 	memset(&statbuf, 0, sizeof(statbuf));
+@@ -1410,8 +1409,6 @@
+ 	    statp = fakeStat(&(fl->cur), &statbuf);
+ 	} else if (lstat(diskPath, &statbuf) == 0) {
+ 	    statp = &statbuf;
+-	} else if (fl->cur.attrFlags & RPMFILE_GHOST) {
+-	    statp = fakeStat(&(fl->cur), &statbuf);
+ 	} else {
+ 	    int lvl = RPMLOG_ERR;
+ 	    int ignore = 0;
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list