Plone 4.3 on debian 10

I have to move my plone 4.3 instance from a debian8 to a debian10 machine. Running the Plone-4.3-UnifiedInstaller.tgz via

fakeroot ./install.sh --with-python=/usr/bin/python --target=/home/plone/Plone --owner=plone --clients=2 zeo

(I already have users plone and plone_daemon.)
works fine.

However, I must install the hotfixes from https://plone.org/security/hotfixes for 4.3. So I added

eggs =
    Plone
    Pillow
    Products.PloneHotfix20130618
    Products.PloneHotfix20131210
    Products.PloneHotfix20150910
    Products.PloneHotfix20151006
    Products.PloneHotfix20151208
    Products.PloneHotfix20160419
    Products.PloneHotfix20160830
    Products.PloneHotfix20161129
    Products.PloneHotfix20170117
    Products.PloneHotfix20171128
    Products.PloneHotfix20200121

(eventually, I will also need Products.PloneFormgen and collective.recaptcha.)
to buildout.cfg and run

bin/buildout -Novvvvv

with the result

...
We have the distribution that satisfies 'Plone==4.3'.
We have the distribution that satisfies 'Pillow==1.7.8'.
We have no distributions for Products.PloneHotfix20130618 that satisfies 'Products.PloneHotfix20130618'.
Couldn't find index page for 'Products.PloneHotfix20130618' (maybe misspelled?)
While:
  Installing client1.
  Getting distribution for 'Products.PloneHotfix20130618'.
Error: Couldn't find a distribution for 'Products.PloneHotfix20130618'.
*************** PICKED VERSIONS ****************
[versions]

*************** /PICKED VERSIONS ***************

What is wrong? I actually have that hotfix in my Debian8 instance installed.

They are all on PyPI. Since PyPI got a domain change and HTTPS only you may need to point your buildout to it using index = https://pypi.org/simple in your top [buildout] section when using an older buildout version..

Thank you. However, it does not help. During bin/buildout -Novvvvv I got the following.

find-links = http://dist.plone.org
	http://download.zope.org/ppix/
	http://download.zope.org/distribution/
	http://effbot.org/downloads
	https://pypi.org/simple
	http://dist.plone.org/release/4.3
index = https://pypi.org/simple
....
We have no distributions for Products.PloneHotfix20130618 that satisfies 'Products.PloneHotfix20130618'.
Couldn't find index page for 'Products.PloneHotfix20130618' (maybe misspelled?)
While:
  Installing client1.
  Getting distribution for 'Products.PloneHotfix20130618'.
Error: Couldn't find a distribution for 'Products.PloneHotfix20130618'.

Ok, this is strange. Please run bin/buildout annotate and paste the output here.

I ran bin/buildout -N annotate. Hope the -N is not a problem.
I couldn't post it here (too long), so I've put it on pastebin.

Well, except that the PyPI link does not need to exist in find-links (and AFAIK this is of cosmetic nature) it looks fine.

I remember there were problems in past when Python were not able to resolve https (TLS) URLs - but IIRC it spit out an error message about it.

May you try what happens if you reduce find-links/index to

find-links=
    http://effbot.org/downloads
    
index = https://pypi.org/simple

Because AFAIK everything else (except [c]elementree on effbot) exists on PyPI.

My buildout.cfg just has this:

# If you change your Plone version, you'll also need to update
# the repository link below.
find-links +=
    https://pypi.org/simple
    http://dist.plone.org/release/4.3

