public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* semi-automated installation and/or updates
@ 2012-08-18 17:05 Tom Schutter
  2012-08-18 17:36 ` Christopher Faylor
  2012-08-19  7:23 ` Andrey Repin
  0 siblings, 2 replies; 10+ messages in thread
From: Tom Schutter @ 2012-08-18 17:05 UTC (permalink / raw)
  To: cygwin

I have seen various scripts that do semi-automated installation and/or
updates of Cygwin, but none seemed to have all of the features that I
wanted.  So I wrote yet another batch file which can be found at:

  https://github.com/tschutter/AppData/blob/master/bin/cygwin_setup.bat

Features of this batch file:
* Mostly hands-free, except for stopping of running Cygwin
  processes and configuration of newly installed services.
* Stops and starts Cygwin services.
* Lists running Cygwin processes (setup.exe informs you that
  they are running, but does not list them).
* Fetches latest setup.exe from cygwin.com.
* Installs standard set of packages.
* Updates all installed packages.
* Runs rebaseall.
* Installs standard services (syslogd, sshd).
* Installs cyglsa.

Most likely you will want to edit the configuration section at about
line 48 to change the package list, install dir, and mirror site.

Please feel free to use for whatever nefarious purposes you would like.
Suggestions and improvements are welcome.

As a bonus feature, I also wrote an uninstall script:

  https://github.com/tschutter/AppData/blob/master/bin/cygwin_uninstall.bat

The uninstall script attempts to do all of the steps listed at:

  http://cygwin.com/faq/faq-nochunks.html#faq.setup.uninstall-all

-- 
Tom Schutter

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: semi-automated installation and/or updates
  2012-08-18 17:05 semi-automated installation and/or updates Tom Schutter
@ 2012-08-18 17:36 ` Christopher Faylor
  2012-08-18 20:14   ` Tom Schutter
  2012-08-19  7:23 ` Andrey Repin
  1 sibling, 1 reply; 10+ messages in thread
From: Christopher Faylor @ 2012-08-18 17:36 UTC (permalink / raw)
  To: cygwin

On Sat, Aug 18, 2012 at 10:34:05AM -0600, Tom Schutter wrote:
>I have seen various scripts that do semi-automated installation and/or
>updates of Cygwin, but none seemed to have all of the features that I
>wanted.  So I wrote yet another batch file which can be found at:
>
>  https://github.com/tschutter/AppData/blob/master/bin/cygwin_setup.bat
>
>Features of this batch file:
>* Mostly hands-free, except for stopping of running Cygwin
>  processes and configuration of newly installed services.
>* Stops and starts Cygwin services.
>* Lists running Cygwin processes (setup.exe informs you that
>  they are running, but does not list them).
>* Fetches latest setup.exe from cygwin.com.
>* Installs standard set of packages.
>* Updates all installed packages.
>* Runs rebaseall.
>* Installs standard services (syslogd, sshd).
>* Installs cyglsa.
>
>Most likely you will want to edit the configuration section at about
>line 48 to change the package list, install dir, and mirror site.
>
>Please feel free to use for whatever nefarious purposes you would like.
>Suggestions and improvements are welcome.
>
>As a bonus feature, I also wrote an uninstall script:
>
>  https://github.com/tschutter/AppData/blob/master/bin/cygwin_uninstall.bat
>
>The uninstall script attempts to do all of the steps listed at:
>
>  http://cygwin.com/faq/faq-nochunks.html#faq.setup.uninstall-all

If people like these packages maybe they could become part of the
distribution.  We get enough requests for something like this so I
think it would make sense to have something official.

Assuming you're willing to provide support here of course.

cgf

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: semi-automated installation and/or updates
  2012-08-18 17:36 ` Christopher Faylor
@ 2012-08-18 20:14   ` Tom Schutter
  0 siblings, 0 replies; 10+ messages in thread
From: Tom Schutter @ 2012-08-18 20:14 UTC (permalink / raw)
  To: cygwin

On Sat 2012-08-18 12:57, Christopher Faylor wrote:
> If people like these packages maybe they could become part of the
> distribution.  We get enough requests for something like this so I
> think it would make sense to have something official.
> 
> Assuming you're willing to provide support here of course.

What, do I look like an Andy Koppe to you? ;-) For those who do not
follow the lists closely, Andy is the driving force between the
excellent mintty package.  I have always been impressed with his mintty
package and more importantly the support he has provided to the
community.

I would not be adverse to making the scripts part of the distribution.

The biggest hurdle to making it part of the distribution is the
configuration section that most people would want to modify.  I am open
to suggestions to improving that.

-- 
Tom Schutter

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: semi-automated installation and/or updates
  2012-08-18 17:05 semi-automated installation and/or updates Tom Schutter
  2012-08-18 17:36 ` Christopher Faylor
@ 2012-08-19  7:23 ` Andrey Repin
  2012-08-19  9:06   ` Tom Schutter
  1 sibling, 1 reply; 10+ messages in thread
From: Andrey Repin @ 2012-08-19  7:23 UTC (permalink / raw)
  To: Tom Schutter, cygwin

