Re: update with apt-cyg ?

2020-09-08 Thread Ulli Horlacher
On Sun 2020-09-06 (19:11), Brian Inglis wrote:

> If using unattended (--quiet) mode, you have to specify everything else:
> 
>   $ ./setup-x86_64 -gq -R "$rootdir" -l "$pkgdir" -s $site
> 
> otherwise try semi-attended (--package-manager) chooser-only mode:
> 
>   $ ./setup-x86_64 -gM -R "$rootdir" -l "$pkgdir" -s $site

My cygwin installation directory is in the users windows home directory, eg:

W10dev:/: cygpath -w /
C:\Users\framstag\cygwin

Shall I use setup-x86_64 -B ... ?

I found a directory named C:\Users\framstag\cygwin\.pkg-cache
Is this the value I sould use for $pkgdir ?


> Defaults should have been saved in /etc/setup/setup.rc

This seems not to be true for my installations.
How can I add the defaults for $rootdir $pkgdir $site afterwards?


-- 
Ullrich Horlacher  Server und Virtualisierung
Rechenzentrum TIK 
Universitaet Stuttgart E-Mail: horlac...@tik.uni-stuttgart.de
Allmandring 30aTel:++49-711-68565868
70569 Stuttgart (Germany)  WWW:http://www.tik.uni-stuttgart.de/
REF:<8a6a9c60-5c8a-a322-0b5e-2210be28e...@systematicsw.ab.ca>
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: update with apt-cyg ?

2020-09-07 Thread Hans-Bernhard Bröker

Am 07.09.2020 um 01:00 schrieb Ulli Horlacher:


cygstart /setup-x86_64.exe --quiet-mode


That approach is essentially guaranteed to fail you in frustrating ways, 
for two reasons:


1) (Minor) You do not want to have setup itself, much less its work and 
data directory, inside the cygwin installation.  I.e. that should never 
be '/' as the path for setup, as seen from any Cygwin shell.


2) (Major) Updating a running cygwin installation from the inside is 
highly unlikely to work correctly.  Most importantly there is almost no 
chance for it to update the core DLLs, because those will already be in 
use by the shell you're running this from, so they cannot be changed. 
I.e. if you're in a situation where using "cygstart" makes any sense, 
that's a situation setup cannot update the DLLs.


In a nutshell, and to paraphrase a certain Mr. Ford, you can have your 
special non-interactive Cygwin setup script in any language you like, as 
long as it's effectively a _Windows_ batch file.  Updating the branch 
you're currently sitting on does not work any better than sawing it through.

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


Re: update with apt-cyg ?

2020-09-07 Thread Ulli Horlacher
On Sun 2020-09-06 (19:11), Brian Inglis wrote:

> > cygstart /setup-x86_64.exe --quiet-mode
> > 
> > But this does not upgrade my cygwin installation in my users windows home, 
> > but does a new installation in c:\cygwin64
> 
> Download:
> 
>   $ curl -OJR https://cygwin.com/setup-x86_64.exe
> OR
>   $ wget -N https://cygwin.com/setup-x86_64.exe

Ok, this is a easy :-)


> If using unattended (--quiet) mode, you have to specify everything else:
> 
>   $ ./setup-x86_64 -gq -R "$rootdir" -l "$pkgdir" -s $site
> 
> otherwise try semi-attended (--package-manager) chooser-only mode:
> 
>   $ ./setup-x86_64 -gM -R "$rootdir" -l "$pkgdir" -s $site
> 
> which lets you see the prompt screens and decide whether you need to change
> anything.

Great! This helps me a lot!


> Defaults should have been saved in /etc/setup/setup.rc and packages in
> /etc/setup/installed.db the first time you installed Cygwin, so that 
> subsequent
> upgrades will use the same locations.

I did not know /etc/setup/setup.rc, but it is there with the content:

last-cache
C:\Users\admin\cygwin\.pkg-cache
mirrors-lst
http://cygwin.mirror.constant.com/;cygwin.mirror.constant.com;United 
States;New Jersey
(...)
last-mirror
http://ftp.fau.de/cygwin/
net-method
IE
last-action
Download,Install


