[packages/chef/chef-12: 5/6] include also chef-config gem

glen glen at pld-linux.org
Thu Jun 2 00:03:45 CEST 2016


commit 16f49c067891c6ca4d6b38c18d2d0d8bbce6a32f
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Jun 2 00:33:51 2016 +0300

    include also chef-config gem
    
    it's built from same source as chef gem
    https://github.com/chef/chef/pull/3270

 FHS.patch | 26 ++++++++++++++++++++++++++
 chef.spec | 34 +++++++++++++++++++++++++++++++++-
 2 files changed, 59 insertions(+), 1 deletion(-)
---
diff --git a/chef.spec b/chef.spec
index 54194b1..4a6e95e 100644
--- a/chef.spec
+++ b/chef.spec
@@ -12,6 +12,8 @@ License:	Apache v2.0
 Group:		Networking/Admin
 Source0:	http://rubygems.org/downloads/%{name}-%{version}.gem
 # Source0-md5:	43819ee38d7cb40ea5578b74d87af1c7
+Source1:	http://rubygems.org/downloads/%{name}-config-%{version}.gem
+# Source1-md5:	c0515424c9122e4e0c561d6a4b267123
 Source2:	%{name}.tmpfiles
 Source3:	https://raw.github.com/stevendanna/knife-hacks/master/shell/knife_completion.sh
 # Source3-md5:	a4c1e41370be8088a59ddb3b2e7ea397
@@ -39,6 +41,7 @@ BuildRequires:	ruby-rspec_junit_formatter
 Requires:	lsb-release
 Requires:	poldek >= 0.30
 Requires:	ruby >= 1:1.9.3.429-4
+Requires:	ruby-chef-config = %{version}-%{release}
 Requires:	ruby-diff-lcs < 2
 Requires:	ruby-diff-lcs >= 1.2.4
 Requires:	ruby-erubis < 3
@@ -82,6 +85,19 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 A systems integration framework, built to bring the benefits of
 configuration management to your entire infrastructure.
 
+%package -n ruby-chef-config
+Summary:	Chef's default configuration and config loading
+Group:		Development/Languages
+Requires:	ruby-fuzzyurl < 0.9
+Requires:	ruby-fuzzyurl >= 0.8.0
+Requires:	ruby-mixlib-config < 3
+Requires:	ruby-mixlib-config >= 2.0
+Requires:	ruby-mixlib-shellout < 3
+Requires:	ruby-mixlib-shellout >= 2.0
+
+%description -n ruby-chef-config
+Chef's default configuration and config loading.
+
 %package -n bash-completion-knife
 Summary:	bash-completion for knife
 Summary(pl.UTF-8):	bashowe uzupełnianie nazw dla knifea
@@ -107,8 +123,15 @@ centered around the various object types in Chef. Each category of
 subcommand is documented in its own manual page.
 
 %prep
-%setup -q
+# chef-config
+%setup -qcT -a1
+set -- *
+install -d chef-config
+mv "$@" chef-config
+# chef
+%setup -qcTD -a0
 gzip -d metadata
+
 #%patch0 -p1 # UPDATE
 %patch1 -p1
 %patch2 -p1
@@ -133,11 +156,15 @@ install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_bindir},%{_mandir}/man1,%{s
 	$RPM_BUILD_ROOT%{ruby_vendorlibdir}/chef/reporting \
 	$RPM_BUILD_ROOT/var/{run/%{name},cache/%{name},lib/%{name}/{roles,data_bags,environments,reports,backup}}
 
+# chef
 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
 cp -a distro/common/man/* $RPM_BUILD_ROOT%{_mandir}
 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/README.md
 
+# chef-config
+cp -a chef-config/lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
+
 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
 
 install -d $RPM_BUILD_ROOT%{bash_compdir}
@@ -176,6 +203,11 @@ rm -rf $RPM_BUILD_ROOT
 %dir /var/cache/%{name}
 %dir /var/run/%{name}
 
+%files -n ruby-chef-config
+%defattr(644,root,root,755)
+%{ruby_vendorlibdir}/chef-config.rb
+%{ruby_vendorlibdir}/chef-config
+
 %files -n knife
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/knife
diff --git a/FHS.patch b/FHS.patch
index a0de224..a5c17d4 100644
--- a/FHS.patch
+++ b/FHS.patch
@@ -9,3 +9,29 @@
          @config
        end
  
+--- chef-12.10.24/chef-config/lib/chef-config/config.rb~	2016-06-02 00:23:49.000000000 +0300
++++ chef-12.10.24/chef-config/lib/chef-config/config.rb	2016-06-02 00:24:58.502867530 +0300
+@@ -170,7 +170,7 @@
+ 
+     # Location of cookbooks on disk. String or array of strings.
+     # Defaults to <chef_repo_path>/cookbooks.  If chef_repo_path
+-    # is not specified, this is set to [/var/chef/cookbooks, /var/chef/site-cookbooks]).
++    # is not specified, this is set to [/var/lib/chef/cookbooks, /var/lib/chef/site-cookbooks]).
+     default(:cookbook_path) do
+       if self.configuration[:chef_repo_path]
+         derive_path_from_chef_repo_path("cookbooks")
+@@ -234,10 +234,10 @@
+       if local_mode
+         PathHelper.join(config_dir, "local-mode-cache")
+       else
+-        primary_cache_root = platform_specific_path("/var")
+-        primary_cache_path = platform_specific_path("/var/chef")
+-        # Use /var/chef as the cache path only if that folder exists and we can read and write
+-        # into it, or /var exists and we can read and write into it (we'll create /var/chef later).
++        primary_cache_root = platform_specific_path("/var/cache")
++        primary_cache_path = platform_specific_path("/var/cache/chef")
++        # Use /var/cache/chef as the cache path only if that folder exists and we can read and write
++        # into it, or /var exists and we can read and write into it (we'll create /var/cache/chef later).
+         # Otherwise, we'll create .chef under the user's home directory and use that as
+         # the cache path.
+         unless path_accessible?(primary_cache_path) || path_accessible?(primary_cache_root)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/chef.git/commitdiff/10b8ffc4d0ed4499a21a6552aac8571001c08266



More information about the pld-cvs-commit mailing list