Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Justin
slapos
Commits
f78ac6fd
Commit
f78ac6fd
authored
Dec 26, 2021
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
version up: zc.buildout 2.7.1+slapos015, slapos.recipe.build 0.53, slapos.recipe.cmmi 0.19
parent
35e4d094
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
172 additions
and
177 deletions
+172
-177
component/chromedriver/buildout.cfg
component/chromedriver/buildout.cfg
+16
-29
component/chromium/buildout.cfg
component/chromium/buildout.cfg
+20
-45
component/consul/buildout.cfg
component/consul/buildout.cfg
+9
-3
component/firefox/buildout.cfg
component/firefox/buildout.cfg
+43
-35
component/libreoffice-bin/buildout.cfg
component/libreoffice-bin/buildout.cfg
+12
-13
component/packer/buildout.cfg
component/packer/buildout.cfg
+9
-3
component/phantomjs/buildout.cfg
component/phantomjs/buildout.cfg
+20
-14
component/wkhtmltopdf/buildout.cfg
component/wkhtmltopdf/buildout.cfg
+33
-22
software/kvm/buildout.hash.cfg
software/kvm/buildout.hash.cfg
+1
-1
software/kvm/instance-kvm.cfg.jinja2
software/kvm/instance-kvm.cfg.jinja2
+6
-9
stack/slapos.cfg
stack/slapos.cfg
+3
-3
No files found.
component/chromedriver/buildout.cfg
View file @
f78ac6fd
...
@@ -15,37 +15,29 @@ parts =
...
@@ -15,37 +15,29 @@ parts =
[chromedriver-wrapper-91]
[chromedriver-wrapper-91]
<= chromedriver-wrapper
<= chromedriver-wrapper
wrapper-name = chromedriver-91
part = chromedriver-91
part = ${chromedriver-91:location}
[chromedriver-wrapper-2.41]
[chromedriver-wrapper-2.41]
<= chromedriver-wrapper
<= chromedriver-wrapper
wrapper-name = chromedriver-2.41
part = chromedriver-2.41
part = ${chromedriver-2.41:location}
[chromedriver-wrapper]
[chromedriver-wrapper]
# generate a wrapper named ${:wrapper-name} setting $LD_LIBRARY_PATH
# generate a wrapper named ${:wrapper-name} setting $LD_LIBRARY_PATH
# to run chromedriver installed from ${:part}
# to run chromedriver installed from ${:part}
wrapper-name = chromedriver
part = chromedriver
part = ${chromedriver:location}
recipe = slapos.recipe.build
recipe = slapos.recipe.build
location = ${buildout:bin-directory}/${:wrapper-name}
location = ${buildout:bin-directory}/${:part}
init =
self.buildout[options['part']]
install =
install =
import os
import os
chromedriver = options['part']
part = self.buildout[options['part']]
part = self.buildout[os.path.basename(chromedriver)]
with open(location, 'w') as f:
with open(location, 'w') as f:
f.write("""#!/bin/sh -e
f.write("""#!/bin/sh -e
cd {}
export LD_LIBRARY_PATH=%s
export LD_LIBRARY_PATH=$PWD:{}
exec %s/chromedriver "$@"
export PATH={}:$PATH
""" % (':'.join(part['library'].split()), part['location']))
exec ./chromedriver "$@"
""".format(
chromedriver,
':'.join(part['library'].split()),
':'.join(part['path'].split()),
))
os.fchmod(f.fileno(), 0o755)
os.fchmod(f.fileno(), 0o755)
...
@@ -67,18 +59,13 @@ md5sum-x86_64 = cc43ba0babbfff7f22b48165ec8e8c81
...
@@ -67,18 +59,13 @@ md5sum-x86_64 = cc43ba0babbfff7f22b48165ec8e8c81
[chromedriver-download]
[chromedriver-download]
# Installs chromedriver ${version}.
# Installs chromedriver ${version}.
# This chromedriver is not usable directly, it needs a wrapper.
# This chromedriver is not usable directly, it needs a wrapper.
version =
recipe = slapos.recipe.build:download-unpacked
md5sum-x86_64 =
url = https://chromedriver.storage.googleapis.com/${:version}/chromedriver_${:_url}.zip
recipe = slapos.recipe.build
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
${libX11:location}/lib
${libX11:location}/lib
path =
install =
[chromedriver-download:getattr(sys,'_multiarch',None)=='x86_64-linux-gnu']
import os, shutil
_url = linux64
extract_dir = self.extract(self.download(*options[multiarch()].split()))
md5sum = ${:md5sum-x86_64}
os.mkdir(location)
shutil.copy(os.path.join(extract_dir, 'chromedriver'), location)
component/chromium/buildout.cfg
View file @
f78ac6fd
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
# in the system.
# in the system.
extends =
extends =
../alsa/buildout.cfg
../alsa/buildout.cfg
../coreutils/buildout.cfg
../cups/buildout.cfg
../cups/buildout.cfg
../dbus/buildout.cfg
../dbus/buildout.cfg
../findutils/buildout.cfg
../findutils/buildout.cfg
...
@@ -37,30 +36,30 @@ parts =
...
@@ -37,30 +36,30 @@ parts =
[chromium-wrapper]
[chromium-wrapper]
# Install a chromium wrapper named ${:
wrapper-name
} in buildout's bin-directory,
# Install a chromium wrapper named ${:
part
} in buildout's bin-directory,
# wrapping chromium installed in
${:part}
# wrapping chromium installed in
[${:part}]
# This [chromium-wrapper] installs the default chromium with name `chromium` and
# This [chromium-wrapper] installs the default chromium with name `chromium` and
# can also be used as a macro to install under a different name.
# can also be used as a macro to install under a different name.
wrapper-name = chromium
part = chromium
part = ${chromium:location}
recipe = slapos.recipe.build
recipe = slapos.recipe.build
location = ${buildout:bin-directory}/${:wrapper-name}
location = ${buildout:bin-directory}/${:part}
init =
self.buildout[options['part']]
install =
install =
import os
import os
chromium = options['part']
part = self.buildout[options['part']]
part = self.buildout[os.path.basename(chromium)]
with open(location, 'w') as f:
with open(location, 'w') as f:
f.write("""#!/bin/sh -e
f.write("""#!/bin/sh -e
cd {}
d=%s
# this also needs a $FONTCONFIG_FILE set, otherwise system fonts will be used and if
# this also needs a $FONTCONFIG_FILE set, otherwise system fonts will be used and if
# no system fonts are available, chrome will refuse to start with this error:
# no system fonts are available, chrome will refuse to start with this error:
# FATAL:platform_font_linux.cc(83)] Check failed: InitDefaultFont(). Could not find the default font
# FATAL:platform_font_linux.cc(83)] Check failed: InitDefaultFont(). Could not find the default font
export LD_LIBRARY_PATH=$
PWD:{}
export LD_LIBRARY_PATH=$
d:%s
export PATH=
{}
:$PATH
export PATH=
%s
:$PATH
exec
./chrome --disable-setuid-sandbox --no-sandbox --disable-gpu $@
exec
$d/chrome --disable-setuid-sandbox --no-sandbox --disable-gpu "$@"
"""
.format
(
"""
%
(
chromium
,
part['location']
,
':'.join(part['library'].split()),
':'.join(part['library'].split()),
':'.join(part['path'].split()),
':'.join(part['path'].split()),
))
))
...
@@ -68,13 +67,11 @@ install =
...
@@ -68,13 +67,11 @@ install =
[chromium-wrapper-91]
[chromium-wrapper-91]
<= chromium-wrapper
<= chromium-wrapper
wrapper-name = chromium-91
part = chromium-91
part = ${chromium-91:location}
[chromium-wrapper-69]
[chromium-wrapper-69]
<= chromium-wrapper
<= chromium-wrapper
wrapper-name = chromium-69
part = chromium-69
part = ${chromium-69:location}
[chromium]
[chromium]
...
@@ -101,24 +98,7 @@ generation-x86_64 = 1532051976706023
...
@@ -101,24 +98,7 @@ generation-x86_64 = 1532051976706023
[chromium-download]
[chromium-download]
# macro to download a binary build of chromium and generate a
# macro to download a binary build of chromium and generate a
# wrapper as chrome-slapos in the part directory
# wrapper as chrome-slapos in the part directory
recipe = slapos.recipe.build:download-unpacked
# the full version tag
version =
# needs the following URL parts:
# revision is from the "base position"
revision_x86-64 =
# generation is in the final download URL
generation-x86_64 =
# this is the md5sum of the downloaded archive
md5sum-x86_64 =
recipe = slapos.recipe.build
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 =
${atk:location}/lib
${atk:location}/lib
${at-spi2-atk:location}/lib
${at-spi2-atk:location}/lib
...
@@ -166,12 +146,7 @@ library =
...
@@ -166,12 +146,7 @@ library =
${zlib:location}/lib
${zlib:location}/lib
path =
path =
${fontconfig:location}/bin
${fontconfig:location}/bin
install =
url, md5sum = self.options[multiarch()].split()
[chromium-download:getattr(sys,'_multiarch',None)=='x86_64-linux-gnu']
extract_dir = self.extract(self.download(url, md5sum))
url = 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
self.copyTree(guessworkdir(extract_dir), location)
md5sum = ${:md5sum-x86_64}
# XXX adjust some permissions
import os
os.system("'${findutils:location}/bin/find' '%s' -type d -exec '${coreutils:location}/bin/chmod' a+rx {} \\;" % location)
os.system("'${findutils:location}/bin/find' '%s' -type f -executable -exec '${coreutils:location}/bin/chmod' a+rx {} \\;" % location)
os.system("'${findutils:location}/bin/find' '%s' -type f -exec '${coreutils:location}/bin/chmod' a+r {} \\;" % location)
component/consul/buildout.cfg
View file @
f78ac6fd
...
@@ -5,6 +5,12 @@ parts =
...
@@ -5,6 +5,12 @@ parts =
[consul]
[consul]
recipe = slapos.recipe.build:download-unpacked
recipe = slapos.recipe.build:download-unpacked
version = 0.8.3
version = 0.8.3
base = https://releases.hashicorp.com/consul/${:version}/consul_${:version}
url = https://releases.hashicorp.com/consul/${:version}/consul_${:version}_${:_url}.zip
i386-linux-gnu = ${:base}_linux_386.zip dfdc0eedd79baab7e6bc56c1582fd02e
x86_64-linux-gnu = ${:base}_linux_amd64.zip d6bc0898ea37ae2198370a9e1978d1bb
[consul:getattr(sys,'_multiarch',None)=='i386-linux-gnu']
_url = linux_386
md5sum = dfdc0eedd79baab7e6bc56c1582fd02e
[consul:getattr(sys,'_multiarch',None)=='x86_64-linux-gnu']
_url = linux_amd64
md5sum = d6bc0898ea37ae2198370a9e1978d1bb
component/firefox/buildout.cfg
View file @
f78ac6fd
...
@@ -3,6 +3,7 @@ extends =
...
@@ -3,6 +3,7 @@ extends =
../alsa/buildout.cfg
../alsa/buildout.cfg
../dbus/buildout.cfg
../dbus/buildout.cfg
../fontconfig/buildout.cfg
../fontconfig/buildout.cfg
../fonts/buildout.cfg
../gtk-2/buildout.cfg
../gtk-2/buildout.cfg
../gtk-3/buildout.cfg
../gtk-3/buildout.cfg
../libffi/buildout.cfg
../libffi/buildout.cfg
...
@@ -22,54 +23,52 @@ parts =
...
@@ -22,54 +23,52 @@ parts =
[firefox-wrapper]
[firefox-wrapper]
# Install a firefox wrapper name
s ${:wrapper-name
} in buildout's bin-directory,
# Install a firefox wrapper name
d ${:part
} in buildout's bin-directory,
# wrapping firefox installed in
${:part}
# wrapping firefox installed in
[${:part}]
# This [firefox-wrapper] installs the default firefox with name `firefox` and
# This [firefox-wrapper] installs the default firefox with name `firefox` and
# can also be used as a macro to install under a different name.
# can also be used as a macro to install under a different name.
wrapper-name = firefox
part = firefox
part = ${firefox:location}
recipe = slapos.recipe.build
recipe = slapos.recipe.build
location = ${buildout:bin-directory}/${:wrapper-name}
location = ${buildout:bin-directory}/${:part}
fonts-conf = ${firefox-default-fonts-conf:rendered}
init =
self.buildout[options['part']]
install =
install =
import os
import os
firefox = options['part']
part = self.buildout[options['part']]
part = self.buildout[os.path.basename(firefox)]
with open(location, 'w') as f:
with open(location, 'w') as f:
f.write("""#!/bin/sh -e
f.write("""#!/bin/sh -e
cd {}
d=%s
export LD_LIBRARY_PATH=$
PWD:{}
export LD_LIBRARY_PATH=$
d:%s
export PATH=
{}
:$PATH
export PATH=
%s
:$PATH
# BBB use a default fonts.conf for compatibility, but it's software instance
# BBB use a default fonts.conf for compatibility, but it's software instance
# responsability to build a fonts.conf with the fonts they want.
# responsability to build a fonts.conf with the fonts they want.
[
-z $FONTCONFIG_FILE ] && export FONTCONFIG_FILE=${firefox-default-fonts-conf:rendered}
[
"$FONTCONFIG_FILE" ] || export FONTCONFIG_FILE=%s
exec
.
/firefox "$@"
exec
$d
/firefox "$@"
"""
.format
(
"""
%
(
firefox
,
part['location']
,
':'.join(part['library'].split()),
':'.join(part['library'].split()),
':'.join(part['path'].split()),
':'.join(part['path'].split()),
options['fonts-conf'],
))
))
os.fchmod(f.fileno(), 0o755)
os.fchmod(f.fileno(), 0o755)
[firefox-wrapper-78]
[firefox-wrapper-78]
<= firefox-wrapper
<= firefox-wrapper
wrapper-name = firefox-78
part = firefox-78
part = ${firefox-78:location}
[firefox-wrapper-68]
[firefox-wrapper-68]
<= firefox-wrapper
<= firefox-wrapper
wrapper-name = firefox-68
part = firefox-68
part = ${firefox-68:location}
[firefox-wrapper-60]
[firefox-wrapper-60]
<= firefox-wrapper
<= firefox-wrapper
wrapper-name = firefox-60
part = firefox-60
part = ${firefox-60:location}
[firefox-wrapper-52]
[firefox-wrapper-52]
<= firefox-wrapper
<= firefox-wrapper
wrapper-name = firefox-52
part = firefox-52
part = ${firefox-52:location}
[firefox-default-fonts-conf]
[firefox-default-fonts-conf]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template:jinja2
...
@@ -124,8 +123,7 @@ recipe = slapos.recipe.build
...
@@ -124,8 +123,7 @@ recipe = slapos.recipe.build
slapos_promise =
slapos_promise =
file:firefox
file:firefox
i386-linux-gnu = https://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-i686/en-US/firefox-${:version}.tar.bz2 ${:i686-md5sum}
url = https://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/${:_url}/en-US/firefox-${:version}.tar.bz2
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
...
@@ -173,12 +171,19 @@ path =
...
@@ -173,12 +171,19 @@ path =
${fontconfig:location}/bin
${fontconfig:location}/bin
install =
install =
url, md5sum = options[multiarch()].split()
self.copyTree(guessworkdir(self.extract(self.download())), location)
extract_dir = self.extract(self.download(url, md5sum))
self.copyTree(guessworkdir(extract_dir), location)
${:post-install}
${:post-install}
post-install =
post-install =
[firefox-download:getattr(sys,'_multiarch',None)=='i386-linux-gnu']
_url = linux-i686
md5sum = ${:i686-md5sum}
[firefox-download:getattr(sys,'_multiarch',None)=='x86_64-linux-gnu']
_url = linux-x86_64
md5sum = ${:x86_64-md5sum}
[geckodriver]
[geckodriver]
# Current geckodriver installed as ${buildout:bin-directory}/geckodriver
# Current geckodriver installed as ${buildout:bin-directory}/geckodriver
<= geckodriver-0.24.0
<= geckodriver-0.24.0
...
@@ -201,17 +206,20 @@ version = 0.16.1
...
@@ -201,17 +206,20 @@ version = 0.16.1
i686-md5sum = not not on github
i686-md5sum = not not on github
x86_64-md5sum = 57dfd55d4759d9878eb75b4c0123d00c
x86_64-md5sum = 57dfd55d4759d9878eb75b4c0123d00c
[geckodriver-base]
[geckodriver-base]
# Installs geckodriver ${version}
# Installs geckodriver ${version}
recipe = slapos.recipe.build
recipe = slapos.recipe.build
url = https://github.com/mozilla/geckodriver/releases/download/v${:version}/geckodriver-v${:version}-${:_url}.tar.gz
location = ${buildout:bin-directory}/${:_buildout_section_name_}
location = ${buildout:bin-directory}/${:_buildout_section_name_}
install =
import os, shutil
extract_dir = self.extract(self.download(options['url'], options['md5sum']))
shutil.copy(os.path.join(extract_dir, 'geckodriver'), location)
i386-linux-gnu = https://github.com/mozilla/geckodriver/releases/download/v${:version}/geckodriver-v${:version}-linux32.tar.gz ${:i686-md5sum}
[geckodriver-base:getattr(sys,'_multiarch',None)=='i386-linux-gnu']
x86_64-linux-gnu = https://github.com/mozilla/geckodriver/releases/download/v${:version}/geckodriver-v${:version}-linux64.tar.gz ${:x86_64-md5sum}
_url = linux32
md5sum = ${:i686-md5sum}
install =
[geckodriver-base:getattr(sys,'_multiarch',None)=='x86_64-linux-gnu']
import shutil
_url = linux64
url, md5sum = options[multiarch()].split()
md5sum = ${:x86_64-md5sum}
extract_dir = self.extract(self.download(url, md5sum))
shutil.copy(extract_dir + '/geckodriver', location)
component/libreoffice-bin/buildout.cfg
View file @
f78ac6fd
...
@@ -8,26 +8,15 @@ parts =
...
@@ -8,26 +8,15 @@ parts =
[libreoffice-bin]
[libreoffice-bin]
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).
version = 5.2.4.2
version = 5.2.4.2
url = http://downloadarchive.documentfoundation.org/libreoffice/old/${:version}/rpm/%s/LibreOffice_${:version}_Linux_%s_rpm.tar.gz
url = http://downloadarchive.documentfoundation.org/libreoffice/old/${:version}/rpm/${:_url1}/LibreOffice_${:version}_${:_url2}_rpm.tar.gz
# supported architectures md5sums
md5sum_x86 = 7a0b33a2d18f06143258c428c32de213
md5sum_x86-64 = cbea6cd17063b5bcbe0cb32f7819f0cf
# where office code can be found?
# where office code can be found?
officedir = libreoffice5.2
officedir = libreoffice5.2
install =
install =
import os
import os
import sys
import sys
arch = {
workdir = guessworkdir(self.extract(self.download()))
'i386-linux-gnu': ('x86', 'x86'),
'x86_64-linux-gnu': ('x86_64', 'x86-64'),
}[multiarch()]
url = options['url'] % arch
md5sum = options['md5sum_' + arch[1]]
extract_dir = self.extract(self.download(url, md5sum))
workdir = guessworkdir(extract_dir)
storagedir = os.path.join(workdir, 'storage')
storagedir = os.path.join(workdir, 'storage')
os.mkdir(storagedir)
os.mkdir(storagedir)
rpmsdir = os.path.join(workdir, 'RPMS')
rpmsdir = os.path.join(workdir, 'RPMS')
...
@@ -48,3 +37,13 @@ install =
...
@@ -48,3 +37,13 @@ install =
# helper binaries
# helper binaries
cpio = ${cpio:location}/bin/cpio
cpio = ${cpio:location}/bin/cpio
rpm2cpio = ${rpm2cpio:target}
rpm2cpio = ${rpm2cpio:target}
[libreoffice-bin:getattr(sys,'_multiarch',None)=='i386-linux-gnu']
_url1 = x86
_url2 = Linux_x86
md5sum = 7a0b33a2d18f06143258c428c32de213
[libreoffice-bin:getattr(sys,'_multiarch',None)=='x86_64-linux-gnu']
_url1 = x86_64
_url2 = Linux_x86-64
md5sum = cbea6cd17063b5bcbe0cb32f7819f0cf
component/packer/buildout.cfg
View file @
f78ac6fd
...
@@ -5,6 +5,12 @@ parts =
...
@@ -5,6 +5,12 @@ parts =
[packer]
[packer]
recipe = slapos.recipe.build:download-unpacked
recipe = slapos.recipe.build:download-unpacked
version = 0.7.5
version = 0.7.5
base = https://releases.hashicorp.com/packer/${:version}/packer_${:version}
url = https://releases.hashicorp.com/packer/${:version}/packer_${:version}_${:_url}.zip
i386-linux-gnu = ${:base}_linux_386.zip a545108a0ccfde7c1e74de6c4e6fdded
x86_64-linux-gnu = ${:base}_linux_amd64.zip f343d709b84db494e8d6ec38259aa4a6
[packer:getattr(sys,'_multiarch',None)=='i386-linux-gnu']
_url = linux_386
md5sum = a545108a0ccfde7c1e74de6c4e6fdded
[packer:getattr(sys,'_multiarch',None)=='x86_64-linux-gnu']
_url = linux_amd64
md5sum = f343d709b84db494e8d6ec38259aa4a6
component/phantomjs/buildout.cfg
View file @
f78ac6fd
...
@@ -10,26 +10,32 @@ recipe = slapos.recipe.build
...
@@ -10,26 +10,32 @@ recipe = slapos.recipe.build
slapos_promise =
slapos_promise =
file:phantomjs-slapos
file:phantomjs-slapos
url = https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux${:url-extension}
url = https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-${:_url}.tar.bz2
install =
install =
import os
import os
extract_dir = self.extract(self.download(options['url'], options['md5sum']))
self.copyTree(guessworkdir(self.extract(self.download())), location)
workdir = guessworkdir(extract_dir)
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:
wrapper.write("""#!/bin/sh -e
wrapper.write("""#!/bin/sh -e
cd %(location)s
export LD_LIBRARY_PATH=%s
export LD_LIBRARY_PATH=%(location)s:${freetype:location}/lib/:${fontconfig:location}/lib/:${libexpat:location}/lib
export PATH=%s:$PATH
export PATH=${fontconfig:location}/bin:$PATH
exec %s/bin/phantomjs "$@"
exec %(location)s/bin/phantomjs "$@"
""" % (
""" % options)
':'.join(options['library'].split()),
':'.join(options['path'].split()),
location,
))
os.fchmod(wrapper.fileno(), 0o755)
os.fchmod(wrapper.fileno(), 0o755)
library =
${freetype:location}/lib
${fontconfig:location}/lib
${libexpat:location}/lib
path =
${fontconfig:location}/bin
[phantomjs:
bits32
]
[phantomjs:
getattr(sys,'_multiarch',None)=='i386-linux-gnu'
]
url-extension = -i686.tar.bz2
_url = linux-i686
md5sum = 9c1426eef5b04679d65198b1bdd6ef88
md5sum = 9c1426eef5b04679d65198b1bdd6ef88
[phantomjs:
bits64
]
[phantomjs:
getattr(sys,'_multiarch',None)=='x86_64-linux-gnu'
]
url-extension = -x86_64.tar.bz2
_url = linux-x86_64
md5sum = f278996c3edd0e8d8ec4893807f27d71
md5sum = f278996c3edd0e8d8ec4893807f27d71
component/wkhtmltopdf/buildout.cfg
View file @
f78ac6fd
...
@@ -4,7 +4,6 @@ extends =
...
@@ -4,7 +4,6 @@ extends =
../freetype/buildout.cfg
../freetype/buildout.cfg
../fontconfig/buildout.cfg
../fontconfig/buildout.cfg
../libpng/buildout.cfg
../libpng/buildout.cfg
../tar/buildout.cfg
../xorg/buildout.cfg
../xorg/buildout.cfg
../xz-utils/buildout.cfg
../xz-utils/buildout.cfg
../zlib/buildout.cfg
../zlib/buildout.cfg
...
@@ -14,27 +13,39 @@ parts =
...
@@ -14,27 +13,39 @@ parts =
[wkhtmltopdf]
[wkhtmltopdf]
recipe = slapos.recipe.build
recipe = slapos.recipe.build
url = http://download.gna.org/wkhtmltopdf/0.12/0.12.4/wkhtmltox-0.12.4_${:_url}.tar.xz
# here, two %s are used, first one is for directory name (eg. x86_64), and second one is for filename (eg. x86-64).
environment =
base = http://download.gna.org/wkhtmltopdf/0.12/0.12.4/wkhtmltox-0.12.4_linux-generic
PATH=${xz-utils:location}/bin:%(PATH)s
i386-linux-gnu = ${:base}-i386.tar.xz ce1a2c0b2cf786ccc5d5828c42c99ddd
x86_64-linux-gnu = ${:base}-amd64.tar.xz 96b7306cebb9e65355f69f7ab63df68b
install =
install =
import os,shutil, sys, tempfile
import os
path = self.download(*options[multiarch()].split())
self.copyTree(guessworkdir(self.extract(self.download())), location)
extract_dir = tempfile.mkdtemp(self.name)
self.cleanup_dir_list.append(extract_dir)
self.logger.debug('Created working directory %s', extract_dir)
env = os.environ.copy()
env["PATH"] = "${tar:location}/bin:${xz-utils:location}/bin" + (":" + env["PATH"] if env.get("PATH") else "")
env["LD_LIBRARY_PATH"] = "${xz-utils:location}/lib" + (":" + env["LD_LIBRARY_PATH"] if env.get("LD_LIBRARY_PATH") else "")
call(["tar", "xJf", path, "-C", extract_dir], env=env)
shutil.move(os.path.join(extract_dir, "wkhtmltox"), location)
with open(os.path.join(location, "wkhtmltopdf"), 'w') as wrapper:
with open(os.path.join(location, "wkhtmltopdf"), 'w') as wrapper:
wrapper.write("""#!/bin/sh
wrapper.write("""#!/bin/sh -e
export LD_LIBRARY_PATH=%(location)s/lib:${fontconfig:location}/lib:${freetype:location}/lib:${libX11:location}/lib:${libXext:location}/lib:${libXrender:location}/lib:${libpng12:location}/lib:${zlib:location}/lib
d=%s
export PATH=${fontconfig:location}/bin:$PATH
export LD_LIBRARY_PATH=$d/lib:%s
exec %(location)s/bin/wkhtmltopdf "$@"
export PATH=%s:$PATH
""" % options)
exec $d/bin/wkhtmltopdf "$@"
""" % (
location,
':'.join(options['library'].split()),
':'.join(options['path'].split()),
))
os.fchmod(wrapper.fileno(), 0o755)
os.fchmod(wrapper.fileno(), 0o755)
library =
${fontconfig:location}/lib
${freetype:location}/lib
${libX11:location}/lib
${libXext:location}/lib
${libXrender:location}/lib
${libpng12:location}/lib
${zlib:location}/lib
path =
${fontconfig:location}/bin
[wkhtmltopdf:getattr(sys,'_multiarch',None)=='i386-linux-gnu']
_url = linux-generic-i386
md5sum = ce1a2c0b2cf786ccc5d5828c42c99ddd
[wkhtmltopdf:getattr(sys,'_multiarch',None)=='x86_64-linux-gnu']
_url = linux-generic-amd64
md5sum = 96b7306cebb9e65355f69f7ab63df68b
software/kvm/buildout.hash.cfg
View file @
f78ac6fd
...
@@ -19,7 +19,7 @@ md5sum = 087f226ba90928dcc5a722d7008c867a
...
@@ -19,7 +19,7 @@ md5sum = 087f226ba90928dcc5a722d7008c867a
[template-kvm]
[template-kvm]
filename = instance-kvm.cfg.jinja2
filename = instance-kvm.cfg.jinja2
md5sum =
b260fce887535fc69a259d1fd31af1b2
md5sum =
d949e6100fd4e01819cc2867a65c6e65
[template-kvm-cluster]
[template-kvm-cluster]
filename = instance-kvm-cluster.cfg.jinja2.in
filename = instance-kvm-cluster.cfg.jinja2.in
...
...
software/kvm/instance-kvm.cfg.jinja2
View file @
f78ac6fd
...
@@ -1029,15 +1029,12 @@ config-command = ${ansible-vm-bin:rendered}
...
@@ -1029,15 +1029,12 @@ config-command = ${ansible-vm-bin:rendered}
{% if bootstrap_script_url -%}
{% if bootstrap_script_url -%}
[download-bootstrap-script]
[download-bootstrap-script]
recipe = slapos.recipe.build
recipe = slapos.recipe.build:download
location = ${directory:public}/vm-bootstrap
offline = false
install =
destination = ${directory:public}/vm-bootstrap
from zc.buildout.download import check_md5sum, urlretrieve, ChecksumError
{% set bootstrap_script_url = bootstrap_script_url.split('#') -%}
url, md5sum = {{ repr(bootstrap_script_url) }}.split('#')
url = {{ bootstrap_script_url[0] }}
urlretrieve(url, location)
md5sum = {{ bootstrap_script_url[1] }}
if not check_md5sum(location, md5sum):
os.remove(location)
raise ChecksumError
{% endif -%}
{% endif -%}
[logrotate-vm-bootstrap]
[logrotate-vm-bootstrap]
...
...
stack/slapos.cfg
View file @
f78ac6fd
...
@@ -132,7 +132,7 @@ eggs =
...
@@ -132,7 +132,7 @@ eggs =
[versions]
[versions]
setuptools = 44.1.1
setuptools = 44.1.1
# Use SlapOS patched zc.buildout
# Use SlapOS patched zc.buildout
zc.buildout = 2.7.1+slapos01
4
zc.buildout = 2.7.1+slapos01
5
# Use SlapOS patched zc.recipe.egg (zc.recipe.egg 2.x is for Buildout 2)
# Use SlapOS patched zc.recipe.egg (zc.recipe.egg 2.x is for Buildout 2)
zc.recipe.egg = 2.0.3+slapos003
zc.recipe.egg = 2.0.3+slapos003
...
@@ -195,8 +195,8 @@ slapos.extension.strip = 0.4
...
@@ -195,8 +195,8 @@ slapos.extension.strip = 0.4
slapos.extension.shared = 1.0
slapos.extension.shared = 1.0
slapos.libnetworkcache = 0.22
slapos.libnetworkcache = 0.22
slapos.rebootstrap = 4.5
slapos.rebootstrap = 4.5
slapos.recipe.build = 0.5
2
slapos.recipe.build = 0.5
3
slapos.recipe.cmmi = 0.1
8
slapos.recipe.cmmi = 0.1
9
slapos.recipe.template = 4.6
slapos.recipe.template = 4.6
slapos.toolbox = 0.126
slapos.toolbox = 0.126
stevedore = 1.21.0:whl
stevedore = 1.21.0:whl
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment