Commit da7f11af authored by Joanne Hugé's avatar Joanne Hugé

Update Release Candidate

parents 63802559 901d8da3
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged
[buildout]
parts =
bash
extends =
../gettext/buildout.cfg
../ncurses/buildout.cfg
../patch/buildout.cfg
parts =
bash
[bash]
recipe = slapos.recipe.cmmi
shared = true
url = http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz
md5sum = 81348932d5da294953e15d4814c74dd1
url-prefix = https://ftp.gnu.org/pub/gnu/bash/bash-5.1
url = ${:url-prefix}.tar.gz
md5sum = bb91a17fd6c9032c26d0b2b78b50aff5
patch-binary = ${patch:location}/bin/patch
patch-prefix = ${:url-prefix}-patches/bash51
patches =
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-001#1ab682b4e36afa4cf1b426aa7ac81c0d
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-002#8fc22cf50ec85da00f6af3d66f7ddc1b
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-003#a41728eca78858758e26b5dea64ae506
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-004#bf8d53d227829d67235927689a03cc7a
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-005#c0c00935c8b8ffff76e8ab77e7be7d15
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-006#6f01e364cd092faa28dd7119f47ddb5f
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-007#dcf471d222bcd83283d3094e6ceeb6f8
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-008#f7553416646dc26c266454c78a916d36
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-009#7e73d2151f4064b484a4ba2c4b09960e
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-010#a275463d21735bb6d7161f9fbd320d8f
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-011#c17103ee20420d77e46b224c8d3fceda
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-012#3e2a057a19d02b3f92a3a09eacbc03ae
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-013#fb377143a996d4ff087a2771bc8332f9
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-014#1a1aaecc99a9d0cbc310e8e247dcc8b6
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-015#4f04387458a3c1b4d460d199f49991a8
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-016#90e759709720c4f877525bebc9d5dc06
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-017#11e4046e1b86070f6adbb7ffc89641be
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-018#cd5a9b46f5bea0dc0248c93c7dfac011
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-019#cff4dc024d9d3456888aaaf8a36ca774
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-020#167839c5f147347f4a03d88ab97ff787
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-021#1d350671c48dec30b34d8b81f09cd79d
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-022#11c349af66a55481a3215ef2520bec36
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-023#b3cb0d80fd0c47728264405cbb3b23c7
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-024#b5ea5600942acceb4b6f07313d2de74e
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-025#193c06f578d38ffdbaebae9c51a7551f
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-026#922578e2be7ed03729454e92ee8d3f3a
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-027#8ff6948b16f2db5c29b1b9ae1085bbe7
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-028#dd51fa67913b5dca45a702b672b3323f
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-029#0729364c977ef4271e9f8dfafadacf67
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-030#efb709fdb1368945513de23ccbfae053
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-031#236df1ac1130a033ed0dbe2d2115f28f
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-032#2360f7e79cfb28526f80021025ea5909
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-033#b551c4ee7b8713759e4143499d0bbd48
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-034#c9a56fbe0348e05a886dff97f2872b74
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-035#e564e8ab44ed1ca3a4e315a9f6cabdc9
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-036#b00ff66c41a7c0f06e191200981980b0
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-037#be2a7b05f6ae560313f3c9d5f7127bda
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-038#61e0522830b24fbe8c0d1b010f132470
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-039#a4775487abe958536751c8ce53cdf6f9
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-040#80d3587c58854e226055ef099ffeb535
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-041#20bf63eef7cb441c0b1cc49ef3191d03
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-042#70790646ae61e207c995e44931390e50
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-043#855a46955cb251534e80b4732b748e37
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-044#29623d3282fcbb37e1158136509b5bb8
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-045#4473244ca5abfd4b018ea26dc73e7412
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-046#7e5fb09991c077076b86e0e057798913
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-047#8483153bad1a6f52cadc3bd9a8df7835
http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-048#e9f5dc12a32b2e0d3961344e794f92b3
${:patch-prefix}-001#57641ddbf92fca25df92a443e36f285a
${:patch-prefix}-002#aed44842ed1a05fcfc3ef146991fdaef
${:patch-prefix}-003#bf96455600a86420d69f5166575192dd
${:patch-prefix}-004#d2c524dba0eea5dc5f00849cc84376a0
${:patch-prefix}-005#5081278e6c35154e28d09f582251c529
${:patch-prefix}-006#f4a8bcda4b7bd2c72b29c107027608a3
${:patch-prefix}-007#bf7816d63ee0476054bf18a488d8bb1b
${:patch-prefix}-008#7e5a30d864f834953b22a55c01c8690b
${:patch-prefix}-009#8e35f11cbfcefe2c07c64d00601fd713
${:patch-prefix}-010#d78ad19986c0355a8d67c9a0e82ad4aa
${:patch-prefix}-011#2416386b5ee94e499ccbf71f6fd4aebd
${:patch-prefix}-012#879b2d8a03162faebb7234c4cd57c5cd
configure-options =
--with-curses
environment =
CPPFLAGS=-I${ncurses:location}/include
LDFLAGS=-L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib
PATH=${patch:location}/bin:%(PATH)s
PATH=${gettext:location}/bin:%(PATH)s
......@@ -9,11 +9,10 @@ parts =
do-not-strip-path = ${buildout:parts-directory}/bazel/bin/bazel
[zulu]
recipe = hexagonit.recipe.download
ignore-existing = true
recipe = slapos.recipe.build:download-unpacked
shared = true
url = http://cdn.azul.com/zulu/bin/zulu8.20.0.5-jdk8.0.121-linux_x64.tar.gz
md5sum = e5f4b1d997e50ffe4998c68c8ec45403
strip-top-level-dir = true
[template-bazel-crosstool]
recipe = slapos.recipe.template:jinja2
......
[buildout]
extends =
../patch/buildout.cfg
parts = boa
[boa-patch-ENOSYS]
recipe = hexagonit.recipe.download
ignore-existing = true
url = http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/www-servers/boa/files/boa-0.94.14_rc21-ENOSYS.patch?revision=1.1
filename = boa-0.94.14_rc21-ENOSYS.patch
md5sum = 7206b342195961501ed1eae38486e5db
download-only = true
[boa]
recipe = slapos.recipe.build
url = http://www.boa.org/boa-0.94.14rc21.tar.gz
md5sum = e24b570bd767a124fcfb40a34d148ba9
patches =
${boa-patch-ENOSYS:location}/${boa-patch-ENOSYS:filename}
install =
import shutil
import os
url = self.download(self.options['url'], self.options['md5sum'])
extract_dir = self.extract(url)
workdir = guessworkdir(extract_dir)
self.applyPatchList(self.options.get('patches'), '-p1', cwd=workdir)
call(['./configure'], cwd=workdir)
call(['make'], cwd=workdir)
# Installation of boa. Manually, no make install
bindir = os.path.join(location, 'bin')
os.makedirs(bindir)
for name in 'boa', 'boa_indexer':
path = os.path.join(bindir, name)
shutil.copyfile(os.path.join(workdir, 'src', name), path)
os.chmod(path, 0755)
environment =
PATH=${patch:location}/bin:%(PATH)s
......@@ -71,7 +71,7 @@ version =
md5sum-x86_64 =
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 =
${nss:location}/lib
${nspr:location}/lib
......@@ -79,6 +79,6 @@ library =
path =
install =
import os, shutil
extract_dir = self.extract(self.download(*options[guessPlatform()].split()))
extract_dir = self.extract(self.download(*options[multiarch()].split()))
os.mkdir(location)
shutil.copy(os.path.join(extract_dir, 'chromedriver'), location)
......@@ -116,7 +116,7 @@ md5sum-x86_64 =
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 =
......@@ -167,7 +167,7 @@ library =
path =
${fontconfig:location}/bin
install =
url, md5sum = self.options[guessPlatform()].split()
url, md5sum = self.options[multiarch()].split()
extract_dir = self.extract(self.download(url, md5sum))
self.copyTree(guessworkdir(extract_dir), location)
# XXX adjust some permissions
......
[buildout]
parts =
consul
[consul]
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).
url_x86-64 = https://releases.hashicorp.com/consul/0.8.3/consul_0.8.3_linux_amd64.zip
url_x86 = https://releases.hashicorp.com/consul/0.8.3/consul_0.8.3_linux_386.zip
# 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)
recipe = slapos.recipe.build:download-unpacked
version = 0.8.3
base = https://releases.hashicorp.com/consul/${:version}/consul_${:version}
i386-linux-gnu = ${:base}_linux_386.zip dfdc0eedd79baab7e6bc56c1582fd02e
x86_64-linux-gnu = ${:base}_linux_amd64.zip d6bc0898ea37ae2198370a9e1978d1bb
......@@ -10,6 +10,7 @@ extends =
../zstd/buildout.cfg
../zlib/buildout.cfg
../nghttp2/buildout.cfg
../ca-certificates/buildout.cfg
parts =
curl
......@@ -38,6 +39,7 @@ configure-options =
--disable-alt-svc
--with-zlib=${zlib:location}
--with-ssl=${openssl:location}
--with-ca-path=${openssl:location}/etc/ssl/certs
--without-gnutls
--without-polarssl
--without-mbedtls
......
......@@ -136,8 +136,8 @@ recipe = slapos.recipe.build
slapos_promise =
file:firefox
x86 = 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}
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-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 =
${alsa:location}/lib
......@@ -185,7 +185,7 @@ path =
${fontconfig:location}/bin
install =
url, md5sum = options[guessPlatform()].split()
url, md5sum = options[multiarch()].split()
extract_dir = self.extract(self.download(url, md5sum))
self.copyTree(guessworkdir(extract_dir), location)
${:post-install}
......@@ -243,11 +243,11 @@ x86_64-md5sum = 4a185d3179862a35104603b9274452e7
recipe = slapos.recipe.build
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}
x86-64 = https://github.com/mozilla/geckodriver/releases/download/v${:version}/geckodriver-v${:version}-linux64.tar.gz ${:x86_64-md5sum}
i386-linux-gnu = https://github.com/mozilla/geckodriver/releases/download/v${:version}/geckodriver-v${:version}-linux32.tar.gz ${:i686-md5sum}
x86_64-linux-gnu = https://github.com/mozilla/geckodriver/releases/download/v${:version}/geckodriver-v${:version}-linux64.tar.gz ${:x86_64-md5sum}
install =
import shutil
url, md5sum = options[guessPlatform()].split()
url, md5sum = options[multiarch()].split()
extract_dir = self.extract(self.download(url, md5sum))
shutil.copy(extract_dir + '/geckodriver', location)
......@@ -103,10 +103,8 @@ environment =
GI_LIBS=-L${gobject-introspection:location}/lib -lgirepository-1.0
[trusted-config]
recipe = hexagonit.recipe.download
ignore-existing = true
url = https://raw.githubusercontent.com/t-woerner/firewalld/v0.3.14/config/zones/trusted.xml
download-only = true
recipe = slapos.recipe.build:download
url = https://raw.githubusercontent.com/t-woerner/firewalld/v0.3.14/config/zones/${:filename}
filename = trusted.xml
md5sum = 893752ba2e93a1e96334dfee19f884ad
......
......@@ -6,6 +6,7 @@ extends =
../git/buildout.cfg
../pkgconfig/buildout.cfg
../swig/buildout.cfg
../patch/buildout.cfg
./buildout.hash.cfg
parts = gowork go
......@@ -22,10 +23,19 @@ make-targets= cd src && unset GOBIN && ./all.bash && cp -alf .. ${:location}
# some testdata files have an issue with slapos.extension.strip.
post-install = ${findutils:location}/bin/find ${:location}/src -type d -name testdata -exec rm -rf {} \; || true
environment =
PATH=${swig:location}/bin:%(PATH)s
PATH=${swig:location}/bin:${patch:location}/bin:%(PATH)s
GOROOT_FINAL=${:location}
${:environment-extra}
# TestChown and TestSCMCredentials currently fail in a user-namespace
# https://github.com/golang/go/issues/42525
# the patches apply to go >= 1.12
patch-options = -p1
patches =
${:_profile_base_location_}/skip-chown-tests.patch#d4e3c8ef83788fb2a5d80dd75034786f
${:_profile_base_location_}/fix-TestSCMCredentials.patch#1d8dbc97cd579e03fafd8627d48f1c59
[golang14]
<= golang-common
# https://golang.org/doc/install/source#bootstrapFromSource
......@@ -34,6 +44,9 @@ md5sum = dbf727a4b0e365bf88d97cbfde590016
environment-extra =
make-targets= cd src && unset GOBIN && ./make.bash && cp -alf .. ${:location}
# skip-chown-tests.patch does not apply to go1.4, but we don't run go1.4 tests.
patches =
[golang1.12]
<= golang-common
......
From 385ca858ac89efccffd557eccc1113281306bd88 Mon Sep 17 00:00:00 2001
From: Kirill Smelkov <kirr@nexedi.com>
Date: Mon, 6 Dec 2021 22:50:27 +0300
Subject: [PATCH] syscall: tests: Fix TestSCMCredentials for `unshare -Umc`
---
src/syscall/creds_test.go | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/syscall/creds_test.go b/src/syscall/creds_test.go
index c1a8b516e8..ed6e80c0c3 100644
--- a/src/syscall/creds_test.go
+++ b/src/syscall/creds_test.go
@@ -78,8 +78,10 @@ func TestSCMCredentials(t *testing.T) {
if sys, ok := err.(*os.SyscallError); ok {
err = sys.Err
}
- if err != syscall.EPERM {
- t.Fatalf("WriteMsgUnix failed with %v, want EPERM", err)
+ // can get EINVAL instead of EPERM under `unshare -Umc` because uid0 is not mapped and maps to -1
+ // see also https://github.com/golang/go/issues/42525
+ if !(err == syscall.EPERM || err == syscall.EINVAL) {
+ t.Fatalf("WriteMsgUnix failed with %v, want EPERM/EINVAL", err)
}
}
--
2.30.2
From: regnat <rg@regnat.ovh>
Date: Wed, 3 Nov 2021 10:17:28 +0100
Subject: [PATCH] Disable the chown tests
See https://github.com/golang/go/issues/42525 and
https://github.com/NixOS/nix/issues/3245
---
os/os_unix_test.go | 3 +++
1 file changed, 3 insertions(+)
diff --git a/os/os_unix_test.go b/os/os_unix_test.go
index 51693fd..0936542 100644
--- a/src/os/os_unix_test.go
+++ b/src/os/os_unix_test.go
@@ -40,6 +40,7 @@ func checkUidGid(t *testing.T, path string, uid, gid int) {
}
func TestChown(t *testing.T) {
+ t.Skipf("https://github.com/golang/go/issues/42525")
// Use TempDir() to make sure we're on a local file system,
// so that the group ids returned by Getgroups will be allowed
// on the file. On NFS, the Getgroups groups are
@@ -83,6 +84,7 @@ func TestChown(t *testing.T) {
}
func TestFileChown(t *testing.T) {
+ t.Skipf("https://github.com/golang/go/issues/42525")
// Use TempDir() to make sure we're on a local file system,
// so that the group ids returned by Getgroups will be allowed
// on the file. On NFS, the Getgroups groups are
@@ -126,6 +128,7 @@ func TestFileChown(t *testing.T) {
}
func TestLchown(t *testing.T) {
+ t.Skipf("https://github.com/golang/go/issues/42525")
// Use TempDir() to make sure we're on a local file system,
// so that the group ids returned by Getgroups will be allowed
// on the file. On NFS, the Getgroups groups are
--
2.31.1
......@@ -70,7 +70,7 @@ scripts = helloweb=helloweb-python
# rubygemsrecipe with fixed url and this way pinned rubygems version
recipe = rubygemsrecipe
url = https://rubygems.org/rubygems/rubygems-2.5.2.zip
ruby-location = ${ruby2.1:location}
ruby-location = ${ruby:location}
ruby-executable = ${:ruby-location}/bin/ruby
gems = bundler==1.11.2
......
From 3859e99f50abe11a8dade28efa9ea3d99dfaac11 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petar=20Koreti=C4=87?= <petar.koretic@gmail.com>
Date: Fri, 11 Apr 2014 10:03:40 +0200
Subject: [RFC 1/2] Remove unused variable 'size'
---
json_tokener.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/json_tokener.c b/json_tokener.c
index 19de8ef..9a76293 100644
--- a/json_tokener.c
+++ b/json_tokener.c
@@ -352,12 +352,10 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok,
case json_tokener_state_inf: /* aka starts with 'i' */
{
- int size;
int size_inf;
int is_negative = 0;
printbuf_memappend_fast(tok->pb, &c, 1);
- size = json_min(tok->st_pos+1, json_null_str_len);
size_inf = json_min(tok->st_pos+1, json_inf_str_len);
char *infbuf = tok->pb->buf;
if (*infbuf == '-')
--
2.5.0
From 89ae583a8624fad6be4a7d1da084b0c410e4fc63 Mon Sep 17 00:00:00 2001
From: Stuart Walsh <stu@ipng.org.uk>
Date: Tue, 31 Mar 2015 12:23:03 +0100
Subject: [RFC 2/2] Fix uninitialised variable compile warning, and also fix
unused-when-used warning
---
json_object.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/json_object.h b/json_object.h
index 200ac40..e6c6a4f 100644
--- a/json_object.h
+++ b/json_object.h
@@ -339,8 +339,8 @@ extern void json_object_object_del(struct json_object* obj, const char *key);
#if defined(__GNUC__) && !defined(__STRICT_ANSI__) && __STDC_VERSION__ >= 199901L
# define json_object_object_foreach(obj,key,val) \
- char *key; \
- struct json_object *val __attribute__((__unused__)); \
+ char *key = NULL; \
+ struct json_object *val = NULL; \
for(struct lh_entry *entry ## key = json_object_get_object(obj)->head, *entry_next ## key = NULL; \
({ if(entry ## key) { \
key = (char*)entry ## key->k; \
--
2.5.0
[buildout]
extends =
../patch/buildout.cfg
parts =
json-c
[json-c-patch-base]
recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/${:filename}
download-only = true
[json-c-patch-3859e99f50abe11a8dade28efa9ea3d99dfaac11]
< = json-c-patch-base
filename = 0001-Remove-unused-variable-size.patch
md5sum = e8ebc602fbab128d22f1216cb15c4626
[json-c-patch-89ae583a8624fad6be4a7d1da084b0c410e4fc63]
< = json-c-patch-base
filename = 0002-Fix-uninitialised-variable-compile-warning-and-also-.patch
md5sum = 5525ab9ee78157ce6d6100e374ac7767
[json-c]
recipe = slapos.recipe.cmmi
url = https://s3.amazonaws.com/json-c_releases/releases/json-c-0.12.tar.gz
md5sum = 3ca4bbb881dfc4017e8021b5e0a8c491
patch-options = -p1
patches =
${json-c-patch-3859e99f50abe11a8dade28efa9ea3d99dfaac11:location}/${json-c-patch-3859e99f50abe11a8dade28efa9ea3d99dfaac11:filename}
${json-c-patch-89ae583a8624fad6be4a7d1da084b0c410e4fc63:location}/${json-c-patch-89ae583a8624fad6be4a7d1da084b0c410e4fc63:filename}
environment =
PATH=${patch:location}/bin:%(PATH)s
......@@ -22,7 +22,6 @@ python_executable = ${buildout:bin-directory}/${:interpreter}
[download-file-base]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
download-only = true
[jupyter-notebook-config]
<= download-file-base
......
[buildout]
extends =
../patch/buildout.cfg
parts =
libiconv
[libiconv.gets.patch]
recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/${:filename}
md5sum = 8a20d8afe0617fce56f77537d2b84621
download-only = true
filename = libiconv.gets.patch
[libiconv]
virtual-depends =
${libiconv.gets.patch:md5sum}
patch-binary = ${patch:location}/bin/patch
patch-options = -p1
patches =
${libiconv.gets.patch:location}/${libiconv.gets.patch:filename}
${:_profile_base_location_}/libiconv.gets.patch#8a20d8afe0617fce56f77537d2b84621
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
md5sum = e34509b1623cec449dfeb73d7ce9c6c6
......@@ -20,10 +20,12 @@ officedir = libreoffice5.2
install =
import os
import sys
ARCH_DIR_MAP = { 'x86': 'x86', 'x86-64': 'x86_64' }
platform = guessPlatform()
url = options['url'] % (ARCH_DIR_MAP[platform], platform)
md5sum = options['md5sum_' + platform]
arch = {
'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')
......
[buildout]
parts = memcached
extends =
../autoconf/buildout.cfg
../automake/buildout.cfg
../libevent/buildout.cfg
[memcached-fix-array-subscript-is-above-array-bounds]
recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/${:filename}
filename = memcached-1.4-fix-array-subscript-is-above-array-bounds.patch
download-only = true
md5sum = 472508b9a4b6c0b9f5d6f2abce3444e3
[memcached-gcc-4.4.patch]
recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/${:filename}
filename = memcached-gcc-4.4.patch
download-only = true
md5sum = fd98d0cbfc4d3a25ac9808472fbe62f8
[memcached]
recipe = slapos.recipe.cmmi
url = http://memcached.googlecode.com/files/memcached-1.4.8.tar.gz
md5sum = b7104e269511621c2777367d6d6315fe
patches =
${memcached-fix-array-subscript-is-above-array-bounds:location}/${memcached-fix-array-subscript-is-above-array-bounds:filename} ${memcached-gcc-4.4.patch:location}/${memcached-gcc-4.4.patch:filename}
patch-options = -p1
configure-command =
aclocal
autoheader
automake --foreign
autoconf
./configure
configure-options =
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
--with-libevent=${libevent:location}
--disable-docs
environment =
PATH=${autoconf:location}/bin:${automake:location}/bin:%(PATH)s
LDFLAGS =-Wl,-rpath=${libevent:location}/lib
Took originally from OpenSuse spec. Needed on opensuse to avoid "error: array subscript is above array bounds"
--- memcached-orig/memcached.c
+++ memcached-new/memcached.c 2010/05/06 11:40:56
@@ -2335,15 +2335,18 @@
inline static void process_stats_detail(conn *c, const char *command) {
assert(c != NULL);
- if (strcmp(command, "on") == 0) {
+ char on[] = "on";
+ char off[] = "off";
+ char dump[] = "dump";
+ if (strcmp(command, on) == 0) {
settings.detail_enabled = 1;
out_string(c, "OK");
}
- else if (strcmp(command, "off") == 0) {
+ else if (strcmp(command, off) == 0) {
settings.detail_enabled = 0;
out_string(c, "OK");
}
- else if (strcmp(command, "dump") == 0) {
+ else if (strcmp(command, dump) == 0) {
int len;
char *stats = stats_prefix_dump(&len);
write_and_free(c, stats, len);
# In OpenSuse 11.2, 'gcc -dumpversion' returns '4.4', not '4.4.*'.
--- memcached-1.4.8/configure.ac.orig
+++ memcached-1.4.8/configure.ac
@@ -502,7 +502,7 @@
GCC_VERSION=`$CC -dumpversion`
CFLAGS="$CFLAGS -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls"
case $GCC_VERSION in
- 4.4.*)
+ 4.4 | 4.4.*)
CFLAGS="$CFLAGS -fno-strict-aliasing"
;;
esac
[buildout]
extends =
../patch/buildout.cfg
parts =
ncurses
......@@ -9,13 +7,10 @@ recipe = slapos.recipe.cmmi
shared = true
url = http://ftp.gnu.org/gnu/ncurses/ncurses-6.2.tar.gz
md5sum = e812da327b1c2214ac1aed440ea3ae8d
patch-options = -p1
patches =
${:_profile_base_location_}/ncurses-5.9-gcc-5.patch#57f4cd0cc0c0a42a5ddb2167f9546d72
configure-options =
--prefix=@@LOCATION@@
--prefix=%(location)s
--enable-pc-files
--with-pkg-config-libdir=@@LOCATION@@/lib/pkgconfig
--with-pkg-config-libdir=%(location)s/lib/pkgconfig
--with-shared
--without-ada
--without-manpages
......@@ -36,6 +31,5 @@ post-install =
# pass dummy LDCONFIG to skip needless calling of ldconfig by non-root user
environment =
LDCONFIG=/bin/echo
PATH=${patch:location}/bin:%(PATH)s
make-options =
-j1
https://bugs.gentoo.org/545114
extracted from the upstream change (which had many unrelated commits in one)
From 97bb4678dc03e753290b39bbff30ba2825df9517 Mon Sep 17 00:00:00 2001
From: "Thomas E. Dickey" <dickey@invisible-island.net>
Date: Sun, 7 Dec 2014 03:10:09 +0000
Subject: [PATCH] ncurses 5.9 - patch 20141206
+ modify MKlib_gen.sh to work around change in development version of
gcc introduced here:
https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html
https://gcc.gnu.org/ml/gcc-patches/2014-07/msg00236.html
(reports by Marcus Shawcroft, Maohui Lei).
diff --git a/ncurses/base/MKlib_gen.sh b/ncurses/base/MKlib_gen.sh
index d8cc3c9..b91398c 100755
--- a/ncurses/base/MKlib_gen.sh
+++ b/ncurses/base/MKlib_gen.sh
@@ -474,11 +474,22 @@ sed -n -f $ED1 \
-e 's/gen_$//' \
-e 's/ / /g' >>$TMP
+cat >$ED1 <<EOF
+s/ / /g
+s/^ //
+s/ $//
+s/P_NCURSES_BOOL/NCURSES_BOOL/g
+EOF
+
+# A patch discussed here:
+# https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html
+# introduces spurious #line markers. Work around that by ignoring the system's
+# attempt to define "bool" and using our own symbol here.
+sed -e 's/bool/P_NCURSES_BOOL/g' $TMP > $ED2
+cat $ED2 >$TMP
+
$preprocessor $TMP 2>/dev/null \
-| sed \
- -e 's/ / /g' \
- -e 's/^ //' \
- -e 's/_Bool/NCURSES_BOOL/g' \
+| sed -f $ED1 \
| $AWK -f $AW2 \
| sed -f $ED3 \
| sed \
[buildout]
parts =
neon
extends =
../libxml2/buildout.cfg
../openssl/buildout.cfg
../pkgconfig/buildout.cfg
../zlib/buildout.cfg
[neon]
recipe = slapos.recipe.cmmi
shared = true
url = http://www.webdav.org/neon/neon-0.29.5.tar.gz
md5sum = ff369e69ef0f0143beb5626164e87ae2
configure-options =
--disable-static
--enable-shared
--with-ssl=openssl
--without-expat
--without-gssapi
--with-libxml2
--enable-threadsafe-ssl=posix
--disable-nls
environment =
PATH=${libxml2:location}/bin:${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig:${libxml2:location}/lib/pkgconfig
CPPFLAGS=-I${openssl:location}/include -I${zlib:location}/include
LDFLAGS=-L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${libxml2:location}/lib
[buildout]
extends =
../pygolang/buildout.cfg
../util-linux/buildout.cfg
../python-prctl/buildout.cfg
../git/buildout.cfg
# nxdtest is bin/ program to run nxdtest.
# use ${nxdtest:exe} to run it.
[nxdtest]
recipe = zc.recipe.egg:scripts
eggs = ${pygolang:egg}
${nxdtest-egg:egg}
scripts = nxdtest
# convenience for nxdtest users
recipe = slapos.recipe.template:jinja2
exe = ${buildout:bin-directory}/nxdtest
rendered= ${:exe}
mode = 755
eggs = ${.nxdtest.pyexe:eggs}
template=
inline:
#!${.nxdtest.pyexe:exe}
# $PATH for unshare and mount
import os
path = os.environ.get('PATH', '')
if path != '':
path = ':' + path
os.environ['PATH'] = '${util-linux:location}/bin' + path
from nxdtest import main; main()
# .nxdtest.pyexe is python interpreter used by nxdtest.
# the interpreter is located at ${.nxdtest.pyexe:exe}.
[.nxdtest.pyexe]
<= python-interpreter
eggs +=
${pygolang:egg}
${nxdtest-egg:egg}
interpreter = ${:_buildout_section_name_}
exe = ${buildout:bin-directory}/${:interpreter}
[nxdtest-egg]
recipe = zc.recipe.egg:develop
setup = ${nxdtest-repository:location}
egg = nxdtest
depends = ${python-prctl:egg}
[nxdtest-repository]
recipe = slapos.recipe.build:gitclone
......
......@@ -17,7 +17,7 @@ egg = nxdtest[test]
[python-interpreter]
eggs +=
${pytest:eggs}
${nxdtest:eggs}
${nxdtest-egg:egg}
# env.sh for interpreter to be on $PATH.
[nxdtest-env.sh]
......
[buildout]
extends =
../patch/buildout.cfg
parts = ocropus
[ocropus-patch-scons]
recipe = hexagonit.recipe.download
ignore-existing = true
download-only = true
filename = ocropus.SConstruct-local-installation.patch
url = ${:_profile_base_location_}/${:filename}
md5sum = 08710ec022f3ce13e5c0b584dfee2c1c
[ocropus]
recipe = slapos.recipe.cmmi
url = http://www.nexedi.org/static/packages/source/ocropus/ocropus-0.4.4.tar.gz
md5sum = 1485dbe9aab27574bfe3c8b4395cf3ce
configure-options =
${iulib:location}
patches = ${ocropus-patch-scons:location}/${ocropus-patch-scons:filename}
patch-options = -p1
environment =
PATH=${patch:destination_directory}:${scons-bin:destination_directory}:%(PATH)s
[scons-local]
recipe = hexagonit.recipe.download
ignore-existing = true
url = http://prdownloads.sourceforge.net/scons/scons-local-2.0.1.tar.gz
[scons-bin]
recipe = plone.recipe.command
destination_directory = ${scons-local:location}
command =
ln -sf ${scons-local:location}/scons.py ${:destination_directory}/scons
[iulib-patch-scons]
recipe = hexagonit.recipe.download
ignore-existing = true
download-only = true
filename = iulib.SConstruct-libtiff-detection.patch
url = ${:_profile_base_location_}/${:filename}
md5sum = dbbdf909814fb84ffe47e2ff59980db7
[iulib]
recipe = slapos.recipe.cmmi
url = http://www.nexedi.org/static/packages/source/ocropus/iulib-0.4.4.tar.gz
md5sum = 3d9754dbd64c56029ce1cd7c2f61894c
# workaround http://code.google.com/p/iulib/issues/detail?id=27
patches = ${iulib-patch-scons:location}/${iulib-patch-scons:filename}
patch-options = -p1
environment =
PATH=${patch:destination_directory}:${scons-bin:destination_directory}:%(PATH)s
......@@ -13,14 +13,14 @@ extends =
parts = ocropy
[ocropy-eng-traineddata]
recipe = hexagonit.recipe.download
recipe = slapos.recipe.build:download
shared = true
filename = en-default.pyrnn.gz
md5sum = cedd140c7d7650e910f0550ad0f04727
download-only = true
url = https://raw.githubusercontent.com/zuphilip/ocropy-models/master/en-default.pyrnn.gz
url = https://raw.githubusercontent.com/zuphilip/ocropy-models/master/${:filename}
[ocropy-env]
OCROPY_MODEL_PATH = ${ocropy-eng-traineddata:location}/${ocropy-eng-traineddata:filename}
OCROPY_MODEL_PATH = ${ocropy-eng-traineddata:target}
HOME = ${ocropy:egg}
[ocropy]
......
# OpenOffice.org daemon software buildout
[buildout]
extends = ../openoffice-bin/buildout.cfg
parts +=
oood
[oood]
recipe = hexagonit.recipe.download
ignore-existing = true
url = http://www.nexedi.org/static/tarballs/oood/oood-r36294.tar.gz
md5sum = 9e71251eea4b310fd6bd4ebf8abf890e
strip-top-level-dir = true
......@@ -24,8 +24,8 @@ patch-options = -p1
patches =
${:_profile_base_location_}/no_create_privsep_path.patch#6ab983d16c9b4caf111c737dcad6ec9b
environment =
CPPFLAGS=-I${zlib:location}/include -I${openssl-1.0:location}/include
LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${openssl-1.0:location}/lib -Wl,-rpath=${openssl-1.0:location}/lib
CPPFLAGS=-I${zlib:location}/include -I${openssl:location}/include
LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib
configure-options =
--prefix=${:location}
--exec-prefix=${:location}
......
[buildout]
parts =
packer
[packer]
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).
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
recipe = slapos.recipe.build:download-unpacked
version = 0.7.5
# supported architectures md5sums
md5sum_x86 = a545108a0ccfde7c1e74de6c4e6fdded
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)
base = https://releases.hashicorp.com/packer/${:version}/packer_${:version}
i386-linux-gnu = ${:base}_linux_386.zip a545108a0ccfde7c1e74de6c4e6fdded
x86_64-linux-gnu = ${:base}_linux_amd64.zip f343d709b84db494e8d6ec38259aa4a6
......@@ -10,13 +10,13 @@ recipe = slapos.recipe.build
slapos_promise =
file:phantomjs-slapos
x86 = https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-i686.tar.bz2 9c1426eef5b04679d65198b1bdd6ef88
x86-64 = https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2 f278996c3edd0e8d8ec4893807f27d71
base = https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux
i386-linux-gnu = ${:base}-i686.tar.bz2 9c1426eef5b04679d65198b1bdd6ef88
x86_64-linux-gnu = ${:base}-x86_64.tar.bz2 f278996c3edd0e8d8ec4893807f27d71
install =
import os
url, md5sum = options[guessPlatform()].split()
extract_dir = self.extract(self.download(url, md5sum))
extract_dir = self.extract(self.download(*options[multiarch()].split()))
workdir = guessworkdir(extract_dir)
self.copyTree(workdir, location)
with open(os.path.join(location, "phantomjs-slapos"), 'w') as wrapper:
......
......@@ -50,4 +50,4 @@ scripts = ${:interpreter}
[versions]
pygolang = 0.0.8
pygolang = 0.0.9
[buildout]
extends =
../libcap/buildout.cfg
[python-prctl]
recipe = zc.recipe.egg:custom
egg = python-prctl
include-dirs =
${libcap:location}/include
library-dirs =
${libcap:location}/lib
rpath =
${:library-dirs}
# setup.py also calls cpp directly to verify for sys/capabilities.h
environment = python-prctl-env
[python-prctl-env]
C_INCLUDE_PATH=${libcap:location}/include
[versions]
python-prctl = 1.8.1
......@@ -72,11 +72,6 @@ archive = ${:version}
<= debian-netinst-base
arch = amd64
[debian-amd64-wheezy-netinst.iso]
<= debian-amd64-netinst-base
version = 7.11.0
md5sum = 096c1c18b44c269808bd815d58c53c8f
[debian-amd64-jessie-netinst.iso]
<= debian-amd64-netinst-base
version = 8.11.1
......
......@@ -25,21 +25,10 @@ environment =
PKG_CONFIG_PATH=${libyaml:location}/lib/
[ruby2.1]
<= ruby-common
url = http://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.8.tar.xz
md5sum = f18ed96bd1d5890f97a17d0d17aaefdd
[ruby2.2]
<= ruby-common
url = http://ftp.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.xz
md5sum = dbce9b9d79d90f213ba8d448b0b6ed86
[ruby2.3]
<= ruby-common
url = http://ftp.ruby-lang.org/pub/ruby/2.3/ruby-2.3.8.tar.xz
md5sum = 927e1857f3dd5a1bdec26892dbae2a05
[ruby]
<= ruby2.2
<= ruby2.3
......@@ -6,7 +6,6 @@ extends =
../apache/buildout.cfg
../libexpat/buildout.cfg
../libuuid/buildout.cfg
../neon/buildout.cfg
../openssl/buildout.cfg
../patch/buildout.cfg
../perl/buildout.cfg
......@@ -14,7 +13,6 @@ extends =
../serf/buildout.cfg
../sqlite3/buildout.cfg
../zlib/buildout.cfg
../swig/buildout.cfg
../lz4/buildout.cfg
parts =
subversion
......@@ -55,45 +53,3 @@ environment =
PKG_CONFIG_PATH=${apache:location}/lib/pkgconfig:${sqlite3:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig:${serf:location}/lib/pkgconfig
CPPFLAGS=-I${libexpat:location}/include -I${libuuid:location}/include
LDFLAGS=-L${libexpat:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${apache:location}/lib -L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${serf:location}/lib -Wl,-rpath=${lz4:location}/lib
[subversion-1.9]
recipe = hexagonit.recipe.cmmi
shared = true
url = http://www.apache.org/dist/subversion/subversion-1.7.9.tar.gz
md5sum = dfb083e8bfac88aa28d606168b08e4ff
configure-options =
--disable-static
--with-apr=${apache:location}/bin/apr-1-config
--with-apr-util=${apache:location}/bin/apu-1-config
--with-apxs=${apache:location}/bin/apxs
--with-zlib=${zlib:location}
--with-sqlite=${sqlite3:location}
--with-neon=${neon:location}
--with-swig=${swig:location}/bin/swig
--without-berkeley-db
--without-sasl
--without-apr_memcache
--without-gnome-keyring
--without-kwallet
--without-jdk
--without-jikes
--without-junit
--without-ctypesgen
--without-ruby-sitedir
--without-ruby-test-verbose
--disable-nls
# it seems that parallel build sometimes fails.
make-options =
-j1
make-targets =
install
swig-py
install-swig-py
environment =
PATH=${pkgconfig:location}/bin:${neon:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${apache:location}/lib/pkgconfig:${sqlite3:location}/lib/pkgconfig:${openssl-1.0:location}/lib/pkgconfig:${neon:location}/lib/pkgconfig
CPPFLAGS=-I${libexpat:location}/include -I${libuuid:location}/include
LDFLAGS=-L${libexpat:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${neon:location}/lib -Wl,-rpath=${apache:location}/lib -L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib -Wl,-rpath=${openssl-1.0:location}/lib
[buildout]
extends =
../java-jdk/buildout.cfg
../libsecret/buildout.cfg
../pkgconfig/buildout.cfg
../patchelf/buildout.cfg
../yarn/buildout.cfg
download-plugins.cfg
buildout.hash.cfg
[preloadTemplate.html]
recipe = slapos.recipe.build:download
shared = true
url = ${:_profile_base_location_}/${:_buildout_section_name_}
[yarn.lock]
recipe = slapos.recipe.build:download
shared = true
url = ${:_profile_base_location_}/${:_buildout_section_name_}
[theia]
recipe = slapos.recipe.cmmi
shared = true
path = ${yarn.lock:location}
# To regenerate yarn.lock, use package.json instead
# path = ${package.json:location}
environment =
TMPDIR=@@LOCATION@@/tmp
PATH=${nodejs:location}/bin:${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${libsecret:pkg-config-path}
LDFLAGS=-Wl,-rpath=${libsecret:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -Wl,-rpath=${glib:location}/lib
pre-configure =
mkdir -p $TMPDIR
echo '${package.json:content}' > %(location)s/package.json
# To regenerate yarn.lock, comment the line below
cp yarn.lock %(location)s
configure-command = true
make-binary = cd %(location)s && ${yarn:location}/bin/yarn
make-targets = theia build
post-install =
# On Debian 9 the -rpath are not taken into account by yarn build for unknown reasons
cd %(location)s/node_modules/keytar/build/Release
${patchelf:location}/bin/patchelf --set-rpath \
${libsecret:location}/lib:${gettext:location}/lib:${glib:location}/lib \
keytar.node obj.target/keytar.node
[theia-wrapper]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:bin-directory}/${:_buildout_section_name_}
template =
inline:
#!/bin/sh
cd ${theia:location}
exec ${yarn:location}/bin/yarn theia start "$@"
[theia-open]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:bin-directory}/${:_buildout_section_name_}
template =
inline:
#!/bin/sh
exec ${nodejs:location}/bin/node ${theia:location}/node_modules/.bin/theia-open "$@"
[theia-plugins]
recipe = slapos.recipe.build
urls = ${theia-download-plugins:urls}
install =
import os
for line in options['urls'].splitlines():
extension_name, url, md5sum = line.split()
extract_dir = self.extract(self.download(url, md5sum))
destination_dir = os.path.join(options['location'], extension_name)
self.copyTree(guessworkdir(extract_dir), destination_dir)
os.chmod(destination_dir, 0o750)
[package.json]
content =
{
"private": true,
"theia": {
"backend": {
"config": {
"warnOnPotentiallyInsecureHostPattern": false
}
},
"frontend": {
"config": {
"applicationName": "Theia SlapOS",
"preferences": {
"application.confirmExit": "always",
"files.associations": {
"*.cfg": "zc-buildout"
},
"files.enableTrash": false,
"files.exclude": {
"**.pyc": true,
"**.egg-info": true,
"__pycache__": true,
".git": true,
".env": true,
"**/node_modules/**": true
},
"files.watcherExclude": {
"**/.eggs/**": true,
"**/.env/**": true,
"**/.git/**": true,
"**/node_modules/**": true
},
"editor.multiCursorModifier": "ctrlCmd",
"editor.tabSize": 2,
"plantuml.server": "https://plantuml.host.vifib.net/svg/",
"plantuml.render": "PlantUMLServer",
"gitlens.remotes": [{ "domain": "lab.nexedi.com", "type": "GitLab" }],
"java.home": "${java-jdk:location}"
},
"warnOnPotentiallyInsecureHostPattern": false
}
},
"generator": {
"config": {
"preloadTemplate": "${preloadTemplate.html:target}"
}
}
},
"dependencies": {
"@theia/bulk-edit": "latest",
"@theia/callhierarchy": "latest",
"@theia/console": "latest",
"@theia/core": "latest",
"@theia/debug": "latest",
"@theia/editor": "latest",
"@theia/editor-preview": "latest",
"@theia/file-search": "latest",
"@theia/filesystem": "latest",
"@theia/getting-started": "latest",
"@theia/keymaps": "latest",
"@theia/markers": "latest",
"@theia/messages": "latest",
"@theia/metrics": "latest",
"@theia/mini-browser": "latest",
"@theia/monaco": "latest",
"@theia/navigator": "latest",
"@theia/outline-view": "latest",
"@theia/output": "latest",
"@theia/plugin-dev": "latest",
"@theia/plugin-ext": "latest",
"@theia/plugin-ext-vscode": "latest",
"@theia/preferences": "latest",
"@theia/preview": "latest",
"@theia/process": "latest",
"@theia/property-view": "latest",
"@theia/scm": "latest",
"@theia/scm-extra": "latest",
"@theia/search-in-workspace": "latest",
"@theia/task": "latest",
"@theia/terminal": "latest",
"@theia/timeline": "latest",
"@theia/typehierarchy": "latest",
"@theia/userstorage": "latest",
"@theia/variable-resolver": "latest",
"@theia/vsx-registry": "latest",
"@theia/workspace": "latest",
"@perrinjerome/theia-open": "latest",
"@perrinjerome/theia-open-cli": "latest"
},
"devDependencies": {
"@theia/cli": "latest"
}
}
# THIS IS NOT A BUILDOUT FILE, despite purposedly using a compatible syntax.
# The only allowed lines here are (regexes):
# - "^#" comments, copied verbatim
# - "^[" section beginings, copied verbatim
# - lines containing an "=" sign which must fit in the following categorie.
# - "^\s*filename\s*=\s*path\s*$" where "path" is relative to this file
# Copied verbatim.
# - "^\s*hashtype\s*=.*" where "hashtype" is one of the values supported
# by the re-generation script.
# Re-generated.
# - other lines are copied verbatim
# Substitution (${...:...}), extension ([buildout] extends = ...) and
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[preloadTemplate.html]
_update_hash_filename_ = preloadTemplate.html
md5sum = 8157c22134200bd862a07c6521ebf799
[yarn.lock]
_update_hash_filename_ = yarn.lock
md5sum = 067d2db611b21f77885f3adfd7f81453
......@@ -24,7 +24,7 @@ configure-options =
--disable-makeinstall-chown
--disable-makeinstall-setuid
--disable-more
--disable-mount
--enable-mount
--disable-nls
--disable-pivot_root
--disable-pylibmount
......@@ -36,7 +36,7 @@ configure-options =
--without-tinfo
--disable-tls
--disable-ul
--disable-unshare
--enable-unshare
--disable-uuidd
--disable-wall
--without-libiconv-prefix
......
......@@ -32,6 +32,17 @@ late-command =
# a DNS proxy on both IPv4 and IPv6 without translating queries to what the
# host supports.
dpkg -P rdnssd
# Fix partially Let's Encrypt certificate on old OS due to expired root CA.
# This is enough for Python but not wget.
dpkg --compare-versions 20200601~ le `dpkg-query -f '$${Version}' -W ca-certificates 2>/dev/null ||echo 1:0` || (
set ca-certificates_20200601~deb9u2_all.deb
wget http://security.debian.org/debian-security/pool/updates/main/c/ca-certificates/$1
echo 6cb3ce4329229d71a6f06b9f13c710457c05a469012ea31853ac300873d5a3e1 $1 |sha256sum -c
dpkg -i $1
rm $1
cd /etc/ssl/certs
rm DST_Root_CA_X3.pem 2e5ac55d.0 12d55845.0
)
mount |grep -q 'on / .*\bdiscard\b' || ! type fstrim || {
apt-get clean
sync
......@@ -40,10 +51,6 @@ late-command =
debconf.debconf =
debconf/frontend noninteractive
debconf/priority critical
debian-wheezy/preseed.apt-setup/services-select = volatile
debian-wheezy/preseed.mirror/country = manual
debian-wheezy/preseed.mirror/http/hostname = archive.debian.org
debian-wheezy/preseed.mirror/http/directory = /debian
debian-jessie/preseed.mirror/country = manual
debian-jessie/preseed.mirror/http/hostname = archive.debian.org
debian-jessie/preseed.mirror/http/directory = /debian
......@@ -61,10 +68,6 @@ x86_64.initrd = install.amd/initrd.gz
<= debian-stable
x86_64.iso = debian-amd64-testing-netinst.iso
[debian-wheezy]
<= debian-stable
x86_64.iso = debian-amd64-wheezy-netinst.iso
[debian-jessie]
<= debian-stable
x86_64.iso = debian-amd64-jessie-netinst.iso
......
......@@ -6,11 +6,10 @@ parts =
vnu
[vnu]
recipe = hexagonit.recipe.download
ignore-existing = true
strip-top-level-dir = true
url = https://github.com/validator/validator/releases/download/17.11.1/vnu.war_17.11.1.zip
md5sum = 2af6dec153a5011cd6fcc85ce5fb599d
recipe = slapos.recipe.build:download-unpacked
shared = true
url = https://github.com/validator/validator/releases/download/20.6.30/vnu.war_20.6.30.zip
md5sum = af595613407034da0797e4d10c03b6a2
[vnu-output]
# Shared binary location to ease migration
......
......@@ -16,19 +16,13 @@ parts =
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).
url_x86-64 = http://download.gna.org/wkhtmltopdf/0.12/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
url_x86 = http://download.gna.org/wkhtmltopdf/0.12/0.12.4/wkhtmltox-0.12.4_linux-generic-i386.tar.xz
# supported architectures md5sums
md5sum_x86 = ce1a2c0b2cf786ccc5d5828c42c99ddd
md5sum_x86-64 = 96b7306cebb9e65355f69f7ab63df68b
base = http://download.gna.org/wkhtmltopdf/0.12/0.12.4/wkhtmltox-0.12.4_linux-generic
i386-linux-gnu = ${:base}-i386.tar.xz ce1a2c0b2cf786ccc5d5828c42c99ddd
x86_64-linux-gnu = ${:base}-amd64.tar.xz 96b7306cebb9e65355f69f7ab63df68b
install =
import os,shutil, sys, tempfile
platform = guessPlatform()
url = options['url_' + platform]
md5sum = options['md5sum_' + platform]
path = self.download(url, md5sum)
path = self.download(*options[multiarch()].split())
extract_dir = tempfile.mkdtemp(self.name)
self.cleanup_dir_list.append(extract_dir)
self.logger.debug('Created working directory %s', extract_dir)
......
[buildout]
parts = xpdf
[xpdf]
<= xpdf-3.02
[xpdf-patch-download]
recipe = hexagonit.recipe.download
ignore-existing = true
url = ftp://ftp.foolabs.com/pub/xpdf/${:filename}
download-only = true
[xpdf-3.02pl1.patch]
<= xpdf-patch-download
filename = xpdf-3.02pl1.patch
md5sum = 877118786dfe27d1b7aa5a6759cc6e45
[xpdf-3.02pl2.patch]
<= xpdf-patch-download
filename = xpdf-3.02pl2.patch
md5sum = 3a5cb165ae66781e0b21e6219ae06795
[xpdf-3.02pl3.patch]
<= xpdf-patch-download
filename = xpdf-3.02pl3.patch
md5sum = 581963ede0fb5715e1a69f01b5b8ce63
[xpdf-3.02pl4.patch]
<= xpdf-patch-download
filename = xpdf-3.02pl4.patch
md5sum = 70b752716798dd341a4bf890df5f6fdc
[xpdf-3.02pl5.patch]
<= xpdf-patch-download
filename = xpdf-3.02pl5.patch
md5sum = 504902ca5e9d66c67eed03636ec6b163
[xpdf-3.02]
recipe = slapos.recipe.cmmi
md5sum = 599dc4cc65a07ee868cf92a667a913d2
url = ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02.tar.gz
configure-options =
--without-x
patch-options = -p1
patches =
${xpdf-3.02pl1.patch:location}/${xpdf-3.02pl1.patch:filename}
${xpdf-3.02pl2.patch:location}/${xpdf-3.02pl2.patch:filename}
${xpdf-3.02pl3.patch:location}/${xpdf-3.02pl3.patch:filename}
${xpdf-3.02pl4.patch:location}/${xpdf-3.02pl4.patch:filename}
${xpdf-3.02pl5.patch:location}/${xpdf-3.02pl5.patch:filename}
......@@ -5,7 +5,7 @@ parts =
[xz-utils]
recipe = slapos.recipe.cmmi
shared = true
url = http://tukaani.org/xz/xz-5.2.5.tar.bz2
url = https://tukaani.org/xz/xz-5.2.5.tar.bz2
md5sum = 33ab3ef79aa1146b83b778210e7b0a54
configure-options =
--disable-static
......@@ -24,14 +24,19 @@ yarn-download = ${yarn-download-1.16.0:location}
yarn-download = ${yarn-download-1.3.2:location}
[yarn-wrapper]
recipe = slapos.recipe.template:jinja2
rendered = ${:location}/bin/yarn
template = inline:
recipe = slapos.recipe.build
shared = true
content =
#!/bin/sh
PATH=${nodejs:location}/bin/:$PATH
exec ${:yarn-download}/bin/yarn $@
location = ${buildout:parts-directory}/${:_buildout_section_name_}
bin-yarn = ${:rendered}
install =
import os
bin = os.path.join(options['location'], 'bin')
os.makedirs(bin)
with open(os.path.join(bin, 'yarn'), 'w') as f:
os.fchmod(f.fileno(), 0o755)
f.write(options['content'])
[yarn-download]
recipe = slapos.recipe.build:download-unpacked
......
......@@ -10,7 +10,7 @@ Usage::
"""
import os
from __future__ import print_function
import sys
import json
import collections
......@@ -19,15 +19,15 @@ import collections
def main():
exit_code = 0
for f in sys.argv[1:]:
print 'Processing %s' % (f,)
with open(f, 'rb') as infile:
print('Processing', f,)
with open(f) as infile:
try:
obj = json.load(infile, object_pairs_hook=collections.OrderedDict)
except ValueError as e:
exit_code = 1
print e
print(e, file=sys.stderr)
else:
with open(f, 'wb') as outfile:
with open(f, 'w') as outfile:
json.dump(obj, outfile, sort_keys=False, indent=2, separators=(',', ': '))
outfile.write('\n')
sys.exit(exit_code)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"dependencies": {
"husky": "^1.1.2",
"lint-staged": "^7.3.0"
},
"lint-staged": {
"*.json": [
"python2 ./format-json",
"git add"
"./format-json"
],
"{component,software,stack}/**": [
"python -c 'import sys, os.path, subprocess; [subprocess.check_call((\"python2\", \"./update-hash\", buildout_hash)) for buildout_hash in { os.path.join(os.path.dirname(staged), \"buildout.hash.cfg\") for staged in sys.argv[1:]} if os.path.exists(buildout_hash)]'",
"python -c 'import sys, os.path, subprocess; [subprocess.check_call((\"./update-hash\", buildout_hash)) for buildout_hash in { os.path.join(os.path.dirname(staged), \"buildout.hash.cfg\") for staged in sys.argv[1:]} if os.path.exists(buildout_hash)]'",
"python -c 'import sys, os.path, subprocess; [subprocess.check_call((\"git\", \"add\", buildout_hash)) for buildout_hash in { os.path.join(os.path.dirname(staged), \"buildout.hash.cfg\") for staged in sys.argv[1:]} if os.path.exists(buildout_hash)]'"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
"devDependencies": {
"husky": "^7.0.0",
"lint-staged": "^12.1.2"
},
"scripts": {
"prepare": "husky install && git config merge.tool update-hash-mergetool && git config mergetool.update-hash-mergetool.cmd './update-hash-mergetool \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"' && git config mergetool.update-hash-mergetool.trustExitCode true"
}
}
......@@ -28,7 +28,7 @@ from setuptools import setup, find_packages
import glob
import os
version = '1.0.218'
version = '1.0.220'
name = 'slapos.cookbook'
long_description = open("README.rst").read()
......@@ -64,7 +64,6 @@ setup(name=name,
install_requires=[
'enum34; python_version<"3.4"', # for inotify-simple
'jsonschema',
'hexagonit.recipe.download',
'netaddr', # to manipulate on IP addresses
'setuptools', # namespaces
'inotify_simple',
......@@ -78,7 +77,6 @@ setup(name=name,
entry_points={
'zc.buildout': [
'addresiliency = slapos.recipe.addresiliency:Recipe',
'accords = slapos.recipe.accords:Recipe',
'apacheperl = slapos.recipe.apacheperl:Recipe',
'apachephp = slapos.recipe.apachephp:Recipe',
'apachephpconfigure = slapos.recipe.apachephpconfigure:Recipe',
......@@ -91,8 +89,6 @@ setup(name=name,
'check_parameter = slapos.recipe.check_parameter:Recipe',
'cloud9 = slapos.recipe.cloud9:Recipe',
'cloudooo.test = slapos.recipe.erp5_test:CloudoooRecipe',
'condor = slapos.recipe.condor:Recipe',
'condor.submit = slapos.recipe.condor:AppSubmit',
'copyfilelist = slapos.recipe.copyfilelist:Recipe',
'cron = slapos.recipe.dcron:Recipe',
'cron.d = slapos.recipe.dcron:Part',
......@@ -126,7 +122,6 @@ setup(name=name,
'neoppod.admin = slapos.recipe.neoppod:Admin',
'neoppod.master = slapos.recipe.neoppod:Master',
'neoppod.storage = slapos.recipe.neoppod:Storage',
'nosqltestbed = slapos.recipe.nosqltestbed:NoSQLTestBed',
'notifier = slapos.recipe.notifier:Recipe',
'notifier.callback = slapos.recipe.notifier:Callback',
'notifier.notify = slapos.recipe.notifier:Notify',
......@@ -161,8 +156,6 @@ setup(name=name,
'slapconfiguration = slapos.recipe.slapconfiguration:Recipe',
'slapconfiguration.serialised = slapos.recipe.slapconfiguration:Serialised',
'slapconfiguration.jsondump = slapos.recipe.slapconfiguration:JsonDump',
'slapcontainer = slapos.recipe.container:Recipe',
'sphinx= slapos.recipe.sphinx:Recipe',
'squid = slapos.recipe.squid:Recipe',
'sshkeys_authority = slapos.recipe.sshkeys_authority:Recipe',
'sshkeys_authority.request = slapos.recipe.sshkeys_authority:Request',
......@@ -181,9 +174,6 @@ setup(name=name,
'zero-knowledge.read = slapos.recipe.zero_knowledge:ReadRecipe',
'zero-knowledge.write = slapos.recipe.zero_knowledge:WriteRecipe'
],
'slapos.recipe.nosqltestbed.plugin': [
'kumo = slapos.recipe.nosqltestbed.kumo:KumoTestBed',
],
},
extras_require=extras_require,
test_suite='slapos.test',
......
##############################################################################
#
# Copyright (c) 2011 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import os
import shutil
from slapos.recipe.librecipe import GenericSlapRecipe
import shutil
import subprocess
import sys
class Recipe(GenericSlapRecipe):
def _install(self):
path_list = []
accords_location = self.buildout['accordsdirectory']['accords']
parameter_dict = dict(
userid=self.options['userid'],
tenantname=self.options['tenantname'],
password=self.options['password'],
domain=self.options['domain'],
openstack_url=self.options['openstack_url'],
python_location=sys.executable,
accords_location=accords_location,
manifest_name=self.options['manifest-name'],
# XXX this is workaround
accords_lib_directory=self.options['accords_lib_directory'],
computer_id = self.computer_id,
computer_partition_id = self.computer_partition_id,
server_url = self.server_url,
software_release_url = self.software_release_url,
key_file = self.key_file,
cert_file = self.cert_file,
path = '%s:%s' % (self.options['accords_bin_directory'],
os.environ.get('PATH', '')),
)
# Generate os-config.xml
os_config_file = self.createFile(self.options['os-config'],
self.substituteTemplate(self.getTemplateFilename('os_config.xml.in'),
parameter_dict))
path_list.append(os_config_file)
# Put modified accords configuration file
accords_configuration_parameter_dict = dict(
listen_ip = self.options['listen-ip']
)
accords_configuration_file_location = self.createFile(
self.options['accords-configuration-file'],
self.substituteTemplate(self.getTemplateFilename('accords.ini.in'),
accords_configuration_parameter_dict))
path_list.append(accords_configuration_file_location)
# XXX is it dangerous?
security_path = os.path.join(accords_location, 'security')
if os.path.exists(security_path):
shutil.rmtree(security_path)
# Initiate configuration
subprocess.check_call('./accords-config',
cwd=accords_location
)
# Generate manifest
manifest_origin_location = self.options['manifest-source']
manifest_location = self.options['manifest-destination']
shutil.copy(manifest_origin_location, manifest_location)
path_list.append(manifest_location)
# Generate wrapper
wrapper_location = self.createPythonScript(self.options['accords-wrapper'],
__name__ + '.accords.runAccords',
(parameter_dict,))
path_list.append(wrapper_location)
# Generate helper for debug
self.createExecutable(
self.options['testos-wrapper'],
self.substituteTemplate(self.getTemplateFilename('testos.in'),
parameter_dict)
)
return path_list
#!%(python_location)s
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import os
from slapos import slap
import signal
import subprocess
from subprocess import Popen
import sys
import time
def runAccords(accords_conf):
"""Launch ACCORDS, parse manifest, broker manifest, send connection
informations to SlapOS Master. Destroy instance and stops ACCORDS at
SIGTERM."""
computer_id = accords_conf['computer_id']
computer_partition_id = accords_conf['computer_partition_id']
server_url = accords_conf['server_url']
software_release_url = accords_conf['software_release_url']
key_file = accords_conf['key_file']
cert_file = accords_conf['cert_file']
accords_lib_directory = accords_conf['accords_lib_directory']
accords_location = accords_conf['accords_location']
manifest_name = accords_conf['manifest_name']
environment = dict(
LD_LIBRARY_PATH=accords_lib_directory,
PATH=accords_conf['path'],
HOME=accords_location,
)
# Set handler to stop ACCORDS when end of world comes
# XXX use subprocess.check_call and add exception handlers
def sigtermHandler(signum, frame):
Popen(['./co-command', 'stop', '/service/*'],
cwd=accords_location, env=environment).communicate()
Popen(['./co-stop'],
cwd=accords_location, env=environment).communicate()
sys.exit(0)
signal.signal(signal.SIGTERM, sigtermHandler)
# Launch ACCORDS, parse & broke manifest to deploy instance
print 'Starting ACCORDS and friends...'
subprocess.check_call(['./co-start'],cwd=accords_location, env=environment)
print 'Parsing manifest...'
subprocess.check_call(['./co-parser', manifest_name],
cwd=accords_location, env=environment)
print 'Brokering manifest...'
subprocess.check_call(['./co-broker', manifest_name],
cwd=accords_location, env=environment)
print 'Done.'
# Parse answer
# XXX
connection_dict = dict(connection='hardcoded')
# Send information about published service to SlapOS Master
slap_connection = slap.slap()
slap_connection.initializeConnection(server_url, key_file, cert_file)
computer_partition = slap_connection.registerComputerPartition(computer_id,
computer_partition_id)
computer_partition.setConnectionDict(connection_dict)
# Go to sleep, wait kill
while(True):
time.sleep(60)
# REST host (default: 127.0.0.1)
resthost=%(listen_ip)s
# REST port (default: 8086)
#restport=8086
# Target (default: ./accords.xml)
#target=accords.xml
# Acitvate TLS (default: 0)
#tls=0
# Activate monitoring (default: 1)
#monitor=1
# Trace (default: 1)
#trace=1
# Threads (default:1)
#threads=1
# Be verbose (default: 1)
#verbose=0
# Debug (default: 1)
#debug=1
# Domain (default: occi)
#domain=occi
# Operator (default: accords)
#operator=accords
# Password (default: co-system)
#password=co-system
<?xml version="1.0" encoding="UTF8"?>
<manifest name="coips:model" xmlns="http://www.compatibleone.fr/schemes/cords.xsd">
<description>Infrastructure profile used by production tool</description>
<node name="coips:model">
<infrastructure name="coips:model">
<compute name="coips:model" cores="1" speed="1GHz" architecture="x686" memory="1GB"/>
<storage name="coips:model" size="10GB" type="SATA"/>
<network name="coips:model" vlan="true" label="database"/>
</infrastructure>
</node>
</manifest>
\ No newline at end of file
<os_configs>
<os_config
id="e1f892e3-slap-slap-slap-9354b95d3b17"
name="slaposrecipe"
description="Configuration of Account used by slapos recipe"
user="%(userid)s"
password="%(password)s"
authenticate=""
agent="CompatibleOne/OpenStackClient/1.0a.0.01"
host="%(openstack_url)s"
version="v1.1"
namespace="%(domain)s"
base=""
tls="0"
current="0"
/>
</os_configs>
#!/bin/sh
export PATH=%(path)s
export ENO_HOST=%(openstack_url)s
export ENO_USER=%(userid)s
export ENO_PASS=%(password)s
export ENO_VERSION=v1.1
export ENO_TENANT=%(tenantname)s
testos --host $ENO_HOST --password $ENO_PASS --user $ENO_USER --version $ENO_VERSION --tenant $ENO_TENANT $1 $2 $3 $4 $5 $6 $7
This diff is collapsed.
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import os
import subprocess
import time
def submitJob(submit, submit_file, appdir, appname, sig_install):
"""Run condor_submit (if needed) for job deployment"""
time.sleep(10)
print "Check if needed to submit %s job's" % appname
if not os.path.exists(sig_install):
print "Nothing for install or update...Exited"
return
# '-a', "log = out.log", '-a', "error = error.log",
launch_args = submit, '-verbose', submit_file
process = subprocess.Popen(launch_args, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT, cwd=appdir)
result = process.communicate()[0]
if process.returncode is None or process.returncode != 0:
print "Failed to execute condor_submit.\nThe error was: %s" % result
else:
os.unlink(sig_install)
def condorStart(condor_reconfig, start_bin):
"""Start Condor if deamons is currently stopped"""
if subprocess.call(condor_reconfig):
#process failled to reconfig condor that mean that condor deamons is not curently started
subprocess.call(start_bin)
This source diff could not be displayed because it is too large. You can view the blob instead.
## Pathnames:
## Where have you installed the bin, sbin and lib condor directories?
RELEASE_DIR = %(releasedir)s
## Where is the local condor directory for each host?
## This is where the local config file(s), logs and
## spool/execute directories are located
LOCAL_DIR = %(localdir)s
## Mail parameters:
## When something goes wrong with condor at your site, who should get
## the email?
CONDOR_ADMIN =
## The user/group ID <uid>.<gid> of the "Condor" user.
## (this can also be specified in the environment)
## Note: the CONDOR_IDS setting is ignored on Win32 platforms
CONDOR_IDS = %(slapuser)s
## Condor needs to create a few lock files to synchronize access to
## various log files. Because of problems we've had with network
## filesystems and file locking over the years, we HIGHLY recommend
## that you put these lock files on a local partition on each
## machine. If you don't have your LOCAL_DIR on a local partition,
## be sure to change this entry. Whatever user (or group) condor is
## running as needs to have write access to this directory. If
## you're not running as root, this is whatever user you started up
## the condor_master as. If you are running as root, and there's a
## condor account, it's probably condor. Otherwise, it's whatever
## you've set in the CONDOR_IDS environment variable. See the Admin
## manual for details on this.
LOCK = /tmp/condor-lock.$(HOSTNAME)0.829500835462571
DAEMON_LIST = MASTER, SCHEDD, STARTD
## Java parameters:
## If you would like this machine to be able to run Java jobs,
## then set JAVA to the path of your JVM binary. If you are not
## interested in Java, there is no harm in leaving this entry
## empty or incorrect.
JAVA = %(java-bin)s
JAVA_MAXHEAP_ARGUMENT = -Xmx1024m
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import ConfigParser
import uuid
import os
import subprocess
# XXX : This is in order to get the computer_partition object
# which exposes the state of the current partition.
#
# XXX : We could have modify slapgrid in order to put the
# state of the current partition offline. But this is
# written to have the most minimal impact.
from slapos.recipe.librecipe import GenericSlapRecipe
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericSlapRecipe):
def _options(self, options):
config_filename = self.options['config']
container_uuid = None
if os.path.exists(config_filename):
config = ConfigParser.ConfigParser()
config.read(config_filename)
if config.has_option('requested', 'name'):
container_uuid = uuid.UUID(hex=config.get('requested', 'name'))
if container_uuid is None:
# uuid wasn't generated at first in order to avoid
# wasting entropy
container_uuid = uuid.uuid4()
options['slapcontainer-name'] = container_uuid.hex
return options
def _install(self):
path_list = []
self.logger.info("Putting slapcontainer configuration file...")
config = ConfigParser.ConfigParser()
config.add_section('requested')
config.set('requested', 'status',
self.computer_partition.getState())
config.set('requested', 'name', self.options['slapcontainer-name'])
config.add_section('rootfs')
config.set('rootfs', 'image', self.options['image'])
config.set('rootfs', 'complete', self.options['image-complete'])
config.add_section('network')
config.set('network', 'interface', self.options['interface'])
config.add_section('config')
config.set('config', 'file', self.options['lxc-config'])
# Just a touch
open(self.options['lxc-config'], 'a').close()
config_filename = self.options['config']
with open(config_filename, 'w') as config_file:
config.write(config_file)
path_list.append(config_filename)
return path_list
##############################################################################
#
# Copyright (c) 2013 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import shutil
import os
import zc.buildout
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
# XXX-Cedric: write docstring
def install(self):
path_list = []
# Download and unpack application if not already existing
htdocs_location = self.options['htdocs']
if not (os.path.exists(htdocs_location) and os.listdir(htdocs_location)):
try:
os.rmdir(htdocs_location)
except:
pass
self.download(htdocs_location)
# Install php.ini
php_ini = self.createFile(os.path.join(self.options['php-ini-dir'],
'php.ini'),
self.substituteTemplate(self.getTemplateFilename('php.ini.in'),
dict(tmp_directory=self.options['tmp-dir']))
)
path_list.append(php_ini)
# Install apache
apache_config = dict(
pid_file=self.options['pid-file'],
lock_file=self.options['lock-file'],
ip=self.options['ip'],
port=self.options['port'],
error_log=self.options['error-log'],
access_log=self.options['access-log'],
document_root=self.options['htdocs'],
php_ini_dir=self.options['php-ini-dir'],
)
httpd_conf = self.createFile(self.options['httpd-conf'],
self.substituteTemplate(self.getTemplateFilename('apache.in'),
apache_config)
)
path_list.append(httpd_conf)
wrapper = self.createWrapper(self.options['wrapper'],
(self.options['httpd-binary'],
'-f',
self.options['httpd-conf'],
'-DFOREGROUND'
))
path_list.append(wrapper)
return path_list
# Apache static configuration
# Automatically generated
# Basic server configuration
PidFile "%(pid_file)s"
Listen %(ip)s:%(port)s
PHPINIDir %(php_ini_dir)s
ServerAdmin someone@email
DefaultType text/plain
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php .phtml .php5 .php4
AddType application/x-httpd-php-source .phps
# Log configuration
ErrorLog "%(error_log)s"
LogLevel warn
LogFormat "%%h %%{REMOTE_USER}i %%l %%u %%t \"%%r\" %%>s %%b \"%%{Referer}i\" \"%%{User-Agent}i\"" combined
LogFormat "%%h %%{REMOTE_USER}i %%l %%u %%t \"%%r\" %%>s %%b" common
CustomLog "%(access_log)s" common
# Directory protection
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory %(document_root)s>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
DocumentRoot %(document_root)s
DirectoryIndex index.html index.php
# List of modules
LoadModule unixd_module modules/mod_unixd.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule headers_module modules/mod_headers.so
LoadModule dir_module modules/mod_dir.so
LoadModule php5_module modules/libphp5.so
LoadModule alias_module modules/mod_alias.so
[PHP]
engine = On
safe_mode = Off
expose_php = Off
error_reporting = E_ALL & ~(E_DEPRECATED|E_NOTICE|E_WARNING)
display_errors = On
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
session.save_path = "%(tmp_directory)s"
session.auto_start = 0
date.timezone = Europe/Paris
file_uploads = On
upload_max_filesize = 8M
post_max_size = 8M
magic_quotes_gpc=Off
......@@ -32,7 +32,6 @@ import os
import sys
import inspect
import re
import shutil
import stat
from six.moves.urllib.parse import quote
import itertools
......@@ -255,31 +254,3 @@ class GenericBaseRecipe(object):
url = urlunparse((scheme, netloc, path, params, query, fragment))
return url
def setLocationOption(self):
if not self.options.get('location'):
self.options['location'] = os.path.join(
self.buildout['buildout']['parts-directory'], self.name)
def download(self, destination=None):
""" A simple wrapper around h.r.download, downloading to self.location"""
self.setLocationOption()
import hexagonit.recipe.download
if not destination:
destination = self.location
if os.path.exists(destination):
# leftovers from a previous failed attempt, removing it.
self.logger.warning('Removing already existing directory %s',
destination)
shutil.rmtree(destination)
os.mkdir(destination)
try:
options = self.options.copy()
options['destination'] = destination
hexagonit.recipe.download.Recipe(
self.buildout, self.name, options).install()
except:
shutil.rmtree(destination)
raise
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from __future__ import print_function
import sys
import pkg_resources
from logging import Formatter
from slapos.recipe.librecipe import BaseSlapRecipe
class NoSQLTestBed(BaseSlapRecipe):
def _install(self):
self.parameter_dict = self.computer_partition.getInstanceParameterDict()
try:
entry_point = pkg_resources.iter_entry_points(group='slapos.recipe.nosqltestbed.plugin',
name=self.parameter_dict.get('plugin', 'kumo')).next()
plugin_class = entry_point.load()
testbed = plugin_class()
except:
print(Formatter().formatException(sys.exc_info()))
return None
software_type = self.parameter_dict.get('slap_software_type', 'default')
if software_type is None or software_type == 'RootSoftwareInstance':
software_type = 'default'
if "run_%s" % software_type in dir(testbed) and \
callable(getattr(testbed, "run_%s" % software_type)):
return getattr(testbed, "run_%s" % software_type)(self)
else:
raise NotImplementedError("Do not support %s" % software_type)
This diff is collapsed.
#!/bin/sh
# BEWARE: This file is operated by slapos node
# BEWARE: It will be overwritten automatically
exec %(gateway_binary)s -F -E -m %(manager_address)s:%(manager_port)s \
-t %(gateway_address)s:%(gateway_port)s --verbose -o %(gateway_log)s
#!/bin/sh
# BEWARE: This file is operated by slapos node
# BEWARE: It will be overwritten automatically
exec %(manager_binary)s -a -l %(manager_address)s:%(manager_port)s \
--verbose -o %(manager_log)s
#!/bin/sh
# BEWARE: This file is operated by slapos node
# BEWARE: It will be overwritten automatically
exec %(server_binary)s -l %(server_address)s:%(server_port)s \
-L %(server_listen_port)s -m %(manager_address)s:%(manager_port)s \
-s %(server_storage)s --verbose -o %(server_log)s
#!/bin/sh
# BEWARE: This file is operated by slapos node
# BEWARE: It will be overwritten automatically
exec %(nosqltester_manager_binary)s %(plugin_name)s -a %(address)s \
-r %(report_path)s -s %(max_server)s -t %(max_tester)s \
--erp5-publish-url "%(erp5_publish_url)s" --erp5-publish-project "%(erp5_publish_project)s" \
%(software_release_url)s %(server_url)s "%(key_file)s" "%(cert_file)s" %(computer_id)s %(computer_partition_id)s \
%(nb_thread)s %(nb_request)s
#!/bin/sh
# BEWARE: This file is operated by slapos node
# BEWARE: It will be overwritten automatically
exec %(memstrike_binary)s -s -l %(gateway_address)s -p %(gateway_port)s -t %(nb_thread)s %(nb_request)s
#!/bin/sh
# BEWARE: This file is operated by slapos node
# BEWARE: It will be overwritten automatically
exec %(nosqltester_manager_binary)s %(plugin_name)s -a %(address)s \
-r %(report_path)s -s %(max_server)s -t %(max_tester)s \
--erp5-publish-url "%(erp5_publish_url)s" --erp5-publish-project "%(erp5_publish_project)s" \
%(software_release_url)s %(server_url)s "%(key_file)s" "%(cert_file)s" %(computer_id)s %(computer_partition_id)s
#!/bin/sh
# BEWARE: This file is operated by slapos node
# BEWARE: It will be overwritten automatically
exec %(nosqltester_binary)s -m %(host_address)s -a %(tester_address)s \
-r %(report_path)s -b "%(binary)s" -l %(log_directory)s \
-c "%(compress_method)s"
......@@ -88,7 +88,9 @@ class Recipe(object):
Possible names depend on requested partition's software type.
state (optional)
Requested state, default value is the state of the requester.
Requested state, default value is "started", except the state of
the requester is "stopped" (which changes the default value to
"stopped").
Output:
See "return" input key.
......@@ -120,8 +122,13 @@ class Recipe(object):
slave = options.get('slave', 'false').lower() in \
librecipe.GenericBaseRecipe.TRUE_VALUES
# By default XXXX Way of doing it is ugly and dangerous
requested_state = options.get('state', buildout['slap-connection'].get('requested','started'))
# By default, propagate the state of the parent instance
# Except if parent is destroyed, as it may lead to the unexpected
# destruction of the full instance tree
default_state = buildout['slap-connection'].get('requested', 'started')
if default_state not in ('started', 'stopped'):
default_state = 'started'
requested_state = options.get('state', default_state)
options['requested-state'] = requested_state
slap = slapmodule.slap()
......
##############################################################################
#
# Copyright (c) 2011 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
def install(self):
# Configuration file
config = dict(
data_directory=self.options['data-directory'],
ip_address=self.options['ip'],
port=self.options['sphinx-port'],
sql_port=self.options['sql-port'],
searchd_log=self.options['searchd-log'],
query_log=self.options['query-log'],
pid=self.options['pid'],
)
sphinx_conf_path = self.createFile(
self.options['configuration-file'],
self.substituteTemplate(self.getTemplateFilename('sphinx.conf.in'),
config)
)
# Create init script
wrapper = self.createWrapper(
self.options['wrapper'],
(self.options['sphinx-searchd-binary'].strip(), '-c',
sphinx_conf_path, '--nodetach'),
)
return [wrapper, sphinx_conf_path]
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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