From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 06 12:13:44 2013 Received: (at submit) by debbugs.gnu.org; 6 Apr 2013 16:13:44 +0000 Received: from localhost ([127.0.0.1]:37030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UOVkN-000548-DH for submit@debbugs.gnu.org; Sat, 06 Apr 2013 12:13:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41097) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UOSFC-0008FX-H3 for submit@debbugs.gnu.org; Sat, 06 Apr 2013 08:29:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UOSBu-0006XG-LG for submit@debbugs.gnu.org; Sat, 06 Apr 2013 08:25:57 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-101.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:40004) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOSBu-0006XC-DG for submit@debbugs.gnu.org; Sat, 06 Apr 2013 08:25:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOSBs-0006Gc-GA for bug-coreutils@gnu.org; Sat, 06 Apr 2013 08:25:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UOSBp-0006V2-TY for bug-coreutils@gnu.org; Sat, 06 Apr 2013 08:25:52 -0400 Received: from moutng.kundenserver.de ([212.227.126.171]:65384) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOSBp-0006U9-DP for bug-coreutils@gnu.org; Sat, 06 Apr 2013 08:25:49 -0400 Received: from mail.bigo.ensc.de (p54ADEAEA.dip.t-dialin.net [84.173.234.234]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0M21dP-1UjIOI2CqJ-00u3NS; Sat, 06 Apr 2013 14:25:45 +0200 Received: from sheridan.bigo.ensc.de (sheridan.bigo.ensc.de [192.168.46.11]) by mail.bigo.ensc.de (8.14.4/8.14.4) with ESMTP id r36CO46i004141; Sat, 6 Apr 2013 14:24:05 +0200 Received: from ensc by sheridan.bigo.ensc.de with local (Exim 4.80.1) (envelope-from ) id 1UOSA8-0008OQ-7R; Sat, 06 Apr 2013 14:24:04 +0200 From: Enrico Scholz To: bug-coreutils@gnu.org Subject: [PATCH] build: use 'chmod a-w' instead of 'chmod -w' Date: Sat, 6 Apr 2013 14:23:59 +0200 Message-Id: <1365251039-32081-1-git-send-email-enrico.scholz@informatik.tu-chemnitz.de> X-Mailer: git-send-email 1.8.1.4 X-Provags-ID: V02:K0:8SQKZOi5X7qsINYZztLYyhbFq8Ve4tOKyWC1Z49+N70 wsuLSLOCKL6LzF2+bpIqkjgEtiD8DmRhBNKFF/UMq4pgBgT1+I q0ZG6WQGT9Rhu3b5GWelzbtrONIjtyDM8s1yCXubsBlZIsQDAd KbJ38L4tldjWihoHbc5DkpODvlovZdl8enrBQjnVgDY2UB10fI hjuns2O05gtJoOgwzyymIUQgRV52zKhvCIkxVJDE7Ix0Ejk6FY YRy9lM0UCal4fCPZy63qhhiC/xzNCgJViL/3XC8rz8HNAX3qEq RFhBmIqGvldhZ7TMhiOpHLvo0gT6p1cfegcNW1WpQUtBFURmAb rewlQBU+B+X+8olTOzYS0n+KMk1l3FpvIi/kAxudvlylzx9X5n uDZ9jSLCrV/RrhGpBnrD9stdYbJ+6sfrVzQBd45/lfzCoKk3zx h5sOm X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 06 Apr 2013 12:13:42 -0400 Cc: Enrico Scholz X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) 'chmod -w' is not portable and breaks the build: | WARNING: Cannot create proper 'hostid.1' man page, since perl is missing or | WARNING: inadequate on this system. Creating a stub man page instead. | chmod: man/hostid.1-t: new permissions are r--rw-r--, not r--r--r-- | make[2]: *** [man/hostid.1] Error 1 Signed-off-by: Enrico Scholz --- man/local.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/local.mk b/man/local.mk index b5e6e21..53debad 100644 --- a/man/local.mk +++ b/man/local.mk @@ -192,5 +192,5 @@ man/yes.1: src/yes --output=$$t/$$name.1 $$t/$$name \ && sed 's|$*\.td/||g' $$t/$$name.1 > $@-t \ && rm -rf $$t \ - && chmod -w $@-t \ + && chmod a-w $@-t \ && mv $@-t $@ -- 1.8.1.4 From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 06 15:01:59 2013 Received: (at 14152) by debbugs.gnu.org; 6 Apr 2013 19:01:59 +0000 Received: from localhost ([127.0.0.1]:37190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UOYNC-0000a6-AP for submit@debbugs.gnu.org; Sat, 06 Apr 2013 15:01:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47368) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UOYN9-0000Zx-BJ for 14152@debbugs.gnu.org; Sat, 06 Apr 2013 15:01:56 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r36IwUS5026927 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 6 Apr 2013 14:58:31 -0400 Received: from [10.36.116.17] (ovpn-116-17.ams2.redhat.com [10.36.116.17]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r36IwRXa023261 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 6 Apr 2013 14:58:29 -0400 Message-ID: <51607052.5040708@draigBrady.com> Date: Sat, 06 Apr 2013 19:58:26 +0100 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Enrico Scholz Subject: Re: bug#14152: [PATCH] build: use 'chmod a-w' instead of 'chmod -w' References: <1365251039-32081-1-git-send-email-enrico.scholz@informatik.tu-chemnitz.de> In-Reply-To: <1365251039-32081-1-git-send-email-enrico.scholz@informatik.tu-chemnitz.de> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id r36IwUS5026927 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 14152 Cc: 14152@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) On 04/06/2013 01:23 PM, Enrico Scholz wrote: > 'chmod -w' is not portable and breaks the build: >=20 > | WARNING: Cannot create proper 'hostid.1' man page, since perl is miss= ing or > | WARNING: inadequate on this system. Creating a stub man page instead. > | chmod: man/hostid.1-t: new permissions are r--rw-r--, not r--r--r-- > | make[2]: *** [man/hostid.1] Error 1 >=20 > Signed-off-by: Enrico Scholz > --- > man/local.mk | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/man/local.mk b/man/local.mk > index b5e6e21..53debad 100644 > --- a/man/local.mk > +++ b/man/local.mk > @@ -192,5 +192,5 @@ man/yes.1: src/yes > --output=3D$$t/$$name.1 $$t/$$name \ > && sed 's|$*\.td/||g' $$t/$$name.1 > $@-t \ > && rm -rf $$t \ > - && chmod -w $@-t \ > + && chmod a-w $@-t \ > && mv $@-t $@ >=20 I'll apply that fix. What system does the build fail on as a matter of interest. thanks! P=E1draig. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 06 18:31:08 2013 Received: (at 14152) by debbugs.gnu.org; 6 Apr 2013 22:31:08 +0000 Received: from localhost ([127.0.0.1]:37394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UObdb-0006PP-OX for submit@debbugs.gnu.org; Sat, 06 Apr 2013 18:31:08 -0400 Received: from joseki.proulx.com ([216.17.153.58]:50625) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UObdT-0006Or-T7 for 14152@debbugs.gnu.org; Sat, 06 Apr 2013 18:31:06 -0400 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 08EFF211D5; Sat, 6 Apr 2013 16:27:35 -0600 (MDT) Received: by hysteria.proulx.com (Postfix, from userid 1000) id A969D2DC3E; Sat, 6 Apr 2013 16:27:35 -0600 (MDT) Date: Sat, 6 Apr 2013 16:27:35 -0600 From: Bob Proulx To: 14152@debbugs.gnu.org Subject: Re: bug#14152: [PATCH] build: use 'chmod a-w' instead of 'chmod -w' Message-ID: <20130406222735.GA22989@hysteria.proulx.com> References: <1365251039-32081-1-git-send-email-enrico.scholz@informatik.tu-chemnitz.de> <51607052.5040708@draigBrady.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <51607052.5040708@draigBrady.com> User-Agent: Mutt/1.5.21 (2010-09-15) Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: 14152 Cc: Enrico Scholz X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.4 (--) P=E1draig Brady wrote: > > - && chmod -w $@-t \ > > + && chmod a-w $@-t \ >=20 > I'll apply that fix. I think it is always a good idea to use 'a' when there isn't any other specific reason to do anything different. Or put the reverse way, whenever I see a naken "-[rwx]" then I am suspicious of the action. Because it masks with umask and is almost never what is desired. > What system does the build fail on as a matter of interest. This will occur on any system that has umask set to 022. Here is an exam= ple: $ umask 022 $ touch foo $ chmod ug+w foo $ chmod -w foo chmod: foo: new permissions are r--rw-r--, not r--r--r-- $ echo $? 1 Bob From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 06 21:22:58 2013 Received: (at 14152-done) by debbugs.gnu.org; 7 Apr 2013 01:22:58 +0000 Received: from localhost ([127.0.0.1]:37538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UOeJt-00024l-M6 for submit@debbugs.gnu.org; Sat, 06 Apr 2013 21:22:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36874) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UOeJq-00024d-Ua for 14152-done@debbugs.gnu.org; Sat, 06 Apr 2013 21:22:56 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r371JTpq027586 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 6 Apr 2013 21:19:29 -0400 Received: from [10.36.116.21] (ovpn-116-21.ams2.redhat.com [10.36.116.21]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r371JPi0020185 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 6 Apr 2013 21:19:27 -0400 Message-ID: <5160C99D.6030804@draigBrady.com> Date: Sun, 07 Apr 2013 02:19:25 +0100 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Bob Proulx Subject: Re: bug#14152: [PATCH] build: use 'chmod a-w' instead of 'chmod -w' References: <1365251039-32081-1-git-send-email-enrico.scholz@informatik.tu-chemnitz.de> <51607052.5040708@draigBrady.com> <20130406222735.GA22989@hysteria.proulx.com> In-Reply-To: <20130406222735.GA22989@hysteria.proulx.com> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id r371JTpq027586 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 14152-done Cc: Enrico Scholz , 14152-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) On 04/06/2013 11:27 PM, Bob Proulx wrote: > P=E1draig Brady wrote: >>> - && chmod -w $@-t \ >>> + && chmod a-w $@-t \ >> >> I'll apply that fix. >=20 > I think it is always a good idea to use 'a' when there isn't any other > specific reason to do anything different. Or put the reverse way, > whenever I see a naken "-[rwx]" then I am suspicious of the action. > Because it masks with umask and is almost never what is desired. >=20 >> What system does the build fail on as a matter of interest. >=20 > This will occur on any system that has umask set to 022. Here is an ex= ample: >=20 > $ umask 022 > $ touch foo > $ chmod ug+w foo > $ chmod -w foo > chmod: foo: new permissions are r--rw-r--, not r--r--r-- > $ echo $? > 1 But if the umask is 022, then those write bits shouldn't be set anyway? You're forcing g+w above. thanks, P=E1draig. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 07 06:03:33 2013 Received: (at 14152-done) by debbugs.gnu.org; 7 Apr 2013 10:03:33 +0000 Received: from localhost ([127.0.0.1]:37988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UOmRg-0006yI-F7 for submit@debbugs.gnu.org; Sun, 07 Apr 2013 06:03:33 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:53012) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UOmRc-0006y7-Jp for 14152-done@debbugs.gnu.org; Sun, 07 Apr 2013 06:03:30 -0400 Received: from mail.bigo.ensc.de (p4FFCF1D3.dip.t-dialin.net [79.252.241.211]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0LzYuY-1Uce9H34vi-01504f; Sun, 07 Apr 2013 11:59:57 +0200 Received: from sheridan.bigo.ensc.de (sheridan.bigo.ensc.de [192.168.46.11]) by mail.bigo.ensc.de (8.14.4/8.14.4) with ESMTP id r379xsul029119; Sun, 7 Apr 2013 11:59:54 +0200 Received: from ensc by sheridan.bigo.ensc.de with local (Exim 4.80.1) (envelope-from ) id 1UOmO9-0005x5-8t; Sun, 07 Apr 2013 11:59:53 +0200 From: Enrico Scholz To: =?iso-8859-1?Q?P=E1draig?= Brady Subject: Re: bug#14152: [PATCH] build: use 'chmod a-w' instead of 'chmod -w' References: <1365251039-32081-1-git-send-email-enrico.scholz@informatik.tu-chemnitz.de> <51607052.5040708@draigBrady.com> <20130406222735.GA22989@hysteria.proulx.com> <5160C99D.6030804@draigBrady.com> Date: Sun, 07 Apr 2013 11:59:52 +0200 In-Reply-To: <5160C99D.6030804@draigBrady.com> (=?iso-8859-1?Q?=22P=E1drai?= =?iso-8859-1?Q?g?= Brady"'s message of "Sun, 07 Apr 2013 02:19:25 +0100") Message-ID: <87a9pak6ef.fsf@sheridan.bigo.ensc.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V02:K0:swllfymJQN5oxTDxxVMivzXsXZGd5aQNm0syG7FQH1o xw+Qm6CN3oE5KroYyQDu3QN9O48+hjW0oK+AcP7QNtaUdf8xnc ezk97YtfBflKmCSoDyxLeC8L2kg5BlARdSNXEu2N4tsDYgun2R ivacyVtUsoGEgQs6lEzbg72oDTOguS0tgWtDuh3AEOWAuBJJrV NPxIoyaHqgcW0sNwgX9f2Oo+zXypTP6ma09EmMtAAAJkYa1Dlv NjgiQKBt1nF3PPQX0xOc5GYHK4sDbBWA8d2jO2gJCv3CRFnBDi XhCYSm9RuZGU+Pc6rCFjmZOBdLVW/2caPXBiZJCfmoIHinQbKv 6N+Z7h+HQ0IWp0NcMLj3jgOIuc/HMeQJa2WVdBTEo X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 14152-done Cc: 14152-done@debbugs.gnu.org, Bob Proulx X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) P=E1draig Brady writes: >>> What system does the build fail on as a matter of interest. >>=20 >> This will occur on any system that has umask set to 022. Here is an exa= mple: >>=20 >> $ umask 022 >> $ touch foo >> $ chmod ug+w foo >> $ chmod -w foo >> chmod: foo: new permissions are r--rw-r--, not r--r--r-- >> $ echo $? >> 1 > > But if the umask is 022, then those write bits shouldn't be set anyway? These bits can be set due to various reasons; e.g. $ mkdir /tmp/foo $ setfacl -m d:m:rwx /tmp/foo $ umask 022 $ touch /tmp/foo/x $ chmod -w /tmp/foo/x chmod: /tmp/foo/x: new permissions are r--rw-r--, not r--r--r-- I use such a setup (posix defaults acls) to build foreign software as a special user while allowing working on the software (--> editing) as the normal user. Enrico From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 07 06:58:11 2013 Received: (at 14152) by debbugs.gnu.org; 7 Apr 2013 10:58:12 +0000 Received: from localhost ([127.0.0.1]:38030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UOnIZ-0008Hy-7d for submit@debbugs.gnu.org; Sun, 07 Apr 2013 06:58:11 -0400 Received: from mail3.vodafone.ie ([213.233.128.45]:55697) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UOnIW-0008Hq-J4 for 14152@debbugs.gnu.org; Sun, 07 Apr 2013 06:58:09 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjcDADBPYVFda1zH/2dsb2JhbAANRMRfAwGBFoMTAQEBBCcLAUYQCw0LCRYPCQMCAQIBRQYNAQUCAQGydZJZjkRfB4NBA50ajXQ Received: from unknown (HELO [192.168.1.79]) ([93.107.92.199]) by mail3.vodafone.ie with ESMTP; 07 Apr 2013 11:54:42 +0100 Message-ID: <51615071.4040406@draigBrady.com> Date: Sun, 07 Apr 2013 11:54:41 +0100 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Enrico Scholz Subject: Re: bug#14152: [PATCH] build: use 'chmod a-w' instead of 'chmod -w' References: <1365251039-32081-1-git-send-email-enrico.scholz@informatik.tu-chemnitz.de> <51607052.5040708@draigBrady.com> <20130406222735.GA22989@hysteria.proulx.com> <5160C99D.6030804@draigBrady.com> <87a9pak6ef.fsf@sheridan.bigo.ensc.de> In-Reply-To: <87a9pak6ef.fsf@sheridan.bigo.ensc.de> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 14152 Cc: 14152@debbugs.gnu.org, Bob Proulx X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 04/07/2013 10:59 AM, Enrico Scholz wrote: > Pádraig Brady writes: > >>>> What system does the build fail on as a matter of interest. >>> >>> This will occur on any system that has umask set to 022. Here is an example: >>> >>> $ umask 022 >>> $ touch foo >>> $ chmod ug+w foo >>> $ chmod -w foo >>> chmod: foo: new permissions are r--rw-r--, not r--r--r-- >>> $ echo $? >>> 1 >> >> But if the umask is 022, then those write bits shouldn't be set anyway? > > These bits can be set due to various reasons; e.g. > > $ mkdir /tmp/foo > $ setfacl -m d:m:rwx /tmp/foo > > $ umask 022 > $ touch /tmp/foo/x > $ chmod -w /tmp/foo/x > chmod: /tmp/foo/x: new permissions are r--rw-r--, not r--r--r-- > > > I use such a setup (posix defaults acls) to build foreign software as a > special user while allowing working on the software (--> editing) as the > normal user. Excellent, thanks for the clarification. I've adjusted the commit message as follows: build: fix man page build failure with some permissions setups Use the more portable 'chmod a-w', instead of the 'chmod -w' form. The latter is not always supported. Also its operation is dependent on umask controlling the permissions bits for new files, which is not the case in the presence of POSIX default ACLs for e.g. In that case, chmod may print a warning like the following, and exit with failure status: chmod: man/hostid.1-t: new permissions are r--rw-r--, not r--r--r-- * man/local.mk: s/-w/a-w/ thanks, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 08 10:12:45 2013 Received: (at 14152) by debbugs.gnu.org; 8 Apr 2013 14:12:45 +0000 Received: from localhost ([127.0.0.1]:40113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UPCoP-0008Nf-03 for submit@debbugs.gnu.org; Mon, 08 Apr 2013 10:12:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33220) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UPCoK-0008NU-Sm for 14152@debbugs.gnu.org; Mon, 08 Apr 2013 10:12:42 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r38E96KP032182 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 8 Apr 2013 10:09:06 -0400 Received: from [10.3.113.112] (ovpn-113-112.phx2.redhat.com [10.3.113.112]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r38E95CD020606; Mon, 8 Apr 2013 10:09:06 -0400 Message-ID: <5162CF81.2050303@redhat.com> Date: Mon, 08 Apr 2013 08:09:05 -0600 From: Eric Blake Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 MIME-Version: 1.0 To: Bob Proulx Subject: Re: bug#14152: [PATCH] build: use 'chmod a-w' instead of 'chmod -w' References: <1365251039-32081-1-git-send-email-enrico.scholz@informatik.tu-chemnitz.de> <51607052.5040708@draigBrady.com> <20130406222735.GA22989@hysteria.proulx.com> In-Reply-To: <20130406222735.GA22989@hysteria.proulx.com> X-Enigmail-Version: 1.5.1 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2AKTLXBEDLRRJFXLUMELI" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Spam-Score: -9.3 (---------) X-Debbugs-Envelope-To: 14152 Cc: Enrico Scholz , 14152@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -9.3 (---------) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2AKTLXBEDLRRJFXLUMELI Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 04/06/2013 04:27 PM, Bob Proulx wrote: > P=C3=A1draig Brady wrote: >>> - && chmod -w $@-t \ >>> + && chmod a-w $@-t \ >> >> I'll apply that fix. >=20 > I think it is always a good idea to use 'a' when there isn't any other > specific reason to do anything different. Or put the reverse way, > whenever I see a naken "-[rwx]" then I am suspicious of the action. > Because it masks with umask and is almost never what is desired. Actually, POSIX says that: chmod -w foo is undefined (that is, an argument with a leading - is interpreted as an option rather than as a mode string, but chmod is NOT required to support a -w option, even though many implementations support it as an extension). Meanwhile, POSIX requires that chmod -- -w foo is required to mask with umask. In fact, in coreutils, we exploit the fact that chmod -[rwx] is undefined, in order to emit warnings if the resulting change did not disable all bits. Using a-w instead of the undefined '-w' or the well-defined but confusing '-- -w' is indeed the right way to fix things. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2AKTLXBEDLRRJFXLUMELI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRYs+BAAoJEKeha0olJ0NqzrwIAJz7RRLESMVxa8eYVbi504mj giljeCfDndMDVoYPs3a+22y4EtN00zYTVvv5ItwTbQBn/wLlLOYu394rCZVVSyvj oUNOgLVr83sgAXB9W3RjVZSUsAPBLijbBbYp/FWsGjZqjzJVve83qsiRt3xy5Hqa qeRqp3QPQ4SKRFcVRcRPj+YmiwDiVq5md71hD/frSQvBs/4J6EBRxZUwh+rAmxR0 +Naolq02+FRnAz8GEcsp+i439AvDt/V40vkOe9zzoU/nm7ZUDD326zTUsd92AisT 8PXd05KDYoDEDBSGLUxaOISyKqgvq22eSiKORPQ+bY4crJoPpCCBE2a0hjgG8b0= =xNUc -----END PGP SIGNATURE----- ------enig2AKTLXBEDLRRJFXLUMELI-- From unknown Tue Jun 24 17:24:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 07 May 2013 11:24:03 +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