Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Roque
slapos
Commits
3355a856
Commit
3355a856
authored
Oct 24, 2012
by
Marco Mariani
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into lapp
parents
413b1820
c98cc19a
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
4 deletions
+51
-4
component/imagemagick/buildout.cfg
component/imagemagick/buildout.cfg
+2
-1
component/libtiff/buildout.cfg
component/libtiff/buildout.cfg
+2
-2
slapos/recipe/apachephp/__init__.py
slapos/recipe/apachephp/__init__.py
+1
-1
slapos/recipe/librecipe/generic.py
slapos/recipe/librecipe/generic.py
+24
-0
slapos/recipe/librecipe/shlex.py
slapos/recipe/librecipe/shlex.py
+21
-0
software/kvm/instance-kvm-input-schema.json
software/kvm/instance-kvm-input-schema.json
+1
-0
No files found.
component/imagemagick/buildout.cfg
View file @
3355a856
...
...
@@ -28,7 +28,8 @@ filename = imagemagick-6.6.6-1-no-gsx-gsc-probe.patch
[imagemagick]
recipe = hexagonit.recipe.cmmi
url = ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.7.8-8.tar.bz2
#url = ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.7.8-8.tar.bz2
url = http://ftp.vim.org/ImageMagick/ImageMagick-6.7.8-8.tar.bz2
md5sum = 4e5c8f102f3e7401587c924f5b4bca15
depends =
${libtiff:version}
...
...
component/libtiff/buildout.cfg
View file @
3355a856
...
...
@@ -10,9 +10,9 @@ parts =
[libtiff]
recipe = hexagonit.recipe.cmmi
version = 4.0.2
#
url = http://download.osgeo.org/libtiff/tiff-${:version}.tar.gz
url = http://download.osgeo.org/libtiff/tiff-${:version}.tar.gz
# server is down - circumvent
url = http://www.imagemagick.org/download/delegates/tiff-${:version}.tar.gz
#
url = http://www.imagemagick.org/download/delegates/tiff-${:version}.tar.gz
md5sum = 04a08fa1e07e696e820a0c3f32465a13
configure-options =
--disable-static
...
...
slapos/recipe/apachephp/__init__.py
View file @
3355a856
...
...
@@ -78,7 +78,7 @@ class Recipe(GenericBaseRecipe):
if
not
os
.
path
.
exists
(
secret_key_filename
):
secret_key
=
uuencode
(
os
.
urandom
(
45
)).
strip
()
# Remove unsafe characters
secret_key
=
secret_key
.
translate
(
None
,
'"
\
'
'
)
secret_key
=
secret_key
.
translate
(
None
,
'"
\
'
\
\
'
)
with
open
(
secret_key_filename
,
'w'
)
as
secret_key_file
:
secret_key_file
.
write
(
secret_key
)
else
:
...
...
slapos/recipe/librecipe/generic.py
View file @
3355a856
...
...
@@ -35,6 +35,8 @@ import urlparse
import
pkg_resources
import
zc.buildout
from
slapos.recipe.librecipe
import
shlex
class
GenericBaseRecipe
(
object
):
"""Boilerplate class for all Buildout recipes providing helpful methods like
creating configuration file, creating wrappers, generating passwords, etc.
...
...
@@ -107,6 +109,28 @@ class GenericBaseRecipe(object):
path
,
arguments
=
arguments
)[
0
]
return
script
def
createWrapper
(
self
,
name
,
command
,
parameters
):
"""
Creates a very simple (one command) shell script for process replacement.
Takes care of quoting.
"""
q
=
shlex
.
quote
lines
=
[
'#!/bin/sh'
,
'exec %s'
%
shlex
.
quote
(
command
)
]
for
param
in
parameters
:
if
len
(
lines
[
-
1
])
<
30
:
lines
[
-
1
]
+=
' '
+
shlex
.
quote
(
param
)
else
:
lines
[
-
1
]
+=
'
\
\
'
lines
.
append
(
'
\
t
'
+
shlex
.
quote
(
param
))
content
=
'
\
n
'
.
join
(
lines
)
+
'
\
n
'
return
self
.
createFile
(
name
,
content
,
0700
)
def
createDirectory
(
self
,
parent
,
name
,
mode
=
0700
):
path
=
os
.
path
.
join
(
parent
,
name
)
if
not
os
.
path
.
exists
(
path
):
...
...
slapos/recipe/librecipe/shlex.py
0 → 100644
View file @
3355a856
# -*- coding: utf-8 -*-
"""
backported part of shlex.py from Python 3.3
"""
import
re
_find_unsafe
=
re
.
compile
(
r'[^\
w@%+=:,./-]
', 256).search
def quote(s):
"""Return a shell-escaped version of the string *s*."""
if not s:
return "''"
if _find_unsafe(s) is None:
return s
# use single quotes, and put single quotes into double quotes
# the string $'
b
is
then
quoted
as
'$'"'"'b'
return
"'"
+
s
.
replace
(
"'"
,
"'
\
"
'
\
"
'"
)
+
"'"
software/kvm/instance-kvm-input-schema.json
View file @
3355a856
...
...
@@ -7,6 +7,7 @@
"type"
:
"integer"
,
"default"
:
1024
,
"minimum"
:
128
,
"divisibleBy"
:
128
,
"maximum"
:
16384
},
"disk-size"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment