Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating to newer version of net-ldap gem #10635

Merged
merged 1 commit into from
Aug 20, 2016

Conversation

gtanzillo
Copy link
Member

@gtanzillo gtanzillo commented Aug 19, 2016

Updating to newer version of net-ldap gem

Version 0.14.0 of the gem (actually, starting with 0.13.0) contains a code change that fixes an encoding error (Encoding::UndefinedConversionError) that happens when there are extended characters in a dn. The fix forces utf-8 encoding instead of ASCII-8BIT for objects returned from the directory.

See the original PR in the rupy-net-ldap repo.

https://bugzilla.redhat.com/show_bug.cgi?id=1367600

/cc @abellotti @jrafanie

@abellotti
Copy link
Member

👍

@jrafanie
Copy link
Member

This version (actually, starting with 0.13.0) contains a fix that forces utf-8 encoding instead of ASCII-8BIT
which was causing Encoding::UndefinedConversionError when an LDAP dn had extended characters in it.

To clarify, the fix doesn't cause the Encoding::UndefinedConversionError, right?

@jrafanie
Copy link
Member

LGTM other than the comment

Version 0.14.0 of the gem (actually, starting with 0.13.0) contains a code change that fixes an encoding error
(Encoding::UndefinedConversionError) that happens when there are extended characters in a dn. The fix forces
utf-8 encoding instead of ASCII-8BIT for objects returned from the directory.

See ruby-ldap/ruby-net-ldap#242
https://bugzilla.redhat.com/show_bug.cgi?id=1367600
@miq-bot
Copy link
Member

miq-bot commented Aug 19, 2016

Checked commit gtanzillo@895c246 with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1
1 file checked, 0 offenses detected
Everything looks good. 👍

@gtanzillo
Copy link
Member Author

@jrafanie I fixed the comment in the PR and the commit. Hopefully it's clearer now. Thanks.

@jrafanie jrafanie merged commit 72b8401 into ManageIQ:master Aug 20, 2016
@jrafanie jrafanie added this to the Sprint 45 Ending Aug 22, 2016 milestone Aug 20, 2016
@jrafanie jrafanie self-assigned this Aug 20, 2016
@chessbyte
Copy link
Member

Darga cherry-pick conflict:

$ git cherry-pick -x -m 1  72b8401 
error: could not apply 72b8401... Merge pull request #10635 from gtanzillo/bz-1367600-net-ldap_ber
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'

$ git status
On branch darga
Your branch is up-to-date with 'upstream/darga'.
You are currently cherry-picking commit 72b8401.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)

        both modified:   Gemfile

