Upgrading pyfilesystem package (zato 2.0.7 on RHEL 6.7)

Hello,

I am having a strange behavior on FTP usage. Sometimes I receive the files information with a wrong modification date (more than one year in the past). I am not sure if this is a bug on the pyfilesystem 0.4.0, the ftp protocol or even the vsftpd my third party is using, but it’s causing some problems on the service I developed.

I would like to update the pyfilesystem to the latest version (2.0.4) but I am having a lot of trouble from it, since I am a noob at this yet. I tried:

  • Install the library using pip
    This was a lot of work (since my machine is isolated from the internet). Downloading the library (and dependencies) using pip was almost ok, since I received errors from the pip which were derived from “easy-install.pth file missing”, already reported in older topics, which leads to …

  • Install using buildout
    This was the recommendation I found on some topics and it seems the way to go, but I don’t have access to the Internet on the zato servers. I never worked with buildout before and I have zero clues on how to get it working offline. After changing the version on the versions.cfg and running ./bin/buildout, it breaks after trying to obtain the Cypher and now zato is broken (I had a backup of the folder, thankfully, so I was able to restore it).

  • Using zato_extra_paths
    I tried going in another direction, but I realized I don’t know too much about the proper way of organizing things to not break anything either in zato or the rest of the environment. I cannot install anything on the regular python from the machine, and I believe this was going to be the case to link the library to the zato_extra_paths. Is there any pythonic way of installing a library on this folder without using the regular python? A simple extraction of the .tar.gz version of the library to this path probably won’t solve the issue, since I imagine zato would continue to use it’s version…

  • Switch to SFTP
    I see this is not supported officially yet. I don’t want to install another library to support it for now. Paramiko + Cryptography should allow me to use SFTP, but I would love to explore first what could I do using pyfilesystem SFTP, since it would need minimal changes in code.

Any tips for a beginner in this pythonic packaging offline world? Is there any way to preserve the packages already on the zato build, adding the new version and running buildout offline without breaking anything? Any information which I could use to solve this dilemma would help.

Thanks!

There isn’t really any official way to tackle this sort of situations because it’s quite uncommon. Not totally unheard of but still uncommon.

What we did in such cases in other projects was to provide to administrators a custom .rpm or .tar.gz with the contents of /opt/zato or another directory where Zato had been installed to.

In other words, we installed everything on a system with a connection to the Internet, worked out any installation/upgrade-related things, then bundled everything for admins to install in restricted environments. Since these environments don’t have Internet, the package had to be delivered/installed manually anyway so it did make sense to install everything in one go - Zato and any custom dependencies needed.