From unknown Tue Jun 17 01:35:09 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#14845 <14845@debbugs.gnu.org> To: bug#14845 <14845@debbugs.gnu.org> Subject: Status: dist-hook does not execute just before tar gzip Reply-To: bug#14845 <14845@debbugs.gnu.org> Date: Tue, 17 Jun 2025 08:35:09 +0000 retitle 14845 dist-hook does not execute just before tar gzip reassign 14845 automake submitter 14845 Mohan severity 14845 minor tag 14845 wontfix thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 11 18:40:52 2013 Received: (at submit) by debbugs.gnu.org; 11 Jul 2013 22:40:53 +0000 Received: from localhost ([127.0.0.1]:48707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UxPXf-0007Ju-DI for submit@debbugs.gnu.org; Thu, 11 Jul 2013 18:40:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44905) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UxPOK-00070Q-9t for submit@debbugs.gnu.org; Thu, 11 Jul 2013 18:31:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UxPOC-0002af-Mn for submit@debbugs.gnu.org; Thu, 11 Jul 2013 18:31:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.2 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_XBL,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:54689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxPOC-0002ab-Kc for submit@debbugs.gnu.org; Thu, 11 Jul 2013 18:31:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46591) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxPOA-0002rU-6R for bug-automake@gnu.org; Thu, 11 Jul 2013 18:31:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UxPO7-0002ZT-H7 for bug-automake@gnu.org; Thu, 11 Jul 2013 18:31:02 -0400 Received: from nm46-vm6.bullet.mail.gq1.yahoo.com ([67.195.87.174]:43713) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxPO7-0002ZD-4t for bug-automake@gnu.org; Thu, 11 Jul 2013 18:30:59 -0400 Received: from [216.39.60.182] by nm46.bullet.mail.gq1.yahoo.com with NNFMP; 11 Jul 2013 22:30:58 -0000 Received: from [98.137.12.192] by tm18.bullet.mail.gq1.yahoo.com with NNFMP; 11 Jul 2013 22:30:58 -0000 Received: from [127.0.0.1] by omp1000.mail.gq1.yahoo.com with NNFMP; 11 Jul 2013 22:30:58 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 138349.82221.bm@omp1000.mail.gq1.yahoo.com Received: (qmail 82072 invoked by uid 60001); 11 Jul 2013 22:30:58 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1373581858; bh=ix1xoHWAz54fyAtkAuJqxXv6jAH312f1vgwgg2Nkg5g=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=5UXhGBTd7UGrnHohNJM+MhG9EeGbYpn5JszPZYjWYSncl1D171gOtVjt2ydTTprJunRcOmVCqWtfC3yfJWxIb9vhFB4SDMiW5ICAPvmgHy1qynBpqUWLkuNAW3R6Jevqe/Hnr3lEYCRUoNRZmOE3m0fw++qom1EU0+ny6bmrg7Y= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=VIhQLyESzg1GaDcEJV5hR4I5/QEoPM9jhXPZsYdvs7ctIAaUH4j+j3sGc/96HxvoK4x0HNLZxMTN6VhHx2l//rdHZVY5vUNgR5ZYcUWHhrhjOkPD1t5zmNzi/cgpW+cv5yuUMzPe4+9t7wD5OFlF5rmiPGzNOzOUgeA88Xwh3bI= ; X-YMail-OSG: 1ggdOOcVM1mdv5aMkFCvX2.NH6Jv4ESX2y9qME.5LjWEXHC LcDOFHTMnUTHoPyigCbJe Received: from [15.203.233.77] by web163506.mail.gq1.yahoo.com via HTTP; Thu, 11 Jul 2013 15:30:57 PDT X-Rocket-MIMEInfo: 002.001, QXMgcGVyIHRoZSBkb2N1bWVudGF0aW9uIGRpc3QtaG9vayBpcyBzdXBwb3NlZCB0byBleGVjdXRlIGJlZm9yZSB0aGUgdGFyL2d6aXAsIGJ1dCB0aGVyZSBhcmUgZmV3IG90aGVyIGNvbW1hbmRzCnRoYXQgZXhlY3V0ZSBhZnRlciBkaXN0LWhvb2sgdGhhdCBlZmZlY3RpdmVseSBudWxsaWZpZXMgdGhlIGVmZmVjdCBvZiBkaXN0LWhvb2sKCmF1dG9tYWtlIC0tdmVyc2lvbgphdXRvbWFrZSAoR05VIGF1dG9tYWtlKSAxLjExLjEKCgphdXRvY29uZiAtLXZlcnNpb24KYXV0b2NvbmYgKEdOVSBBdXRvY29uZikgMi4BMAEBAQE- X-Mailer: YahooMailWebService/0.8.148.557 Message-ID: <1373581857.81826.YahooMailNeo@web163506.mail.gq1.yahoo.com> Date: Thu, 11 Jul 2013 15:30:57 -0700 (PDT) From: Mohan Subject: dist-hook does not execute just before tar gzip To: "bug-automake@gnu.org" MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-895122751-1815771023-1373581857=:81826" X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 11 Jul 2013 18:40:48 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Mohan List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) ---895122751-1815771023-1373581857=:81826 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable As per the documentation dist-hook is supposed to execute before the tar/gz= ip, but there are few other commands=0Athat execute after dist-hook that ef= fectively nullifies the effect of dist-hook=0A=0Aautomake --version=0Aautom= ake (GNU automake) 1.11.1=0A=0A=0Aautoconf --version=0Aautoconf (GNU Autoco= nf) 2.63=0A=0Adist-hook:=0A=A0=A0=A0 $(shell find $(distdir) -name openhpi.= conf -exec chmod 600 "{}" ";")=0A=0AHere's the output of the make portion t= hat is relevant=0A=0A=0Amake=A0 \=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0 top_distdir= =3D"openhpi-3.2.1" distdir=3D"openhpi-3.2.1" \=0A=A0=A0=A0=A0=A0=A0=A0=A0= =A0 dist-hook=0Amake[1]: Entering directory `/root/mohan/openhpi/openhpi_3.= 2.x_latest_to_compile'=0Amake[1]: Nothing to be done for `dist-hook'.=0Amak= e[1]: Leaving directory `/root/mohan/openhpi/openhpi_3.2.x_latest_to_compil= e'=0Atest -n "" \=0A=A0=A0=A0=A0=A0=A0=A0 || find "openhpi-3.2.1" -type d != -perm -755 \=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 -exec chmod u= +rwx,go+rx {} \; -o \=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0 ! -type d ! -perm -444 = -links 1 -exec chmod a+r {} \; -o \=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0 ! -type d= ! -perm -400 -exec chmod a+r {} \; -o \=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0 ! -t= ype d ! -perm -444 -exec /bin/sh /root/mohan/openhpi/openhpi_3.2.x_latest_t= o_compile/install-sh -c -m a+r {} {} \; \=0A=A0=A0=A0=A0=A0=A0=A0 || chmod = -R a+r "openhpi-3.2.1"=0Atardir=3Dopenhpi-3.2.1 && /bin/sh /root/mohan/open= hpi/openhpi_3.2.x_latest_to_compile/missing --run tar chof - "$tardir" | GZ= IP=3D--best gzip -c >openhpi-3.2.1.tar.gz=0A{ test ! -d "openhpi-3.2.1" || = { find "openhpi-3.2.1" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -f= r "openhpi-3.2.1"; }; }=0A=0A=0AProblem=0AI 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.=0A ---895122751-1815771023-1373581857=:81826 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
As per the docum= entation dist-hook is supposed to execute before the tar/gzip, but there ar= e few other commands
that execute after dist-hook that effectivel= y nullifies the effect of dist-hook

