Commit 16f7dc9b authored by Kirill Smelkov's avatar Kirill Smelkov

Merge branch 'master' into x/gitlab

* master: (417 commits)
  percona-toolkit: update md5sum.
  version up eggs.
  version up : OpenLDAP 2.4.42.
  version up eggs.
  version up : cpio 2.12.
  version up : gettext 0.19.6.
  version up : libtasn1 4.6.
  monitor: Include working fluentd process on monitoring
  version up : FreeType 2.6.
  update eggs.
  perl: make post_make_hook script more robust.
  we no longer use mr.developer.
  use slapos.recipe.build:download instead of deprecated slapos.recipe.download.
  Monitor: Accept slaves on distributor software type
  monitor: Include skeleton of distributor software type
  vesion up eggs.
  fixup! slaprunner: version up eggs.
  fix a typo in url.
  version up : curl 7.44.0.
  version up eggs.
  ...
parents 443d4914 2e207c35
Changes
=======
0.103 (2015-07-24)
------------------
* kvm: fix issues with boolean parameters and add 'qed' in external disk format list.
* simplehttpserver-recipe: Add support for POST method which only get content and save into specified file.
0.102 (2015-05-22)
------------------
* kvm-recipe: vm of kvm-cluster can get ipv4/hostname of all other vm in the same cluster
......
......@@ -17,8 +17,8 @@ extends =
[apr]
recipe = hexagonit.recipe.download
version = 1.5.1
md5sum = 5486180ec5a23efb5cae6d4292b300ab
version = 1.5.2
md5sum = 4e9769f3349fe11fc0a5e1b224c236aa
url = https://archive.apache.org/dist/apr/apr-${:version}.tar.bz2
[apr-util]
......@@ -30,9 +30,9 @@ md5sum = 2202b18f269ad606d70e1864857ed93c
[apache]
# inspired on http://old.aclark.net/team/aclark/blog/a-lamp-buildout-for-wordpress-and-other-php-apps/
recipe = slapos.recipe.cmmi
version = 2.4.12
version = 2.4.16
url = https://archive.apache.org/dist/httpd/httpd-${:version}.tar.bz2
md5sum = b8dc8367a57a8d548a9b4ce16d264a13
md5sum = 2b19cd338fd526dd5a63c57b1e9bfee2
configure-command = cp -ar ${apr:location}/apr-${apr:version} srclib/apr/; cp -ar ${apr-util:location}/apr-util-${apr-util:version} srclib/apr-util; ./configure
configure-options = --prefix=${buildout:parts-directory}/${:_buildout_section_name_}
--disable-static
......@@ -109,9 +109,9 @@ make-targets =
[apache-2.2]
# inspired on http://old.aclark.net/team/aclark/blog/a-lamp-buildout-for-wordpress-and-other-php-apps/
recipe = slapos.recipe.cmmi
version = 2.2.29
version = 2.2.31
url = https://archive.apache.org/dist/httpd/httpd-${:version}.tar.bz2
md5sum = 579342fdeaa7b8b68d17fee91f8fab6e
md5sum = 6c10e15835ab214464228a9beb7afba8
patch-options = -p1
configure-options = --disable-static
--enable-authn-alias
......
diff -ur bison-2.5.orig/lib/stdio.in.h bison-2.5/lib/stdio.in.h
--- bison-2.5.orig/lib/stdio.in.h 2011-05-15 00:23:46.000000000 +0200
+++ bison-2.5/lib/stdio.in.h 2012-07-23 16:30:56.366722487 +0200
@@ -181,7 +181,9 @@
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
#undef gets
+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#endif
#if @GNULIB_FOPEN@
# if @REPLACE_FOPEN@
......@@ -17,7 +17,7 @@ extends =
../../stack/slapos.cfg
[download-boinc]
recipe = slapos.recipe.download
recipe = slapos.recipe.build:download
url = http://boinc.berkeley.edu/dl/boinc_7.0.28_x86_64-pc-linux-gnu.sh
md5sum = efdfd115ae69227ceb6118ca09777988
location = ${buildout:parts-directory}/${:_buildout_section_name_}
......@@ -36,7 +36,7 @@ ld_library = ${curl:location}/lib:${openssl:location}/lib:${zlib:location}/lib
location = ${buildout:parts-directory}/BOINC
[boinc-patch]
recipe = slapos.recipe.download
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/boinc-abs-path.patch
md5sum = 412acedfbcdc8a9a7f196a02465da248
location = ${buildout:parts-directory}/${:_buildout_section_name_}
......
[buildout]
parts =
boost-lib
extends =
../bzip2/buildout.cfg
../zlib/buildout.cfg
[boost-lib]
recipe = slapos.recipe.cmmi
url = http://downloads.sourceforge.net/sourceforge/boost/boost_1_43_0.tar.gz
md5sum = 734565ca4819bf04bd8e903e116c3fb1
url = http://downloads.sourceforge.net/sourceforge/boost/boost_1_58_0.tar.bz2
md5sum = b8839650e61e9c1c0a89f371dd475546
location = ${buildout:parts-directory}/${:_buildout_section_name_}
configure-command = ./bootstrap.sh --prefix=${:location}
configure-command = ./bootstrap.sh --prefix=${:location} --with-python=${python2.7:location}/bin/python2.7
make-binary =
make-options =
make-targets = ./bjam link=shared install
make-targets = ./b2 link=shared dll-path=${:location}/lib:${bzip2:location}/lib:${zlib:location}/lib install
environment =
BZIP2_INCLUDE=${bzip2:location}/include
BZIP2_LIBPATH=${bzip2:location}/lib
ZLIB_INCLUDE=${zlib:location}/include
ZLIB_LIBPATH=${zlib:location}/lib
......@@ -11,10 +11,9 @@ parts =
[ca-certificates]
recipe = slapos.recipe.cmmi
version = 20141019
url = ftp://ftp.free.fr/mirrors/ftp.debian.org/pool/main/c/ca-certificates/ca-certificates_${:version}.tar.xz
url = ftp://ftp.free.fr/mirrors/ftp.debian.org/pool/main/c/ca-certificates/ca-certificates_20150426.tar.xz
patch-binary = ${patch:location}/bin/patch
md5sum = f619282081c8bfc65ea64c37fa5285ed
md5sum = 717455f13fb31fd014a11a468ea3895d
patches =
${:_profile_base_location_}/ca-certificates-sbin-dir.patch#0b4e7d82ce768823c01954ee41ef177b
patch-options = -p0
......
......@@ -3,9 +3,6 @@
parts = cpio
[cpio]
patch-options = -p1
patches =
${:_profile_base_location_}/cpio-drop.gets.patch#6c79cb9caf407063543efff93647c450
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/cpio/cpio-2.11.tar.bz2
md5sum = 20fc912915c629e809f80b96b2e75d7d
url = http://ftp.gnu.org/gnu/cpio/cpio-2.12.tar.bz2
md5sum = 93eea9f07c0058c097891c73e4955456
diff -ur cpio-2.11.orig/gnu/stdio.in.h cpio-2.11/gnu/stdio.in.h
--- cpio-2.11.orig/gnu/stdio.in.h 2010-03-10 10:27:03.000000000 +0100
+++ cpio-2.11/gnu/stdio.in.h 2012-07-23 13:04:56.075242094 +0200
@@ -139,7 +139,9 @@
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
#undef gets
+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#endif
#if @GNULIB_FOPEN@
# if @REPLACE_FOPEN@
......@@ -12,8 +12,8 @@ parts =
[curl]
recipe = slapos.recipe.cmmi
url = http://curl.haxx.se/download/curl-7.42.1.tar.bz2
md5sum = 296945012ce647b94083ed427c1877a8
url = http://curl.haxx.se/download/curl-7.44.0.tar.bz2
md5sum = 6b952ca00e5473b16a11f05f06aa8dae
configure-options =
--disable-static
--disable-ldap
......
......@@ -2,26 +2,39 @@
parts =
cyrus-sasl
extends =
../autoconf/buildout.cfg
../automake/buildout.cfg
../gdbm/buildout.cfg
../libtool/buildout.cfg
../m4/buildout.cfg
../zlib/buildout.cfg
[cyrus-sasl]
recipe = slapos.recipe.cmmi
url = ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-2.1.26.tar.gz
md5sum = a7f4e5e559a0e37b3ffc438c9456e425
location = ${buildout:parts-directory}/${:_buildout_section_name_}
configure-command =
"${libtool:location}/bin/libtoolize" -c -f &&
"${automake:location}/bin/aclocal" -I "${libtool:location}/share/aclocal" -I config -I cmulocal &&
"${automake:location}/bin/automake" -c -a -f &&
./configure
configure-options =
--prefix=${:location}
--disable-digest
--disable-gssapi
--disable-otp
--with-dblib=none
--with-dblib=gdbm
--without-des
--without-openssl
--without-pam
--without-saslauthd
--with-plugindir=${:location}/lib/sasl2
# it seems that parallel build sometimes fails.
make-options =
-j1
environment =
CPPFLAGS=-I${zlib:location}/include
LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
PATH=${autoconf:location}/bin:${m4:location}/bin:%(PATH)s
CPPFLAGS=-fPIC -I${zlib:location}/include -I${gdbm:location}/include
LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${gdbm:location}/lib -Wl,-rpath=${gdbm:location}/lib
fix warnings with gcc-4.4
http://bugs.gentoo.org/248738
--- cyrus-sasl-2.1.22/plugins/digestmd5.c
+++ cyrus-sasl-2.1.22/plugins/digestmd5.c
@@ -2715,7 +2715,7 @@ static sasl_server_plug_t digestmd5_serv
"DIGEST-MD5", /* mech_name */
#ifdef WITH_RC4
128, /* max_ssf */
-#elif WITH_DES
+#elif defined(WITH_DES)
112,
#else
1,
@@ -4034,7 +4034,7 @@ static sasl_client_plug_t digestmd5_clie
"DIGEST-MD5",
#ifdef WITH_RC4 /* mech_name */
128, /* max ssf */
-#elif WITH_DES
+#elif defined(WITH_DES)
112,
#else
1,
......@@ -8,8 +8,8 @@ extends =
[file]
recipe = slapos.recipe.cmmi
url = ftp://ftp.astron.com/pub/file/file-5.22.tar.gz
md5sum = 8fb13e5259fe447e02c4a37bc7225add
url = ftp://ftp.astron.com/pub/file/file-5.23.tar.gz
md5sum = 61db35209ce71a6d576392ce6e1d2f80
configure-options =
--disable-static
environment =
......
......@@ -26,12 +26,12 @@ depends =
${liberation-fonts:location}
${ipaex-fonts:location}
version = 36.0.4
version = 40.0.2
# MD5SUMs are available at :
# https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${:version}/MD5SUMS
x86 = http://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-i686/en-US/firefox-${:version}.tar.bz2 6f50b82a6c020d0f29a04cfcd9fe8282
x86-64 = http://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-x86_64/en-US/firefox-${:version}.tar.bz2 119d9369a3b1be282936c35bf036414f
x86 = http://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-i686/en-US/firefox-${:version}.tar.bz2 91005730fe4de7504e1d21d80e427377
x86-64 = http://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-x86_64/en-US/firefox-${:version}.tar.bz2 2cf6af6369c01f9b49ad69aa12a705b4
script =
if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
......
......@@ -7,10 +7,12 @@ extends =
[fluentd]
recipe = rubygemsrecipe
url = https://rubygems.org/rubygems/rubygems-2.4.8.zip
ruby-executable = ${ruby:location}/bin/ruby
gems =
fluentd
gem-options = --with-icu-lib=${icu:location}/lib/ --with-icu-dir=${icu:location}/
fluentd==0.12.15
fluent-plugin-td==0.10.27
gem-options = --no-ri --no-rdoc --with-icu-lib=${icu:location}/lib/ --with-icu-dir=${icu:location}/
environment =
LDFLAGS = -L${icu:location}/lib -Wl,-rpath=${icu:location}/lib
CFLAGS = -I${icu:location}/include
......@@ -13,8 +13,8 @@ parts =
[freetype]
recipe = slapos.recipe.cmmi
url = http://download.savannah.gnu.org/releases/freetype/freetype-2.5.5.tar.bz2
md5sum = 2a7a314927011d5030903179cf183be0
url = http://download.savannah.gnu.org/releases/freetype/freetype-2.6.tar.bz2
md5sum = 5682890cb0267f6671dd3de6eabd3e69
pkg_config_depends = ${zlib:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig
location = ${buildout:parts-directory}/${:_buildout_section_name_}
configure-options =
......
......@@ -10,8 +10,8 @@ parts =
[mpfr]
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/mpfr/mpfr-3.1.2.tar.xz
md5sum = e3d203d188b8fe60bb6578dd3152e05c
url = http://ftp.gnu.org/gnu/mpfr/mpfr-3.1.3.tar.xz
md5sum = 6969398cd2fbc56a6af570b5273c56a9
configure-options =
--with-gmp=${gmp:location}
--disable-static
......@@ -42,8 +42,8 @@ environment =
[gcc-common]
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/gcc/gcc-5.1.0/gcc-5.1.0.tar.bz2
md5sum = d5525b1127d07d215960e6051c5da35e
url = http://ftp.gnu.org/gnu/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2
md5sum = a51bcfeb3da7dd4c623e27207ed43467
# make install does not work when several core are used
make-targets = install -j1
......
......@@ -10,8 +10,8 @@ extends =
[gettext]
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/pub/gnu/gettext/gettext-0.19.4.tar.lz
md5sum = 3e2c6f64efbffd97520ec3b998682c6b
url = http://ftp.gnu.org/pub/gnu/gettext/gettext-0.19.6.tar.lz
md5sum = 45b2a123cdc7cef54df98152a0da3fcc
configure-options =
--disable-static
......
......@@ -16,8 +16,8 @@ parts =
[git]
recipe = slapos.recipe.cmmi
url = https://www.kernel.org/pub/software/scm/git/git-2.2.1.tar.xz
md5sum = 43e01f9d96ba8c11611e0eef0d9f9f28
url = https://www.kernel.org/pub/software/scm/git/git-2.5.1.tar.xz
md5sum = 55b9c496ea2d87148a2bfe1b6f6edd02
configure-options =
--with-curl=${curl:location}
--with-openssl=${openssl:location}
......
......@@ -10,9 +10,10 @@ parts =
[glib]
recipe = slapos.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/core/3.14/3.14.2/sources/glib-2.42.1.tar.xz
md5sum = 89c4119e50e767d3532158605ee9121a
url = http://ftp.gnome.org/pub/gnome/core/3.16/3.16.2/sources/glib-2.44.1.tar.xz
md5sum = 83efba4722a9674b97437d1d99af79db
configure-options =
--with-python=${python2.7:location}/bin/python2.7
--disable-static
--disable-selinux
--disable-fam
......
......@@ -11,8 +11,8 @@ parts =
[glibmm]
recipe = slapos.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/core/3.14/3.14.2/sources/glibmm-2.42.0.tar.xz
md5sum = 7c52cc42085d30ac3b73d74c3f2eb22e
url = http://ftp.gnome.org/pub/gnome/core/3.16/3.16.2/sources/glibmm-2.44.0.tar.xz
md5sum = 32ee4150b436d097fe2506d0b0b13a75
pkg_config_depends = ${glib:location}/lib/pkgconfig:${libsigc:location}/lib/pkgconfig
configure-options =
--disable-documentation
......
......@@ -26,8 +26,8 @@ environment =
[gnutls]
recipe = slapos.recipe.cmmi
url = ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2/gnutls-3.2.21.tar.lz
md5sum = a653d93a5a26434474c603470cc86666
url = ftp://ftp.gnutls.org/gcrypt/gnutls/v3.3/gnutls-3.3.17.1.tar.xz
md5sum = 8d01c7e7f2cbc5871fdca832d2260b6b
configure-options =
--disable-static
--disable-libdane
......@@ -35,7 +35,7 @@ configure-options =
--disable-crywrap
--without-tpm
environment =
PATH=${pkgconfig:location}/bin:${lunzip:location}/bin:%(PATH)s
PATH=${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${nettle:location}/lib/pkgconfig:${p11-kit:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig
CPPFLAGS=-I${gmp:location}/include -I${zlib:location}/include
LDFLAGS=-L${gmp:location}/lib -Wl,-rpath=${gmp:location}/lib -Wl,-rpath=${nettle:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
......@@ -13,8 +13,8 @@ extends =
[groonga]
recipe = slapos.recipe.cmmi
url = http://packages.groonga.org/source/groonga/groonga-5.0.4.tar.gz
md5sum = 4c83e9b12e9fad96a5b51874ddf66dc4
url = http://packages.groonga.org/source/groonga/groonga-5.0.7.tar.gz
md5sum = 389d5353a18ff5f48ccf65a576c7b2d1
# temporary patch to respect more tokens in natural language mode.
patches =
${:_profile_base_location_}/groonga.patch#9ed02fbe8400402d3eab47eee149978b
......
......@@ -24,14 +24,9 @@ parts =
[cairo]
recipe = slapos.recipe.cmmi
url = http://cairographics.org/releases/cairo-1.12.16.tar.xz
md5sum = a1304edcdc99282f478b995ee5f8f854
url = http://cairographics.org/releases/cairo-1.14.2.tar.xz
md5sum = e1cdfaf1c6c995c4d4c54e07215b0118
pkg_config_depends = ${libXext:location}/lib/pkgconfig:${libXext:pkg_config_depends}:${libpng:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${fontconfig:pkg_config_depends}:${pixman:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig
patch-options = -p1
patches =
${:_profile_base_location_}/cairo-fix_gcc4.9_ftbfs.patch#d4c843a655be8f1df548c9492d253359
pre-configure =
autoreconf -vfi
configure-options =
--disable-static
--disable-gtk-doc-html
......@@ -41,10 +36,9 @@ configure-options =
--disable-xcb
--enable-ft
--enable-fc
--disable-lto
environment =
M4=${m4:location}/bin/m4
PATH=${freetype:location}/bin:${pkgconfig:location}/bin:${xz-utils:location}/bin:${autoconf:location}/bin:${automake:location}/bin:${libtool:location}/bin:%(PATH)s
PATH=${freetype:location}/bin:${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${:pkg_config_depends}
CPPFLAGS=-I${zlib:location}/include
LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
......@@ -80,8 +74,8 @@ environment =
[gdk-pixbuf]
recipe = slapos.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/core/3.14/3.14.2/sources/gdk-pixbuf-2.31.1.tar.xz
md5sum = 74cde211f5b7ac1015d1a7c9feee037c
url = http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/2.31/gdk-pixbuf-2.31.6.tar.xz
md5sum = 67219eb45ed0aba90b3158042b909d4e
pkg_config_depends = ${glib:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libX11:pkg_config_depends}
configure-options =
--disable-static
......@@ -97,8 +91,11 @@ environment =
[atk]
recipe = slapos.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/core/3.14/3.14.2/sources/atk-2.14.0.tar.xz
md5sum = ecb7ca8469a5650581b1227d78051b8b
url = http://ftp.gnome.org/pub/gnome/core/3.16/3.16.2/sources/atk-2.16.0.tar.xz
md5sum = c7c5002bd6e58b4723a165f1bf312116
configure-options =
--with-python=${python2.7:location}/bin/python2.7
--disable-gtk-doc-html
environment =
PATH=${glib:location}/bin:${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig
......@@ -107,8 +104,8 @@ environment =
[gtk-2]
recipe = slapos.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/core/3.14/3.14.2/sources/gtk+-2.24.25.tar.xz
md5sum = 612350704dd3aacb95355a4981930c6f
url = http://ftp.gnome.org/pub/gnome/core/3.16/3.16.2/sources/gtk+-2.24.28.tar.xz
md5sum = bfacf87b2ea67e4e5c7866a9003e6526
pkg_config_depends = ${pango:location}/lib/pkgconfig:${pango:pkg_config_depends}:${atk:location}/lib/pkgconfig:${gdk-pixbuf:location}/lib/pkgconfig
configure-options =
--disable-static
......
From c3645d97ebd24c6f7ad850785d585aebc706a11c Mon Sep 17 00:00:00 2001
From: Bryce Harrington <b.harrington@samsung.com>
Date: Tue, 08 Jul 2014 20:14:20 +0000
Subject: configure.ac: Add a --disable-lto configure option
Link-Time Optimization seems to be stable enough with gcc 4.8 and 4.9,
but has proven to be an issue in the past for many cairo users (webkit,
efl, ubuntu, opensuse, gentoo, arch...) who carry patches to disable it.
Gentoo's patch[1] adds a --disable-lto option to leave it enabled by
default but give users the ability to work around lto related build
problems (c.f. fdo #77060). Patch appears to have been authored by
Alexandre Rostovtsev[2].
1: sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-libs/cairo/files/cairo-1.12.16-lto-optional.patch
2: https://bugs.gentoo.org/show_bug.cgi?id=509552
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=60852
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
---
diff --git a/build/configure.ac.warnings b/build/configure.ac.warnings
index f984eb2..a72d948 100644
--- a/build/configure.ac.warnings
+++ b/build/configure.ac.warnings
@@ -38,13 +38,18 @@ dnl options. Namely, the following:
dnl -flto working really needs a test link, not just a compile
-safe_MAYBE_WARN="$MAYBE_WARN"
-MAYBE_WARN="$MAYBE_WARN -flto"
-AC_TRY_LINK([],[
+AC_ARG_ENABLE(lto,
+ AS_HELP_STRING([--disable-lto],
+ [Do not try to use Link-Time Optimization]))
+if test "x$enable_lto" != "xno"; then
+ safe_MAYBE_WARN="$MAYBE_WARN"
+ MAYBE_WARN="$MAYBE_WARN -flto"
+ AC_TRY_LINK([],[
int main(int argc, char **argv) { return 0; }
-],[],[
+ ],[],[
MAYBE_WARN="$safe_MAYBE_WARN"
-])
+ ])
+fi
MAYBE_WARN="$MAYBE_WARN -fno-strict-aliasing -fno-common"
--
cgit v0.9.0.2-2-gbebe
......@@ -28,8 +28,8 @@ environment =
[pangomm]
recipe = slapos.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/core/3.12/3.12.2/sources/pangomm-2.34.0.tar.xz
md5sum = 2c702caede167323c9ed9eed2b933098
url = http://ftp.gnome.org/pub/gnome/core/3.16/3.16.2/sources/pangomm-2.36.0.tar.xz
md5sum = 62910723211d86ab825b666b479871c9
pkg_config_depends = ${pango:location}/lib/pkgconfig:${pango:pkg_config_depends}:${glibmm:location}/lib/pkgconfig:${glibmm:pkg_config_depends}:${cairomm:location}/lib/pkgconfig
configure-options =
--disable-static
......
......@@ -11,8 +11,8 @@ parts = haproxy
[haproxy]
recipe = slapos.recipe.cmmi
url = http://www.haproxy.org/download/1.5/src/haproxy-1.5.11.tar.gz
md5sum = 5500a79d0d2b238d4a1e9749bd0c2cb2
url = http://www.haproxy.org/download/1.5/src/haproxy-1.5.14.tar.gz
md5sum = ad9d7262b96ba85a0f8c6acc6cb9edde
configure-command = true
# If the system is running on Linux 2.6, we use "linux26" as the TARGET,
# otherwise use "generic".
......
......@@ -33,14 +33,17 @@ environment =
[inkscape]
recipe = slapos.recipe.cmmi
url = http://sourceforge.net/projects/inkscape/files/inkscape/0.48.5/inkscape-0.48.5.tar.bz2
md5sum = 431cda5cd40cd4fdf2b89db1bdcce61f
url = https://inkscape.org/en/gallery/item/3860/inkscape-0.91.tar.bz2
md5sum = 278dfa4514adcde23546370ec2c84581
pkg_config_depends = ${gtkmm:location}/lib/pkgconfig:${gtkmm:pkg_config_depends}:${gsl:location}/lib/pkgconfig:${popt:location}/lib/pkgconfig:${garbage-collector:location}/lib/pkgconfig:${libxslt:location}/lib/pkgconfig
configure-options =
--disable-static
--disable-openmp
--disable-lcms
--disable-wpg
--disable-visio
--disable-cdr
--without-gnome-vfs
--without-perl
--without-python
environment =
PATH=${freetype:location}/bin:${gdk-pixbuf:location}/bin:${gettext:location}/bin:${glib:location}/bin:${intltool:location}/bin:${libxml2:location}/bin:${pkgconfig:location}/bin:${pango:location}/bin:${perl:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${:pkg_config_depends}
......
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]
parts =
json-c
[json-c-patch-base]
recipe = hexagonit.recipe.download
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}
[buildout]
parts = libdb
[libdb-hooks-download]
url = ${:_profile_base_location_}/${:filename}
md5sum = acb3bfb990a48381176c1e8f74130e30
recipe = hexagonit.recipe.download
download-only=true
filename = libdb-hooks.py
[libdb]
recipe = slapos.recipe.cmmi
url = http://download.oracle.com/berkeley-db/db-4.5.20.tar.gz
md5sum = b0f1c777708cb8e9d37fb47e7ed3312d
pre-configure-hook = ${libdb-hooks-download:location}/${libdb-hooks-download:filename}:pre_configure_hook
configure-command = ../dist/configure
configure-command = cd build_unix && ../dist/configure
configure-options =
--disable-static
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
make-binary = cd build_unix && make
import os
def pre_configure_hook(options, buildout):
os.chdir('build_unix')
[buildout]
parts =
libestr
[libestr]
recipe = slapos.recipe.cmmi
url = http://libestr.adiscon.com/files/download/libestr-0.1.10.tar.gz
md5sum = f4c9165a23587e77f7efe65d676d5e8e
......@@ -9,14 +9,14 @@ parts =
[libreoffice-bin]
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 = 4.4.1.2
version = 5.0.0.5
url = http://downloadarchive.documentfoundation.org/libreoffice/old/${:version}/rpm/%s/LibreOffice_${:version}_Linux_%s_rpm.tar.gz
# supported architectures md5sums
md5sum_x86 = 23b740e84bc2b8774d50ac97dd553afd
md5sum_x86-64 = 8de6f3d1d4af3826a3a1695a47444948
md5sum_x86 = d54ebe17b34f39446762e73fc3d31277
md5sum_x86-64 = 6e1c97eaa221748e328c80470d296583
# where office code can be found?
officedir = libreoffice4.4
officedir = libreoffice5.0
# script to install
script =
......
......@@ -21,8 +21,8 @@ environment =
[librsvg]
recipe = slapos.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/core/3.14/3.14.2/sources/librsvg-2.40.5.tar.xz
md5sum = c2b044fccf415902a052d0e978e0ea60
url = http://ftp.gnome.org/pub/gnome/core/3.16/3.16.2/sources/librsvg-2.40.9.tar.xz
md5sum = 31df15e3beaa8fbbf538ca3c52b400d2
pkg_config_depends = ${pango:location}/lib/pkgconfig:${pango:pkg_config_depends}:${zlib:location}/lib/pkgconfig:${gdk-pixbuf:location}/lib/pkgconfig:${libcroco:location}/lib/pkgconfig
configure-options =
--disable-static
......
......@@ -9,8 +9,8 @@ parts =
[libsigc]
recipe = slapos.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/core/3.14/3.14.2/sources/libsigc++-2.4.0.tar.xz
md5sum = c6cd2259f5ef973e4c8178d0abbdbfa7
url = http://ftp.gnome.org/pub/gnome/core/3.16/3.16.2/sources/libsigc++-2.4.1.tar.xz
md5sum = 55945ba6e1652f89999e910f6b52047c
configure-options =
--disable-documentation
environment =
......
......@@ -4,8 +4,8 @@ parts =
[libtasn1]
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/libtasn1/libtasn1-4.5.tar.gz
md5sum = 81d272697545e82d39f6bd14854b68f0
url = http://ftp.gnu.org/gnu/libtasn1/libtasn1-4.6.tar.gz
md5sum = 454a7f80362f38bd2335b6e9d95f57a6
configure-options =
--disable-static
--disable-gtk-doc-html
[buildout]
extends =
../m4/buildout.cfg
../xz-utils/buildout.cfg
parts = libtool
[libtool]
recipe = slapos.recipe.cmmi
md5sum = ee9c087775aeb98ce53a9c69da865a55
url = http://ftp.gnu.org/gnu/libtool/libtool-2.4.5.tar.xz
md5sum = 1bfb9b923f2c1339b4d2ce1807064aa5
url = http://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.xz
configure-options =
--disable-static
environment =
M4=${m4:location}/bin/m4
PATH=${xz-utils:location}/bin:%(PATH)s
......@@ -4,7 +4,7 @@ parts =
[lunzip]
recipe = slapos.recipe.cmmi
url = http://download.savannah.gnu.org/releases/lzip/lunzip/lunzip-1.6.tar.gz
md5sum = 5e6ad4fe91f235be64227bc9930986fe
url = http://download.savannah.gnu.org/releases-redirect/lzip/lunzip/lunzip-1.7.tar.gz
md5sum = cb37bd46590a78bd19a77748b3a097ee
configure-options =
--disable-static
......@@ -20,9 +20,9 @@ parts =
[mariadb]
recipe = slapos.recipe.cmmi
version = 10.0.19
version = 10.0.21
url = https://downloads.mariadb.org/f/mariadb-${:version}/source/mariadb-${:version}.tar.gz/from/http:/ftp.osuosl.org/pub/mariadb
md5sum = aeaf101c688515dc8f73a5250e6c1df9
md5sum = 956561f3798d1fe8dfbe4b665287a87a
patch-options = -p0
patches =
${:_profile_base_location_}/mariadb_10.0.8_create_system_tables__no_test.patch#a176d491cf45fccd53ee397c70393bc4
......@@ -57,8 +57,8 @@ environment =
# mroonga - a storage engine for MySQL. It provides fast fulltext search feature to all MySQL users.
# http://mroonga.github.com/
recipe = slapos.recipe.cmmi
url = http://packages.groonga.org/source/mroonga/mroonga-5.03.tar.gz
md5sum = 4f5413d5c94ebc44caeeb5cb62d346ed
url = http://packages.groonga.org/source/mroonga/mroonga-5.06.tar.gz
md5sum = 15597acfb1375c931e7b5588511c17bb
configure-command = mkdir fake_mariadb_source && ln -s ${mariadb:location}/include/mysql/private fake_mariadb_source/sql && ./configure
configure-options =
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
......
......@@ -4,18 +4,22 @@ parts =
[ncurses]
recipe = slapos.recipe.cmmi
url = ftp://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz
md5sum = 8cb9c412e5f2d96bc6f459aa8c6282a1
url = ftp://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz
md5sum = ee13d052e1ead260d7c28071f46eefb1
configure-options =
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
--with-shared
--without-ada
--without-manpages
--without-progs
--without-tests
--without-normal
--without-debug
--without-gpm
--enable-rpath
# tricky way to rerun with --enable-widec
make-targets =
install && (for i in curses unctrl eti form menu panel term; do ln -sf ncurses/$i.h ${buildout:parts-directory}/${:_buildout_section_name_}/include/$i.h; done; ln -sf libncurses.so ${buildout:parts-directory}/${:_buildout_section_name_}/lib/libcurses.so) && ./configure ${:configure-options} --enable-widec && make ${:make-options} install
install && (for i in curses unctrl eti form menu panel term; do ln -sf ncurses/$i.h ${buildout:parts-directory}/${:_buildout_section_name_}/include/$i.h; done; ln -sf libncurses.so ${buildout:parts-directory}/${:_buildout_section_name_}/lib/libcurses.so) && ./configure ${:configure-options} --enable-widec && make ${:make-options} && make ${:make-options} install
# pass dummy LDCONFIG to skip needless calling of ldconfig by non-root user
environment =
LDCONFIG=/bin/echo
......
......@@ -11,8 +11,8 @@ parts = nginx-output
[nginx-common]
recipe = slapos.recipe.cmmi
url = http://nginx.org/download/nginx-1.7.8.tar.gz
md5sum = fd5ab813fc1853cd8efe580ead577c3e
url = http://nginx.org/download/nginx-1.9.4.tar.gz
md5sum = 27322fbb4b265c0e0cc548f5e6b7f201
[nginx]
<= nginx-common
......
[buildout]
extends =
../gcc/buildout.cfg
../openblas/buildout.cfg
[numpy-env]
PATH = ${gcc-fortran:location}/bin:%(PATH)s
OPENBLAS = ${openblas:location}/lib/libopenblas.so
LAPACK = ${openblas:location}/lib/libopenblas.so
ATLAS = ${openblas:location}/lib/libopenblas.so
parts = numpy
[numpy]
recipe = zc.recipe.egg:custom
egg = numpy
environment = numpy-env
rpath =
${gcc-fortran:location}/lib
${gcc-fortran:location}/lib64
${openblas:location}/lib
[buildout]
extends =
buildout.cfg
../gcc/buildout.cfg
../openblas/buildout.cfg
[numpy-env]
PATH = ${gcc-fortran:location}/bin:%(PATH)s
OPENBLAS = ${openblas:location}/lib/libopenblas.so
LAPACK = ${openblas:location}/lib/libopenblas.so
ATLAS = ${openblas:location}/lib/libopenblas.so
[numpy]
environment = numpy-env
rpath =
${gcc-fortran:location}/lib
${gcc-fortran:location}/lib64
${openblas:location}/lib
......@@ -4,8 +4,13 @@ parts =
[openblas]
recipe = slapos.recipe.cmmi
url = http://github.com/xianyi/OpenBLAS/tarball/v0.2.13
md5sum = 74adf4c0d0d82bff4774be5bf2134183
# OpenBLAS 0.2.13 and 0.2.14 does not build on Broadwell
# CPU (Detecting CPU failed). But version 0.2.15 (which
# does not exist yet) will fix the issue. Until then you
# can add in options :
# TARGET=HASWELL
url = http://github.com/xianyi/OpenBLAS/archive/v0.2.14.tar.gz
md5sum = 53cda7f420e1ba0ea55de536b24c9701
configure-command = true
make-options =
PREFIX="${buildout:parts-directory}/${:_buildout_section_name_}"
......
......@@ -8,8 +8,8 @@ extends =
[openldap]
recipe = slapos.recipe.cmmi
url = ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.40.tgz
md5sum = 423c1f23d2a0cb96b3e9baf7e9d7dda7
url = http://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.4.42.tgz
md5sum = 47c8e2f283647a6105b8b0325257e922
configure-options =
--disable-static
--disable-slapd
......
......@@ -16,13 +16,13 @@ parts =
[openssl]
recipe = slapos.recipe.cmmi
url = https://www.openssl.org/source/openssl-1.0.1n.tar.gz
md5sum = 139568bd5a56fa49b72a290d37113f30
url = https://www.openssl.org/source/openssl-1.0.2d.tar.gz
md5sum = 38dd619b2e77cbac69b99f52a053d25a
patch-binary = ${patch:location}/bin/patch
patches =
${:_profile_base_location_}/openssl-nodoc.patch#dd1345ae7ed18ccf176bc6b77c516f98
${:_profile_base_location_}/openssl-nodoc.patch#a78c14908fe9ec624b1fb9fa97e01bb9
${:_profile_base_location_}/openssl-exlibs.patch#fba5c873cf974ba80a973be41da3c738
${:_profile_base_location_}/openssl-1.0.1m-parallel-build.patch#a1ddd93b5b296473c7446131deb31f93
${:_profile_base_location_}/openssl-1.0.2d-parallel-build.patch#e4cf66a48a85a0da68fd4842e6fab54b
patch-options = -p1
configure-command = ./config
configure-options =
......
https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-libs/openssl/files/
http://rt.openssl.org/Ticket/Display.html?id=2084
--- openssl-1.0.1m/crypto/Makefile
+++ openssl-1.0.1m/crypto/Makefile
diff -ur openssl-1.0.2d.orig/crypto/Makefile openssl-1.0.2d/crypto/Makefile
--- openssl-1.0.2d.orig/crypto/Makefile 2015-07-09 21:02:54.000000000 +0900
+++ openssl-1.0.2d/crypto/Makefile 2015-07-09 22:59:19.585880610 +0900
@@ -85,11 +85,11 @@
@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
......@@ -11,7 +9,7 @@ http://rt.openssl.org/Ticket/Display.html?id=2084
+ +@target=all; $(RECURSIVE_MAKE)
files:
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
$(PERL) $(TOP)/util/files.pl "CPUID_OBJ=$(CPUID_OBJ)" Makefile >> $(TOP)/MINFO
- @target=files; $(RECURSIVE_MAKE)
+ +@target=files; $(RECURSIVE_MAKE)
......@@ -24,7 +22,7 @@ http://rt.openssl.org/Ticket/Display.html?id=2084
-$(LIB): $(LIBOBJ)
+$(LIB): $(LIBOBJ) | subdirs
$(AR) $(LIB) $(LIBOBJ)
[ -z "$(FIPSLIBDIR)" ] || $(AR) $(LIB) $(FIPSLIBDIR)fipscanister.o
test -z "$(FIPSLIBDIR)" || $(AR) $(LIB) $(FIPSLIBDIR)fipscanister.o
$(RANLIB) $(LIB) || echo Never mind.
@@ -111,7 +111,7 @@
fi
......@@ -44,25 +42,9 @@ http://rt.openssl.org/Ticket/Display.html?id=2084
lint:
@target=lint; $(RECURSIVE_MAKE)
--- openssl-1.0.1m/crypto/objects/Makefile
+++ openssl-1.0.1m/crypto/objects/Makefile
@@ -44,11 +44,11 @@
# objects.pl both reads and writes obj_mac.num
obj_mac.h: objects.pl objects.txt obj_mac.num
$(PERL) objects.pl objects.txt obj_mac.num obj_mac.h
- @sleep 1; touch obj_mac.h; sleep 1
-obj_xref.h: objxref.pl obj_xref.txt obj_mac.num
+# This doesn't really need obj_mac.h, but since that rule reads & writes
+# obj_mac.num, we can't run in parallel with it.
+obj_xref.h: objxref.pl obj_xref.txt obj_mac.num obj_mac.h
$(PERL) objxref.pl obj_mac.num obj_xref.txt > obj_xref.h
- @sleep 1; touch obj_xref.h; sleep 1
files:
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
--- openssl-1.0.1m/engines/Makefile
+++ openssl-1.0.1m/engines/Makefile
diff -ur openssl-1.0.2d.orig/engines/Makefile openssl-1.0.2d/engines/Makefile
--- openssl-1.0.2d.orig/engines/Makefile 2015-07-09 21:03:07.000000000 +0900
+++ openssl-1.0.2d/engines/Makefile 2015-07-09 22:59:19.585880610 +0900
@@ -72,7 +72,7 @@
all: lib subdirs
......@@ -90,62 +72,39 @@ http://rt.openssl.org/Ticket/Display.html?id=2084
tags:
ctags $(SRC)
--- openssl-1.0.1m/Makefile.org
+++ openssl-1.0.1m/Makefile.org
@@ -273,17 +273,17 @@
build_libs: build_crypto build_ssl build_engines
diff -ur openssl-1.0.2d.orig/Makefile.org openssl-1.0.2d/Makefile.org
--- openssl-1.0.2d.orig/Makefile.org 2015-07-09 20:57:15.000000000 +0900
+++ openssl-1.0.2d/Makefile.org 2015-07-09 22:59:57.214057201 +0900
@@ -278,21 +278,21 @@
build_libssl: build_ssl libssl.pc
build_crypto:
- @dir=crypto; target=all; $(BUILD_ONE_CMD)
-build_ssl:
- @dir=ssl; target=all; $(BUILD_ONE_CMD)
-build_engines:
- @dir=engines; target=all; $(BUILD_ONE_CMD)
-build_apps:
- @dir=apps; target=all; $(BUILD_ONE_CMD)
-build_tests:
- @dir=test; target=all; $(BUILD_ONE_CMD)
-build_tools:
- @dir=tools; target=all; $(BUILD_ONE_CMD)
+ +@dir=crypto; target=all; $(BUILD_ONE_CMD)
+build_ssl: build_crypto
build_ssl: build_crypto
- @dir=ssl; target=all; $(BUILD_ONE_CMD)
+ +@dir=ssl; target=all; $(BUILD_ONE_CMD)
+build_engines: build_crypto
build_engines: build_crypto
- @dir=engines; target=all; $(BUILD_ONE_CMD)
+ +@dir=engines; target=all; $(BUILD_ONE_CMD)
+build_apps: build_libs
build_apps: build_libs
- @dir=apps; target=all; $(BUILD_ONE_CMD)
+ +@dir=apps; target=all; $(BUILD_ONE_CMD)
+build_tests: build_libs
build_tests: build_libs
- @dir=test; target=all; $(BUILD_ONE_CMD)
+ +@dir=test; target=all; $(BUILD_ONE_CMD)
+build_tools: build_libs
build_tools: build_libs
- @dir=tools; target=all; $(BUILD_ONE_CMD)
+ +@dir=tools; target=all; $(BUILD_ONE_CMD)
all_testapps: build_libs build_testapps
build_testapps:
@@ -538,9 +538,9 @@
dist_pem_h:
(cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
-install: all install_docs install_sw
+install: install_docs install_sw
-install_sw:
+install_dirs:
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
@@ -549,12 +549,19 @@
$(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
$(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
$(INSTALL_PREFIX)$(OPENSSLDIR)/private
+ @$(PERL) $(TOP)/util/mkdir-p.pl \
+ $(INSTALL_PREFIX)$(MANDIR)/man1 \
+ $(INSTALL_PREFIX)$(MANDIR)/man3 \
+ $(INSTALL_PREFIX)$(MANDIR)/man5 \
+ $(INSTALL_PREFIX)$(MANDIR)/man7
+
+install_sw: install_dirs
@set -e; headerlist="$(EXHEADER)"; for i in $$headerlist;\
do \
- @dir=crypto; target=testapps; $(BUILD_ONE_CMD)
+ +@dir=crypto; target=testapps; $(BUILD_ONE_CMD)
fips_premain_dso$(EXE_EXT): libcrypto.a
[ -z "$(FIPSCANLIB)" ] || $(CC) $(CFLAG) -Iinclude \
@@ -543,7 +543,7 @@
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
done;
......@@ -154,22 +113,9 @@ http://rt.openssl.org/Ticket/Display.html?id=2084
@set -e; liblist="$(LIBS)"; for i in $$liblist ;\
do \
if [ -f "$$i" ]; then \
@@ -634,12 +641,7 @@
done; \
done
-install_docs:
- @$(PERL) $(TOP)/util/mkdir-p.pl \
- $(INSTALL_PREFIX)$(MANDIR)/man1 \
- $(INSTALL_PREFIX)$(MANDIR)/man3 \
- $(INSTALL_PREFIX)$(MANDIR)/man5 \
- $(INSTALL_PREFIX)$(MANDIR)/man7
+install_docs: install_dirs
@pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \
here="`pwd`"; \
filecase=; \
--- openssl-1.0.1m/Makefile.shared
+++ openssl-1.0.1m/Makefile.shared
diff -ur openssl-1.0.2d.orig/Makefile.shared openssl-1.0.2d/Makefile.shared
--- openssl-1.0.2d.orig/Makefile.shared 2015-07-09 20:53:21.000000000 +0900
+++ openssl-1.0.2d/Makefile.shared 2015-07-09 22:59:19.589880628 +0900
@@ -105,6 +105,7 @@
SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
......@@ -186,9 +132,10 @@ http://rt.openssl.org/Ticket/Display.html?id=2084
( $(SET_X); rm -f $$SHLIB$$SHLIB_SUFFIX; \
ln -s $$prev $$SHLIB$$SHLIB_SUFFIX ); \
fi; \
--- openssl-1.0.1m/test/Makefile
+++ openssl-1.0.1m/test/Makefile
@@ -130,7 +130,7 @@
diff -ur openssl-1.0.2d.orig/test/Makefile openssl-1.0.2d/test/Makefile
--- openssl-1.0.2d.orig/test/Makefile 2015-07-09 21:03:09.000000000 +0900
+++ openssl-1.0.2d/test/Makefile 2015-07-09 22:59:19.589880628 +0900
@@ -134,7 +134,7 @@
tags:
ctags $(SRC)
......@@ -197,7 +144,7 @@ http://rt.openssl.org/Ticket/Display.html?id=2084
apps:
@(cd ..; $(MAKE) DIRS=apps all)
@@ -388,118 +388,118 @@
@@ -408,121 +408,121 @@
link_app.$${shlib_target}
$(RSATEST)$(EXE_EXT): $(RSATEST).o $(DLIBCRYPTO)
......@@ -344,6 +291,10 @@ http://rt.openssl.org/Ticket/Display.html?id=2084
- @target=$(SRPTEST); $(BUILD_CMD)
+ +@target=$(SRPTEST); $(BUILD_CMD)
$(V3NAMETEST)$(EXE_EXT): $(V3NAMETEST).o $(DLIBCRYPTO)
- @target=$(V3NAMETEST); $(BUILD_CMD)
+ +@target=$(V3NAMETEST); $(BUILD_CMD)
$(HEARTBEATTEST)$(EXE_EXT): $(HEARTBEATTEST).o $(DLIBCRYPTO)
- @target=$(HEARTBEATTEST); $(BUILD_CMD_STATIC)
+ +@target=$(HEARTBEATTEST); $(BUILD_CMD_STATIC)
......@@ -352,9 +303,9 @@ http://rt.openssl.org/Ticket/Display.html?id=2084
- @target=$(CONSTTIMETEST) $(BUILD_CMD)
+ +@target=$(CONSTTIMETEST) $(BUILD_CMD)
#$(AESTEST).o: $(AESTEST).c
# $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c
@@ -512,7 +512,7 @@
$(VERIFYEXTRATEST)$(EXE_EXT): $(VERIFYEXTRATEST).o
@target=$(VERIFYEXTRATEST) $(BUILD_CMD)
@@ -538,7 +538,7 @@
# fi
dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO)
......
--- a/Makefile 2012-01-18 14:42:28.000000000 +0100
+++ b/Makefile 2012-01-24 17:43:40.000000000 +0100
@@ -494,7 +494,7 @@
diff -ur openssl-1.0.2c.orig/Makefile openssl-1.0.2c/Makefile
--- openssl-1.0.2c.orig/Makefile 2015-06-12 17:10:40.000000000 +0200
+++ openssl-1.0.2c/Makefile 2015-06-25 15:06:08.858209486 +0200
@@ -528,7 +528,7 @@
dist_pem_h:
(cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
......
......@@ -9,8 +9,8 @@ extends =
[p11-kit]
recipe = slapos.recipe.cmmi
url = http://p11-glue.freedesktop.org/releases/p11-kit-0.21.1.tar.gz
md5sum = 4eea22e3b58643de141990deaae6646b
url = http://p11-glue.freedesktop.org/releases/p11-kit-0.23.1.tar.gz
md5sum = 96f073270c489c9a594e1c9413f42db8
configure-options =
--disable-static
--disable-doc-html
......
......@@ -6,7 +6,7 @@ parts =
[patch]
recipe = slapos.recipe.cmmi
url = ftp://ftp.gnu.org/gnu/patch/patch-2.7.3.tar.xz
md5sum = 29b87be845e4662ab0ca0d48a805ecc6
url = ftp://ftp.gnu.org/gnu/patch/patch-2.7.5.tar.xz
md5sum = e3da7940431633fb65a01b91d3b7a27a
environment =
PATH=${xz-utils:location}/bin:%(PATH)s
......@@ -4,8 +4,8 @@ parts =
[pcre]
recipe = slapos.recipe.cmmi
url = http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.bz2
md5sum = b767bc9af0c20bc9c1fe403b0d41ad97
url = http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.bz2
md5sum = ed91be292cb01d21bc7e526816c26981
configure-options =
--disable-static
--enable-unicode-properties
......@@ -8,8 +8,8 @@ parts =
[percona-toolkit]
recipe = slapos.recipe.cmmi
version = 2.2.12
version = 2.2.15
url = http://www.percona.com/redir/downloads/percona-toolkit/${:version}/tarball/percona-toolkit-${:version}.tar.gz
md5sum = 7c39b06b97ebab97ae5d3c78d1186258
md5sum = 022f40dadaea9025820530ea1f986192
configure-command =
${perl:location}/bin/perl Makefile.PL
......@@ -25,4 +25,4 @@ configure-command =
-Dusethreads
environment =
PATH=${patch:location}/bin:%(PATH)s
post-make-hook = ${:_profile_base_location_}/perl-create-libs-symlink.py#539cb3cd0d1090f7f30a8e5a82b37854:post_make_hook
post-make-hook = ${:_profile_base_location_}/perl-create-libs-symlink.py#28d12de5c9c7985e65233d56817e3bec:post_make_hook
......@@ -20,5 +20,8 @@ def post_make_hook(options, buildout):
# matches[0] is a prefix of "location"
# For the symlink, we want the relative path.
rel_link = os.path.relpath(os.path.dirname(matches[0]), location)
os.symlink(rel_link, os.path.join(location, "libs-c"))
simlink_location = os.path.join(location, "libs-c")
if os.path.islink(simlink_location):
os.unlink(simlink_location)
os.symlink(rel_link, simlink_location)
print "Created symlink \"libs-c\" to", rel_link
......@@ -6,14 +6,17 @@ extends =
../libdb/buildout.cfg
../openssl/buildout.cfg
../pcre/buildout.cfg
parts = postfix
../cyrus-sasl/buildout.cfg
[postfix]
recipe = slapos.recipe.cmmi
url = ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-2.8.3.tar.gz
md5sum = b3922ededd3fd6051f759e58a4ada3ae
url = ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-2.11.6.tar.gz
md5sum = c3277d05b78eaaf5955406bc7b6d2b9f
location = ${buildout:parts-directory}/${:_buildout_section_name_}
patch-options = -p1
patches =
${:_profile_base_location_}/noroot.patch#738bcc97b8044c45b58708bdf3a84b8e
${:_profile_base_location_}/skip-libdb-check.patch#f7fdbd8787874b535fee548b0139c0d8
configure-command = make
configure-options = makefiles CCARGS='-DUSE_TLS -DHAS_PCRE -DHAS_DB -I${libdb:location}/include -I${pcre:location}/include -I${openssl:location}/include' AUXLIBS='-L${openssl:location}/lib -L${pcre:location}/lib -L${libdb:location}/lib -lssl -lpcre -ldb -lcrypto -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${pcre:location}/lib -Wl,-rpath=${libdb:location}/lib'
configure-options = makefiles CCARGS='-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -DUSE_TLS -DHAS_PCRE -DHAS_DB -I${libdb:location}/include -I${pcre:location}/include -I${openssl:location}/include -I${cyrus-sasl:location}/include/sasl' AUXLIBS='-L${openssl:location}/lib -L${pcre:location}/lib -L${libdb:location}/lib -L${cyrus-sasl:location}/lib -lssl -lpcre -ldb -lcrypto -lsasl2 -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${pcre:location}/lib -Wl,-rpath=${libdb:location}/lib -Wl,-rpath=${cyrus-sasl:location}/lib'
make-targets = non-interactive-package install_root=${:location}
diff --git a/src/global/mail_params.c b/src/global/mail_params.c
index 2d91977..0f06298 100644
--- a/src/global/mail_params.c
+++ b/src/global/mail_params.c
@@ -721,7 +721,9 @@ void mail_params_init()
check_default_privs();
check_mail_owner();
check_sgid_group();
+ /*
check_overlap();
+ */
#ifdef HAS_DB
dict_db_cache_size = var_db_read_buf;
#endif
diff --git a/src/master/master.c b/src/master/master.c
index a9d5d1b..db88c55 100644
--- a/src/master/master.c
+++ b/src/master/master.c
@@ -315,10 +315,10 @@ int main(int argc, char **argv)
* privileges for selected operations. That's right - it takes privileges
* to toss privileges.
*/
- if (getuid() != 0)
+ /*if (getuid() != 0)
msg_fatal("the master command is reserved for the superuser");
if (unsafe() != 0)
- msg_fatal("the master command must not run as a set-uid process");
+ msg_fatal("the master command must not run as a set-uid process");*/
/*
* Process JCL.
@@ -392,8 +392,10 @@ int main(int argc, char **argv)
* all MTA processes cleanly. Give up if we can't separate from our
* parent process. We're not supposed to blow away the parent.
*/
+ /*
if (debug_me == 0 && master_detach != 0 && setsid() == -1 && getsid(0) != getpid())
msg_fatal("unable to set session and process group ID: %m");
+ */
/*
* Make some room for plumbing with file descriptors. XXX This breaks
diff --git a/src/postfix/postfix.c b/src/postfix/postfix.c
index 183c825..007c805 100644
--- a/src/postfix/postfix.c
+++ b/src/postfix/postfix.c
@@ -450,12 +450,12 @@ int main(int argc, char **argv)
* privileges for selected operations. That's right - it takes privileges
* to toss privileges.
*/
- if (getuid() != 0) {
+ /*if (getuid() != 0) {
msg_error("to submit mail, use the Postfix sendmail command");
msg_fatal("the postfix command is reserved for the superuser");
}
if (unsafe() != 0)
- msg_fatal("the postfix command must not run as a set-uid process");
+ msg_fatal("the postfix command must not run as a set-uid process");*/
/*
* Parse switches.
diff --git a/src/postsuper/postsuper.c b/src/postsuper/postsuper.c
index 9dabb5d..e678565 100644
--- a/src/postsuper/postsuper.c
+++ b/src/postsuper/postsuper.c
@@ -1150,10 +1150,10 @@ int main(int argc, char **argv)
* the secondary groups, the process environment, and so on. Otherwise,
* accidents can happen. If not with Postfix, then with other software.
*/
- if (unsafe() != 0)
+ /*if (unsafe() != 0)
msg_fatal("this postfix command must not run as a set-uid process");
if (getuid())
- msg_fatal("use of this command is reserved for the superuser");
+ msg_fatal("use of this command is reserved for the superuser");*/
/*
* Parse JCL.
diff --git a/src/util/chroot_uid.c b/src/util/chroot_uid.c
index 4a7660f..d5d4e67 100644
--- a/src/util/chroot_uid.c
+++ b/src/util/chroot_uid.c
@@ -55,10 +55,11 @@ void chroot_uid(const char *root_dir, const char *user_name)
msg_fatal("unknown user: %s", user_name);
uid = pwd->pw_uid;
gid = pwd->pw_gid;
+ /*
if (setgid(gid) < 0)
msg_fatal("setgid(%ld): %m", (long) gid);
if (initgroups(user_name, gid) < 0)
- msg_fatal("initgroups: %m");
+ msg_fatal("initgroups: %m");*/
}
/*
@@ -74,9 +75,11 @@ void chroot_uid(const char *root_dir, const char *user_name)
/*
* Drop the user privileges.
*/
+ /*
if (user_name != 0)
if (setuid(uid) < 0)
msg_fatal("setuid(%ld): %m", (long) uid);
+ */
/*
* Give the desperate developer a clue of what is happening.
diff --git a/src/util/set_eugid.c b/src/util/set_eugid.c
index ef35380..ed96a69 100644
--- a/src/util/set_eugid.c
+++ b/src/util/set_eugid.c
@@ -53,7 +53,7 @@
void set_eugid(uid_t euid, gid_t egid)
{
- int saved_errno = errno;
+/* int saved_errno = errno;
if (geteuid() != 0)
if (seteuid(0))
@@ -67,4 +67,4 @@ void set_eugid(uid_t euid, gid_t egid)
if (msg_verbose)
msg_info("set_eugid: euid %ld egid %ld", (long) euid, (long) egid);
errno = saved_errno;
-}
+*/}
diff --git a/src/util/set_ugid.c b/src/util/set_ugid.c
index bbcb901..5a7a48b 100644
--- a/src/util/set_ugid.c
+++ b/src/util/set_ugid.c
@@ -44,7 +44,7 @@
void set_ugid(uid_t uid, gid_t gid)
{
- int saved_errno = errno;
+/* int saved_errno = errno;
if (geteuid() != 0)
if (seteuid(0) < 0)
@@ -58,4 +58,4 @@ void set_ugid(uid_t uid, gid_t gid)
if (msg_verbose > 1)
msg_info("setugid: uid %ld gid %ld", (long) uid, (long) gid);
errno = saved_errno;
-}
+*/}
diff --git a/makedefs b/makedefs
index dd5f256..e90880e 100644
--- a/makedefs
+++ b/makedefs
@@ -299,13 +299,13 @@ case "$SYSTEM.$RELEASE" in
elif [ -f /usr/include/db/db.h ]
then
CCARGS="$CCARGS -I/usr/include/db"
- else
+ #else
# No, we're not going to try db1 db2 db3 etc.
# On a properly installed system, Postfix builds
# by including <db.h> and by linking with -ldb
- echo "No <db.h> include file found." 1>&2
- echo "Install the appropriate db*-devel package first." 1>&2
- exit 1
+ #echo "No <db.h> include file found." 1>&2
+ #echo "Install the appropriate db*-devel package first." 1>&2
+ #exit 1
fi
SYSLIBS="-ldb"
;;
@@ -372,12 +372,12 @@ EOF
elif [ -f /usr/include/db/db.h ]
then
CCARGS="$CCARGS -I/usr/include/db"
- else
+ #else
# On a properly installed system, Postfix builds
# by including <db.h> and by linking with -ldb
- echo "No <db.h> include file found." 1>&2
- echo "Install the appropriate db*-devel package first." 1>&2
- exit 1
+ #echo "No <db.h> include file found." 1>&2
+ #echo "Install the appropriate db*-devel package first." 1>&2
+ #exit 1
fi
SYSLIBS="-ldb"
;;
@@ -403,12 +403,12 @@ EOF
elif [ -f /usr/include/db/db.h ]
then
CCARGS="$CCARGS -I/usr/include/db"
- else
+ #else
# On a properly installed system, Postfix builds
# by including <db.h> and by linking with -ldb
- echo "No <db.h> include file found." 1>&2
- echo "Install the appropriate db*-devel package first." 1>&2
- exit 1
+ #echo "No <db.h> include file found." 1>&2
+ #echo "Install the appropriate db*-devel package first." 1>&2
+ #exit 1
fi
SYSLIBS="-ldb"
;;
[buildout]
extends =
../curl/buildout.cfg
../openssl/buildout.cfg
parts =
pycurl
[pycurl-env]
PATH = ${curl:location}/bin:${openssl:location}/bin:%(PATH)s
PYCURL_SSL_LIBRARY=openssl
CPPFLAGS=-I${openssl:location}/include
CFLAGS=-I${openssl:location}/include
[pycurl]
recipe = zc.recipe.egg:custom
egg = pycurl
rpath =
${curl:location}/lib/
${openssl:location}/lib/
environment = pycurl-env
......@@ -10,6 +10,11 @@ parts =
recipe = zc.recipe.egg:custom
egg =
pysvn
find-links = http://pysvn.barrys-emacs.org/source_kits/pysvn-1.7.10.tar.gz
patches =
${:_profile_base_location_}/pysvn-1.7.10-inc_lib_dir.patch#02d00b58d537242aa5bb5c9202dedbf1
${:_profile_base_location_}/pysvn-issue-179.patch#bd3f9629f95f0f749c5a5e93c797ee2b
patch-options = -p1
include-dirs =
${subversion:location}/include/subversion-1
${apache:location}/include
......
diff -ur pysvn-1.7.10.orig/setup.py pysvn-1.7.10/setup.py
--- pysvn-1.7.10.orig/setup.py 2010-12-30 13:26:51.000000000 +0100
+++ pysvn-1.7.10/setup.py 2015-08-14 10:29:25.562686564 +0200
@@ -19,6 +19,7 @@
import os
import os.path
import setuptools.command.bdist_egg
+from ConfigParser import ConfigParser
pysvn_version_info = {}
f = open( 'Builder/version.info', 'r' )
@@ -27,13 +28,26 @@
pysvn_version_info[ key ] = value
def run(self):
+ cfg = ConfigParser()
+ cfg.read('setup.cfg')
+ kw = {}
+ for key in ('include-dirs', 'library-dirs'):
+ if cfg.has_option('build_ext', key):
+ kw[key] = cfg.get('build_ext', key)
+
# Generate metadata first
self.run_command("egg_info")
os.chdir('Source')
- os.system(sys.executable + ' setup.py configure')
+ os.system(sys.executable + ' setup.py configure --include-dirs=%(include-dirs)s --library-dirs=%(library-dirs)s' % kw)
os.system('make clean')
os.system('make')
- os.system('make egg DISTDIR="%s"' % os.path.abspath(os.path.join('..', self.dist_dir)))
+ os.system('rm -rf dist; mkdir -p dist/EGG-INFO')
+ os.system('cp -rvf pysvn dist')
+ os.system('cp -rvf ../pysvn.egg-info/* dist/EGG-INFO')
+ os.system('find dist/pysvn -type f | sed s:dist/:: > dist/EGG-INFO/SOURCES.txt')
+ setuptools.command.bdist_egg.make_zipfile(
+ self.egg_output, 'dist', verbose=self.verbose,
+ dry_run=self.dry_run, mode=self.gen_header())
os.chdir('..') # Go back in parent directory
# Add to 'Distribution.dist_files' so that the "upload" command works
getattr( self.distribution, 'dist_files', [] ).append(
diff -ur pysvn-1.7.10.orig/Source/setup_configure.py pysvn-1.7.10/Source/setup_configure.py
--- pysvn-1.7.10.orig/Source/setup_configure.py 2014-11-09 11:55:47.000000000 +0100
+++ pysvn-1.7.10/Source/setup_configure.py 2015-08-17 10:41:05.781767086 +0200
@@ -54,6 +54,8 @@
class Options:
all_options_info = {
'--arch': (2, '<arch>'),
+ '--library-dirs': (1, '<dir>:<dir>:...'),
+ '--include-dirs': (1, '<dir>:<dir>:...'),
'--apr-inc-dir': (1, '<dir>'),
'--apu-inc-dir': (1, '<dir>'),
'--apr-lib-dir': (1, '<dir>'),
@@ -511,12 +513,16 @@
raise last_exception
def find_svn_bin( self ):
- return self.find_dir(
+ try:
+ return self.find_dir(
'SVN bin',
'--svn-bin-dir',
'bin',
self._find_paths_svn_bin,
'svnadmin%s' % (self.getProgramExt(),) )
+ except SetupError:
+ # svnadmin is only required for test
+ return ''
def find_svn_lib( self ):
folder = self.find_dir(
@@ -589,8 +595,8 @@
# override the base_dir_list from the command line kw
svn_root_dir = None
- if self.options.hasOption( kw ):
- base_dir_list = [self.options.getOption( kw )]
+ if kw and self.options.hasOption( kw ):
+ base_dir_list = self.options.getOption( kw ) + base_dir_list
elif( self.options.hasOption( '--svn-root-dir' )
and svn_root_suffix is not None ):
@@ -604,7 +610,7 @@
if self.verbose:
print( 'Info: Checking for %s in %s' % (name, full_check_file) )
if os.path.exists( full_check_file ):
- return os.path.abspath( dirname )
+ return dirname
raise SetupError( 'cannot find %s %s - use %s' % (name, check_file, kw) )
@@ -629,6 +635,17 @@
def getSvnVersion( self ):
return self.__svn_version_tuple
+ def _library_dirs( self ):
+ if self.options.hasOption( '--library-dirs' ):
+ return self.options.getOption( '--library-dirs' ).split(':')
+ else:
+ return []
+
+ def _include_dirs( self ):
+ if self.options.hasOption( '--include-dirs' ):
+ return self.options.getOption( '--include-dirs' ).split(':')
+ else:
+ return []
class Win32CompilerMSVC90(Compiler):
def __init__( self, setup ):
@@ -1093,7 +1110,7 @@
'%(PYCXX)s/Src',
'/usr/share/python%s/CXX' % distutils.sysconfig.get_python_version() # typical Linux
]
- self._find_paths_svn_inc = [
+ self._find_paths_svn_inc = self._include_dirs() + [
'/usr/include/subversion-1', # typical Linux
'/usr/local/include/subversion-1', # typical *BSD
'/usr/pkg/include/subversion-1', # netbsd
@@ -1103,14 +1120,14 @@
'/usr/local/bin', # typical *BSD
'/usr/pkg/bin', # netbsd
]
- self._find_paths_svn_lib = [
+ self._find_paths_svn_lib = self._library_dirs() + [
'/usr/lib64', # typical 64bit Linux
'/usr/lib', # typical Linux
'/usr/local/lib64', # typical 64bit Linux
'/usr/local/lib', # typical *BSD
'/usr/pkg/lib', # netbsd
]
- self._find_paths_apr_inc = [
+ self._find_paths_apr_inc = self._include_dirs() + [
'/usr/include/apr-1', # typical Linux
'/usr/local/apr/include/apr-1', # Mac OS X www.metissian.com
'/usr/pkg/include/apr-1', # netbsd
@@ -1120,7 +1137,7 @@
'/usr/local/include/apache2', # alternate *BSD
]
self._find_paths_apr_util_inc = self._find_paths_apr_inc
- self._find_paths_apr_lib = [
+ self._find_paths_apr_lib = self._library_dirs() + [
'/usr/lib64', # typical 64bit Linux
'/usr/lib', # typical Linux
'/usr/local/lib64', # typical 64bit Linux
@@ -1186,6 +1203,8 @@
if not self.setup.options.hasOption( '--norpath' ):
py_ld_libs.extend( [
'-Wl,--rpath',
+ '-Wl,%(APR_LIB)s',
+ '-Wl,--rpath',
'-Wl,%(SVN_LIB)s'
] )
py_ld_libs.extend( [
http://pysvn.tigris.org/ds/viewMessage.do?dsForumId=1334&dsMessageId=3094617
diff -ur pysvn-1.7.10.orig/Source/pysvn_svnenv.cpp pysvn-1.7.10/Source/pysvn_svnenv.cpp
--- pysvn-1.7.10.orig/Source/pysvn_svnenv.cpp 2010-11-20 13:02:37.000000000 +0100
+++ pysvn-1.7.10/Source/pysvn_svnenv.cpp 2015-08-17 17:39:50.491209720 +0200
@@ -292,8 +292,8 @@
if( accept_permanently )
{
new_cred->may_save = 1;
- new_cred->accepted_failures = accepted_failures;
}
+ new_cred->accepted_failures = accepted_failures;
*cred = new_cred;
[buildout]
extends =
../libyaml/buildout.cfg
[python-PyYAML]
recipe = zc.recipe.egg:custom
egg = PyYAML
rpath =
${libyaml:location}/lib/
include-dirs =
${libyaml:location}/include
library-dirs =
${libyaml:location}/lib
......@@ -9,6 +9,9 @@ extends =
[python-ldap-python]
recipe = zc.recipe.egg:custom
egg = python-ldap
patches =
${:_profile_base_location_}/python-ldap-no_default_dirs.patch#959115f13f1de5c63654c69b8dfacd69
patch-options = -p1
rpath =
${openldap:location}/lib
${cyrus-sasl:location}/lib
......
diff -ur python-ldap-2.4.20.orig/setup.cfg python-ldap-2.4.20/setup.cfg
--- python-ldap-2.4.20.orig/setup.cfg 2015-07-07 15:25:42.000000000 +0200
+++ python-ldap-2.4.20/setup.cfg 2015-09-02 15:59:48.846802676 +0200
@@ -1,6 +1,4 @@
[_ldap]
-library_dirs = /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64
-include_dirs = /usr/include /usr/include/sasl /usr/local/include /usr/local/include/sasl
defines = HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
extra_compile_args =
extra_objects =
......@@ -2,6 +2,7 @@
extends =
../bzip2/buildout.cfg
../gcc/buildout.cfg
../openblas/buildout.cfg
../pcre/buildout.cfg
../readline/buildout.cfg
../xz-utils/buildout.cfg
......@@ -13,10 +14,12 @@ parts =
[r-language]
recipe = slapos.recipe.cmmi
url = http://cran.univ-paris1.fr/src/base/R-3/R-3.2.0.tar.gz
md5sum = 66fa17ad457d7e618191aa0f52fc402e
url = http://cran.univ-paris1.fr/src/base/R-3/R-3.2.1.tar.gz
md5sum = c2aac8b40f84e08e7f8c9068de9239a3
configure-options =
--enable-R-shlib
--enable-BLAS-shlib
--with-blas="-lopenblas"
--with-readline=yes
--without-tcltk
--without-cairo
......@@ -31,5 +34,5 @@ configure-options =
--without-x
environment =
PATH=${gcc-fortran:location}/bin:%(PATH)s
CPPFLAGS=-I${bzip2:location}/include -I${pcre:location}/include -I${readline:location}/include -I${ncurses:location}/include -I${xz-utils:location}/include -I${zlib:location}/include
LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${gcc-fortran:location}/lib -Wl,-rpath=${gcc-fortran:location}/lib -L${gcc-fortran:location}/lib64 -Wl,-rpath=${gcc-fortran:location}/lib64 -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${pcre:location}/lib -Wl,-rpath=${pcre:location}/lib -L${readline:location}/lib -Wl,-rpath=${readline:location}/lib -L${xz-utils:location}/lib -Wl,-rpath=${xz-utils:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
CPPFLAGS=-I${bzip2:location}/include -I${openblas:location}/include -I${pcre:location}/include -I${readline:location}/include -I${ncurses:location}/include -I${xz-utils:location}/include -I${zlib:location}/include
LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${gcc-fortran:location}/lib -Wl,-rpath=${gcc-fortran:location}/lib -L${gcc-fortran:location}/lib64 -Wl,-rpath=${gcc-fortran:location}/lib64 -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${openblas:location}/lib -Wl,-rpath=${openblas:location}/lib -L${pcre:location}/lib -Wl,-rpath=${pcre:location}/lib -L${readline:location}/lib -Wl,-rpath=${readline:location}/lib -L${xz-utils:location}/lib -Wl,-rpath=${xz-utils:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
[buildout]
parts =
rsyslogd
extends =
../libestr/buildout.cfg
../json-c/buildout.cfg
../libuuid/buildout.cfg
../zlib/buildout.cfg
[rsyslogd]
recipe = slapos.recipe.cmmi
url = http://www.rsyslog.com/files/download/rsyslog/rsyslog-8.12.0.tar.gz
md5sum = c31c2d545c8a3b8695bdf076851d1517
configure-options =
--disable-klog
--disable-libgcrypt
--disable-liblogging-stdlog
environment =
PKG_CONFIG_PATH=${libestr:location}/lib/pkgconfig:${json-c:location}/lib/pkgconfig:${libuuid:location}/lib/pkgconfig
CPPFLAGS=-I${libestr:location}/include -I${json-c:location}/include -I${libuuid:location}/include -I${zlib:location}/include
LDFLAGS=-Wl,-rpath=${libestr:location}/lib -Wl,-rpath=${json-c:location}/lib -Wl,-rpath=${libuuid:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
ZLIB_CFLAGS=-I${zlib:location}/include
[buildout]
extends =
../numpy/buildout.cfg
../numpy/openblas.cfg
parts =
scipy
......
......@@ -9,8 +9,8 @@ extends =
[serf]
recipe = slapos.recipe.cmmi
url = http://serf.googlecode.com/files/serf-0.7.0.tar.gz
md5sum = 3233f22a5875320da7bdc854d0873080
url = https://serf.googlecode.com/files/serf-1.2.1.tar.bz2
md5sum = 4f8e76c9c6567aee1d66aba49f76a58b
configure-options =
--with-apr=${apache:location}/bin/apr-1-config
--with-apr-util=${apache:location}/bin/apu-1-config
......
[buildout]
extends =
../zlib/buildout.cfg
../autoconf/buildout.cfg
../automake/buildout.cfg
../git/buildout.cfg
../libtool/buildout.cfg
../m4/buildout.cfg
../openssl/buildout.cfg
../patch/buildout.cfg
../zlib/buildout.cfg
parts = shellinabox
[shellinabox]
<= shellinabox-2.10
[shellinabox-2.10]
; This version is old, but we patch it for IPv6 support
recipe = slapos.recipe.cmmi
url = http://shellinabox.googlecode.com/files/shellinabox-2.10.tar.gz
md5sum = 0e144910d85d92edc54702ab9c46f032
environment =
CFLAGS = -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
PKG_CONFIG_PATH = ${openssl:location}/lib/pkgconfig/
patch-binary = ${patch:location}/bin/patch
patch-options = -p1
patches =
${:_profile_base_location_}/0001-Switch-to-IPv6.patch#b61cb099c00e15a5fcaf6c98134fff45
${:_profile_base_location_}/0002-Allow-to-run-entire-command-path.patch#a506b4d83021e24c830f767501c1d3fc
environment =
CFLAGS = -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
PKG_CONFIG_PATH = ${openssl:location}/lib/pkgconfig/
[shellinabox-git-repository]
; This version has much more features, but does not support IPv6 (support unix domain though)
recipe = slapos.recipe.build:gitclone
repository = https://github.com/shellinabox/shellinabox
revision = b8285748993c4c99e80793775f3d2a0a4e962d5a
git-executable = ${git:location}/bin/git
[shellinabox-github]
recipe = slapos.recipe.cmmi
path = ${shellinabox-git-repository:location}
configure-command =
${libtool:location}/bin/libtoolize
${autoconf:location}/bin/autoreconf -vif
./configure
environment =
PATH=${autoconf:location}/bin:${automake:location}/bin:${libtool:location}/bin:${m4:location}/bin:%(PATH)s
CFLAGS = -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
PKG_CONFIG_PATH = ${openssl:location}/lib/pkgconfig/
......@@ -78,12 +78,14 @@ rpath =
[slapos]
recipe = z3c.recipe.scripts
eggs =
${lxml-python:egg}
${python-cffi:egg}
${python-PyYAML:egg}
${python-cliff:egg}
${python-cryptography:egg}
pyOpenSSL
slapos.libnetworkcache
zc.buildout
${lxml-python:egg}
slapos.core
initialization =
......
......@@ -5,14 +5,11 @@ parts =
[sqlite3]
recipe = slapos.recipe.cmmi
url = http://sqlite.org/2015/sqlite-autoconf-3081002.tar.gz
md5sum = a18bfc015cd49a1e7a961b7b77bc3b37
url = http://sqlite.org/2015/sqlite-autoconf-3081101.tar.gz
md5sum = 298c8d6af7ca314f68de92bc7a356cbe
configure-options =
--disable-static
--enable-readline
patch-options = -p1
patches =
${:_profile_base_location_}/dynamic_link.patch#328d3773b49151207d29a5a857f98337
environment =
CPPFLAGS=-I${readline:location}/include -I${ncurses:location}/include
LDFLAGS=-L${buildout:parts-directory}/${:_buildout_section_name_} -Wl,-rpath=${readline:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${readline:location}/lib -L${ncurses:location}/lib
diff -ur sqlite-autoconf-3081002/Makefile.am sqlite-autoconf-3081002/Makefile.am
--- sqlite-autoconf-3081002/Makefile.am 2015-04-08 16:38:50.000000000 +0200
+++ sqlite-autoconf-3081002/Makefile.am 2015-05-09 14:23:20.000000000 +0200
@@ -7,7 +7,8 @@
bin_PROGRAMS = sqlite3
sqlite3_SOURCES = shell.c sqlite3.h
-sqlite3_LDADD = sqlite3.$(OBJEXT) @READLINE_LIBS@
+sqlite3_LDADD = $(top_builddir)/libsqlite3.la @READLINE_LIBS@
+sqlite3_DEPENDENCIES = $(top_builddir)/libsqlite3.la
include_HEADERS = sqlite3.h sqlite3ext.h
diff -ur sqlite-autoconf-3081002/Makefile.in sqlite-autoconf-3081002/Makefile.in
--- sqlite-autoconf-3081002/Makefile.in 2015-04-08 16:38:52.000000000 +0200
+++ sqlite-autoconf-3081002/Makefile.in 2015-05-09 14:23:23.000000000 +0200
@@ -109,7 +109,6 @@
PROGRAMS = $(bin_PROGRAMS)
am_sqlite3_OBJECTS = shell.$(OBJEXT)
sqlite3_OBJECTS = $(am_sqlite3_OBJECTS)
-sqlite3_DEPENDENCIES = sqlite3.$(OBJEXT)
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@@ -274,7 +273,8 @@
libsqlite3_la_SOURCES = sqlite3.c
libsqlite3_la_LDFLAGS = -no-undefined -version-info 8:6:8
sqlite3_SOURCES = shell.c sqlite3.h
-sqlite3_LDADD = sqlite3.$(OBJEXT) @READLINE_LIBS@
+sqlite3_LDADD = $(top_builddir)/libsqlite3.la @READLINE_LIBS@
+sqlite3_DEPENDENCIES = $(top_builddir)/libsqlite3.la
include_HEADERS = sqlite3.h sqlite3ext.h
EXTRA_DIST = sqlite3.1 tea
pkgconfigdir = ${libdir}/pkgconfig
......@@ -7,8 +7,10 @@ extends =
../libexpat/buildout.cfg
../libuuid/buildout.cfg
../neon/buildout.cfg
../openssl/buildout.cfg
../perl/buildout.cfg
../pkgconfig/buildout.cfg
../serf/buildout.cfg
../sqlite3/buildout.cfg
../zlib/buildout.cfg
../swig/buildout.cfg
......@@ -17,24 +19,26 @@ parts =
[subversion]
recipe = slapos.recipe.cmmi
url = http://subversion.tigris.org/downloads/subversion-1.6.17.tar.bz2
md5sum = 81e5dc5beee4b3fc025ac70c0b6caa14
url = http://apache.mirrors.tds.net/subversion/subversion-1.8.14.tar.bz2
md5sum = fe476ba26d6835eba4393780ea907361
# Patch available thanks to gentoo developpers
# http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-vcs/subversion/files/subversion-1.6.0-disable_linking_against_unneeded_libraries.patch?revision=1.1
# https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-vcs/subversion/files/subversion-fix-parallel-build-support-for-perl-bindings.patch
patches =
${:_profile_base_location_}/subversion-1.6.0-disable_linking_against_unneeded_libraries.patch#8d911ec2422dc4c08a00693ac915a07a
${:_profile_base_location_}/subversion-fix-parallel-build-support-for-perl-bindings.patch#fd69f4c932b4882ed98c59eb102be64a
configure-options =
--disable-static
--with-apr=${apache:location}/bin/apr-1-config
--with-apr-util=${apache:location}/bin/apu-1-config
--with-serf=yes
--without-apxs
--with-zlib=${zlib:location}
--with-sqlite=${sqlite3:location}
--with-neon=${neon:location}
--without-berkeley-db
--without-sasl
--without-apr_memcache
--without-gpg-agent
--without-gnome-keyring
--without-libmagic
--without-kwallet
--without-jdk
--without-jikes
......@@ -44,17 +48,12 @@ configure-options =
--without-ruby-sitedir
--without-ruby-test-verbose
--disable-nls
# it seems that parallel build sometimes fails.
make-options =
-j1
make-targets = install -j1
environment =
PATH=${perl:location}/bin:${pkgconfig:location}/bin:${neon:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${apache:location}/lib/pkgconfig:${sqlite3:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig:${neon:location}/lib/pkgconfig
PATH=${perl:location}/bin:${pkgconfig:location}/bin:%(PATH)s
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=${neon:location}/lib -Wl,-rpath=${apache:location}/lib -L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib
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
[subversion-1.9]
recipe = hexagonit.recipe.cmmi
......
--- Makefile.in
+++ Makefile.in
@@ -47,6 +47,7 @@
SVN_SASL_LIBS = @SVN_SASL_LIBS@
SVN_SERF_LIBS = @SVN_SERF_LIBS@
SVN_SQLITE_LIBS = @SVN_SQLITE_LIBS@
+SVN_XML_LIBS = -lexpat
SVN_ZLIB_LIBS = @SVN_ZLIB_LIBS@
LIBS = @LIBS@
--- build/ac-macros/aprutil.m4
+++ build/ac-macros/aprutil.m4
@@ -77,16 +77,14 @@
AC_MSG_ERROR([apu-config --prefix failed])
fi
- dnl When APR stores the dependent libs in the .la file, we don't need
- dnl --libs.
- SVN_APRUTIL_LIBS="`$apu_config --link-libtool --libs`"
+ SVN_APRUTIL_LIBS="`$apu_config --link-libtool`"
if test $? -ne 0; then
- AC_MSG_ERROR([apu-config --link-libtool --libs failed])
+ AC_MSG_ERROR([apu-config --link-libtool failed])
fi
- SVN_APRUTIL_EXPORT_LIBS="`$apu_config --link-ld --libs`"
+ SVN_APRUTIL_EXPORT_LIBS="`$apu_config --link-ld`"
if test $? -ne 0; then
- AC_MSG_ERROR([apu-config --link-ld --libs failed])
+ AC_MSG_ERROR([apu-config --link-ld failed])
fi
AC_SUBST(SVN_APRUTIL_INCLUDES)
--- build/ac-macros/apr.m4
+++ build/ac-macros/apr.m4
@@ -74,16 +74,14 @@
AC_MSG_ERROR([apr-config --prefix failed])
fi
- dnl When APR stores the dependent libs in the .la file, we don't need
- dnl --libs.
- SVN_APR_LIBS="`$apr_config --link-libtool --libs`"
+ SVN_APR_LIBS="`$apr_config --link-libtool`"
if test $? -ne 0; then
- AC_MSG_ERROR([apr-config --link-libtool --libs failed])
+ AC_MSG_ERROR([apr-config --link-libtool failed])
fi
- SVN_APR_EXPORT_LIBS="`$apr_config --link-ld --libs`"
+ SVN_APR_EXPORT_LIBS="`$apr_config --link-ld`"
if test $? -ne 0; then
- AC_MSG_ERROR([apr-config --link-ld --libs failed])
+ AC_MSG_ERROR([apr-config --link-ld failed])
fi
SVN_APR_SHLIB_PATH_VAR="`$apr_config --shlib-path-var`"
--- Makefile.in 2011-07-16 13:50:53.000000000 +0200
+++ Makefile.in.new 2012-03-11 12:13:57.000000000 +0100
@@ -732,7 +732,7 @@
extraclean-swig-headers: clean-swig-headers
$(EXTRACLEAN_SWIG_HEADERS)
-$(SWIG_PL_DIR)/native/Makefile.PL: $(SWIG_SRC_DIR)/perl/native/Makefile.PL.in
+$(SWIG_PL_DIR)/native/Makefile.PL: $(SWIG_SRC_DIR)/perl/native/Makefile.PL.in libsvn_swig_perl
./config.status subversion/bindings/swig/perl/native/Makefile.PL
$(SWIG_PL_DIR)/native/Makefile: $(SWIG_PL_DIR)/native/Makefile.PL
......@@ -33,7 +33,7 @@ configure-command =
# tesseract has a non-standard way of testing for leptonica, hence the
# LIBLEPT_HEADERSDIR entry below:
environment =
PATH=${autoconf:location}/bin:${automake:location}/bin:${libtool:location}/bin:%(PATH)s
PATH=${autoconf:location}/bin:${automake:location}/bin:${libtool:location}/bin:${m4:location}/bin:%(PATH)s
ACLOCAL_ARGS=-I${libtool:location}/share/aclocal
LIBLEPT_HEADERSDIR=${leptonica:location}/include
CPPFLAGS=-I${leptonica:location}/include
......
# Tig: text-mode interface for Git
# http://jonas.nitro.dk/tig/
[buildout]
extends =
../ncurses/buildout.cfg
[tig]
recipe = slapos.recipe.cmmi
url = http://jonas.nitro.dk/tig/releases/tig-2.1.tar.gz
md5sum = d6c237aba2c03d85897da79789fd6104
environment =
CFLAGS=-I${ncurses:location}/include
LDFLAGS=-L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib
......@@ -20,8 +20,8 @@ parts =
[trafficserver]
recipe = slapos.recipe.cmmi
url = http://apache.claz.org/trafficserver/trafficserver-4.2.2.tar.bz2
md5sum = e2249555837f4f7196d3189716b2828a
url = http://apache.claz.org/trafficserver/trafficserver-4.2.3.tar.bz2
md5sum = 1d06a6e9063ceea3f19dbb84752ec710
configure-options =
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
--with-openssl=${openssl:location}
......
[buildout]
extends =
../git/buildout.cfg
[userhosts]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = cd ${userhosts-get:location} && make
# For convenience (one section to build & know result path)
location = ${userhosts-get:location}/userhosts
[userhosts-get]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/userhosts.git
revision = d3080ad4b82c91dc14fd2ad2a8e9b2512e600c2a
git-executable = ${git:location}/bin/git
location = ${buildout:parts-directory}/userhosts
......@@ -274,8 +274,8 @@ environment =
[pixman]
recipe = slapos.recipe.cmmi
url = http://xorg.freedesktop.org/archive/individual/lib/pixman-0.32.4.tar.bz2
md5sum = cdb566504fe9daf6728c7b03cc7ea228
url = http://xorg.freedesktop.org/archive/individual/lib/pixman-0.33.2.tar.bz2
md5sum = 837f48ecedb96f2d558f0d5763e9447b
configure-options =
--disable-static
......
......@@ -28,7 +28,7 @@ from setuptools import setup, find_packages
import glob
import os
version = '0.102'
version = '1.0.9.dev0'
name = 'slapos.cookbook'
long_description = open("README.txt").read() + "\n" + \
open("CHANGES.txt").read() + "\n"
......@@ -167,6 +167,7 @@ setup(name=name,
'proactive = slapos.recipe.proactive:Recipe',
'publish = slapos.recipe.publish:Recipe',
'publish.serialised = slapos.recipe.publish:Serialised',
'publish-early = slapos.recipe.publish_early:Recipe',
'publishsection = slapos.recipe.publish:PublishSection',
'publishurl = slapos.recipe.publishurl:Recipe',
'readline = slapos.recipe.readline:Recipe',
......@@ -192,17 +193,19 @@ setup(name=name,
'slapmonitor = slapos.recipe.slapmonitor:MonitorRecipe',
'slapmonitor-xml = slapos.recipe.slapmonitor:MonitorXMLRecipe',
'slapreport = slapos.recipe.slapreport:Recipe',
'softwaretype = slapos.recipe.softwaretype:Recipe',
'softwaretype = slapos.recipe.softwaretype:Recipe', # BBB
'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',
'stunnel = slapos.recipe.stunnel:Recipe',
'switch-softwaretype = slapos.recipe.switch_softwaretype:Recipe',
'symbolic.link = slapos.recipe.symbolic_link:Recipe',
'tidstorage = slapos.recipe.tidstorage:Recipe',
'trac = slapos.recipe.trac:Recipe',
'urlparse = slapos.recipe._urlparse:Recipe',
'uuid = slapos.recipe._uuid:Recipe',
'userinfo = slapos.recipe.userinfo:Recipe',
'vifib = slapos.recipe.vifib:Recipe',
'waitfor = slapos.recipe.waitfor:Recipe',
'webchecker = slapos.recipe.web_checker:Recipe',
......@@ -221,5 +224,4 @@ setup(name=name,
},
test_suite='slapos.test',
tests_require=[ 'jsonschema' ],
)
)
\ No newline at end of file
......@@ -57,7 +57,9 @@ class Recipe(GenericBaseRecipe):
else:
raise ValueError('Unsupported scheme %s' % scheme)
ip = self.options['ip']
ip_list = self.options['ip']
if isinstance(ip_list, basestring):
ip_list = [ip_list]
backend_path = self.options.get('backend-path', '/')
vhost_template_name = self.getTemplateFilename('vhost.in')
apache_config_file = self.createFile(
......@@ -78,7 +80,7 @@ class Recipe(GenericBaseRecipe):
'port': port,
'backend': ('%s/%s' % (backend.rstrip('/'), backend_path.strip('/'))).rstrip('/'),
'ssl_enable': ssl_enable,
}) for (port, backend) in backend_list),
}) for (port, backend) in backend_list for ip in ip_list),
},
)
)
......
##############################################################################
#
# Copyright (c) 2012 Vifib SARL and Contributors. All Rights Reserved.
# Copyright (c) 2012-2014 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
......@@ -26,7 +26,6 @@
##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe
import os
import sys
import urlparse
......@@ -36,31 +35,25 @@ class Recipe(GenericBaseRecipe):
"""
def install(self):
parsed = urlparse.urlparse(self.options['mysql-url'])
mysql_connection_string = "%(database)s@%(hostname)s:%(port)s "\
"%(username)s %(password)s" % dict(
database=parsed.path.split('/')[1],
hostname=parsed.hostname,
port=parsed.port,
username=parsed.username,
password=parsed.password
)
zope_parsed = urlparse.urlparse(self.options['zope-url'])
config = dict(
python_path=sys.executable,
user=zope_parsed.username,
password=zope_parsed.password,
site_id=zope_parsed.path.split('/')[1],
host="%s:%s" % (zope_parsed.hostname, zope_parsed.port),
sql_connection_string=mysql_connection_string,
)
# Runners
runner_path = self.createExecutable(
mysql = urlparse.urlsplit(self.options['mysql-url'])
zope = urlparse.urlsplit(self.options['zope-url'])
# Note: raises when there is more than a single element in path, as it's
# not supported by manage_addERP5Site anyway.
_, zope_path = zope.path.split('/')
return [self.createExecutable(
self.options['runner-path'],
self.substituteTemplate(self.getTemplateFilename('erp5_bootstrap.in'),
config))
return [runner_path]
self.substituteTemplate(
self.getTemplateFilename('erp5_bootstrap.in'),
{
'python_path': sys.executable,
'base_url': urlparse.urlunsplit((zope.scheme, zope.netloc, '', '', '')),
'site_id': zope_path,
'sql_connection_string': '%(database)s@%(hostname)s:%(port)s %(username)s %(password)s' % {
'database': mysql.path.split('/')[1],
'hostname': mysql.hostname,
'port': mysql.port,
'username': mysql.username,
'password': mysql.password
},
},
))]
#!%(python_path)s
import httplib
import urllib
import base64
user = "%(user)s"
password = "%(password)s"
host = "%(host)s"
site_id = "%(site_id)s"
erp5_catalog_storage = 'erp5_mysql_innodb_catalog'
mysql_url = "%(sql_connection_string)s"
header_dict = {'Authorization': 'Basic %%s' %% \
base64.encodestring('%%s:%%s' %% (user, password)).strip(),
'Referer':'http://%%s/manage_addProduct/ERP5/addERP5Site' %% host}
zope_connection = httplib.HTTPConnection(host)
# Check if an ERP5 site is already created, as ERP5 does support having
# 2 instances in the same zope, and this script should not destroy user data
zope_connection.request('GET', '/isERP5SitePresent', headers=header_dict)
result = zope_connection.getresponse()
if result.status == 204: # and (result.read() == "False"):
# Use a new connection
zope_connection = httplib.HTTPConnection(host)
# Create the expected ERP5 instance
zope_connection.request(
'POST', '/manage_addProduct/ERP5/manage_addERP5Site',
urllib.urlencode({
'id': site_id,
'erp5_catalog_storage': erp5_catalog_storage,
import ssl
if hasattr(ssl, '_create_unverified_context'):
ssl._create_default_https_context = ssl._create_unverified_context
def isSuccess(response):
return 200 <= response.code < 300
base_url = %(base_url)r
response = urllib.urlopen(base_url + '/isERP5SitePresent')
if isSuccess(response) and response.read() == '':
mysql_url = %(sql_connection_string)r
response = urllib.urlopen(
base_url + '/manage_addProduct/ERP5/manage_addERP5Site',
data=urllib.urlencode({
'id': %(site_id)r,
'erp5_catalog_storage': 'erp5_mysql_innodb_catalog',
'erp5_sql_connection_string': mysql_url,
'cmf_activity_sql_connection_string': mysql_url,
}),
headers=header_dict)
# Wait for the erp5 response, to prevent multiple requests
# been done by the same script.
result = zope_connection.getresponse()
# Read result make sure the site really finished to
#created the ERP5 site.
result.read()
)
if not isSuccess(response):
raise ValueError('Failed creating site, status=%%i: %%s' %% (response.code, response.read()))
print "ERP5 site created."
......@@ -38,12 +38,25 @@ class Recipe(GenericBaseRecipe):
# XXX: assume existence of 100 test databases, because slaves are not
# functional yet in slapos: testdb_0...testdb_100, with testuser_N
mysql_template = "%s@%s:%s %s %s"
mysql_parsed = urlparse.urlparse(self.options['mysql-url'])
for i in range(0, 100):
mysql_connection_string_list.append(mysql_template % ('testdb_%s'% i,
mysql_parsed.hostname, mysql_parsed.port, 'testuser_%s'% i, mysql_parsed.password))
mysql_connection_string = mysql_template % ('erp5_test', mysql_parsed.hostname,
mysql_parsed.port, 'erp5_test', mysql_parsed.password)
mysql_url_list = self.options.get('mysql-url-list')
if mysql_url_list is None:
mysql_parsed = urlparse.urlparse(self.options['mysql-url'])
for i in range(0, 100):
mysql_connection_string_list.append(mysql_template % ('testdb_%s'% i,
mysql_parsed.hostname, mysql_parsed.port, 'testuser_%s'% i, mysql_parsed.password))
mysql_connection_string = mysql_template % ('erp5_test', mysql_parsed.hostname,
mysql_parsed.port, 'erp5_test', mysql_parsed.password)
else:
for mysql_url in mysql_url_list:
mysql_parsed = urlparse.urlparse(mysql_url)
mysql_connection_string_list.append(mysql_template % (
mysql_parsed.path.lstrip('/'),
mysql_parsed.hostname,
mysql_parsed.port,
mysql_parsed.username,
mysql_parsed.password,
))
mysql_connection_string = mysql_connection_string_list.pop()
cloudooo_parsed = urlparse.urlparse(self.options['cloudooo-url'])
memcached_parsed = urlparse.urlparse(self.options['memcached-url'])
kumofs_parsed = urlparse.urlparse(self.options['kumofs-url'])
......
......@@ -48,6 +48,9 @@ class Recipe(object):
- storage-path: plain-text persistent storage for password,
that can only be accessed by the user
(default: ${buildout:parts-directory}/${:_buildout_section_name_})
If storage-path is empty, the recipe does not save the password, which is
fine it is saved by other means, e.g. using the publish-early recipe.
"""
def __init__(self, buildout, name, options):
......@@ -57,16 +60,17 @@ class Recipe(object):
except KeyError:
self.storage_path = options['storage-path'] = os.path.join(
buildout['buildout']['parts-directory'], name)
try:
with open(self.storage_path) as f:
passwd = f.read()
except IOError as e:
if e.errno != errno.ENOENT:
raise
passwd = None
passwd = None
if self.storage_path:
try:
with open(self.storage_path) as f:
passwd = f.read()
except IOError as e:
if e.errno != errno.ENOENT:
raise
self.update = self.install
if not passwd:
passwd = self.generatePassword(int(options_get('bytes', '8')))
self.update = self.install
self.passwd = passwd
# Password must not go into .installed file, for 2 reasons:
# security of course but also to prevent buildout to always reinstall.
......@@ -88,7 +92,7 @@ class Recipe(object):
os.write(fd, self.passwd)
finally:
os.close(fd)
return self.storage_path
return self.storage_path
def update(self):
return ()
......@@ -17,7 +17,8 @@ def runMysql(args):
# XXX: Protect with proper root password
# XXX: Follow http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html
popen = subprocess.Popen([conf['mysql_install_binary'],
'--skip-name-resolve', '--no-defaults',
'--defaults-file=%s' % conf['configuration_file'],
'--skip-name-resolve',
'--datadir=%s' % conf['data_directory'],
'--basedir=%s' % conf['mysql_base_directory']],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
......@@ -66,7 +67,7 @@ def updateMysql(args):
with open(script_filename) as script_file:
conf['mysql_script'] = script_file.read()
while True:
mysql_upgrade_list = [conf['mysql_upgrade_binary'], '--no-defaults', '--user=root']
mysql_upgrade_list = [conf['mysql_upgrade_binary'], '--user=root']
if 'socket' in conf:
mysql_upgrade_list.append('--socket=' + conf['socket'])
mysql_upgrade = subprocess.Popen(mysql_upgrade_list, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
......@@ -80,7 +81,7 @@ def updateMysql(args):
print "MySQL database upgraded with result:\n%s" % result
else:
print "No need to upgrade MySQL database"
mysql_list = [conf['mysql_binary'].strip(), '--no-defaults', '-B', '--user=root']
mysql_list = [conf['mysql_binary'].strip(), '-B', '--user=root']
if 'socket' in conf:
mysql_list.append('--socket=' + conf['socket'])
mysql = subprocess.Popen(mysql_list, stdin=subprocess.PIPE,
......
......@@ -53,7 +53,8 @@ def Zope2InitUser(path, username, password):
class Recipe(GenericBaseRecipe):
def _options(self, options):
options['password'] = self.generatePassword()
if 'password' not in options:
options['password'] = self.generatePassword()
def install(self):
"""
......@@ -101,26 +102,24 @@ class Recipe(GenericBaseRecipe):
# Always provide a URL-Type
append("file://" + link)
zope_environment = dict(
TMP=self.options['tmp-path'],
TMPDIR=self.options['tmp-path'],
HOME=self.options['tmp-path'],
PATH=self.options['bin-path'],
TZ=self.options['timezone'],
)
zope_environment = {
'TMP': self.options['tmp-path'],
'TMPDIR': self.options['tmp-path'],
'HOME': self.options.get('home-path', self.options.get('tmp-path')),
'PATH': self.options['bin-path'],
'TZ': self.options['timezone'],
}
instance_home = self.options.get("instancehome-path", None)
if instance_home:
zope_environment["INSTANCE_HOME"] = instance_home
# longrequestlogger product which requires environment settings
longrequest_logger_file = self.options.get('longrequest-logger-file', None)
longrequest_logger_timeout = \
self.options.get('longrequest-logger-timeout', None)
longrequest_logger_interval= \
self.options.get('longrequest-logger-interval', None)
if longrequest_logger_file:
# add needed zope configuration
zope_environment.update(
**dict(longrequestlogger_file = longrequest_logger_file,
longrequestlogger_timeout = longrequest_logger_timeout,
longrequestlogger_interval = longrequest_logger_interval))
zope_environment['longrequestlogger_file'] = longrequest_logger_file
zope_environment['longrequestlogger_timeout'] = self.options.get('longrequest-logger-timeout', None)
zope_environment['longrequestlogger_interval'] = self.options.get('longrequest-logger-interval', None)
# configure default Zope2 zcml
open(self.options['site-zcml'], 'w').write(open(self.getTemplateFilename(
......
......@@ -24,10 +24,11 @@ default_disk_image = '%(default-disk-image)s'
disk_path = '%(disk-path)s'
virtual_hard_drive_url = '%(virtual-hard-drive-url)s'.strip()
virtual_hard_drive_md5sum = '%(virtual-hard-drive-md5sum)s'.strip()
virtual_hard_drive_gzipped = '%(virtual-hard-drive-gzipped)s'.strip()
virtual_hard_drive_gzipped = '%(virtual-hard-drive-gzipped)s'.strip().lower()
nat_rules = '%(nat-rules)s'.strip()
use_tap = '%(use-tap)s'
use_nat = '%(use-nat)s'
use_tap = '%(use-tap)s'.lower()
use_nat = '%(use-nat)s'.lower()
enable_vhost = '%(enable-vhost)s'.lower()
tap_interface = '%(tap-interface)s'
listen_ip = '%(ipv4)s'
mac_address = '%(mac-address)s'
......@@ -119,7 +120,7 @@ if not os.path.exists(disk_path) and virtual_hard_drive_url != '':
print('Downloading virtual hard drive...')
try:
downloaded_disk = disk_path
if virtual_hard_drive_gzipped == 'True':
if virtual_hard_drive_gzipped == 'true':
downloaded_disk = '%%s.gz' %% disk_path
urllib.urlretrieve(virtual_hard_drive_url, downloaded_disk)
except:
......@@ -162,7 +163,7 @@ for storage in disk_storage_list:
key, val = storage.split(' ')
disk_storage_dict[key.strip()] = val.strip()
if not external_disk_format in ['qcow2', 'raw', 'vdi', 'vmdk', 'cloop']:
if not external_disk_format in ['qcow2', 'raw', 'vdi', 'vmdk', 'cloop', 'qed']:
external_disk_format = 'qcow2'
map_storage_list, external_disk_number = getMapStorageList(disk_storage_dict,
......@@ -197,7 +198,7 @@ tap_network_parameter = []
nat_network_parameter = []
numa_parameter = []
number = -1
if use_nat == 'True':
if use_nat == 'true':
number += 1
rules = 'user,id=lan%%s,' %% number + ','.join('hostfwd=tcp:%%s:%%s-:%%s' %% (listen_ip,
int(port) + 10000, port) for port in nat_rules.split())
......@@ -208,13 +209,16 @@ if use_nat == 'True':
rules += ',guestfwd=tcp:10.0.2.101:443-cmd:%%s %%s %%s' %% (netcat_bin,
cluster_doc_host, cluster_doc_port)
nat_network_parameter = ['-netdev', rules,
'-device', 'e1000,netdev=lan%%s,mac=%%s' %% (number, mac_address)]
if use_tap == 'True':
'-device', 'virtio-net-pci,netdev=lan%%s,mac=%%s' %% (number, mac_address)]
if use_tap == 'true':
number += 1
vhost = ''
if enable_vhost == 'true':
vhost = ',vhost=on'
tap_network_parameter = ['-netdev',
'tap,id=lan%%s,ifname=%%s,script=no,downscript=no' %% (number,
tap_interface),
'-device', 'e1000,netdev=lan%%s,mac=%%s' %% (number, tap_mac_address)]
'tap,id=lan%%s,ifname=%%s,script=no,downscript=no%%s' %% (number,
tap_interface, vhost),
'-device', 'virtio-net-pci,netdev=lan%%s,mac=%%s' %% (number, tap_mac_address)]
smp = smp_count
if smp_options:
......
......@@ -76,11 +76,15 @@ class Storage(NeoBaseRecipe):
_binding_port_mandatory = False
def _getOptionList(self):
return [
r = [
'-d', self.options['database-parameters'],
'-a', self.options['database-adapter'],
'-w', self.options['wait-database'],
]
engine = self.options.get('engine')
if engine: # old versions of NEO don't support -e
r += '-e', engine
return r
class Admin(NeoBaseRecipe):
def _getOptionList(self):
......@@ -92,6 +96,7 @@ class Master(NeoBaseRecipe):
r = [
'-p', options['partitions'],
'-r', options['replicas'],
'-A', options['autostart'],
]
for x in (('-C', options['upstream-cluster']),
('-M', options['upstream-masters'])):
......
......@@ -32,15 +32,19 @@ CONNECTION_PARAMETER_STRING = 'connection-'
class Recipe(GenericSlapRecipe):
def _install(self):
publish_dict = dict()
options = self.options.copy()
del options['recipe']
slave_reference = options.pop('-slave-reference', None)
for k, v in options.iteritems():
if k[:1] == '-':
continue
publish_dict[k] = v
self._setConnectionDict(publish_dict, slave_reference)
publish_dict = {}
done = set()
extends = [self.name]
while extends:
name = extends.pop()
done.add(name)
for k, v in self.buildout[name].iteritems():
if k[:1] == '-':
if k == '-extends':
extends += set(v.split()) - done
elif k != 'recipe':
publish_dict[k] = v
self._setConnectionDict(publish_dict, self.options.get('-slave-reference'))
return []
def _setConnectionDict(self, publish_dict, slave_reference=None):
......
##############################################################################
#
# 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 slapos.slap
from slapos.recipe.librecipe import unwrap, wrap
from slapos.recipe.librecipe import GenericSlapRecipe
class Recipe(GenericSlapRecipe):
"""
Early initialization of published parameters.
The '-init' option defines parameters that should be published before
requesting any partitions, and how they are initialized.
Example:
[publish-early]
recipe = slapos.cookbook:publish-early
-init =
foo gen-foo:x
bar gen-bar:y
bar = z
[gen-foo]
...
[publish]
recipe = slapos.cookbook:publish.serialised
-extends = publish-early
...
${publish-early:foo} is initialized with the value of the published
parameter 'foo', or ${gen-foo:x} if it hasn't been published yet
(and in this case, it is published immediately as a way to save the value).
${publish-early:bar} is forced to 'z' (${gen-bar:y} ignored):
a line like 'bar = z' is usually rendered conditionally with Jinja2.
"""
def __init__(self, buildout, name, options):
GenericSlapRecipe.__init__(self, buildout, name, options)
published_dict = None
publish = False
publish_dict = {}
for line in options['-init'].splitlines():
if line:
k, v = line.split()
if k not in options:
if published_dict is None:
self.slap.initializeConnection(self.server_url, self.key_file,
self.cert_file)
computer_partition = self.slap.registerComputerPartition(
self.computer_id, self.computer_partition_id)
published_dict = unwrap(
computer_partition.getConnectionParameterDict())
try:
publish_dict[k] = published_dict[k]
except KeyError:
section, key = v.split(":")
publish_dict[k] = self.buildout[section][key]
publish = True
if publish:
computer_partition.setConnectionDict(wrap(publish_dict))
options.update(publish_dict)
install = update = lambda self: None
......@@ -33,20 +33,24 @@ class Recipe(GenericBaseRecipe):
def __init__(self, buildout, name, options):
base_path = options['base-path']
pool = string.letters + string.digits
hash_string = ''.join(random.choice(pool) for i in xrange(64))
path = os.path.join(base_path, hash_string)
if os.path.exists(base_path):
path_list = os.listdir(base_path)
if len(path_list) == 1:
hash_string = path_list[0]
path = os.path.join(base_path, hash_string)
elif len(path_list) > 1:
raise ValueError("Folder %s should contain 0 or 1 element." % base_path)
options['root-dir'] = path
options['path'] = hash_string
if options.get('use-hash-url', 'True') in ['true', 'True']:
pool = string.letters + string.digits
hash_string = ''.join(random.choice(pool) for i in xrange(64))
path = os.path.join(base_path, hash_string)
if os.path.exists(base_path):
path_list = os.listdir(base_path)
if len(path_list) == 1:
hash_string = path_list[0]
path = os.path.join(base_path, hash_string)
elif len(path_list) > 1:
raise ValueError("Folder %s should contain 0 or 1 element." % base_path)
options['root-dir'] = path
options['path'] = hash_string
else:
options['root-dir'] = base_path
options['path'] = ''
return GenericBaseRecipe.__init__(self, buildout, name, options)
......@@ -59,8 +63,9 @@ class Recipe(GenericBaseRecipe):
'port': int(self.options['port']),
'cwd': self.options['base-path'],
'log-file': self.options['log-file'],
'cert-file': self.options['cert-file'],
'key-file': self.options['key-file']
'cert-file': self.options.get('cert-file', ''),
'key-file': self.options.get('key-file', ''),
'root-dir': self.options['root-dir']
}
server = self.createPythonScript(
......
# -*- coding: utf-8 -*-
from SimpleHTTPServer import SimpleHTTPRequestHandler
from BaseHTTPServer import HTTPServer
import ssl
......@@ -5,26 +6,74 @@ import os
import logging
from netaddr import valid_ipv4, valid_ipv6
import socket
import cgi, errno
class ServerHandler(SimpleHTTPRequestHandler):
def respond(self, code=200, type='text/plain'):
document_path = ''
restrict_root_folder = True
def respond(self, code=200, type='text/html'):
self.send_response(code)
self.send_header("Content-type", type)
self.end_headers()
def do_GET(self):
logging.info('%s - GET: %s \n%s' % (self.client_address[0], self.path, self.headers))
if not self.path or self.path == '/':
def restrictedRootAccess(self):
if self.restrict_root_folder and self.path and self.path == '/':
# no access to root path
self.respond(403)
self.wfile.write("Forbidden")
return True
return False
def do_GET(self):
logging.info('%s - GET: %s \n%s' % (self.client_address[0], self.path, self.headers))
if self.restrictedRootAccess():
return
SimpleHTTPRequestHandler.do_GET(self)
def do_POST(self):
logging.info('%s - POST: %s \n%s' % (self.client_address[0], self.path, self.headers))
if self.restrictedRootAccess():
return
form = cgi.FieldStorage(
fp=self.rfile,
headers=self.headers,
environ={'REQUEST_METHOD':'POST',
'CONTENT_TYPE':self.headers['Content-Type']}
)
name = form['path'].value
content = form['content'].value
method = 'a'
if form.has_key('clear') and form['clear'].value == '1':
method = 'w'
self.writeFile(name, content, method)
self.respond(200, type=self.headers['Content-Type'])
self.wfile.write("Content written to %s" % name)
def writeFile(self, filename, content, method='a'):
file_path = os.path.join(self.document_path, filename)
try:
os.makedirs(os.path.dirname(file_path))
except OSError as exception:
if exception.errno != errno.EEXIST:
logging.error('Failed to create file in %s. The error is \n%s' % (
file_path, str(exception)))
logging.info('Writing recieved content to file %s' % file_path)
try:
with open(file_path, method) as myfile:
myfile.write(content.decode('utf-8'))
logging.info('Done.')
except IOError as e:
logging.error('Something happened while processing \'writeFile\'. The message is %s' %
str(e))
class HTTPServerV6(HTTPServer):
address_family = socket.AF_INET6
def run(args):
......@@ -38,6 +87,8 @@ def run(args):
os.chdir(args['cwd'])
Handler = ServerHandler
Handler.document_path = args['root-dir']
Handler.restrict_root_folder = (args['root-dir'] != args['cwd'])
if valid_ipv6(host):
server = HTTPServerV6
......@@ -45,11 +96,14 @@ def run(args):
server = HTTPServer
httpd = server((host, port), Handler)
if args.has_key('cert-file') and args.has_key('key-file'):
scheme = 'http'
if args.has_key('cert-file') and args.has_key('key-file') and \
os.path.exists(args['cert-file']) and os.path.exists(args['key-file']):
scheme = 'https'
httpd.socket = ssl.wrap_socket (httpd.socket,
server_side=True,
certfile=args['cert-file'],
keyfile=args['key-file'])
logging.info("Starting simple http server at https://%s:%s" % (host, port))
logging.info("Starting simple http server at %s://%s:%s" % (scheme, host, port))
httpd.serve_forever()
##############################################################################
#
# Copyright (c) 2014 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 advised 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
import os, subprocess, sys
class Recipe:
def __init__(self, buildout, name, options):
self.buildout = buildout
self.options = options
self.name = name
self.software_type = buildout["slap-configuration"]["slap-software-type"]
section, key = self.options[self.software_type].split(":")
self.base = self.buildout[section][key]
def install(self):
# XXX-Antoine: We gotta find a better way to do this. I tried to check
# out how slapgrid-cp was running buildout. But it is worse than that.
args = sys.argv[:]
for x in self.buildout["slap-connection"].iteritems():
args.append("slap-connection:%s=%s" % x)
for x in "directory", "eggs-directory", "develop-eggs-directory":
args.append("buildout:%s=%s" % (x, self.buildout["buildout"][x]))
args.append("buildout:installed=.installed-%s.cfg" % self.name)
# Options.get (from zc.buildout) should deserialize.
try:
override = self.options["override"][self.software_type]
except (KeyError, TypeError):
buildout = self.base
else:
# unfortunately, buildout:extends does not work when given at command line
buildout = os.path.join(self.buildout["buildout"]["parts-directory"],
self.name + ".cfg")
with open(override) as src, open(buildout, "w", 0) as dst:
dst.write("[buildout]\nextends = %s\n\n" % self.base + src.read())
subprocess.check_call(args + ["-oc", buildout])
return []
update = install
import grp
import os
import pwd
class Recipe(object):
"""
Provide POSIX information about the user that is currently running buildout.
"""
def __init__(self, buildout, name, options):
pinfo = pwd.getpwuid(os.getuid())
options['pw-name'] = pinfo.pw_name
options['pw-uid'] = pinfo.pw_uid
options['pw-gid'] = pinfo.pw_gid
options['pw-dir'] = pinfo.pw_dir
options['pw-shell'] = pinfo.pw_shell
ginfo = grp.getgrgid(os.getgid())
options['gr-name'] = ginfo.gr_name
options['gr-gid'] = ginfo.gr_gid
install = update = lambda self: []
......@@ -73,7 +73,7 @@ md5sum = c5695762361b801c284ee23a150cd1f1
mode = 0644
[template-httpd-conf]
recipe = slapos.recipe.download
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/templates/${:filename}
mode = 0644
filename = apache.conf.in
......@@ -86,6 +86,5 @@ numpy = 1.6.2
# websockify 0.4.1 doesn't install well
websockify = 0.3.0
plone.recipe.command = 1.1
slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.4.2
z3c.recipe.mkdir = 0.5
......@@ -65,7 +65,7 @@ mode = 0644
[template-apache-frontend]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-apache-frontend.cfg
md5sum = cd5a385c44d56b4d13392eba4e938969
md5sum = f65456f704a32c43822b1efefc7ae4b7
output = ${buildout:directory}/template-apache-frontend.cfg
mode = 0644
......@@ -78,7 +78,7 @@ mode = 0644
[template-slave-list]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/templates/apache-custom-slave-list.cfg.in
md5sum = 1fe76dde85c488e94baf8510775ebcaf
md5sum = f09759a0b68337d820c70e72afb4dbf9
mode = 640
[template-slave-configuration]
......@@ -96,13 +96,13 @@ mode = 640
[template-apache-frontend-configuration]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/templates/apache.conf.in
md5sum = 6c72015a9af4f1edab63712f5c6aec99
md5sum = 09ffa9a94cc7506d32c2c422853106b6
mode = 640
[template-apache-cached-configuration]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/templates/apache_cached.conf.in
md5sum = 0c4393db80670daf18b432b7f07383e9
md5sum = a1c744e48b465a63c2d6f0f384466013
mode = 640
[template-rewrite-cached]
......@@ -127,13 +127,19 @@ mode = 640
[template-default-virtualhost]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/templates/000.conf.in
md5sum = ed1b680e31e30596bf051682ec0270b4
md5sum = d98a01182f38868612948c87d5231428
mode = 640
[template-default-slave-virtualhost]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/templates/default-virtualhost.conf.in
md5sum = 5463dd67f1b1bea0bee57a421e371dd0
md5sum = aed0077ee82aaa7fbd2b7e84ce5fbd69
mode = 640
[template-cached-slave-virtualhost]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/templates/cached-virtualhost.conf.in
md5sum = b1fd5f2b94f026ccca5ff47167015f23
mode = 640
[template-log-access]
......
......@@ -159,6 +159,8 @@ filename = custom-personal-instance-slave-list.cfg
extensions = jinja2.ext.do
extra-context =
key apache_configuration_directory apache-directory:slave-configuration
key apache_cached_configuration_directory apache-directory:slave-with-cache-configuration
key cached_port apache-configuration:cache-through-port
key http_port instance-parameter:configuration.plain_http_port
key https_port instance-parameter:configuration.port
key public_ipv4 instance-parameter:configuration.public-ipv4
......@@ -172,7 +174,7 @@ extra-context =
raw empty_template ${template-empty:target}
raw template_custom_slave_configuration ${template-slave-configuration:target}
raw template_default_slave_configuration ${template-default-slave-virtualhost:target}
raw template_rewrite_cached ${template-rewrite-cached:target}
raw template_cached_slave_configuration ${template-cached-slave-virtualhost:target}
raw software_type single-custom-personal
section logrotate_dict logrotate
section frontend_configuration frontend-configuration
......@@ -297,6 +299,7 @@ extra-context =
key access_log apache-configuration:cache-access-log
key error_log apache-configuration:cache-error-log
key pid_file apache-configuration:cache-pid-file
key slave_with_cache_configuration_directory apache-directory:slave-with-cache-configuration
key apachecachedmap_path apache-configuration:cached-rewrite-file
[apache-cached]
......@@ -317,6 +320,7 @@ link-binary =
recipe = slapos.cookbook:mkdirectory
document-root = $${directory:srv}/htdocs
slave-configuration = $${directory:etc}/apache-slave-conf.d/
slave-with-cache-configuration = $${directory:etc}/apache-slave-with-cache-conf.d/
cache = $${directory:var}/cache
mod-ssl = $${:cache}/httpd_mod_ssl
vh-ssl = $${:slave-configuration}/ssl
......
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.
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