Hello Laszlo,

I'm trying to investigate the issue.  As a first step, I decided to try
with a newer gevent version (20.9.0) to see if the problem disappears.
But I'm failing to build the package.  Maybe I should stop there and
simply test 20.9.0 without trying to package it.

I have made some progress though, so maybe you'd be interested by a few
patches towards packaging the new version.

This change refreshes the patch for Hurd:

diff -Naur python-gevent-1.4.0/debian/patches/fix-Hurd-FTBFS.patch 
python-gevent-20.9.0/debian/patches/fix-Hurd-FTBFS.patch
--- python-gevent-1.4.0/debian/patches/fix-Hurd-FTBFS.patch     2018-07-22 
15:55:09.000000000 +0200
+++ python-gevent-20.9.0/debian/patches/fix-Hurd-FTBFS.patch    2020-11-10 
13:05:56.341065978 +0100
@@ -5,11 +5,11 @@

 ---

---- python-gevent-1.3.5.orig/deps/libuv/src/unix/internal.h
-+++ python-gevent-1.3.5/deps/libuv/src/unix/internal.h
-@@ -31,6 +31,10 @@
- #include <stdio.h>
+--- a/deps/libuv/src/unix/internal.h
++++ b/deps/libuv/src/unix/internal.h
+@@ -33,6 +33,10 @@
  #include <errno.h>
+ #include <sys/socket.h>

 +#ifndef PATH_MAX
 +#define PATH_MAX 4096

This change updates the patch for the intersphinx index:

diff -Naur 
python-gevent-1.4.0/debian/patches/use-local-intersphinx-inventory.patch 
python-gevent-20.9.0/debian/patches/use-local-intersphinx-inventory.patch
--- python-gevent-1.4.0/debian/patches/use-local-intersphinx-inventory.patch    
2018-06-13 22:03:19.000000000 +0200
+++ python-gevent-20.9.0/debian/patches/use-local-intersphinx-inventory.patch   
2020-11-10 13:05:47.317020542 +0100
@@ -2,15 +2,13 @@
  Use the offline copy under debian/ instead downloading it.
 Author: Laszlo Boszormenyi (GCS) <g...@debian.org>
 Forwarded: not-needed
-Last-Update: 2015-01-05
+Last-Update: 2020-11-10

 ---

-Index: b/doc/conf.py
-===================================================================
---- a/doc/conf.py
-+++ b/doc/conf.py
-@@ -42,7 +42,7 @@ extensions = [
+--- a/docs/conf.py
++++ b/docs/conf.py
+@@ -51,7 +51,7 @@
  ]

  intersphinx_mapping = {

These patches are for the rename of doc/ to docs/:

diff -Naur python-gevent-1.4.0/debian/python-gevent-doc.docs 
python-gevent-20.9.0/debian/python-gevent-doc.docs
--- python-gevent-1.4.0/debian/python-gevent-doc.docs   2018-07-07 
19:23:32.000000000 +0200
+++ python-gevent-20.9.0/debian/python-gevent-doc.docs  2020-11-10 
13:03:38.920370619 +0100
@@ -1 +1 @@
-doc/_build/html
+docs/_build/html
diff -Naur python-gevent-1.4.0/debian/rules python-gevent-20.9.0/debian/rules
--- python-gevent-1.4.0/debian/rules    2020-04-11 01:53:23.000000000 +0200
+++ python-gevent-20.9.0/debian/rules   2020-11-10 13:03:06.044203072 +0100
@@ -13,12 +13,11 @@

 override_dh_auto_build:
        dh_auto_build
-       PYTHONPATH=../src/ make --directory doc/ html 
SPHINXBUILD=/usr/share/sphinx/scripts/python3/sphinx-build
+       PYTHONPATH=../src/ make --directory docs/ html 
SPHINXBUILD=/usr/share/sphinx/scripts/python3/sphinx-build

 override_dh_auto_clean:
        dh_auto_clean
-       make distclean
-       make --directory doc/ clean
+       make --directory docs/ clean
        rm -f $(CURDIR)/deps/c-ares/Makefile \
                $(CURDIR)/deps/c-ares/ares_build.h \
                $(CURDIR)/deps/c-ares/ares_config.h \

However I'm currently hitting the issue below.  It looks like there is a
kind of hack around saving a file, running the ./configure of c-ares,
and restoring the file, done in _setupares.py.  It looks odd to me that
./configure breaks, as I thought it was supposed to generate files out
of thin air and disregard existing caches.

Maybe a (cleaner) solution would be to actually depend on libc-ares-dev
instead of using gevent's embedded c-ares, even though the gevent team
recommends using their embedded library.  What do you think?

dh  clean --with python3 --buildsystem=pybuild
   debian/rules override_dh_auto_clean
dh_auto_clean
I: pybuild base:232: python3.9 setup.py clean
removing '/home/noon/git/python-gevent-20.9.0/.pybuild/cpython3_3.9/build' (and 
everything under it)
I: pybuild base:232: python3.8 setup.py clean
removing '/home/noon/git/python-gevent-20.9.0/.pybuild/cpython3_3.8/build' (and 
everything under it)
I: pybuild base:232: python3.9-dbg setup.py clean
removing '/home/noon/git/python-gevent-20.9.0/.pybuild/cpython3_3.9_dbg/build' 
(and everything under it)
I: pybuild base:232: python3.8-dbg setup.py clean
removing '/home/noon/git/python-gevent-20.9.0/.pybuild/cpython3_3.8_dbg/build' 
(and everything under it)
   dh_autoreconf_clean -O--buildsystem=pybuild
   dh_clean -O--buildsystem=pybuild
dh  build --with python3 --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
I: pybuild base:232: python3.9 setup.py config
I: pybuild base:232: python3.8 setup.py config
I: pybuild base:232: python3.9-dbg setup.py config
I: pybuild base:232: python3.8-dbg setup.py config
   debian/rules override_dh_auto_build
dh_auto_build
I: pybuild base:232: /usr/bin/python3.9 setup.py build
I: pybuild base:232: /usr/bin/python3 setup.py build
I: pybuild base:232: /usr/bin/python3.9-dbg setup.py build
[same error as below]
E: pybuild pybuild:353: build: plugin distutils failed with: exit code=1: 
/usr/bin/python3.9-dbg setup.py build
I: pybuild base:232: /usr/bin/python3-dbg setup.py build
Running '(cd  "/home/noon/git/python-gevent-20.9.0/deps/c-ares"  && if [ -r 
ares_build.h ]; then cp ares_build.h ares_build.h.orig; fi   && sh ./configure 
--disable-dependency-tracking -C CFLAGS="-Wno-unused-result -Wsign-compare -g 
-Og -Wall -g -Og   -fstack-protector-strong -Wformat -Werror=format-security  
-g -Og   -fstack-protector-strong -Wformat -Werror=format-security -g -O2 
-fdebug-prefix-map=/home/noon/git/python-gevent-20.9.0=. 
-fstack-protector-strong -Wformat -Werror=format-security"  && cp ares_config.h 
ares_build.h "$OLDPWD"   && cat ares_build.h   && if [ -r ares_build.h.orig ]; 
then mv ares_build.h.orig ares_build.h; fi) > configure-output.txt' in 
/home/noon/git/python-gevent-20.9.0/build/temp.linux-x86_64-3.8-pydebug/c-ares
configure: error: `CFLAGS' has changed since the previous run:
configure:   former value:  `-Wno-unused-result -Wsign-compare -DNDEBUG -g 
-fwrapv -O2 -Wall -g   -fstack-protector-strong -Wformat 
-Werror=format-security  -g -fwrapv -O2    -g -O2 
-fdebug-prefix-map=/home/noon/git/python-gevent-20.9.0=. 
-fstack-protector-strong -Wformat -Werror=format-security'
configure:   current value: `-Wno-unused-result -Wsign-compare -g -Og -Wall -g 
-Og   -fstack-protector-strong -Wformat -Werror=format-security  -g -Og   
-fstack-protector-strong -Wformat -Werror=format-security -g -O2 
-fdebug-prefix-map=/home/noon/git/python-gevent-20.9.0=. 
-fstack-protector-strong -Wformat -Werror=format-security'
configure: error: in `/home/noon/git/python-gevent-20.9.0/deps/c-ares':
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm config.cache' and start over
configure: loading cache config.cache

