Public
Snippet $107 authored by isaak yansane-sisk

git diff origin/master upstream/master

Edited
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571
diff --git a/component/apache-modsecurity/buildout.cfg b/component/apache-modsecurity/buildout.cfg
deleted file mode 100644
index eea4a63..0000000
--- a/component/apache-modsecurity/buildout.cfg
+++ /dev/null
@@ -1,24 +0,0 @@
-[buildout]
-extends = 
-  ../pcre/buildout.cfg
-  ../libxml2/buildout.cfg
-  ../curl/buildout.cfg
-  ../apache/buildout.cfg
-
-parts =
-  apache
-  apache-modsecurity
-
-[apache-modsecurity]
-recipe = slapos.recipe.cmmi
-url = https://www.modsecurity.org/tarball/2.9.1/modsecurity-2.9.1.tar.gz
-configure-command=${apache:location}/bin/apxs
-configure-options= -c ${apache-modsecurity:location}/apache2/modsecurity.c
-make-binary = ${:configure-command}
-configure =
-  --with-apxs=${apache:location}/bin/apxs
-  --with-pcre=${pcre:location}
-  --with-apr=${apr-util:location}
-  --with-curl=${curl:location}
-  --with-libxml=${libxml2:location}
-   
diff --git a/component/geos/buildout.cfg b/component/geos/buildout.cfg
index dafe9ed..327020c 100755
--- a/component/geos/buildout.cfg
+++ b/component/geos/buildout.cfg
@@ -4,9 +4,9 @@ parts =
 
 [geos]
 recipe = slapos.recipe.cmmi
-version = 3.5.0
+version = 3.4.2
 url = http://download.osgeo.org/geos/geos-${:version}.tar.bz2
-md5sum = 136842690be7f504fba46b3c539438dd
+md5sum = fc5df2d926eb7e67f988a43a92683bae
 configure-options =
    --disable-dependency-tracking
   --disable-static
