603629
%if 0%{?rhel} && 0%{?rhel} <= 7
603629
%global boost_suffix 169
603629
%global cmake_suffix 3
603629
%global cmake %%cmake%{?cmake_suffix}
603629
%endif
603629
603629
%if 0%{?rhel} && 0%{?rhel} >= 7 && !0%{?epel}
603629
%global has_epoch 1
603629
%endif
603629
603629
603629
Name:           facter
603629
Version:        3.14.19
603629
Release:        1%{?dist}
603629
%if 0%{?has_epoch}
603629
Epoch:          1
603629
%endif
603629
Summary:        Command and ruby library for gathering system information
603629
603629
License:        ASL 2.0
603629
URL:            https://puppetlabs.com/facter
603629
Source0:        https://downloads.puppetlabs.com/%{name}/%{name}-%{version}.tar.gz
603629
Source1:        https://downloads.puppetlabs.com/%{name}/%{name}-%{version}.tar.gz.asc
603629
Patch0:         shared_cpp_hcon.patch
603629
Patch1:         %{name}-gcc11.patch
603629
603629
BuildRequires:  gnupg2
603629
BuildRequires:  cmake%{?cmake_suffix}
603629
BuildRequires:  make
603629
BuildRequires:  gcc-c++
603629
BuildRequires:  libcurl-devel
603629
BuildRequires:  leatherman-devel
603629
BuildRequires:  boost%{?boost_suffix}-devel
603629
BuildRequires:  ruby-devel >= 1.9
603629
BuildRequires:  yaml-cpp-devel
603629
BuildRequires:  openssl-devel
603629
BuildRequires:  libblkid-devel
603629
BuildRequires:  cpp-hocon-devel
2897c1
BuildRequires:  catch1-devel
603629
#BuildRequires:  whereami-devel
603629
603629
# autoreq is not picking this one up so be specific
603629
Requires: leatherman%{?_isa}
603629
603629
%package devel
603629
Summary:        Development libraries for building against facter
603629
Requires:       %{name}%{?_isa} = %{?has_epoch:1:}%{version}-%{release}
603629
603629
%package -n ruby-%{name}
603629
Summary:        Ruby bindings for facter
603629
Requires:       %{name}%{?_isa} = %{?has_epoch:1:}%{version}-%{release}
603629
Requires:       ruby%{?_isa}
603629
603629
%description
603629
Facter is a lightweight program that gathers basic node information about the
603629
hardware and operating system. Facter is especially useful for retrieving
603629
things like operating system names, hardware characteristics, IP addresses, MAC
603629
addresses, and SSH keys.
603629
603629
Facter is extensible and allows gathering of node information that may be
603629
custom or site specific. It is easy to extend by including your own custom
603629
facts. Facter can also be used to create conditional expressions in Puppet that
603629
key off the values returned by facts.
603629
603629
%description devel
603629
The headers to link against libfacter in other applications.
603629
603629
%description -n ruby-%{name}
603629
The ruby bindings for libfacter.
603629
603629
%prep
603629
%autosetup -p1
0167e1
# Do not use the catch vendored in leatherman
0167e1
sed -r -i 's/(LEATHERMAN_COMPONENTS)(\b.+)?(\bcatch\b)/\1\2/' CMakeLists.txt
0167e1
sed -r -i 's|\$\{LEATHERMAN_CATCH_INCLUDE\}|"%{_includedir}/catch"|' \
0167e1
    lib/tests/CMakeLists.txt
603629
603629
%build
603629
%cmake . -B%{_target_platform} \
603629
  -DBOOST_INCLUDEDIR=%{_includedir}/boost%{?boost_suffix} \
603629
  -DBOOST_LIBRARYDIR=%{_libdir}/boost%{?boost_suffix} \
603629
  -DLeatherman_DIR=%{_libdir}/cmake%{?cmake_suffix}/leatherman \
603629
  -DCMAKE_BUILD_TYPE=RelWithDebInfo \
603629
  %{nil}
