This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Automatisation of deployement of home-made package, and file permissions


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.
> 
> I added the package in a local repository folder, modified the
setup.ini
> to add the package and make it preselected.
> 
> 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
> 
> 
> 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
> 
> 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=ntsec 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=ntsec 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.

-- 
Bryan Thrall
FlightSafety International
bryan.thrall@flightsafety.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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]