X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=chef.spec;h=4f7a2ae8e4c7c8121fad097fbda5a6ce7f99bb72;hb=a18fec1c21773b57706bc751b0223013bc0688a3;hp=4a5ed3616ae197ea2697503f5a979528302b40bf;hpb=be8cf7bb0dc17ed8261f00b2d0790136f31992c1;p=packages%2Fchef.git diff --git a/chef.spec b/chef.spec index 4a5ed36..4f7a2ae 100644 --- a/chef.spec +++ b/chef.spec @@ -1,63 +1,60 @@ -# +# NOTE: +# - check releases here: https://downloads.chef.io/chef-client/debian/ +# the versions tagged in github are somewhat newer, perhaps dev-releases + # Conditional build: %bcond_with tests # build without tests Summary: A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure Name: chef -Version: 11.8.2 -Release: 0.8 +Version: 14.1.21 +Release: 0.3 License: Apache v2.0 -Group: Development/Languages -Source0: http://rubygems.org/downloads/%{name}-%{version}.gem -# Source0-md5: 7d3c2e8b98ec8df050d92686f1429d8f -Source1: %{name}.rb +Group: Networking/Admin +Source0: https://github.com/chef/chef/archive/v%{version}/%{name}-%{version}.tar.gz +# Source0-md5: b67966a9b9e6c0a5947a604239267415 Source2: %{name}.tmpfiles +Source3: https://raw.github.com/stevendanna/knife-hacks/master/shell/knife_completion.sh +# Source3-md5: a4c1e41370be8088a59ddb3b2e7ea397 Patch0: platform-pld.patch Patch1: FHS.patch -Patch2: https://github.com/glensc/chef/compare/poldek.patch -# Patch2-md5: 5a0fc35de33910b41cba4e87dcb4bf9a +Patch2: poldek.patch Patch3: https://github.com/glensc/chef/compare/pld-knife-boostrap.patch -# Patch3-md5: bfc884469fad7b5aa46341402be5fccd -URL: http://wiki.opscode.com/display/chef +# Patch3-md5: 8ff0fdfde6dc90018698775bf8f13062 +Patch4: optional-plist.patch +Patch5: gemdeps.patch +URL: https://wiki.opscode.com/display/chef/ BuildRequires: rpm-rubyprov -BuildRequires: rpmbuild(macros) >= 1.656 +BuildRequires: rpmbuild(macros) >= 1.673 BuildRequires: sed >= 4.0 %if %{with tests} -BuildRequires: ruby-abstract -BuildRequires: ruby-chef-zero < 2 -BuildRequires: ruby-chef-zero >= 1.4 -BuildRequires: ruby-mixlib-authentication >= 1.3.0 -BuildRequires: ruby-net-ssh-multi >= 1.1.0 -BuildRequires: ruby-puma < 2 -BuildRequires: ruby-puma >= 1.6 BuildRequires: ruby-rack BuildRequires: ruby-rake -#BuildRequires: ruby-rdoc -BuildRequires: ruby-rest-client >= 1.0.4 -BuildRequires: ruby-rspec-core >= 2.12.0 -BuildRequires: ruby-rspec-expectations >= 2.12.0 -BuildRequires: ruby-rspec-mocks >= 2.12.0 -#BuildRequires: ruby-rspec_junit_formatter -#BuildRequires: ruby-sdoc +BuildRequires: ruby-rspec-core < 2.15 +BuildRequires: ruby-rspec-core >= 2.14.0 +BuildRequires: ruby-rspec-expectations < 2.15 +BuildRequires: ruby-rspec-expectations >= 2.14.0 +BuildRequires: ruby-rspec-mocks < 2.15 +BuildRequires: ruby-rspec-mocks >= 2.14.0 +BuildRequires: ruby-rspec_junit_formatter %endif -#Requires: diffutils Requires: lsb-release Requires: poldek >= 0.30 Requires: ruby >= 1:1.9.3.429-4 -Requires: ruby-erubis -Requires: ruby-highline >= 1.6.9 -Requires: ruby-json >= 1.4.4 -Requires: ruby-mixlib-authentication >= 1.3.0 -Requires: ruby-mixlib-cli >= 1.3.0 -Requires: ruby-mixlib-config >= 1.1.2 -Requires: ruby-mixlib-log >= 1.3.0 -Requires: ruby-mixlib-shellout -Requires: ruby-net-ssh >= 2.6 -Requires: ruby-net-ssh-multi >= 1.1.0 -Requires: ruby-ohai >= 0.6.0 +Requires: ruby-chef-config = %{version}-%{release} +Requires: ruby-erubis >= 2.7.0-3 +Requires: ruby-json +Requires: ruby-mime-types < 2 +Requires: ruby-mime-types >= 1.16 +Requires: ruby-mixlib-authentication >= 1.3.0-2 +Requires: ruby-mixlib-config < 3 +Requires: ruby-mixlib-config >= 2.0 +Requires: ruby-mixlib-log >= 1.6.0-2 +Requires: ruby-ohai < 9 Requires: ruby-rest-client >= 1.0.4 Requires: ruby-rubygems -Requires: ruby-yajl >= 1.1 +Suggests: chef-zero >= 2.1.4 +Suggests: ruby-plist >= 3.1.0 BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -68,9 +65,29 @@ 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 + +%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 +Group: Applications/Shells +Requires: %{name} >= 0.10 +Requires: bash-completion >= 2.0 + +%description -n bash-completion-knife +This package provides bash-completion for knife. + +%description -n bash-completion-knife -l pl.UTF-8 +Pakiet ten dostarcza bashowe uzupełnianie nazw dla knifea. + %package -n knife Summary: knife - Chef Server API client utility -Group: Development/Languages +Group: Networking/Admin Requires: %{name} = %{version}-%{release} %description -n knife @@ -81,33 +98,62 @@ subcommand is documented in its own manual page. %prep %setup -q -%patch0 -p1 +#%patch0 -p1 # UPDATE %patch1 -p1 %patch2 -p1 %patch3 -p1 - -grep --exclude-dir=spec --exclude-dir=distro -r /var/chef . && exit 1 +%patch4 -p1 +%patch5 -p1 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* +%ifos linux +# those do not match s.executables from .gemspec +rm bin/chef-service-manager +rm bin/chef-windows-service +%endif + +# don't package this, a maintainer's rake task +rm chef-config/lib/chef-config/package_task.rb + +# cleanup backups after patching +find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f + +grep --exclude-dir=spec --exclude-dir=distro --exclude=CHANGELOG.md -r /var/chef . && exit 1 + %build +# make gemspec self-contained +%__gem_helper spec-dump %{name}.gemspec + %if %{with tests} rspec spec %endif +cd chef-config +# make gemspec self-contained +%__gem_helper spec-dump %{name}-config.gemspec + %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{_bindir},%{_mandir}/man1,%{systemdtmpfilesdir}} \ - $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},/var/{run/%{name},cache/%{name},lib/%{name}/{roles,data_bags,environments}}} +install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_bindir},%{systemdtmpfilesdir}} \ + $RPM_BUILD_ROOT%{ruby_vendorlibdir}/chef/reporting \ + $RPM_BUILD_ROOT%{ruby_specdir} \ + $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 +cp -p chef-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} + +# chef-config +cp -a chef-config/lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} +cp -p chef-config/chef-config-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} -cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/chef.rb cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf +install -d $RPM_BUILD_ROOT%{bash_compdir} +cp -p %{SOURCE3} $RPM_BUILD_ROOT%{bash_compdir}/knife + %clean rm -rf $RPM_BUILD_ROOT @@ -115,18 +161,14 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %doc README.md CONTRIBUTING.md %dir %{_sysconfdir}/%{name} -%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/chef.rb %attr(755,root,root) %{_bindir}/chef-apply %attr(755,root,root) %{_bindir}/chef-client -%attr(755,root,root) %{_bindir}/chef-service-manager +%attr(755,root,root) %{_bindir}/chef-resource-inspector %attr(755,root,root) %{_bindir}/chef-shell %attr(755,root,root) %{_bindir}/chef-solo -%attr(755,root,root) %{_bindir}/shef -%{_mandir}/man1/chef-shell.1* -%{_mandir}/man8/chef-client.8* -%{_mandir}/man8/chef-solo.8* %{ruby_vendorlibdir}/chef.rb %{ruby_vendorlibdir}/chef +%{ruby_specdir}/chef-%{version}.gemspec %exclude %{ruby_vendorlibdir}/chef/knife %exclude %{ruby_vendorlibdir}/chef/application/knife.rb %exclude %{ruby_vendorlibdir}/chef/chef_fs/knife.rb @@ -137,10 +179,18 @@ rm -rf $RPM_BUILD_ROOT %dir /var/lib/%{name}/roles %dir /var/lib/%{name}/data_bags %dir /var/lib/%{name}/environments +%dir /var/lib/%{name}/reports +%dir %attr(750,root,root) /var/lib/%{name}/backup %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 +%{ruby_specdir}/chef-config-%{version}.gemspec + %files -n knife %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/knife @@ -148,31 +198,7 @@ rm -rf $RPM_BUILD_ROOT %{ruby_vendorlibdir}/chef/knife %{ruby_vendorlibdir}/chef/application/knife.rb %{ruby_vendorlibdir}/chef/chef_fs/knife.rb -%{_mandir}/man1/knife-bootstrap.1* -%{_mandir}/man1/knife-client.1* -%{_mandir}/man1/knife-configure.1* -%{_mandir}/man1/knife-cookbook-site.1* -%{_mandir}/man1/knife-cookbook.1* -%{_mandir}/man1/knife-data-bag.1* -%{_mandir}/man1/knife-delete.1* -%{_mandir}/man1/knife-deps.1* -%{_mandir}/man1/knife-diff.1* -%{_mandir}/man1/knife-download.1* -%{_mandir}/man1/knife-edit.1* -%{_mandir}/man1/knife-environment.1* -%{_mandir}/man1/knife-exec.1* -%{_mandir}/man1/knife-index-rebuild.1* -%{_mandir}/man1/knife-list.1* -%{_mandir}/man1/knife-node.1* -%{_mandir}/man1/knife-raw.1* -%{_mandir}/man1/knife-recipe-list.1* -%{_mandir}/man1/knife-role.1* -%{_mandir}/man1/knife-search.1* -%{_mandir}/man1/knife-show.1* -%{_mandir}/man1/knife-ssh.1* -%{_mandir}/man1/knife-status.1* -%{_mandir}/man1/knife-tag.1* -%{_mandir}/man1/knife-upload.1* -%{_mandir}/man1/knife-user.1* -%{_mandir}/man1/knife-xargs.1* -%{_mandir}/man1/knife.1* + +%files -n bash-completion-knife +%defattr(644,root,root,755) +%{bash_compdir}/knife