* setup-x86_64.exe (bug ?): Cannot write to /usr/bin/cygwin1.dll - cyserver squatting it... [not found] ` <a0f1e420-ae48-49a3-9300-c56f1948ad9b.e52b7f5f-5a09-4346-99f8-a6591191169c.d8646e54-e135-4b48-b201-e04c766db67c@emailsignatures365.codetwo.com> @ 2023-11-15 13:57 ` Mainz, Roland 2023-11-15 17:01 ` Andrey Repin 0 siblings, 1 reply; 7+ messages in thread From: Mainz, Roland @ 2023-11-15 13:57 UTC (permalink / raw) To: cygwin Hi! ---- The Cygwin installer "setup-x86_64.exe" has problems updating cygwin1.dll when cygserver is running: ---- snip ---- Unable to extract /usr/bin/cygwin1.dll -- error writing file ---- snip ---- The fix is to do a $ sc stop cygserver # as Administrator, then "setup-x86_64.exe" can write to that file, and after "setup" is done do a $ sc start cygserverr # as Admin again. ... is it possible to modify "setup-x86_64.exe" to stop cygserver before doing the installation process and re-start it after it ? That would make the installer a bit more user-friendly... Versions: ---- snip ---- $ uname -a CYGWIN_NT-10.0-19045 futuramapainmonster4 3.5.0-0.461.g324ace778f70.x86_64 2023-11-14 17:30 UTC x86_64 Cygwin $ ./setup-x86_64 -V Cygwin setup 2.926 ---- snip ---- ---- Bye, Roland i. A. Roland Mainz Entwickler Steuerungssoftware TEE ROVEMA GmbH Industriestr. 1, 35463 Fernwald, Germany T +49 641 409 528 @ Roland.Mainz@rovema.de www.rovema.com ROVEMA GmbH Industriestrasse 1, 35463 Fernwald, Germany Geschäftsführer: Christoph Gusenleitner Dr. Dirk Panhans Handelsregister-Eintrag/Commercial Register: Amtsgericht Gießen, HRB 8551 USt.-Ident./VAT ID No.: DE 301 430 123 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: setup-x86_64.exe (bug ?): Cannot write to /usr/bin/cygwin1.dll - cyserver squatting it... 2023-11-15 13:57 ` setup-x86_64.exe (bug ?): Cannot write to /usr/bin/cygwin1.dll - cyserver squatting it Mainz, Roland @ 2023-11-15 17:01 ` Andrey Repin 2023-11-16 7:03 ` Martin Wege 0 siblings, 1 reply; 7+ messages in thread From: Andrey Repin @ 2023-11-15 17:01 UTC (permalink / raw) To: Mainz, Roland, cygwin Greetings, Mainz, Roland! > Hi! > ---- > The Cygwin installer "setup-x86_64.exe" has problems updating cygwin1.dll when cygserver is running: You should stop ALL Cygwin processes before starting setup.exe. This is documented. > ---- snip ---- > Unable to extract /usr/bin/cygwin1.dll -- error writing file > ---- snip ---- > The fix is to do a $ sc stop cygserver # as Administrator, then > "setup-x86_64.exe" can write to that file, and after "setup" is done do a $ sc start cygserverr # as Admin again. > ... is it possible to modify "setup-x86_64.exe" to stop cygserver before > doing the installation process and re-start it after it ? There's no reason to do so, as there's no easy way to detect beforehand, if you actually need to do so. You could have cygserver running from one Cygwin setup but installing to the different one. And so on. -- With best regards, Andrey Repin Wednesday, November 15, 2023 19:59:00 Sorry for my terrible english... ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: setup-x86_64.exe (bug ?): Cannot write to /usr/bin/cygwin1.dll - cyserver squatting it... 2023-11-15 17:01 ` Andrey Repin @ 2023-11-16 7:03 ` Martin Wege 2023-11-16 7:50 ` Brian Inglis 2023-11-19 22:03 ` Jon Turney 0 siblings, 2 replies; 7+ messages in thread From: Martin Wege @ 2023-11-16 7:03 UTC (permalink / raw) To: cygwin; +Cc: Mainz, Roland, Andrey Repin On Wed, Nov 15, 2023 at 6:05 PM Andrey Repin via Cygwin <cygwin@cygwin.com> wrote: > > Greetings, Mainz, Roland! > > > > Hi! > > > ---- > > > The Cygwin installer "setup-x86_64.exe" has problems updating cygwin1.dll when cygserver is running: > > You should stop ALL Cygwin processes before starting setup.exe. > This is documented. This is not helpful. Cygwin setup-x86-64.exe not being able to update, because SOMETHING is locking cygwin1.dll is in the top 50 of your IT support, right followed by the question of IT support whether "updating to WSL" will solve the situation for them permanently. > > > ---- snip ---- > > Unable to extract /usr/bin/cygwin1.dll -- error writing file > > ---- snip ---- > > > The fix is to do a $ sc stop cygserver # as Administrator, then > > "setup-x86_64.exe" can write to that file, and after "setup" is done do a $ sc start cygserverr # as Admin again. > > > ... is it possible to modify "setup-x86_64.exe" to stop cygserver before > > doing the installation process and re-start it after it ? > > There's no reason to do so, as there's no easy way to detect beforehand, if > you actually need to do so. sc query cygserver is EASY to detect. IMO Cygwin needs a serious effort towards user-friendliness-by-default. Right now Cygwin is a specialist environment which requires half an university degree to get it working, and that makes me unhappy because your work is GREAT > > You could have cygserver running from one Cygwin setup but installing to the > different one. And so on. Seriously, who has TWO Cygwin setups on one machine? Also, sc query can handle those cases too. Thanks, Martin ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: setup-x86_64.exe (bug ?): Cannot write to /usr/bin/cygwin1.dll - cyserver squatting it... 2023-11-16 7:03 ` Martin Wege @ 2023-11-16 7:50 ` Brian Inglis 2023-11-16 15:50 ` Bill Sharp 2023-11-19 22:03 ` Jon Turney 1 sibling, 1 reply; 7+ messages in thread From: Brian Inglis @ 2023-11-16 7:50 UTC (permalink / raw) To: cygwin On 2023-11-16 00:03, Martin Wege wrote: > On Wed, Nov 15, 2023 at 6:05 PM Andrey Repin wrote: >>> The Cygwin installer "setup-x86_64.exe" has problems updating cygwin1.dll when cygserver is running: >> >> You should stop ALL Cygwin processes before starting setup.exe. >> This is documented. > > This is not helpful. Cygwin setup-x86-64.exe not being able to update, > because SOMETHING is locking cygwin1.dll is in the top 50 of your IT > support, right followed by the question of IT support whether > "updating to WSL" will solve the situation for them permanently. > >> >>> ---- snip ---- >>> Unable to extract /usr/bin/cygwin1.dll -- error writing file >>> ---- snip ---- >> >>> The fix is to do a $ sc stop cygserver # as Administrator, then >>> "setup-x86_64.exe" can write to that file, and after "setup" is done do a $ sc start cygserverr # as Admin again. >> >>> ... is it possible to modify "setup-x86_64.exe" to stop cygserver before >>> doing the installation process and re-start it after it ? >> >> There's no reason to do so, as there's no easy way to detect beforehand, if >> you actually need to do so. > > sc query cygserver is EASY to detect. > > IMO Cygwin needs a serious effort towards > user-friendliness-by-default. Right now Cygwin is a specialist > environment which requires half an university degree to get it > working, and that makes me unhappy because your work is GREAT > >> >> You could have cygserver running from one Cygwin setup but installing to the >> different one. And so on. > > Seriously, who has TWO Cygwin setups on one machine? Also, sc query > can handle those cases too. There may be critical or just really long Cygwin processes running that should not be killed because somebody wants to upgrade. Shutting down processes, including services, has to be left to the users or sys admins who understand whether the circumstances are suitable to kill processes to do an upgrade. I have a privileged Scheduled Task to run to clean up known background processes and shut down Cygwin services, then I check in TaskMgr if anything is still running from that Cygwin root path, before I run my Cygwin Setup script, which does more checking and shut downs of X servers and clients, and checking and reporting on processes from that Cygwin root running in background or Scheduled Tasks, before it will launch the latest downloaded Cygwin Setup in semi-attended -M, --package-manager mode, to give me time to resolve any remaining issues before telling Cygwin Setup to proceed. -- Take care. Thanks, Brian Inglis Calgary, Alberta, Canada La perfection est atteinte Perfection is achieved non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut -- Antoine de Saint-Exupéry ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: setup-x86_64.exe (bug ?): Cannot write to /usr/bin/cygwin1.dll - cyserver squatting it... 2023-11-16 7:50 ` Brian Inglis @ 2023-11-16 15:50 ` Bill Sharp 2023-11-19 22:04 ` Jon Turney 0 siblings, 1 reply; 7+ messages in thread From: Bill Sharp @ 2023-11-16 15:50 UTC (permalink / raw) To: cygwin; +Cc: Brian Inglis [-- Attachment #1: Type: text/plain, Size: 1038 bytes --] On Thu, 16 Nov 2023 at 07:50, Brian Inglis via Cygwin <cygwin@cygwin.com> wrote: > On 2023-11-16 00:03, Martin Wege wrote: > > This is not helpful. Cygwin setup-x86-64.exe not being able to update, > > because SOMETHING is locking cygwin1.dll is in the top 50 of your IT > > support, right followed by the question of IT support whether > > "updating to WSL" will solve the situation for them permanently. > > > There may be critical or just really long Cygwin processes running that > should > not be killed because somebody wants to upgrade. > > Shutting down processes, including services, has to be left to the users > or sys > admins who understand whether the circumstances are suitable to kill > processes > to do an upgrade. > I actually agree with both of you to an extent. However I would like to suggest the correct enchancement here would be for setup to check for any running cygwin processes and then barf a warning onto the user, referncing the appropriate documentation, before allowing them to proceed. Kind regards ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: setup-x86_64.exe (bug ?): Cannot write to /usr/bin/cygwin1.dll - cyserver squatting it... 2023-11-16 15:50 ` Bill Sharp @ 2023-11-19 22:04 ` Jon Turney 0 siblings, 0 replies; 7+ messages in thread From: Jon Turney @ 2023-11-19 22:04 UTC (permalink / raw) To: Bill Sharp, The Cygwin Mailing List On 16/11/2023 15:50, Bill Sharp via Cygwin wrote: > On Thu, 16 Nov 2023 at 07:50, Brian Inglis via Cygwin <cygwin@cygwin.com> > wrote: > >> On 2023-11-16 00:03, Martin Wege wrote: >>> This is not helpful. Cygwin setup-x86-64.exe not being able to update, >>> because SOMETHING is locking cygwin1.dll is in the top 50 of your IT >>> support, right followed by the question of IT support whether >>> "updating to WSL" will solve the situation for them permanently. >> >> >> There may be critical or just really long Cygwin processes running that >> should >> not be killed because somebody wants to upgrade. >> >> Shutting down processes, including services, has to be left to the users >> or sys >> admins who understand whether the circumstances are suitable to kill >> processes >> to do an upgrade. >> > > > I actually agree with both of you to an extent. > > However I would like to suggest the correct enchancement here would be for > setup to check for any running cygwin processes and then barf a warning > onto the user, referncing the appropriate documentation, before allowing > them to proceed. Well, what is supposed to happen at the moment (since [1]), for processes in the current user's session at least, is better than that - we check if a file we want to replace is actually in use by a Cygwin process and offer to terminate that for you. If that isn't working, that would probably be a bug, and we'd like to hear about it. [1] https://cygwin.com/pipermail/cygwin-apps/2013-February/031448.html I realize this is all well-intentioned, but this discussion is not actually contributing very much. As always, the difficulty in making this change is not working out what setup should do, but that someone has to do it. (A situation unfortunately so common, we have an acronym for it: [2]) [2] https://cygwin.com/acronyms/#SHTDI ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: setup-x86_64.exe (bug ?): Cannot write to /usr/bin/cygwin1.dll - cyserver squatting it... 2023-11-16 7:03 ` Martin Wege 2023-11-16 7:50 ` Brian Inglis @ 2023-11-19 22:03 ` Jon Turney 1 sibling, 0 replies; 7+ messages in thread From: Jon Turney @ 2023-11-19 22:03 UTC (permalink / raw) To: Martin Wege, The Cygwin Mailing List On 16/11/2023 07:03, Martin Wege via Cygwin wrote: > On Wed, Nov 15, 2023 at 6:05 PM Andrey Repin via Cygwin > <cygwin@cygwin.com> wrote: >> [...] >> >>> ---- snip ---- >>> Unable to extract /usr/bin/cygwin1.dll -- error writing file >>> ---- snip ---- >> >>> The fix is to do a $ sc stop cygserver # as Administrator, then >>> "setup-x86_64.exe" can write to that file, and after "setup" is done do a $ sc start cygserverr # as Admin again. >> >>> ... is it possible to modify "setup-x86_64.exe" to stop cygserver before >>> doing the installation process and re-start it after it ? Yes, the source code is available. :) >> There's no reason to do so, as there's no easy way to detect beforehand, if >> you actually need to do so. > > sc query cygserver is EASY to detect. Unfortunately, this is not what's actually needed: To generically detect a service which (is the parent of) a process which has a file which setup wants to update open. That said, I'd certainly be open to patches which improve matters without solving the problem with full generality, but just observing they are "EASY" doesn't bring them into existence... Anyhow, you can see the old discussion about how we might add this feature back when I added the current limited support for terminating processes which have needed files open. starting at [1]. Perhaps someone cleverer or more diligent than me will progress this... [1] https://cygwin.com/pipermail/cygwin-apps/2013-February/031448.html ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-11-19 22:04 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <a0f1e420-ae48-49a3-9300-c56f1948ad9b.8d485f54-9f47-42b0-bdcb-9635fbf663c3.331c6002-7ca1-4c59-9494-402e573a76ee@emailsignatures365.codetwo.com> [not found] ` <a0f1e420-ae48-49a3-9300-c56f1948ad9b.e52b7f5f-5a09-4346-99f8-a6591191169c.d8646e54-e135-4b48-b201-e04c766db67c@emailsignatures365.codetwo.com> 2023-11-15 13:57 ` setup-x86_64.exe (bug ?): Cannot write to /usr/bin/cygwin1.dll - cyserver squatting it Mainz, Roland 2023-11-15 17:01 ` Andrey Repin 2023-11-16 7:03 ` Martin Wege 2023-11-16 7:50 ` Brian Inglis 2023-11-16 15:50 ` Bill Sharp 2023-11-19 22:04 ` Jon Turney 2023-11-19 22:03 ` Jon Turney
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).