GNU bug report logs - #14845
dist-hook does not execute just before tar gzip

Previous Next

Package: automake;

Reported by: Mohan <dr_mohan <at> yahoo.com>

Date: Thu, 11 Jul 2013 22:41:02 UTC

Severity: minor

Tags: wontfix

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14845 in the body.
You can then email your comments to 14845 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-automake <at> gnu.org:
bug#14845; Package automake. (Thu, 11 Jul 2013 22:41:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mohan <dr_mohan <at> yahoo.com>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Thu, 11 Jul 2013 22:41:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mohan <dr_mohan <at> yahoo.com>
To: "bug-automake <at> gnu.org" <bug-automake <at> gnu.org>
Subject: dist-hook does not execute just before tar gzip
Date: Thu, 11 Jul 2013 15:30:57 -0700 (PDT)
[Message part 1 (text/plain, inline)]
As per the documentation dist-hook is supposed to execute before the tar/gzip, but there are few other commands
that execute after dist-hook that effectively nullifies the effect of dist-hook

automake --version
automake (GNU automake) 1.11.1


autoconf --version
autoconf (GNU Autoconf) 2.63

dist-hook:
    $(shell find $(distdir) -name openhpi.conf -exec chmod 600 "{}" ";")

Here's the output of the make portion that is relevant


make  \
          top_distdir="openhpi-3.2.1" distdir="openhpi-3.2.1" \
          dist-hook
make[1]: Entering directory `/root/mohan/openhpi/openhpi_3.2.x_latest_to_compile'
make[1]: Nothing to be done for `dist-hook'.
make[1]: Leaving directory `/root/mohan/openhpi/openhpi_3.2.x_latest_to_compile'
test -n "" \
        || find "openhpi-3.2.1" -type d ! -perm -755 \
                -exec chmod u+rwx,go+rx {} \; -o \
          ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -444 -exec /bin/sh /root/mohan/openhpi/openhpi_3.2.x_latest_to_compile/install-sh -c -m a+r {} {} \; \
        || chmod -R a+r "openhpi-3.2.1"
tardir=openhpi-3.2.1 && /bin/sh /root/mohan/openhpi/openhpi_3.2.x_latest_to_compile/missing --run tar chof - "$tardir" | GZIP=--best gzip -c >openhpi-3.2.1.tar.gz
{ test ! -d "openhpi-3.2.1" || { find "openhpi-3.2.1" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -fr "openhpi-3.2.1"; }; }


Problem
I want to make sure a file in the distribution is set to 600 or 400 permission. But that is not happening as read permission is turned on for all the files after dist-hook, but before GZIP.
[Message part 2 (text/html, inline)]

Information forwarded to bug-automake <at> gnu.org:
bug#14845; Package automake. (Sun, 21 Jul 2013 17:55:01 GMT) Full text and rfc822 format available.

Message #8 received at 14845 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Mohan <dr_mohan <at> yahoo.com>
Cc: 14845 <at> debbugs.gnu.org
Subject: Re: bug#14845: dist-hook does not execute just before tar gzip
Date: Sun, 21 Jul 2013 18:54:36 +0100
severity 14845 minor
tags 14845 wontfix
close 14845
stop

Hi Mohan, thanks for the report, and sorry for the delay.

Unfortunately, I have decided that the bug you are reporting
is actually a desired behaviour (see below for a rationale),
so I'm not going to change it, and I'm closing this report as
"Won't Fix".  However, if you want, you are still free to
continue the discussion here, or to further argue you point.
Just make sure to keep the list in the loop.

On 07/11/2013 11:30 PM, Mohan wrote:
> As per the documentation dist-hook is supposed to execute before the tar/gzip, but there are few other commands
> that execute after dist-hook that effectively nullifies the effect of dist-hook
> 
> automake --version
> automake (GNU automake) 1.11.1
>
> autoconf --version
> autoconf (GNU Autoconf) 2.63
>
Wow, those are very old versions.  The next time you report a bug,
you should make sure to be using the latest version of the tools you
are reporting the bug against.  In this case, it's no big deal, since
the behavior you are seeing hasn't changes since Automake 1.11; but
in other cases, you might end up reporting a bug that has been
already fixed in the newest version, which would waste your time
and the maintainer's time.

> dist-hook:
>     $(shell find $(distdir) -name openhpi.conf -exec chmod 600 "{}" ";")
>
FWIW, this is a useless use of the $(shell) builtin; the above should be
more portably and more clearly written as:

    dist-hook:
        find $(distdir) -name openhpi.conf -exec chmod 600 "{}" ";"

> Here's the output of the make portion that is relevant
> 
> 
> make  \
>           top_distdir="openhpi-3.2.1" distdir="openhpi-3.2.1" \
>           dist-hook
> make[1]: Entering directory `/root/mohan/openhpi/openhpi_3.2.x_latest_to_compile'
> make[1]: Nothing to be done for `dist-hook'.
> make[1]: Leaving directory `/root/mohan/openhpi/openhpi_3.2.x_latest_to_compile'
> test -n "" \
>         || find "openhpi-3.2.1" -type d ! -perm -755 \
>                 -exec chmod u+rwx,go+rx {} \; -o \
>           ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
>           ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
>           ! -type d ! -perm -444 -exec /bin/sh /root/mohan/openhpi/openhpi_3.2.x_latest_to_compile/install-sh -c -m a+r {} {} \; \
>         || chmod -R a+r "openhpi-3.2.1"
> tardir=openhpi-3.2.1 && /bin/sh /root/mohan/openhpi/openhpi_3.2.x_latest_to_compile/missing --run tar chof - "$tardir" | GZIP=--best gzip -c >openhpi-3.2.1.tar.gz
> { test ! -d "openhpi-3.2.1" || { find "openhpi-3.2.1" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -fr "openhpi-3.2.1"; }; }
> 
> 
> Problem
> I want to make sure a file in the distribution is set to 600 or 400
> permission.
>
But Automake is a tool aimed at creating build systems that are compatible
with the GNU Coding Standards, and those standards explicitly mandate that
"all the files in the distribution must be world-readable, and directories
must be world-readable and world-searchable":

  <http://www.gnu.org/prep/standards/standards.html#Releases>

Enforcing this property in all Automake-created tarballs is thus a
feature rather than a limitation, and thus I'm not going to change
it (unless you give me a *very* good reason to do so).

> But that is not happening as read permission is turned on for
> all the files after dist-hook, but before GZIP.
> 

Best regards,
  Stefano




Severity set to 'minor' from 'normal' Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 21 Jul 2013 17:55:02 GMT) Full text and rfc822 format available.

Added tag(s) wontfix. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 21 Jul 2013 17:55:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 14845 <at> debbugs.gnu.org and Mohan <dr_mohan <at> yahoo.com> Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 21 Jul 2013 17:55:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 19 Aug 2013 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 303 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.