Bug#1052854: python-vulndb: FTBFS: FileNotFoundError: [Errno 2] No such file or directory: '/<>/.pybuild/cpython3_3.11/build/vulndb/db'

2023-10-17 Thread Gianfranco Costamagna

Hello,


I haven't seen that many of these. A few, yes, maybe 3?


3 under my personal ddpo, e.g. borgbackup this one and some others.
In any case, I agree with your proposal, borgbackup is already "fixed" in some 
way, and I plan to workaround
vulndb too.

G.



On balance, it still seems like the right change to have made.
There is the risk of silent breakage from missing files, but I haven't
heard of any of those, yet.

I'm coming around to making cleaning .egg-info configurable.
Right now you have to skip pybuild cleaning entirely, which is not
complex. But it's more than the one line instruction to skip egg-info
cleaning. I think configuration makes sense.

Stefano

--
Stefano Rivera
  http://tumbleweed.org.za/
  +1 415 683 3272


OpenPGP_signature.asc
Description: OpenPGP digital signature


Bug#1052854: python-vulndb: FTBFS: FileNotFoundError: [Errno 2] No such file or directory: '/<>/.pybuild/cpython3_3.11/build/vulndb/db'

2023-10-14 Thread Stefano Rivera
Hi Gianfranco (2023.09.26_16:55:49_+0200)
> hello, I see a TON of FTBFS bugs for python failures
> I suspect the reason for them to fail is
> * Remove *.egg-info directories in clean step, as part of Debian's wider
>   effort to improve clean targets. Thanks Stuart Prescott for the patch.

I haven't seen that many of these. A few, yes, maybe 3?

On balance, it still seems like the right change to have made.
There is the risk of silent breakage from missing files, but I haven't
heard of any of those, yet.

I'm coming around to making cleaning .egg-info configurable.
Right now you have to skip pybuild cleaning entirely, which is not
complex. But it's more than the one line instruction to skip egg-info
cleaning. I think configuration makes sense.

Stefano

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  +1 415 683 3272


signature.asc
Description: PGP signature


Bug#1052854: python-vulndb: FTBFS: FileNotFoundError: [Errno 2] No such file or directory: '/<>/.pybuild/cpython3_3.11/build/vulndb/db'

2023-09-26 Thread Gianfranco Costamagna

control: reassign -1 dh-python
control: found -1 6.20230825
control: affects -1 python-vulndb borgbackup

hello, I see a TON of FTBFS bugs for python failures
I suspect the reason for them to fail is
* Remove *.egg-info directories in clean step, as part of Debian's wider
  effort to improve clean targets. Thanks Stuart Prescott for the patch.

in latest dh-python
now, SOURCES.txt is created usually based on files that are under git 
versioning, but we don't have git installed during build
cleaning up that directory during clean step, makes it not correctly being 
re-created
I presume we should assign them back to dh-python and check with python 
maintainers if we can do something
creating egg-info from scratch, is for sure something I really like, but maybe 
not so feasible in general

for borgbackup I crafted an hacky patch to add on MANIFEST.in file an 
additional file 
https://salsa.debian.org/debian/borgbackup/-/blob/master/debian/patches/7793.patch

The problem of this kind of patches is:
 1) is fragile and changes on every upstream release (specially for tests 
containing a ton of subfiles)
 2) can't be upstreamed easily
so I don't think deleting egg-info during clean as default is a sane thing to do

maybe this can mitigate indeed 
https://salsa.debian.org/python-team/tools/dh-python/-/commit/3d42f08deb9ffb0d2f7a689dbc5a314ab5ded6c4

What is the opinion of dh-python maintainers? Feel free to reassign back if you 
don't agree

thanks

Gianfranco
On Tue, 26 Sep 2023 14:44:47 +0200 Lucas Nussbaum  wrote:

Source: python-vulndb
Version: 0.1.3-2
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: lu...@debian.org
Usertags: ftbfs-20230925 ftbfs-trixie

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.


