According to the SunOS man page on flock:

	flock() applies or removes an advisory lock on the file associ-
     ated with the file descriptor fd. The compatibility version of
     flock() has been implemented on top of fcntl(2) locking.  It does
     not provide complete binary compatibility

This lack of binary compatibility results in some odd behavior when
running salt-master on a SunOS/SmartOS host. Specifically an IOError
[Errno 9] is thrown whenever the master calls the file_hash method.

Specifically it has to do with the fact that on SunOS/SmartOS the lock
is released when the file is closed,  whereas in Linux the lock is kept
until it is released. An article discussing the problem in detail can be
found here:

http://infinitesque.net/articles/2010/on%20Python%20flock/index.html

To get this working I changed salt/fileserver/roots.py to check os.uname()
to make sure it's not a SunOS host when setting HAS_FCNTL. Comments indicate
Windows shouldn't have this set either.
Merge pull request #10220 from s0undt3ch/2014.1

2014.1 Transifex and #10198 test case
Merge pull request #10218 from nshalman/fix-solaris-fcntl-2014.1

cherry-pick #10093 onto 2014.1 branch
pkgng: add with_origin option to list_pkgs()

This adds a new option to list_pkgs() which, if True, will return a more
complex data structure containing both the origin and version for each
package.
freebsdpkg: add with_origin option to list_pkgs()

This adds a new option to list_pkgs() which, if True, will return a more
complex data structure containing both the origin and version for each
package.
Fix ports.installed state for pkg names that don't match origin

This fixes a bug where ports.installed states report failure to install,
due to the package name not matching the name of the port. For example,
if installing www/mod_perl2 for use with www/apache22, this results in a
package name of ap22-mod_perl2. The ports.installed state thinks the
install failed because of this package name mismatch.

This fix checks the origin names of installed packages, instead of the
name of the package itself.
pkgng: Add with_origin argument to version()
freebsdpkg: Add with_origin argument to version()