Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installer - Allow /CloseApplications to do what it needs to ensure that silent install/upgrades complete successfully #312

Closed
ferventcoder opened this issue Aug 24, 2015 · 92 comments

Comments

@ferventcoder
Copy link

As a user installing/upgrading silently, if something like ssh-agent is running, it can cause the process to hang or fail. It would be nice to be able to pass something like /CLOSEAPPLICATIONS to signify that "Yes, I am sure I would like everything closed so the install/upgrade can continue".

For a GUI based installer, I agree with @sschuberth on "it simply does not feel right to kill ssh-agent without asking the user first." However, for a silent install, a user should be able to pass something that signifies that they are okay with moving forward with whatever is necessary to make the install/upgrade happen successfully.

The relevant code blocks look to have moved over to https://github.com/git-for-windows/build-extra/blob/9f0c810c3872e335218833157272cde7d9f6b7a8/installer/install.iss.in#L349-L418

Follow up from msysgit/msysgit#249.

@dscho
Copy link
Member

dscho commented Aug 24, 2015

Thanks for following up. I agree with the reasoning. @ferventcoder have you managed to build an installer using the new Git for Windows SDK yet? If so, could you just patch in the relevant usr\bin\ssh-agent.exe lines and see whether it Does The Right Thing?

@ferventcoder
Copy link
Author

I'm good to help out, I haven't attempted to build with the new SDK yet. :)

@dscho
Copy link
Member

dscho commented Aug 24, 2015

@ferventcoder could you do that? I'll need you to test things with the new SDK anyway...

@dscho
Copy link
Member

dscho commented Aug 25, 2015

@ferventcoder once you installed the Git for Windows SDK, you can make an installer using the silent-install branch.

If that manages to find the ssh-agent and close it, I will merge said branch. Could you please test?

@ferventcoder
Copy link
Author

Will do. Hopefully today.

@ferventcoder
Copy link
Author

Attempted to extract produced an issue:
image

I don't need a proxy.

@ferventcoder
Copy link
Author

I think a reboot may be necessary.

ping dl.bintray.com times out.

@dscho
Copy link
Member

dscho commented Aug 25, 2015

ping dl.bintray.com times out.

That is correct, dl.bintray.com does not answer.

But does it resolve, that is the question... If in doubt, you could either switch to Google's DNS (8.8.8.8) or put the entry "5.153.24.114 dl.bintray.com" into your C:\Windows\system32\drivers\etc\hosts.

Or maybe just restarting the SDK installer will work around that problem?

@ferventcoder
Copy link
Author

Or maybe just restarting the SDK installer will work around that problem?

Gave it a couple of shots. I decided on a reboot to see if that clears things out. The next step is to flush the dns cache, as that was not the IP address that the machine in question attempting to ping. :/

Usually use Google's DNS, but I'll check for sure. I believe it is a local machine issue.

@ferventcoder
Copy link
Author

Do you think the issue is possibly a permission-related issue with regards to bintray?

These items don't show up, but that doesn't mean they won't work.
Based on mirrorlist.git-for-windows:

These don't have any public direct downloads:

@ferventcoder
Copy link
Author

No, that's not the issue. If I keep trying enough times, it works. :/ Definitely something with my machine.

@ferventcoder
Copy link
Author

Okay, got something built, will test in a little while and give you a heads up. :)

@dscho
Copy link
Member

dscho commented Aug 25, 2015

Thanks!

@ferventcoder
Copy link
Author

Doesn't quite look like that worked

image

@dscho
Copy link
Member

dscho commented Aug 26, 2015

Darn. Will have a look tomorrow.

@ferventcoder
Copy link
Author

@dscho I wonder if the uninstall was coming from the OLDer git that was installed? Perhaps I should generate two installers and try this. One to install and run, and the next for upgrade?

@dscho
Copy link
Member

dscho commented Aug 27, 2015

I wonder if the uninstall was coming from the OLDer git that was installed?

Oh my, you are absolutely correct!

Perhaps I should generate two installers and try this. One to install and run, and the next for upgrade?

Actually, one and the same installer should be enough. You can reinstall one and the same version, e.g. to reinitialize messed-up installations or to change the settings in the wizard pages.

So maybe you can install it once (without a running ssh-agent), then start the ssh-agent, and then try the silent installation again?

Thank you so much!

@ferventcoder
Copy link
Author