diff --git a/component/pyanomaly/buildout.cfg b/component/pyanomaly/buildout.cfg
deleted file mode 100644
index 71b96ea..0000000
--- a/component/pyanomaly/buildout.cfg
+++ /dev/null
@@ -1,14 +0,0 @@
-[buildout]
-extends = 
-  ../git/buildout.cfg
-
-[pyanomaly]
-recipe = zc.recipe.egg:develop
-egg = pyanomaly
-setup = ${pyanomaly-repository:location}
-
-[pyanomaly-repository]
-recipe = slapos.recipe.build:gitclone
-repository = https://donkey-hotei:h1karih1kari@lab.nexedi.com/donkey-hotei/pyanomaly.git
-location = ${buildout:parts-directory}/pyanomaly
-revision = fe53ec171b5d96ceb070d34df3b972934f6d38b6
diff --git a/component/shapely/buildout.cfg b/component/shapely/buildout.cfg
deleted file mode 100644
index 83f9a32..0000000
--- a/component/shapely/buildout.cfg
+++ /dev/null
@@ -1,16 +0,0 @@
-[buildout]
-extends =
-  ../geos/buildout.cfg
-  
-parts =
-  shapely
-
-
-[shapely_env]
-GEOS_CONFIG=${geos:location}/bin/geos-config
-
-
-[shapely]
-recipe = zc.recipe.egg:custom
-egg = shapely
-environment = shapely_env
\ No newline at end of file
diff --git a/slapos/recipe/gitclone.py b/slapos/recipe/gitclone.py
deleted file mode 100644
index 0431180..0000000
--- a/slapos/recipe/gitclone.py
+++ /dev/null
@@ -1,298 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2012 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 errno
-import hashlib
-import os
-import shutil
-import sys
-import time
-import traceback
-
-from zc.buildout import UserError
-from subprocess import call, check_call, CalledProcessError
-import subprocess
-
-try:
-  try:
-    from slapos.networkcachehelper import \
-       helper_upload_network_cached_from_directory, \
-       helper_download_network_cached_to_directory
-  except ImportError:
-    LIBNETWORKCACHE_ENABLED = False
-  else:
-    LIBNETWORKCACHE_ENABLED = True
-except:
-  print 'There was problem while trying to import slapos.libnetworkcache:'\
-      '\n%s' % traceback.format_exc()
-  LIBNETWORKCACHE_ENABLED = False
-  print 'Networkcache forced to be disabled.'
-
-GIT_DEFAULT_REMOTE_NAME = 'origin'
-GIT_DEFAULT_BRANCH_NAME = 'master'
-TRUE_VALUES = ('y', 'yes', '1', 'true')
-
-GIT_CLONE_ERROR_MESSAGE = 'Impossible to clone repository.'
-GIT_CLONE_CACHE_ERROR_MESSAGE = 'Impossible to clone repository and ' \
-    'impossible to download from cache.'
-
-def upload_network_cached(path, name, revision, networkcache_options):
-  """
-  Creates uploads repository to cache.
-  """
-  if not (LIBNETWORKCACHE_ENABLED and networkcache_options.get(
-      'upload-dir-url')):
-    return False
-  try:
-    print 'Uploading git repository to cache...'
-    metadata_dict = {
-        'revision':revision,
-        # XXX: we set date from client side. It can be potentially dangerous
-        # as it can be badly configured.
-        'timestamp':time.time(),
-    }
-    helper_upload_network_cached_from_directory(
-        path=path,
-        directory_key='git-buildout-%s' % hashlib.md5(name).hexdigest(),
-        metadata_dict=metadata_dict,
-        # Then we give a lot of not interesting things
-        dir_url=networkcache_options.get('upload-dir-url'),
-        cache_url=networkcache_options.get('upload-cache-url'),
-        signature_private_key_file=networkcache_options.get(
-            'signature-private-key-file'),
-        shacache_cert_file=networkcache_options.get('shacache-cert-file'),
-        shacache_key_file=networkcache_options.get('shacache-key-file'),
-        shadir_cert_file=networkcache_options.get('shadir-cert-file'),
-        shadir_key_file=networkcache_options.get('shadir-key-file'),
-    )
-    print 'Uploaded git repository to cache.'
-  except Exception:
-    print 'Unable to upload to cache:\n%s.' % traceback.format_exc()
-
-
-def download_network_cached(path, name, revision, networkcache_options):
-  """
-  Download a tar of the repository from cache, and untar it.
-  """
-  def strategy(entry_list):
-    """
-    Get the latest entry.
-    """
-    timestamp = 0
-    best_entry = None
-    for entry in entry_list:
-      if entry['timestamp'] > timestamp:
-        best_entry = entry
-    return best_entry
-
-  return helper_download_network_cached_to_directory(
-      path=path,
-      directory_key='git-buildout-%s' % hashlib.md5(name).hexdigest(),
-      wanted_metadata_dict={'revision':revision},
-      required_key_list=['timestamp'],
-      strategy=strategy,
-      # Then we give a lot of not interesting things
-      dir_url=networkcache_options.get('download-dir-url'),
-      cache_url=networkcache_options.get('download-cache-url'),
-      signature_certificate_list=\
-          networkcache_options.get('signature-certificate-list'),
-  )
-
-class Recipe(object):
-  """Clone a git repository."""
-
-  def __init__(self, buildout, name, options):
-    options.setdefault('location',
-        os.path.join(buildout['buildout']['parts-directory'], name))
-    self.name = name
-    for option in ('branch', 'revision', 'location', 'repository'):
-      value = options.get(option, '').strip()
-      if value == '':
-        setattr(self, option, None)
-      else:
-        setattr(self, option, value)
-    self.git_command = options.get('git-executable', '')
-    if self.git_command == '':
-      self.git_command = 'git'
-    # Set boolean values
-    for key in ('develop', 'use-cache', 'ignore-ssl-certificate'):
-      setattr(self, key.replace('-', '_'), options.get(key, '').lower() in TRUE_VALUES)
-
-    self.networkcache = buildout.get('networkcache', {})
-
-    # Check if input is correct
-    if not self.repository:
-      raise UserError('repository parameter is mandatory.')
-    if self.revision and self.branch:
-      # revision option has priority over branch option
-      self.branch_overrided = self.branch
-      self.branch = None
-
-    # Check existence of directory
-    if not os.path.exists(self.location):
-      self.update = self.install
-
-  def gitReset(self, revision=None):
-    """Operates git reset on the repository."""
-    command = [self.git_command, 'reset', '--hard']
-    if revision:
-      command.append(revision)
-    check_call(command, cwd=self.location)
-
-
-  def install(self):
-    """
-    Do a git clone.
-    If branch is specified, checkout to it.
-    If revision is specified, reset to it.
-    If something fails, try to download from cache.
-    Else, if possible, try to upload to cache.
-    """
-    # If directory already exist: delete it.
-    if os.path.exists(self.location):
-      print 'destination directory already exists.'
-      if not self.develop:
-        print 'Deleting it.'
-        shutil.rmtree(self.location)
-      else:
-        # If develop is set, assume that this is a valid working copy
-        return [self.location]
-
-    if getattr(self, 'branch_overrided', None):
-      print('Warning: "branch" parameter with value "%s" is ignored. '
-            'Checking out to revision %s.' % (
-            self.branch_overrided, self.revision)
-      )
-      sys.stdout.flush()
-
-    git_clone_command = [self.git_command, 'clone',
-                self.repository,
-                self.location]
-    if self.branch:
-      git_clone_command.extend(['--branch', self.branch])
-
-    if self.ignore_ssl_certificate:
-      git_clone_command.extend(['--config', 'http.sslVerify=false'])
-
-    try:
-      check_call(git_clone_command, stdout=sys.stdout, stderr=sys.stdout)
-      if not os.path.exists(self.location):
-        raise UserError("Unknown error while cloning repository.")
-      if self.revision:
-        self.gitReset(self.revision)
-      if self.use_cache:
-        upload_network_cached(os.path.join(self.location, '.git'),
-                              self.repository, self.revision, self.networkcache)
-    except CalledProcessError:
-      print ("Unable to download from git repository. Trying from network "
-          "cache...")
-      if os.path.exists(self.location):
-        shutil.rmtree(self.location)
-      if not self.use_cache:
-        raise UserError(GIT_CLONE_ERROR_MESSAGE)
-      os.mkdir(self.location)
-      if not download_network_cached(os.path.join(self.location, '.git'),
-          self.repository, self.revision, self.networkcache):
-        raise UserError(GIT_CLONE_CACHE_ERROR_MESSAGE)
-      self.gitReset()
-
-    return [self.location]
-
-  def deletePycFiles(self, path):
-    """Delete *.pyc files so that deleted/moved files can not be imported"""
-    for path, dir_list, file_list in os.walk(path):
-      for file in file_list:
-        if file[-4:] in ('.pyc', '.pyo'):
-          # allow several processes clean the same folder at the same time
-          try:
-            os.remove(os.path.join(path, file))
-          except OSError, e:
-            if e.errno != errno.ENOENT:
-              raise
-
-  def update(self):
-    """
-    Do a git fetch.
-    If user doesn't develop, reset to remote revision (or branch if revision is
-    not specified).
-    """
-    try:
-      # first cleanup pyc files
-      self.deletePycFiles(self.location)
-
-      # then update,
-      # but, to save time, only if we don't have the revision already
-      revision_already_fetched = \
-            self.revision and   \
-            call([self.git_command, 'rev-parse', '--verify', self.revision],
-                    cwd=self.location) == 0
-      if not revision_already_fetched:
-        check_call([self.git_command, 'fetch', '--all'], cwd=self.location)
-
-      # If develop parameter is set, don't reset/update.
-      # Otherwise, reset --hard
-      if not self.develop:
-        if self.revision:
-          self.gitReset(self.revision)
-        else:
-          self.gitReset('@{upstream}')
-    except:
-      if not self.develop:
-        raise
-      # Buildout will remove the installed location and mark the part as not
-      # installed if an error occurs during update. If we are developping this
-      # repository we do not want this to happen.
-      print 'Unable to update:\n%s' % traceback.format_exc()
-
-def uninstall(name, options):
-  """Keep the working copy, unless develop is set to false.
-  """
-  if not os.path.exists(options['location']):
-    return
-  force_keep = False
-  if options.get('develop', 'yes').lower() in TRUE_VALUES:
-    p = subprocess.Popen([options.get('git-executable', 'git'), 'status', '--short'],
-                          cwd=options['location'],
-                          stdout=subprocess.PIPE)
-    if p.communicate()[0].strip():
-      print "You have uncommited changes in %s. "\
-            "This folder will be left as is." % options['location']
-      force_keep = True
-
-    p = subprocess.Popen([options.get('git-executable', 'git'),
-                            'log', '--branches', '--not', '--remotes'],
-                          cwd=options['location'],
-                          stdout=subprocess.PIPE)
-    if p.communicate()[0].strip():
-      print "You have commits not pushed upstream in %s. "\
-            "This folder will be left as is." % options['location']
-      force_keep = True
-
-  if force_keep:
-    # Eventhough this behaviour is not documented, buildout won't uninstall
-    # anything if we unset __buildout_installed__
-    options['__buildout_installed__'] = ''
diff --git a/software/helloworld/instance.cfg.in b/software/helloworld/instance.cfg.in
index b15847f..ca52ce3 100644
--- a/software/helloworld/instance.cfg.in
+++ b/software/helloworld/instance.cfg.in
@@ -7,7 +7,7 @@
 parts =
   directory
   publish-connection-parameter
-# 
+
 # Define egg directories to be the one from Software Release
 # (/opt/slapgrid/...)
 # Always the same.
@@ -36,7 +36,6 @@ cert = ${slap_connection:cert_file}
 # All possible parameters should have a default.
 # In our use case, we are expecting from the user to specify one (optional) parameter: "name". We put the default value here if he doesn't specify it, so that it doesn't crash.
 configuration.name = John Doe
-configuration.title = Galaxy
 # If our use case requires that the user can specify a mail address so that his instance can mail to him (for example), we can do:
 # configuration.mail-address =
 # If the user doesn't specify it, it won't break and the recipe can handle it (i.e don't send any mail for example).
@@ -86,6 +85,7 @@ command-line =
 # exits/crashes, it will trigger a "bang" and cause a re-run of the instance.
 wrapper-path = ${directory:service}/helloweb-${:kind}
 
+
 # promise, that checks that helloweb service is alive
 [helloweb-promise]
 recipe = slapos.cookbook:check_port_listening
@@ -128,7 +128,6 @@ parts +=
 [publish-connection-parameter]
 recipe = slapos.cookbook:publish
 name = Hello ${instance-parameter:configuration.name}!
-title = $${instance-parameter:configuration.title}
 {%- for kind in service_list %}
 url.{{ kind }} = ${helloweb-{{ kind }}:url}
 {%- endfor %}
