rpms/rpm/devel rpm-4.4.2-no-large-mmap.patch, NONE, 1.1 rpm.spec, 1.190, 1.191

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Thu Jan 12 13:01:06 UTC 2006


Author: pnasrat

Update of /cvs/dist/rpms/rpm/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv16159

Modified Files:
	rpm.spec 
Added Files:
	rpm-4.4.2-no-large-mmap.patch 
Log Message:
Don't mmap large files

rpm-4.4.2-no-large-mmap.patch:
 legacy.c |    5 +++++
 1 files changed, 5 insertions(+)

--- NEW FILE rpm-4.4.2-no-large-mmap.patch ---
--- rpm-4.4.2/rpmdb/legacy.c.no_large_mmap	2006-01-10 11:25:28.000000000 +0000
+++ rpm-4.4.2/rpmdb/legacy.c	2006-01-10 11:25:31.000000000 +0000
@@ -167,6 +167,11 @@
 	goto exit;
     }
 
+    /* file to large (32 MB), do not mmap file */
+    if (fsize > (size_t) 32*1024*1024)
+      if (ut == URL_IS_PATH || ut == URL_IS_UNKNOWN)
+	ut = URL_IS_DASH; /* force fd io */
+
     switch(ut) {
     case URL_IS_PATH:
     case URL_IS_UNKNOWN:


Index: rpm.spec
===================================================================
RCS file: /cvs/dist/rpms/rpm/devel/rpm.spec,v
retrieving revision 1.190
retrieving revision 1.191
diff -u -r1.190 -r1.191
--- rpm.spec	9 Jan 2006 15:03:37 -0000	1.190
+++ rpm.spec	12 Jan 2006 13:01:01 -0000	1.191
@@ -20,7 +20,7 @@
 %define version 4.4.2
 Version: %{version}
 %{expand: %%define rpm_version %{version}}
-Release: 12
+Release: 13
 Group: System Environment/Base
 Source: ftp://wraptastic.org/pub/rpm-4.4.x/rpm-%{rpm_version}.tar.gz
 Source1: mono-find-provides
@@ -42,6 +42,7 @@
 Patch14: rpm-4.4.2-cronpath.patch
 Patch15: rpm-4.4.2-mono.patch
 Patch16: rpm-4.4.2-file-softmagic.patch
+Patch17: rpm-4.4.2-no-large-mmap.patch
 License: GPL
 Conflicts: patch < 2.5
 %ifos linux
@@ -170,6 +171,7 @@
 %patch14 -p1  -b .cronpath
 %patch15 -p1  -b .mono
 %patch16 -p1 -b .magic
+%patch17 -p1 -b .no_large_mmap
 
 %build
 
@@ -562,6 +564,9 @@
 %{__includedir}/popt.h
 
 %changelog
+* Wed Jan 11 2006 Paul Nasrat <pnasrat at redhat.com> - 4.4.2-13
+- Don't mmap large files
+
 * Mon Jan  9 2006 Alexander Larsson <alexl at redhat.com> - 4.4.2-12
 - Add mono req/provides support
 




More information about the fedora-cvs-commits mailing list