Relevant part (hopefully):
>  debian/rules build
> 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:291: python3.11 setup.py config 
> /usr/lib/python3/dist-packages/setuptools/__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.

> !!
> 
> 

> Requirements should be satisfied by a PEP 517 installer.
> If you are using pip, you can try `pip install --use-pep517`.
> 

> 
> !!

>   dist.fetch_build_eggs(dist.setup_requires)
> WARNING: The wheel package is not available.
> running config
>dh_auto_build -O--buildsystem=pybuild
> I: pybuild base:291: /usr/bin/python3 setup.py build 
> /usr/lib/python3/dist-packages/setuptools/__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.

> !!
> 
> 

> Requirements should be satisfied by a PEP 517 installer.
> If you are using pip, you can try `pip install --use-pep517`.
> 

> 
> !!

>   dist.fetch_build_eggs(dist.setup_requires)
> WARNING: The wheel package is not available.
> running build
> running build_py
> creating /<>/.pybuild/cpython3_3.11/build/vulndb
> copying vulndb/__init__.py -> 
/<>/.pybuild/cpython3_3.11/build/vulndb
> copying vulndb/db_vuln.py -> 
/<>/.pybuild/cpython3_3.11/build/vulndb
> creating /<>/.pybuild/cpython3_3.11/build/vulndb/tests
> copying vulndb/tests/test_load_all_json.py -> 
/<>/.pybuild/cpython3_3.11/build/vulndb/tests
> copying vulndb/tests/test_db_vuln.py -> 
/<>/.pybuild/cpython3_3.11/build/vulndb/tests
> copying vulndb/tests/__init__.py -> 
/<>/.pybuild/cpython3_3.11/build/vulndb/tests
> creating /<>/.pybuild/cpython3_3.11/build/vulndb/constants
> copying vulndb/constants/wasc.py -> 
/<>/.pybuild/cpython3_3.11/build/vulndb/constants
> copying vulndb/constants/__init__.py -> 
/<>/.pybuild/cpython3_3.11/build/vulndb/constants
> copying vulndb/constants/cwe.py -> 
/<>/.pybuild/cpython3_3.11/build/vulndb/constants
> copying vulndb/constants/owasp.py -> 
/<>/.pybuild/cpython3_3.11/build/vulndb/constants


OpenPGP_signature
Description: OpenPGP digital signature


Bug#1052854: python-vulndb: FTBFS: FileNotFoundError: [Errno 2] No such file or directory: '/<>/.pybuild/cpython3_3.11/build/vulndb/db'

2023-09-26 Thread Lucas Nussbaum
Source: python-vulndb
Version: 0.1.3-2
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: lu...@debian.org
Usertags: ftbfs-20230925 ftbfs-trixie

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.


