Bug 13673

Summary: fix for incorrect FSF snail mail addresses
Product: glibc Reporter: Paul Eggert <eggert>
Component: libcAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal Flags: fweimer: security-
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Attachments: patch for incorrect FSF snail mail addresses
patch for nptl/ChangeLog and localedata/ChangeLog
patch for Yacc input and output file
Patch for gperf input and output files
patch for locale files
patch for misc. files, mostly .S files
revised patch for gperf input and output files
glibc-ports patch for snail mail address
patch gmp-mparam.h too

Description Paul Eggert 2012-02-07 23:52:10 UTC
Created attachment 6201 [details]
patch for incorrect FSF snail mail addresses

The glibc sources contain 6,290 incorrect snail-mail
addresses for the FSF.  They're incorrect because the FSF
has moved.  Rather than fix them, it's better to replace
them with a stable URL, so that we don't have to change them
the next time the FSF moves.  This is what the GNU coding
standards recommend these days.

I'm attaching a patch to do this.  I generated it partly by
hand, so it'd be nice if it got folded into the trunk before
it got too stale.  The patch is large (about 4 MB), so I've
attached it compressed.

The patch contains three parts.  The first part is the bulk
of of the patch, and patches only comments.  Here's an
example:

	--- a/Makeconfig
	+++ b/Makeconfig
	@@ -13,9 +13,8 @@
	 # Lesser General Public License for more details.

	 # You should have received a copy of the GNU Lesser General Public
	-# License along with the GNU C Library; if not, write to the Free
	-# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
	-# 02111-1307 USA.
	+# License along with the GNU C Library; if not, see
	+# <http://www.gnu.org/licenses/>.

	 #
	 #	Makefile configuration options for the GNU C library.

The second part patches locale data, e.g.:

	--- a/localedata/locales/br_FR@euro
	+++ b/localedata/locales/br_FR@euro
	@@ -14,7 +14,7 @@
	 LC_IDENTIFICATION
	 title      "Breton locale for France with Euro"
	 source     "Free Software Foundation, Inc."
	-address    "59 Temple Place - Suite 330, Boston, MA 02111-1307, USA"
	+address    "http://www.gnu.org/software/libc/"
	 email      "bug-glibc-locales@gnu.org"
	 tel        ""
	 fax        ""

