microsoft / microsoft/winget-pkgs
[Package Issue]: Cygwin.Cygwin
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 11.1k
- Forks
- 9.7k
- Avg merge
- 1h 32m
- Merged PRs (30d)
- 376
Description
Please confirm these before moving forward
- I have searched for my issue and not found a work-in-progress/duplicate/resolved issue.
- I have not been informed if the issue is resolved in a preview version of the winget client.
Category of the issue
Installation issue.
Brief description of your issue
install fails
Steps to reproduce
as a user without admin perms winget configure --file blah.yaml
where blah.yaml contains
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: cygwin
directives:
description: Install cygwin
allowPrerelease: true
settings:
id: Cygwin.Cygwin
source: winget
Actual behavior
install fails
cygwin log contains ->
2024/01/08 12:01:41 Starting cygwin install, version 2.928
2024/01/08 12:01:41 User has NO backup/restore rights
2024/01/08 12:01:41 User has NO symlink creation right
2024/01/08 12:01:41 io_stream_cygfile: fopen(/etc/setup/setup.rc) failed 2 No such file or directory
2024/01/08 12:01:41 Current Directory: C:\Windows\system32
2024/01/08 12:01:41 root: C:\cygwin64 user
2024/01/08 12:01:41 Changing gid back to original
2024/01/08 12:01:41 Selected local directory: C:\Windows\system32
2024/01/08 12:01:41 net: Preconfig
2024/01/08 12:01:42 site: https://mirror.aarnet.edu.au/pub/sourceware/cygwin/
...
2024/01/08 12:01:50 74 install openssl 3.0.12-1
2024/01/08 12:01:50 mbox fatal: Can't open C:\Windows\system32/https%3a%2f%2fmirror.aarnet.edu.au%2fpub%2fsourceware%2fcygwin%2f/x86_64/release/popt/libpopt-common/libpopt-common-1.19-1.tar.xz.tmp for writing: No such file or directory
2024/01/08 12:01:50 unattended_mode is set at mbox: returning default value
2024/01/08 12:01:50 Ending cygwin install
Expected behavior
install succeeds.
download uses a temp directory and not the current directory for downloading packages (and never system32!)
Environment
Windows Package Manager v1.6.3482
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22631.2861
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.21.3482.0
Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User) %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User) %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root C:\Program Files\WinGet\Packages
Portable Package Root (x86) C:\Program Files (x86)\WinGet\Packages
Installer Downloads %USERPROFILE%\Downloads
Links
---------------------------------------------------------------------------
Privacy Statement https://aka.ms/winget-privacy
License Agreement https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale
Admin Setting State
--------------------------------------------------
LocalManifestFiles Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride Disabled
LocalArchiveMalwareScanOverride Disabled
Screenshots and Logs
2024/01/08 12:01:50 mbox fatal: Can't open C:\Windows\system32/https%3a%2f%2fmirror.aarnet.edu.au%2fpub%2fsourceware%2fcygwin%2f/x86_64/release/popt/libpopt-common/libpopt-common-1.19-1.tar.xz.tmp for writing: No such file or directory
2024/01/08 12:01:50 unattended_mode is set at mbox: returning default value
2024/01/08 12:01:50 Ending cygwin install
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing winget configure --file blah.yaml as a non-admin user with the shown Microsoft.WinGet.DSC/WinGetPackage resource, then trace how the configure command selects the installer working directory. Use the Cygwin log as the failure signal; done means package downloads no longer target C:\Windows\system32 and the installation succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- yaml
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100