$ git diff
diff --cc Gemfile
index 717a105,b60fe99..0000000
--- a/Gemfile
+++ b/Gemfile
@@@ -3,102 -3,95 +3,109 @@@ raise "Ruby versions less than 2.2.2 ar
  # VMDB specific gems
  #

 -# when using this Gemfile inside a providers Gemfile, the dependency for the provider is already declared
 -unless dependencies.detect { |d| d.name == "manageiq-providers-amazon" }
 -  gem "manageiq-providers-amazon", :git => "git://github.com/ManageIQ/manageiq-providers-amazon", :branch => "master"
 +gem "rails",                           "~>5.0.0"
 +gem "rails-controller-testing",        :require => false
 +gem "activemodel-serializers-xml",     :require => false # required by draper: https://github.com/drapergem/draper/issues/697
 +gem "activerecord-session_store",      "~>1.0.0"
 +gem "websocket-driver",                "~>0.6.3"
 +
 +gem "config",                          "~>1.1.0", :git => "git://github.com/ManageIQ/config.git", :branch => "overwrite_arrays"
 +gem "deep_merge",                      "~>1.0.1", :git => "git://github.com/ManageIQ/deep_merge.git", :branch => "overwrite_arrays"
 +
 +# Local gems
 +path "gems/" do
 +  gem "manageiq_foreman", :require => false
 +  gem "manageiq-providers-amazon"
  end

 -# Unmodified gems
 -gem "activerecord-session_store",     "~>1.0.0"
 +# Client-side dependencies
 +gem "angular-ui-bootstrap-rails",     "~>0.13.0"
 +gem "jquery-hotkeys-rails"
 +gem "jquery-rails",                   "~>4.1.1"
 +gem "jquery-rjs",                     "=0.1.1",                       :git => "git://github.com/amatsuda/jquery-rjs.git", :ref => "1288c09"
 +gem "lodash-rails",                   "~>3.10.0"
 +# gem "patternfly-sass",                "~>3.4.0"
 +gem 'patternfly-sass', :github => 'manageiq/patternfly-sass', :branch => 'tertiary-nav'
 +gem "sass-rails"
 +gem "sprockets-es6",                  "~>0.9.0",  :require => "sprockets/es6"
 +
 +# Vendored and required
 +gem "ruport",                         "=1.7.0",                       :git => "git://github.com/ManageIQ/ruport.git", :tag => "v1.7.0-3"
 +
 +
 +# Vendored but not required
 +gem "net-ldap",                       "~>0.7.0",   :require => false
 +gem "rubyrep",                        "=1.2.0",    :require => false, :git => "git://github.com/ManageIQ/rubyrep.git", :tag => "v1.2.0-9"
 +gem "simple-rss",                     "~>1.3.1",   :require => false
 +gem "ziya",                           "=2.3.0",    :require => false, :git => "git://github.com/ManageIQ/ziya.git", :tag => "v2.3.0-3"
 +
 +# Not vendored, but required
 +gem "mime-types",                     "~>2.6.1",   :require => "mime/types/columnar"
  gem "acts_as_list",                   "~>0.7.2"
 -gem "acts_as_tree",                   "~>2.1.0" # acts_as_tree needs to be required so that it loads before ancestry
 -gem "ancestry",                       "~>2.1.0",       :require => false
 -gem "ansible_tower_client",           "~>0.3.2",       :require => false
 -gem "aws-sdk",                        "~>2.2.19",      :require => false
 +gem "acts_as_tree",                   "~>2.1.0"  # acts_as_tree needs to be required so that it loads before ancestry
 +# In 1.9.3: Time.parse uses british version dd/mm/yyyy instead of american version mm/dd/yyyy
 +# american_date fixes this to be compatible with 1.8.7 until all callers can be converted to the 1.9.3 format prior to parsing.
 +# See miq_expression_spec Date/Time Support examples.
 +# https://github.com/jeremyevans/ruby-american_date
 +gem "american_date"
  gem "color",                          "~>1.8"
 -gem "dalli",                          "~>2.7.4",       :require => false
 -gem "draper",                         "~>3.0.0.pre1"
 -gem "default_value_for",              "~>3.0.2"
 -gem "elif",                           "=0.1.0",        :require => false
 -gem "fast_gettext",                   "~>1.2.0"
 -gem "fog-google",                     "~>0.3.0",       :require => false
 -gem "fog-vcloud-director",            "~>0.1.3",       :require => false
 -gem "gettext_i18n_rails",             "~>1.7.2"
 -gem "gettext_i18n_rails_js",          "~>1.1.0"
 -gem "google-api-client",              "~>0.8.6",       :require => false
 -gem "hamlit",                         "~>2.0.0",       :require => false
 +gem "default_value_for",              "~>3.0.2.alpha-miq.1", :git => "git://github.com/jrafanie/default_value_for.git", :branch => "rails-50" # https://github.com/FooBarWidget/default_value_for/pull/57
 +gem "draper",                         "~>2.1.0", :git => "git://github.com/janraasch/draper.git", :branch => "feature/rails5-compatibility" # https://github.com/drapergem/draper/pull/712
  gem "hamlit-rails",                   "~>0.1.0"
  gem "high_voltage",                   "~>2.4.0"
 -gem "inifile",                        "~>3.0",         :require => false
 -gem "jbuilder",                       "~>2.5.0" # For the REST API
 -gem "mime-types",                     "~>2.6.1",       :require => "mime/types/columnar"
  gem "nakayoshi_fork",                 "~>0.0.3"  # provides a more CoW friendly fork (GC a few times before fork)
