[packages/hiera] up to 1.3.4, package gemspec
glen
glen at pld-linux.org
Wed Aug 19 11:43:30 CEST 2015
commit 52843954223241e7d198cf4eca837685fcf40ac5
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Tue Aug 11 00:08:34 2015 +0300
up to 1.3.4, package gemspec
hiera.spec | 32 ++++++++++++++++++++++----------
hiera.yaml | 12 +++++++-----
2 files changed, 29 insertions(+), 15 deletions(-)
---
diff --git a/hiera.spec b/hiera.spec
index 828be54..d19f688 100644
--- a/hiera.spec
+++ b/hiera.spec
@@ -4,17 +4,21 @@
Summary: A simple hierarchical database supporting plugin data sources
Name: hiera
-Version: 1.0.0
+# http://docs.puppetlabs.com/hiera/
+# Hiera 3.0 is included with open source Puppet versions 4.2 and up.
+# Hiera 1.0 is compatible with Puppet 3.x and is included in Puppet Enterprise 3.x.
+Version: 1.3.4
Release: 1
License: Apache v2.0
Group: Applications/Databases
-Source0: http://downloads.puppetlabs.com/hiera/%{name}-%{version}.tar.gz
-# We use a copy of misreleased 'newer' version of 1.0.0
-# http://projects.puppetlabs.com/issues/16621
+Source0: http://rubygems.org/downloads/%{name}-%{version}.gem
+# Source0-md5: 9d83ce8a56cf74ae93bc55ce878da9f3
+# Copied from http://downloads.puppetlabs.com/hiera/%{name}-%{version}.tar.gz
+# tarball ext/hiera.yaml, as ext/ dir is not included in gem, but we want gem for .gemspec
Source1: %{name}.yaml
URL: http://projects.puppetlabs.com/projects/hiera/
-BuildRequires: rpmbuild(macros) >= 1.656
BuildRequires: rpm-rubyprov
+BuildRequires: rpmbuild(macros) >= 1.656
%if %{with tests}
BuildRequires: ruby-mocha
BuildRequires: ruby-rspec
@@ -27,29 +31,37 @@ A simple hierarchical database supporting plugin data sources.
%prep
%setup -q
-cp -p %{SOURCE1} hiera.yaml
+install -d ext
+cp -p %{SOURCE1} ext/hiera.yaml
%build
+# write .gemspec
+%__gem_helper spec
+
+# why pure? just json will do
+%{__sed} -i -e 's/json_pure/json/' *.gemspec
+
%if %{with tests}
ruby spec/spec_helper.rb
%endif
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{ruby_vendorlibdir}}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{ruby_vendorlibdir},%{ruby_specdir},%{_var}/lib/hiera}
cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
-cp -p hiera.yaml $RPM_BUILD_ROOT%{_sysconfdir}
-install -d $RPM_BUILD_ROOT%{_var}/lib/hiera
+cp -p ext/hiera.yaml $RPM_BUILD_ROOT%{_sysconfdir}
+cp -p %{name}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc README.md CHANGELOG LICENSE
+%doc README.md LICENSE
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hiera.yaml
%attr(755,root,root) %{_bindir}/hiera
%{ruby_vendorlibdir}/hiera.rb
%{ruby_vendorlibdir}/hiera
+%{ruby_specdir}/%{name}-%{version}.gemspec
%dir %{_var}/lib/hiera
diff --git a/hiera.yaml b/hiera.yaml
index 4f7e782..b0ea22a 100644
--- a/hiera.yaml
+++ b/hiera.yaml
@@ -1,13 +1,15 @@
---
-:backend:
+:backends:
- yaml
:hierarchy:
- defaults
- - %{certname}
- - %{environment}
+ - "%{clientcert}"
+ - "%{environment}"
- global
:yaml:
-# datadir is empty here, so hiera uses its defaults, /var/lib/hiera
-# When specifying a datadir, make sure the path of the datadir exists
+# datadir is empty here, so hiera uses its defaults:
+# - /var/lib/hiera on *nix
+# - %CommonAppData%\PuppetLabs\hiera\var on Windows
+# When specifying a datadir, make sure the directory exists.
:datadir:
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/hiera.git/commitdiff/52843954223241e7d198cf4eca837685fcf40ac5
More information about the pld-cvs-commit
mailing list