Author: tchemit Date: 2009-08-19 19:01:54 +0200 (Wed, 19 Aug 2009) New Revision: 14 Added: migration-thirdparty/ migration-thirdparty/bin/ migration-thirdparty/bin/adapt-resolv-dir.sh migration-thirdparty/bin/build-nuiton-modify-projects.list.sh migration-thirdparty/bin/build-resolv-dir.sh migration-thirdparty/bin/build-resolv_safe-dir.sh migration-thirdparty/bin/build-resolv_unsafe-dir.sh migration-thirdparty/bin/build-third-maven-repository.sh migration-thirdparty/bin/build-third-translations-list.sh migration-thirdparty/bin/build-third-translations-migrate.list.sh migration-thirdparty/bin/build-third-translations-unsued-list.sh migration-thirdparty/bin/build-third-used-list.sh migration-thirdparty/bin/deploy-third.sh migration-thirdparty/bin/get-third-original-list.sh migration-thirdparty/bin/nuiton-patch-poms.sh migration-thirdparty/bin/nuiton-svn-revert.sh migration-thirdparty/bin/obtain-nuiton-svn-repository.sh Log: add third-party migration scripts Property changes on: migration-thirdparty ___________________________________________________________________ Added: svn:ignore + *.list repo* svn* Added: migration-thirdparty/bin/adapt-resolv-dir.sh =================================================================== --- migration-thirdparty/bin/adapt-resolv-dir.sh (rev 0) +++ migration-thirdparty/bin/adapt-resolv-dir.sh 2009-08-19 17:01:54 UTC (rev 14) @@ -0,0 +1,31 @@ +#!/bin/sh +for i in $(cat resolv_unsafe/asm=asm=1.5.3) ; do +echo $i >> resolv_safe/asm=asm=1.5.3 ; +done +rm resolv_unsafe/asm=asm=1.5.3 +for i in $(cat resolv_unsafe/org.swinglabs=swingx=0.9.6 | grep -e "1.5.") ; do +echo $i >> resolv_safe/org.swinglabs=swingx=0.9.6 ; +done +rm resolv_unsafe/org.swinglabs=swingx=0.9.6 +for i in $(cat resolv_unsafe/org.swinglabs=swingx=0.9.7 | grep -v "1.5.") ; do +echo $i >> resolv_safe/org.swinglabs=swingx=0.9.7 ; +done +rm resolv_unsafe/org.swinglabs=swingx=0.9.7 +for i in $(cat resolv_unsafe/sdoc=sdoc=0.5.0-beta-patchcl | grep -v "isis" | grep -v "jrst2") ; do +echo $i >> resolv_safe/sdoc=sdoc=0.5.0-beta-patchcl ; +done +for i in $(cat resolv_unsafe/sdoc=sdoc=0.5.0-beta-patchcl | grep -v "trunk" | grep -v "1.0.0") ; do +echo $i >> resolv_unsafe/sdoc=sdoc=0.5.0-beta-patchcl-2 ; +done +mv resolv_unsafe/sdoc=sdoc=0.5.0-beta-patchcl-2 resolv_unsafe/sdoc=sdoc=0.5.0-beta-patchcl +for i in $(cat resolv_unsafe/uk.co.flamingpenguin=jewelcli=0.54 | grep -v "jrst2") ; do +echo $i >> resolv_safe/uk.co.flamingpenguin=jewelcli=0.54 ; +done +for i in $(cat resolv_unsafe/uk.co.flamingpenguin=jewelcli=0.54 | grep -e "jrst2") ; do +echo $i >> resolv_unsafe/uk.co.flamingpenguin=jewelcli=0.54-2 ; +done +mv resolv_unsafe/uk.co.flamingpenguin=jewelcli=0.54-2 resolv_unsafe/uk.co.flamingpenguin=jewelcli=0.54 +rm resolv_unsafe/uk.co.flamingpenguin=jewelcli=0.53 + + + Added: migration-thirdparty/bin/build-nuiton-modify-projects.list.sh =================================================================== --- migration-thirdparty/bin/build-nuiton-modify-projects.list.sh (rev 0) +++ migration-thirdparty/bin/build-nuiton-modify-projects.list.sh 2009-08-19 17:01:54 UTC (rev 14) @@ -0,0 +1,30 @@ +#!/bin/sh + +rm -fr nuiton-modify-projects.list +touch nuiton-modify-projects.list +for pom in $(cat nuiton-modify-poms.list) ; do +parent=$(dirname $pom) ; +parent=$(dirname $parent) ; +parentpom="$parent/pom.xml" ; +if [ -e $parentpom ] ; then +# echo "[$pom] - parent $parentpom" ; + grep $parentpom nuiton-modify-projects.list 1>/dev/null ; + if [ $? -gt 0 ] ; then +# echo "add parent pom $parentpom" ; + echo "$parentpom" >> nuiton-modify-projects.list ; + fi ; +else +# echo "[$pom] - standalone" ; + grep $pom nuiton-modify-projects.list 1>/dev/null ; + if [ $? -gt 0 ] ; then +# echo "add standalone pom $pom" ; + echo "$pom" >> nuiton-modify-projects.list ; + fi ; +fi ; +done +sort -d nuiton-modify-projects.list > nuiton-modify-projects.list2 +mv nuiton-modify-projects.list2 nuiton-modify-projects.list + +cat nuiton-modify-projects.list + + Added: migration-thirdparty/bin/build-resolv-dir.sh =================================================================== --- migration-thirdparty/bin/build-resolv-dir.sh (rev 0) +++ migration-thirdparty/bin/build-resolv-dir.sh 2009-08-19 17:01:54 UTC (rev 14) @@ -0,0 +1,17 @@ +#!/bin/sh +rm -rf resolv +mkdir resolv +for i in $(cat third-translations-used.list) ; do + in=$(echo $i | cut -d':' -f1) ; + g=$(echo $in | cut -d'/' -f1) ; + a=$(echo $in | cut -d'/' -f2) ; + v=$(echo $in | cut -d'/' -f3) ; + file="resolv/$g=$a=$v" ; + echo "$g:$a:$v : " ; + touch $file ; + for j in $(cat nuiton-all-poms.list) ; do + grep -e "$a" $j 1>/dev/null ; + if [ $? -eq 0 ] ; then echo "$j" >> $file ; echo " $j"; fi ; + done ; +done + Added: migration-thirdparty/bin/build-resolv_safe-dir.sh =================================================================== --- migration-thirdparty/bin/build-resolv_safe-dir.sh (rev 0) +++ migration-thirdparty/bin/build-resolv_safe-dir.sh 2009-08-19 17:01:54 UTC (rev 14) @@ -0,0 +1,29 @@ +#!/bin/sh +rm -rf resolv_safe resolved +mkdir resolv_safe +touch resolved +for file in $(ls resolv) ; do +g=$(echo $file | cut -d'=' -f1) ; +a=$echo $file | cut -d'=' -f2) ; +v=$(echo $file | cut -d'=' -f3) ; +safeFile="resolv_safe/$file" ; +nbSafe=0 ; +touch $safeFile ; +for pom in $(cat "resolv/$file") ; do + grep -e "$pom" $safeFile 1>/dev/null ; + if [ $? -eq 0 ] ; then continue ; fi ; + grep -e "$v" $pom 1>/dev/null ; + if [ $? -eq 0 ] ; then + echo "$pom" >> $safeFile ; + echo "$pom" >> resolved ; + nbSafe=$(( $nbSafe + 1 )) ; + fi +done ; +if [ $nbSafe -gt 0 ] ; then +echo "[$file]" ; +echo " -- WILL MODIFY poms detected $nbSafe" ; +cat "$safeFile" ; +echo "" ; +else rm $safeFile ; +fi ; +done Added: migration-thirdparty/bin/build-resolv_unsafe-dir.sh =================================================================== --- migration-thirdparty/bin/build-resolv_unsafe-dir.sh (rev 0) +++ migration-thirdparty/bin/build-resolv_unsafe-dir.sh 2009-08-19 17:01:54 UTC (rev 14) @@ -0,0 +1,24 @@ +#!/bin/sh +rm -rf resolv_unsafe +mkdir resolv_unsafe +for file in $(ls resolv) ; do +nbUnsafe=0 ; +unsafeFile="resolv_unsafe/$file" ; +touch $unsafeFile ; +for pom in $(cat "resolv/$file") ; do + grep -e "$pom" resolved 1>/dev/null ; + if [ $? -eq 0 ] ; then continue ; fi ; + grep -e "$pom" $unsafeFile 1>/dev/null ; + if [ $? -eq 0 ] ; then continue ; fi ; + echo "$pom" >> $unsafeFile ; + nbUnsafe=$(( $nbUnsafe + 1 )) ; +done ; +if [ $nbUnsafe -gt 0 ] ; then +echo "[$file]" ; +echo " -- UNSAFE poms detected $nbUnsafe" ; +cat "$unsafeFile" ; +echo "" ; +else rm $unsafeFile ; +fi ; +done + Added: migration-thirdparty/bin/build-third-maven-repository.sh =================================================================== --- migration-thirdparty/bin/build-third-maven-repository.sh (rev 0) +++ migration-thirdparty/bin/build-third-maven-repository.sh 2009-08-19 17:01:54 UTC (rev 14) @@ -0,0 +1,14 @@ +#!/bin/sh +# copy the maven repository for the given artifacts (in file thir-original.list) +rm -rf repository +for i in $(cat third-original.list) ; do +dir="repository/$i" +mkdir -p $dir ; +echo "copy files to $dir" ; +( cd $dir ; + scp -r publish@nuiton.org:/var/lib/maven/release/$i/* . 1>/dev/null ; + ls -l *.pom* + ls -l *.jar* +) +done + Property changes on: migration-thirdparty/bin/build-third-maven-repository.sh ___________________________________________________________________ Added: svn:executable + * Added: migration-thirdparty/bin/build-third-translations-list.sh =================================================================== --- migration-thirdparty/bin/build-third-translations-list.sh (rev 0) +++ migration-thirdparty/bin/build-third-translations-list.sh 2009-08-19 17:01:54 UTC (rev 14) @@ -0,0 +1,32 @@ +#!/bin/sh +cat << EOF > third-translations.list +externallib/jregex/1.2_01:org.nuiton.thirdparty.externallib/jregex/1.2_01 +externallib/REngine/0.6-0:org.nuiton.thirdparty.externallib/REngine/0.6-0 +externallib/Rserve/0.6-0:org.nuiton.thirdparty.externallib/Rserve/0.6-0 +externallib/JRI/0.2-4-cl:org.nuiton.thirdparty.externallib/JRI/0.2-4-cl +externallib/JRI/0.7-0:org.nuiton.thirdparty.externallib/JRI/0.7-0 +externallib/l2fprod-common/0.1:org.nuiton.thirdparty.externallib/l2fprod-common/0.1 +sdoc/sdoc/0.5.0-beta-patchcl:org.nuiton.thirdparty.sdoc/sdoc/0.5.0-beta-patchcl +org.codehaus.mojo.webstart/webstart-maven-plugin/1.0-alpha-2-cl_20090204:org.nuiton.thirdparty.webstart/webstart-maven-plugin/1.0-alpha-2-cl_20090204 +org.codehaus.mojo.webstart/webstart-maven-plugin/1.0-alpha-2-cl_20081018:org.nuiton.thirdparty.webstart/webstart-maven-plugin/1.0-alpha-2-cl_20090204 +org.apache.commons/commons-compress/20090504:org.nuiton.thirdparty.commons/commons-compress/20090504 +org.codehaus.mojo.webstart/webstart-maven-plugin/1.0-alpha-2-cl_20081016:org.nuiton.thirdparty.webstart/webstart-maven-plugin/1.0-alpha-2-cl_20090204 +org.fife/rsyntaxtextarea/1.3.3:org.nuiton.thirdparty.fife/rsyntaxtextarea/1.3.3 +externallib/jGuard-j2ee/0.7.2:XX/jGuard-j2ee/0.7.2 +asm-attrs/asm-attrs/1.5.4-snapshot:org.nuiton.thirdparty.externallib/asm-attrs/1.5.4-snapshot +asm-util/asm-util/1.5.4-snapshot:org.nuiton.thirdparty.externallib/asm-util/1.5.4-snapshot +org.jdesktop/beansbinding/1.2.1:XX/beansbinding/1.2.1 +org.mortbay.jetty/jetty-test/6.1.8:org.nuiton.thirdparty.jetty/jetty-test/6.1.8 +uk.co.flamingpenguin/jewelcli/0.53:uk.co.flamingpenguin.jewelcli/jewelcli/0.57 +uk.co.flamingpenguin/jewelcli/0.54:uk.co.flamingpenguin.jewelcli/jewelcli/0.57 +org.swinglabs/swingx/0.9.6:org.swinglabs/swingx/1.0 +org.swinglabs/swingx/0.9.7:org.swinglabs/swingx/1.0 +asm/asm/1.5.3:org.nuiton.thirdparty.asm/asm/1.5.4-SNAPSHOT +org.apache.maven.plugins/maven-project-info-reports-plugin/2.0.1-cl:org.apache.maven.plugins/maven-project-info-reports-plugin/2.1.2 +org.apache.maven.plugins/maven-project-info-reports-plugin/2.1-cl:org.apache.maven.plugins/maven-project-info-reports-plugin/2.1.2 +org.apache.maven.plugins/maven-project-info-reports-plugin/2.1.1-cl:org.apache.maven.plugins/maven-project-info-reports-plugin/2.1.2 +EOF +sort third-translations.list > third-translations.list2 +mv third-translations.list2 third-translations.list +cat third-translations.list + Property changes on: migration-thirdparty/bin/build-third-translations-list.sh ___________________________________________________________________ Added: svn:executable + * Added: migration-thirdparty/bin/build-third-translations-migrate.list.sh =================================================================== --- migration-thirdparty/bin/build-third-translations-migrate.list.sh (rev 0) +++ migration-thirdparty/bin/build-third-translations-migrate.list.sh 2009-08-19 17:01:54 UTC (rev 14) @@ -0,0 +1,23 @@ +#!/bin/sh +rm -f third-translations-migrate.list +touch third-translations-migrate.list +for i in $(cat third-translations-used.list) ; do +in=$(echo $i | cut -d':' -f1) ; +out=$(echo $i | cut -d':' -f2) ; +g=$(echo $in | cut -d'/' -f1) ; +a=$(echo $in | cut -d'/' -f2) ; +v=$(echo $in | cut -d'/' -f3) ; +rep="repository/${g//.//}/$a/$v" ; +if [ ! -e "$rep" ] ; then continue ; fi ; +echo "$i" | grep -e "jewelcli" 1>/dev/null ; +if [ $? -eq 0 ] ; then continue ; fi ; +echo "$i" | grep -e "swingx" 1>/dev/null ; +if [ $? -eq 0 ] ; then continue ; fi ; +echo $i >> third-translations-migrate.list ; +done +echo "asm/asm/1.5.4-snapshot:org.nuiton.thirdparty.asm/asm/1.5.4-SNAPSHOT" >> third-translations-migrate.list +sort -d third-translations-migrate.list > third-translations-migrate.list2 +mv third-translations-migrate.list2 third-translations-migrate.list +cat third-translations-migrate.list + + Added: migration-thirdparty/bin/build-third-translations-unsued-list.sh =================================================================== --- migration-thirdparty/bin/build-third-translations-unsued-list.sh (rev 0) +++ migration-thirdparty/bin/build-third-translations-unsued-list.sh 2009-08-19 17:01:54 UTC (rev 14) @@ -0,0 +1,25 @@ +#!/bin/sh +rm third-translations-unused.list +touch third-translations-unused.list +for i in $(cat third-translations.list) ; do +in=$(echo $i | cut -d':' -f1) ; +g=$(echo $in | cut -d'/' -f1) ; +a=$(echo $in | cut -d'/' -f2) ; +v=$(echo $in | cut -d'/' -f3) ; +nb=0 ; +for j in $(cat nuiton-all-poms.list) ; do + grep -e "$a" $j 1>/dev/null ; + if [ $? -eq 0 ] ; then + grep -e "$v" $j 1>/dev/null ; + if [ $? -eq 0 ] ; then nb=$(($nb + 1)) ; fi ; + fi ; +done ; +if [ $nb -eq 0 ] ; then + echo $i >> third-translations-unused.list ; + echo "$g:$a:$v UNUSED" ; +fi ; +done + + + + Property changes on: migration-thirdparty/bin/build-third-translations-unsued-list.sh ___________________________________________________________________ Added: svn:executable + * Added: migration-thirdparty/bin/build-third-used-list.sh =================================================================== --- migration-thirdparty/bin/build-third-used-list.sh (rev 0) +++ migration-thirdparty/bin/build-third-used-list.sh 2009-08-19 17:01:54 UTC (rev 14) @@ -0,0 +1,23 @@ +#!/bin/sh +rm -f third-used.list +for i in $(cat third-original.list | grep -v "jGuard-j2ee" \ +| grep -v "asm-util" | grep -v "asm-attrs" | grep -v "jetty-test" \ + | grep -v "beansbinding" | grep -v "1.0-alpha-2-cl_20081016") ; do +echo $i >> third-used.list ; +done +rm -f third-translations-used.list +for i in $(cat third-translations.list) ; do +echo $i | grep jGuard-j2ee 1>/dev/null ; +if [ $? -eq 0 ] ; then continue ; fi ; +echo $i | grep asm-attrs 1>/dev/null ; +if [ $? -eq 0 ] ; then continue ; fi ; +echo $i | grep asm-util 1>/dev/null ; +if [ $? -eq 0 ] ; then continue ; fi ; +echo $i | grep jetty-test 1>/dev/null ; +if [ $? -eq 0 ] ; then continue ; fi ; +echo $i | grep beansbinding 1>/dev/null ; +if [ $? -eq 0 ] ; then continue ; fi ; +echo $i | grep 1.0-alpha-2-cl_20081016 1>/dev/null ; +if [ $? -eq 0 ] ; then continue ; fi ; +echo $i >> third-translations-used.list ; +done Added: migration-thirdparty/bin/deploy-third.sh =================================================================== --- migration-thirdparty/bin/deploy-third.sh (rev 0) +++ migration-thirdparty/bin/deploy-third.sh 2009-08-19 17:01:54 UTC (rev 14) @@ -0,0 +1,34 @@ +#!/bin/sh + +for i in $(cat third-translations-migrate.list) ; do +in=$(echo $i | cut -d':' -f1) ; +out=$(echo $i | cut -d':' -f2) ; +g=$(echo $in | cut -d'/' -f1) ; +a=$(echo $in | cut -d'/' -f2) ; +v=$(echo $in | cut -d'/' -f3) ; +g2=$(echo $out | cut -d'/' -f1) ; +a2=$(echo $out | cut -d'/' -f2) ; +v2=$(echo $out | cut -d'/' -f3) ; +parent="repository/${g//.//}/$a/$v" ; +originalPom="$parent/$a-$v.pom" ; +usedPom="$parent/pom.xml" ; +echo "$g:$a:$v --> $g2:$a2:$v2" ; +if [ -e $originalPom ] ; then +echo " - use $originalPom to build pom" ; +cp $originalPom $usedPom ; +else +echo " - generate pom :" ; +cat << EOF > $usedPom +<?xml version="1.0" encoding="UTF-8"?><project> + <modelVersion>4.0.0</modelVersion> + <groupId>$g2</groupId> + <artifactId>$a2</artifactId> + <version>$v2</version> +</project> +EOF +cat $usedPom ; +fi ; +echo "==================================================================" ; +done + + Added: migration-thirdparty/bin/get-third-original-list.sh =================================================================== --- migration-thirdparty/bin/get-third-original-list.sh (rev 0) +++ migration-thirdparty/bin/get-third-original-list.sh 2009-08-19 17:01:54 UTC (rev 14) @@ -0,0 +1,6 @@ +#!/bin/sh +rm -f third-original.list +ssh publish@nuiton.org '(find /var/lib/maven/release -type d \ +| grep -v "org/nuiton" | grep -v "org/chorem" | grep .*/[0-9] | cut -f6- -d/ )' > third-original.list +cat third-original.list + Property changes on: migration-thirdparty/bin/get-third-original-list.sh ___________________________________________________________________ Added: svn:executable + * Added: migration-thirdparty/bin/nuiton-patch-poms.sh =================================================================== --- migration-thirdparty/bin/nuiton-patch-poms.sh (rev 0) +++ migration-thirdparty/bin/nuiton-patch-poms.sh 2009-08-19 17:01:54 UTC (rev 14) @@ -0,0 +1,37 @@ +#!/bin/sh +rm -fr nuiton-modify-poms.list +touch nuiton-modify-poms.list +for i in $(cat third-translations-used.list) ; do +in=$(echo $i | cut -d':' -f1) ; +out=$(echo $i | cut -d':' -f2) ; +g=$(echo $in | cut -d'/' -f1) ; +a=$(echo $in | cut -d'/' -f2) ; +v=$(echo $in | cut -d'/' -f3) ; +g2=$(echo $out | cut -d'/' -f1) ; +a2=$(echo $out | cut -d'/' -f2) ; +v2=$(echo $out | cut -d'/' -f3) ; +file="resolv_safe/$g=$a=$v" ; +if [ ! -e $file ] ; then echo "nothing to do for $in" ; continue ; fi ; +echo "$g:$a:$v --> $g2:$a2:$v2" ; +for pom in $(cat $file) ; do + echo -n " $pom " ; + if [ $g != $g2 ] ; then + echo -n " [change group]" ; + sed -i~ -e "s/<groupId>$g<\/groupId>/<groupId>$g2<\/groupId>/" $pom ; + fi ; + if [ $v != $v2 ] ; then + sed -i -r -e "s/version>$v(.*)/version>$v2\1/" $pom ; + echo -n " [change v]" ; + fi ; + grep $pom nuiton-modify-poms.list 1>/dev/null ; + if [ $? -gt 0 ] ; then + echo $pom >> nuiton-modify-poms.list ; + fi; + echo "" ; +done ; +echo "" ; +done +sort -d nuiton-modify-poms.list > nuiton-modify-poms.list2 +mv nuiton-modify-poms.list2 nuiton-modify-poms.list + + Added: migration-thirdparty/bin/nuiton-svn-revert.sh =================================================================== --- migration-thirdparty/bin/nuiton-svn-revert.sh (rev 0) +++ migration-thirdparty/bin/nuiton-svn-revert.sh 2009-08-19 17:01:54 UTC (rev 14) @@ -0,0 +1,27 @@ +#!/bin/sh +rm -fr modify.list +touch modify.list +for i in $(cat third-translations.list) ; do +in=$(echo $i | cut -d':' -f1) ; +out=$(echo $i | cut -d':' -f2) ; +g=$(echo $in | cut -d'/' -f1) ; +a=$(echo $in | cut -d'/' -f2) ; +v=$(echo $in | cut -d'/' -f3) ; +g2=$(echo $out | cut -d'/' -f1) ; +a2=$(echo $out | cut -d'/' -f2) ; +v2=$(echo $out | cut -d'/' -f3) ; +file="resolv/$g=$a=$v" ; +if [ ! -e $file ] ; then echo "nothing to do for $in" ; continue ; fi ; +echo "$g:$a:$v --> $g2:$a2:$v2" ; +for pom in `cat $file` ; do + grep $pom modify.list 1>/dev/null ; + if [ $? -eq 0 ] ; then continue ; fi ; + isModified=$(svn st $pom | wc -l) ; + if [ $isModified -eq 0 ] ; then continue; fi ; + echo -n " $pom < revert" ; + svn revert $pom 1>/dev/null ; + echo " >" ; +done ; +done +rm modify.list + Added: migration-thirdparty/bin/obtain-nuiton-svn-repository.sh =================================================================== --- migration-thirdparty/bin/obtain-nuiton-svn-repository.sh (rev 0) +++ migration-thirdparty/bin/obtain-nuiton-svn-repository.sh 2009-08-19 17:01:54 UTC (rev 14) @@ -0,0 +1,13 @@ +#!/bin/sh +rm -rf svn +ssh publish@nuiton.org '/opt/redmine-tools/display-projects.sh nuiton' | grep -v "eugengo" | grep -v "sandbox" > nuiton-all-projects.list + +for i in $(cat nuiton-all-projects.list) ; do + echo "recuperation $i/trunk -> svn/trunk/$i" ; + svn checkout http://svn.nuiton.org/svn/$i/trunk svn/trunk/$i 1> /dev/null ; + echo "recuperation $i/tags -> svn/tags/$i" ; + svn checkout http://svn.nuiton.org/svn/$i/tags svn/tags/$i 1> /dev/null ; +done + +echo "mise en cache des poms" +find -name "pom.xml" > nuiton-all-poms.list Property changes on: migration-thirdparty/bin/obtain-nuiton-svn-repository.sh ___________________________________________________________________ Added: svn:executable + *