Thursday, August 25, 2016

Creating a portable Python + VSphere Python SDK for Windows

If you are working with Virtual Center in an enterprise environment, there are high changes that your VC clients are Windows systems running on a secure network (no network access). This article will let you build a portable Python extender the VSphere Python SDK that you can just copy and use from your vcenter client systems.

Get the required packages on a system having network access: 

  • lessmsi from 
  • python*.msi from
  • Python packages from pip:
    • six-1.10.0-py2.py3-none-any.whl, 
    • requests-2.10.0-py2.py3-none-any.whl
    • suds-0.4.tar.gz
    • pyvmomi- 

Create a .bat file that creates the python portable directory:

lessmsi-v1.4\lessmsi x python-2.7.12.amd64.msi python\
cd python\SourceDir
python -m ensurepip
scripts\pip install ../../six-1.10.0-py2.py3-none-any.whl
Scripts\pip install ../../requests-2.10.0-py2.py3-none-any.whl
Scripts\pip install ../../suds-0.4.tar.gz
Scripts\pip install ../../pyvmomi-

Run it, you will get your portable content in the "python" folder


Tuesday, November 1, 2011

More thinking on software bundles for Linux

The post Rethinking the Linux distibution made me revisit some of the ideas which I had in the past trying to address which in my opinion are major limitations in the current main packaging systems:
  • No support for multiple versions of the same software
  • No support for rollbacks
A software bundle composed of the application and all it's "non core" dependencies can  also add some other benefits:
  • Cross Linux distribution delivery
  • Fine grain control of libraries and options used by an application
  • Reduced complexity with the removal of dependencies management
The disadvantages are:
  • Increase on Disk and RAM usage from software containing different versions of common libraries
  • Applying security fixes  on dependencies requires re-creating/re-distributing every affected bundle
Possible approach for implementation:

Adapt an existing source base build system like Arch's "makepkg", with the following changes:
  • Run time prefix must be set to /opt/bbundle
  • Build definitions for dependencies must be contained in the master build definition (this will lead to build definitions redundancy across bundles but will remove the risk of breaking builds by sharing dependencies building rules) 

The bundle file format should be a commonly used archive format, since tar does not provide indexing, .zip is a better option. Having an indexed archive will allow to reduce download sizes by inspecting the bundle  contents prior to the download and skipping the download for common files found at installed bundles. In order to save on-disk space, the bundle installer should check for identical files across bundles and use hard links instead of duplicating files.

Bundles installation should be as simply as extracting the bundle archive into /usr/local/bbundle/bundle_name. A watching service must identify .desktop and other exportable resources and make them available from the host desktop environment.

Thursday, May 12, 2011

Life changes

It has been more than 1 month since I left the Ubuntu community and started exploring other Linux distros. Meanwhile the increasing personal concerns added to the my country's economical situation prompted to re-evaluate where I am investing my life time.

In short, I need to engage in profitable activities otherwise I may fail to support my family.

While I will always be a strong FOSS supporter, because I believe on it's values. I no longer have the time for significant involvement in non profitable projects.
I will continue using and consequentially involved in the Linux ecosystem because it allows me to be more productive, both on my job and on other projects I may get involved with.

Monday, March 14, 2011

Building RPMs vs Building DEBs

Having a large experience with Debian package building it's refreshing to try something else. Last week I have learned the basics of RPM package building.
Here are the differences I have found so far and my opinions about them.

The RPM .spec file package contains both package metadata (description, dependencies, etc) and compile rules while on DEB you have the data split into different files. I remember that on the beginning it was hard to understand the purpose of all those debian/* files, I have found .spec files easier to understand.

The RPM .specs allows conditional building, during build the build target release can be used to dynamically adjust build flags, dependencies etc. While you can achieve this on Debian using some auto generation mechanism (debian/, it is not naturally integrated in the building system, debian/* contains metadata and rules for a specific target system.

Not so important but a nice feature it's the support for translated description/summary on RPM packages.

Saturday, March 5, 2011

Some differences between Fedora and Ubuntu

I have already noted a few technical differences between Fedora and Ubuntu which I am going to comment.

/tmp cleanup
Fedora does not automatically remove /tmp contents on reboot, I prefer Ubuntu's behavior, applications do not rely on tmp contents across reboots and regular users should not be working on /tmp. If there is no other automated cleanup mechanism -did not check yet-, on the long run the user will get a full root file system.

Repository information cache
I don’t have a YUM technical background, so please excuse me if I will write something terribly wrong here.
From an user perspective I have noted that yum does not have an explicit cache mechanism, you don’t need to explicitly update the cache. The good side it automatically gets the required information when a new repository is added and frees the user from a repetitive action. The bad side is that it may introduce some network/time overhead during package management opertions.

Software update policy
I did not read Fedora’s update policy yet but I have noted that they provide regular release upgrades for some software, piding was updated to 2.7.10 from the regular updates repository.

Friday, March 4, 2011

Impressions from Linux Mint 10 Main Edition

Now that I am confident on the Fedora install I could afford to use my other partition and try Linux Mint 10 as suggested by a friend.

The out-of-the box visual experience was one of the best I had so far with a Linux distribution, the menu -mintmenu- seems highly inspired in MS Windows menus, from my reading it's a fork of the SLAB Menu, I really loved the easy navigation and search capability.
Linux Mint 10 is based and compatible with Ubuntu 10.10, the default configuration points to the linux mint repository plus the Ubuntu archives for the usual packages.

Besides the menu they provide their own set of tools, you can easily identify them with ls /usr/bin/mint*, some of them are just wrappers or tiny tools, but it shows they are working not only on cosmetics.

I did not find any documentation about their decision making process or governance in general, but I have sent an email asking for information.

They do care about community feedback, judging from the running poll .
There is a Debian based version (which I did not test yet), and it seems they will be deciding about switching to Debian for other flavors.

I will keep an eye on it, it may be a nice project to join.

First day with Fedora 14

I am starting my adventure searching for a new FOOS project to get involved with. I still think that a Linux distribution is one of the most interesting type of projects. We have so much Free Software that is not reaching yet those who would benefit from it.

Yesterday I have switched from Ubuntu 10.10 to Fedora 14 I have chosen to try Fedora because it has an open governance model with a clear leadership. While there are a clear special capacities from the sponsor (RedHat), at the highest level the project is managed by an Executive Board, the board is composed with a mix of RH appointed and community elected members.

Now back to my first day experience, I was afraid that it would be an hard experience, I use Linux for my primary workstation so it really needs to work.
The install was smoothly, I did found a bug on a specific case of setting up an user with an existing home dir containing invalid symbolic links, nothing serious.

I was able to install all my job required tools using Fedora 64 bits thanks to the multiarch supports which allows to install both 32 and 64 package versions, this is something I could not achieve with Ubuntu 64 bits, ia32libs is not sufficient for my case.
All the software that I needed was available from repositories or as an .rpm from upstream: Filezilla, KeepassX, Zim, X-Chat, Skype, VirtualBox, gnomedo, tsocks, eclipse, cairo-dock, geany. dropbox, pidgin .

During a full work day I have found no significant usability differences between Fedora an Ubuntu.

The only issue I had so far was related yum repository errors, this is one of my next steps, to understand Fedora repository types and package building.

I will also try to understand if the distribution itself is effectively governed as documented.