|
|
37f8e75 |
# F-17 and above have ruby-1.9.x, and place libs in a different location
|
|
|
60fa8da |
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
|
|
|
37f8e75 |
%global facter_libdir %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["vendorlibdir"]')
|
|
|
37f8e75 |
%else
|
|
|
37f8e75 |
%global facter_libdir %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["sitelibdir"]')
|
|
|
37f8e75 |
%endif
|
|
|
37f8e75 |
|
|
|
3248c1b |
# Only enable checks on F-19, other releases fail for various reasons
|
|
|
3248c1b |
%if (0%{?fedora} >= 17 && 0%{?fedora} <= 19)
|
|
|
3248c1b |
%global enable_check 1
|
|
|
3248c1b |
%else
|
|
|
3248c1b |
%global enable_check 0
|
|
|
3248c1b |
%endif
|
|
|
3248c1b |
|
|
|
37f8e75 |
%global ruby_version %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["ruby_version"]')
|
|
|
d73ca20 |
|
|
|
4bf6c00 |
# There is nothing useful in debuginfo, facter is only an arch package to
|
|
|
4bf6c00 |
# allow arch-dependent requires.
|
|
|
4bf6c00 |
%global debug_package %{nil}
|
|
|
4bf6c00 |
|
|
|
d73ca20 |
Name: facter
|
|
Sam Kottler |
834655b |
Version: 2.0.1
|
|
|
60fa8da |
Release: 2%{?dist}
|
|
|
93f8b33 |
Summary: Command and ruby library for gathering system information
|
|
|
d73ca20 |
|
|
|
d73ca20 |
Group: System Environment/Base
|
|
|
d73ca20 |
License: ASL 2.0
|
|
|
f8a5566 |
URL: https://puppetlabs.com/%{name}
|
|
|
f8a5566 |
Source0: https://downloads.puppetlabs.com/%{name}/%{name}-%{version}.tar.gz
|
|
|
f8a5566 |
Source1: https://downloads.puppetlabs.com/%{name}/%{name}-%{version}.tar.gz.asc
|
|
|
d73ca20 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
d73ca20 |
|
|
|
7203964 |
BuildRequires: ruby >= 1.8.1
|
|
|
016b153 |
BuildRequires: ruby-devel
|
|
|
37f8e75 |
%if %{enable_check}
|
|
|
016b153 |
BuildRequires: net-tools
|
|
|
37f8e75 |
BuildRequires: rubygem(mocha)
|
|
|
37f8e75 |
BuildRequires: rubygem(rspec-core)
|
|
Michael Stahnke |
b0f6e35 |
BuildRequires: rubygem(rspec)
|
|
|
37f8e75 |
%endif
|
|
|
37f8e75 |
|
|
|
a900063 |
# dmidecode and pciutils are not available on all arches
|
|
|
a900063 |
%ifarch %ix86 x86_64 ia64
|
|
|
0d728e0 |
Requires: dmidecode
|
|
|
db090e7 |
Requires: pciutils
|
|
|
5361cc4 |
Requires: virt-what
|
|
|
a900063 |
%endif
|
|
|
a900063 |
Requires: net-tools
|
|
|
37f8e75 |
# Work around the lack of ruby in the default mock buildroot
|
|
|
37f8e75 |
%if "%{ruby_version}"
|
|
|
60fa8da |
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
|
|
|
5b79a33 |
Requires: ruby(release)
|
|
|
0ac8327 |
%else
|
|
|
0ac8327 |
Requires: ruby(abi) = %{ruby_version}
|
|
|
0ac8327 |
%endif
|
|
|
36ba453 |
%endif
|
|
|
7203964 |
Requires: which
|
|
|
60d8a30 |
|
|
|
8bbc9c7 |
%description
|
|
|
93f8b33 |
Facter is a lightweight program that gathers basic node information about the
|
|
|
93f8b33 |
hardware and operating system. Facter is especially useful for retrieving
|
|
|
93f8b33 |
things like operating system names, hardware characteristics, IP addresses, MAC
|
|
|
93f8b33 |
addresses, and SSH keys.
|
|
|
93f8b33 |
|
|
|
93f8b33 |
Facter is extensible and allows gathering of node information that may be
|
|
|
93f8b33 |
custom or site specific. It is easy to extend by including your own custom
|
|
|
93f8b33 |
facts. Facter can also be used to create conditional expressions in Puppet that
|
|
|
93f8b33 |
key off the values returned by facts.
|
|
|
60d8a30 |
|
|
|
60d8a30 |
%prep
|
|
|
60d8a30 |
%setup -q
|
|
|
d73ca20 |
|
|
|
60d8a30 |
%build
|
|
|
d73ca20 |
# Nothing to build
|
|
|
d73ca20 |
|
|
|
60d8a30 |
|
|
|
60d8a30 |
%install
|
|
|
60d8a30 |
rm -rf %{buildroot}
|
|
|
37f8e75 |
ruby install.rb --destdir=%{buildroot} --quick --no-rdoc --sitelibdir=%{facter_libdir}
|
|
|
37f8e75 |
|
|
|
e6aaf2a |
# Create directory for external facts
|
|
|
e6aaf2a |
mkdir -p %{buildroot}/%{_sysconfdir}/%{name}/facts.d
|
|
|
e6aaf2a |
|
|
|
d9094e4 |
%if ! (0%{?fedora} || 0%{?rhel} >= 7)
|
|
|
d9094e4 |
# Install man page, rubygem-rdoc is not available on older EL releases)
|
|
|
d9094e4 |
install -D -pv -m 644 man/man8/%{name}.8 %{buildroot}/%{_mandir}/man8/%{name}.8
|
|
|
d9094e4 |
%endif
|
|
|
d73ca20 |
|
|
|
2dee373 |
%postun
|
|
|
2dee373 |
# Work around issues where puppet fails to run after a facter update
|
|
|
2dee373 |
# https://bugzilla.redhat.com/806370
|
|
|
2dee373 |
# http://projects.puppetlabs.com/issues/12879
|
|
|
2dee373 |
if [ "$1" -ge 1 ]; then
|
|
|
2dee373 |
/sbin/service puppet condrestart >/dev/null 2>&1 || :
|
|
|
2dee373 |
fi
|
|
|
2dee373 |
|
|
|
2dee373 |
|
|
|
60d8a30 |
%clean
|
|
|
60d8a30 |
rm -rf %{buildroot}
|
|
|
60d8a30 |
|
|
|
37f8e75 |
|
|
|
016b153 |
%check
|
|
|
37f8e75 |
%if %{enable_check}
|
|
|
016b153 |
rspec spec
|
|
|
37f8e75 |
%endif
|
|
|
37f8e75 |
|
|
|
60d8a30 |
|
|
|
60d8a30 |
%files
|
|
|
60d8a30 |
%defattr(-,root,root,-)
|
|
Michael Stahnke |
b0f6e35 |
%doc LICENSE README.md
|
|
|
5bbf9b3 |
%{_bindir}/%{name}
|
|
|
e6aaf2a |
%{_sysconfdir}/%{name}
|
|
|
37f8e75 |
%{facter_libdir}/%{name}*
|
|
Michael Stahnke |
b0f6e35 |
%{_mandir}/man8/%{name}*
|
|
|
60d8a30 |
|
|
|
60d8a30 |
|
|
|
60d8a30 |
%changelog
|
|
|
60fa8da |
* Mon May 05 2014 Lubomir Rintel <lkundrak@v3.sk> - 2.0.1-2
|
|
|
60fa8da |
- Fix el7 conditionals as suggested by Orion Poplawski (BZ #1087946)
|
|
|
60fa8da |
|
|
Sam Kottler |
834655b |
* Tue Apr 29 2014 Sam Kottler <skottler@fedoraproject.org> - 2.0.1-1
|
|
Sam Kottler |
834655b |
- Update to to 2.0.1
|
|
Sam Kottler |
834655b |
|
|
|
f8a5566 |
* Tue Jan 28 2014 Todd Zullinger <tmz@pobox.com> - 1.7.4-1
|
|
|
f8a5566 |
- Update to 1.7.4
|
|
|
e6aaf2a |
- Create /etc/facter/facts.d for external facts
|
|
|
938d3cb |
- Send dmiddecode errors to /dev/null in the virtual fact (FACT-86)
|
|
|
f8a5566 |
|
|
Sam Kottler |
4bf7b20 |
* Tue Oct 8 2013 Sam Kottler <skottler@fedoraproject.org> - 1.7.3-1
|
|
|
5cf3e3a |
- Update to 1.7.3 (BZ #1016817)
|
|
Sam Kottler |
4bf7b20 |
|
|
|
0927490 |
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.18-5
|
|
|
0927490 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
0927490 |
|
|
Sam Kottler |
77e9ec3 |
* Fri Jun 21 2013 Sam Kottler <skottler@fedoraproject.org> 1.6.18-4
|
|
Sam Kottler |
77e9ec3 |
- Apply upstream patch to ensure the first non-127.0.0.1 interface
|
|
Sam Kottler |
77e9ec3 |
|
|
|
4b98da9 |
* Wed Apr 03 2013 Todd Zullinger <tmz@pobox.com> - 1.6.18-3
|
|
|
4b98da9 |
- Avoid warnings when virt-what produces no output
|
|
|
4b98da9 |
|
|
|
be66d28 |
* Tue Apr 02 2013 Todd Zullinger <tmz@pobox.com> - 1.6.18-2
|
|
|
be66d28 |
- Apply upstream patch to filter virt-what warnings from virtual fact
|
|
|
be66d28 |
|
|
|
996e198 |
* Mon Mar 18 2013 Todd Zullinger <tmz@pobox.com> - 1.6.18-1
|
|
|
996e198 |
- Update to 1.6.18
|
|
|
2dee373 |
- Restart puppet in %%postun (#806370)
|
|
|
5361cc4 |
- Require virt-what for improved KVM detection (#905592)
|
|
|
d9094e4 |
- Ensure man page is installed on EL < 7
|
|
|
996e198 |
|
|
|
5b79a33 |
* Tue Mar 12 2013 Vít Ondruch <vondruch@redhat.com> - 1.6.17-2
|
|
|
5b79a33 |
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
|
|
|
5b79a33 |
|
|
Jeroen van Meeuwen (Ergo Project) |
2d66dc7 |
* Mon Feb 25 2013 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 1.6.17-1
|
|
Jeroen van Meeuwen (Ergo Project) |
2d66dc7 |
- New upstream version, fixes rhbz #892734
|
|
Jeroen van Meeuwen (Ergo Project) |
2d66dc7 |
|
|
|
1f7fcdc |
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.16-2
|
|
|
1f7fcdc |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
1f7fcdc |
|
|
Michael Stahnke |
b2df44b |
* Tue Dec 04 2012 Michael Stahnke <stahnma@puppetlabs.com> - 1.6.16-1
|
|
Michael Stahnke |
b2df44b |
- Update to 1.6.16
|
|
Michael Stahnke |
b2df44b |
|
|
Michael Stahnke |
9f88c86 |
* Wed Nov 28 2012 Michael Stahnke <stahnma@puppetlabs.com> - 1.6.15-1
|
|
Michael Stahnke |
9f88c86 |
- Rebase to 1.6.15
|
|
Michael Stahnke |
9f88c86 |
- Put asc file back as Source1
|
|
Michael Stahnke |
6269ce9 |
|
|
Michael Stahnke |
9f88c86 |
* Fri Nov 09 2012 Michael Stahnke <stahnma@puppetlabs.com> - 1.6.13-2
|
|
Michael Stahnke |
9f88c86 |
- Add patch for ec2 fix
|
|
Michael Stahnke |
b0f6e35 |
- Rebase to 1.6.14 via bz 871211
|
|
Michael Stahnke |
b0f6e35 |
|
|
Michael Stahnke |
9f88c86 |
* Mon Oct 29 2012 Michael Stahnke <stahnma@puppetlabs.com> - 1.6.13-1
|
|
Michael Stahnke |
9f88c86 |
- Rebase to 1.6.13
|
|
Michael Stahnke |
9f88c86 |
|
|
|
2419cdc |
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.6-2
|
|
|
2419cdc |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
2419cdc |
|
|
|
7f8ab51 |
* Mon Mar 05 2012 Todd Zullinger <tmz@pobox.com> - 1.6.6-1
|
|
|
7f8ab51 |
- Update to 1.6.6
|
|
|
7f8ab51 |
|
|
|
4bf6c00 |
* Sun Feb 19 2012 Todd Zullinger <tmz@pobox.com> - 1.6.5-5
|
|
|
4bf6c00 |
- Disable useless debuginfo generation (#795106, thanks to Ville Skyttä)
|
|
|
93f8b33 |
- Update summary and description
|
|
|
bdbe815 |
- Remove INSTALL from %%doc
|
|
|
4bf6c00 |
|
|
|
4724633 |
* Wed Feb 15 2012 Todd Zullinger <tmz@pobox.com> - 1.6.5-4
|
|
Michael Stahnke |
b0f6e35 |
- Only run rspec checks on Fedora >= 17
|
|
|
4724633 |
|
|
|
37f8e75 |
* Mon Feb 13 2012 Todd Zullinger <tmz@pobox.com> - 1.6.5-3
|
|
|
37f8e75 |
- Make spec file work for EPEL and Fedora
|
|
|
a900063 |
- Drop BuildArch: noarch and make dmidecode/pciutils deps arch-specific
|
|
|
e9d4214 |
- Make ec2 facts work on CentOS again (#790849, thanks to Jeremy Katz)
|
|
|
d0469a4 |
- Preserve timestamps when installing files
|
|
|
37f8e75 |
|
|
|
016b153 |
* Thu Feb 02 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.6.5-2
|
|
|
016b153 |
- Rebuilt for Ruby 1.9.3.
|
|
|
016b153 |
|
|
|
dc1c3db |
* Thu Jan 26 2012 Todd Zullinger <tmz@pobox.com> - 1.6.5-1
|
|
|
dc1c3db |
- Update to 1.6.5
|
|
|
db090e7 |
- Require net-tools and pciutils, thanks to Dominic Cleal (#783749)
|
|
|
dc1c3db |
|
|
|
b34253b |
* Thu Jan 05 2012 Todd Zullinger <tmz@pobox.com> - 1.6.4-1
|
|
|
b34253b |
- Update to 1.6.4
|
|
|
0d728e0 |
- Require dmidecode (upstream #11041)
|
|
|
b34253b |
|
|
|
56521c2 |
* Sat Oct 15 2011 Todd Zullinger <tmz@pobox.com> - 1.6.2-1
|
|
|
56521c2 |
- Update to 1.6.2
|
|
|
56521c2 |
- Update source URL
|
|
|
56521c2 |
|
|
|
5011849 |
* Thu Sep 29 2011 Todd Zullinger <tmz@pobox.com> - 1.6.1-1
|
|
|
5011849 |
- Update to 1.6.1
|
|
|
d73ca20 |
- Minor spec file reformatting
|
|
|
5011849 |
|
|
|
6caf3cc |
* Wed Jul 27 2011 Todd Zullinger <tmz@pobox.com> - 1.6.0-2
|
|
|
6caf3cc |
- Update license tag, GPLv2+ -> ASL 2.0
|
|
|
6caf3cc |
|
|
|
5bbf9b3 |
* Thu Jul 14 2011 Todd Zullinger <tmz@pobox.com> - 1.6.0-1
|
|
|
5bbf9b3 |
- Update to 1.6.0
|
|
|
5bbf9b3 |
|
|
|
29c963e |
* Thu May 26 2011 Todd Zullinger <tmz@pobox.com> - 1.5.9-1
|
|
|
29c963e |
- Update to 1.5.9
|
|
|
8a3ff98 |
- Improve Scientific Linux support, courtesy of Orion Poplawski (upstream #7682)
|
|
|
29c963e |
|
|
|
c85c962 |
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.8-2
|
|
|
c85c962 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
c85c962 |
|
|
|
3a4165f |
* Sat Aug 28 2010 Todd Zullinger <tmz@pobox.com> - 1.5.8-1
|
|
|
3a4165f |
- Update to 1.5.8
|
|
|
3a4165f |
|
|
|
9a06064 |
* Fri Sep 25 2009 Todd Zullinger <tmz@pobox.com> - 1.5.7-1
|
|
|
9a06064 |
- Update to 1.5.7
|
|
|
9a06064 |
- Update #508037 patch from upstream ticket
|
|
|
9a06064 |
|
|
|
b184706 |
* Wed Aug 12 2009 Jeroen van Meeuwen <j.van.meeuwen@ogd.nl> - 1.5.5-3
|
|
|
b184706 |
- Fix #508037 or upstream #2355
|
|
|
b184706 |
|
|
|
aeee2a5 |
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.5-2
|
|
|
aeee2a5 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
|
|
aeee2a5 |
|
|
|
a737b88 |
* Fri May 22 2009 Todd Zullinger <tmz@pobox.com> - 1.5.5-1
|
|
|
a737b88 |
- Update to 1.5.5
|
|
|
a737b88 |
- Drop upstreamed libperms patch
|
|
|
a737b88 |
|
|
|
a175f4f |
* Sat Feb 28 2009 Todd Zullinger <tmz@pobox.com> - 1.5.4-1
|
|
|
a175f4f |
- New version
|
|
|
a175f4f |
- Use upstream install script
|
|
|
a175f4f |
|
|
|
8cb7792 |
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-2
|
|
|
8cb7792 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
|
|
8cb7792 |
|
|
|
b78f24f |
* Tue Sep 09 2008 Todd Zullinger <tmz@pobox.com> - 1.5.2-1
|
|
|
b78f24f |
- New version
|
|
|
b78f24f |
- Simplify spec file checking for Fedora and RHEL versions
|
|
|
b78f24f |
|
|
|
15e52d2 |
* Mon Sep 8 2008 David Lutterkort <dlutter@redhat.com> - 1.5.1-1
|
|
|
15e52d2 |
- New version
|
|
|
15e52d2 |
|
|
|
5658ac8 |
* Thu Jul 17 2008 David Lutterkort <dlutter@redhat.com> - 1.5.0-3
|
|
|
5658ac8 |
- Change 'mkdir' in install to 'mkdir -p'
|
|
|
5658ac8 |
|
|
|
8bbc9c7 |
* Thu Jul 17 2008 David Lutterkort <dlutter@redhat.com> - 1.5.0-2
|
|
|
8bbc9c7 |
- Remove files that were listed twice in files section
|
|
|
8bbc9c7 |
|
|
|
8bbc9c7 |
* Mon May 19 2008 James Turnbull <james@lovedthanlosty.net> - 1.5.0-1
|
|
|
8bbc9c7 |
- New version
|
|
|
8bbc9c7 |
- Added util and plist files
|
|
|
8bbc9c7 |
|
|
|
adbd442 |
* Mon Sep 24 2007 David Lutterkort <dlutter@redhat.com> - 1.3.8-1
|
|
|
adbd442 |
- Update license tag
|
|
|
adbd442 |
- Copy all of lib/ into ruby_sitelibdir
|
|
|
adbd442 |
|
|
|
19d0129 |
* Thu Mar 29 2007 David Lutterkort <dlutter@redhat.com> - 1.3.7-1
|
|
|
19d0129 |
- New version
|
|
|
19d0129 |
|
|
|
befe4b0 |
* Fri Jan 19 2007 David Lutterkort <dlutter@redhat.com> - 1.3.6-1
|
|
|
befe4b0 |
- New version
|
|
|
befe4b0 |
|
|
|
36ba453 |
* Thu Jan 18 2007 David Lutterkort <dlutter@redhat.com> - 1.3.5-3
|
|
|
36ba453 |
- require which; facter is very unhappy without it
|
|
|
36ba453 |
|
|
|
36ba453 |
* Mon Nov 20 2006 David Lutterkort <dlutter@redhat.com> - 1.3.5-2
|
|
|
36ba453 |
- Make require ruby(abi) and buildarch: noarch conditional for fedora 5 or
|
|
|
36ba453 |
later to allow building on older fedora releases
|
|
|
36ba453 |
|
|
|
c11f21b |
* Tue Oct 10 2006 David Lutterkort <dlutter@redhat.com> - 1.3.5-1
|
|
|
c11f21b |
- New version
|
|
|
c11f21b |
|
|
|
c11f21b |
* Tue Sep 26 2006 David Lutterkort <dlutter@redhat.com> - 1.3.4-1
|
|
|
c11f21b |
- New version
|
|
|
c11f21b |
|
|
|
f252448 |
* Wed Sep 13 2006 David Lutterkort <dlutter@redhat.com> - 1.3.3-2
|
|
|
f252448 |
- Rebuilt for FC6
|
|
|
f252448 |
|
|
|
60d8a30 |
* Wed Jun 28 2006 David Lutterkort <dlutter@redhat.com> - 1.3.3-1
|
|
|
60d8a30 |
- Rebuilt
|
|
|
60d8a30 |
|
|
|
60d8a30 |
* Fri Jun 19 2006 Luke Kanies <luke@madstop.com> - 1.3.0-1
|
|
|
60d8a30 |
- Fixed spec file to work again with the extra memory and processor files.
|
|
|
60d8a30 |
- Require ruby(abi). Build as noarch
|
|
|
60d8a30 |
|
|
|
60d8a30 |
* Fri Jun 9 2006 Luke Kanies <luke@madstop.com> - 1.3.0-1
|
|
|
60d8a30 |
- Added memory.rb and processor.rb
|
|
|
60d8a30 |
|
|
|
60d8a30 |
* Mon Apr 17 2006 David Lutterkort <dlutter@redhat.com> - 1.1.4-4
|
|
|
60d8a30 |
- Rebuilt with changed upstream tarball
|
|
|
60d8a30 |
|
|
|
60d8a30 |
* Tue Mar 21 2006 David Lutterkort <dlutter@redhat.com> - 1.1.4-3
|
|
|
60d8a30 |
- Do not rely on install.rb, it will be deleted upstream
|
|
|
60d8a30 |
|
|
|
60d8a30 |
* Mon Mar 13 2006 David Lutterkort <dlutter@redhat.com> - 1.1.4-2
|
|
|
60d8a30 |
- Commented out noarch; requires fix for bz184199
|
|
|
60d8a30 |
|
|
|
60d8a30 |
* Mon Mar 6 2006 David Lutterkort <dlutter@redhat.com> - 1.1.4-1
|
|
|
60d8a30 |
- Removed unused macros
|
|
|
60d8a30 |
|
|
|
60d8a30 |
* Mon Feb 6 2006 David Lutterkort <dlutter@redhat.com> - 1.1.1-2
|
|
|
60d8a30 |
- Fix BuildRoot. Add dist to release tag
|
|
|
60d8a30 |
|
|
|
60d8a30 |
* Wed Jan 11 2006 David Lutterkort <dlutter@redhat.com> - 1.1.1-1
|
|
|
60d8a30 |
- Initial build.
|