-
Notifications
You must be signed in to change notification settings - Fork 44
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
Privileges escalate by default for Windows on CI #178
Comments
@jaimergp, also, do you know of a way to display or save the install log from NSIS when executing the installer from the command line? |
Revert after conda/menuinst#178 is resolved
GHA on Windows runs as an administrator account, so constructor, conda-standalone and menuinst will run in sudo mode, believing it's an all-users install. I've observed the same behavior in napari and gave up because it does work locally. Maybe we can allow overrides at some point but for now that's the known behavior. For the logs, you need to build your installers with the logging build of nsis. See https://github.com/conda/constructor/blob/d934f13d103359d0d208108fa53ccf529d143cd7/dev/extra-requirements-windows.txt#L1. |
I see, thank you. So
Thank you! 🙏 😊 I was not aware of that! Is there a flag I need to use on the command line? Or will it automatically send logs to stdout? to log file? |
You will find a |
start /wait Spyder-6.0.0a4.dev150-Windows-x86_64.exe /S Hmm... I can't find the log file... What am I missing? Installer Build Environment
construct.yamlname: Spyder
company: Spyder-IDE
reverse_domain_identifier: org.spyder-ide.Spyder
version: 6.0.0a4.dev150
channels:
- local
- conda-forge/label/spyder_kernels_rc
- conda-forge
conda_default_channels:
- conda-forge
- defaults
specs:
- python=3.10.13
- conda >=23.11.0
- menuinst >=2.0.2
- mamba
installer_filename: Spyder-6.0.0a4.dev150-Windows-x86_64.exe
installer_type: exe
initialize_by_default: false
initialize_conda: false
register_python: false
register_envs: false
extra_envs:
spyder-runtime:
specs:
- python=3.10.13
- spyder=6.0.0a4.dev150
- cython
- matplotlib
- numpy
- openpyxl
- pandas
- scipy
- sympy
- python-lsp-server=1.9.1.dev6
- qtconsole=5.5.1.dev1
- spyder-kernels=3.0.0b4.dev3
extra_files:
- C:\Users\rclary\Documents\Repos\spyder\installers-conda\resources\bundle_readme.md: README.txt
- C:\Users\rclary\Documents\Repos\spyder\installers-conda\build\condarc: .condarc
license_file:
C:\Users\rclary\Documents\Repos\spyder\installers-conda\resources\bundle_license.rtf
welcome_image:
C:\Users\rclary\Documents\Repos\spyder\installers-conda\build\welcome_img_win.png
header_image: C:\Users\rclary\Documents\Repos\spyder\installers-conda\build\header_img_win.png
icon_image: C:\Users\rclary\Documents\Repos\spyder\img_src\spyder.ico
default_prefix: '%LOCALAPPDATA%\spyder-6'
default_prefix_domain_user: '%LOCALAPPDATA%\spyder-6'
default_prefix_all_users: '%ALLUSERSPROFILE%\spyder-6'
check_path_length: false
pre_install:
C:\Users\rclary\Documents\Repos\spyder\installers-conda\resources\pre-install.bat
post_install:
C:\Users\rclary\Documents\Repos\spyder\installers-conda\resources\post-install.bat |
That should be enough, I think? This is how we run it in CI, in case it helps. Maybe specify |
I tried that as well. However, I'm running it locally right now, so maybe it needs admin privileges for some reason? I'll test that also... |
Found the issue. The environment variable @jaimergp, thanks for all your help on this! I really appreciate all the work you and others have done on upgrading |
Aaah, yes, I remember now. Sorry about that obscure detail 😬 I'll add it to the documentation. |
@jaimergp, when uninstalling, the uninstaller requests the user to restart now or later. This seems to be a result of failing to remove the |
I can add some more perspective about that log file and why we (on the Anaconda side) don't use it in production:
This is not a bug. |
Hmm...thanks @marcoesters, I will reconsider using the NSIS log version. My motivation was to provide some debugging information for developers, but if it will cause more problems for end users it may be counterproductive. |
For CIs, enabling logging could be okay because these corner cases don't apply there/are easily fixable. What I do is enable logging for dev builds of installers and integration testing. I only disable logging for production. |
Checklist
What happened?
@jaimergp, when testing the Windows installers for Spyder,
menuinst
creates the shortcut for_mode=system
rather than_mode=user
, but only on CI. This does not occur for macOS or Linux./InstallationType=JustMe /NoRegistry=1
flags). See this run. When I ssh into the workflow, I see that.nonadmin
is present in both the base and target prefixes./NoRegistry=1
) with the same successful result. See this run without test.What could be causing the problem on CI?
Conda Info
See https://github.com/spyder-ide/spyder/actions/runs/7589583691/job/20674537112
Conda Config
See https://github.com/spyder-ide/spyder/actions/runs/7589583691/job/20674537112
Conda list
See https://github.com/spyder-ide/spyder/actions/runs/7589583691/job/20674537112
Additional Context
No response
The text was updated successfully, but these errors were encountered: