You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by to...@apache.org on 2015/04/14 22:04:04 UTC

svn commit: r1673547 - in /sling/trunk/contrib/sling-s3: ./ crank.d/ scripts/

Author: tomekr
Date: Tue Apr 14 20:04:03 2015
New Revision: 1673547

URL: http://svn.apache.org/r1673547
Log:
SLING-4502 Align the update-bundles goal to the latest changes

Added:
    sling/trunk/contrib/sling-s3/crank.d/40-provisioning-standalone.txt
    sling/trunk/contrib/sling-s3/crank.d/50-provisioning-boot.txt
    sling/trunk/contrib/sling-s3/crank.d/60-provisioning-sling.txt
    sling/trunk/contrib/sling-s3/crank.d/70-provisioning-oak.txt
Removed:
    sling/trunk/contrib/sling-s3/crank.d/30-config-oak-auth.txt
    sling/trunk/contrib/sling-s3/crank.d/40-boot-bundles.txt
    sling/trunk/contrib/sling-s3/crank.d/50-sling-startlevel-boot.txt
    sling/trunk/contrib/sling-s3/crank.d/55-sling-startlevel-0.txt
    sling/trunk/contrib/sling-s3/crank.d/60-sling-startlevel-5.txt
    sling/trunk/contrib/sling-s3/crank.d/65-sling-startlevel-10.txt
    sling/trunk/contrib/sling-s3/crank.d/70-sling-startlevel-15.txt
    sling/trunk/contrib/sling-s3/crank.d/75-sling-startlevel-15.txt
Modified:
    sling/trunk/contrib/sling-s3/Makefile
    sling/trunk/contrib/sling-s3/crank.d/00-default.txt
    sling/trunk/contrib/sling-s3/scripts/bundles.rb

Modified: sling/trunk/contrib/sling-s3/Makefile
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/sling-s3/Makefile?rev=1673547&r1=1673546&r2=1673547&view=diff
==============================================================================
--- sling/trunk/contrib/sling-s3/Makefile (original)
+++ sling/trunk/contrib/sling-s3/Makefile Tue Apr 14 20:04:03 2015
@@ -39,7 +39,7 @@ contrib/crankstart.jar:
 	wget http://central.maven.org/maven2/org/apache/sling/org.apache.sling.crankstart.launcher/1.0.0/org.apache.sling.crankstart.launcher-1.0.0.jar -O contrib/crankstart.jar
 
 update-bundles:
