[Bug 29661] New: wineboot unable to create win32 prefix under certain conditions
http://bugs.winehq.org/show_bug.cgi?id=29661 Bug #: 29661 Summary: wineboot unable to create win32 prefix under certain conditions Product: Wine Version: unspecified Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: programs AssignedTo: wine-bugs(a)winehq.org ReportedBy: jonasa(a)gmail.com Classification: Unclassified wineboot is unable to create 32bit prefix on 64bit linux if when the folder exists because existings (empty or otherwise) folders are treated as 64bit prefixes. To reproduce: Create 32bit prefix: # Create empty folder mkdir /home/wine/photoshop # Try setup a new 32bit prefix WINEPREFIX='/home/wine/photoshop' WINEARCH='win32' wine 'wineboot' Result wine gives this error: wine: WINEARCH set to win32 but '/home/wine/photoshop' is a 64-bit installation. Remove the folder and you are able to created the prefix. Create 64bit prefix: # Create empty folder mkdir /home/wine/photoshop # Try setup a new 64bit prefix WINEPREFIX='/home/wine/photoshop' WINEARCH='win32' wine 'wineboot' Result: 64bit prefix is created! I don't know if this is the intended behavior, but it is not intuitive and the error message is not helpful. The error is generated in /wine/dlls/ntdll/server.c on line 1116 -- Wine version: 1.3.37 OS: Arch Linux 64bit -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29661 JKAbrams <jonasa(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |1.3.37 -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29661 --- Comment #1 from Alexandre Julliard <julliard(a)winehq.org> 2012-01-20 07:03:26 CST --- There shouldn't be any reason to create the directory beforehand. We rely on the fact that it doesn't exist to avoid races on creation. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29661 JKAbrams <jonasa(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonasa(a)gmail.com -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29661 --- Comment #2 from JKAbrams <jonasa(a)gmail.com> 2012-01-20 07:20:05 CST --- (In reply to comment #1)
There shouldn't be any reason to create the directory beforehand. We rely on the fact that it doesn't exist to avoid races on creation.
I must confess I know very little about race conditions but would it be possible to check for an existing folder and perhaps report this as an error? This issue creates trouble in q4wine when creating new prefixes and choosing an existing folder, but I'm sure it is possible to code around in q4wine. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29661 --- Comment #3 from Alexandre Julliard <julliard(a)winehq.org> 2012-01-20 07:41:37 CST --- An existing directory is not an error, it's just assumed to be a standard prefix. That's why creating a non-standard prefix requires the directory to be missing. If you want to force creation of a 32-bit prefix in an existing dir, you can always create a dummy 32-bit system.reg. Of course this has races too if some other process is starting in that dir... -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29661 Marcus Meissner <marcus(a)jet.franken.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marcus(a)jet.franken.de -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29661 Alex Richardson <alex.richardson(a)gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alex.richardson(a)gmx.de --- Comment #4 from Alex Richardson <alex.richardson(a)gmx.de> 2012-01-25 14:16:10 CST --- I just ran into this issue, too. I tried various things until I finally found that the directory must not exist. Would it be possible to output a different message if the directory is empty? I.e. something along the lines of "Cannot create a win32 prefix in an existing directory." -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29661 Sylvain Petreolle <spetreolle(a)yahoo.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |spetreolle(a)yahoo.fr -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29661 Ken Sharp <kennybobs(a)o2.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source Priority|P2 |P5 Status|UNCONFIRMED |NEW CC| |kennybobs(a)o2.co.uk Ever Confirmed|0 |1 Severity|minor |enhancement --- Comment #5 from Ken Sharp <kennybobs(a)o2.co.uk> 2012-10-28 11:18:08 CDT --- Confirming. It's not really a priority when a "WINEPREFIX=/foo/bar WINEARCH=win32 wineboot -i" will create a clean WINEPREFIX. At the moment, however, it's not possible to create a WINEPREFIX in /tmp (which is handy) because the user is never the owner, and this bug report explains why creating an empty directory doesn't work. Perhaps Wine could check for the sticky bit if the owner check fails, but this, again, could easily cause problems. Again, there is a workaround to this, though: mkdir /tmp/wine.$USER WINEPREFIX=/tmp/wine.$USER/foo wineboot -i It's really only scripts that should hit this problem, and the workarounds are fairly simple. The only thing that could be changed then, is the error message as explained above. if [ -d $WINEPREFIX ]; then echo "Error: $WINEPREFIX already exists!" exit 1 fi -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=29661 Adam Bolte <abolte(a)systemsaviour.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |abolte(a)systemsaviour.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=29661 --- Comment #6 from Adam Bolte <abolte(a)systemsaviour.com> --- I just hit this, and spent 10 minutes scratching my head. Completely agree with Ken Sharp on the error message. For years, I have been creating new prefixes with something like: abolte(a)host:/a/very/long/path/i/dont/want/to/type$ mkdir steam && cd steam abolte(a)host:/a/very/long/path/i/dont/want/to/type$ WINEPREFIX="$(pwd)" wine SteamSetup.exe A few months ago I started using 64-bit prefixes for everything due to certain application requirements, and today I discovered I needed a new 32-bit prefix for winetricks to install a different app, and hit this. For a few minutes there I thought I must not have compiled or installed Wine correctly. Seems like a trivial change to improve usability of the software. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=29661 Sebastian Lackner <sebastian(a)fds-team.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian(a)fds-team.de --- Comment #7 from Sebastian Lackner <sebastian(a)fds-team.de> --- For everyone interested how to workaround this issue, here the solution used by Pipelight (simplified a bit): --- snip --- if [ ! -f "$WINEPREFIX/system.reg" ]; then if [ -d "$WINEPREFIX" ]; then # Directory exists, but without system.reg - # wine will assume wrong platform, so create dummy system.reg echo -en "WINE REGISTRY Version 2\n\n#arch=$WINEARCH\n" > "$WINEPREFIX/system.reg" fi "$WINE" wineboot.exe fi --- snip --- -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=29661 Rosanne DiMesio <dimesio(a)earthlink.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|wineboot unable to create |wineboot unable to create |win32 prefix under certain |win32 prefix if the |conditions |directory already exists -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=29661 ax 34noff <otaku(a)rambler.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |otaku(a)rambler.ru -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=29661 Sebastian Lackner <sebastian(a)fds-team.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/server-Win32_P | |refix CC| |dmitry(a)baikal.ru, | |erich.e.hoover(a)wine-staging | |.com, michael(a)fds-team.de Status|NEW |STAGED -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=29661 Sebastian Lackner <sebastian(a)fds-team.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|STAGED |RESOLVED Fixed by SHA1| |808619b72d1524df2c576ed5faa | |c67dd2093c0f3 --- Comment #8 from Sebastian Lackner <sebastian(a)fds-team.de> --- Fixed with 808619b72d1524df2c576ed5faac67dd2093c0f3. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=29661 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #9 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 1.9.20. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=29661 Michael Stefaniuc <mstefani(a)redhat.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.8.x -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=29661 Michael Stefaniuc <mstefani(a)redhat.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.8.x |--- --- Comment #10 from Michael Stefaniuc <mstefani(a)redhat.com> --- Removing 1.8.x milestone from bugs included in 1.8.6. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org