diff --git a/software/helloworld/software.cfg b/software/helloworld/software.cfg
index 3203cac..de0d4d4 100644
--- a/software/helloworld/software.cfg
+++ b/software/helloworld/software.cfg
@@ -10,11 +10,7 @@ extends =
 # ../../component/component1/buildout.cfg
 # ../../component/component2/buildout.cfg
   ../../component/helloweb/buildout.cfg
-  ../../component/dash/buildout.cfg
-  ../../component/dcron/buildout.cfg
-  ../../component/logrotate/buildout.cfg
-  ../../component/gzip/buildout.cfg
- 
+
 parts =
 # Call installation of slapos.cookbook egg defined in stack/slapos.cfg (needed
 # in 99,9% of Slapos Software Releases)
@@ -22,13 +18,11 @@ parts =
 # Call creation of instance.cfg file that will be called for deployment of
 # instance
   instance-profile
+
 # build helloweb programs
   helloweb-python
   helloweb-ruby
   helloweb-go
-# additional parts for practice
-  dcron
-  logrotate
 
 
 # Download instance.cfg.in (buildout profile used to deployment of instance),
@@ -39,7 +33,7 @@ recipe = slapos.recipe.template:jinja2
 template = ${:_profile_base_location_}/instance.cfg.in
 rendered = ${buildout:directory}/instance.cfg
 # MD5 checksum can be skipped for development (easier to develop), but must be filled for production
