(Maint) Properly mock SunOS in test for manufacturer

Previously this test did not properly mock the kernl and hardwareisa
facts, which caused it to actually run the code on solaris. Having the
code actually run on solaris made it return an unexpected value and fail
the test.

This changes the mocking and should cause the test to start passing on
solaris.
(#17493) Safer handling of EC2 'open' calls

Previously, when facter (and therefore) facter was run on an openstack
node, the metadata method did not protect against the 'open' method from
raising exceptions. Since we don't know ahead of time what the name of
the metadata ec2 fact(s) are, we have to add a rescue block outside of
the setcode block. If an exception occurs, we warn, similar to how
facter's built-in resolution mechanism warns about exceptions.

Previously, the ec2_userdata fact performed the 'open' call outside of
the setcode block, and only rescued one type of exception. This commit
moves the 'open' call into the setcode block, which automatically
rescues and warns if needed.

As a result of this change, the ec2_userdata fact is not evaluated until
actually requested, which simplifies the tests for the ec2 metadata
fact(s).

Based on code from Eric Sorenson <eric0@puppetlabs.com>
(#17493) Merge rescue blocks

There was no difference in behavior between the two rescue blocks, so
this commit merges them together.

Also some of the tests were expecting an exception to not occur, in
which case it's just better to execute the code directly.
Merge branch 'ticket/1.6.x/17493_rescue_metadata_open' into 1.6.x

* ticket/1.6.x/17493_rescue_metadata_open:
  (#17493) Merge rescue blocks
  (#17493) Safer handling of EC2 'open' calls
Merge remote-tracking branch 'upstream/1.6.x' into 1.7.x

* upstream/1.6.x:
  (#17493) Merge rescue blocks
  (#17493) Safer handling of EC2 'open' calls

Conflicts:
	spec/unit/ec2_spec.rb
Update ips ruby libdir to use sitelibdir instead of rubylibdir

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Turn on IPS building for facter
install.rb doesn't support sbindir, so remove it from ips rules

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Merge pull request #353 from MosesMendoza/maint/1.6.x/ips_fixes

Maint/1.6.x/ips fixes
Merge remote-tracking branch 'upstream/1.6.x' into 1.7.x

* upstream/1.6.x:
  install.rb doesn't support sbindir, so remove it from ips rules
  Turn on IPS building for facter
  Update ips ruby libdir to use sitelibdir instead of rubylibdir
Merge remote-tracking branch 'upstream/1.7.x' into 2.x

* upstream/1.7.x: (23 commits)
  install.rb doesn't support sbindir, so remove it from ips rules
  Turn on IPS building for facter
  Update ips ruby libdir to use sitelibdir instead of rubylibdir
  (#17493) Merge rescue blocks
  (#17493) Safer handling of EC2 'open' calls
  (Maint) Properly mock SunOS in test for manufacturer
  (#11612) Add support for processorX facts on HP-UX
  Revert "Merge pull request #202 from hkenney/ticket/master/3226_strip_whitespace_from_fact"
  Revert "Merge pull request #208 from hkenney/ticket/master/14469_strip_whitespace_from_frozen_strings"
  Revert "Merge pull request #204 from jeffweiss/ticket/master/11466_remove_duplicate_memorytotal_fact"
  Revert "Merge pull request #205 from jeffweiss/ticket/master/12147_remove_iphostnumber_fact"
  Update lib/facter/version.rb for 1.6.14
  #1415 updated ipaddress6_spec.rb and macaddress_spec.rb to reflect updated ifconfig STDERR redirect
  #1415 ifconfig_interface change.
  #1415 fixed the regex map
  ifconfig_interface should output its output
  #1415 added two methods and spec tests
  #1415 ip_spec.rb test added for linux_ifconfig_ib0
  #16005 Puppet agent generates ifconfig warnings on InfiniBand systems fix
  Handles ruby hanging of File.read of /sys/class/ with cat.
  ...

Conflicts:
	CHANGELOG
	lib/facter/util/config.rb
	lib/facter/version.rb
	spec/unit/util/config_spec.rb
	spec/unit/util/manufacturer_spec.rb

Using manufacturer_spec.rb test that stubs hardwareisa
Merge remote-tracking branch 'upstream/2.x'

* upstream/2.x:
  install.rb doesn't support sbindir, so remove it from ips rules
  Turn on IPS building for facter
  Update ips ruby libdir to use sitelibdir instead of rubylibdir
  (#17493) Merge rescue blocks
  (#17493) Safer handling of EC2 'open' calls
  (Maint) Properly mock SunOS in test for manufacturer

Conflicts:
	CHANGELOG
(#17177) Add MTU information to interfaces

add regex strings for linux bsd, and sunos to pull mtu information
add tests to confirm that information is valid
add the mtu label to interfaces.rb
Fixup whitespace in (#17177) Add MTU information to interfaces
(#17177) Fix spec failure when running on Mac OS X

Without this patch applied, the following example fails when run on Mac
OS X.  This patch fixes the failure by stubbing out the system call to
`ifconfig #{interface}` using fixture data.

    $ rspec -fp spec/unit/util/ip_spec.rb
    Failures:

      1) Facter::Util::IP should return mtu information on Linux
         Failure/Error: Facter::Util::IP.get_interface_value("eth0", "mtu").should == "1500"
           expected: "1500"
                got: nil (using ==)
         # ./spec/unit/util/ip_spec.rb:269:in `block (2 levels) in <top (required)>'
Merge branch 'jeff-ticket/1.6.x/17177_add_mtu_to_interfaces' into 1.6.x

* jeff-ticket/1.6.x/17177_add_mtu_to_interfaces:
  (#17177) Fix spec failure when running on Mac OS X
  Fixup whitespace in (#17177) Add MTU information to interfaces
  (#17177) Add MTU information to interfaces
Merge branch '1.6.x' into 1.7.x

* 1.6.x:
  (#17177) Fix spec failure when running on Mac OS X
  Fixup whitespace in (#17177) Add MTU information to interfaces
  (#17177) Add MTU information to interfaces
Merge branch '1.7.x' into 2.x

* 1.7.x:
  (#17177) Fix spec failure when running on Mac OS X
  Fixup whitespace in (#17177) Add MTU information to interfaces
  (#17177) Add MTU information to interfaces
Merge branch '2.x'

* 2.x:
  (#17177) Fix spec failure when running on Mac OS X
  Fixup whitespace in (#17177) Add MTU information to interfaces
  (#17177) Add MTU information to interfaces