Commit cd51c1de authored by Gabriel Monnerat's avatar Gabriel Monnerat Committed by Sebastien Robin

allow to build slaprunner inside an erp5testnode instance

parent 266129fa
......@@ -10,7 +10,8 @@ extends =
../gettext/buildout.cfg
../libtiff/buildout.cfg
../libjpeg/buildout.cfg
../perl/buildout.cfg
parts =
gtk-2
......@@ -35,6 +36,8 @@ configure-options =
--disable-static
# XXX-Cedric : Why, god, why do I have to supply the -lXrender option to linker?
environment =
PERL=${perl:location}/bin/perl
PERL5LIB=${perl:location}/lib/${perl:version}
PATH=${glib:location}/bin:${freetype:location}/bin:${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${cairo:location}/lib/pkgconfig::${libXrender:location}/lib/pkgconfig
CPPFLAGS=-I${cairo:location}/include/cairo -I${libX11:location}/include/X11 -I${libxcb:location}/include/xcb -I${libXau:location}/include/X11 -I${bzip2:location}/include -L${libXrender:location}/include -I${zlib:location}/include
......@@ -48,18 +51,22 @@ md5sum = d8ece3a4ade4a91c768328620e473ab8
configure-options =
--disable-static
--without-libintl-prefix
environment =
environment =
PERL=${perl:location}/bin/perl
PERL5LIB=${perl:location}/lib/${perl:version}
PATH=${glib:location}/bin:${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${gettext:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${cairo:location}/lib/pkgconfig
CPPFLAGS=-I${libtiff:location}/include -I${libjpeg:location}/include -I${libpng:location}/include
LDFLAGS=-L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -L${glib:location}/lib -Wl,-rpath=${glib:location}/lib -L${libtiff:location}/lib -Wl,-rpath=${libtiff:location}/lib -L${libjpeg:location}/lib -Wl,-rpath=${libjpeg:location}/lib -L${libpng:location}/lib -Wl,-rpath=${libpng:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
LD_LIBRARY_PATH=${glib:location}/lib:${gettext:location}/lib
[atk]
recipe = hexagonit.recipe.cmmi
url = http://ftp.gnome.org/pub/gnome/sources/atk/2.0/atk-2.0.1.tar.bz2
md5sum = 87f20b78deaedef858ac54358c0786b1
environment =
environment =
PERL=${perl:location}/bin/perl
PERL5LIB=${perl:location}/lib/${perl:version}
PATH=${glib:location}/bin:${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig
LDFLAGS=-L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -L${glib:location}/lib -Wl,-rpath=${gettext:location}/lib
......@@ -75,7 +82,9 @@ configure-options =
--disable-papi
--enable-explicit-deps
--disable-xinerama
environment =
environment =
PERL=${perl:location}/bin/perl
PERL5LIB=${perl:location}/lib/${perl:version}
PATH=${gdk-pixbuf:location}/bin:${glib:location}/bin:${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${glib:location}/lib/pkgconfig:${fontconfig:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${libXau:location}/lib/pkgconfig:${xproto:location}/lib/pkgconfig:${cairo:location}/lib/pkgconfig:${atk:location}/lib/pkgconfig:${gdk-pixbuf:location}/lib/pkgconfig:${pango:location}/lib/pkgconfig:${libX11:location}/lib/pkgconfig:${libXext:location}/lib/pkgconfig:${pixman:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig:${kbproto:location}/lib/pkgconfig:${libXrender:location}/lib/pkgconfig:${xextproto:location}/lib/pkgconfig:${libxcb:location}/lib/pkgconfig:${xcbproto:location}/lib/pkgconfig:${xorg-libpthread-stubs:location}/lib/pkgconfig
CPPFLAGS=-I${libtiff:location}/include -I${libjpeg:location}/include -I${libpng:location}/include -I${libX11:location}/include/ -I${xproto:location}/include -I${kbproto:location}/include -I${libXrender:location}/include -I${render:location}/include -I${libXext:location}/include -I${cairo:location}/include/cairo -I${zlib:location}/include -I${bzip2:location}/include -I${libXdmcp:location}/include -I${glib:location}/include/gio-unix-2.0 -I${glib:location}/include/glib-2.0 -I${glib:location}/include -I${atk:location}/include/atk-1.0
......
......@@ -74,6 +74,13 @@ class Recipe(GenericBaseRecipe):
config_repository_list.set(section_name, 'buildout_section_id',
repository['buildout_section_id'])
i += 1
software_path_list = json.loads(self.options['software-path-list'])
if software_path_list:
CONFIG["software_path_list"] = "[software_list]"
CONFIG["software_path_list"] += \
"\npath_list = %s" % ",".join(software_path_list)
value = StringIO.StringIO()
config_repository_list.write(value)
CONFIG['repository_list'] = value.getvalue()
......
......@@ -26,6 +26,8 @@ zip_binary = %(zip_binary)s
[environment]
PATH = %(PATH)s
%(software_path_list)s
%(instance_dict)s
%(repository_list)s
......@@ -44,7 +44,7 @@ test-suite-master-url = $${slap-parameter:test-suite-master-url}
bt5-path = $${slap-parameter:additional-bt5-repository-id}
instance-dict = $${slap-parameter:instance-dict}
vcs-repository-list = $${slap-parameter:vcs-repository-list}
software-path-list = $${slap-parameter:software-path-list}
git-binary = ${git:location}/bin/git
slapgrid-partition-binary = ${buildout:bin-directory}/slapgrid-cp
slapgrid-software-binary = ${buildout:bin-directory}/slapgrid-sr
......@@ -147,4 +147,5 @@ test-suite-master-url =
additional-bt5-repository-id =
instance-dict =
vcs-repository-list = []
software-path-list = ["http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/heads/erp5testnode:/software/seleniumrunner/software.cfg"]
test-suite-title = $${:test-suite}
......@@ -51,7 +51,9 @@ eggs =
slapos.core
inotifyx
slapos.cookbook
erp5.util[testnode]
erp5.util
[testnode]
  • @gabriel, @seb I was debugging testnode build today and noticed:

    because of this change the scripts = ... below are not processed by buildout as part of above [eggs]section (reciped with zc.recipe.egg) and thus the scripts are not generated - i.e. there is no bin/testnode generated and because of that erp5testnode service later fails e.g. this way:

      File "`", line 46, in <module>
        sys.exit(slapos.recipe.librecipe.execute.executee([['/opt/slapgrid/96fa3e08b9122f182910b27dbc9f10de/bin/testnode', '-l', '/srv/slapgrid/slappart19/var/log/erp5testnode.log', '/srv/slapgrid/slappart19/etc/erp5testnode.cfg'], {'GIT_SSL_NO_VERIFY': '1'}]))
      File "/opt/slapgrid/96fa3e08b9122f182910b27dbc9f10de/parts/slapos.cookbook-repository/slapos/recipe/librecipe/execute.py", line 65, in executee
        generic_exec([args[0], None, args[1]])
      File "/opt/slapgrid/96fa3e08b9122f182910b27dbc9f10de/parts/slapos.cookbook-repository/slapos/recipe/librecipe/execute.py", line 84, in generic_exec
        os.execve(exec_list[0], exec_list + sys.argv[1:], exec_env)
    OSError: [Errno 2] No such file or directory
    Traceback (most recent call last):
      File "/srv/slapgrid/slappart19/etc/service/erp5testnode", line 46, in <module>
        sys.exit(slapos.recipe.librecipe.execute.executee([['/opt/slapgrid/96fa3e08b9122f182910b27dbc9f10de/bin/testnode', '-l', '/srv/slapgrid/slappart19/var/log/erp5testnode.log', '/srv/slapgrid/slappart19/etc/erp5testnode.cfg'], {'GIT_SSL_NO_VERIFY': '1'}]))
      File "/opt/slapgrid/96fa3e08b9122f182910b27dbc9f10de/parts/slapos.cookbook-repository/slapos/recipe/librecipe/execute.py", line 65, in executee
        generic_exec([args[0], None, args[1]])
      File "/opt/slapgrid/96fa3e08b9122f182910b27dbc9f10de/parts/slapos.cookbook-repository/slapos/recipe/librecipe/execute.py", line 84, in generic_exec
        os.execve(exec_list[0], exec_list + sys.argv[1:], exec_env)
    OSError: [Errno 2] No such file or directory

    ( tail of /srv/slapgrid/slappart19/etc/service/erp5testnode is

    sys.exit(slapos.recipe.librecipe.execute.executee([['/opt/slapgrid/96fa3e08b9122f182910b27dbc9f10de/bin/testnode' ...

    and it complains above about /opt/slapgrid/96fa3e08b9122f182910b27dbc9f10de/bin/testnode not being present (also checked manually)

    To me that means that erp5testnode SR was broken since 2012. I could not believe it but when I tested with the following diff:

    diff --git a/software/erp5testnode/software.cfg b/software/erp5testnode/software.cfg
    index 99dc3da..600085c 100644
    --- a/software/erp5testnode/software.cfg
    +++ b/software/erp5testnode/software.cfg
    @@ -40,7 +43,7 @@ eggs =
       erp5.util
       PyXML
     
    -[testnode]
    +#[testnode]
     
     scripts =
       testnode = erp5.util.testnode:main

    erp5testnode SR instantiated OK and its etc/service/erp5testnode also started ok.

    So were we running testnodes instantiated from pre-2012 SR all this time???

    /cc @Tyagov, @rafael, @jerome, @romain

  • also there are several testbnode-related branches in slapos.git:

    kirr@deco:~/src/wendelin/slapos/slapos-master$ git branch -a |grep origin |grep -i testn
      remotes/origin/erp5testnode-scalability
      remotes/origin/erp5testnode-scalability-rebase-erp5testnode
      remotes/origin/erp5testnode-seb
      remotes/origin/erp5testnode_newfirefox
      remotes/origin/testnode_software_link

    am I missing something? Do we need them? Is software/erp5testnode/ expected to be working on master?

    Thanks beforehand,
    Kirill

  • This sounds weird.

    For sure, we are not using testnodes from 2012. A few weeks ago, about 20 testnodes were created with this release :

    https://lab.node.vifib.com/nexedi/slapos/raw/1.0.40.1/software/erp5testnode/software.cfg

    This release is only about 1 month old. There is surely an explanation somewhere (I could not check further right now).

  • @seb thanks for feedback. Ok, the weird stuff was on my side: I was also using slapos.cookbook and erp5.util in develop mode this way:

    diff --git a/software/erp5testnode/software.cfg b/software/erp5testnode/software.cfg
    index 37d0bb37c..fc3c17673 100644
    --- a/software/erp5testnode/software.cfg
    +++ b/software/erp5testnode/software.cfg
    @@ -1,6 +1,7 @@
     [buildout]
     extends =
       ../../stack/slapos.cfg
    +  ../../stack/erp5/buildout.cfg
       ../../component/git/buildout.cfg
       ../../component/lxml-python/buildout.cfg
       ../../component/zip/buildout.cfg
    @@ -16,6 +17,8 @@ extensions -=
     show-picked-versions = true
     
     parts =
    +  erp5-util-develop
    +  slapos-cookbook-develop
       slapos-cookbook
       template
       lxml-python
    @@ -65,7 +68,7 @@ md5sum =  4d4f483d4531eedc321bdd6e460fc9df
     
     [versions]
     PyXML = 0.8.5
    -erp5.util = 0.4.46
    +#erp5.util = 0.4.46
     slapos.recipe.template = 2.7
     setuptools = 19.6.2
     zc.buildout = 2.5.2+slapos005

    and there in stack/erp5/buildout.cfg [eggs] has defined scripts = .... This leads to not default zc.recipe.egg behaviour (install all scripts from all eggs, if I recall correctly) but to install only specified scripts. And since script in stack/erp5/... are different bin/testnode was not generated.

    I guess to use this way (not duplicating [erp5-util-develop] and [erp5] sections), these sections will need to be moved out to something like stack/erp5/common.cfg - just tested it works this way.

    So sorry for the noise.

    P.S. anyway the [testnode] section in erp5testnode/software.cfg is not used anywhere. It should probably be simply deleted only as header or in whole as dead-code...

  • Please follow-up to !111 (closed)

Please register or sign in to reply
scripts =
testnode = erp5.util.testnode:main
......@@ -76,7 +78,7 @@ recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-default.cfg
output = ${buildout:directory}/template-default.cfg
mode = 0644
md5sum = e460e90b20381de10282faeb1dbdb5fc
md5sum = d37e8af090832012b2066748899113e0
[networkcache]
# Romain Courteaud + Sebastien Robin + Antoine Catton signature certificate
......
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