<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>42278</bug_id>
          
          <creation_ts>2022-03-28 20:01:01 +0300</creation_ts>
          <short_desc>Encountered exception during recovery: AttributeError: module &apos;base64&apos; has no attribute &apos;decodestring&apos;</short_desc>
          <delta_ts>2024-02-29 01:20:02 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Branch p10</product>
          <component>certbot-dns_rfc2136</component>
          <version>не указана</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Анатолий Кирсанов">kiav1976</reporter>
          <assigned_to name="Vitaly Lipatov">lav</assigned_to>
          <cc>sysoevas</cc>
          
          <qa_contact name="qa-p10@altlinux.org">qa-p10</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>208978</commentid>
    <comment_count>0</comment_count>
    <who name="Анатолий Кирсанов">kiav1976</who>
    <bug_when>2022-03-28 20:01:01 +0300</bug_when>
    <thetext>Оказалось, что в Python 3.9 убили искомую функцию: &quot;base64.encodestring() and base64.decodestring(), aliases deprecated since Python 3.1, have been remove&quot;

Это текст отсюда
https://docs.python.org/3.9/whatsnew/3.9.html

На P10:
# python3 --version
Python 3.9.6
# certbot --version
certbot 1.17.0

При этом в Сизифе есть намного новее certbot:
https://packages.altlinux.org/ru/sisyphus/srpms/certbot/

Не сомневаюсь, что более новые версии этого плагина адаптированы к свежей версии Python. Требуется обновление.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>223902</commentid>
    <comment_count>1</comment_count>
    <who name="Aleksandr Sysoev">sysoevas</who>
    <bug_when>2023-04-04 10:04:27 +0300</bug_when>
    <thetext>Так-же тут https://docs.python.org/3.9/whatsnew/3.9.html указано  &quot;use base64.encodebytes() and base64.decodebytes() instead&quot;. То есть на замену вот этому &quot;base64.encodestring() and base64.decodestring()&quot; пришло вышеописанное, если верить документации.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>240152</commentid>
    <comment_count>2</comment_count>
    <who name="Анатолий Кирсанов">kiav1976</who>
    <bug_when>2024-01-14 02:35:37 +0300</bug_when>
    <thetext>(Ответ для Aleksandr Sysoev на комментарий #1)
&gt; Так-же тут https://docs.python.org/3.9/whatsnew/3.9.html указано  &quot;use
&gt; base64.encodebytes() and base64.decodebytes() instead&quot;. То есть на замену
&gt; вот этому &quot;base64.encodestring() and base64.decodestring()&quot; пришло
&gt; вышеописанное, если верить документации.

Люди этому поверили в 2019 году и все исправили. Требуется перенести из Сизиф на P10 пакет python3-module-dns.

Подробнее:

В логе /var/log/letsencrypt/letsencrypt.log видно где конкретно происходит ошибка.

2024-01-14 02:08:45,454:DEBUG:certbot._internal.error_handler:Encountered exception:
Traceback (most recent call last):
  File &quot;/usr/share/certbot/certbot/_internal/auth_handler.py&quot;, line 73, in handle_authorizations
    resps = self.auth.perform(achalls)
  File &quot;/usr/share/certbot/certbot/plugins/dns_common.py&quot;, line 69, in perform
    self._perform(domain, validation_domain_name, validation)
  File &quot;/usr/share/certbot/certbot_dns_rfc2136/_internal/dns_rfc2136.py&quot;, line 79, in _perform
    self._get_rfc2136_client().add_txt_record(validation_name, validation, self.ttl)
  File &quot;/usr/share/certbot/certbot_dns_rfc2136/_internal/dns_rfc2136.py&quot;, line 87, in _get_rfc2136_client
    return _RFC2136Client(self.credentials.conf(&apos;server&apos;),
  File &quot;/usr/share/certbot/certbot_dns_rfc2136/_internal/dns_rfc2136.py&quot;, line 103, in __init__
    self.keyring = dns.tsigkeyring.from_text({
  File &quot;/usr/lib/python3/site-packages/dns/tsigkeyring.py&quot;, line 35, in from_text
    secret = base64.decodestring(maybe_encode(textring[keytext]))
AttributeError: module &apos;base64&apos; has no attribute &apos;decodestring&apos;

$ apf find /usr/lib/python3/site-packages/dns/tsigkeyring.py
python3-module-dns

Проблема решена 05.01.2019 в коммите https://github.com/rthalley/dnspython/commit/f93c8c6ad41d38ccd19335a5a0a396cbaa409caf
Он соответствует версии v2.0.0rc1. И в Сизифе все давно уже есть. Там вообще 2.2.0.

Да и о самой ошибке было известно давно https://github.com/rthalley/dnspython/issues/338 (01.11.2018)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>240406</commentid>
    <comment_count>3</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2024-01-21 19:31:50 +0300</bug_when>
    <thetext>338224 EPERM #2 p10 python3-module-dns.git=2.2.0-alt2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>242333</commentid>
    <comment_count>4</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2024-02-29 01:20:02 +0300</bug_when>
    <thetext>В p10 пришёл python3-module-dns.git=2.2.0-alt2
https://packages.altlinux.org/ru/tasks/338224/</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>