> If your alternative package manager is not following these conventions, please
> consider whether that is a safe approach if other apps are needed for 
> upgrades,
> unless your package manager uses workarounds so they are not needed.

cygwin-portable-installer(*) is not an alternative package manager, but
just a script wrapper for setup.exe

The installation step is:

echo Running Cygwin setup...
"%CYGWIN_ROOT%\%CYGWIN_SETUP_EXE%" --no-admin ^
 --site %CYGWIN_MIRROR% %CYGWIN_PROXY% ^
 --root "%CYGWIN_ROOT%" ^
 --local-package-dir "%CYGWIN_ROOT%\.pkg-cache" ^
 --no-shortcuts ^
 --no-desktop ^
 --delete-orphans ^
 --upgrade-also ^
 --no-replaceonreboot ^
 --quiet-mode ^
 --packages dos2unix,wget,%CYGWIN_PACKAGES% || goto :fail


When I later run /setup-x86_64 without options it asks for 
"Choose A Download Source"

I can skip this step if I start it with:
/setup-x86_64 -s http://ftp.fau.de/cygwin

Is there something missing in my /etc/setup/setup.rc?
What should I add there?
Also the CYGWIN_ROOT (option -R)?

Ok, I could write a setup.cmd with the options you named, but it would be
better if setup-x86_64.exe knows my defaults.


(*) I need cygwin-portable-installer for my users, which are overcharged
with a regular cygwin installation. With cygwin-portable-installer I can
specify all needed packages, the installation place and some additional
software (of my own).


-- 
Ullrich Horlacher  Server und Virtualisierung
Rechenzentrum TIK 
Universitaet Stuttgart E-Mail: horlac...@tik.uni-stuttgart.de
Allmandring 30aTel:++49-711-68565868
70569 Stuttgart (Germany)  WWW:http://www.tik.uni-stuttgart.de/
REF:<8a6a9c60-5c8a-a322-0b5e-2210be28e...@systematicsw.ab.ca>
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: update with apt-cyg ?

2020-09-06 Thread Achim Gratz

Am 07.09.2020 um 00:11 schrieb Ulli Horlacher:

apt-cyg update-setup
apt-cyg update
apt-cyg dist-upgrade


None of the various apt-cyg versions I've looked at actually work 
correctly.  The most egregious fault usually is that they will 
deactivate the perpetual postinstall scripts, which will permanently 
damage your installation.



--
Achim.

(on the road :-)

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


Re: update with apt-cyg ?

2020-09-06 Thread Brian Inglis
On 2020-09-06 17:00, Ulli Horlacher wrote:
> On Sun 2020-09-06 (16:27), Brian Inglis wrote:
>> On 2020-09-06 16:11, Ulli Horlacher wrote:
>>> I need an UNIX-alike update shell script, without clicky-pointy. Is this
>>> a correct way: apt-cyg update-setup apt-cyg update apt-cyg dist-upgrade 
>>> ? I have testet it that way and it LOOKS ok, but maybe I am missing 
>>> something?
>> 
>> Whose fork of apt-cyg are you using?
> 
> Ooops... there are different versions (forks)?
> 
> I am using https://github.com/kou1okada/apt-cyg from 
> cygwin-portable-installer :
> 
> W10dev:~: apt-cyg --version
> kou1okada/apt-cyg forked from transcode-open/apt-cyg
> 
>> Please read those instructions carefully, or check the source.
> 
> 2558 lines of bash script... :-}
> 
>> Most do not support upgrading packages as they cannot upgrade the core
>> packages. Please look for articles about running the Cygwin Setup program
>> unattended.
> 
> I have tried this first:
> 
> cygstart /setup-x86_64.exe --quiet-mode
> 
> But this does not upgrade my cygwin installation in my users windows home, 
> but does a new installation in c:\cygwin64

Download:

