From 524b05d76fe1c101012ec6465d4f4c2ce7135cc6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20=C5=A0ustr?= Date: Wed, 24 Mar 2010 15:00:17 +0000 Subject: [PATCH] New version of EGEE license check, EGEE license removed from Trio files. --- org.glite.lb/egee_license_check.sh | 59 +++++++++++++++++++++++------ org.glite.lbjp-common.trio/interface/trio.h | 17 --------- org.glite.lbjp-common.trio/src/strio.c | 17 --------- org.glite.lbjp-common.trio/src/strio.h | 17 --------- org.glite.lbjp-common.trio/src/trio.c | 18 --------- org.glite.lbjp-common.trio/src/triop.h | 17 --------- 6 files changed, 48 insertions(+), 97 deletions(-) diff --git a/org.glite.lb/egee_license_check.sh b/org.glite.lb/egee_license_check.sh index f592100..d96a622 100644 --- a/org.glite.lb/egee_license_check.sh +++ b/org.glite.lb/egee_license_check.sh @@ -92,18 +92,36 @@ file=$1 stripped_contents=`cat ${file} | sed --posix --regexp-extended \ - -e 's:^[[:space:]]*(\#|//|/\*|\*)[[:space:]]*::' \ - -e 's:[[:space:]]*(\#|//|\*/|\*)[[:space:]]*$::' \ + -e 's:^[[:space:]]*(\#|//|/\*|\*|\%)[[:space:]]*::' \ + -e 's:[[:space:]]*(\#|//|\*/|\*|\%)[[:space:]]*$::' \ -e 's/[[:digit:]]{4}( ?[,-] ?[0-9]{4})*//' | -tr -d '[[:space:]]'` +tr -d '[\/[:space:],]'` # is copyright present? -echo ${stripped_contents} | grep -q ${stripped_copyright} 2>/dev/null +echo ${stripped_contents} | grep -q "${stripped_copyright}" 2>/dev/null r1=$? +if [ "$r1" -eq "1" ]; then + # if not, try other known copyrights + echo ${stripped_contents} | grep -q "${stripped_gpl_copyright}" 2>/dev/null + r1=$? + if [ "$r1" -eq "1" ]; then + echo ${stripped_contents} | grep -q "${stripped_trio_copyright}" 2>/dev/null + r1=$? + fi +fi # is license present? -echo ${stripped_contents} | grep -q ${stripped_license} 2>/dev/null +echo ${stripped_contents} | grep -q "${stripped_license}" 2>/dev/null r2=$? +if [ "$r2" -eq "1" ]; then + # if not, try other known licenses + echo ${stripped_contents} | grep -q "${stripped_gpl_license}" 2>/dev/null + r2=$? + if [ "$r2" -eq "1" ]; then + echo ${stripped_contents} | grep -q "${stripped_trio_license}" 2>/dev/null + r2=$? + fi +fi ret=$(( r1 + r2 * 2 )) @@ -227,14 +245,28 @@ See the License for the specific language governing permissions and limitations under the License.' COPYRIGHT='Copyright (c) Members of the EGEE Collaboration. 2004-2010. -See http://www.eu-egee.org/partners for details on the copyright holders.' +See http://www.eu-egee.org/partners/ for details on the copyright holders.' + +GPLCOPYRIGHT='Copyright (C) 2000-2007, Robert van Engelen, Genivia Inc., All Rights Reserved.' +GPLLICENSE='The contents of this file are subject to the gSOAP Public License' + +TRIOCOPYRIGHT='Copyright (C) 1998 Bjorn Reese and Daniel Stenberg.' +TRIOLICENSE='Copyright (C) 1998 Bjorn Reese and Daniel Stenberg.' + +stripped_copyright=`printf "$COPYRIGHT" | sed --posix --regexp-extended -e 's/[[:digit:]]{4}( ?[,-] ?[0-9]{4})*//' | tr -d '[\/[:space:],]'` +stripped_license=`printf "$LICENSE" | tr -d '[\/[:space:],]'` + +stripped_gpl_copyright=`printf "$GPLCOPYRIGHT" | sed --posix --regexp-extended -e 's/[[:digit:]]{4}( ?[,-] ?[0-9]{4})*//' | tr -d '[\/[:space:],]'` +stripped_gpl_license=`printf "$GPLLICENSE" | tr -d '[\/[:space:],]'` + +# Specific treatment for TRIO! +stripped_trio_copyright=`printf "$TRIOCOPYRIGHT" | sed --posix --regexp-extended -e 's/[[:digit:]]{4}( ?[,-] ?[0-9]{4})*//' | tr -d '[\/[:space:],]'` +stripped_trio_license=`printf "$TRIOCOPYRIGHT" | sed --posix --regexp-extended -e 's/[[:digit:]]{4}( ?[,-] ?[0-9]{4})*//' | tr -d '[\/[:space:],]'` -stripped_copyright=`printf "$COPYRIGHT" | sed --posix --regexp-extended -e 's/[[:digit:]]{4}( ?[,-] ?[0-9]{4})*//' | tr -d '[[:space:]]'` -stripped_license=`printf "$LICENSE" | tr -d '[[:space:]]'` #ANSI C files echo Processing ANSI C files -fix_c_style_sources "*.[ch]" +fix_c_style_sources "*.[chCH]" #CPP files echo Processing C++ files @@ -257,11 +289,16 @@ echo Processing shell files fix_sh_style_sources "*.sh" '#' #TeX files -echo Processing TeX files -fix_sh_style_sources "*.tex" '%%' +#echo Processing TeX files +#fix_sh_style_sources "*.tex" '%%' #Perl files echo Processing Perl files fix_sh_style_sources "*.pl" '#' +#LB configure files +echo Processing configure files /Perl/ -- specific for LB +fix_sh_style_sources "configure" '#' + + printf "\n\nTotal files found:\t $TOTALFOUND\nTotal copyrights fixed:\t $TOTALFIXEDCOP\nTotal licenses fixed:\t $TOTALFIXEDLIC\n"; diff --git a/org.glite.lbjp-common.trio/interface/trio.h b/org.glite.lbjp-common.trio/interface/trio.h index b20ec25..04f133c 100644 --- a/org.glite.lbjp-common.trio/interface/trio.h +++ b/org.glite.lbjp-common.trio/interface/trio.h @@ -1,20 +1,3 @@ -/* -Copyright (c) Members of the EGEE Collaboration. 2004-2010. -See http://www.eu-egee.org/partners for details on the copyright holders. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - /************************************************************************* * * $Id$ diff --git a/org.glite.lbjp-common.trio/src/strio.c b/org.glite.lbjp-common.trio/src/strio.c index e630e13..f1ab5b8 100644 --- a/org.glite.lbjp-common.trio/src/strio.c +++ b/org.glite.lbjp-common.trio/src/strio.c @@ -1,20 +1,3 @@ -/* -Copyright (c) Members of the EGEE Collaboration. 2004-2010. -See http://www.eu-egee.org/partners for details on the copyright holders. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - /************************************************************************* * * $Id$ diff --git a/org.glite.lbjp-common.trio/src/strio.h b/org.glite.lbjp-common.trio/src/strio.h index d032ab5..68845a3 100644 --- a/org.glite.lbjp-common.trio/src/strio.h +++ b/org.glite.lbjp-common.trio/src/strio.h @@ -1,20 +1,3 @@ -/* -Copyright (c) Members of the EGEE Collaboration. 2004-2010. -See http://www.eu-egee.org/partners for details on the copyright holders. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - /************************************************************************* * * $Id$ diff --git a/org.glite.lbjp-common.trio/src/trio.c b/org.glite.lbjp-common.trio/src/trio.c index 94cc8af..7c939cf 100644 --- a/org.glite.lbjp-common.trio/src/trio.c +++ b/org.glite.lbjp-common.trio/src/trio.c @@ -1,21 +1,3 @@ -/* -Copyright (c) Members of the EGEE Collaboration. 2004-2010. -See http://www.eu-egee.org/partners for details on the copyright holders. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - /************************************************************************* * * $Id$ diff --git a/org.glite.lbjp-common.trio/src/triop.h b/org.glite.lbjp-common.trio/src/triop.h index 126e8a5..ca49fab 100644 --- a/org.glite.lbjp-common.trio/src/triop.h +++ b/org.glite.lbjp-common.trio/src/triop.h @@ -1,20 +1,3 @@ -/* -Copyright (c) Members of the EGEE Collaboration. 2004-2010. -See http://www.eu-egee.org/partners for details on the copyright holders. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - /************************************************************************* * * $Id$ -- 1.8.2.3