Greetings, Tom Schutter!

> I have seen various scripts that do semi-automated installation and/or
> updates of Cygwin, but none seemed to have all of the features that I
> wanted.  So I wrote yet another batch file which can be found at:

>   https://github.com/tschutter/AppData/blob/master/bin/cygwin_setup.bat

There's a couple of errors in it. Also you can move configuration to an
external file and
CALL "%~dp0\conffile.bat"
it.

Though, I suggest .cmd extension for batch files.

I'm actually surprized, that
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
works, normally, you'd want to place redirects after the command.

if "%ERRORLEVEL%" EQU "0" goto :endif_check_admin

should be EQL, not EQU. Keep in mind that this comparison WILL fail, if
extended mode is disabled.
Fail-proof syntax:
IF NOT ERRORLEVEL <number>

References to _TEMPFILE MUST be quoted. You're referring to a filename,
which may contain spaces.

You SHOULD NOT run rebaseall manually, unless you really need to do so.


--
WBR,
Andrey Repin (anrdaemon@freemail.ru) 18.08.2012, <22:00>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: semi-automated installation and/or updates
  2012-08-19  7:23 ` Andrey Repin
@ 2012-08-19  9:06   ` Tom Schutter
  2012-08-20  4:10     ` Andrey Repin
  2012-08-21  5:09     ` Larry Hall (Cygwin)
  0 siblings, 2 replies; 10+ messages in thread
From: Tom Schutter @ 2012-08-19  9:06 UTC (permalink / raw)
  To: cygwin

On Sat 2012-08-18 22:37, Andrey Repin wrote:
> Greetings, Tom Schutter!
> 
> > I have seen various scripts that do semi-automated installation and/or
> > updates of Cygwin, but none seemed to have all of the features that I
> > wanted.  So I wrote yet another batch file which can be found at:
> 
> >   https://github.com/tschutter/AppData/blob/master/bin/cygwin_setup.bat
> 
> There's a couple of errors in it. Also you can move configuration to an
> external file and
> CALL "%~dp0\conffile.bat"
> it.

I moved the configuration to cygwin_setup_config.bat.

> Though, I suggest .cmd extension for batch files.

Meh.  .bat is what I have always used.

> I'm actually surprized, that
> >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
> works, normally, you'd want to place redirects after the command.

I was surprised as well when I saw that it worked. Normally I do put the
redirects after the command.  This was a copy-n-paste job.  I moved them
to the end to be consistent.

> if "%ERRORLEVEL%" EQU "0" goto :endif_check_admin
> 
> should be EQL, not EQU. Keep in mind that this comparison WILL fail, if
> extended mode is disabled.
> Fail-proof syntax:
> IF NOT ERRORLEVEL <number>

Actually, EQU is correct.  From "if /?":
  where compare-op may be one of:
    EQU - equal

I changed to the "if [not] errorlevel <number>" syntax to reduce the
dependancies on extended mode.  Note that there are probably other
places that depend upon extended mode.

> References to _TEMPFILE MUST be quoted. You're referring to a filename,
> which may contain spaces.

You are correct.  I normally quote filenames when expanding them, I just
missed that one.  Fixed.

> You SHOULD NOT run rebaseall manually, unless you really need to do so.

I added the call to rebaseall because of this post by Corinna:

  http://cygwin.com/ml/cygwin/2012-08/msg00320.html

Installing more packages that are forgotten in the first run of
setup.exe is what I (and I suspect others) do all the time.  I would
love to get some feedback either way on this issue.

> Sorry for my terrible english...

There are some native speakers who I wish were as literate as you.

-- 
Tom Schutter

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: semi-automated installation and/or updates
  2012-08-19  9:06   ` Tom Schutter
@ 2012-08-20  4:10     ` Andrey Repin
  2012-08-20 18:57       ` Earnie Boyd
  2012-08-21  6:25       ` Tom Schutter
  2012-08-21  5:09     ` Larry Hall (Cygwin)
  1 sibling, 2 replies; 10+ messages in thread
From: Andrey Repin @ 2012-08-20  4:10 UTC (permalink / raw)
  To: Tom Schutter, cygwin

Greetings, Tom Schutter!


>> if "%ERRORLEVEL%" EQU "0" goto :endif_check_admin
>> 
>> should be EQL, not EQU. Keep in mind that this comparison WILL fail, if
>> extended mode is disabled.
>> Fail-proof syntax:
>> IF NOT ERRORLEVEL <number>

> Actually, EQU is correct.  From "if /?":
>   where compare-op may be one of:
>     EQU - equal

Mine says "EQL" ... So much for M$ consistency...

> I changed to the "if [not] errorlevel <number>" syntax to reduce the
> dependancies on extended mode.  Note that there are probably other
> places that depend upon extended mode.

I haven't noticed anything apparent.

>> References to _TEMPFILE MUST be quoted. You're referring to a filename,
>> which may contain spaces.

> You are correct.  I normally quote filenames when expanding them, I just
> missed that one.  Fixed.

>> You SHOULD NOT run rebaseall manually, unless you really need to do so.

> I added the call to rebaseall because of this post by Corinna:

>   http://cygwin.com/ml/cygwin/2012-08/msg00320.html

> Installing more packages that are forgotten in the first run of
> setup.exe is what I (and I suspect others) do all the time.  I would
> love to get some feedback either way on this issue.

That's something that should be handled in setup.exe, IMO.
May be it's worth putting a clear note, that this is a workaround for existing
inconsistency? (With a reference you gave me here.)


--
WBR,
Andrey Repin (anrdaemon@freemail.ru) 20.08.2012, <07:10>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: semi-automated installation and/or updates
  2012-08-20  4:10     ` Andrey Repin
@ 2012-08-20 18:57       ` Earnie Boyd
  2012-08-21  6:25       ` Tom Schutter
  1 sibling, 0 replies; 10+ messages in thread
From: Earnie Boyd @ 2012-08-20 18:57 UTC (permalink / raw)
  To: Andrey Repin

On Sun, Aug 19, 2012 at 11:14 PM, Andrey Repin wrote:
>
>> I added the call to rebaseall because of this post by Corinna:
>
>>   http://cygwin.com/ml/cygwin/2012-08/msg00320.html
>
>> Installing more packages that are forgotten in the first run of
>> setup.exe is what I (and I suspect others) do all the time.  I would
>> love to get some feedback either way on this issue.
>
> That's something that should be handled in setup.exe, IMO.
> May be it's worth putting a clear note, that this is a workaround for existing
> inconsistency? (With a reference you gave me here.)

I would like to know why you gave the response that it shouldn't be
run manually unless there is good reason.  What harm might happen?

-- 
Earnie
-- https://sites.google.com/site/earnieboyd

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: semi-automated installation and/or updates
  2012-08-19  9:06   ` Tom Schutter
  2012-08-20  4:10     ` Andrey Repin
@ 2012-08-21  5:09     ` Larry Hall (Cygwin)
  2012-08-21 10:17       ` Christopher Faylor
  1 sibling, 1 reply; 10+ messages in thread
From: Larry Hall (Cygwin) @ 2012-08-21  5:09 UTC (permalink / raw)
  To: cygwin

On 8/18/2012 4:14 PM, Tom Schutter wrote:
> On Sat 2012-08-18 22:37, Andrey Repin wrote:

<snip>

>> Sorry for my terrible english...
>
> There are some native speakers who I wish were as literate as you.

Hey, I heard that!

;-)

-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: semi-automated installation and/or updates
  2012-08-20  4:10     ` Andrey Repin
  2012-08-20 18:57       ` Earnie Boyd
@ 2012-08-21  6:25       ` Tom Schutter
  1 sibling, 0 replies; 10+ messages in thread
From: Tom Schutter @ 2012-08-21  6:25 UTC (permalink / raw)
  To: cygwin

On Mon 2012-08-20 07:14, Andrey Repin wrote:
> >> You SHOULD NOT run rebaseall manually, unless you really need to do so.

Do you have any solid reason to backup this statement?  Any known
conditions where it definitely should not be run?

> > I added the call to rebaseall because of this post by Corinna:
> 
> >   http://cygwin.com/ml/cygwin/2012-08/msg00320.html
> 
> > Installing more packages that are forgotten in the first run of
> > setup.exe is what I (and I suspect others) do all the time.  I would
> > love to get some feedback either way on this issue.
> 
> That's something that should be handled in setup.exe, IMO.
> May be it's worth putting a clear note, that this is a workaround for existing
> inconsistency? (With a reference you gave me here.)

The reference was already there, but I added some more comments
regarding the run of rebaseall.

-- 
Tom Schutter

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: semi-automated installation and/or updates
  2012-08-21  5:09     ` Larry Hall (Cygwin)
@ 2012-08-21 10:17       ` Christopher Faylor
  0 siblings, 0 replies; 10+ messages in thread
From: Christopher Faylor @ 2012-08-21 10:17 UTC (permalink / raw)
  To: cygwin

On Mon, Aug 20, 2012 at 09:50:41PM -0400, Larry Hall (Cygwin) wrote:
>On 8/18/2012 4:14 PM, Tom Schutter wrote:
>> On Sat 2012-08-18 22:37, Andrey Repin wrote:
>
><snip>
>
>>> Sorry for my terrible english...
>>
>> There are some native speakers who I wish were as literate as you.
>
>Hey, I heard that!

He weren't talking of you, I don't think.

cgf

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-08-21  3:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-18 17:05 semi-automated installation and/or updates Tom Schutter
2012-08-18 17:36 ` Christopher Faylor
2012-08-18 20:14   ` Tom Schutter
2012-08-19  7:23 ` Andrey Repin
2012-08-19  9:06   ` Tom Schutter
2012-08-20  4:10     ` Andrey Repin
2012-08-20 18:57       ` Earnie Boyd
2012-08-21  6:25       ` Tom Schutter
2012-08-21  5:09     ` Larry Hall (Cygwin)
2012-08-21 10:17       ` Christopher Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).