603629
%make_build -C %{_target_platform}
603629
603629
%install
603629
%make_install -C %{_target_platform}
603629
603629
%check
603629
# Tests depend too much on environment
603629
# 1: -------------------------------------------------------------------------------
603629
# 1: Scenario: using the filesystem resolver
603629
# 1:       When: populating facts
603629
# 1:       Then: non-tmpfs mounts should exist
603629
# 1: -------------------------------------------------------------------------------
603629
# 1: /builddir/build/BUILD/facter-3.14.2/lib/tests/facts/linux/filesystem_resolver.cc:37
603629
# 1: ...............................................................................
603629
# 1: 
603629
# 1: /builddir/build/BUILD/facter-3.14.2/lib/tests/facts/linux/filesystem_resolver.cc:38: FAILED:
603629
# 1:   REQUIRE( facts.query<facter::facts::map_value>("mountpoints./") )
603629
# 1: with expansion:
603629
# 1:   NULL
603629
#make_build -C %{_target_platform} test
603629
603629
%files
603629
%license LICENSE
603629
%doc README.md
603629
%{_bindir}/%{name}
603629
# Note that leatherman has a hardcoded libfacter.so path for the installation
603629
# of the library for the bindings: https://tickets.puppetlabs.com/browse/FACT-1772
603629
%{_libdir}/lib%{name}.so.*
603629
%{_libdir}/lib%{name}.so
603629
%{_mandir}/man8/%{name}*
603629
603629
%files devel
603629
%{_includedir}/%{name}/
603629
603629
%files -n ruby-%{name}
603629
%{ruby_vendorlibdir}/%{name}.rb
603629
603629
%ldconfig_scriptlets
603629
603629
%changelog
603629
* Fri Sep 10 2021 Alfredo Moralejo <amoralej@redhat.com> - 3.14.19-1
603629
- Update to 3.14.19
603629
603629
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.7-7
603629
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
603629
603629
* Fri Jan 22 2021 Jonathan Wakely <jwakely@redhat.com> - 3.14.7-6
603629
- Rebuilt for Boost 1.75
603629
603629
* Sat Jan  9 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 3.14.7-5
603629
- Rebuild for cpp-hocon 0.3.0
603629
603629
* Wed Nov 04 2020 Jeff Law <law@redhat.com> - 3.14.7-4
603629
- Fix missing #includes for gcc-11
603629
603629
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.7-3
603629
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
603629
603629
* Wed Jun 03 2020 Jonathan Wakely <jwakely@redhat.com> - 3.14.7-2
603629
- Rebuild for Boost 1.73.0
603629
603629
* Tue Jan 28 2020 Adam Tkac <vonsch@gmail.com> - 3.14.7-1
603629
- update to 3.14.7
603629
603629
* Fri Oct 18 2019 Richard Shaw <hobbes1069@gmail.com> - 3.14.2-2
603629
- Rebuild for yaml-cpp 0.6.3.
603629
603629
* Wed Aug 14 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.14.2-1
603629
- Update to 3.14.2
603629
603629
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.9.3-7
603629
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
603629
603629
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.9.3-6
603629
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
603629
603629
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.9.3-5
603629
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
603629
603629
* Wed Feb 14 2018 Richard Shaw <hobbes1069@gmail.com> - 3.9.3-4
603629
- Rebuild for yaml-cpp 0.6.0.
603629
603629
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.9.3-3
603629
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
603629
603629
* Tue Jan 23 2018 Jonathan Wakely <jwakely@redhat.com> - 3.9.3-2
603629
- Rebuilt for Boost 1.66
603629
603629
* Tue Nov 07 2017 James Hogarth <james.hogarth@gmail.com> - 3.9.3-1
603629
- new upstream release 3.9.3
603629
603629
* Wed Oct 25 2017 James Hogarth <james.hogarth@gmail.com> - 3.9.2-3
603629
- Point to correct leatherman directory on cmake3 for epel7
603629
603629
* Thu Oct 19 2017 James Hogarth <james.hogarth@gmail.com> - 3.9.2-2
603629
- rebuilt
603629
603629
* Wed Oct 04 2017 James Hogarth <james.hogarth@gmail.com> - 3.9.2-1
603629
- Update to latest upstream version 3.9.2
603629
603629
* Mon Oct 02 2017 James Hogarth <james.hogarth@gmail.com> - 3.9.0-1
603629
- Update to latest upstream version 3.9.0
603629
603629
* Wed Aug 30 2017 James Hogarth <james.hogarth@gmail.com> - 3.8.0-1
603629
- Update to latest upstream version 3.8.0
603629
603629
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.4-6
603629
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
603629
603629
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.4-5
603629
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
603629
603629
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.4-4
603629
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
603629
603629
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.4-3
603629
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
603629
603629
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.4-2
603629
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
603629
603629
* Wed May 20 2015 Orion Poplawski <orion@cora.nwra.com> - 2.4.4-1
603629
- Update to 2.4.4
603629
603629
* Thu Apr 2 2015 Orion Poplawski <orion@cora.nwra.com> - 2.4.3-1
603629
- Update to 2.4.3
603629
603629
* Fri Feb 13 2015 Orion Poplawski <orion@cora.nwra.com> - 2.4.1-1
603629
- Update to 2.4.1
603629
603629
* Fri Jan 16 2015 Vít Ondruch <vondruch@redhat.com> - 2.3.0-2
603629
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.2
603629
603629
* Tue Jan 06 2015 Orion Poplawski <orion@cora.nwra.com> - 2.3.0-1
603629
- Update to 2.3.0
603629
603629
* Fri Oct 10 2014 Michael Stahnke <stahnma@fedoraproject.org> - 2.2.0-1
603629
- Update to 2.2.0 as per bz#1108041
603629
603629
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.1-4
603629
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
603629
603629
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.1-3
603629
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
603629
603629
* Mon May 05 2014 Lubomir Rintel <lkundrak@v3.sk> - 2.0.1-2
603629
- Fix el7 conditionals as suggested by Orion Poplawski (BZ #1087946)
603629
603629
* Tue Apr 29 2014 Sam Kottler <skottler@fedoraproject.org> - 2.0.1-1
603629
- Update to to 2.0.1
603629
603629
* Tue Jan 28 2014 Todd Zullinger <tmz@pobox.com> - 1.7.4-1
603629
- Update to 1.7.4
603629
- Create /etc/facter/facts.d for external facts
603629
- Send dmiddecode errors to /dev/null in the virtual fact (FACT-86)
603629
603629
* Tue Oct 8 2013 Sam Kottler <skottler@fedoraproject.org> - 1.7.3-1
603629
- Update to 1.7.3 (BZ #1016817)
603629
603629
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.18-5
603629
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
603629
603629
* Fri Jun 21 2013 Sam Kottler <skottler@fedoraproject.org> 1.6.18-4
603629
- Apply upstream patch to ensure the first non-127.0.0.1 interface
603629
603629
* Wed Apr 03 2013 Todd Zullinger <tmz@pobox.com> - 1.6.18-3
603629
- Avoid warnings when virt-what produces no output
603629
603629
* Tue Apr 02 2013 Todd Zullinger <tmz@pobox.com> - 1.6.18-2
603629
- Apply upstream patch to filter virt-what warnings from virtual fact
603629
603629
* Mon Mar 18 2013 Todd Zullinger <tmz@pobox.com> - 1.6.18-1
603629
- Update to 1.6.18
603629
- Restart puppet in %%postun (#806370)
603629
- Require virt-what for improved KVM detection (#905592)
603629
- Ensure man page is installed on EL < 7
603629
603629
* Tue Mar 12 2013 Vít Ondruch <vondruch@redhat.com> - 1.6.17-2
603629
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
603629
603629
* Mon Feb 25 2013 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 1.6.17-1
603629
- New upstream version, fixes rhbz #892734
603629
603629
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.16-2
603629
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
603629
603629
* Tue Dec 04 2012 Michael Stahnke <stahnma@puppetlabs.com> - 1.6.16-1
603629
- Update to 1.6.16
603629
603629
* Wed Nov 28 2012 Michael Stahnke <stahnma@puppetlabs.com> -  1.6.15-1
603629
- Rebase to 1.6.15
603629
- Put asc file back as Source1
603629
603629
* Fri Nov 09 2012 Michael Stahnke <stahnma@puppetlabs.com> - 1.6.13-2
603629
- Add patch for ec2 fix
603629
- Rebase to 1.6.14 via bz 871211
603629
603629
* Mon Oct 29 2012 Michael Stahnke <stahnma@puppetlabs.com> - 1.6.13-1
603629
- Rebase to 1.6.13
603629
603629
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.6-2
603629
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
603629
603629
* Mon Mar 05 2012 Todd Zullinger <tmz@pobox.com> - 1.6.6-1
603629
- Update to 1.6.6
603629
603629
* Sun Feb 19 2012 Todd Zullinger <tmz@pobox.com> - 1.6.5-5
603629
- Disable useless debuginfo generation (#795106, thanks to Ville Skyttä)
603629
- Update summary and description
603629
- Remove INSTALL from %%doc
603629
603629
* Wed Feb 15 2012 Todd Zullinger <tmz@pobox.com> - 1.6.5-4
603629
- Only run rspec checks on Fedora >= 17
603629
603629
* Mon Feb 13 2012 Todd Zullinger <tmz@pobox.com> - 1.6.5-3
603629
- Make spec file work for EPEL and Fedora
603629
- Drop BuildArch: noarch and make dmidecode/pciutils deps arch-specific
603629
- Make ec2 facts work on CentOS again (#790849, thanks to Jeremy Katz)
603629
- Preserve timestamps when installing files
603629
603629
* Thu Feb 02 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.6.5-2
603629
- Rebuilt for Ruby 1.9.3.
603629
603629
* Thu Jan 26 2012 Todd Zullinger <tmz@pobox.com> - 1.6.5-1
603629
- Update to 1.6.5
603629
- Require net-tools and pciutils, thanks to Dominic Cleal (#783749)
603629
603629
* Thu Jan 05 2012 Todd Zullinger <tmz@pobox.com> - 1.6.4-1
603629
- Update to 1.6.4
603629
- Require dmidecode (upstream #11041)
603629
603629
* Sat Oct 15 2011 Todd Zullinger <tmz@pobox.com> - 1.6.2-1
603629
- Update to 1.6.2
603629
- Update source URL
603629
603629
* Thu Sep 29 2011 Todd Zullinger <tmz@pobox.com> - 1.6.1-1
603629
- Update to 1.6.1
603629
- Minor spec file reformatting
603629
603629
* Wed Jul 27 2011 Todd Zullinger <tmz@pobox.com> - 1.6.0-2
603629
- Update license tag, GPLv2+ -> ASL 2.0
603629
603629
* Thu Jul 14 2011 Todd Zullinger <tmz@pobox.com> - 1.6.0-1
603629
- Update to 1.6.0
603629
603629
* Thu May 26 2011 Todd Zullinger <tmz@pobox.com> - 1.5.9-1
603629
- Update to 1.5.9
603629
- Improve Scientific Linux support, courtesy of Orion Poplawski (upstream #7682)
603629
603629
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.8-2
603629
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
603629
603629
* Sat Aug 28 2010 Todd Zullinger <tmz@pobox.com> - 1.5.8-1
603629
- Update to 1.5.8
603629
603629
* Fri Sep 25 2009 Todd Zullinger <tmz@pobox.com> - 1.5.7-1
603629
- Update to 1.5.7
603629
- Update #508037 patch from upstream ticket
603629
603629
* Wed Aug 12 2009 Jeroen van Meeuwen <j.van.meeuwen@ogd.nl> - 1.5.5-3
603629
- Fix #508037 or upstream #2355
603629
603629
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.5-2
603629
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
603629
603629
* Fri May 22 2009 Todd Zullinger <tmz@pobox.com> - 1.5.5-1
603629
- Update to 1.5.5
603629
- Drop upstreamed libperms patch
603629
603629
* Sat Feb 28 2009 Todd Zullinger <tmz@pobox.com> - 1.5.4-1
603629
- New version
603629
- Use upstream install script
603629
603629
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-2
603629
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
603629
603629
* Tue Sep 09 2008 Todd Zullinger <tmz@pobox.com> - 1.5.2-1
603629
- New version
603629
- Simplify spec file checking for Fedora and RHEL versions
603629
603629
* Mon Sep  8 2008 David Lutterkort <dlutter@redhat.com> - 1.5.1-1
603629
- New version
603629
603629
* Thu Jul 17 2008 David Lutterkort <dlutter@redhat.com> - 1.5.0-3
603629
- Change 'mkdir' in install to 'mkdir -p'
603629
603629
* Thu Jul 17 2008 David Lutterkort <dlutter@redhat.com> - 1.5.0-2
603629
- Remove files that were listed twice in files section
603629
603629
* Mon May 19 2008 James Turnbull <james@lovedthanlosty.net> - 1.5.0-1
603629
- New version
603629
- Added util and plist files
603629
603629
* Mon Sep 24 2007 David Lutterkort <dlutter@redhat.com> - 1.3.8-1
603629
- Update license tag
603629
- Copy all of lib/ into ruby_sitelibdir
603629
603629
* Thu Mar 29 2007 David Lutterkort <dlutter@redhat.com> - 1.3.7-1
603629
- New version
603629
603629
* Fri Jan 19 2007 David Lutterkort <dlutter@redhat.com> - 1.3.6-1
603629
- New version
603629
603629
* Thu Jan 18 2007 David Lutterkort <dlutter@redhat.com> - 1.3.5-3
603629
- require which; facter is very unhappy without it
603629
603629
* Mon Nov 20 2006 David Lutterkort <dlutter@redhat.com> - 1.3.5-2
603629
- Make require ruby(abi) and buildarch: noarch conditional for fedora 5 or
603629
  later to allow building on older fedora releases
603629
603629
* Tue Oct 10 2006 David Lutterkort <dlutter@redhat.com> - 1.3.5-1
603629
- New version
603629
603629
* Tue Sep 26 2006 David Lutterkort <dlutter@redhat.com> - 1.3.4-1
603629
- New version
603629
603629
* Wed Sep 13 2006 David Lutterkort <dlutter@redhat.com> - 1.3.3-2
603629
- Rebuilt for FC6
603629
603629
* Wed Jun 28 2006 David Lutterkort <dlutter@redhat.com> - 1.3.3-1
603629
- Rebuilt
603629
603629
* Mon Jun 19 2006 Luke Kanies <luke@madstop.com> - 1.3.0-1
603629
- Fixed spec file to work again with the extra memory and processor files.
603629
- Require ruby(abi). Build as noarch
603629
- Added memory.rb and processor.rb
603629
603629
* Mon Apr 17 2006 David Lutterkort <dlutter@redhat.com> - 1.1.4-4
603629
- Rebuilt with changed upstream tarball
603629
603629
* Tue Mar 21 2006 David Lutterkort <dlutter@redhat.com> - 1.1.4-3
603629
- Do not rely on install.rb, it will be deleted upstream
603629
603629
* Mon Mar 13 2006 David Lutterkort <dlutter@redhat.com> - 1.1.4-2
603629
- Commented out noarch; requires fix for bz184199
603629
603629
* Mon Mar  6 2006 David Lutterkort <dlutter@redhat.com> - 1.1.4-1
603629
- Removed unused macros
603629
603629
* Mon Feb  6 2006 David Lutterkort <dlutter@redhat.com> - 1.1.1-2
603629
- Fix BuildRoot. Add dist to release tag
603629
603629
* Wed Jan 11 2006 David Lutterkort <dlutter@redhat.com> - 1.1.1-1
603629
- Initial build.