summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Little <scott.little@windriver.com>2018-08-01 15:38:20 -0400
committerScott Little <scott.little@windriver.com>2018-08-01 15:38:23 -0400
commit9f65539a6695f971da4cac483f89f2d4572be113 (patch)
tree4935afd0453238775c91140325670ede35d7c759
parent62a26021eee990c25f9697f6352d9610a3431742 (diff)
Relocate python-psycopg2 to stx-integ/database/python-psycopg2
Move content from stx-gplv3 into stx-integ Packages will be relocated to stx-integ: base/ anaconda crontabs dnsmasq rsync database/ python-psycopg2 filesystem/ parted grub/ grub2 security/ python-keyring Change-Id: I576ac689eb3f25936452bee7833a0b3d30a27780 Story: 2002801 Task: 22687 Signed-off-by: Scott Little <scott.little@windriver.com>
Notes
Notes (review): Code-Review+2: Saul Wold <sgw@linux.intel.com> Code-Review+2: Jason McKenna <jason.mckenna@windriver.com> Code-Review+2: Don Penney <don.penney@windriver.com> Workflow+1: Scott Little <scott.little@windriver.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Thu, 02 Aug 2018 20:13:04 +0000 Reviewed-on: https://review.openstack.org/588039 Project: openstack/stx-gplv3 Branch: refs/heads/master
-rw-r--r--centos_pkg_dirs1
-rw-r--r--python-psycopg2/centos/build_srpm.data2
-rw-r--r--python-psycopg2/centos/meta_patches/PATCH_ORDER2
-rw-r--r--python-psycopg2/centos/meta_patches/meta-patch0.patch33
-rw-r--r--python-psycopg2/centos/meta_patches/setup-spec-for-tis.patch25
-rw-r--r--python-psycopg2/centos/patches/Manually-patch-170-173-187-and-187-fix.patch96
-rw-r--r--python-psycopg2/centos/srpm_path2
7 files changed, 0 insertions, 161 deletions
diff --git a/centos_pkg_dirs b/centos_pkg_dirs
index 183abea..c59367a 100644
--- a/centos_pkg_dirs
+++ b/centos_pkg_dirs
@@ -1,4 +1,3 @@
1python-psycopg2
2crontabs 1crontabs
3parted 2parted
4python-keyring 3python-keyring
diff --git a/python-psycopg2/centos/build_srpm.data b/python-psycopg2/centos/build_srpm.data
deleted file mode 100644
index f261980..0000000
--- a/python-psycopg2/centos/build_srpm.data
+++ /dev/null
@@ -1,2 +0,0 @@
1TIS_PATCH_VER=2
2
diff --git a/python-psycopg2/centos/meta_patches/PATCH_ORDER b/python-psycopg2/centos/meta_patches/PATCH_ORDER
deleted file mode 100644
index 84f9de3..0000000
--- a/python-psycopg2/centos/meta_patches/PATCH_ORDER
+++ /dev/null
@@ -1,2 +0,0 @@
1setup-spec-for-tis.patch
2meta-patch0.patch
diff --git a/python-psycopg2/centos/meta_patches/meta-patch0.patch b/python-psycopg2/centos/meta_patches/meta-patch0.patch
deleted file mode 100644
index bec98c2..0000000
--- a/python-psycopg2/centos/meta_patches/meta-patch0.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From f964faeb50150b64ed2481f721e544f4c3e2ca55 Mon Sep 17 00:00:00 2001
2From: Al Bailey <al.bailey@windriver.com>
3Date: Tue, 29 Nov 2016 15:06:32 -0500
4Subject: [PATCH 1/1] meta patch0
5
6---
7 SPECS/python-psycopg2.spec | 3 +++
8 1 file changed, 3 insertions(+)
9
10diff --git a/SPECS/python-psycopg2.spec b/SPECS/python-psycopg2.spec
11index 2489fc5..c11a680 100644
12--- a/SPECS/python-psycopg2.spec
13+++ b/SPECS/python-psycopg2.spec
14@@ -36,6 +36,8 @@ Url: http://www.psycopg.org/psycopg/
15
16 Source0: http://www.psycopg.org/psycopg/tarballs/PSYCOPG-2-5/psycopg2-%{version}.tar.gz
17
18+Patch0: Manually-patch-170-173-187-and-187-fix.patch
19+
20 BuildRequires: postgresql-devel
21 BuildRequires: python-devel
22 BuildRequires: python-debug
23@@ -103,6 +105,7 @@ Zope Database Adapter for PostgreSQL, called ZPsycopgDA
24
25 %prep
26 %setup -q -n psycopg2-%{version}
27+%patch0 -p1
28
29 %build
30 for python in %{python_runtimes} ; do
31--
321.8.3.1
33
diff --git a/python-psycopg2/centos/meta_patches/setup-spec-for-tis.patch b/python-psycopg2/centos/meta_patches/setup-spec-for-tis.patch
deleted file mode 100644
index dfbb345..0000000
--- a/python-psycopg2/centos/meta_patches/setup-spec-for-tis.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1From 78314a11e44751d23da70c5b935c73579650a2bd Mon Sep 17 00:00:00 2001
2From: Al Bailey <al.bailey@windriver.com>
3Date: Tue, 29 Nov 2016 14:29:21 -0500
4Subject: [PATCH 1/1] Setup spec for Titanium Cloud
5
6---
7 SPECS/python-psycopg2.spec | 2 +-
8 1 file changed, 1 insertion(+), 1 deletion(-)
9
10diff --git a/SPECS/python-psycopg2.spec b/SPECS/python-psycopg2.spec
11index 8492914..2489fc5 100644
12--- a/SPECS/python-psycopg2.spec
13+++ b/SPECS/python-psycopg2.spec
14@@ -28,7 +28,7 @@
15 Summary: A PostgreSQL database adapter for Python
16 Name: python-psycopg2
17 Version: 2.5.1
18-Release: 3%{?dist}
19+Release: 3.el7%{?_tis_dist}.%{tis_patch_ver}
20 # The exceptions allow linking to OpenSSL and PostgreSQL's libpq
21 License: LGPLv3+ with exceptions
22 Group: Applications/Databases
23--
241.8.3.1
25
diff --git a/python-psycopg2/centos/patches/Manually-patch-170-173-187-and-187-fix.patch b/python-psycopg2/centos/patches/Manually-patch-170-173-187-and-187-fix.patch
deleted file mode 100644
index e4a88c4..0000000
--- a/python-psycopg2/centos/patches/Manually-patch-170-173-187-and-187-fix.patch
+++ /dev/null
@@ -1,96 +0,0 @@
1From 04fe7ce2bed4b20ffa89d12551bd2865d21caec1 Mon Sep 17 00:00:00 2001
2From: Al Bailey <al.bailey@windriver.com>
3Date: Tue, 29 Nov 2016 14:52:47 -0500
4Subject: [PATCH 1/1] Manually patch 170,173,187 and 187 fix
5
6---
7 psycopg/connection_int.c | 7 ++++++-
8 psycopg/error_type.c | 12 ++++++++++--
9 psycopg/lobject_type.c | 15 +++++++++------
10 3 files changed, 25 insertions(+), 9 deletions(-)
11
12diff --git a/psycopg/connection_int.c b/psycopg/connection_int.c
13index 7851b0a..5069e64 100644
14--- a/psycopg/connection_int.c
15+++ b/psycopg/connection_int.c
16@@ -642,6 +642,7 @@ static int
17 _conn_poll_connecting(connectionObject *self)
18 {
19 int res = PSYCO_POLL_ERROR;
20+ const char *msg;
21
22 Dprintf("conn_poll: poll connecting");
23 switch (PQconnectPoll(self->pgconn)) {
24@@ -656,7 +657,11 @@ _conn_poll_connecting(connectionObject *self)
25 break;
26 case PGRES_POLLING_FAILED:
27 case PGRES_POLLING_ACTIVE:
28- PyErr_SetString(OperationalError, "asynchronous connection failed");
29+ msg = PQerrorMessage(self->pgconn);
30+ if (!(msg && *msg)) {
31+ msg = "asynchronous connection failed";
32+ }
33+ PyErr_SetString(OperationalError, msg);
34 res = PSYCO_POLL_ERROR;
35 break;
36 }
37diff --git a/psycopg/error_type.c b/psycopg/error_type.c
38index 106b87a..75761e8 100644
39--- a/psycopg/error_type.c
40+++ b/psycopg/error_type.c
41@@ -163,8 +163,16 @@ psyco_error_reduce(errorObject *self)
42 if (2 != PyTuple_GET_SIZE(tuple)) { goto exit; }
43
44 if (!(dict = PyDict_New())) { goto error; }
45- if (0 != PyDict_SetItemString(dict, "pgerror", self->pgerror)) { goto error; }
46- if (0 != PyDict_SetItemString(dict, "pgcode", self->pgcode)) { goto error; }
47+ if (self->pgerror) {
48+ if (0 != PyDict_SetItemString(dict, "pgerror", self->pgerror)) {
49+ goto error;
50+ }
51+ }
52+ if (self->pgcode) {
53+ if (0 != PyDict_SetItemString(dict, "pgcode", self->pgcode)) {
54+ goto error;
55+ }
56+ }
57
58 {
59 PyObject *newtuple;
60diff --git a/psycopg/lobject_type.c b/psycopg/lobject_type.c
61index fee11c4..823a1b7 100644
62--- a/psycopg/lobject_type.c
63+++ b/psycopg/lobject_type.c
64@@ -355,9 +355,11 @@ lobject_dealloc(PyObject* obj)
65 {
66 lobjectObject *self = (lobjectObject *)obj;
67
68- if (lobject_close(self) < 0)
69- PyErr_Print();
70- Py_XDECREF((PyObject*)self->conn);
71+ if (self->conn) { /* if not, init failed */
72+ if (lobject_close(self) < 0)
73+ PyErr_Print();
74+ Py_XDECREF((PyObject*)self->conn);
75+ }
76 PyMem_Free(self->smode);
77
78 Dprintf("lobject_dealloc: deleted lobject object at %p, refcnt = "
79@@ -372,10 +374,11 @@ lobject_init(PyObject *obj, PyObject *args, PyObject *kwds)
80 int oid = (int)InvalidOid, new_oid = (int)InvalidOid;
81 const char *smode = "";
82 const char *new_file = NULL;
83- PyObject *conn;
84+ PyObject *conn = NULL;
85
86- if (!PyArg_ParseTuple(args, "O|iziz",
87- &conn, &oid, &smode, &new_oid, &new_file))
88+ if (!PyArg_ParseTuple(args, "O!|iziz",
89+ &connectionType, &conn,
90+ &oid, &smode, &new_oid, &new_file))
91 return -1;
92
93 return lobject_setup((lobjectObject *)obj,
94--
951.8.3.1
96
diff --git a/python-psycopg2/centos/srpm_path b/python-psycopg2/centos/srpm_path
deleted file mode 100644
index 02f3299..0000000
--- a/python-psycopg2/centos/srpm_path
+++ /dev/null
@@ -1,2 +0,0 @@
1mirror:Source/python-psycopg2-2.5.1-3.el7.src.rpm
2