Bug 14885

Summary: LGPL'ed files contain incorrect FSF address
Product: WebKit Reporter: Mike Hommey <mh+webkit>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ddkilzer
Priority: P2 Keywords: EasyFix
Version: 523.x (Safari 3)   
Hardware: All   
OS: All   
Attachments:
Description Flags
script to do the fix
aroben: review+
Patch v1 (bzip2 compressed; 740+KB) none

Description Mike Hommey 2007-08-05 07:26:44 PDT
The LGPL'ed files contain the following text:
 * You should have received a copy of the GNU Library General Public License
 * along with this library; see the file COPYING.LIB.  If not, write to
 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.

This is the old address of the FSF. It should now be:
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
Comment 1 David Kilzer (:ddkilzer) 2007-08-05 20:14:26 PDT
Patches are welcome!  It would probably be best to write a small script to do the update.

Comment 2 Mike Hommey 2007-08-19 06:52:48 PDT
Here is a script that should fix all addresses error (there are also some occurrences of a typo in the correct address)
 find * -type f | while read f; do sed -i 's/59 Temple Place.*Suite 330/51 Franklin Street, Fifth Floor/; s/02111-1307/02110-1301/; s/\(51 Franklin St\)eet/\1reet/' $f; done
Comment 3 Mike Hommey 2007-09-12 12:58:05 PDT
Created attachment 16267 [details]
script to do the fix
Comment 4 Adam Roben (:aroben) 2007-09-22 13:42:42 PDT
Comment on attachment 16267 [details]
script to do the fix

Looks sane to me.
Comment 5 David Kilzer (:ddkilzer) 2007-09-23 08:06:03 PDT
Comment on attachment 16267 [details]
script to do the fix

>find * -type f | while read f; do sed -i 's/59 Temple Place.*Suite 330/51 Franklin Street, Fifth Floor/; s/02111-1307/02110-1301/; s/\(51 Franklin St\)eet/\1reet/' $f; done