However, I read somewhere that easyinstall (probably in a version that I have could either not cope with https or http was hardcoded. So I would have to edit /home/plone/Plone//buildout-cache/eggs/zc.buildout-1.7.1-py2.7.egg/zc/buildout/easy_install.py. But when I there change to

default_index_url = os.environ.get(
    'buildout-testing-index-url',
    'https://pypi.python.org/simple',
    )

and remove the respective .pyc file and run bin/buildout -Novvvvv then it seems to do something.


But I now see an error message
Installed /tmp/plone/tmpmudttc/Products.PloneHotfix20130618-1.3.1-py2.7.egg

Because this distribution was installed --multi-version, before you can
import modules from this package in an application, you will need to
'import pkg_resources' and then use a 'require()' call similar to one of
these examples, in order to select the desired version:

    pkg_resources.require("Products.PloneHotfix20130618")  # latest installed version
    pkg_resources.require("Products.PloneHotfix20130618==1.3.1")  # this exact version
    pkg_resources.require("Products.PloneHotfix20130618>=1.3.1")  # this version or higher


Note also that the installation directory must be on sys.path at runtime for
this to work.  (e.g. by being the application's script directory, by being on
PYTHONPATH, or by being added to sys.path by your code.)

While:
  Installing client1.
  Getting distribution for 'Products.PloneHotfix20130618'.

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/home/plone/Plone/buildout-cache/eggs/zc.buildout-1.7.1-py2.7.egg/zc/buildout/buildout.py", line 1866, in main
    getattr(buildout, command)(args)
  File "/home/plone/Plone/buildout-cache/eggs/zc.buildout-1.7.1-py2.7.egg/zc/buildout/buildout.py", line 625, in install
    installed_files = self[part]._call(recipe.install)
  File "/home/plone/Plone/buildout-cache/eggs/zc.buildout-1.7.1-py2.7.egg/zc/buildout/buildout.py", line 1345, in _call
    return f()
  File "/zlocal/sdb1/plone/Plone/buildout-cache/eggs/plone.recipe.zope2instance-4.2.10-py2.7.egg/plone/recipe/zope2instance/__init__.py", line 109, in install
    installed.extend(self.install_scripts())
  File "/zlocal/sdb1/plone/Plone/buildout-cache/eggs/plone.recipe.zope2instance-4.2.10-py2.7.egg/plone/recipe/zope2instance/__init__.py", line 574, in install_scripts
    requirements, ws = self.egg.working_set(['plone.recipe.zope2instance'])
  File "/zlocal/sdb1/plone/Plone/buildout-cache/eggs/zc.recipe.egg-1.3.2-py2.7.egg/zc/recipe/egg/egg.py", line 85, in working_set
    allowed_eggs_from_site_packages=self.allowed_eggs,
  File "/home/plone/Plone/buildout-cache/eggs/zc.buildout-1.7.1-py2.7.egg/zc/buildout/easy_install.py", line 1198, in working_set
    prefer_final=prefer_final)
  File "/home/plone/Plone/buildout-cache/eggs/zc.buildout-1.7.1-py2.7.egg/zc/buildout/easy_install.py", line 1079, in install
    return installer.install(specs, working_set)
  File "/home/plone/Plone/buildout-cache/eggs/zc.buildout-1.7.1-py2.7.egg/zc/buildout/easy_install.py", line 885, in install
    for dist in self._get_dist(requirement, ws, self._always_unzip):
  File "/zlocal/sdb1/plone/Plone/buildout-cache/eggs/buildout.dumppickedversions-0.5-py2.7.egg/buildout/dumppickedversions/__init__.py", line 33, in get_dist
    dists = old_get_dist(self, requirement, ws, always_unzip)
  File "/home/plone/Plone/buildout-cache/eggs/zc.buildout-1.7.1-py2.7.egg/zc/buildout/easy_install.py", line 788, in _get_dist
    dist.location, ws, self._dest, dist)
  File "/home/plone/Plone/buildout-cache/eggs/zc.buildout-1.7.1-py2.7.egg/zc/buildout/easy_install.py", line 612, in _call_easy_install
    newloc = os.path.join(dest, os.path.basename(d.location))
  File "/home/plone/Plone/Python-2.7/lib/python2.7/posixpath.py", line 70, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

Ignore the comment. You do not need both in find-links - but this is not the problem.
If you remove find-links complete and keep index = https://pypi.org/simple you are fine as long no addon needs [c]elementree.

But the problem is more about your buildout/setuptools version I suppose.
Are the installed versions like in https://dist.plone.org/release/4.3.19/requirements.txt?

Thank you for walking with me through this problem. I really appreciate it.

(Python-2.7)plone portal10:~/Plone/buildout-cache/eggs>ll |grep setuptools
-rw-r--r--   1 plone plone_group 332005 Mar 19  2011 setuptools-0.6c11-py2.7.egg
(Python-2.7)plone portal10:~/Plone/buildout-cache/eggs>ll |grep zc.buildout
drwxr-xr-x   4 plone plone_group   4096 Apr 14  2013 zc.buildout-1.7.1-py2.7.egg

BTW, I used the unified installer for 4.3 not 4.3.19.
In my versions.cfg I find

zc.buildout = 1.7.1
setuptools = 0.6c11

This one is very old. I guess it does not work with current PyPI/packaging. There were some breaking changes meanwhile in Python packaging. Try to use the versions used in the latest 4.3.19. Those are fine for Python 2.7.

Thanks. Seems to run fine so far with changing setuptools to 26.1.1.
Next error is this.

Picked: Products.PloneHotfix20130618 = 1.3.1
Picked: Products.PloneHotfix20131210 = 1.0
Picked: Products.PloneHotfix20150910 = 1.1
We have no distributions for Products.PloneHotfix20151006 that satisfies 'Products.PloneHotfix20151006'.
Couldn't find index page for 'Products.PloneHotfix20151006' (maybe misspelled?)
Getting distribution for 'Products.PloneHotfix20151006'.
While:
  Installing client1.
  Getting distribution for 'Products.PloneHotfix20151006'.
Error: Couldn't find a distribution for 'Products.PloneHotfix20151006'.

However, https://plone.org/security/hotfix/20151006 is listed on
https://plone.org/security/hotfixes for Plone 4.3.

