www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/09/23/11:13:26

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_65
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Subject: RE: Automatisation of deployement of home-made package, and file permissions
Date: Wed, 23 Sep 2009 10:12:59 -0500
Message-ID: <786EBDA1AC46254B813E200779E7AD3645F4A0@srv1163ex1.flightsafety.com>
In-Reply-To: <4ABA36C7.2070800@gmail.com>
References: <4ABA36C7 DOT 2070800 AT gmail DOT com>
From: "Thrall, Bryan" <bryan DOT thrall AT flightsafety DOT com>
To: <cygwin AT cygwin DOT com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Nicolas Charles wrote on Wednesday, September 23, 2009 9:55 AM:
> I'm trying to automate the deployement of applications on computers,
so
> I created a package (let's call it mypackage-3.0)
> So I created a mypackage-3.0.tar.bz2 with all the necessary files, and
a
> /etc/postinstall/mypackage.sh script to set up files permissions.
>=20
> I added the package in a local repository folder, modified the
setup.ini
> to add the package and make it preselected.
>=20
> Then I hit setup.exe, everything seems to go fine : my package is
there,
> decompressed, the mypackage.sh is executed.
> However, no file permission is changed (on a Win2K, all files have 777
> permission, on a Win2k3 it's 750)
> I know the script is executed, for I have a mypackage.sh.done file
>=20
>=20
> I don't even understand why the file permissions are not the ones of
the
> original files (tar.bz2 ought to keep the original file permission,
and
> i tried by deflatting the archive, resulting in the right permissions)
> The script works: if I run it, the files are modified as I would
expect
>=20
> What should I do ?

By default, the current setup.exe disables Cygwin permissions when
running postinstall scripts by adding nontsec to the CYGWIN environment
variable; that's why your file permissions are not being set in the
postinstall file. It also doesn't understand Cygwin permissions itself,
so it installs files from the tar.bz2 using Windows ACL semantics.

A workaround should be to set CYGWIN=3Dntsec inside the postinstall
script. I don't know if that takes immediate effect, but I do know (from
one of my own custom packages) that it works for scripts spawned from
the postinstall script, at least (i.e. run 'CYGWIN=3Dntsec mychownscript'
from your postinstall script).

As I understand it, newer versions of setup.exe (such as for Cygwin 1.7,
though there might be a snapshot of setup.exe for Cygwin 1.5 that has
these changes, too; I don't know) will install files using Cygwin
permissions, so such workaround will not be necessary when 1.7 is
released.

--=20
Bryan Thrall
FlightSafety International
bryan DOT thrall AT flightsafety DOT com

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019