diff options
author | Benedikt Boehm <hollow@gentoo.org> | 2010-03-12 07:56:26 +0000 |
---|---|---|
committer | Benedikt Boehm <hollow@gentoo.org> | 2010-03-12 07:56:26 +0000 |
commit | e5189eb826b20ae198189aba03503a5a3aef107e (patch) | |
tree | e31642c94fbd4aac355001766cddf936ce2d5826 /dev-ruby/facter | |
parent | Version Bump (diff) | |
download | historical-e5189eb826b20ae198189aba03503a5a3aef107e.tar.gz historical-e5189eb826b20ae198189aba03503a5a3aef107e.tar.bz2 historical-e5189eb826b20ae198189aba03503a5a3aef107e.zip |
backport FQDN patch from upstream
Package-Manager: portage-2.2_rc63/cvs/Linux i686
Diffstat (limited to 'dev-ruby/facter')
-rw-r--r-- | dev-ruby/facter/ChangeLog | 6 | ||||
-rw-r--r-- | dev-ruby/facter/Manifest | 5 | ||||
-rw-r--r-- | dev-ruby/facter/facter-1.5.7.ebuild | 8 | ||||
-rw-r--r-- | dev-ruby/facter/files/facter-1.5.7-fqdn.patch | 70 |
4 files changed, 85 insertions, 4 deletions
diff --git a/dev-ruby/facter/ChangeLog b/dev-ruby/facter/ChangeLog index 60a4e3d59f6d..143277ed825d 100644 --- a/dev-ruby/facter/ChangeLog +++ b/dev-ruby/facter/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-ruby/facter # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/facter/ChangeLog,v 1.22 2010/02/25 21:58:23 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/facter/ChangeLog,v 1.23 2010/03/12 07:56:25 hollow Exp $ + + 12 Mar 2010; Benedikt Böhm <hollow@gentoo.org> facter-1.5.7.ebuild, + +files/facter-1.5.7-fqdn.patch: + backport FQDN patch from upstream 25 Feb 2010; Fabian Groffen <grobian@gentoo.org> facter-1.5.7.ebuild: Marked ~x64-macos, thanks Ramon van Alteren, bug #305367 diff --git a/dev-ruby/facter/Manifest b/dev-ruby/facter/Manifest index 7518c4b851aa..72467fb36325 100644 --- a/dev-ruby/facter/Manifest +++ b/dev-ruby/facter/Manifest @@ -1,9 +1,10 @@ AUX facter-1.5.2-virtual.patch 953 RMD160 3dfecee1c84e11679c3787b57d1d8dbf7abf7950 SHA1 6bd4783ac9445bf9f6b78fea0123ddfc7773e1d3 SHA256 ec6d004544ae30cad301e15bb01366872d8b937e6c009743449a005481309c31 +AUX facter-1.5.7-fqdn.patch 2543 RMD160 af1a66178ffc471ecdb7a63adf486a0ba87cea97 SHA1 92502adcc136b1d94ff4888fc0bf740c56c68e9c SHA256 45023c1d89d16bf2d7b34b8017d9307155938d178baae8bd6b65d7af662aee45 DIST facter-1.5.2.tgz 48857 RMD160 0574f2cc4a934c0f4cd1a8e2d8a0554002ea1f31 SHA1 2fc1ce89b3fc0041a072b4c7899cd805d9572ffe SHA256 b9d0dda8e35028f0d56bcc8951a86b2143169174545a2fb0818054e7f88085a9 DIST facter-1.5.6.tar.gz 66356 RMD160 c0dbe660aae09758290230b6264d2ee18a072fef SHA1 a48d7e6e86199db16a647343e0dc05e143f00db4 SHA256 54caf94e3d429a39c29632919e7926636685682c69113585673136701dfc2b4c DIST facter-1.5.7.tar.gz 73343 RMD160 98855a5129868a3d695c45daf80f8badaa90c566 SHA1 d904d1d02341d12df5ae8183f5552bd7fab18be6 SHA256 87723af2e73def42c04c8e2d1e728e5749ac9fabea8c681ebb5b46f2096329e0 EBUILD facter-1.5.2-r1.ebuild 723 RMD160 517856dcd93e795c3c4d40cc9694b5cab97a2f81 SHA1 428bff19872422529c42207b8a76c17f78437bff SHA256 f2f47e562961a704813bd8e3d99f561288dbda96ebd4745a8288a5d5f9e3de46 EBUILD facter-1.5.6.ebuild 702 RMD160 b7fd31b18a499608c2f9e18ce24cb04a7801dda5 SHA1 4b315b67bce0cdd49712c20e521f89d1b44eb9f8 SHA256 18e3a4684ec8bed1a2ac7d118c04baac20d31d962ce50543d18df56f904c71f5 -EBUILD facter-1.5.7.ebuild 715 RMD160 e7c2027507ada018980179ddf78d69440550c52f SHA1 91e6f4627f1b08627e7b56bb473de089abc0997d SHA256 6df7a16df1abd93a3382e6f1455c0020ec71b115c98ee7d2fa5e9cbe498d552b -MISC ChangeLog 2898 RMD160 705fc4011137004f46b1efe8f0096dcc9ef65f27 SHA1 67f6600e7344632eab653390d7b4e57ec27658ed SHA256 251ae4be1451222d2fe9cff40ff1dbfbdbf8d20fd8c055e92ff17fbc2de84a0d +EBUILD facter-1.5.7.ebuild 788 RMD160 db01a64f02afb370f7bd6039e2127102383cee3a SHA1 696baa485821482bcbd716fe4d14a41a5ea91562 SHA256 643bcac67179206d7e00dafbbf34a5b8e5d3e13fa05b7fee38ad776dc69cab22 +MISC ChangeLog 3039 RMD160 531ee6ca53e7309984d01254551eb79628826565 SHA1 d86ec1c6a818bfcb23bc85b9fdeef12d96a01b34 SHA256 f32d27f3882ffed145d2b547524f433f56a17b95033c8a2760e60ed0f464eb88 MISC metadata.xml 222 RMD160 23efe87c16ebc9fbeb91e894ab372cc3bb66bc49 SHA1 a5d1e2317ae207bbd664aebe986687948fdd984a SHA256 38ef3457fd14e6872985f0e100fde79d0b8a9dbc4fc39ceef780c8c5abc5f337 diff --git a/dev-ruby/facter/facter-1.5.7.ebuild b/dev-ruby/facter/facter-1.5.7.ebuild index 6ddf9a7dd5ef..e8ca5c310f52 100644 --- a/dev-ruby/facter/facter-1.5.7.ebuild +++ b/dev-ruby/facter/facter-1.5.7.ebuild @@ -1,6 +1,8 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/facter/facter-1.5.7.ebuild,v 1.2 2010/02/25 21:58:23 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/facter/facter-1.5.7.ebuild,v 1.3 2010/03/12 07:56:25 hollow Exp $ + +EAPI="2" inherit ruby @@ -15,6 +17,10 @@ KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64 USE_RUBY="ruby18" +src_prepare() { + epatch "${FILESDIR}"/${PN}-1.5.7-fqdn.patch +} + src_compile() { : } diff --git a/dev-ruby/facter/files/facter-1.5.7-fqdn.patch b/dev-ruby/facter/files/facter-1.5.7-fqdn.patch new file mode 100644 index 000000000000..685e8c0ef9ce --- /dev/null +++ b/dev-ruby/facter/files/facter-1.5.7-fqdn.patch @@ -0,0 +1,70 @@ +commit dca615c98b864d75e2ac5899d98d04a2bd979eba +Author: Ohad Levy <ohad.levy@infineon.com> +Date: Mon Jan 18 10:42:43 2010 +0800 + + fixes #2573, #2085, #1291 - fixes domain and fqdn facts resolution + + This patch removes the relationship between the domain fact and LDAP/NIS domains. + domain fact relates to DNS domain - this will avoid the confusion caused + by the LDAP/NIS domain (which might be different to the DNS domain name). + Additionally, if hostname is already in long form, it won't try to build + the fqdn fact from hostname and domain. + +diff --git a/lib/facter/domain.rb b/lib/facter/domain.rb +index b1bba4d..5dfead0 100644 +--- a/lib/facter/domain.rb ++++ b/lib/facter/domain.rb +@@ -4,14 +4,14 @@ Facter.add(:domain) do + # steps is important + + Facter.value(:hostname) +- next $domain if defined? $domain and ! $domain.nil? ++ # try to fetch the domain from hostname if long hostname is used. ++ if defined? $fqdn and $fqdn =~ /^([\w-]+)\.(.+)$/ ++ next $2 ++ end + + domain = Facter::Util::Resolution.exec('dnsdomainname') + next domain if domain =~ /.+\..+/ + +- domain = Facter::Util::Resolution.exec('domainname') +- next domain if domain =~ /.+\..+/ +- + if FileTest.exists?("/etc/resolv.conf") + domain = nil + search = nil +diff --git a/lib/facter/fqdn.rb b/lib/facter/fqdn.rb +index 5ebc5f5..6271995 100644 +--- a/lib/facter/fqdn.rb ++++ b/lib/facter/fqdn.rb +@@ -1,5 +1,9 @@ + Facter.add(:fqdn) do + setcode do ++ # try to fetch the fqdn from hostname if long hostname is used. ++ Facter.value(:hostname) ++ next $fqdn if defined? $fqdn and ! $fqdn.nil? ++ + host = Facter.value(:hostname) + domain = Facter.value(:domain) + if host and domain +diff --git a/lib/facter/hostname.rb b/lib/facter/hostname.rb +index 188efa4..c3ca968 100644 +--- a/lib/facter/hostname.rb ++++ b/lib/facter/hostname.rb +@@ -1,12 +1,13 @@ + Facter.add(:hostname, :ldapname => "cn") do + setcode do ++ require 'socket' + hostname = nil +- name = Facter::Util::Resolution.exec('hostname') or nil ++ name = Socket.gethostbyname(Socket.gethostname).first + if name + if name =~ /^([\w-]+)\.(.+)$/ + hostname = $1 +- # the Domain class uses this +- $domain = $2 ++ # the FQDN/Domain facts use this ++ $fqdn = name + else + hostname = name + end |