Will do.

@dscho
Copy link
Member

dscho commented Aug 28, 2015

Thank you!

@TheBigBear
Copy link

@ferventcoder @dscho I am also a users that is installing/upgrading silently, does this mean that there is a /silent and a /silent-uninstall option in the works and coming out real soon now? ;-)

The github support person, Scott Sanicki, that I asked this question via email pointed me to the Squirrel.Windows project and said that the Github Desktop software was going to switch to that installer to finally get a working /silent install option?

What cpomes first? This /silent and /uninstall under discussion here, or the switch to the Squirrel.Windows (ClickOnce act-a-like but better) installer?

quote from email from "Scott Sanicki (Github staff)"

Unfortunately we do not have a standalone installer at this time. GitHub Desktop makes use of Microsoft's ClickOnce technology for installation and updates.

We are currently working on an open source replacement for ClickOnce here: https://github.com/squirrel/squirrel.windows (We're always looking for contributors to help!)

Once that technology is complete and ready for use, we hope to switch GitHub Desktop to use that. It would allow for a standalone installer.

PS: I also just noticed that Squirrel.Windows reached 1.0 status within the last few days.

@dscho
Copy link
Member

dscho commented Aug 28, 2015

@TheBigBear please note that GitHub for Windows and Git for Windows are different projects. It is true that GitHub for Windows bundles a portable version of Git for Windows, but that does not include the installer that this ticket is about.

@TheBigBear
Copy link

@dscho so this one relates to 'git-for-windows' (dooh read the URL!) ;-) aka the friendly fork of msysgit which has just come out as the first windows version of a windows cmd line git in that line of succession without a 'preview' in the naming and came out right away with version number 2.5.0?

Ah, I see, sorry for the confusion, my bad. I hadn't noticed the issues of the silent install and uninstalls hanging under certain conditions. (Note to self - more testing!)

Thanks @ferventcoder for coming to the resuce (once again), your efforts are really much appreciated.

@ferventcoder
Copy link
Author

@TheBigBear To answer the question about Squirrel for Windows, it already has a silent switch - -s.

@TheBigBear
Copy link