Relevant part (hopefully):
>  debian/rules build
> 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:291: python3.11 setup.py config 
> /usr/lib/python3/dist-packages/setuptools/__init__.py:84: 
> _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are 
> deprecated.
> !!
> 
> 
> 
> Requirements should be satisfied by a PEP 517 installer.
> If you are using pip, you can try `pip install --use-pep517`.
> 
> 
> 
> !!
>   dist.fetch_build_eggs(dist.setup_requires)
> WARNING: The wheel package is not available.
> running config
>dh_auto_build -O--buildsystem=pybuild
> I: pybuild base:291: /usr/bin/python3 setup.py build 
> /usr/lib/python3/dist-packages/setuptools/__init__.py:84: 
> _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are 
> deprecated.
> !!
> 
> 
> 
> Requirements should be satisfied by a PEP 517 installer.
> If you are using pip, you can try `pip install --use-pep517`.
> 
> 
> 
> !!
>   dist.fetch_build_eggs(dist.setup_requires)
> WARNING: The wheel package is not available.
> running build
> running build_py
> creating /<>/.pybuild/cpython3_3.11/build/vulndb
> copying vulndb/__init__.py -> 
> /<>/.pybuild/cpython3_3.11/build/vulndb
> copying vulndb/db_vuln.py -> 
> /<>/.pybuild/cpython3_3.11/build/vulndb
> creating /<>/.pybuild/cpython3_3.11/build/vulndb/tests
> copying vulndb/tests/test_load_all_json.py -> 
> /<>/.pybuild/cpython3_3.11/build/vulndb/tests
> copying vulndb/tests/test_db_vuln.py -> 
> /<>/.pybuild/cpython3_3.11/build/vulndb/tests
> copying vulndb/tests/__init__.py -> 
> /<>/.pybuild/cpython3_3.11/build/vulndb/tests
> creating /<>/.pybuild/cpython3_3.11/build/vulndb/constants
> copying vulndb/constants/wasc.py -> 
> /<>/.pybuild/cpython3_3.11/build/vulndb/constants
> copying vulndb/constants/__init__.py -> 
> /<>/.pybuild/cpython3_3.11/build/vulndb/constants
> copying vulndb/constants/cwe.py -> 
> /<>/.pybuild/cpython3_3.11/build/vulndb/constants
> copying vulndb/constants/owasp.py -> 
> /<>/.pybuild/cpython3_3.11/build/vulndb/constants
> running egg_info
> creating vulndb.egg-info
> writing vulndb.egg-info/PKG-INFO
> writing dependency_links to vulndb.egg-info/dependency_links.txt
> writing top-level names to vulndb.egg-info/top_level.txt
> writing manifest file 'vulndb.egg-info/SOURCES.txt'
> reading manifest file 'vulndb.egg-info/SOURCES.txt'
> adding license file 'LICENSE'
> writing manifest file 'vulndb.egg-info/SOURCES.txt'
>dh_auto_test -O--buildsystem=pybuild
> I: pybuild base:291: cd /<>/.pybuild/cpython3_3.11/build; 
> python3.11 -m unittest discover -v 
> test_basic (vulndb.tests.test_db_vuln.TestDBVuln.test_basic) ... ok
> test_from_file (vulndb.tests.test_db_vuln.TestDBVuln.test_from_file) ... ERROR
> test_from_id (vulndb.tests.test_db_vuln.TestDBVuln.test_from_id) ... ERROR
> test_get_cwe_url (vulndb.tests.test_db_vuln.TestDBVuln.test_get_cwe_url) ... 
> ok
> test_get_owasp_top_10_url 
> (vulndb.tests.test_db_vuln.TestDBVuln.test_get_owasp_top_10_url) ... ok
> test_get_wasc_url (vulndb.tests.test_db_vuln.TestDBVuln.test_get_wasc_url) 
> ... ok
> test_load_es_lang (vulndb.tests.test_db_vuln.TestDBVuln.test_load_es_lang) 
> ... ERROR
> test_from_file 
> (vulndb.tests.test_load_all_json.TestLoadAllJSON.test_from_file) ... ERROR
> 
> ==
> ERROR: test_from_file (vulndb.tests.test_db_vuln.TestDBVuln.test_from_file)
> --
> Traceback (most recent call last):
>   File 
> "/<>/.pybuild/cpython3_3.11/build/vulndb/tests/test_db_vuln.py", 
> line 68, in test_from_file
> dbv_1 = DBVuln.from_file(_file)
> ^^^
>   File "/<>/.pybuild/cpython3_3.11/build/vulndb/db_vuln.py", 
> line 86, in from_file
> data = DBVuln.load_from_json(db_file, language=language)
>^
>   File "/<>/.pybuild/cpython3_3.11/build/vulndb/db_vuln.py", 
> line 202, in load_from_json
> raw = json.loads(open(db_file).read())
>  ^
> FileNotFoundError: [Errno 2] No such file or directory: 
>