Subject: Re: bug#10878: "make dist" with read-only srcdir generates read-only tarball

From: Eric Blake <[email-masked]>
Date: Fri, 24 Feb 2012 09:12:54 -0700

On 02/24/2012 08:09 AM, Nick Bowler wrote:
> Hi,
> 
> When using a read-only srcdir, "make dist" will generate a tarball whose
> permissions have all files read-only (though directories are writable).
> I noticed this because "dist-hook" targets cannot actually modify any
> files in distdir as they're all read-only (without first running chmod,
> anyway), causing distcheck failures.  While the GNU coding standards do
> not demand write permissions on files in distribution tarballs (I'm not
> really sure why), Automake's behaviour in the build directory should not
> depend on whether or not srcdir is writable.
> 
> Tested with both automake-1.11.1 and git master.

> 
>   (notice that user write permissions are missing)
> 
> Automake should at least add user write permissions to all files in
> distdir prior to running dist-hook (and hence prior to generating the
> distribution tarball).

Automake must not add write permissions to files that were intended to
be shipped as read-only.  For example, coreutils intentionally converts
generated-but-distributed files to read-only, so that users are more
likely to notice that they should edit the source that generates the
file, and not the generated file itself.

So how do you propose to tell automake which files are supposed to be
read-only, vs. those that should be writable even if the tarball was
re-created from a read-only srcdir?

-- 
Eric Blake   [email-masked]    +1-919-301-3266
Libvirt virtualization library http://libvirt.org