From af176b5b8f1a2f18359a69fe6751c79b57d4c218 Mon Sep 17 00:00:00 2001
From: Kirill Smelkov <kirr@nexedi.com>
Date: Mon, 21 Jan 2019 17:59:15 +0300
Subject: [PATCH] helloworld: Fix build

	2019-01-21 17:56:18 slapos[13553] INFO While:
	2019-01-21 17:56:18 slapos[13553] INFO   Installing.
	2019-01-21 17:56:18 slapos[13553] INFO   Getting section instance-profile.
	2019-01-21 17:56:18 slapos[13553] INFO   Initializing section instance-profile.
	2019-01-21 17:56:18 slapos[13553] INFO   Installing recipe slapos.recipe.template.
	2019-01-21 17:56:18 slapos[13553] INFO   Getting distribution for 'slapos.recipe.template'.
	2019-01-21 17:56:18 slapos[13553] INFO Error: Picked: slapos.recipe.template = 4.3
	2019-01-21 17:56:19 slapos[13553] ERROR Failed to run buildout profile in directory '/srv/slapgrid/slappart7/srv/runner/software/19771f7b751ffc2a88162b15750c6069'

	2019-01-21 18:01:21 slapos[26771] INFO While:
	2019-01-21 18:01:21 slapos[26771] INFO   Installing.
	2019-01-21 18:01:21 slapos[26771] INFO   Getting section helloweb-ruby.
	2019-01-21 18:01:21 slapos[26771] INFO   Initializing section helloweb-ruby.
	2019-01-21 18:01:21 slapos[26771] INFO   Getting option helloweb-ruby:input.
	2019-01-21 18:01:21 slapos[26771] INFO   Getting section helloweb-ruby-bundle.
	2019-01-21 18:01:21 slapos[26771] INFO   Initializing section helloweb-ruby-bundle.
	2019-01-21 18:01:21 slapos[26771] INFO   Getting option helloweb-ruby-bundle:make-targets.
	2019-01-21 18:01:21 slapos[26771] INFO   Getting section bundler.
	2019-01-21 18:01:21 slapos[26771] INFO   Initializing section bundler.
	2019-01-21 18:01:21 slapos[26771] INFO   Installing recipe rubygemsrecipe.
	2019-01-21 18:01:21 slapos[26771] INFO   Getting distribution for 'rubygemsrecipe'.
	2019-01-21 18:01:21 slapos[26771] INFO Error: Picked: rubygemsrecipe = 0.2.2+slapos001

Ruby stuff was failing to download at all -> let's use the versions that
are the same as currently used in software/gitlab.

Based on patch by @romain.
Helped by @jerome.
---
 component/helloweb/buildout.cfg  | 4 ++--
 software/helloworld/software.cfg | 5 +++++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/component/helloweb/buildout.cfg b/component/helloweb/buildout.cfg
index 42abbcf37..6cd6acce6 100644
--- a/component/helloweb/buildout.cfg
+++ b/component/helloweb/buildout.cfg
@@ -47,10 +47,10 @@ scripts = helloweb=helloweb-python
 [bundler]
 # rubygemsrecipe with fixed url and this way pinned rubygems version
 recipe  = rubygemsrecipe
-url     = https://rubygems.org/rubygems/rubygems-2.4.8.zip
+url     = https://rubygems.org/rubygems/rubygems-2.5.2.zip
 ruby-location = ${ruby2.1:location}
 ruby-executable = ${:ruby-location}/bin/ruby
-gems    = bundler==1.10.6
+gems    = bundler==1.11.2
 
 # bin installed here
 bundle  = ${buildout:bin-directory}/bundle
diff --git a/software/helloworld/software.cfg b/software/helloworld/software.cfg
index de0d4d48b..34000e7eb 100644
--- a/software/helloworld/software.cfg
+++ b/software/helloworld/software.cfg
@@ -38,3 +38,8 @@ mode = 0644
 extensions = jinja2.ext.do
 context =
   section buildout  buildout
+
+# Pin versions of eggs used that are not already pinned by stack/slapos.cfg
+[versions]
+slapos.recipe.template = 4.3
+rubygemsrecipe  = 0.2.2+slapos001
-- 
2.30.9