Traceback (most recent call last):
  File "setup.py", line 471, in <module>
    run_setup(EXT_MODULES)
  File "setup.py", line 338, in run_setup
    setup(
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 153, in 
setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/cffi/setuptools_ext.py", line 144, in run
    base_class.run(self)
  File "/usr/lib/python3/dist-packages/cffi/setuptools_ext.py", line 144, in run
    base_class.run(self)
  File "/usr/lib/python3/dist-packages/setuptools/command/build_ext.py", line 
79, in run
    _build_ext.run(self)
  File "/usr/lib/python3/dist-packages/Cython/Distutils/old_build_ext.py", line 
186, in run
    _build_ext.build_ext.run(self)
  File "/usr/lib/python3.8/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/usr/lib/python3/dist-packages/Cython/Distutils/old_build_ext.py", line 
195, in build_extensions
    _build_ext.build_ext.build_extensions(self)
  File "/usr/lib/python3.8/distutils/command/build_ext.py", line 449, in 
build_extensions
    self._build_extensions_serial()
  File "/usr/lib/python3.8/distutils/command/build_ext.py", line 474, in 
_build_extensions_serial
    self.build_extension(ext)
  File "/home/noon/git/python-gevent-20.9.0/_setuputils.py", line 350, in 
build_extension
    self.gevent_prepare(ext)
  File "/home/noon/git/python-gevent-20.9.0/_setuputils.py", line 347, in 
gevent_prepare
    configure(self, ext)
  File "/home/noon/git/python-gevent-20.9.0/_setupares.py", line 80, in 
configure_ares
    system(ares_configure_command)
  File "/home/noon/git/python-gevent-20.9.0/_setuputils.py", line 194, in system
    if _system(cmd, cwd=cwd, env=env, **kwargs):
  File "/home/noon/git/python-gevent-20.9.0/_setuputils.py", line 190, in 
_system
    return check_call(cmd, cwd=cwd, env=env, **kwargs)
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '(cd  
"/home/noon/git/python-gevent-20.9.0/deps/c-ares"  && if [ -r ares_build.h ]; 
then cp ares_build.h ares_build.h.orig; fi   && sh ./configure 
--disable-dependency-tracking -C CFLAGS="-Wno-unused-result -Wsign-compare -g 
-Og -Wall -g -Og   -fstack-protector-strong -Wformat -Werror=format-security  
-g -Og   -fstack-protector-strong -Wformat -Werror=format-security -g -O2 
-fdebug-prefix-map=/home/noon/git/python-gevent-20.9.0=. 
-fstack-protector-strong -Wformat -Werror=format-security"  && cp ares_config.h 
ares_build.h "$OLDPWD"   && cat ares_build.h   && if [ -r ares_build.h.orig ]; 
then mv ares_build.h.orig ares_build.h; fi) > configure-output.txt' returned 
non-zero exit status 1.
E: pybuild pybuild:353: build: plugin distutils failed with: exit code=1: 
/usr/bin/python3-dbg setup.py build
dh_auto_build: error: pybuild --build -i python{version}-dbg -p "3.9 3.8" 
returned exit code 13
make[1]: *** [debian/rules:15: override_dh_auto_build] Error 13

Thanks!

Best regards

--
Fabrice BAUZAC-STEHLY
PGP 015AE9B25DCB0511D200A75DE5674DEA514C891D

Reply via email to