[Erp5-report] r8032 - /spec/mandriva/2006.0/zope-ZMySQLDA/

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Jun 19 17:42:16 CEST 2006


Author: kevin
Date: Mon Jun 19 17:42:14 2006
New Revision: 8032

URL: http://svn.erp5.org?rev=8032&view=rev
Log:
Commit zope-ZMySQLDA-2.0.9b2-6mdk spec files and patches

Added:
    spec/mandriva/2006.0/zope-ZMySQLDA/
    spec/mandriva/2006.0/zope-ZMySQLDA/ZMySQLDA-2.0.9b2_release-unlocked-lock.patch
    spec/mandriva/2006.0/zope-ZMySQLDA/ZMySQLDA-2.0.9b2_with_MySQL-python-0.9.0.patch
    spec/mandriva/2006.0/zope-ZMySQLDA/zope-ZMySQLDA.spec   (with props)

Added: spec/mandriva/2006.0/zope-ZMySQLDA/ZMySQLDA-2.0.9b2_release-unlocked-lock.patch
URL: http://svn.erp5.org/spec/mandriva/2006.0/zope-ZMySQLDA/ZMySQLDA-2.0.9b2_release-unlocked-lock.patch?rev=8032&view=auto
==============================================================================
--- spec/mandriva/2006.0/zope-ZMySQLDA/ZMySQLDA-2.0.9b2_release-unlocked-lock.patch (added)
+++ spec/mandriva/2006.0/zope-ZMySQLDA/ZMySQLDA-2.0.9b2_release-unlocked-lock.patch Mon Jun 19 17:42:14 2006
@@ -1,0 +1,43 @@
+diff -ru ZMySQLDA-2.0.9b2/ZMySQLDA/db.py ZMySQLDA/ZMySQLDA/db.py
+--- ZMySQLDA-2.0.9b2/ZMySQLDA/db.py 2002-03-14 21:24:54.000000000 +0100
++++ ZMySQLDA/ZMySQLDA/db.py  2003-04-28 10:29:38.000000000 +0200
+@@ -204,6 +204,7 @@
+             self._use_TM = 1
+         if self._use_TM:
+             self._tlock = allocate_lock()
++            self._tthread = None
+         self._lock = allocate_lock()
+ 
+     def __del__(self):
+@@ -365,7 +366,9 @@
+     def string_literal(self, s): return self.db.string_literal(s)
+ 
+     def _begin(self, *ignored):
++        from thread import get_ident
+         self._tlock.acquire()
++        self._tthread = get_ident()
+         try:
+             if self._transactions:
+                 self.db.query("BEGIN")
+@@ -380,6 +383,10 @@
+             raise
+         
+     def _finish(self, *ignored):
++        from thread import get_ident
++        if not self._tlock.locked() or self._tthread != get_ident():
++            LOG('ZMySQLDA', INFO, "ignoring _finish")
++            return
+         try:
+             try:
+                 if self._mysql_lock:
+@@ -396,6 +403,10 @@
+             self._tlock.release()
+ 
+     def _abort(self, *ignored):
++        from thread import get_ident
++        if not self._tlock.locked() or self._tthread != get_ident():
++            LOG('ZMySQLDA', INFO, "ignoring _abort")
++            return
+         try:
+             if self._mysql_lock:
+                 self.db.query("SELECT RELEASE_LOCK('%s')" % self._mysql_lock)