Isn't it a bit strange that I do not see buildout-cache/eggs/setupdools-26.1.1.egg?
Doesn't setuptools install in the new when I run bin/buildout?

https://pypi.org/search/?q=Products.PloneHotfix20151006 fails to find it.
So I read at the hotfix page https://plone.org/security/hotfix/20151006

This is not a downloadable hotfix. The procedure for installing Hotfix 20151006 differs from other hotfix releases as it requires you to run buildout.

Just follow the instructions at the hotfix page.

I suppose so, but since I use a different way (pip) to install setuptools and buildout and also a bit out of Plone 4 business I am not sure.

OK, reinstalled Plone-4.3 from Unified installer into /home/plone/Plone.

. /home/plone/Plone/Python-2.7/bin/activate
pip install setuptools==26.1.1

Then in buildout.cfg have

find-links +=
    https://dist.plone.org/release/4.3

index +=
    https://pypi.python.org/simple/
...
eggs =
    Plone
    Pillow
    Products.PloneHotfix20130618

Now running bin/buildout -N gives:

Updating zeoserver.
Installing client1.
Not found: 

https://pypi.python.org/simple/Products.PloneHotfix20130618/
Not found: 

https://pypi.python.org/simple/Products.PloneHotfix20130618/
Couldn't find index page for 'Products.PloneHotfix20130618' (maybe misspelled?)
Not found: 

https://pypi.python.org/simple/
Getting distribution for 'Products.PloneHotfix20130618'.
While:
  Installing client1.
  Getting distribution for 'Products.PloneHotfix20130618'.
Error: Couldn't find a distribution for 'Products.PloneHotfix20130618'.

It is obviously looking into pypi. So what is buildout complaining about?
The hotfix is on the above URL.

This URL is outdated. Its today https://pypi.org/simple/ (the above got refirected, see https://packaging.python.org/guides/migrating-to-pypi-org/)
Maybe the redirect is not applied for some reason.

Now with

index +=
    https://pypi.python.org/simple/
 

Still problematic.

bin/buildout -N

Uninstalling zeoserver.
Installing zeoserver.
Created directory /zlocal/sdb1/plone/Plone/zeocluster/parts/zeoserver
Created directory /zlocal/sdb1/plone/Plone/zeocluster/parts/zeoserver/etc
Created directory /zlocal/sdb1/plone/Plone/zeocluster/parts/zeoserver/var
Created directory /zlocal/sdb1/plone/Plone/zeocluster/parts/zeoserver/log
Created directory /zlocal/sdb1/plone/Plone/zeocluster/parts/zeoserver/bin
Wrote file /zlocal/sdb1/plone/Plone/zeocluster/parts/zeoserver/etc/zeo.conf
Wrote file /zlocal/sdb1/plone/Plone/zeocluster/parts/zeoserver/bin/zeoctl
Changed mode for /zlocal/sdb1/plone/Plone/zeocluster/parts/zeoserver/bin/zeoctl to 755
Wrote file /zlocal/sdb1/plone/Plone/zeocluster/parts/zeoserver/bin/runzeo
Changed mode for /zlocal/sdb1/plone/Plone/zeocluster/parts/zeoserver/bin/runzeo to 755
Installing client1.
Not found: 

https://pypi.org/simple/Products.PloneHotfix20130618/
Not found: 

https://pypi.org/simple/Products.PloneHotfix20130618/
Couldn't find index page for 'Products.PloneHotfix20130618' (maybe misspelled?)
Not found: 

https://pypi.org/simple/
Getting distribution for 'Products.PloneHotfix20130618'.
While:
  Installing client1.
  Getting distribution for 'Products.PloneHotfix20130618'.
Error: Couldn't find a distribution for 'Products.PloneHotfix20130618'.

I even tried with "pip install setuptools==27.0.0".
I slowly get frustrated, but I cannot give up.

If everything fails, you could probably download the files: https://pypi.org/project/Products.PloneHotfix20130618/#files and put the folder ( Products.PloneHotfix20130618 ) and put it in your 'src'-folder.

Then add

develop =
    src/Products.PloneHotfix20130618

OK, I had to rename the unzipped folder from ```

src/Products.PloneHotfix20130618-1.3.1

to

src/Products.PloneHotfix20130618

But then it worked.
Thanks.

Well, I will have to install all the other hotfixes this way? :frowning:
Also I need to install PloneFormGen==1.7.11 and I guess dependencies will then hit me again.
I cannot be the first who runs into this problem. There must be a solution that doesn't require me to put everything into the src directory.
But thanks anyway, I learnt something.

I hope I do not repeat myself, but all pypi.python.org got redirected to pypi.org.

I don't understand what you mean. I do not have pypi.python.org anymore anywhere inside /home/plone/Plone/zeocluster. Not even under /home/plone/Plone/Python-2.7. All replaced by just pypi.org. But I the

Error: Couldn't find a distribution for 'Products.PloneHotfix20131210'.

remains.