frapposelli / vagrant-vcloud

Vagrant provider for VMware vCloud Director®
MIT License
67 stars 38 forks source link

Update gemspec to require nokogiri 1.6.3.1 #98

Closed newellista closed 10 years ago

newellista commented 10 years ago

Current version of vagrant requires nokogiri = 1.6.3.1

Updated Gemspec to match that requirement.

StefanScherer commented 10 years ago

Great, thanks @frapposelli.

I have just tested the following upgrade path.

Vagrant 1.6.3 + vagrant plugin update to install vagrant-vcloud 0.4.3.

It also installs nokogiri 1.6.3.1 with some warnings, but Vagrant 1.6.3 seems to work with it:

$ vagrant plugin update
Updating installed plugins...
Building nokogiri using packaged libraries.
Building libxml2-2.8.0 for nokogiri with the following patches applied:
    - 0001-Fix-parser-local-buffers-size-problems.patch
    - 0002-Fix-entities-local-buffers-size-problems.patch
    - 0003-Fix-an-error-in-previous-commit.patch
    - 0004-Fix-potential-out-of-bound-access.patch
    - 0005-Detect-excessive-entities-expansion-upon-replacement.patch
    - 0006-Do-not-fetch-external-parsed-entities.patch
    - 0007-Enforce-XML_PARSER_EOF-state-handling-through-the-pa.patch
    - 0008-Improve-handling-of-xmlStopParser.patch
    - 0009-Fix-a-couple-of-return-without-value.patch
    - 0010-Keep-non-significant-blanks-node-in-HTML-parser.patch
    - 0011-Do-not-fetch-external-parameter-entities.patch
************************************************************************
IMPORTANT!  Nokogiri builds and uses a packaged version of libxml2.

If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
follows:

    gem install nokogiri -- --use-system-libraries

If you are using Bundler, tell it to use the option:

    bundle config build.nokogiri --use-system-libraries
    bundle install

However, note that nokogiri does not necessarily support all versions
of libxml2.

For example, libxml2-2.9.0 and higher are currently known to be broken
and thus unsupported by nokogiri, due to compatibility problems and
XPath optimization bugs.
************************************************************************
Building libxslt-1.1.28 for nokogiri with the following patches applied:
    - 0001-Adding-doc-update-related-to-1.1.28.patch
    - 0002-Fix-a-couple-of-places-where-f-printf-parameters-wer.patch
    - 0003-Initialize-pseudo-random-number-generator-with-curre.patch
    - 0004-EXSLT-function-str-replace-is-broken-as-is.patch
    - 0006-Fix-str-padding-to-work-with-UTF-8-strings.patch
    - 0007-Separate-function-for-predicate-matching-in-patterns.patch
    - 0008-Fix-direct-pattern-matching.patch
    - 0009-Fix-certain-patterns-with-predicates.patch
    - 0010-Fix-handling-of-UTF-8-strings-in-EXSLT-crypto-module.patch
    - 0013-Memory-leak-in-xsltCompileIdKeyPattern-error-path.patch
    - 0014-Fix-for-bug-436589.patch
    - 0015-Fix-mkdir-for-mingw.patch
************************************************************************
IMPORTANT!  Nokogiri builds and uses a packaged version of libxslt.

If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
follows:

    gem install nokogiri -- --use-system-libraries

If you are using Bundler, tell it to use the option:

    bundle config build.nokogiri --use-system-libraries
    bundle install
************************************************************************
Updated 'vagrant-vcloud' to version '0.4.3'!
vagrant at vpn-mac in ~/code/basebox-slave on master*
$ vagrant plugin list
vagrant-login (1.0.1, system)
vagrant-share (1.1.1, system)
vagrant-vcloud (0.4.3)
vagrant at vpn-mac in ~/code/basebox-slave on master*
$ ls ~/.vagrant.d/gems/gems/
awesome_print-1.2.0    json-1.8.1             nokogiri-1.5.11        rest-client-1.6.8      vagrant-share-1.1.1
ffi-1.9.5              mime-types-1.25.1      nokogiri-1.6.3.1       ruby-progressbar-1.1.1 vagrant-vcloud-0.4.2
i18n-0.6.11            netaddr-1.5.0          rdoc-4.1.2             terminal-table-1.4.5   vagrant-vcloud-0.4.3
vagrant at vpn-mac in ~/code/basebox-slave on master*
$ vagrant status
Current machine states:

basebox-jenkins           running (vcloud)
vmware-slave              running (vcloud)
vbox-slave                running (vcloud)
wsus                      running (vcloud)
vmware-slave-lin          not created (vcloud)
vbox-slave-lin            not created (vcloud)

This environment represents multiple VMs. The VMs are all listed
above with their current state. For more information about a specific
VM, run `vagrant status NAME`.

Then I upgraded to Vagrant 1.6.5 with the new .dmg file from vagrantup.com. But a vagrant status complains with the following conflict:

vagrant at vpn-mac in ~/code/basebox-slave on master*
$ vagrant status
Vagrant experienced a version conflict with some installed plugins!
This usually happens if you recently upgraded Vagrant. As part of the
upgrade process, some existing plugins are no longer compatible with
this version of Vagrant. The recommended way to fix this is to remove
your existing plugins and reinstall them one-by-one. To remove all
plugins:

    rm -r ~/.vagrant.d/plugins.json ~/.vagrant.d/gems

Note if you have an alternate VAGRANT_HOME environmental variable
set, the folders above will be in that directory rather than your
user's home directory.

The error message is shown below:

Bundler could not find compatible versions for gem "httpclient":
  In Gemfile:
    vagrant-vcloud (>= 0) ruby depends on
      httpclient (~> 2.3.4.1) ruby

    vagrant (= 1.6.5) ruby depends on
      winrm (~> 1.1.3) ruby depends on
        httpclient (2.4.0)

To fix this issue I had to remove my plugins as suggested by vagrant.

rm -r ~/.vagrant.d/plugins.json ~/.vagrant.d/gems
vagrant plugin list
vagrant plugin install vagrant-vcloud

Now it does not complain about httpclient library. Dependencies of plugins and the embedded vagrant core could be difficult sometimes.

So it is sometimes easier to start with a fresh installation.

StefanScherer commented 10 years ago

Just to complete the informations. The gems folder now looks like this:

$ ls gems/gems/
awesome_print-1.2.0    httpclient-2.3.4.1     netaddr-1.5.0          ruby-progressbar-1.1.1 vagrant-vcloud-0.4.3
ffi-1.9.5              json-1.8.1             rdoc-4.1.2             terminal-table-1.4.5
$ vagrant --version
Vagrant 1.6.5
vagrant at vpn-mac in ~/.vagrant.d
$ vagrant plugin list
vagrant-login (1.0.1, system)
vagrant-share (1.1.1, system)
vagrant-vcloud (0.4.3)

Now httpclient-2.3.4.1 directory exists.

Would a

 s.add_runtime_dependency 'httpclient', '~> 2.4'

in vagrant-vcloud.gemspec be a solution for that upgrade problem similar to nokogiri?

frapposelli commented 10 years ago

Good catch @StefanScherer I will update the dependency on httpclient on the next release.