Mail Archives: cygwin/2007/11/06/22:12:31
Because I keep seeing this, and because at least once a year I have to fight through the disparate and confusing documentations and various mail logs. Here is how I use setup for unattended FULL and custom installs, with examples:
The key command you are looking for looks something like this:
c:\temp\remcyg1.5.24\setup -d -L -l "c:\temp\remcyg1.5.24" -q -r -R "c:\cygwin"
The summary of this is:
-d no desktop icons added, -L Local Install, -l path to install root, -q quite (it's not very quite, but what can you do?) -r don't replace files after reboot ( I had problems long ago with this, but have forgotten what they are), -R Where you want it to go.
You might also want to customize the install. It's ugly, but to do this you:
1: DOWNLOAD EVERYTHING (nothing is more painful than missing an unanticipated package dependency on an automated install )(it's easier to remove stuff and see if it breaks than to have to grab that one missing TeX thingy that you have no idea why it's there). Copy it somewhere where the normal install won't blast all your work. I use c:\temp\remcyg[version]_[myversion] for my special cygwin install root.
2: Edit the [Install_Root]/packages/setup.ini . Again, don't use the setup.ini in your default directory or it will be overwritten. You want to add a dummy BASE package. Base packages are always installed. On mine I have a set of scripts run after the install called "finish[version}" that I've added in to this dummy base package. It looks something like this:
@ finish1.5.5
sdesc: "Dummy to fool setup, includes finish script"
ldesc: "Dummy to fool setup, includes finish script "
category: Base
requires: [Package names as they are written on the lines with "@" at the beginning, space delimited]
version: 1.3
install: release/finish1.5.5/finish1.5.5_5.tar.bz2 7564 5e7d6b01b168000eb1f2668bfc5f60e6
source: release/finish1.5.5/finish1.5.5_5.tar.bz2 7564 5e7d6b01b168000eb1f2668bfc5f60e6
In the "requires" section put everything you want in your install. I started by writing a script that read the setup.ini, select for lines with a "@" in them, and dump that into the "requires" line. The advantage is that redundant items aren't re-installed and taking stuff out is easier than putting stuff in. If you want to do a complete install, just leave everything in there, again, the redundancy is ignored.
I up version the version line every time I re-write this section.
Install and source: since I have scripts I run to setup many services and copy over specific files for my users, I include these. I have never tried this with an empty file here, but I suppose it would work. I believe you DO need something here. In this case I have, under [Install Root]/packages/release/finish1.5.5/ a tar bz2 file called "finish1.5.5_5.tar.bz2" the files saved here use the same directory structure as cygwin under it's root ( / ). In this case one of the files is /etc/postinstall/finish1.5.5.sh which setup runs at the end of the install. The important point is the numbers: "7564" and "5e7d6b01b168000eb1f2668bfc5f60e6"
7564 is the size of the finish1.5.5_5.tar.bz2 file and 5e7d6b01b168000eb1f2668bfc5f60e6 is the md5sum of the finish1.5.5_5.tar.bz2 file (example):
dobrin AT tiburon://murgatroid/c$/temp/remcyg1.5.24/packages/release/finish1.5.5> ls -al finish1.5.5_5.tar.bz2
-rw-r--r-- 1 dobrin Domain Users 7564 Aug 10 16:56 finish1.5.5_5.tar.bz2
dobrin AT tiburon://murgatroid/c$/temp/remcyg1.5.24/packages/release/finish1.5.5> md5sum finish1.5.5_5.tar.bz2
5e7d6b01b168000eb1f2668bfc5f60e6 *finish1.5.5_5.tar.bz2
I use this in 2 ways:
I have 500+ machines with cygwin that I need to update at times. I have a group of scripts that will, from a centralized location: copy the tarball to the machine, shutdown all the cygwin services, untar, spawn an install/upgrade, go on to the next machine...
I also package a zipfile that I can use for new unattended installs.
I hope this helps get people out there from tearing their hair out.
-----Original Message-----
From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com] On Behalf Of MasterOfSw
Sent: Tuesday, November 06, 2007 2:02 PM
To: cygwin AT cygwin DOT com
Subject: Fw: Customize setup program.
On Mon, 05 Nov 2007 11:07:50 +0000, "Joćo Pedro Oliveira"
<joao DOT oliveira AT lx DOT it DOT pt> said:
> Is it possible to call the setup program in quiet mode (or not quiet)
> and pass to the setup the packages we want to install? I would not
> like
> the user "lost" in all the steps of the cygwin setup...
>
> How can I do this?
Check the cygwin FAQ. There is a section under Setting up Cygwin about automated installs. I haven't used it yet, but plan on trying soon myself.
http://cygwin.com/faq.html
>
> Best regards,
> Joćo
>
Matt
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -