(#11612) Add support for processorX facts on HP-UX

Without this patch applied, the processorX facts are not available on
HP-UX platforms.  This is a problem because the lack of these facts make
it difficult to write Puppet manifests that work on HP-UX and other
platforms like Linux that support the processorX facts.

These methods involve using machinfo when it is available, using
sched.models and getconf when machinfo is not available.  A suite of
RSpec tests are included as well as fixture files for four selected
examples of machinfo outputs, a sample sched.models file and unistd.h.
Merge branch 'alexharv074-ticket/1.6.x/11612_add_support_for_hpux_processor' into 1.6.x

* alexharv074-ticket/1.6.x/11612_add_support_for_hpux_processor:
  (#11612) Add support for processorX facts on HP-UX
(#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
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
(#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
(maint) Remove hard dependency on rspec from Rakefile

Rspec is currently required to run any rake tasks in Facter, or even to list
the available rake tasks. For users wishing to just build packages, this is a
high bar. This commit moves the rspec and rubygem requires into a begin/rescue
block so that loaderrors can be caught and ignored. It also moves the tasks
that are defined using Rspec::Core::RakeTask into a conditional on whether
Rspec::Core::RakeTask is available to use. This allows the rake tasks to be
listed and run without rspec installed.
Merge pull request #355 from haus/maint/1.6.x/remove_hard_rspec_dependency_from_rakefile

(maint) Remove hard dependency on rspec from Rakefile
Updating FACTERVERSION for 1.6.15-rc1
(#17840) Use enum_cpuinfo for x86 arch

Windows and Gentoo consider 32 bit x86 architectures to be called 'x86',
but this value was not handled when checking for processorcount
information. This patch adds x86 alongside the other synonyms for this
architecture.
Merge branch 'adrienthebo-ticket/1.6.x/17840-enum_cpuinfo-on-x86' into 1.6.x

* adrienthebo-ticket/1.6.x/17840-enum_cpuinfo-on-x86:
  (#17840) Use enum_cpuinfo for x86 arch
(maint) Remove processor_spec duplicate stubbing

The Facter::Util::Processor spec had a number of repeated stubs that
were merged with expectation blocks. This commit moves the expectations
into before blocks and uses example groups to scope the stubbing.
Merge branch 'adrienthebo-maint/1.6.x/processor_spec_stubs' into 1.6.x

* adrienthebo-maint/1.6.x/processor_spec_stubs:
  (maint) Remove processor_spec duplicate stubbing