X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Mon, 22 Jun 2009 16:09:22 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: HEADSUP maintainers: Packages install scripts without execute 	?permissions
Message-ID: <20090622140922.GU5039@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <4A3D1570.5020506@aim.com> <20090622094310.GN5039@calimero.vinschen.de> <20090622131144.GR5039@calimero.vinschen.de> <4A3F8955.3080407@gmail.com> <20090622134020.GS5039@calimero.vinschen.de> <loom.20090622T135114-330@post.gmane.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <loom.20090622T135114-330@post.gmane.org>
User-Agent: Mutt/1.5.19 (2009-02-20)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Jun 22 13:58, Eric Blake wrote:
> Corinna Vinschen <corinna-cygwin <at> cygwin.com> writes:
> 
> > >   Why don't we just remove the "-c" and get setup.exe to use the 
> simple "bash
> > > <filename>" syntax meaning "treat <filename> as a text file, open it and 
> pipe
> > > it to stdin"?
> > 
> > I already suggested this on the cygwin-developers ML back in May (*)
> > but it was not discussed overly enthusiastic (**) (***).
> 
> Indeed - changing things to be 'bash script' instead of the current 'bash -c 
> script' would make the use of alternative interpreters harder.  But it does not 
> make it impossible; you can always do:
> 
> #!/bin/sh
> /bin/awk <<\EOF
> ...
> EOF
> 
> instead of
> 
> #!/bin/awk
> ...
> 
> For that matter, are there any postinstall scripts currently relying on a 
> different interpreter?  If not, then I'm in favor of the idea of changing 
> setup.exe to be immune to the execute bit on postinstall scripts, at the 
> expense of making postinstall scripts locked into bash (at least, as the 
> initial interpreter).

There can be only *.bat and *.sh files in /etc/postinstall and
/etc/preremove.  *.bat files are started via `cmd /c file' and *.sh
files are started via `bash --norc --noprofile -c file'.  So we sort of
require a script to be a sh/bash script anyway right now.  Admittedly, I
did not actually *look* into all postinstall/preremove scripts in the
distro.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

