plone / Installers-UnifiedInstaller

Linux/BSD/OSX Installer
28 stars 24 forks source link

Fix buildout SNI issue in 4.3.x #131

Closed canepan closed 1 year ago

canepan commented 1 year ago

Hi, I noticed the unified installer for 4.3 (and also the addition of new addons in an existing deployment) stopped working a while ago.

The problem manifests with one or more of the following during the buildout run:

Download error on http://dist.plone.org: [Errno -2] Name or service not known -- Some packages may not be found!
Download error on http://download.zope.org/ppix/: hostname 'download.zope.org' doesn't match 'vm06.plyp.com' -- Some packages may not be found!
Download error on http://download.zope.org/distribution/: hostname 'download.zope.org' doesn't match 'vm06.plyp.com' -- Some packages may not be found!
Download error on http://effbot.org/downloads: hostname 'effbot.org' doesn't match either of 'www.github.com', '*.github.com', 'github.com', '*.github.io', 'github.io', '*.githubusercontent.com', 'githubusercontent.com' -- Some packages may not be found!

This post has the steps necessary to make it work again, but it would be nice to have it addressed in the existing installer, so people will be able to deploy a recent release for version 4.3 and (as I am trying to do) migrate their old site(s) to 6.0

Summarizing the post (based on Plone 4.3.18):

  1. make sure (by using the Plone pip) the version of setuptools and zc.buildout are recent enough:
    zinstance# ../Python-2.7/bin/pip list
    DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
    Package    Version
    ---------- -------
    pip        20.3.4
    setuptools 44.1.1
    wheel      0.37.1
  2. update buildout.cfg:

    --- buildout.cfg.orig   2022-11-25 06:56:34.771083040 +0000
    +++ buildout.cfg    2022-11-25 06:41:35.435275637 +0000
    @@ -231,8 +231,10 @@
    # config files.
    #
    [versions]
    -zc.buildout = 2.5.3
    -setuptools = 27.3.0
    +zc.buildout = 2.13.1
    +setuptools = 44.1.1
    Pillow = 5.1.0
    
    buildout.sanitycheck = 1.0.2
  3. (this may not be necessary) since there is a chicken and egg problem, manually download the required version of setuptools:
    zinstance# ../Python-2.7/bin/pip download -d ../buildout-cache/downloads/dist/ setuptools==44.1.1 --no-binary ":all:"
    DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
    Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
    Collecting setuptools==44.1.1
    Downloading setuptools-44.1.1.zip (858 kB)
     |████████████████████████████████| 858 kB 7.8 MB/s
    Saved /mnt/opt/Plone-4.3.18/buildout-cache/downloads/dist/setuptools-44.1.1.zip
    Successfully downloaded setuptools
  4. invalidate the existing egg:
    zinstance# mv -vi ../buildout-cache/eggs/setuptools-27.3.0-py2.7.egg ../buildout-cache/eggs/setuptools-27.3.0-py2.7.egg.no

At this point it can find the required packages without the SNI/Download error.

mauritsvanrees commented 1 year ago

Plone 4 is not supported anymore. As far as I remember, some people tried to fix the UnifiedInstaller for 4.3 a few years ago, but failed. The last tag that I see here is 4.3.19. On LaunchPad a 4.3.20 release exists, but without any downloadable files. When it was difficult to fix a few years ago, at the time of the 4.3.20 release, I am sure it is basically impossible now. I know it already took quite some effort to get a proper UnifiedInstaller for 5.2 even. So I close this.