(#22334) Use Facter's logging system for warn

Several points in facter would use ruby's built in warn method, which
always prints to stderr. This made unstoppable messages show up on the
stderr such as:

  [vagrant@localhost ~]$ facter virtual
  Could not retrieve virtual: Permission denied - /sys/firmware/dmi/entries/1-0/raw
  virtualbox

By using facter's normal logging system, the user has control of these
showing up and they won't end up in stderr (which might be going nowhere
in a daemonized process).
Merge pull request #529 from zaphod42/issue/stable/22334-logging-to-stderr

(#22334) Use Facter's logging system for warn
(#22349) Read from user's home when non-root

The external facts directory always assumed that the user was root, or
at least had read access to the global facts.d directory. This created
problems for users with restricted permissions when running as non-root.
Instead of trying to handle the permissions problem, which would have
made facter run, this changes facter to follow the same non-root style
as puppet, which is to look in the home directory for a .facter/facts.d
external facts directory. Simply handling the error would have had two
undesirable consequences: 1) it would have hidden a problem from the
user and 2) it would have made external facts cumbersome to use as
non-root as the user would always have to specify --external-dir, which
is not currently possible when facter is used by puppet.
Merge branch 'issue/stable/22349-facter-as-non-root' into stable

* issue/stable/22349-facter-as-non-root:
  (#22349) Read from user's home when non-root
Maint: Only try to install json gem for ruby 1.8

The json gem contains native code, so a compiler must be present in
order to install the gem (bundle install). On Windows, we intentionally
do not install the devkit, mainly for security reasons.

However, the json gem is only required when running ruby 1.8, so we
confine the Gemfile accordingly. This resolves the issue on Windows,
because we only support ruby 1.9 on that platform.
(#22349) Qualify WinBuiltinAdministratorsSid constant

Previously, we were getting a NameError when trying to resolve the
WinBuiltinAdministratorsSid constant, though it seems to be load order
dependent.
(packaging) Update FACTERVERSION to 1.7.3
Merge branch 'release/1.7.3' into stable

* release/1.7.3:
  (packaging) Update FACTERVERSION to 1.7.3
Maint: Don't try to install json gem on Windows

Previously, `bundle install` would fail on windows without the ruby devkit
installed. As this is not something we ship with, confine the gem to only be
installed on ruby platforms, i.e. not windows.

Also running `bundle install --without development test` followed by `bundle
exec facter` on all platforms would fail due to `facter` being in the
development/test group.
(#20301) Handle different error in ruby 1.9

The NumberOfLogicalProcessor property of the Win32_Processor WMI class
does not exist in the base win2003 install. Previously, we were trying
to access the property, and then catching the resulting error if the
property did not exist.

In ruby 1.8, it would raise a RuntimeError, but in ruby 1.9, it raises a
StandardError, causing the fact to blow up on ruby 1.9.

This commit checks to see if the process object responds to that method,
and only then does it try to call it.
Merge remote-tracking branch 'upstream/1.6.x' into stable

* upstream/1.6.x:
  (#20301) Handle different error in ruby 1.9
  Maint: Don't try to install json gem on Windows
(#16081) Facter reports bogus arch on AIX

Without this patch applied facter reports the hardware model of the system rather than the processor architecture.

For example,

root@l488pp139_pub[/software/pe-aix/init] > /opt/puppet/bin/facter
architecture => IBM,9179-MHB

With the patch, the architecture for this system is:

l488pp056_pub > facter architecture
PowerPC_POWER7

while the hardwaremodel remains:

l488pp056_pub > facter hardwaremodel
IBM,9179-MHB
Merge branch 'pull-532' into stable

This closes GH-532.
(#12504) Read correct file for operatingsystemrelase on Ubuntu
(#12504) Read non-configurable file for operatingsystemrelease on Ubuntu

Without this patch, the operatingsystemrelease for Ubuntu is gathered by
parsing /etc/issue. This is a problem as /etc/issue is meant to have
configurable content to optionally be displayed when logging in to a
system. This patch uses /etc/lsb-release which is meant to have static
data describing the release version.
Merge branch 'pull-534' into stable

This closes GH-534
(#22619) Error when NetConnectionId is missing

When someone is using something like failover clustering, an adapter
configuration is created and set to IPEnabled but the underlying network
adapter is set to NetEnabled=False. Further, the NetConnectionId is empty and
causes facter to error. This adds a check to remove items where the adapter
itself is NetEnabled=False as well. This also adds a check to not add empty or
nil items to the list of interfaces.
(#21604) Detect xen virtual fact on windows
(maint) Refactor windows virtual fact for readability
(22651) add fixture access methods for example /proc/cpuinfo files

A common set of access methods for fixture example `/proc/cpuinfo` files
named `FacterSpec::Cpuinfo#cpuinfo_fixtures`
`FacterSpec::Cpuinfo#cpuinfo_fixture_read` and
`FacterSpec::Cpuinfo#cpuinfo_fixture_readlines`