-# md5sum = 6567f8dedb5cdd93542dc29e96edb547
+md5sum = 6567f8dedb5cdd93542dc29e96edb547
 mode = 0644
 extensions = jinja2.ext.do
 context =
diff --git a/software/wendelin/software.cfg b/software/wendelin/software.cfg
index bc6c086..3f0c763 100644
--- a/software/wendelin/software.cfg
+++ b/software/wendelin/software.cfg
@@ -1,25 +1,17 @@
 [buildout]
 versions = versions
 extends =
-  ../../component/pyanomaly/buildout.cfg
-  ../../component/proj4/buildout.cfg
-  ../../component/shapely/buildout.cfg
   ../../component/wendelin.core/buildout.cfg
      ../../component/msgpack-python/buildout.cfg
   ../../component/scipy/buildout.cfg
   ../../software/erp5/software.cfg
-  ../../component/apache-modsecurity/buildout.cfg
-
 parts +=
-  geos
-  proj4
   wendelin
   scipy
   msgpack-python
   ipython
   wendelin.core
   ipython-notebook
-  apache-modsecurity
 
 [eggs]
 initialization =
@@ -31,10 +23,6 @@ eggs +=
   ${msgpack-python:egg}
   ${wendelin.core:egg}
   ${ipython:egg}
-  ${shapely:egg}
-  ${pyanomaly:egg}
-  sqlparse
-  
 
 [erp5_repository_list]
 repository_id_list += wendelin
diff --git a/software/wendelin/wendelin/instance.cfg b/software/wendelin/wendelin/instance.cfg
deleted file mode 100644
index e69de29..0000000
diff --git a/software/wendelin/wendelin/software.cfg b/software/wendelin/wendelin/software.cfg
deleted file mode 100644
index b1917fc..0000000
--- a/software/wendelin/wendelin/software.cfg
+++ /dev/null
@@ -1,24 +0,0 @@
-[buildout]
-
-extends =
-  ../../stack/lamp/buildout.cfg
-  ../../stack/slapos.cfg
-
@@ -31,10 +23,6 @@ eggs +=
   ${msgpack-python:egg}
   ${wendelin.core:egg}
   ${ipython:egg}
-  ${shapely:egg}
-  ${pyanomaly:egg}
-  sqlparse
-  
 
 [erp5_repository_list]
 repository_id_list += wendelin
diff --git a/software/wendelin/wendelin/instance.cfg b/software/wendelin/wendelin/instance.cfg
deleted file mode 100644
index e69de29..0000000
diff --git a/software/wendelin/wendelin/software.cfg b/software/wendelin/wendelin/software.cfg
deleted file mode 100644
index b1917fc..0000000
--- a/software/wendelin/wendelin/software.cfg
+++ /dev/null
@@ -1,24 +0,0 @@
-[buildout]
-
-extends =
-  ../../stack/lamp/buildout.cfg
-  ../../stack/slapos.cfg
-
-[application]
-recipe = slapos.recipe.build:download-unpacked
-url = Student shall put here url of zipped or tarballed web page or application
-md5sum = Student may put here md5sum of this file, this is good idea
-#If provided tarball does not contain top directory, option shall be changed to false
-strip-top-level-dir = true
-
-[application-template]
-recipe = slapos.recipe.build:download
-url = ${:_profile_base_location_}/template/REPLACE_ME_BY_APPLICATION_TEMPLATE_NAME
-#md5sum = Student may put here md5sum of this file, this is good idea
-filename = template.in
-mode = 0644
-location = ${buildout:parts-directory}/${:_buildout_section_name_}
-
-[application-configuration]
-#Student shall put here relative path to application top level directory where configuration shall be created
-#location =