public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@xry111.site>
To: Dennis Clarke <dclarke@blastwave.org>, gcc-help@gcc.gnu.org
Subject: Re: one of those annoying little things
Date: Wed, 24 Aug 2022 13:20:38 +0800	[thread overview]
Message-ID: <d34f2afd191c1977f2febfc5e75109d24e58fbfd.camel@xry111.site> (raw)
In-Reply-To: <49c6528e-13d9-fcff-2046-6a0a167c3fea@blastwave.org>

Please make your subject more specific next time.  Anything can be an
annoying little thing :).

On Wed, 2022-08-24 at 00:21 -0400, Dennis Clarke via Gcc-help wrote:
> 
> Dear ALL :
> 
>      Not sure who else have been doing bootstraps on machines wherein the
> common sense thing to do is protect the source tree. What I mean is that
> I extract the gcc 12.2.0 tarball of joy as the root user.

To whoever reading this: if you really want to do that, remember to use
--no-same-owner when you invoke tar to extract the tarball.  Or you may
leave some files or directories with UID = (the UID of whoever created
this tarball on his system).

/* snip */

> if makeinfo --split-size=5000000 --split-size=5000000 
> --split-size=5000000  --enable-encoding -I ../../../gcc-
> 12.2.0/mpfr/doc \
>   -o ../../../gcc-12.2.0/mpfr/doc/mpfr.info 
> ../../../gcc-12.2.0/mpfr/doc/mpfr.texi; \
> then \
>    rc=0; \
>    CDPATH="${ZSH_VERSION+.}:" && cd ../../../gcc-12.2.0/mpfr/doc; \
> else \
>    rc=$?; \
>    CDPATH="${ZSH_VERSION+.}:" && cd ../../../gcc-12.2.0/mpfr/doc && \
>    $restore $backupdir/* `echo 
> "./../../../gcc-12.2.0/mpfr/doc/mpfr.info" | sed 's|[^/]*$||'`; \
> fi; \
> rm -rf $backupdir; exit $rc
> mkdir: .am388: Permission denied
> ../../../gcc-12.2.0/mpfr/doc/mpfr.info: Permission denied

> Turns out, wild, but that directory for the mpfr doc stuff has files
> that no user has rights to other than root. That has to be a bug right?
> Could be the mpfr guys but hey this seems weird.

In MPFR Makefile.in there is:

$(srcdir)/mpfr.info: mpfr.texi $(mpfr_TEXINFOS)

and

mpfr_TEXINFOS = texinfo.tex fdl.texi

So mpfr.info is only regenerated if it does not exist, or its timestamp
is older than mpfr.texi, texinfo.tex, or fdl.texi.  This should not
happen if you extract mpfr from a release tarball, where:

2019-01-07 21:49 fdl.texi
2020-07-10 19:59 mpfr.info
2020-07-10 19:52 mpfr.texi
2020-04-14 19:12 texinfo.tex

We can see mpfr.info is already up-to-date so make should not regenerate
it.

Maybe your patch changed mpfr.texi (you forgot to add the URL of "[1]"
so I cannot know :), or you've messed up the timestamp of those files
somehow (one notable case: using "cp -r" to copy the MPFR source tree
can reset the timestamps to current system time).

I'll not call this a bug: if you, as a distributor, want to distribute
the MPFR source code to others, you should use "make dist" to generate a
tarball and distribute it, instead of providing others a "dirty" tree. 
This is how a package using autoconf/automake is distributed.

[GCC itself is an exception: we version control the generated files to
be included in the release tarball, instead of using "make dist" to
generate them on release.  But our approach for GCC also causes a
different kind of nasty issues (for example, if a generated file is
merged by git during a "git cherry-pick", the content will be likely
incorrect).]

And no matter it's a bug or not, there is nothing we can do on GCC side
because MPFR is not a part of GCC.

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

  reply	other threads:[~2022-08-24  5:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24  4:21 Dennis Clarke
2022-08-24  5:20 ` Xi Ruoyao [this message]
2022-08-24  8:27   ` Matthew R. Wilson
2022-08-24 16:51     ` Dennis Clarke
2022-08-24 18:04       ` Matthew R. Wilson
2022-08-24 19:23         ` Vincent Lefevre
2022-08-24 19:43           ` Dennis Clarke
2022-08-24 20:00           ` Vincent Lefevre
2022-08-24 11:26 ` Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d34f2afd191c1977f2febfc5e75109d24e58fbfd.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=dclarke@blastwave.org \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).