++<<<<<<< HEAD
++=======
+ gem "net-ldap",                       "~>0.14.0",      :require => false
+ gem "net-ping",                       "~>1.7.4",       :require => false
+ gem "net-ssh",                        "=3.2.0",        :require => false
+ gem "net_app_manageability",          ">=0.1.0",       :require => false
++>>>>>>> 72b8401... Merge pull request #10635 from gtanzillo/bz-1367600-net-ldap_ber
  gem "novnc-rails",                    "~>0.2"
 -gem "omniauth",                       "~>1.3.1",       :require => false
 -gem "omniauth-google-oauth2",         "~>0.2.6"
 -gem "open4",                          "~>1.3.0",       :require => false
  gem "outfielding-jqplot-rails",       "= 1.0.8"
 -gem "ovirt-engine-sdk",               "~>4.0.0.alpha", :require => false # Required by the oVirt provider
 -gem "ovirt_metrics",                  "~>1.2.0",       :require => false
 -gem "paperclip",                      "~>4.3.0"
  gem "puma",                           "~>3.3.0"
 -gem "rails",                          "~>5.0.0"
 -gem "rails-controller-testing",                        :require => false
 -gem "rails-i18n",                     "~>5.x"
  gem "recursive-open-struct",          "~>1.0.0"
  gem "responders",                     "~>2.0"
 -gem "ruby-dbus" # For external auth
 -gem "ruby-progressbar",               "~>1.7.0",       :require => false
 -gem "ruby_parser",                    "~>3.7",         :require => false
 -gem "rufus-scheduler",                "~>3.1.3",       :require => false
 -gem "rugged",                         "~>0.23.0",      :require => false
  gem "secure_headers",                 "~>3.0.0"
 -gem "simple-rss",                     "~>1.3.1",       :require => false
 -gem "snmp",                           "~>1.2.0",       :require => false
 -gem "sshkey",                         "~>1.8.0",       :require => false
 -gem "uglifier",                       "~>2.7.1",       :require => false
 -gem "websocket-driver",               "~>0.6.3"
 -
 -# Modified gems (forked on Github)
 -gem "config",                         "~>1.1.0",                      :git => "git://github.com/ManageIQ/config.git", :branch => "overwrite_arrays"
 -gem "deep_merge",                     "~>1.0.1",                      :git => "git://github.com/ManageIQ/deep_merge.git", :branch => "overwrite_arrays"
 -gem "foreman_api_client",             ">=0.1.0",   :require => false, :git => "git://github.com/ManageIQ/foreman_api_client.git", :branch => "master"
 -gem "ruport",                         "=1.7.0",                       :git => "git://github.com/ManageIQ/ruport.git", :tag => "v1.7.0-3"
 -gem "ziya",                           "=2.3.0",    :require => false, :git => "git://github.com/ManageIQ/ziya.git", :tag => "v2.3.0-3"
 +#gem "thin",                           "~>1.6.0"  # Used by rails server through rack

 -# In 1.9.3: Time.parse uses british version dd/mm/yyyy instead of american version mm/dd/yyyy
 -# american_date fixes this to be compatible with 1.8.7 until all callers can be converted to the 1.9.3 format prior to parsing.
 -# See miq_expression_spec Date/Time Support examples.
 -# https://github.com/jeremyevans/ruby-american_date
 -gem "american_date"
 +# Needed by the REST API
 +gem "gettext_i18n_rails",             "~>1.4.0"
 +gem "gettext_i18n_rails_js",          "~>1.0.3"
 +gem "fast_gettext",                   "~>1.1.0"
 +gem "jbuilder",                       "~>2.5.0"
 +gem "paperclip",                      "~>4.3.0"
 +gem "rails-i18n",                     "~>5.x"

 -group :automate do
 -  gem "savon",                        "~>2.2.0",   :require => false  # Automate uses this for simple SOAP Integration
 -end
 +# Needed by External Auth
 +gem "ruby-dbus"
 +
 +# Not vendored and not required
 +gem "ancestry",                       "~>2.1.0",   :require => false
 +gem "ansible_tower_client",           "~>0.3.2",   :require => false
 +gem "aws-sdk",                        "~>2.2.19",  :require => false
 +gem "dalli",                          "~>2.7.4",   :require => false
 +gem "elif",                           "=0.1.0",    :require => false
 +gem "google-api-client",              "~>0.8.6",   :require => false
 +gem "fog-google",                     "~>0.3.0",   :require => false
 +gem "hamlit",                         "~>2.0.0",   :require => false
 +gem "inifile",                        "~>3.0",     :require => false
 +gem "net_app_manageability",          ">=0.1.0",   :require => false
 +gem "net-ping",                       "~>1.7.4",   :require => false
 +gem "net-ssh",                        "=3.2.0",    :require => false
 +gem "omniauth",                       "~>1.3.1",   :require => false
 +gem "omniauth-google-oauth2",         "~>0.2.6"
 +gem "open4",                          "~>1.3.0",   :require => false
 +gem "ovirt_metrics",                  "~>1.2.0",   :require => false
 +gem "ruby_parser",                    "~>3.7",     :require => false
 +gem "ruby-progressbar",               "~>1.7.0",   :require => false
 +gem "rufus-scheduler",                "~>3.1.3",   :require => false
 +gem "rugged",                         "~>0.23.0",  :require => false
 +gem "savon",                          "~>2.2.0",   :require => false  # Automate uses this for simple SOAP Integration
 +gem "snmp",                           "~>1.2.0",   :require => false
 +gem "uglifier",                       "~>2.7.1",   :require => false
 +gem "sshkey",                         "~>1.8.0",   :require => false

 -group :ui_dependencies do # Added to Bundler.require in config/application.rb
 -  # Unmodified gems
 -  gem "angular-ui-bootstrap-rails",   "~>0.13.0"
 -  gem "jquery-hotkeys-rails"
 -  gem "jquery-rails",                 "~>4.1.1"
 -  gem "lodash-rails",                 "~>3.10.0"
 -  gem "sass-rails"
 -
 -  # Modified gems (forked on Github)
 -  gem "jquery-rjs",                   "=0.1.1",                       :git => "git://github.com/amatsuda/jquery-rjs.git", :ref => "1288c09"
 -  gem "patternfly-sass",                                              :git => "git://github.com/ManageIQ/patternfly-sass", :branch => "tertiary-3.7.0"
 -end

  ### Start of gems excluded from the appliances.
  # The gems listed below do not need to be packaged until we find it necessary or useful.

gtanzillo pushed a commit to gtanzillo/manageiq that referenced this pull request Aug 23, 2016
Version 0.14.0 of the gem (actually, starting with 0.13.0) contains a code change that fixes an encoding error
(Encoding::UndefinedConversionError) that happens when there are extended characters in a dn. The fix forces
utf-8 encoding instead of ASCII-8BIT for objects returned from the directory.

Manually back ported from pull request ManageIQ#10635 due to conflicts
@chessbyte chessbyte added the core label Aug 24, 2016
@chessbyte
Copy link
Member

Backported via #10712

$ git log
commit a62b2ded68bced14aad883b128538f63f9aa6931
Merge: e9823fc e4b6ccf
Author: Oleg Barenboim <chessbyte@gmail.com>
Date:   Wed Aug 24 08:40:44 2016 -0400

    Merge pull request #10712 from gtanzillo/net-ldap_ber-darga

    [DARGA] Updating to newer version of net-ldap gem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants