http://bugs.winehq.org/show_bug.cgi?id=15679
Summary: cygwin symlinks not working in wine Product: Wine Version: 1.1.6 Platform: Other URL: http://cygwin.com OS/Version: other Status: NEW Keywords: download, source Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com
Surprisingly, cygwin seems to work nowadays, as long as you do everything inside a wineconsole running cygwin.bat. (Perhaps cygwin apps should work outside wineconsole; that would be a separate bug report.)
However, cygwin's gcc doesn't work unless you replace certain cygwin symlinks with unix ones, e.g. $ cd .wine/drive_c/cygwin/usr/i686-pc-cygwin/bin $ for a in *; do ln -sf ../../../bin/$a; done
Likewise, /bin/vi doesn't work, as it's a symlink to vim.exe.
In fact, cygwin's ls -l doesn't even recognize cygwin's symlinks as such:
$ ls -l vi -rw-r--r-- 1 dank mkpasswd 18 Oct 19 05:53 vi $ cat vi !<symlink>vim.exe
So either they're not being created right, or they're not being recognized properly by cygwin for some reason, or both.
http://bugs.winehq.org/show_bug.cgi?id=15679
Paul "TBBle" Hampson Paul.Hampson@Pobox.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |Paul.Hampson@Pobox.com
--- Comment #1 from Paul "TBBle" Hampson Paul.Hampson@Pobox.com 2009-01-13 06:01:05 --- To recognise that kind of shortcut (which the Cygwin source refers to as old-style shortcuts, contrasted with enhanced .lnk files) the file needs to have the System attribute set, and not the Directory attribute.
I presume the problem is that Wine doesn't show files as marked with the System attribute, since there's no really useful POSIX equivalent that comes to mind, so it prolly ignores the cygwin request to mark the file with the System attribute.
I haven't looked at the Wine code to verify this.
There's a winsymlinks option in the CYGWIN environment variable or the registry which enables .lnk-based symlinks, but those are only processed if marked Read-Only and non-Directory.
http://bugs.winehq.org/show_bug.cgi?id=15679
Jeff Zaroyko jeffz@jeffz.name changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
--- Comment #2 from Jeff Zaroyko jeffz@jeffz.name 2009-03-19 05:33:41 --- *** Bug 17046 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=15679
--- Comment #3 from Dan Kegel dank@kegel.com 2009-08-27 23:17:36 --- *** Bug 19856 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=15679
--- Comment #4 from Dan Kegel dank@kegel.com 2009-08-27 23:19:36 --- Heh. Maybe Wine should treat that as a request to create a real symlink.
http://bugs.winehq.org/show_bug.cgi?id=15679
--- Comment #5 from Dan Kegel dank@kegel.com 2009-08-27 23:47:03 --- Or maybe cygwin could always use .lnk symlinks on wine.
Looking at path.cc, I see there is already a special case for one odd filesystem that doesn't support the system attribute:
/* MVFS doesn't handle the SYSTEM DOS attribute, but it handles the R/O attribute. Therefore we create symlinks on MVFS always as shortcuts. */ mk_winsym |= win32_newpath.fs_is_mvfs ();
How 'bout extending that special case to handle wine, too, a la
/* MVFS doesn't handle the SYSTEM DOS attribute, but it handles the R/O attribute. Therefore we create symlinks on MVFS always as shortcuts. Same thing for Wine... it lies about its filesystem, so just detect Wine in general. */ mk_winsym |= win32_newpath.fs_is_mvfs () || is_wine ();
where is_wine() is something like
bool is_wine() { static bool iswine = false; static bool checked = false; if (!checked) { HMODULE h = GetModuleHandle("ntdll.dll"); if (h && GetProcAddress(hntdll, "wine_get_version")) iswine = true; checked = true; } return iswine; }
? Or is that too gross?
(BTW I tried exporting CYGWIN=winsymlinks before running cygwin's setup when installing from scratch, but it didn't see to work; I would have expected /bin/cc to be installed when I selected the 'gcc' package, but it wasn't, nor were there any .lnk files in /bin.)
http://bugs.winehq.org/show_bug.cgi?id=15679
--- Comment #6 from Dan Kegel dank@kegel.com 2009-08-28 10:17:08 --- dup of bug 9158?
Now that Ubuntu and Fedora turn on user_xattr by default, maybe we can use xattr's to store the hidden and system bits.
http://bugs.winehq.org/show_bug.cgi?id=15679
--- Comment #7 from Dan Kegel dank@kegel.com 2009-09-05 18:15:27 --- Created an attachment (id=23460) --> (http://bugs.winehq.org/attachment.cgi?id=23460) First draft of implementation of FILE_ATTRIBUTE_SYSTEM et al
So implementing partial support for FILE_ATTRIBUTE_SYSTEM using xattr wasn't too hard. The attached patch passes its tests on vista and wine. It should compile on mac. For info about porting it to bsd and solaris, see the (unapplied) patch to apr, http://oss.metaparadigm.com/apache-privsep/2.3.0-dev/xattr-patches/apr-xattr...
BUT it doesn't seem to make cygwin recognize /usr/bin/vi as a real symlink, so there may be more to do.
http://bugs.winehq.org/show_bug.cgi?id=15679
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #23460|0 |1 is obsolete| |
--- Comment #8 from Dan Kegel dank@kegel.com 2009-09-06 09:13:44 --- Created an attachment (id=23469) --> (http://bugs.winehq.org/attachment.cgi?id=23469) Second draft of xattr patch
This draft makes FindNextFile see the system attribute, too. It still doesn't make cygwin's ls happy. And it doesn't validate the contents of the xattr properly yet. Time for more conformance tests.
http://bugs.winehq.org/show_bug.cgi?id=15679
--- Comment #9 from Dan Kegel dank@kegel.com 2009-09-06 23:44:21 --- Created an attachment (id=23483) --> (http://bugs.winehq.org/attachment.cgi?id=23483) Third draft of xattr patch
Hey, this version seems to work. ('Course, you need either or both of the patches to fix wineconsole and cygwin crashes to be able to tell that cygwin symlinks are recognized.) It's less ugly but a bit more invasive.
Includes tests; they pass on both Wine and Vista.
Next step is to handle the HIDDEN attribute as well, and make sure it doesn't cause any regressions.
http://bugs.winehq.org/show_bug.cgi?id=15679
--- Comment #10 from Austin English austinenglish@gmail.com 2009-09-06 23:49:26 --- (In reply to comment #9)
and make sure it doesn't cause any regressions.
*cough* appinstall *cough*
http://bugs.winehq.org/show_bug.cgi?id=15679
--- Comment #11 from Dan Kegel dank@kegel.com 2009-09-06 23:51:52 --- Yes, need to test with appinstall, too. (You do realize appinstall is something I've been trying to get happen for years, right? I'm quite thrilled it's here, thanks.)
http://bugs.winehq.org/show_bug.cgi?id=15679
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #23469|0 |1 is obsolete| | Attachment #23483|0 |1 is obsolete| |
--- Comment #12 from Dan Kegel dank@kegel.com 2009-09-07 12:07:31 --- Created an attachment (id=23493) --> (http://bugs.winehq.org/attachment.cgi?id=23493) Fourth draft of xattr patch
This one adds support for setting attributes in cmd's attrib verb. Seems to be in good shape on linux. Next step is to get it working on mac, and do full conformance and appinstall tests.
http://bugs.winehq.org/show_bug.cgi?id=15679
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #23493|0 |1 is obsolete| |
--- Comment #13 from Dan Kegel dank@kegel.com 2009-09-07 21:47:00 --- Created an attachment (id=23501) --> (http://bugs.winehq.org/attachment.cgi?id=23501) Fifth draft of implementation of FILE_ATTRIBUTE_SYSTEM et al
Builds and seems to work on the Mac. Ready for appinstall testing. I posted a note about this to wine-devel.
http://bugs.winehq.org/show_bug.cgi?id=15679
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #23501|0 |1 is obsolete| | Status|NEW |ASSIGNED AssignedTo|wine-bugs@winehq.org |dank@kegel.com
--- Comment #14 from Dan Kegel dank@kegel.com 2009-09-08 09:13:28 --- Created an attachment (id=23509) --> (http://bugs.winehq.org/attachment.cgi?id=23509) sixth draft, more samba3-compatible
http://bugs.winehq.org/show_bug.cgi?id=15679
--- Comment #15 from Dan Kegel dank@kegel.com 2009-09-24 13:17:29 --- patch series sent, starting with http://www.winehq.org/pipermail/wine-patches/2009-September/078862.html
http://bugs.winehq.org/show_bug.cgi?id=15679
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #23509|0 |1 is obsolete| |
--- Comment #16 from Dan Kegel dank@kegel.com 2009-09-29 01:17:22 --- Created an attachment (id=23823) --> (http://bugs.winehq.org/attachment.cgi?id=23823) tenth draft, works better with directories and symlinks to directories
This draft addresses feedback from Alexandre Julliard. It adds tests for directories and symlinks to directories. Needs to be split up into about five pieces. Only tested on Ubuntu 8.04 which lacks xattr support; tests pass on Windows Vista.
http://bugs.winehq.org/show_bug.cgi?id=15679
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #23823|0 |1 is obsolete| |
--- Comment #17 from Dan Kegel dank@kegel.com 2009-10-02 19:27:44 --- Created an attachment (id=23883) --> (http://bugs.winehq.org/attachment.cgi?id=23883) [1/3] ntdll: add test for NtQueryAttributesFile, test .hidden files
http://bugs.winehq.org/show_bug.cgi?id=15679
--- Comment #18 from Dan Kegel dank@kegel.com 2009-10-02 19:28:34 --- Created an attachment (id=23884) --> (http://bugs.winehq.org/attachment.cgi?id=23884) [2/3] ntdll: Move logic which computes file attributes to new function DIR_get_attributes() (take 7)
http://bugs.winehq.org/show_bug.cgi?id=15679
--- Comment #19 from Dan Kegel dank@kegel.com 2009-10-02 19:30:53 --- Created an attachment (id=23885) --> (http://bugs.winehq.org/attachment.cgi?id=23885) [3/3] ntdll: Implement FILE_ATTRIBUTE_HIDDEN and FILE_ATTRIBUTE_SYSTEM using unix extended attributes like samba 3 does (take 7)
One more try. I'll run it through Austin's appinstall test before submitting.
http://bugs.winehq.org/show_bug.cgi?id=15679
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #23883|0 |1 is obsolete| | Attachment #23884|0 |1 is obsolete| | Attachment #23885|0 |1 is obsolete| |
--- Comment #20 from Dan Kegel dank@kegel.com 2009-10-06 18:25:07 --- Created an attachment (id=23961) --> (http://bugs.winehq.org/attachment.cgi?id=23961) [PATCH 1/4] ntdll: add test for NtQueryAttributesFile, test .hidden files.
http://bugs.winehq.org/show_bug.cgi?id=15679
--- Comment #21 from Dan Kegel dank@kegel.com 2009-10-06 18:26:16 --- Created an attachment (id=23962) --> (http://bugs.winehq.org/attachment.cgi?id=23962) [PATCH 2/4] ntdll: move [f]stat logic to new helper function DIR_get_attributes.
http://bugs.winehq.org/show_bug.cgi?id=15679
--- Comment #22 from Dan Kegel dank@kegel.com 2009-10-06 18:26:46 --- Created an attachment (id=23963) --> (http://bugs.winehq.org/attachment.cgi?id=23963) [PATCH 3/4] ntdll: Move logic which computes file attributes into DIR_get_attributes()
http://bugs.winehq.org/show_bug.cgi?id=15679
--- Comment #23 from Dan Kegel dank@kegel.com 2009-10-06 18:27:22 --- Created an attachment (id=23964) --> (http://bugs.winehq.org/attachment.cgi?id=23964) [PATCH 4/4] ntdll: Implement FILE_ATTRIBUTE_HIDDEN and FILE_ATTRIBUTE_SYSTEM using unix extended attributes like samba 3 does
OK, this addresses Juan's comments.
http://bugs.winehq.org/show_bug.cgi?id=15679
--- Comment #24 from Dan Kegel dank@kegel.com 2009-10-06 18:30:22 --- Sigh. I noticed one bit I missed, right after posting. Please ignore.
http://bugs.winehq.org/show_bug.cgi?id=15679
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #23961|0 |1 is obsolete| |
--- Comment #25 from Dan Kegel dank@kegel.com 2009-10-06 19:30:49 --- Created an attachment (id=23965) --> (http://bugs.winehq.org/attachment.cgi?id=23965) [PATCH 1/4] ntdll: add test for NtQueryAttributesFile, test .hidden files.
OK, look now.
http://bugs.winehq.org/show_bug.cgi?id=15679
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW
--- Comment #26 from Dan Kegel dank@kegel.com 2009-10-14 12:52:18 --- Sent as the four patches starting with http://www.winehq.org/pipermail/wine-patches/2009-October/079839.html
I think I'm done with this for a while. Hopefully Alexandre will take pity on me and either commit it or fix it up himself and commit it...
http://bugs.winehq.org/show_bug.cgi?id=15679
Jeff Zaroyko jeffz@jeffz.name changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
http://bugs.winehq.org/show_bug.cgi?id=15679
--- Comment #27 from Austin English austinenglish@gmail.com 2013-03-26 18:54:38 CDT --- austin@aw25 ~/.wine/drive_c/cygwin/bin $ file vi vi: ASCII text, with no line terminators austin@aw25 ~/.wine/drive_c/cygwin/bin $ cat vi !<symlink>vim-nox.exe
still in wine-1.5.26-88-gfbe7ab5
https://bugs.winehq.org/show_bug.cgi?id=15679
Qian Hong fracting@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fracting@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=15679
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv@dawncrow.de
--- Comment #28 from André H. nerv@dawncrow.de --- This is fixed in wine-staging as of version 1.7.51
and even hardlinks work, in fact they are the same as native ones
https://bugs.winehq.org/show_bug.cgi?id=15679
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
https://bugs.winehq.org/show_bug.cgi?id=15679
Saulius K. saulius2@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |saulius2@gmail.com
--- Comment #29 from Saulius K. saulius2@gmail.com --- (In reply to André H. from comment #28)
This is fixed in wine-staging as of version 1.7.51
and even hardlinks work, in fact they are the same as native ones
André, I guess you are talking about these patches:
[4]:https://github.com/wine-compholio/wine-staging/tree/master/patches/ntdll-DOS...
https://bugs.winehq.org/show_bug.cgi?id=15679
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man@post.com
--- Comment #30 from super_man@post.com --- (In reply to André H. from comment #28)
This is fixed in wine-staging as of version 1.7.51
and even hardlinks work, in fact they are the same as native ones
Can considered as staged then.
https://bugs.winehq.org/show_bug.cgi?id=15679
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |STAGED CC| |focht@gmx.net Component|-unknown |ntdll Hardware|Other |x86 Assignee|dank@kegel.com |wine-bugs@winehq.org Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/ntdll-DOS_Attr | |ibutes OS|other |Linux
https://bugs.winehq.org/show_bug.cgi?id=15679
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Staged patchset|https://github.com/wine-com |https://github.com/wine-sta |pholio/wine-staging/tree/ma |ging/wine-staging/tree/mast |ster/patches/ntdll-DOS_Attr |er/patches/ntdll-DOS_Attrib |ibutes |utes
https://bugs.winehq.org/show_bug.cgi?id=15679
Joel Holdsworth joel@airwebreathe.org.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |joel@airwebreathe.org.uk
https://bugs.winehq.org/show_bug.cgi?id=15679
Erich E. Hoover erich.e.hoover@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |erich.e.hoover@gmail.com
--- Comment #31 from Erich E. Hoover erich.e.hoover@gmail.com --- Could someone retest this? I believe this should be fixed (for most platforms) by commit 0a223f17e1fb4aafb43906aeffe00eadc81cf8c2.
https://bugs.winehq.org/show_bug.cgi?id=15679
Bernhard Übelacker bernhardu@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bernhardu@mailbox.org
--- Comment #32 from Bernhard Übelacker bernhardu@mailbox.org --- (In reply to Erich E. Hoover from comment #31)
Could someone retest this? I believe this should be fixed (for most platforms) by commit 0a223f17e1fb4aafb43906aeffe00eadc81cf8c2.
In cygwin bash: $ mkdir a $ ln -s a b $ ls -lisahd a b 172527619 0 drwx---r-x+ 1 RECHNER+bernhard ... 0 18. Okt 22:13 a 172504287 4,0K lrwxrwxrwx 1 RECHNER+bernhard ... 1 18. Okt 22:13 b -> a
In wine64 cmd: C:>dir b File not found.
C:>attrib b AS C:\b
In native bash: $ hexdump -C b 00000000 21 3c 73 79 6d 6c 69 6e 6b 3e ff fe 61 00 00 00 |!<symlink>..a...| 00000010
(tested with a few unrelated patches applied to get cygwin running.)
From my point of view cygwin recognizes now the symlinks correctly. I guess this bug could be closed then.
https://bugs.winehq.org/show_bug.cgi?id=15679
Erich E. Hoover erich.e.hoover@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |0a223f17e1fb4aafb43906aeffe | |00eadc81cf8c2 Status|STAGED |RESOLVED Resolution|--- |FIXED
--- Comment #33 from Erich E. Hoover erich.e.hoover@gmail.com --- Reported fixed.
https://bugs.winehq.org/show_bug.cgi?id=15679
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #34 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 7.20.