-	rm -f crank.d/*-sling-startlevel-*.txt
+	rm -f crank.d/*-provisioning-*.txt
 	$(BUNDLES)
 
 install-deps: contrib/crankstart.jar

Modified: sling/trunk/contrib/sling-s3/crank.d/00-default.txt
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/sling-s3/crank.d/00-default.txt?rev=1673547&r1=1673546&r2=1673547&view=diff
==============================================================================
--- sling/trunk/contrib/sling-s3/crank.d/00-default.txt (original)
+++ sling/trunk/contrib/sling-s3/crank.d/00-default.txt Tue Apr 14 20:04:03 2015
@@ -2,5 +2,4 @@
 defaults port 8080
 defaults sling.home sling
 defaults log.file logs/error.log
-defaults oak.version 1.0.12
 defaults customBlobStore false

Added: sling/trunk/contrib/sling-s3/crank.d/40-provisioning-standalone.txt
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/sling-s3/crank.d/40-provisioning-standalone.txt?rev=1673547&view=auto
==============================================================================
--- sling/trunk/contrib/sling-s3/crank.d/40-provisioning-standalone.txt (added)
+++ sling/trunk/contrib/sling-s3/crank.d/40-provisioning-standalone.txt Tue Apr 14 20:04:03 2015
@@ -0,0 +1,5 @@
+defaults crankstart.bundle.start.level 5
+bundle mvn:org.apache.felix/org.apache.felix.http.api/2.3.2
+bundle mvn:org.apache.felix/org.apache.felix.http.servlet-api/1.1.0
+bundle mvn:org.apache.felix/org.apache.felix.http.jetty/3.0.2
+

Added: sling/trunk/contrib/sling-s3/crank.d/50-provisioning-boot.txt
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/sling-s3/crank.d/50-provisioning-boot.txt?rev=1673547&view=auto
==============================================================================
--- sling/trunk/contrib/sling-s3/crank.d/50-provisioning-boot.txt (added)
+++ sling/trunk/contrib/sling-s3/crank.d/50-provisioning-boot.txt Tue Apr 14 20:04:03 2015
@@ -0,0 +1,17 @@
+defaults crankstart.bundle.start.level 1
+bundle mvn:org.slf4j/slf4j-api/1.7.6
+bundle mvn:org.apache.sling/org.apache.sling.commons.log/4.0.2
+bundle mvn:org.apache.sling/org.apache.sling.commons.logservice/1.0.5-SNAPSHOT
+bundle mvn:org.slf4j/jcl-over-slf4j/1.7.6
+bundle mvn:org.slf4j/log4j-over-slf4j/1.7.6
+bundle mvn:org.apache.sling/org.apache.sling.settings/1.3.6
+bundle mvn:org.apache.sling/org.apache.sling.fragment.xml/1.0.2
+bundle mvn:org.apache.sling/org.apache.sling.fragment.transaction/1.0.0
+bundle mvn:org.apache.sling/org.apache.sling.javax.activation/0.1.0
+bundle mvn:org.apache.sling/org.apache.sling.fragment.ws/1.0.2
+bundle mvn:org.apache.sling/org.apache.sling.launchpad.installer/1.2.2
+bundle mvn:org.apache.sling/org.apache.sling.installer.core/3.6.2
+bundle mvn:org.apache.sling/org.apache.sling.installer.provider.file/1.0.4
+bundle mvn:org.apache.felix/org.apache.felix.configadmin/1.8.2
+bundle mvn:org.apache.felix/org.apache.felix.eventadmin/1.4.2
+

Added: sling/trunk/contrib/sling-s3/crank.d/60-provisioning-sling.txt
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/sling-s3/crank.d/60-provisioning-sling.txt?rev=1673547&view=auto
==============================================================================
--- sling/trunk/contrib/sling-s3/crank.d/60-provisioning-sling.txt (added)
+++ sling/trunk/contrib/sling-s3/crank.d/60-provisioning-sling.txt Tue Apr 14 20:04:03 2015
@@ -0,0 +1,96 @@
+defaults crankstart.bundle.start.level 1
+bundle mvn:commons-fileupload/commons-fileupload/1.3.1
+bundle mvn:commons-collections/commons-collections/3.2.1
+bundle mvn:commons-codec/commons-codec/1.9
+bundle mvn:commons-lang/commons-lang/2.6
+bundle mvn:org.apache.commons/commons-math/2.2
+bundle mvn:commons-pool/commons-pool/1.6
+bundle mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.concurrent/1.3.4_1
+bundle mvn:org.apache.geronimo.bundles/commons-httpclient/3.1_1
+bundle mvn:org.apache.httpcomponents/httpcore-osgi/4.4
+bundle mvn:org.apache.httpcomponents/httpclient-osgi/4.4
+bundle mvn:org.apache.sling/org.apache.sling.commons.osgi/2.2.3-SNAPSHOT
+bundle mvn:org.apache.sling/org.apache.sling.commons.mime/2.1.8
+bundle mvn:org.apache.sling/org.apache.sling.commons.classloader/1.3.2
+bundle mvn:org.apache.sling/org.apache.sling.commons.compiler/2.2.0
+bundle mvn:org.apache.sling/org.apache.sling.commons.scheduler/2.4.6
+bundle mvn:org.apache.sling/org.apache.sling.commons.threads/3.2.0
+bundle mvn:org.apache.sling/org.apache.sling.discovery.api/1.0.2
+bundle mvn:org.apache.sling/org.apache.sling.discovery.support/1.0.0
+bundle mvn:org.apache.sling/org.apache.sling.discovery.impl/1.1.0
+bundle mvn:org.apache.sling/org.apache.sling.event/3.6.0
+bundle mvn:org.apache.sling/org.apache.sling.event.dea/1.0.0
+bundle mvn:org.apache.sling/org.apache.sling.api/2.9.0
+bundle mvn:org.apache.sling/org.apache.sling.serviceusermapper/1.2.0
+bundle mvn:org.apache.sling/org.apache.sling.resourceresolver/1.2.5-SNAPSHOT
+bundle mvn:org.apache.sling/org.apache.sling.auth.core/1.3.6
+bundle mvn:org.apache.sling/org.apache.sling.engine/2.4.0
+bundle mvn:org.apache.sling/org.apache.sling.auth.form/1.0.7-SNAPSHOT
+bundle mvn:org.apache.sling/org.apache.sling.adapter/2.1.5-SNAPSHOT
+bundle mvn:org.apache.sling/org.apache.sling.servlets.resolver/2.3.6
+bundle mvn:org.apache.sling/org.apache.sling.servlets.get/2.1.11-SNAPSHOT
+bundle mvn:org.apache.sling/org.apache.sling.servlets.post/2.3.7-SNAPSHOT
+bundle mvn:org.apache.sling/org.apache.sling.jcr.contentloader/2.1.11-SNAPSHOT
+bundle mvn:org.apache.sling/org.apache.sling.jcr.resource/2.5.0
+bundle mvn:org.apache.sling/org.apache.sling.jcr.classloader/3.2.2
+bundle mvn:org.apache.sling/org.apache.sling.bundleresource.impl/2.2.0
+bundle mvn:org.apache.sling/org.apache.sling.fsresource/1.1.4
+bundle mvn:org.apache.sling/org.apache.sling.launchpad.content/2.0.8
+bundle mvn:org.apache.sling/org.apache.sling.scripting.api/2.1.6
+bundle mvn:org.apache.sling/org.apache.sling.scripting.core/2.0.28
+bundle mvn:org.apache.sling/org.apache.sling.scripting.javascript/2.0.14
+bundle mvn:org.apache.sling/org.apache.sling.scripting.jsp/2.1.4
+bundle mvn:org.apache.sling/org.apache.sling.scripting.jsp.taglib/2.2.4
+bundle mvn:org.apache.geronimo.bundles/jstl/1.2_1
+bundle mvn:org.apache.sling/org.apache.sling.models.api/1.1.1-SNAPSHOT
+bundle mvn:org.apache.sling/org.apache.sling.models.impl/1.1.1-SNAPSHOT
+bundle mvn:org.apache.felix/org.apache.felix.http.whiteboard/2.3.2
+bundle mvn:org.apache.sling/org.apache.sling.installer.console/1.0.0
+bundle mvn:org.apache.sling/org.apache.sling.installer.factory.configuration/1.1.2
+bundle mvn:org.apache.sling/org.apache.sling.installer.provider.jcr/3.1.16
+
+defaults crankstart.bundle.start.level 5
+bundle mvn:org.apache.sling/org.apache.sling.extensions.webconsolebranding/1.0.0
+bundle mvn:org.apache.sling/org.apache.sling.extensions.webconsolesecurityprovider/1.0.0
+bundle mvn:org.apache.felix/org.apache.felix.inventory/1.0.4
+bundle mvn:org.apache.felix/org.apache.felix.prefs/1.0.6
+bundle mvn:org.apache.felix/org.apache.felix.webconsole/4.2.2
+bundle mvn:org.apache.geronimo.bundles/json/20090211_1
+bundle mvn:org.apache.felix/org.apache.felix.webconsole.plugins.ds/1.0.0
+bundle mvn:org.apache.felix/org.apache.felix.webconsole.plugins.obr/1.0.2
+bundle mvn:org.apache.felix/org.apache.felix.webconsole.plugins.packageadmin/1.0.0
+bundle mvn:org.apache.felix/org.apache.felix.webconsole.plugins.event/1.0.2
+bundle mvn:org.apache.felix/org.apache.felix.webconsole.plugins.memoryusage/1.0.4
+bundle mvn:org.apache.sling/org.apache.sling.commons.json/2.0.11-SNAPSHOT
+bundle mvn:org.apache.felix/org.apache.felix.bundlerepository/1.6.4
+bundle mvn:org.apache.sling/org.apache.sling.extensions.threaddump/0.2.2
+bundle mvn:org.apache.sling/org.apache.sling.jcr.webconsole/1.0.2
+bundle mvn:org.apache.sling/org.apache.sling.extensions.explorer/1.0.4
+bundle mvn:org.apache.aries.jmx/org.apache.aries.jmx.api/1.1.0
+bundle mvn:org.apache.aries/org.apache.aries.util/1.1.0
+bundle mvn:org.apache.aries.jmx/org.apache.aries.jmx.core/1.1.1
+bundle mvn:org.apache.aries.jmx/org.apache.aries.jmx.whiteboard/1.0.0
+
+defaults crankstart.bundle.start.level 10
+bundle mvn:org.apache.felix/org.apache.felix.scr/1.8.2
+bundle mvn:org.apache.felix/org.apache.felix.metatype/1.0.10
+bundle mvn:org.apache.tika/tika-core/1.2
+bundle mvn:org.apache.tika/tika-bundle/1.2
+
+defaults crankstart.bundle.start.level 15
+bundle mvn:commons-io/commons-io/2.4
+bundle mvn:org.apache.sling/org.apache.sling.jcr.jcr-wrapper/2.0.0
+bundle mvn:org.apache.sling/org.apache.sling.jcr.api/2.2.0
+bundle mvn:org.apache.sling/org.apache.sling.jcr.base/2.2.2
+bundle mvn:org.apache.sling/org.apache.sling.jcr.registration/1.0.2
+bundle mvn:org.apache.jackrabbit/jackrabbit-api/2.7.5
+bundle mvn:org.apache.jackrabbit/jackrabbit-jcr-commons/2.7.5
+bundle mvn:org.apache.jackrabbit/jackrabbit-spi/2.7.1
+bundle mvn:org.apache.jackrabbit/jackrabbit-spi-commons/2.7.1
+bundle mvn:org.apache.jackrabbit/jackrabbit-webdav/2.7.1
+bundle mvn:org.apache.jackrabbit/jackrabbit-jcr-rmi/2.7.1
+bundle mvn:org.apache.sling/org.apache.sling.jcr.webdav/2.2.2
+bundle mvn:org.apache.sling/org.apache.sling.jcr.davex/1.2.2
+bundle mvn:org.apache.sling/org.apache.sling.jcr.jackrabbit.usermanager/2.2.3-SNAPSHOT
+bundle mvn:org.apache.sling/org.apache.sling.jcr.jackrabbit.accessmanager/2.1.2
+

Added: sling/trunk/contrib/sling-s3/crank.d/70-provisioning-oak.txt
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/sling-s3/crank.d/70-provisioning-oak.txt?rev=1673547&view=auto
==============================================================================
--- sling/trunk/contrib/sling-s3/crank.d/70-provisioning-oak.txt (added)
+++ sling/trunk/contrib/sling-s3/crank.d/70-provisioning-oak.txt Tue Apr 14 20:04:03 2015
@@ -0,0 +1,39 @@
+defaults oak.version 1.0.12
+
+defaults crankstart.bundle.start.level 10
+bundle mvn:org.apache.felix/org.apache.felix.jaas/0.0.2
+
+defaults crankstart.bundle.start.level 15
+bundle mvn:org.apache.sling/org.apache.sling.jcr.oak.server/0.0.2-SNAPSHOT
+bundle mvn:com.google.guava/guava/15.0
+bundle mvn:org.apache.jackrabbit/oak-core/${oak.version}
+bundle mvn:org.apache.jackrabbit/oak-commons/${oak.version}
+bundle mvn:org.apache.jackrabbit/oak-mk-api/${oak.version}
+bundle mvn:org.apache.jackrabbit/oak-lucene/${oak.version}
+bundle mvn:org.apache.jackrabbit/oak-blob/${oak.version}
+
+config.factory org.apache.felix.jaas.Configuration.factory
+  jaas.controlFlag=optional
+  jaas.classname=org.apache.jackrabbit.oak.spi.security.authentication.GuestLoginModule
+  jaas.ranking=300
+config.factory org.apache.felix.jaas.Configuration.factory
+  jaas.controlFlag=required
+  jaas.classname=org.apache.jackrabbit.oak.security.authentication.user.LoginModuleImpl
+config.factory org.apache.felix.jaas.Configuration.factory
+  jaas.controlFlag=sufficient
+  jaas.classname=org.apache.jackrabbit.oak.security.authentication.token.TokenLoginModule
+  jaas.ranking=200
+config org.apache.felix.jaas.ConfigurationSpi
+  jaas.defaultRealmName=jackrabbit.oak
+  jaas.configProviderName=FelixJaasProvider
+config org.apache.jackrabbit.oak.security.authentication.AuthenticationConfigurationImpl
+  org.apache.jackrabbit.oak.authentication.configSpiName=FelixJaasProvider
+config org.apache.jackrabbit.oak.security.user.UserConfigurationImpl
+  groupsPath=/home/groups
+  usersPath=/home/users
+  defaultDepth=1
+  importBehavior=besteffort
+config org.apache.jackrabbit.oak.spi.security.user.action.DefaultAuthorizableActionProvider
+  enabledActions=org.apache.jackrabbit.oak.spi.security.user.action.AccessControlAction
+  userPrivilegeNames=jcr:all
+  groupPrivilegeNames=jcr:read

Modified: sling/trunk/contrib/sling-s3/scripts/bundles.rb
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/sling-s3/scripts/bundles.rb?rev=1673547&r1=1673546&r2=1673547&view=diff
==============================================================================
--- sling/trunk/contrib/sling-s3/scripts/bundles.rb (original)
+++ sling/trunk/contrib/sling-s3/scripts/bundles.rb Tue Apr 14 20:04:03 2015
@@ -4,27 +4,74 @@ require 'open-uri'
 require 'rexml/document'
 include REXML
 
-url = 'https://svn.apache.org/repos/asf/sling/trunk/launchpad/builder/src/main/bundles/list.xml'
-doc = Document.new(open(url).read)
+def parse_bundle_list name
+  url = "http://svn.apache.org/repos/asf/sling/trunk/launchpad/builder/src/main/provisioning/#{name}"
+  sections = []
+  section = nil
+  open(url).each_line do |line|
+    next if line.strip.empty?
+    next if line =~ /^#/
+    if line =~ /^\[([^ ]+) ?(.*)\]$/
+      name = $1
+      attributes = {}
+      $2.split(' ').map { |a| a.split('=') }.each { |a| attributes[a[0]] = a[1] }
+      section = { :name => name, :attr => attributes, :lines => [] }
+      sections << section
+      next
+    end
+    next unless section
+    section[:lines] << line
+  end
+  sections
+end
+
+def write_variables file, section
+  section[:lines].each do |l|
+    a = l.strip.split('=')
+    file.puts "defaults #{a[0]} #{a[1]}"
+  end
+  file.puts
+end
+
+def write_artifacts file, section
+  level = section[:attr]['startLevel'] || 1
+  file.puts "defaults crankstart.bundle.start.level #{level}"
+  section[:lines].each do |l|
+    file.puts "bundle mvn:#{l.strip}"
+  end
+  file.puts
+end
 
-index = 50
+def write_configs file, section
+  section[:lines].each do |l|
+    l = l[2..-1]
+    if l =~ /^  (.+)=I?\[?"([^"]+)"\]?/
+      file.puts "  #{$1}=#{$2}"
+    elsif l =~ /(.+)-(.+)/
+      file.puts "config.factory #{$1}"
+    else
+      file.puts "config #{l}"
+    end
+  end
+end
 
-doc.root.each_element('startLevel') do |startLevel|
-  level = startLevel.attributes['level']
-  f = File.open("crank.d/#{index}-sling-startlevel-#{level}.txt", 'w')
-  level = 1 if level == 'boot'
-  f.puts "defaults crankstart.bundle.start.level #{level}"
-  f.puts
-  startLevel.each_element('bundle') do |bundle|
-    elements = bundle.elements
-    artifactId = elements['artifactId'].text
-    groupId = elements['groupId'].text
-    version = elements['version'].text
-    runModes = elements['runModes']
-    runModes = runModes.text if runModes
-    next if runModes == 'jackrabbit' or runModes == 'oak_mongo'
-    f.puts "bundle mvn:#{groupId}/#{artifactId}/#{version}"
+def write_config sections, filename
+  File.open(filename, 'w') do |f|
+    sections.each do |s|
+      runModes = s[:attr]['runModes']
+      next if ['oak_tar', 'oak_mongo'].include? runModes
+      case s[:name]
+      when 'variables' then write_variables f, s
+      when 'artifacts' then write_artifacts f, s
+      when 'configurations' then write_configs f, s
+      end
+    end
   end
-  f.close
-  index += 5
+end
+
+index = 40
+['standalone.txt', 'boot.txt', 'sling.txt', 'oak.txt'].each do |n|
+  sections = parse_bundle_list n
+  write_config sections, "crank.d/#{index}-provisioning-#{n}"
+  index += 10
 end