The last part patches the manual, as follows:

	--- a/manual/libc.texinfo
	+++ b/manual/libc.texinfo
	@@ -68,9 +68,7 @@
	 @insertcopying

	 @sp 2
	-Published by the Free Software Foundation @*
	-59 Temple Place -- Suite 330, @*
	-Boston, MA 02111-1307 USA @*
	+Published by the @uref{http://www.fsf.org/, Free Software Foundation} @*
	 @c ISBN @value{ISBN} @*

	 @sp 2
Comment 1 Paul Eggert 2012-02-07 23:55:36 UTC
Comment on attachment 6201 [details]
patch for incorrect FSF snail mail addresses

changing MIME type from text/plain to application/octet-stream
Comment 2 jsm-csl@polyomino.org.uk 2012-02-08 00:02:38 UTC
Some of the changed files came from GNU MP - have the copies there been 
updated?  Some in intl/ are, I think, maintained primarily in gettext - 
the same question applies.

nptl/ and localedata/ have their own ChangeLogs.
Comment 3 Paul Eggert 2012-02-08 00:11:38 UTC
I'll send a similar bug report to the GNU MP and gettext projects
at some point.

I'll attach a patch to the two ChangeLogs that Joseph mentioned.
Comment 4 Paul Eggert 2012-02-08 00:13:13 UTC
Created attachment 6202 [details]
patch for nptl/ChangeLog and localedata/ChangeLog
Comment 5 jsm-csl@polyomino.org.uk 2012-02-09 23:25:56 UTC
I have reviewed the patch, as far as one can review a 100000-line patch, 
and committed most of it (all the changes would individually be considered 
obvious).  I omitted the following parts:

* config.sub, config.guess: these files should only ever be updated 
verbatim from upstream config.git, not changed locally.

* intl/plural.[cy], locale/programs/{charmap,locfile}-kw.{h,gperf}: it 
appears that the generated files in these pairs had just had the same 
substitution applied as the source files, which is not correct as a I 
think a regeneration would also change #line directives to reflect that 
the license notices are now one line shorter.

Several files had changes removing blank lines at the end of the file.  I 
left those changes in, but please try to avoid including such unrelated 
changes in future.

You may wish to do a followup to change the files with generated outputs 
correctly (actually regenerating the output) and to change files that are 
new since your first patch.  Also, perhaps you could share your automation 
for producing this patch so it can be used for ports, or do a 
corresponding patch for ports (where one file has the even older 675 Mass 
Ave address)?

Please also update gettext, GMP and libidn upstream with changes 
corresponding to those made in libc to files from those projects.
Comment 6 jsm-csl@polyomino.org.uk 2012-02-10 00:10:41 UTC
I've reverted the changes to locale files because they caused errors of 
the form:

./locales/de_DE:9: unterminated string
./locales/de_DE:9: LC_IDENTIFICATION: unknown character in field `address'
Charmap: "ISO-8859-1" Inputfile: "de_DE" Outputdir: "de_DE.ISO-8859-1" failed

when running the testsuite.  More evidence that even if a patch seems 
obvious you should test it before submitting it....

(It looks like this comes from "escape_char /" in the locale files ... 
feel free to resubmit a fixed and tested patch.)
Comment 7 Joseph Myers 2012-03-08 16:44:46 UTC
WAITING pending a new patch for the cases I mentioned as excluded or reverted (and a patch, or sharing the automation to produce one, for the ports repository).
Comment 8 Paul Eggert 2012-03-09 08:19:08 UTC
Created attachment 6277 [details]
patch for Yacc input and output file

This is an updated patch for intl/plural.y.  It also updates intl/plural.c, the generated file.
Comment 9 Paul Eggert 2012-03-09 08:20:12 UTC
Created attachment 6278 [details]
Patch for gperf input and output files

This is a patch for gperf input files, which also patches the corresponding output files.
Comment 10 Paul Eggert 2012-03-09 08:21:34 UTC
Created attachment 6279 [details]
patch for locale files

This is a patch for the locale files.  It corrects the previous attempt to fix the problem, by doubling each instance of "/" in the address strings.
Comment 11 Paul Eggert 2012-03-09 08:23:26 UTC
Created attachment 6280 [details]
patch for misc. files, mostly .S files

This is a patch for other files that I found the Boston address in. As far as I know these files are not imported from elsewhere so they can be fixed here (but then, I don't know exactly which files are imported).
Comment 12 Paul Eggert 2012-03-09 08:27:32 UTC
I've added four patches just now.  The first three try to address Joseph's review in comments 5 and 6.  The fourth address all the files that I didn't otherwise see addressed.

I don't use any automation for these patches, other than throwaway Emacs macros, so I'm afraid there's no technology to share.  I suppose I could do a patch for ports, but I don't know how to get the ports source files, or how to test the result -- can you please advise?
Comment 13 jsm-csl@polyomino.org.uk 2012-03-09 13:31:17 UTC
http://sourceware.org/glibc/wiki/GlibcGit

describes how to check out ports:

git clone git://sourceware.org/git/glibc-ports.git

Each ports architecture, plus sysdeps/unix/sysv/linux/generic, has its own 
ChangeLog, but for this sort of mechanical patch it's probably not worth 
splitting up the patch itself by architecture.  I don't think there are 
any files in ports that are generated files or imported verbatim from 
elsewhere.
Comment 14 jsm-csl@polyomino.org.uk 2012-03-09 17:34:43 UTC
On Fri, 9 Mar 2012, eggert at gnu dot org wrote:

> Patch for gperf input and output files
> 
> This is a patch for gperf input files, which also patches the corresponding
> output files.

This appears to duplicate the word "License" in the license notices.
Comment 15 Paul Eggert 2012-03-09 18:22:37 UTC
Created attachment 6281 [details]
revised patch for gperf input and output files

oops oops....  I have attached a corrected version of the gperf-related patch, one that doesn't say "License License".
Comment 16 Paul Eggert 2012-03-09 20:08:37 UTC
Created attachment 6282 [details]
glibc-ports patch for snail mail address

Thanks for the info about glibc-ports.  I'm attaching a patch for glibc-ports.
It's 18,000 lines long, so I'm compressing it.

One way to review it which is a bit less mind-numbing, is to filter it
through this shell command:

grep '^[-+]' | grep -vE '^(--- |\+\+\+ )' | sort | uniq -c | sort -rn

This outputs each unique instance of an old (-) and new (-) line, together
with a count of the number of instances.  You can ignore this trailing bit:

      1 ---
      1 -- 

as that's an artifact of "git format-patch".
Comment 17 jsm-csl@polyomino.org.uk 2012-03-10 00:01:24 UTC
I have reviewed and committed the ports patch.  Port maintainers may wish 
to test their ports build to make sure there are no nonobvious causes of 
breakage missed in the review, but it seemed best to get this issue 
completely fixed (well ... it appears sysdeps/mips/mips64/gmp-mparam.h was 
missed by the patch) rather than leaving it indefinitely to get 
maintainers of eight different ports, with varying activity levels, to fix 
their ports individually.
Comment 18 Joseph Myers 2012-03-10 00:47:08 UTC
I have reviewed, tested and committed the libc patches; the only bit left is, I think, sysdeps/mips/mips64/gmp-mparam.h in ports.
Comment 19 Paul Eggert 2012-03-10 07:19:24 UTC
Created attachment 6283 [details]
patch gmp-mparam.h too

> sysdeps/mips/mips64/gmp-mparam.h was missed by the patch

Sorry.  I used "Boston" to find the copyright notices, and that
file is the only one that used "Cambridge".  I'm attaching
a small proposed patch to clean up that glitch.
Comment 20 Joseph Myers 2012-03-10 13:10:51 UTC
Thanks, I've committed that last patch.