automake --ver= sion
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 th= e output of the make portion that is relevant

make  \
 = ;         top_distdir=3D"openhpi-3.= 2.1" distdir=3D"openhpi-3.2.1" \
      &nb= sp;   dist-hook
make[1]: Entering directory `/root/mohan/openh= pi/openhpi_3.2.x_latest_to_compile'
make[1]: Nothing to be done for `dis= t-hook'.
make[1]: Leaving directory `/root/mohan/openhpi/openhpi_3.2.x_latest_to_compile'
test -n "" \
&= nbsp;       || find "openhpi-3.2.1" -type d != -perm -755 \
         &nbs= p;      -exec chmod u+rwx,go+rx {} \; -o \
&nbs= p;         ! -type d ! -perm -444 -= links 1 -exec chmod a+r {} \; -o \
      &= nbsp;   ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
&nbs= p;         ! -type d ! -perm -444 -= exec /bin/sh /root/mohan/openhpi/openhpi_3.2.x_latest_to_compile/install-sh= -c -m a+r {} {} \; \
        || chmo= d -R a+r "openhpi-3.2.1"
tardir=3Dopenhpi-3.2.1 && /bin/sh /root= /mohan/openhpi/openhpi_3.2.x_latest_to_compile/missing --run tar chof - "$t= ardir" | GZIP=3D--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 su= re 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.
---895122751-1815771023-1373581857=:81826-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 21 13:54:50 2013 Received: (at 14845) by debbugs.gnu.org; 21 Jul 2013 17:54:50 +0000 Received: from localhost ([127.0.0.1]:41145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V0xqL-0004tl-Mm for submit@debbugs.gnu.org; Sun, 21 Jul 2013 13:54:50 -0400 Received: from mail-we0-f171.google.com ([74.125.82.171]:50860) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V0xqH-0004tM-CO; Sun, 21 Jul 2013 13:54:48 -0400 Received: by mail-we0-f171.google.com with SMTP id q55so1312926wes.2 for ; Sun, 21 Jul 2013 10:54:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=dDxcvfCUIX6D6NFAb36KmFSLAVlUzF5XrFK3z/2ffzI=; b=aZbsatMa0YnwBNYODJMvQuQH69bW+mCGpn2wexnfMcf1WgCSRfU6g9yqofdTSYrK/p hvRAGkpEnUgdriTFeYsnvI/HMpUjO4Ama86pTzNzOAeNxsyWsTMNWriJQ4pyZckuqtCy tUjBIbHKxtm0HKyDaA72lwucgTWex9zYpjBUT82qpGFPZOCMKwf3eZZwpQoZLcKnAOjC Tze59UB72q9B/lctG2pIytS6RpOfvFlikp3iPDFqNurSWl8xfLvUnTUJ+fMXJvuPu2yb Lh8e+pvcrH5xhfUwdRcHRJYoOIlXNPQbsvJi/BlgdT4k3Nq85cZ2Cr1m0U/5mtq6chxS 9DYw== X-Received: by 10.194.172.228 with SMTP id bf4mr16833877wjc.36.1374429279171; Sun, 21 Jul 2013 10:54:39 -0700 (PDT) Received: from [192.168.104.203] ([79.140.211.94]) by mx.google.com with ESMTPSA id ev19sm35696698wid.2.2013.07.21.10.54.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 21 Jul 2013 10:54:38 -0700 (PDT) Message-ID: <51EC205C.80201@gmail.com> Date: Sun, 21 Jul 2013 18:54:36 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: Mohan Subject: Re: bug#14845: dist-hook does not execute just before tar gzip References: <1373581857.81826.YahooMailNeo@web163506.mail.gq1.yahoo.com> In-Reply-To: <1373581857.81826.YahooMailNeo@web163506.mail.gq1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 14845 Cc: 14845@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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": 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 From unknown Tue Jun 17 01:35:09 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 19 Aug 2013 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator