public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-pylibmc] epel10.2: fix build (upstream patch)
@ 2026-09-25 17:45 Remi Collet
0 siblings, 0 replies; only message in thread
From: Remi Collet @ 2026-09-25 17:45 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-pylibmc
Branch : epel10.2
Commit : db5d129afd25f5a85dc122b03bca0bc02ad88046
Author : Remi Collet <remi@fedoraproject.org>
Date : 2012-09-22T11:11:54+02:00
Stats : +80/-7 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-pylibmc/c/db5d129afd25f5a85dc122b03bca0bc02ad88046?branch=epel10.2
Log:
fix build (upstream patch)
---
diff --git a/pylibmc-build.patch b/pylibmc-build.patch
index 98b8ba0..5e53bd5 100644
--- a/pylibmc-build.patch
+++ b/pylibmc-build.patch
@@ -1,6 +1,18 @@
---- _pylibmcmodule.c.orig 2012-04-22 08:33:26.000000000 +0200
-+++ _pylibmcmodule.c 2012-04-22 08:40:30.000000000 +0200
-@@ -65,7 +65,7 @@
+From 013ba5f610951d6c322a99d780aca6713f314140 Mon Sep 17 00:00:00 2001
+From: Radek Senfeld <rush@logic.cz>
+Date: Tue, 11 Oct 2011 22:45:49 +0200
+Subject: [PATCH] fixed #ifdef issue when libmemcached is compiled with SASL
+ support disabled
+
+---
+ _pylibmcmodule.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/_pylibmcmodule.c b/_pylibmcmodule.c
+index 093ccbe..644ce49 100644
+--- a/_pylibmcmodule.c
++++ b/_pylibmcmodule.c
+@@ -65,7 +65,7 @@ static PylibMC_Client *PylibMC_ClientType_new(PyTypeObject *type,
static void PylibMC_ClientType_dealloc(PylibMC_Client *self) {
if (self->mc != NULL) {
@@ -9,7 +21,7 @@
if (self->sasl_set) {
memcached_destroy_sasl_auth_data(self->mc);
}
-@@ -98,7 +98,7 @@
+@@ -98,7 +98,7 @@ static int PylibMC_Client_init(PylibMC_Client *self, PyObject *args,
/* setup sasl */
if (user != NULL || pass != NULL) {
@@ -18,7 +30,7 @@
if (user == NULL || pass == NULL) {
PyErr_SetString(PyExc_TypeError, "SASL requires both username and password");
goto error;
-@@ -2014,7 +2014,7 @@
+@@ -2019,7 +2019,7 @@ static int _PylibMC_CheckKeyStringAndSize(char *key, Py_ssize_t size) {
}
static int _init_sasl(void) {
@@ -27,7 +39,7 @@
int rc;
/* sasl_client_init needs to be called once before using SASL, and
-@@ -2163,7 +2163,7 @@
+@@ -2168,7 +2168,7 @@ PyMODINIT_FUNC init_pylibmc(void) {
PyModule_AddStringConstant(module,
"libmemcached_version", LIBMEMCACHED_VERSION_STRING);
@@ -36,3 +48,63 @@
PyModule_ADD_REF(module, "support_sasl", Py_True);
#else
PyModule_ADD_REF(module, "support_sasl", Py_False);
+--
+1.7.10
+
+From c1088cb8c7448c58acdb3194f5a6944b7bdcd823 Mon Sep 17 00:00:00 2001
+From: Ludvig Ericson <ludvig@lericson.se>
+Date: Sun, 4 Dec 2011 20:07:03 +0100
+Subject: [PATCH] Use memcached_last_error_message() where possible
+
+---
+ _pylibmcmodule.c | 25 ++++++++-----------------
+ 1 file changed, 8 insertions(+), 17 deletions(-)
+
+diff --git a/_pylibmcmodule.c b/_pylibmcmodule.c
+index 5dd7e21..2371b66 100644
+--- a/_pylibmcmodule.c
++++ b/_pylibmcmodule.c
+@@ -1871,24 +1871,11 @@ static PyObject *PylibMC_Client_clone(PylibMC_Client *self) {
+
+ static char *_get_lead(memcached_st *mc, char *buf, int n, const char *what,
+ memcached_return error, const char *key, Py_ssize_t len) {
+- int sz = snprintf(buf, n, "error %d from %s", error, what);
++ int sz = snprintf(buf, n, "error %d from %.32s", error, what);
+
+- /*
+- * Need to protect from libmemcached versions as their
+- * memcached_server_instance_st are called (memcached_server_st *).
+- */
+-#if LIBMEMCACHED_VERSION_HEX >= 0x00038000
+- if (key != NULL) {
+- memcached_return rc = MEMCACHED_FAILURE;
+- memcached_server_instance_st svr = NULL;
+-
+- svr = memcached_server_by_key(mc, key, len, &rc);
+- if (svr && rc == MEMCACHED_SUCCESS) {
+- sz += snprintf(buf + sz, n - sz, " on %s:%d",
+- svr->hostname, svr->port);
+- }
++ if (key != NULL && len) {
++ sz += snprintf(buf+sz, n-sz, "(%.32s)", key);
+ }
+-#endif
+
+ return buf;
+ }
+@@ -1910,7 +1897,11 @@ static void _set_error(memcached_st *mc, memcached_return error, char *lead) {
+ }
+ }
+
+- PyErr_Format(exc, "%s: %s", lead, memcached_strerror(mc, error));
++#if LIBMEMCACHED_VERSION_HEX >= 0x00049000
++ PyErr_Format(exc, "%s: %.200s", lead, memcached_last_error_message(mc));
++#else
++ PyErr_Format(exc, "%s: %.200s", lead, memcached_strerror(mc, error));
++#endif
+ }
+ }
+
+--
+1.7.10
+
diff --git a/python-pylibmc.spec b/python-pylibmc.spec
index ed5489a..702fb23 100644
--- a/python-pylibmc.spec
+++ b/python-pylibmc.spec
@@ -16,6 +16,7 @@ URL: http://sendapatch.se/projects/pylibmc/
Source0: %{name}-%{version}.%{git_date}git%{git_version}.tar.xz
# https://github.com/lericson/pylibmc/commit/013ba5f610951d6c322a99d780aca6713f314140
+# https://github.com/lericson/pylibmc/commit/c1088cb8c7448c58acdb3194f5a6944b7bdcd823
Patch0: pylibmc-build.patch
BuildRequires: python-devel
@@ -32,7 +33,7 @@ so that applications can drop-in replace it.
%prep
%setup -q -cn %{name}
-%patch0 -p0 -b .fixbuild
+%patch0 -p1 -b .fixbuild
%build
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-25 17:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-25 17:45 [rpms/python-pylibmc] epel10.2: fix build (upstream patch) Remi Collet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox