summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools/rpm
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2011-02-15 22:43:42 -0600
committerSaul Wold <sgw@linux.intel.com>2011-02-16 07:34:51 -0800
commit4ac789b9588ff8d2abaf4c3893c10bc6369baeee (patch)
tree6ff2b7fac0576307d7a83d148ef3abbaa8f0852a /meta/recipes-devtools/rpm
parentca649ef8253cbf69062322b5bdee4123ee4c4eca (diff)
downloadopenembedded-core-4ac789b9588ff8d2abaf4c3893c10bc6369baeee.tar.gz
openembedded-core-4ac789b9588ff8d2abaf4c3893c10bc6369baeee.tar.bz2
openembedded-core-4ac789b9588ff8d2abaf4c3893c10bc6369baeee.tar.xz
openembedded-core-4ac789b9588ff8d2abaf4c3893c10bc6369baeee.zip
rpm: Avoid fsync when writing files
By default RPM strives for the safest possible file creation and enforces fsync on each file. This changes that default by backporting the fsync disabled from the latest CVS snapshot. This will cut a few minutes off the rootfs generation using RPM. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/recipes-devtools/rpm')
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-nofsync.patch34
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.0.bb1
2 files changed, 35 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-nofsync.patch b/meta/recipes-devtools/rpm/rpm/rpm-nofsync.patch
new file mode 100644
index 000000000..33039ad99
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-nofsync.patch
@@ -0,0 +1,34 @@
+Backport from RPM 5.4.1 CVS, disabled fsync.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+diff -ur rpm-5.4.0.orig/CHANGES rpm-5.4.0/CHANGES
+--- rpm-5.4.0.orig/CHANGES 2010-12-29 07:51:38.000000000 -0600
++++ rpm-5.4.0/CHANGES 2011-02-15 20:54:27.021926840 -0600
+@@ -1,4 +1,5 @@
+ 5.4.0 -> 5.4.1:
++ - jbj: remove fsync(2) after file install, its intolerably slow.
+
+ 5.3.7 -> 5.4.0:
+ - jbj: remove markReplacedFiles.
+diff -ur rpm-5.4.0.orig/lib/fsm.c rpm-5.4.0/lib/fsm.c
+--- rpm-5.4.0.orig/lib/fsm.c 2009-12-10 12:52:18.000000000 -0600
++++ rpm-5.4.0/lib/fsm.c 2011-02-15 20:55:04.372938221 -0600
+@@ -1017,7 +1017,17 @@
+ (void) fsmNext(fsm, IOSM_NOTIFY);
+ }
+
++#ifdef DYING
++/* Measurements from installing kernel-source package:
++ * +fsync
++ * total: 1 0.000000 MB 640.854524 secs
++ * +fdatasync
++ * total: 1 0.000000 MB 419.983200 secs
++ * w/o fsync/fdsatasync:
++ * total: 1 0.000000 MB 12.492918 secs
++ */
+ xx = fsync(Fileno(fsm->wfd));
++#endif
+
+ if (st->st_size > 0 && (fsm->fdigest || fsm->digest)) {
+ void * digest = NULL;
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.0.bb b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
index 93951d2c6..45dd4e1ee 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.0.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
@@ -54,6 +54,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.0-0.20101229.src.rpm;ex
file://header-include-fix.patch \
file://rpm-platform.patch \
file://rpm-showrc.patch \
+ file://rpm-nofsync.patch \
"
# file://hdraddorappend.patch \