From 07abbc0cd8b21a3a59e18a656ae872003c92a012 Mon Sep 17 00:00:00 2001 From: Steve Traylen Date: Thu, 1 Jun 2017 15:46:53 +0200 Subject: [PATCH] Update to 3.3.1. Relocate hiera.yaml to /etc/puppet/hiera.yaml Remove items for old OSes. --- fix-puppetlab-paths.patch | 21 ++++++++++++++++++ hiera.spec | 45 ++++++++++++--------------------------- sources | 2 +- 3 files changed, 36 insertions(+), 32 deletions(-) create mode 100644 fix-puppetlab-paths.patch diff --git a/fix-puppetlab-paths.patch b/fix-puppetlab-paths.patch new file mode 100644 index 0000000..7e22d09 --- /dev/null +++ b/fix-puppetlab-paths.patch @@ -0,0 +1,21 @@ +diff -uNr hiera-3.3.1.ORIG/lib/hiera/util.rb hiera-3.3.1/lib/hiera/util.rb +--- hiera-3.3.1.ORIG/lib/hiera/util.rb 2017-06-01 15:41:12.908907573 +0200 ++++ hiera-3.3.1/lib/hiera/util.rb 2017-06-01 15:41:45.015503104 +0200 +@@ -28,7 +28,7 @@ + if microsoft_windows? + File.join(common_appdata, 'PuppetLabs', 'puppet', 'etc') + else +- '/etc/puppetlabs/puppet' ++ '/etc/puppet' + end + end + +@@ -36,7 +36,7 @@ + if microsoft_windows? + File.join(common_appdata, 'PuppetLabs', 'code') + else +- '/etc/puppetlabs/code' ++ '/etc/puppet' + end + end + diff --git a/hiera.spec b/hiera.spec index 97b8598..5b79e04 100644 --- a/hiera.spec +++ b/hiera.spec @@ -1,47 +1,26 @@ -%if 0%{?el5}%{?el6} -%{!?ruby_vendorlibdir: %global ruby_vendorlibdir /usr/lib/ruby/site_ruby/1.8} -%endif - -#rspec seems broken(?) in epel5 and6, todo. -#rubygem(mocha) not available yet on el7. -%if 0%{?el5}%{?el6}%{?el7} -%global with_checks 0 -%else -%global with_checks 1 -%endif Name: hiera -Version: 3.0.1 -Release: 3%{?dist} +Version: 3.3.1 +Release: 1%{?dist} Summary: A simple hierarchical database supporting plugin data sources Group: System Environment/Base License: ASL 2.0 URL: http://projects.puppetlabs.com/projects/%{name}/ Source0: http://downloads.puppetlabs.com/hiera/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +# Use /etc/puppet rather than /etc/puppetlabs/puppet +Patch0: fix-puppetlab-paths.patch BuildArch: noarch -%if 0%{?with_checks} BuildRequires: rubygem(rspec) BuildRequires: rubygem(mocha) -%endif BuildRequires: ruby-devel -%if 0%{?el6} -Requires: ruby(abi) = 1.8 -%endif -%if 0%{?fc19} || 0%{?fc20} || 0%{?el7} -Requires: ruby(release) -%endif - -%if 0%{?fc19} || 0%{?fc20} || 0%{?el6} || 0%{?el7} -Provides: rubygem(hiera) = %{version} -%endif %description A simple hierarchical database supporting plugin data sources. %prep %setup -q +%patch0 -p1 %build # Nothing to build @@ -49,18 +28,16 @@ A simple hierarchical database supporting plugin data sources. %install rm -rf %{buildroot} mkdir -p %{buildroot}%{ruby_vendorlibdir} -mkdir -p %{buildroot}%{_sysconfdir} +mkdir -p %{buildroot}%{_sysconfdir}/puppet mkdir -p %{buildroot}%{_bindir} cp -pr lib/hiera %{buildroot}%{ruby_vendorlibdir} cp -pr lib/hiera.rb %{buildroot}%{ruby_vendorlibdir} install -p -m0755 bin/hiera %{buildroot}%{_bindir} -install -p -m0644 ext/hiera.yaml %{buildroot}%{_sysconfdir} +install -p -m0644 ext/hiera.yaml %{buildroot}%{_sysconfdir}/puppet mkdir -p %{buildroot}%{_var}/lib/hiera %check -%if 0%{?with_checks} ruby spec/spec_helper.rb -%endif %clean rm -rf %{buildroot} @@ -71,11 +48,17 @@ rm -rf %{buildroot} %{ruby_vendorlibdir}/hiera.rb %{ruby_vendorlibdir}/hiera %dir %{_var}/lib/hiera -%config(noreplace) %{_sysconfdir}/hiera.yaml +%dir %{_sysconfdir}/puppet +%config(noreplace) %{_sysconfdir}/puppet/hiera.yaml %doc COPYING README.md LICENSE %changelog +* Thu Jun 1 2017 Steve Traylen - 3.3.1-1 +- Update to 3.3.1. +- Relocate hiera.yaml to /etc/puppet/hiera.yaml +- Remove items for old OSes. + * Fri Feb 10 2017 Fedora Release Engineering - 3.0.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index 216f452..9950278 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a9c8884705d7f32e51ce357553487b93 hiera-3.0.1.tar.gz +SHA512 (hiera-3.3.1.tar.gz) = 723722dfbc074494534396b5facffb5e61c0b7ecdbd6df0cd88c1fd01fc8235e5e5b21a5df9155e0adc8cafdb0334ba7c85bf0445d2d497b099e0839046fd0ed