Commit 3836a13f authored by Julien Muchembled's avatar Julien Muchembled

version up: slapos.recipe.build 0.52

This is a regression with 0.48 that prevented parts to be shared depending
on which Python is used to run Python (whether it's version 2 or 3).
parent 3f75a3ff
...@@ -71,7 +71,7 @@ version = ...@@ -71,7 +71,7 @@ version =
md5sum-x86_64 = md5sum-x86_64 =
recipe = slapos.recipe.build recipe = slapos.recipe.build
x86-64 = https://chromedriver.storage.googleapis.com/${:version}/chromedriver_linux64.zip ${:md5sum-x86_64} x86_64-linux-gnu = https://chromedriver.storage.googleapis.com/${:version}/chromedriver_linux64.zip ${:md5sum-x86_64}
library = library =
${nss:location}/lib ${nss:location}/lib
${nspr:location}/lib ${nspr:location}/lib
...@@ -79,6 +79,6 @@ library = ...@@ -79,6 +79,6 @@ library =
path = path =
install = install =
import os, shutil import os, shutil
extract_dir = self.extract(self.download(*options[guessPlatform()].split())) extract_dir = self.extract(self.download(*options[multiarch()].split()))
os.mkdir(location) os.mkdir(location)
shutil.copy(os.path.join(extract_dir, 'chromedriver'), location) shutil.copy(os.path.join(extract_dir, 'chromedriver'), location)
...@@ -116,7 +116,7 @@ md5sum-x86_64 = ...@@ -116,7 +116,7 @@ md5sum-x86_64 =
recipe = slapos.recipe.build recipe = slapos.recipe.build
x86-64 = https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F${:revision_x86-64}%2Fchrome-linux.zip?generation=${:generation-x86_64}&alt=media ${:md5sum-x86_64} x86_64-linux-gnu = https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F${:revision_x86-64}%2Fchrome-linux.zip?generation=${:generation-x86_64}&alt=media ${:md5sum-x86_64}
library = library =
...@@ -167,7 +167,7 @@ library = ...@@ -167,7 +167,7 @@ library =
path = path =
${fontconfig:location}/bin ${fontconfig:location}/bin
install = install =
url, md5sum = self.options[guessPlatform()].split() url, md5sum = self.options[multiarch()].split()
extract_dir = self.extract(self.download(url, md5sum)) extract_dir = self.extract(self.download(url, md5sum))
self.copyTree(guessworkdir(extract_dir), location) self.copyTree(guessworkdir(extract_dir), location)
# XXX adjust some permissions # XXX adjust some permissions
......
[buildout] [buildout]
parts = parts =
consul consul
[consul] [consul]
recipe = slapos.recipe.build recipe = slapos.recipe.build:download-unpacked
version = 0.8.3
# here, two %s are used, first one is for directory name (eg. x86_64), and second one is for filename (eg. x86-64). base = https://releases.hashicorp.com/consul/${:version}/consul_${:version}
url_x86-64 = https://releases.hashicorp.com/consul/0.8.3/consul_0.8.3_linux_amd64.zip i386-linux-gnu = ${:base}_linux_386.zip dfdc0eedd79baab7e6bc56c1582fd02e
url_x86 = https://releases.hashicorp.com/consul/0.8.3/consul_0.8.3_linux_386.zip x86_64-linux-gnu = ${:base}_linux_amd64.zip d6bc0898ea37ae2198370a9e1978d1bb
# supported architectures md5sums
md5sum_x86 = dfdc0eedd79baab7e6bc56c1582fd02e
md5sum_x86-64 = d6bc0898ea37ae2198370a9e1978d1bb
install =
import shutil
platform = guessPlatform()
url = options['url_' + platform]
md5sum = options['md5sum_' + platform]
extract_dir = self.extract(self.download(url, md5sum))
shutil.move(extract_dir, location)
...@@ -136,8 +136,8 @@ recipe = slapos.recipe.build ...@@ -136,8 +136,8 @@ recipe = slapos.recipe.build
slapos_promise = slapos_promise =
file:firefox file:firefox
x86 = https://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-i686/en-US/firefox-${:version}.tar.bz2 ${:i686-md5sum} i386-linux-gnu = https://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-i686/en-US/firefox-${:version}.tar.bz2 ${:i686-md5sum}
x86-64 = https://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-x86_64/en-US/firefox-${:version}.tar.bz2 ${:x86_64-md5sum} x86_64-linux-gnu = https://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-x86_64/en-US/firefox-${:version}.tar.bz2 ${:x86_64-md5sum}
library = library =
${alsa:location}/lib ${alsa:location}/lib
...@@ -185,7 +185,7 @@ path = ...@@ -185,7 +185,7 @@ path =
${fontconfig:location}/bin ${fontconfig:location}/bin
install = install =
url, md5sum = options[guessPlatform()].split() url, md5sum = options[multiarch()].split()
extract_dir = self.extract(self.download(url, md5sum)) extract_dir = self.extract(self.download(url, md5sum))
self.copyTree(guessworkdir(extract_dir), location) self.copyTree(guessworkdir(extract_dir), location)
${:post-install} ${:post-install}
...@@ -243,11 +243,11 @@ x86_64-md5sum = 4a185d3179862a35104603b9274452e7 ...@@ -243,11 +243,11 @@ x86_64-md5sum = 4a185d3179862a35104603b9274452e7
recipe = slapos.recipe.build recipe = slapos.recipe.build
location = ${buildout:bin-directory}/${:_buildout_section_name_} location = ${buildout:bin-directory}/${:_buildout_section_name_}
x86 = https://github.com/mozilla/geckodriver/releases/download/v${:version}/geckodriver-v${:version}-linux32.tar.gz ${:i686-md5sum} i386-linux-gnu = https://github.com/mozilla/geckodriver/releases/download/v${:version}/geckodriver-v${:version}-linux32.tar.gz ${:i686-md5sum}
x86-64 = https://github.com/mozilla/geckodriver/releases/download/v${:version}/geckodriver-v${:version}-linux64.tar.gz ${:x86_64-md5sum} x86_64-linux-gnu = https://github.com/mozilla/geckodriver/releases/download/v${:version}/geckodriver-v${:version}-linux64.tar.gz ${:x86_64-md5sum}
install = install =
import shutil import shutil
url, md5sum = options[guessPlatform()].split() url, md5sum = options[multiarch()].split()
extract_dir = self.extract(self.download(url, md5sum)) extract_dir = self.extract(self.download(url, md5sum))
shutil.copy(extract_dir + '/geckodriver', location) shutil.copy(extract_dir + '/geckodriver', location)
...@@ -20,10 +20,12 @@ officedir = libreoffice5.2 ...@@ -20,10 +20,12 @@ officedir = libreoffice5.2
install = install =
import os import os
import sys import sys
ARCH_DIR_MAP = { 'x86': 'x86', 'x86-64': 'x86_64' } arch = {
platform = guessPlatform() 'i386-linux-gnu': ('x86', 'x86'),
url = options['url'] % (ARCH_DIR_MAP[platform], platform) 'x86_64-linux-gnu': ('x86_64', 'x86-64'),
md5sum = options['md5sum_' + platform] }[multiarch()]
url = options['url'] % arch
md5sum = options['md5sum_' + arch[1]]
extract_dir = self.extract(self.download(url, md5sum)) extract_dir = self.extract(self.download(url, md5sum))
workdir = guessworkdir(extract_dir) workdir = guessworkdir(extract_dir)
storagedir = os.path.join(workdir, 'storage') storagedir = os.path.join(workdir, 'storage')
......
[buildout] [buildout]
parts = parts =
packer packer
[packer] [packer]
recipe = slapos.recipe.build recipe = slapos.recipe.build:download-unpacked
# here, two %s are used, first one is for directory name (eg. x86_64), and second one is for filename (eg. x86-64).
url_x86-64 = https://releases.hashicorp.com/packer/${:version}/packer_${:version}_linux_amd64.zip
url_x86 = https://releases.hashicorp.com/packer/${:version}/packer_${:version}_linux_386.zip
version = 0.7.5 version = 0.7.5
base = https://releases.hashicorp.com/packer/${:version}/packer_${:version}
# supported architectures md5sums i386-linux-gnu = ${:base}_linux_386.zip a545108a0ccfde7c1e74de6c4e6fdded
md5sum_x86 = a545108a0ccfde7c1e74de6c4e6fdded x86_64-linux-gnu = ${:base}_linux_amd64.zip f343d709b84db494e8d6ec38259aa4a6
md5sum_x86-64 = f343d709b84db494e8d6ec38259aa4a6
install =
import shutil
platform = guessPlatform()
url = options['url_' + platform]
md5sum = options['md5sum_' + platform]
extract_dir = self.extract(self.download(url, md5sum))
shutil.move(extract_dir, location)
...@@ -10,13 +10,13 @@ recipe = slapos.recipe.build ...@@ -10,13 +10,13 @@ recipe = slapos.recipe.build
slapos_promise = slapos_promise =
file:phantomjs-slapos file:phantomjs-slapos
x86 = https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-i686.tar.bz2 9c1426eef5b04679d65198b1bdd6ef88 base = https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux
x86-64 = https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2 f278996c3edd0e8d8ec4893807f27d71 i386-linux-gnu = ${:base}-i686.tar.bz2 9c1426eef5b04679d65198b1bdd6ef88
x86_64-linux-gnu = ${:base}-x86_64.tar.bz2 f278996c3edd0e8d8ec4893807f27d71
install = install =
import os import os
url, md5sum = options[guessPlatform()].split() extract_dir = self.extract(self.download(*options[multiarch()].split()))
extract_dir = self.extract(self.download(url, md5sum))
workdir = guessworkdir(extract_dir) workdir = guessworkdir(extract_dir)
self.copyTree(workdir, location) self.copyTree(workdir, location)
with open(os.path.join(location, "phantomjs-slapos"), 'w') as wrapper: with open(os.path.join(location, "phantomjs-slapos"), 'w') as wrapper:
......
...@@ -16,19 +16,13 @@ parts = ...@@ -16,19 +16,13 @@ parts =
recipe = slapos.recipe.build recipe = slapos.recipe.build
# here, two %s are used, first one is for directory name (eg. x86_64), and second one is for filename (eg. x86-64). # here, two %s are used, first one is for directory name (eg. x86_64), and second one is for filename (eg. x86-64).
url_x86-64 = http://download.gna.org/wkhtmltopdf/0.12/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz base = http://download.gna.org/wkhtmltopdf/0.12/0.12.4/wkhtmltox-0.12.4_linux-generic
url_x86 = http://download.gna.org/wkhtmltopdf/0.12/0.12.4/wkhtmltox-0.12.4_linux-generic-i386.tar.xz i386-linux-gnu = ${:base}-i386.tar.xz ce1a2c0b2cf786ccc5d5828c42c99ddd
x86_64-linux-gnu = ${:base}-amd64.tar.xz 96b7306cebb9e65355f69f7ab63df68b
# supported architectures md5sums
md5sum_x86 = ce1a2c0b2cf786ccc5d5828c42c99ddd
md5sum_x86-64 = 96b7306cebb9e65355f69f7ab63df68b
install = install =
import os,shutil, sys, tempfile import os,shutil, sys, tempfile
platform = guessPlatform() path = self.download(*options[multiarch()].split())
url = options['url_' + platform]
md5sum = options['md5sum_' + platform]
path = self.download(url, md5sum)
extract_dir = tempfile.mkdtemp(self.name) extract_dir = tempfile.mkdtemp(self.name)
self.cleanup_dir_list.append(extract_dir) self.cleanup_dir_list.append(extract_dir)
self.logger.debug('Created working directory %s', extract_dir) self.logger.debug('Created working directory %s', extract_dir)
......
...@@ -194,7 +194,7 @@ slapos.extension.strip = 0.4 ...@@ -194,7 +194,7 @@ slapos.extension.strip = 0.4
slapos.extension.shared = 1.0 slapos.extension.shared = 1.0
slapos.libnetworkcache = 0.20 slapos.libnetworkcache = 0.20
slapos.rebootstrap = 4.5 slapos.rebootstrap = 4.5
slapos.recipe.build = 0.51 slapos.recipe.build = 0.52
slapos.recipe.cmmi = 0.18 slapos.recipe.cmmi = 0.18
slapos.recipe.template = 4.6 slapos.recipe.template = 4.6
slapos.toolbox = 0.126 slapos.toolbox = 0.126
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment