Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
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
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
slapos
Commits
6ac517c1
Commit
6ac517c1
authored
Oct 08, 2018
by
Bryton Lacquement
🚪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip
parent
c78ff2bb
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
14 deletions
+23
-14
component/kumo/kumo-hooks.py
component/kumo/kumo-hooks.py
+9
-5
component/perl/buildout.cfg
component/perl/buildout.cfg
+1
-1
component/perl/perl-CPAN-package-create-wrapper.py
component/perl/perl-CPAN-package-create-wrapper.py
+2
-2
slapos/recipe/librecipe/__init__.py
slapos/recipe/librecipe/__init__.py
+2
-2
slapos/recipe/mkdirectory.py
slapos/recipe/mkdirectory.py
+2
-2
slapos/recipe/slapconfiguration.py
slapos/recipe/slapconfiguration.py
+2
-2
software/slapos-testing/software-py3.cfg
software/slapos-testing/software-py3.cfg
+5
-0
No files found.
component/kumo/kumo-hooks.py
View file @
6ac517c1
from
__future__
import
print_function
import
os
import
sys
import
traceback
...
...
@@ -46,13 +48,15 @@ def pre_configure_hook(options, buildout):
gcc_executable
=
os
.
getenv
(
'CC'
,
'gcc'
)
try
:
gcc
=
Popen
([
gcc_executable
,
'-v'
],
stdout
=
PIPE
,
stderr
=
PIPE
,
universal_newlines
=
True
,
close_fds
=
True
)
except
OSError
,
(
errno
,
_
):
except
OSError
as
e
:
errno
,
_
=
e
if
errno
==
2
:
# No gcc installed, nothing to check
pass
else
:
print
'Unexpected failure trying to detect gcc version'
print
(
'Unexpected failure trying to detect gcc version'
)
traceback
.
print_exc
()
else
:
gcc
.
wait
()
...
...
@@ -66,10 +70,10 @@ def pre_configure_hook(options, buildout):
error
=
'broken GCC version: %s'
%
(
line
,
)
break
else
:
print
>>
sys
.
stderr
,
'GCC version could not be detected, '
\
'building anyway'
print
(
'GCC version could not be detected, '
\
'building anyway'
,
file
=
sys
.
stderr
)
if
error
is
not
None
:
print
'Disabling build, with reason:'
,
error
print
(
'Disabling build, with reason:'
,
error
)
# Copy to preserver permission
copy
(
CONFIGURE_PATH
,
CONFIGURE_BACKUP_PATH
)
open
(
CONFIGURE_PATH
,
'w'
).
write
(
FAKE_CONFIGURE
%
(
error
,
))
...
...
component/perl/buildout.cfg
View file @
6ac517c1
...
...
@@ -88,7 +88,7 @@ make-binary=
${:extra-env} PERL5LIB="${:inc}:${:install-inc}:${:perl-PERL5LIB}" make
# this post-make-hook is same for all users of the macro.
post-make-hook = ${:_profile_base_location_}/../../component/perl/perl-CPAN-package-create-wrapper.py#
d012f7ba3300b14b2c6b173351d410b
e:post_make_hook
post-make-hook = ${:_profile_base_location_}/../../component/perl/perl-CPAN-package-create-wrapper.py#
f28c45a0f473ae050ca3ebaed5c39a4
e:post_make_hook
perl_location = ${perl:location}
...
...
component/perl/perl-CPAN-package-create-wrapper.py
View file @
6ac517c1
...
...
@@ -17,7 +17,7 @@ def post_make_hook(options, buildout, environmet):
export PERL5LIB="{site_perl}:$PERL5LIB"
exec {perl_location}/bin/perl "$@"
'''
.
format
(
**
locals
()))
os
.
chmod
(
perl_wrapper_path
,
0755
)
os
.
chmod
(
perl_wrapper_path
,
0
o
755
)
# create a wrapper for each scripts installed in perl-bin
for
script_path
in
glob
.
glob
(
os
.
path
.
join
(
prefix
,
'perl-bin'
,
'*'
)):
...
...
@@ -28,4 +28,4 @@ exec {perl_location}/bin/perl "$@"
export PERL5LIB="{site_perl}:$PERL5LIB"
exec {perl_location}/bin/perl {script_path} "$@"
'''
.
format
(
**
locals
()))
os
.
chmod
(
wrapper_path
,
0755
)
os
.
chmod
(
wrapper_path
,
0
o
755
)
slapos/recipe/librecipe/__init__.py
View file @
6ac517c1
...
...
@@ -34,7 +34,7 @@ import stat
import
netaddr
import
time
import
re
from
six.moves.urllib
import
parse
as
urlparse
from
six.moves.urllib
import
parse
import
json
# Use to do from slapos.recipe.librecipe import GenericBaseRecipe
...
...
@@ -324,7 +324,7 @@ class BaseSlapRecipe:
if
port
is
not
None
:
netloc
+=
':%s'
%
port
url
=
url
parse
.
urlunparse
((
scheme
,
netloc
,
path
,
params
,
query
,
fragment
))
url
=
parse
.
urlunparse
((
scheme
,
netloc
,
path
,
params
,
query
,
fragment
))
return
url
slapos/recipe/mkdirectory.py
View file @
6ac517c1
...
...
@@ -27,7 +27,7 @@
import
os
from
slapos.recipe.librecipe
import
GenericBaseRecipe
from
six
import
itervalues
import
six
class
Recipe
(
GenericBaseRecipe
):
...
...
@@ -37,7 +37,7 @@ class Recipe(GenericBaseRecipe):
self
.
mode
=
int
(
self
.
directory
.
pop
(
'mode'
,
'0777'
),
8
)
def
install
(
self
):
for
path
in
sorted
(
itervalues
(
self
.
directory
)):
for
path
in
sorted
(
six
.
itervalues
(
self
.
directory
)):
if
path
and
not
os
.
path
.
isdir
(
path
):
os
.
makedirs
(
path
,
self
.
mode
)
# WARNING: This recipe is currently used to create directories that will
...
...
slapos/recipe/slapconfiguration.py
View file @
6ac517c1
...
...
@@ -31,7 +31,7 @@ import os
import
slapos.slap
from
slapos.recipe.librecipe
import
unwrap
import
six
from
six
import
iteritems
from
six.moves.configparser
import
RawConfigParser
from
netaddr
import
valid_ipv4
,
valid_ipv6
from
slapos.util
import
mkdir_p
...
...
@@ -124,7 +124,7 @@ class Recipe(object):
buildout
[
'buildout'
][
'directory'
])
match
=
self
.
OPTCRE_match
for
key
,
value
in
six
.
iteritems
(
parameter_dict
):
for
key
,
value
in
iteritems
(
parameter_dict
):
if
match
(
key
)
is
not
None
:
continue
options
[
'configuration.'
+
key
]
=
value
...
...
software/slapos-testing/software-py3.cfg
View file @
6ac517c1
...
...
@@ -23,6 +23,9 @@ branch = py3
[slapos.cookbook-repository]
branch = py3
[erp5.util-repository]
branch = bryton/py3
[eggs]
recipe = zc.recipe.egg
eggs += ${supervisor-develop:egg}
...
...
@@ -35,3 +38,5 @@ netifaces = 0.10.7
supervisor =
xml-marshaller = 0.9.7+SlapOSPatched001
slapos.recipe.build = 0.38
pyOpenSSL = 18.0.0
cryptography = 2.3.1
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