$ curl -OJR https://cygwin.com/setup-x86_64.exe
OR
$ wget -N https://cygwin.com/setup-x86_64.exe

If using unattended (--quiet) mode, you have to specify everything else:

$ ./setup-x86_64 -gq -R "$rootdir" -l "$pkgdir" -s $site

otherwise try semi-attended (--package-manager) chooser-only mode:

$ ./setup-x86_64 -gM -R "$rootdir" -l "$pkgdir" -s $site

which lets you see the prompt screens and decide whether you need to change
anything.

Defaults should have been saved in /etc/setup/setup.rc and packages in
/etc/setup/installed.db the first time you installed Cygwin, so that subsequent
upgrades will use the same locations.

If your alternative package manager is not following these conventions, please
consider whether that is a safe approach if other apps are needed for upgrades,
unless your package manager uses workarounds so they are not needed.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in IEC units and prefixes, physical quantities in SI.]
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: update with apt-cyg ?

2020-09-06 Thread Ulli Horlacher
On Sun 2020-09-06 (16:27), Brian Inglis wrote:
> On 2020-09-06 16:11, Ulli Horlacher wrote:
> 
> > I need an UNIX-alike update shell script, without clicky-pointy.
> > Is this a correct way:
> > apt-cyg update-setup
> > apt-cyg update
> > apt-cyg dist-upgrade
> > ?
> > I have testet it that way and it LOOKS ok, but maybe I am missing
> > something?
> 
> Whose fork of apt-cyg are you using?

Ooops... there are different versions (forks)?

I am using https://github.com/kou1okada/apt-cyg from
cygwin-portable-installer :

W10dev:~: apt-cyg --version
kou1okada/apt-cyg
forked from transcode-open/apt-cyg



> Please read those instructions carefully, or check the source.

2558 lines of bash script... :-}


> Most do not support upgrading packages as they cannot upgrade the core 
> packages.
> Please look for articles about running the Cygwin Setup program unattended.

I have tried this first:

cygstart /setup-x86_64.exe --quiet-mode

But this does not upgrade my cygwin installation in my users windows home,
but does a new installation in c:\cygwin64


-- 
Ullrich Horlacher  Server und Virtualisierung
Rechenzentrum TIK 
Universitaet Stuttgart E-Mail: horlac...@tik.uni-stuttgart.de
Allmandring 30aTel:++49-711-68565868
70569 Stuttgart (Germany)  WWW:http://www.tik.uni-stuttgart.de/
REF:<105e7934-f8a3-eb92-8fa0-dd22566c7...@systematicsw.ab.ca>
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: update with apt-cyg ?

2020-09-06 Thread Brian Inglis
On 2020-09-06 16:11, Ulli Horlacher wrote:
> I need an UNIX-alike update shell script, without clicky-pointy.
> Is this a correct way:
> apt-cyg update-setup
> apt-cyg update
> apt-cyg dist-upgrade
> ?
> I have testet it that way and it LOOKS ok, but maybe I am missing
> something?

Whose fork of apt-cyg are you using?
Please read those instructions carefully, or check the source.
Most do not support upgrading packages as they cannot upgrade the core packages.
Please look for articles about running the Cygwin Setup program unattended.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in IEC units and prefixes, physical quantities in SI.]
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


update with apt-cyg ?

2020-09-06 Thread Ulli Horlacher


I need an UNIX-alike update shell script, without clicky-pointy.

Is this a correct way:

apt-cyg update-setup
apt-cyg update
apt-cyg dist-upgrade

?

I have testet it that way and it LOOKS ok, but maybe I am missing
something?

-- 
Ullrich Horlacher  Server und Virtualisierung
Rechenzentrum TIK 
Universitaet Stuttgart E-Mail: horlac...@tik.uni-stuttgart.de
Allmandring 30aTel:++49-711-68565868
70569 Stuttgart (Germany)  WWW:http://www.tik.uni-stuttgart.de/
REF:<20200906221104.gc19...@tik.uni-stuttgart.de>
--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple