public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Paul Nasrat <pnasrat@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: Don't mmap large files
Date: Mon, 23 Nov 2026 09:23:27 GMT	[thread overview]
Message-ID: <179542580731.1.17242625322936255025.rpms-rpm-2adf657fcae0@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rpm
Branch : pmatilai-v6
Commit : 2adf657fcae06ce23074f287971bb957a2d4dabb
Author : Paul Nasrat <pnasrat@fedoraproject.org>
Date   : 2006-01-12T13:01:01+00:00
Stats  : +20/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rpm/c/2adf657fcae06ce23074f287971bb957a2d4dabb?branch=pmatilai-v6

Log:
Don't mmap large files

---
diff --git a/rpm-4.4.2-no-large-mmap.patch b/rpm-4.4.2-no-large-mmap.patch
new file mode 100644
index 0000000..9ff9e0e
--- /dev/null
+++ b/rpm-4.4.2-no-large-mmap.patch
@@ -0,0 +1,14 @@
+--- 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:

diff --git a/rpm.spec b/rpm.spec
index f0dfb61..6a820de 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -20,7 +20,7 @@ Name: rpm
 %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 @@ Patch13: rpm-4.4.2-excluded-size.patch
 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 @@ shell-like rules.
 %patch14 -p1  -b .cronpath
 %patch15 -p1  -b .mono
 %patch16 -p1 -b .magic
+%patch17 -p1 -b .no_large_mmap
 
 %build
 
@@ -562,6 +564,9 @@ exit 0
 %{__includedir}/popt.h
 
 %changelog
+* Wed Jan 11 2006 Paul Nasrat <pnasrat@redhat.com> - 4.4.2-13
+- Don't mmap large files
+
 * Mon Jan  9 2006 Alexander Larsson <alexl@redhat.com> - 4.4.2-12
 - Add mono req/provides support
 

                 reply	other threads:[~2026-11-23  9:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179542580731.1.17242625322936255025.rpms-rpm-2adf657fcae0@fedoraproject.org \
    --to=pnasrat@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox