Add db4 integration patch
authorAnas Nashif <anas.nashif@intel.com>
Thu, 11 Oct 2012 19:18:10 +0000 (12:18 -0700)
committerAnas Nashif <anas.nashif@intel.com>
Sun, 3 Feb 2013 00:44:14 +0000 (16:44 -0800)
packaging/db-4.8.30-integration.patch [new file with mode: 0644]
packaging/db-4.8.30.tar.bz2 [new file with mode: 0644]
packaging/rpm.spec

diff --git a/packaging/db-4.8.30-integration.patch b/packaging/db-4.8.30-integration.patch
new file mode 100644 (file)
index 0000000..dbfb293
--- /dev/null
@@ -0,0 +1,82 @@
+--- db/db/db.c.orig    2010-04-12 20:25:22.000000000 +0000
++++ db/db/db.c 2011-05-12 11:38:59.000000000 +0000
+@@ -646,6 +646,8 @@ __env_mpool(dbp, fname, flags)
+                       MAKE_INMEM(dbp);
+               return (ret);
+       }
++      if (LF_ISSET(DB_NOFSYNC) && mpf->mfp)
++          F_SET(mpf->mfp, MP_NOFSYNC);
+       /*
+        * Set the open flag.  We use it to mean that the dbp has gone
+--- db/db/db_iface.c.orig      2010-04-12 20:25:22.000000000 +0000
++++ db/db/db_iface.c   2011-05-12 11:21:32.000000000 +0000
+@@ -1230,6 +1230,7 @@ __db_open_arg(dbp, txn, fname, dname, ty
+ #define       OKFLAGS                                                         \
+       (DB_AUTO_COMMIT | DB_CREATE | DB_EXCL | DB_FCNTL_LOCKING |      \
+       DB_MULTIVERSION | DB_NOMMAP | DB_NO_AUTO_COMMIT | DB_RDONLY |   \
++      DB_NOFSYNC |                                                    \
+       DB_RDWRMASTER | DB_READ_UNCOMMITTED | DB_THREAD | DB_TRUNCATE)
+       if ((ret = __db_fchk(env, "DB->open", flags, OKFLAGS)) != 0)
+               return (ret);
+--- db/dbinc/mp.h.orig 2010-04-12 20:25:22.000000000 +0000
++++ db/dbinc/mp.h      2011-05-12 12:01:32.000000000 +0000
+@@ -467,6 +467,7 @@ struct __mpoolfile {
+ #define       MP_FAKE_UOC             0x080   /* Unlink_on_close field: fake flag. */
+ #define       MP_NOT_DURABLE          0x100   /* File is not durable. */
+ #define       MP_TEMP                 0x200   /* Backing file is a temporary. */
++#define       MP_NOFSYNC              0x400   /* Don't fsync */
+       u_int32_t  flags;
+ };
+--- db/dbinc_auto/api_flags.in.orig    2011-05-12 11:40:57.000000000 +0000
++++ db/dbinc_auto/api_flags.in 2011-05-12 11:55:10.000000000 +0000
+@@ -83,6 +83,7 @@
+ #define       DB_NOORDERCHK                           0x00000002
+ #define       DB_NOPANIC                              0x00000800
+ #define       DB_NO_AUTO_COMMIT                       0x00001000
++#define       DB_NOFSYNC                              0x00040000
+ #define       DB_ODDFILESIZE                          0x00000080
+ #define       DB_ORDERCHKONLY                         0x00000004
+ #define       DB_OVERWRITE                            0x00001000
+--- db/dist/s_config.orig      2010-04-12 20:25:23.000000000 +0000
++++ db/dist/s_config   2011-05-12 12:00:34.000000000 +0000
+@@ -8,7 +8,8 @@ trap 'rm -f aclocal.m4 ; exit 0' 0 1 2 3
+ . ./RELEASE
+ echo "autoconf: building aclocal.m4..."
+-cat aclocal/*.m4 aclocal_java/*.m4 > aclocal.m4
++cat aclocal/*.m4 aclocal_java/*.m4 > acinclude.m4
++aclocal
+ echo "autoconf: running autoheader to build config.hin..."
+ rm -f config.hin
+--- db/mp/mp_sync.c.orig       2010-04-12 20:25:34.000000000 +0000
++++ db/mp/mp_sync.c    2011-05-12 11:36:58.000000000 +0000
+@@ -578,7 +578,7 @@ done:      /*
+       if (ret == 0 && required_write) {
+               if (dbmfp == NULL)
+                       ret = __memp_sync_files(env);
+-              else
++              else if (!F_ISSET(dbmfp->mfp, MP_NOFSYNC))
+                       ret = __os_fsync(env, dbmfp->fhp);
+       }
+@@ -665,7 +665,7 @@ __memp_sync_file(env, mfp, argp, countp,
+                           "%s: unable to flush", (char *)
+                           R_ADDR(dbmp->reginfo, mfp->path_off));
+               }
+-      } else
++      } else if (!F_ISSET(dbmfp->mfp, MP_NOFSYNC))
+               ret = __os_fsync(env, dbmfp->fhp);
+       /*
+@@ -801,6 +801,8 @@ __memp_mf_sync(dbmp, mfp, locked)
+       COMPQUIET(hp, NULL);
+       env = dbmp->env;
++      if (F_ISSET(mfp, MP_NOFSYNC))
++          return 0;
+       /*
+        * We need to be holding the hash lock: we're using the path name
+        * and __memp_nameop might try and rename the file.
diff --git a/packaging/db-4.8.30.tar.bz2 b/packaging/db-4.8.30.tar.bz2
new file mode 100644 (file)
index 0000000..794dc77
Binary files /dev/null and b/packaging/db-4.8.30.tar.bz2 differ
index d62e46328f5496419dee123632216be6f2c6c903..dc505c81f5a877122fc4c9689ae35874e40a8a86 100644 (file)
@@ -34,91 +34,15 @@ License:        GPL-2.0+
 Group:          System/Packages
 Version:        4.10.1
 Release:        0
-Source:         rpm-%{version}.tar.bz2
-Source1:        RPM-HOWTO.tar.bz2
-Source2:        RPM-Tips.html.tar.bz2
+Source0:         rpm-%{version}.tar.bz2
+Source1:       db-4.8.30.tar.bz2
 Source4:        rpm-tizen_macros
 Source5:        rpmsort
 Source6:        symset-table
 Source8:        rpmconfigcheck
-Source11:       db-4.8.30.tar.bz2
 Source13:      find-docs.sh
 Source22:      device-sec-policy
-Patch2:         db.diff
-# quilt patches start here
-Patch11:        debugedit.diff
-Patch12:        localetag.diff
-Patch13:        missingok.diff
-Patch14:        nameversioncompare.diff
-Patch15:        dbfsync.diff
-Patch16:        dbrointerruptable.diff
-Patch17:        extcond.diff
-Patch18:        refreshtestarch.diff
-Patch19:        rpmrctests.diff
-Patch20:        waitlock.diff
-Patch21:        suspendlock.diff
-Patch22:        weakdeps.diff
-Patch23:        autodeps.diff
-Patch24:        brp.diff
-Patch25:        brpcompress.diff
-Patch26:        checkfilesnoinfodir.diff
-Patch27:        finddebuginfo.diff
-Patch28:        findksyms.diff
-Patch29:        findlang.diff
-Patch30:        macrosin.diff
-Patch31:        modalias.diff
-Patch32:        platformin.diff
-Patch33:        rpmpopt.diff
-Patch34:        rpmrc.diff
-Patch35:        taggedfileindex.diff
-Patch36:        rpmqpack.diff
-Patch37:        convertdb1static.diff
-Patch38:        build.diff
-Patch39:        modalias-kernel_module.diff
-Patch40:        files.diff
-Patch41:        debugedit-comp-dir.diff
-Patch42:        perlprov.diff
-Patch43:        rpm-shorten-changelog.diff
-Patch44:        debugsource-package.diff
-Patch45:        whatrequires-doc.diff
-Patch46:        remove-brp-strips.diff
-Patch47:        requires-ge-macro.diff
-Patch48:        debugedit-canon-fix.diff
-Patch49:        finddebuginfo-absolute-links.diff
-Patch50:        firmware.diff
-Patch51:        specfilemacro.diff
-Patch52:        modalias-encode.diff
-Patch53:        disttag-macro.diff
-Patch54:        buildidprov.diff
-Patch55:        debugsubpkg.diff
-Patch56:        debuglink.diff
-Patch57:        debuginfo-mono.patch
-Patch58:        lazystatfs.diff
-Patch59:        repackage-nomd5.diff
-Patch60:        safeugid.diff
-Patch61:        noprereqdeprec.diff
-Patch62:        pythondeps.diff
-Patch63:        fontprovides.diff
-Patch64:        rpm-gst-provides.patch
-Patch65:        langnoc.diff
-Patch66:        initscriptsprov.diff
-Patch67:        remove-translations.diff
-Patch68:        no_rep_autop.diff
-Patch69:        headeradddb.diff
-Patch70:        dbprivate.diff
-Patch71:        nobuildcolor.diff
-Patch72:        fileattrs.diff
-Patch73:        nomagiccheck.diff
-Patch74:        findsupplements.diff
-Patch75:        assumeexec.diff
-Patch76:        buildpipe.diff
-Patch77:        mono-find-requires.diff
-Patch78:        debugedit-stabs-warning.diff
-Patch79:        headerchk.diff
-Patch80:        rpm-deptracking.patch
-Patch81:        python3-abi-kind.diff
-Patch82:        perl-python-attr.patch
-Patch100:      security_4.9.1.patch
+Patch0:         db-4.8.30-integration.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 #
 # avoid bootstrapping problem
@@ -186,32 +110,13 @@ security-related functionality.
 %prep
 %setup -q -n rpm-%{version}
 rm -rf sqlite
-rm -rf beecrypt
-#tar xjf %{SOURCE10}
-tar xjf %{SOURCE11}
+tar xjf %{S:1}
 ln -s db-4.8.30 db
-#ln -s beecrypt-4.1.2 beecrypt
 chmod -R u+w db/*
-#tar xjf %{SOURCE12}
-#ln -s neon-0.24.7 neon
 # will get linked from db3
 rm -f rpmdb/db.h
-%patch -P 2
-%patch -P 11 -P 12 -P 13 -P 14 -P 15 -P 16 -P 17 -P 18 -P 19
-%patch -P 20 -P 21 -P 22 -P 23 -P 24 -P 25 -P 26 -P 27 -P 28 -P 29
-%patch -P 30 -P 31 -P 32 -P 33 -P 34 -P 35 -P 36 -P 37 -P 38 -P 39
-%patch -P 40 -P 41 -P 42 -P 43 -P 44 -P 45 -P 46 -P 47 -P 48 -P 49
-%patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59
-%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69
-%patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79 
-%patch -P 80 -P 81 -P 82
-%patch -p1 -P 100
-#chmod 755 scripts/find-supplements{,.ksyms}
-#chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms
-#chmod 755 scripts/firmware.prov
-#chmod 755 scripts/debuginfo.prov
-tar -xjvf %{SOURCE1}
-tar -xjvf %{SOURCE2}
+%patch -P 0
+
 if [ -s /etc/rpm/tizen_macros ]; then
        cp -a /etc/rpm/tizen_macros %{SOURCE4}
 fi