NOTE: If this command is run on an svn working copy, it will corrupt files in .svn directories.  (If it were used on a git repository, you'd want to make sure you excluded the .git directory, which is probably why "find *" was used.)

Another way to write this would be:

find . -name .git -prune -o -name .svn -prune -o -type f -exec grep sed -i 's/59 Temple Place.*Suite 330/51 Franklin Street, Fifth Floor/; s/02111-1307/02110-1301/; s/\(51 Franklin St\)eet/\1reet/'  {} \;

Anyone who runs the script should do an "svn diff" (or git-diff) on the entire source tree to make sure there weren't any unexpected changes that happened.
Comment 6 David Kilzer (:ddkilzer) 2007-09-23 12:52:10 PDT
(In reply to comment #5)
> find . -name .git -prune -o -name .svn -prune -o -type f -exec grep sed -i
> 's/59 Temple Place.*Suite 330/51 Franklin Street, Fifth Floor/;
> s/02111-1307/02110-1301/; s/\(51 Franklin St\)eet/\1reet/'  {} \;

Except remove the extraneous 'grep' command.  (I blame muscle memory for that slipping in.)
Comment 7 David Kilzer (:ddkilzer) 2007-09-23 15:43:08 PDT
Created attachment 16365 [details]
Patch v1 (bzip2 compressed; 740+KB)

Here's a bzip2-compressed patch of the changes (740+KB uncompressed).  The sed(1) command in Attachment 16267 [details] had the side-effect of adding a newline to every file it touched (whether a change was made or not, including checksum and png files), so I did the following instead (using a git working copy):

$ find . -name .git -prune -o -type f -exec grep -l 'Free Software Foundation' {} \; > fsf.txt
$ for F in `cat fsf.txt`; do perl -p -i -e 's/59 Temple Place.*Suite 330/51 Franklin Street, Fifth Floor/; s/02111-1307/02110-1301/; s/\(51 Franklin St\)eet/\1reet/;' $F; done

To verify the fix, I also ran these commands (to make sure there were no results):
$ find . -name .git -prune -o -type f -exec grep -l '59 Temple Place' {} \;
$ find . -name .git -prune -o -type f -exec grep -l '02111-1307' {} \;
$ find . -name .git -prune -o -type f -exec grep -l '51 Franklin Steet' {} \;
Comment 8 David Kilzer (:ddkilzer) 2007-09-25 11:20:21 PDT
Comment on attachment 16365 [details]
Patch v1 (bzip2 compressed; 740+KB)

Clearing review flag since Adam already reviewed the original script.
Comment 9 David Kilzer (:ddkilzer) 2007-09-25 19:40:06 PDT
Committed revision 25754.
Comment 10 Mike Hommey 2007-11-03 01:30:52 PDT
The following files have been added in the meanwhile, with the wrong FSF address:
WebCore/platform/win/FontCustomPlatformData.h
WebCore/platform/win/FontCustomPlatformData.cpp
WebCore/platform/mac/FontCustomPlatformData.h
WebCore/platform/mac/FontCustomPlatformData.cpp
WebCore/rendering/RenderSVGTextPath.h
WebCore/rendering/RenderSVGRoot.h
WebCore/rendering/SVGCharacterLayoutInfo.h
WebCore/rendering/SVGCharacterLayoutInfo.cpp
WebCore/rendering/SVGRenderSupport.cpp
WebCore/rendering/RenderSVGTransformableContainer.h
WebCore/rendering/SVGRenderSupport.h
WebCore/rendering/RenderSVGViewportContainer.h
WebCore/rendering/RenderSVGTextPath.cpp
WebCore/rendering/RenderSVGViewportContainer.cpp
WebCore/rendering/RenderSVGRoot.cpp
WebCore/ksvg2/svg/SVGTextPathElement.cpp
WebCore/ksvg2/svg/SVGViewSpec.cpp
WebCore/ksvg2/svg/SVGViewSpec.h
WebCore/ksvg2/svg/SVGTextPathElement.h
WebCore/bindings/js/JSSVGTransformListCustom.cpp
Comment 11 David Kilzer (:ddkilzer) 2007-11-03 06:50:14 PDT
(In reply to comment #10)
> The following files have been added in the meanwhile, with the wrong FSF
> address:
> WebCore/platform/win/FontCustomPlatformData.h
> WebCore/platform/win/FontCustomPlatformData.cpp
> WebCore/platform/mac/FontCustomPlatformData.h
> WebCore/platform/mac/FontCustomPlatformData.cpp
> WebCore/rendering/RenderSVGTextPath.h
> WebCore/rendering/RenderSVGRoot.h
> WebCore/rendering/SVGCharacterLayoutInfo.h
> WebCore/rendering/SVGCharacterLayoutInfo.cpp
> WebCore/rendering/SVGRenderSupport.cpp
> WebCore/rendering/RenderSVGTransformableContainer.h
> WebCore/rendering/SVGRenderSupport.h
> WebCore/rendering/RenderSVGViewportContainer.h
> WebCore/rendering/RenderSVGTextPath.cpp
> WebCore/rendering/RenderSVGViewportContainer.cpp
> WebCore/rendering/RenderSVGRoot.cpp
> WebCore/ksvg2/svg/SVGTextPathElement.cpp
> WebCore/ksvg2/svg/SVGViewSpec.cpp
> WebCore/ksvg2/svg/SVGViewSpec.h
> WebCore/ksvg2/svg/SVGTextPathElement.h
> WebCore/bindings/js/JSSVGTransformListCustom.cpp

Fixed in r27395.

Also fixed these for good measure:

WebKitSite/blog/wp-includes/class-snoopy.php
WebKitSite/blog/wp-includes/gettext.php
WebKitSite/blog/wp-includes/streams.php

Note that we do take git-formatted patches now.  Please open new bugs in the future.  Thanks!