Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 752090

Summary: app-text/calibre-5.4.2 with dev-lang/python[-ipv6]: fails to install "OSError: can't use AF_INET6, IPv6 is disabled"
Product: Gentoo Linux Reporter: Markus <M4rkusXXL>
Component: Current packagesAssignee: Zac Medico <zmedico>
Status: RESOLVED FIXED    
Severity: normal CC: chris, eschwartz93, sam, tomaszg, zmedico
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/jstasiak/python-zeroconf/issues/234
https://github.com/gentoo/gentoo/pull/33683
Whiteboard:
Package list:
Runtime testing required: ---

Description Markus 2020-11-01 08:50:22 UTC
File "app-text/calibre-5.4.2/work/calibre-5.4.2/src/calibre/devices/smart_device_app/driver.py", line 2044, in <module>
    from zeroconf import (BadTypeInNameException, _HAS_A_TO_Z,
  File "/usr/lib/python3.7/site-packages/zeroconf/__init__.py", line 88, in <module>
    _MDNS_ADDR6_BYTES = socket.inet_pton(socket.AF_INET6, _MDNS_ADDR6)
OSError: can't use AF_INET6, IPv6 is disabled

Reproducible: Always

Steps to Reproduce:
1. Disable IPv6.
2. Emerge app-text/calibre-5.4.2
Actual Results:  
Fails to install.

Expected Results:  
Installs.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-11-01 08:55:44 UTC
I think you can imagine the response here is likely to be just adding ipv6 to the required use for Python.

Otherwise, this will need work upstream or at least in Gentoo to adapt the zeroconf package.
Comment 2 Larry the Git Cow gentoo-dev 2020-11-01 18:17:30 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f79571e680258bc70d022b43a34cfb44f910a44f

commit f79571e680258bc70d022b43a34cfb44f910a44f
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2020-11-01 18:00:46 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2020-11-01 18:16:52 +0000

    app-text/calibre: add ipv6 to PYTHON_REQ_USE
    
    Closes: https://bugs.gentoo.org/752090
    Package-Manager: Portage-3.0.8, Repoman-3.0.2
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 app-text/calibre/calibre-5.4.2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 3 Zac Medico gentoo-dev 2020-11-01 18:18:51 UTC
(In reply to Sam James from comment #1)
> I think you can imagine the response here is likely to be just adding ipv6
> to the required use for Python.
> 
> Otherwise, this will need work upstream or at least in Gentoo to adapt the
> zeroconf package.

Yeah, I imagine that fighting for the right to disable IPv6 could prove to be a difficult battle in this day an age.
Comment 4 Markus 2020-11-01 18:57:39 UTC
Sure, requiring an ipv6 enabled system to _install_ an ebook management program seems legit...

Upstream bug in python-zeroconf:
https://github.com/jstasiak/python-zeroconf/issues/234
Comment 5 Markus 2021-06-15 03:59:26 UTC
Patch was commited upstream, so >dev-python/zeroconf-0.30.0 should no longer require ipv6.
Comment 6 Markus 2021-09-03 06:53:26 UTC
app-text/calibre and dev-python/zeroconf work together with dev-lang/python[-ipv6].

Requirement for ipv6 enabled python can be removed from calibre.
Comment 7 Larry the Git Cow gentoo-dev 2023-11-08 16:26:45 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbce7d0efea4db3138422c3726f492b3bb0c69e5

commit cbce7d0efea4db3138422c3726f492b3bb0c69e5
Author:     Eli Schwartz <eschwartz93@gmail.com>
AuthorDate: 2023-10-20 00:31:12 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2023-11-08 16:26:37 +0000

    app-text/calibre: drop ipv6 USE from python dep
    
    This dependency was always wrong, because it was not directly used by
    calibre -- calibre simply imported zeroconf and zeroconf required ipv6.
    This was really supposed to be a USE dependency in the zeroconf package,
    not the calibre one.
    
    But zeroconf was fixed upstream and no longer requires it.
    
    (Also, dev-lang/python no longer allows disabling ipv6 anyway.)
    
    Closes: https://bugs.gentoo.org/752090
    Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 app-text/calibre/calibre-6.29.0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)