Added: spec/mandriva/2006.0/zope-ZMySQLDA/ZMySQLDA-2.0.9b2_with_MySQL-python-0.9.0.patch
URL: http://svn.erp5.org/spec/mandriva/2006.0/zope-ZMySQLDA/ZMySQLDA-2.0.9b2_with_MySQL-python-0.9.0.patch?rev=8032&view=auto
==============================================================================
--- spec/mandriva/2006.0/zope-ZMySQLDA/ZMySQLDA-2.0.9b2_with_MySQL-python-0.9.0.patch (added)
+++ spec/mandriva/2006.0/zope-ZMySQLDA/ZMySQLDA-2.0.9b2_with_MySQL-python-0.9.0.patch Mon Jun 19 17:42:14 2006
@@ -1,0 +1,21 @@
+diff -ru ZMySQLDA-2.0.9b2/ZMySQLDA/db.py ZMySQLDA/ZMySQLDA/db.py
+--- ZMySQLDA-2.0.9b2/ZMySQLDA/db.py	2002-03-14 21:24:54.000000000 +0100
++++ ZMySQLDA/ZMySQLDA/db.py	2003-04-28 10:29:38.000000000 +0200
+@@ -87,6 +87,7 @@
+ __version__='$Revision: 1.20 $'[11:-2]
+ 
+ import _mysql
++import MySQLdb
+ from _mysql_exceptions import OperationalError, NotSupportedError
+ MySQLdb_version_required = (0,9,2)
+ 
+@@ -165,6 +166,9 @@
+     Database_Connection=_mysql.connect
+     Database_Error=_mysql.Error
+ 
++    def Database_Connection(self, *args, **kwargs):
++      return MySQLdb.connect(*args, **kwargs)
++
+     defs={
+         FIELD_TYPE.CHAR: "i", FIELD_TYPE.DATE: "d",
+         FIELD_TYPE.DATETIME: "d", FIELD_TYPE.DECIMAL: "n",

Added: spec/mandriva/2006.0/zope-ZMySQLDA/zope-ZMySQLDA.spec
URL: http://svn.erp5.org/spec/mandriva/2006.0/zope-ZMySQLDA/zope-ZMySQLDA.spec?rev=8032&view=auto
==============================================================================
--- spec/mandriva/2006.0/zope-ZMySQLDA/zope-ZMySQLDA.spec (added)
+++ spec/mandriva/2006.0/zope-ZMySQLDA/zope-ZMySQLDA.spec Mon Jun 19 17:42:14 2006
@@ -1,0 +1,91 @@
+%define product   ZMySQLDA
+%define version   2.0.9b2
+%define release   6
+
+%define zope_home %{_prefix}/lib/zope
+%define software_home %{zope_home}/lib/python
+
+Summary:   A Zope connector to Mysql
+Name:      zope-%{product}
+Version:   %{version}
+Release:   %mkrel %{release}
+License:   GPL
+Group:     System/Servers
+Source:    %{product}-%{version}.tar.bz2
+Patch0:    ZMySQLDA-2.0.9b2_with_MySQL-python-0.9.0.patch.bz2
+Patch1:    ZMySQLDA-2.0.9b2_release-unlocked-lock.patch.bz2
+URL:       http://www.zope.org/Members/adustman/Products/ZMySQLDA
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-rootdir
+BuildArch: noarch
+Requires:  zope MySQL-python MySQL-Max
+
+# Same problem as the Localizer one:
+# (kevin) This "Provides:" statement don't resolve the conflit of pre-existing
+# Localizer package in Mandriva 2006 repository. When you type "urpmi Localizer",
+# nothing is prompt to ask you which version of Localizer you want to install
+# (the mandriva one or the nexedi one): the mandriva version is automatically
+# selected. To obtain the Nexedi's one, you have to type "urpmi zope-Localizer".
+# The solution could be to add a "Provides:  Localizer" statement in Mandriva
+# Spec file.
+Provides:  ZMySQLDA
+
+#----------------------------------------------------------------------
+%description
+ZMySQLDA allows to quickly connect to Mysql with Zope.
+
+#----------------------------------------------------------------------
+%prep
+%setup -c
+%patch0 -p1
+%patch1 -p1
+
+%build
+
+%install
+%{__rm} -rf %{buildroot}
+%{__mkdir_p} %{buildroot}/%{software_home}/Products
+%{__cp} -a * %{buildroot}%{software_home}/Products/
+
+
+%clean
+%{__rm} -rf %{buildroot}
+
+%post
+if [ "`%{_prefix}/bin/zopectl status`" != "daemon manager not running" ] ; then
+  service zope restart
+fi
+
+%postun
+if [ -f "%{_prefix}/bin/zopectl" ] && [ "`%{_prefix}/bin/zopectl status`" != "daemon manager not running" ] ; then
+  service zope restart
+fi
+
+%files
+%defattr(0644, root, root, 0755)
+%doc %{product}/CHANGES.txt %{product}/DEPENDENCIES.txt %{product}/README.txt %{product}/VERSION.txt
+%{software_home}/Products/*
+
+#----------------------------------------------------------------------
+%changelog
+* Wed Jan 5 2006 Kevin Deldycke <kevin at nexedi.com> 2.0.9b2-6mdk
+- Merge nexedi 10.2 spec file with Mandriva 2006 spec file
+
+* Tue Jun 15 2004 Sebastien Robin <seb at nexedi.com> 2.0.9b2-5mdk
+- Added dependency with MySQL
+
+* Wed Sep 12 2003 Sebastien Robin <seb at nexedi.com> 2.0.9b2-4mdk
+- Make now signed rpm
+
+* Wed Sep 05 2003 Sebastien Robin <seb at nexedi.com> 2.0.9b2-3mdk
+- Change in the requires field "Zope" by "zope"
+
+* Wed Sep 05 2003 Sebastien Robin <seb at nexedi.com> 2.0.9b2-2mdk
+- Update spec in order to follows Mandrake Rules
+
+* Mon Apr 28 2003 Sebastien Robin <seb at nexedi.com> 2.0.9b2-1nxd
+- It was first made by converting a Debian Package. But since
+we need to modify it, we needed to build by the rpm way.
+
+* Wed Mar 23 2003 Sebastien Robin <seb at nexedi.com> 2.0.8-2nxd
+- It was first made by converting a Debian Package. But since
+we need to modify it, we needed to build by the rpm way.

Propchange: spec/mandriva/2006.0/zope-ZMySQLDA/zope-ZMySQLDA.spec
------------------------------------------------------------------------------
    svn:executable = *




More information about the Erp5-report mailing list