Page 1 of 1

[partially SOLVED] certbot and certbot-auto mga7

PostPosted: Apr 5th, '20, 11:46
by pernel
Finally after much efforts, I had certbot and certbot-auto working in Mga6. One or maybe two months ago I decided to upgrade the Mga6 to Mga7 which performed more or less effortfree. Recently I noticed that
certbot
and
certbot-auto renew
was broken. When
--debug
flag was switched on, the output showed that a Mga6 package was blocking the package upgrade process in the bootstrap process. After removing that package and installing the corresponding Mga7 package the bootstrap process started to work. Unfortunately, I can't recall which package that was.
However, after the bootstrap process,
certbot-auto renew --debug
shows the following errors:
Code: Select all
Packages lib64ffi-devel-3.2.1-7.mga7.x86_64, git-2.21.1-1.1.mga7.x86_64, lib64openssl-devel-1.1.0l-1.1.mga7.x86_64, python2-augeas-1.0.3-5.mga7.x86_64, rootcerts-20191126.00-1.mga7.noarch, gcc-8.4.0-1.mga7.x86_64 are already installed
Creating virtual environment...
Traceback (most recent call last):
  File "<stdin>", line 27, in <module>
  File "<stdin>", line 19, in create_venv
  File "/usr/lib64/python2.7/subprocess.py", line 185, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib64/python2.7/subprocess.py", line 172, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib64/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
[root@lindell ~]# /usr/bin/certbot-auto renew --debug
.
I find this strange, since the Mga7 packages certbot, certbot-apache now shows dependencies from python3.7 packages. I don't know much about python coding so I don't have a clue why the certbot commands should be referring to old python2.7.
Does this have to do with some general or specific python environment variables that is not correctly set?
I would very much appreciate any help with this issue.

Re: certbot and certbot-auto mga7

PostPosted: Apr 5th, '20, 14:37
by doktor5000
Seems to be an issue with your install, it should only use python3.5. See also https://bugs.mageia.org/show_bug.cgi?id=22636
Maybe this is the result of you messing with pip updates to python packages from Mageia repositories. as you mentioned in the other thread about certbot ... ?

Re: [partially SOLVED] certbot and certbot-auto mga7

PostPosted: Apr 5th, '20, 18:45
by pernel
Thanks for stimulating me to revisit https://bugs.mageia.org/show_bug.cgi?id=22636 again. The post comment 9
In Mageia, certbot need the option:
--apache-challenge-location /etc/httpd/conf/conf.d

because, in certbot, default path is /etc/httpd/conf.d

The command:
Code: Select all
/usr/bin/certbot renew --apache-challenge-location /etc/httpd/conf/conf.d
actually works and renewed my certificates. This is sufficient for now for me.
However the command
Code: Select all
/usr/bin/certbot-auto renew --apache-challenge-location /etc/httpd/conf/conf.d
does not work or maybe was never supposed to take this option.
Thanks again!