@ferventcoder yes, thanks, I know and like that part of it.
[But as an IT admin I don't really like the concept of 'user installs' at all - but that is an entirely differnet topic alltogether. ;-)]

But Squirel.Windows installer is not yet used as the installer of Github Desktop for windows.

ATM it only has the "ugly" "ugly" MS ClickOnce installer which can't be kept quiet or free of user interaction. (ugly not from aestehics or visual point of view, but from angle of IT admin seeking backgound silent mass deployment)

Rob sure you remember choco had to resort to using autohotkey macros - to get it installed quietly, and uninstall in a quiet way is near impssoible as there can be soo many reasons why it doesn't want to do it without interaction.

Sorry for using the 'bandwidth' in this (almost) totally un-related topic, for this long rant.

@ferventcoder
Copy link
Author

@dscho It's never as easy as we'd hope. :/

Git-2.5.1-test-64-bit.exe /VERYSILENT /NORESTART /NOCANCEL /SP- /CLOSEAPPLICATIONS /RESTARTAPPLICATIONS /NOICONS /COMPONENTS="icons,icons\quicklaunch,ext,ext\reg,ext\reg\shellhere,ext\reg\guihere,assoc,assoc_sh" /LOG

image

image

I wonder if InnoSetup has the concept of running arbitrary commands? Here's what I would see it do, not even sure it is legal yet though:

%systemroot%\system32\taskkill.exe /F /IM ssh-agent.exe /T

image

@dscho
Copy link
Member

dscho commented Aug 28, 2015

It's never as easy as we'd hope. :/

Bummer!

Here's what I would see it do, not even sure it is legal yet though:

taskkill /F /IM ssh-agent.exe /T

We have to be a little careful here because people might have another ssh-agent running, too, and we must not kill any ssh-agent that did not originate from Git for Windows...

@dscho
Copy link
Member

dscho commented Aug 28, 2015

Oh, wait a minute... Why is your ssh-agent running as vagrant? Are you sure it is the one from Git for Windows? You should be able to find out by having another (portable) Git for Windows somewhere and calling its ps -W | grep ssh-agent (which outputs the full path of ssh-agent).

@ferventcoder
Copy link
Author

I wonder if InnoSetup has the concept of running arbitrary commands?

Looks like it is possible - http://www.jrsoftware.org/ishelp/index.php?topic=isxfunc_exec
You are probably already familiar with that though.

We have to be a little careful here because people might have another ssh-agent running, too, and we must not kill any ssh-agent that did not originate from Git for Windows...

How do we know the difference? Or is that where the problem lies?

So two questions -

  1. Is killing all ssh-agent processes harmful (even the ones Git doesn't own) or just a minor annoyance?
  2. If we kill off all ssh-agent processes, what side effects could occur?

git-for-windows-ci pushed a commit that referenced this issue Sep 25, 2020
Fix problem where clone adds core.worktree due to path case differences
git-for-windows-ci pushed a commit that referenced this issue Sep 25, 2020
Fix problem where clone adds core.worktree due to path case differences
git-for-windows-ci pushed a commit that referenced this issue Sep 27, 2020
Fix problem where clone adds core.worktree due to path case differences
git-for-windows-ci pushed a commit that referenced this issue Sep 27, 2020
Fix problem where clone adds core.worktree due to path case differences
git-for-windows-ci pushed a commit that referenced this issue Sep 28, 2020
Fix problem where clone adds core.worktree due to path case differences
git-for-windows-ci pushed a commit that referenced this issue Sep 28, 2020
Fix problem where clone adds core.worktree due to path case differences
git-for-windows-ci pushed a commit that referenced this issue Sep 28, 2020
Fix problem where clone adds core.worktree due to path case differences
dscho added a commit that referenced this issue Sep 29, 2020
Fix problem where clone adds core.worktree due to path case differences
dscho added a commit that referenced this issue Sep 29, 2020
Fix problem where clone adds core.worktree due to path case differences
dscho added a commit that referenced this issue Sep 29, 2020
Fix problem where clone adds core.worktree due to path case differences
dscho added a commit that referenced this issue Sep 29, 2020
Fix problem where clone adds core.worktree due to path case differences
git-for-windows-ci pushed a commit that referenced this issue Sep 29, 2020
Fix problem where clone adds core.worktree due to path case differences
git-for-windows-ci pushed a commit that referenced this issue Sep 29, 2020
Fix problem where clone adds core.worktree due to path case differences
dscho added a commit that referenced this issue Sep 30, 2020
Fix problem where clone adds core.worktree due to path case differences
dscho added a commit that referenced this issue Oct 1, 2020
Fix problem where clone adds core.worktree due to path case differences
dscho added a commit that referenced this issue Oct 2, 2020
Fix problem where clone adds core.worktree due to path case differences
dscho added a commit that referenced this issue Oct 2, 2020
Fix problem where clone adds core.worktree due to path case differences
git-for-windows-ci pushed a commit that referenced this issue Oct 2, 2020
Fix problem where clone adds core.worktree due to path case differences
git-for-windows-ci pushed a commit that referenced this issue Oct 2, 2020
Fix problem where clone adds core.worktree due to path case differences
git-for-windows-ci pushed a commit that referenced this issue Oct 2, 2020
Fix problem where clone adds core.worktree due to path case differences
dscho added a commit that referenced this issue Oct 2, 2020
Fix problem where clone adds core.worktree due to path case differences
dscho added a commit that referenced this issue Oct 2, 2020
Fix problem where clone adds core.worktree due to path case differences
dscho added a commit that referenced this issue Oct 4, 2020
Fix problem where clone adds core.worktree due to path case differences
git-for-windows-ci pushed a commit that referenced this issue Oct 4, 2020
Fix problem where clone adds core.worktree due to path case differences
git-for-windows-ci pushed a commit that referenced this issue Oct 4, 2020
Fix problem where clone adds core.worktree due to path case differences
dscho added a commit that referenced this issue Oct 5, 2020
Fix problem where clone adds core.worktree due to path case differences
dscho added a commit that referenced this issue Oct 5, 2020
Fix problem where clone adds core.worktree due to path case differences
git-for-windows-ci pushed a commit that referenced this issue Oct 5, 2020
Fix problem where clone adds core.worktree due to path case differences
git-for-windows-ci pushed a commit that referenced this issue Oct 5, 2020
Fix problem where clone adds core.worktree due to path case differences
dscho added a commit that referenced this issue Oct 6, 2020
Fix problem where clone adds core.worktree due to path case differences
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants