Compare commits

..

39 Commits

Author SHA1 Message Date
Sebastian Lackner
1e1522ed25 Release 1.7.32. 2014-11-30 15:25:01 +01:00
Sebastian Lackner
abfee2d1b4 README.md: Update URLs. 2014-11-30 04:00:14 +01:00
Sebastian Lackner
9a82696680 Move DEVELOPERS.md to the Wiki. 2014-11-30 03:56:52 +01:00
Sebastian Lackner
d7a1c87111 Added patch to fix possible invalid memory access in wordpad. 2014-11-30 03:28:18 +01:00
Sebastian Lackner
2e2178f595 Added patch to fix passing of unicode environment from msvcrt to CreateProcessW. 2014-11-30 03:11:04 +01:00
Sebastian Lackner
90bd4d997c Added patch to fix handling of empty section and key name for profile files. 2014-11-30 02:39:37 +01:00
Sebastian Lackner
557a9e9899 Added patch to fix ordering of IP addresses by metric if two addresses have the same metric. 2014-11-30 00:20:58 +01:00
Sebastian Lackner
50794f220a Added patch to implement semi-stub for psapi/kernel32 K32EnumProcessModulesEx. 2014-11-29 23:04:33 +01:00
Sebastian Lackner
bb57db5f98 Added patch to change winedbg bug reporting URL to bugs.wine-staging.com. 2014-11-29 21:08:08 +01:00
Sebastian Lackner
4afa857aee Added patchset to fix copy and paste errors and ugly coding style in recently committed ws32 patch. 2014-11-29 11:30:04 +01:00
Sebastian Lackner
db0fd400e4 patchupdate.py: Various speed optimizations and improvements, removed several patches (accepted upstream). 2014-11-29 09:18:17 +01:00
Michael Müller
e6d0cbe554 Remove old patches from api-ms-win-core-Stubs. 2014-11-26 22:06:56 +01:00
Michael Müller
c17a70e03f api-ms-win-core-Stubs: Add even more stubs and add missing exports. 2014-11-26 21:57:11 +01:00
Michael Müller
9d92d67b75 Added patch to implement stubs for additional api-ms-win-core-* dlls. 2014-11-26 20:47:57 +01:00
Sebastian Lackner
7f503dd5f1 Update several patches and include changes from tools/make_specfiles and tools/make_makefiles. 2014-11-26 18:30:43 +01:00
Michael Müller
81ffd32566 Add DXT1 to B4G4R4A4, DXT1 to B5G5R5A1 and DXT3 to B4G4R4A4 conversion patch. 2014-11-26 14:30:52 +01:00
Sebastian Lackner
432cb9a889 ntoskrnl-Emulator: Some small style fixes. 2014-11-26 12:37:05 +01:00
Sebastian Lackner
dd4efb315a ntoskrnl-Emulator: Move logic for user shared data into separate patchset. 2014-11-26 11:02:03 +01:00
Sebastian Lackner
1979f90644 ntdll-FD_Cache: Update patch to use more efficient functions on x86_64 systems. 2014-11-26 09:13:27 +01:00
Sebastian Lackner
3a7d42fd2c Added patch to ensure wintrust resets data->pWintrustData->u.pFile->hFile after closing handle. 2014-11-25 21:29:26 +01:00
Sebastian Lackner
bb565dbad1 Added patch to fix issues with dragging layers between images in Adobe Photoshop 7.0. 2014-11-25 20:41:19 +01:00
Sebastian Lackner
e4caae5b65 Added patch to avoid sending unexpected wakeup with uninitialized cookie value. 2014-11-25 20:20:55 +01:00
Sebastian Lackner
c2bceff255 Add missing file. 2014-11-23 22:57:58 +01:00
Sebastian Lackner
2741db55bd Added patch to automatically detect if tests are running under Wine. 2014-11-23 22:52:48 +01:00
Sebastian Lackner
3b946491da Added patch to avoid failure because of missing ptrace support for Exagear. 2014-11-23 22:35:30 +01:00
Sebastian Lackner
0301a239d6 patchupdate.py: Fix escaping of some special characters. 2014-11-23 19:45:14 +01:00
Sebastian Lackner
7c3d480e56 Added patch to fix issues with write watches when using Exagear. 2014-11-22 05:52:24 +01:00
Sebastian Lackner
50b6b69053 Added patch to avoid race-conditions of async WSARecv() operations with write watches. 2014-11-22 01:52:41 +01:00
Sebastian Lackner
cc1292a1ac Removed several patches (accepted upstream). 2014-11-21 17:00:52 +01:00
Sebastian Lackner
3741c4fe33 Added patch to ensure ShowWindow avoids interthread no-op messages. 2014-11-21 07:30:26 +01:00
Sebastian Lackner
744f67198c Added patch to take abs() of vertex z coordinate as FFP fog coordinate. 2014-11-21 06:42:40 +01:00
Sebastian Lackner
3d68d500d9 ws2_32-Connect_Time: Update patch with latest attempt. 2014-11-20 22:48:23 +01:00
Sebastian Lackner
2bdc19de1a server-CreateProcess_ACLs: Rebase for latest git changes. 2014-11-20 22:47:35 +01:00
Sebastian Lackner
6a390b6b9a Merge pull request #186 (Added patch to implement exclusive mode in PulseAudio backend). 2014-11-20 07:45:43 +01:00
Mark Harmstone
41293aeb8d Added patch to implement exclusive mode in PulseAudio backend 2014-11-18 18:54:35 +00:00
Sebastian Lackner
26b52cdc49 Removed patches to avoid sending messages in FindWindowExW (accepted upstream). 2014-11-18 19:50:19 +01:00
Sebastian Lackner
cc5b91441d patchutils.py: Add '--no-backup-if-mismatch' when calling 'patch' to avoid creating backups. 2014-11-18 04:15:56 +01:00
Sebastian Lackner
d31c55702c Removed several patches (accepted upstream). 2014-11-17 15:17:34 +01:00
Sebastian Lackner
54b4500a85 Added patch to ensure dbghelp always checks for debug symbols in BINDIR. 2014-11-15 20:24:21 +01:00
73 changed files with 3597 additions and 1582 deletions

3
.gitignore vendored
View File

@@ -1,5 +1,4 @@
debian/tools/wine
.depcache
.srccache
.patchupdate.cache
*.ok
*.pyc

View File

@@ -1,152 +0,0 @@
Developers and maintainers guide
================================
This document will provide some information targeted at developers, who
either want to build/package Wine Staging for their distribution, but also
for developers who would like to contribute their patches to Wine Staging,
to get them included in future releases.
Compiling Wine Staging
======================
**Warning:** Please note that starting with Staging 1.7.23 it is
deprecated to manually apply patches without using the Makefile. To avoid
typical pitfalls for package maintainers (like trying to use the patch
commandline utility for binary patches or not updating the patchlist) it is
highly recommended to use the Makefile in order to apply all patches. This
ensures that the the correct patch utility is used, that the list of patches
is updated appropriately, and so on. Please note that it is still possible
to exclude patches if desired, take a look at the end of this document for
more details.
Instructions
------------
The following instructions (based on the [Gentoo
Wiki](https://wiki.gentoo.org/wiki/Netflix/Pipelight#Compiling_manually))
will give a short overview how to compile Wine Staging, but of course not
explain all details. Make sure to install all required Wine dependencies
before proceeding.
As the first step please grab the latest Wine source:
```bash
wget http://prdownloads.sourceforge.net/wine/wine-1.7.31.tar.bz2
wget https://github.com/wine-compholio/wine-staging/archive/v1.7.31.tar.gz
```
Extract the archives:
```bash
tar xvjf wine-1*.tar.bz2
cd wine-1*
tar xvzf ../v1.7.31.tar.gz --strip-components 1
```
And apply the patches:
```bash
make -C ./patches DESTDIR=$(pwd) install
```
Afterwards run configure (you can also specify a prefix if you don't want to install
Wine Staging system-wide):
```bash
./configure --with-xattr
```
Before you continue you should make sure that `./configure` doesn't show any
warnings (look at the end of the output). If there are any warnings, this
most likely means that you're missing some important header files. Install
them and repeat the `./configure` step until all problems are fixed.
Afterwards compile it (and grab a cup of coffee):
```bash
make
```
And install it (you only need sudo for a system-wide installation):
```bash
sudo make install
```
Excluding patches
-----------------
It is also possible to apply only a subset of the patches, for example if
you're compiling for a distribution where PulseAudio is not installed, or
if you just don't like a specific patchset. Please note that some patchsets
depend on each other, and requesting an impossible situation might result
in a failure to apply all patches.
Lets assume you want to exclude the patchset in directory `DIRNAME`, then
just invoke the Makefile like this:
```bash
make -C ./patches DESTDIR=$(pwd) install -W DIRNAME.ok
```
Using the same method its also possible to exclude multiple patchsets. If you
want to exclude a very large number of patches, it is easier to do specify
a list of patches which should be included instead. To apply for example
only the patchsets in directory `DIRNAME1` and `DIRNAME2`, you can use:
```bash
make -C ./patches DESTDIR=$(pwd) PATCHLIST="DIRNAME1.ok DIRNAME2.ok" install
```
Contributing to Wine Staging
============================
Please note that Wine Staging is not just an arbitrary collection of Wine
patches. We see Wine Staging as a **testing version** in preparation for
patches to be submitted to upstream Wine. This implies that all patches should
at least have a minimum standard quality. Unlike some other PPAs/AURs which
provide heavily patched Wine versions, we will not accept hacks for very
specific games. Such hacks often break compatibility with other applications,
which means we probably don't want to include them, sorry.
If you think your patches are indeed a proper implementation, then feel free
to contribute them. Please note that to allow possible later inclusion
into upstream Wine, we will require you to pay attention to the same
[rules](http://wiki.winehq.org/SubmittingPatches). Please be patient and
give us up to about a week to review them - we're a very small team, so
it might take some time, and we want to make sure that the implementation
doesn't contain any critical errors, which could cause regressions. If you
want to contribute huge sets of patches, we would really like you to *stay
contributing* in the future. Even if we accepted your patches, this doesn't
necessary mean we understand all of it, and if you cannot or don't want
to maintain them (especially in case of errors, or difficult rebasing),
we will probably end up removing them again.
You can also suggest adding patches written by other people - in this case
your request should include who wrote the patch. Anonymous patches which
don't include the author information aren't welcome, similar to the rules
for upstream Wine.
Attribution guidelines
----------------------
The Wine Staging repository expects all patches to conform to
Wine's (undocumented) attribution guidelines. There are a variety of ways
to attribute patches, but they all involve an additional line to the patch
subject:
```
commit 0000000000000000000000000000000000000000
Author: Example Author <example.email@email-provider.com>
Date: Sat Jul 26 12:31:50 2014 -0600
Name of patch.
TYPE-OF-ATTRIBUTION.
```
TYPE-OF-ATTRIBUTION can be any of the following:
`Found/Spotted by FINDER.`: The resolved issue was found by FINDER, they
should receive appropriate credit for finding the problem - even though
their patch was not used in the final implementation.
`Based on patch by AUTHOR.`: The patch created by AUTHOR was a starting point
for the patch, some modifications were made to their patch - but they should
receive credit since the original implementation was theirs.

View File

@@ -2,9 +2,8 @@ What is Wine Staging?
=====================
**Warning: Do not report bugs at bugs.winehq.org when using this version!
Please take a look at our
[Wiki](https://github.com/wine-compholio/wine-staging/wiki/Reporting-bugs)
for more information about how to report bugs.**
Please take a look [here](http://bugs.wine-staging.com) for more information
about how to report bugs.**
**Wine Staging** (formerly wine-compholio) is a special wine version containing
bug fixes and features that are not yet available in regular wine versions. The
@@ -24,8 +23,7 @@ How to install and use Wine Staging
Ready-to-use packages for Wine Staging are available for a variety
of different Linux distributions directly for download. Just follow the
instructions available on the
[Wiki](https://github.com/wine-compholio/wine-staging/wiki/Installation).
instructions available on the [website](http://www.wine-staging.com/install.html).
When using Wine Staging there are a few differences compared to regular
Wine. The main difference is that it is not sufficient to type `wine` to
@@ -39,7 +37,7 @@ Wine. All those differences are also documented on the
Included bug fixes and improvements
===================================
**Bugs fixed in Wine Staging 1.7.31 [101]:**
**Bugs fixed in Wine Staging 1.7.32 [108]:**
* ATL IOCS data should not be stored in GWLP_USERDATA ([Wine Bug #21767](https://bugs.winehq.org/show_bug.cgi?id=21767))
* Add Dynamic DST exceptions for Israel Standard Time ([Wine Bug #36374](https://bugs.winehq.org/show_bug.cgi?id=36374))
@@ -51,8 +49,8 @@ Included bug fixes and improvements
* Anno 1602 installer depends on Windows 98 behavior of SHFileOperationW
* Audio stuttering and performance drops in multiple applications ([Wine Bug #30639](https://bugs.winehq.org/show_bug.cgi?id=30639))
* Avoid crashing when broken app tries to release surface although refcount is zero ([Wine Bug #18477](https://bugs.winehq.org/show_bug.cgi?id=18477))
* Avoid sending window messages in FindWindowExW ([Wine Bug #27282](https://bugs.winehq.org/show_bug.cgi?id=27282))
* CoWaitForMultipleHandles shouldn't process window events when APC calls are queued ([Wine Bug #32568](https://bugs.winehq.org/show_bug.cgi?id=32568))
* Avoid race-conditions of async WSARecv() operations with write watches.
* Black & White needs DXTn software decoding support ([Wine Bug #14939](https://bugs.winehq.org/show_bug.cgi?id=14939))
* Correctly treat '.' when checking for empty directories ([Wine Bug #26272](https://bugs.winehq.org/show_bug.cgi?id=26272))
* D3DCompileShader should filter specific warning messages ([Wine Bug #33770](https://bugs.winehq.org/show_bug.cgi?id=33770))
* Do not fail when a used context is passed to wglShareLists ([Wine Bug #11436](https://bugs.winehq.org/show_bug.cgi?id=11436))
@@ -71,9 +69,13 @@ Included bug fixes and improvements
* Fix for ConnectNamedPort return value in overlapped mode ([Wine Bug #16550](https://bugs.winehq.org/show_bug.cgi?id=16550))
* Fix for programs leaking wndproc slots ([Wine Bug #32451](https://bugs.winehq.org/show_bug.cgi?id=32451))
* Fix gray screen on startup introduced by pixelformat changes. ([Wine Bug #35975](https://bugs.winehq.org/show_bug.cgi?id=35975))
* Fix handling of empty section and key name for profile files. ([Wine Bug #8036](https://bugs.winehq.org/show_bug.cgi?id=8036))
* Fix handling of invert_y in DrawTextExW ([Wine Bug #22109](https://bugs.winehq.org/show_bug.cgi?id=22109))
* Fix issues when driver dispatch routine returns different status codes ([Wine Bug #30155](https://bugs.winehq.org/show_bug.cgi?id=30155))
* Fix issues with dragging layers between images in Adobe Photoshop 7.0 ([Wine Bug #12007](https://bugs.winehq.org/show_bug.cgi?id=12007))
* Fix missing video introduced by pixelformat changes. ([Wine Bug #36900](https://bugs.winehq.org/show_bug.cgi?id=36900))
* Fix ordering of IP addresses by metric if two addresses have the same metric.
* Fix passing of unicode environment from msvcrt to CreateProcessW. ([Wine Bug #37635](https://bugs.winehq.org/show_bug.cgi?id=37635))
* Fix texture corruption in CSI: Fatal Conspiracy ([Wine Bug #33768](https://bugs.winehq.org/show_bug.cgi?id=33768))
* Fix unintentional leaks with ntdll internals
* Fix wined3d performance drop introduced by pixelformat changes. ([Wine Bug #35655](https://bugs.winehq.org/show_bug.cgi?id=35655))
@@ -81,6 +83,7 @@ Included bug fixes and improvements
* GetSecurityInfo returns NULL DACL for process object ([Wine Bug #15980](https://bugs.winehq.org/show_bug.cgi?id=15980))
* Implement a Microsoft Yahei replacement font ([Wine Bug #13829](https://bugs.winehq.org/show_bug.cgi?id=13829))
* Implement an Arial replacement font ([Wine Bug #32323](https://bugs.winehq.org/show_bug.cgi?id=32323))
* Implement exclusive mode in PulseAudio backend ([Wine Bug #37042](https://bugs.winehq.org/show_bug.cgi?id=37042))
* Improvement for heap allocation performance
* Initialize irp.Tail.Overlay.OriginalFileObject with stub file object ([Wine Bug #37537](https://bugs.winehq.org/show_bug.cgi?id=37537))
* Lego Stunt Rally requires DXTn software de/encoding support ([Wine Bug #25486](https://bugs.winehq.org/show_bug.cgi?id=25486))
@@ -112,6 +115,7 @@ Included bug fixes and improvements
* Support for ITextDocument_fnRange function ([Wine Bug #12458](https://bugs.winehq.org/show_bug.cgi?id=12458))
* Support for ITextRange, ITextFont and ITextPara ([Wine Bug #18303](https://bugs.winehq.org/show_bug.cgi?id=18303))
* Support for Junction Points ([Wine Bug #12401](https://bugs.winehq.org/show_bug.cgi?id=12401))
* Support for K32EnumProcessModulesEx ([Wine Bug #34864](https://bugs.winehq.org/show_bug.cgi?id=34864))
* Support for KF_FLAG_DEFAULT_PATH in SHGetKnownFolderPath ([Wine Bug #30385](https://bugs.winehq.org/show_bug.cgi?id=30385))
* Support for LoadIconMetric ([Wine Bug #35375](https://bugs.winehq.org/show_bug.cgi?id=35375))
* Support for NtQuerySection ([Wine Bug #37338](https://bugs.winehq.org/show_bug.cgi?id=37338))
@@ -137,6 +141,7 @@ Included bug fixes and improvements
* Use manual relay for RunDLL_CallEntry16 in shell32 ([Wine Bug #23033](https://bugs.winehq.org/show_bug.cgi?id=23033))
* Voobly expects correct handling of WRITECOPY memory protection ([Wine Bug #29384](https://bugs.winehq.org/show_bug.cgi?id=29384))
* Wine ignores IDF_CHECKFIRST flag in SetupPromptForDisk ([Wine Bug #20465](https://bugs.winehq.org/show_bug.cgi?id=20465))
* Wintrust doesn't reset data->pWintrustData->u.pFile->hFile after closing handle ([Wine Bug #36257](https://bugs.winehq.org/show_bug.cgi?id=36257))
* Workaround for shlwapi URLs with relative paths
* XEMBED support for embedding Wine windows inside Linux applications
* nVidia driver for high-end laptop cards does not list all supported resolutions

32
debian/changelog vendored
View File

@@ -1,3 +1,35 @@
wine-compholio (1.7.32) unstable; urgency=low
* Various optimizations of patchupdate.py.
* Update patch for SO_CONNECT_TIME and adding better tests.
* Update patch for FD Cache and use faster method on x86_64.
* Added patch to ensure dbghelp always checks for debug symbols in BINDIR.
* Added patch for pulseaudio exclusive mode support.
* Added patch to take abs() of vertex z coordinate as FFP fog coordinate.
* Added patch to ensure ShowWindow avoids interthread no-op messages.
* Added patch to avoid race-conditions of async WSARecv() operations with write watches.
* Added patch to fix issues with write watches when using Exagear.
* Added patch to avoid failure because of missing ptrace support for Exagear.
* Added patch to automatically detect if tests are running under Wine.
* Added patch to avoid sending unexpected wakeup with uninitialized cookie value.
* Added patch to fix issues with dragging layers between images in Adobe Photoshop 7.0.
* Added patch to ensure wintrust resets data->pWintrustData->u.pFile->hFile after closing handle.
* Added patch to add additional format conversions for DXT1 and DXT3.
* Added patch to implement stubs for additional api-ms-win-core-* dlls.
* Added patch to fix copy and paste error recently introduced in ws2_32 tests.
* Added patch to change bug reporting URL in winedbg.
* Added patch to implement semi-stub for psapi/kernel32 K32EnumProcessModulesEx.
* Added patch to fix ordering of IP addresses by metric if two addresses have the same metric.
* Added patch to fix handling of empty section and key name for profile files.
* Added patch to fix passing of unicode environment from msvcrt to CreateProcessW.
* Removed patch to close server fd is there is no space in thread inflight fd list (accepted upstream).
* Removed patch to fix bugs in StrStr functions (accepted upstream).
* Removed patches to avoid sending messages in FindWindowExW (accepted upstream).
* Removed patch to fix implementation ofCoWaitForMultipleHandles (accepted upstream).
* Removed patch to avoid interthread no-op messages in ShowWindow (accepted upstream).
* Removed patches to take abs() of vertex z coordinate as FFP fog coordinate (fixed upstream).
* Removed patch to fix detection of gnutls on Ubuntu 14.10.
-- Sebastian Lackner <sebastian@fds-team.de> Sun, 30 Nov 2014 15:22:49 +0100
wine-compholio (1.7.31) unstable; urgency=low
* Improve output of 'wine --patches' and simplify syntax of definition files.
* Update kernel32-GetSystemTimes patches.

View File

@@ -1,152 +0,0 @@
Developers and maintainers guide
================================
This document will provide some information targeted at developers, who
either want to build/package Wine Staging for their distribution, but also
for developers who would like to contribute their patches to Wine Staging,
to get them included in future releases.
Compiling Wine Staging
======================
**Warning:** Please note that starting with Staging 1.7.23 it is
deprecated to manually apply patches without using the Makefile. To avoid
typical pitfalls for package maintainers (like trying to use the patch
commandline utility for binary patches or not updating the patchlist) it is
highly recommended to use the Makefile in order to apply all patches. This
ensures that the the correct patch utility is used, that the list of patches
is updated appropriately, and so on. Please note that it is still possible
to exclude patches if desired, take a look at the end of this document for
more details.
Instructions
------------
The following instructions (based on the [Gentoo
Wiki](https://wiki.gentoo.org/wiki/Netflix/Pipelight#Compiling_manually))
will give a short overview how to compile Wine Staging, but of course not
explain all details. Make sure to install all required Wine dependencies
before proceeding.
As the first step please grab the latest Wine source:
```bash
wget http://prdownloads.sourceforge.net/wine/wine-{version}.tar.bz2
wget https://github.com/wine-compholio/wine-staging/archive/v{version}.tar.gz
```
Extract the archives:
```bash
tar xvjf wine-1*.tar.bz2
cd wine-1*
tar xvzf ../v{version}.tar.gz --strip-components 1
```
And apply the patches:
```bash
make -C ./patches DESTDIR=$(pwd) install
```
Afterwards run configure (you can also specify a prefix if you don't want to install
Wine Staging system-wide):
```bash
./configure --with-xattr
```
Before you continue you should make sure that `./configure` doesn't show any
warnings (look at the end of the output). If there are any warnings, this
most likely means that you're missing some important header files. Install
them and repeat the `./configure` step until all problems are fixed.
Afterwards compile it (and grab a cup of coffee):
```bash
make
```
And install it (you only need sudo for a system-wide installation):
```bash
sudo make install
```
Excluding patches
-----------------
It is also possible to apply only a subset of the patches, for example if
you're compiling for a distribution where PulseAudio is not installed, or
if you just don't like a specific patchset. Please note that some patchsets
depend on each other, and requesting an impossible situation might result
in a failure to apply all patches.
Lets assume you want to exclude the patchset in directory `DIRNAME`, then
just invoke the Makefile like this:
```bash
make -C ./patches DESTDIR=$(pwd) install -W DIRNAME.ok
```
Using the same method its also possible to exclude multiple patchsets. If you
want to exclude a very large number of patches, it is easier to do specify
a list of patches which should be included instead. To apply for example
only the patchsets in directory `DIRNAME1` and `DIRNAME2`, you can use:
```bash
make -C ./patches DESTDIR=$(pwd) PATCHLIST="DIRNAME1.ok DIRNAME2.ok" install
```
Contributing to Wine Staging
============================
Please note that Wine Staging is not just an arbitrary collection of Wine
patches. We see Wine Staging as a **testing version** in preparation for
patches to be submitted to upstream Wine. This implies that all patches should
at least have a minimum standard quality. Unlike some other PPAs/AURs which
provide heavily patched Wine versions, we will not accept hacks for very
specific games. Such hacks often break compatibility with other applications,
which means we probably don't want to include them, sorry.
If you think your patches are indeed a proper implementation, then feel free
to contribute them. Please note that to allow possible later inclusion
into upstream Wine, we will require you to pay attention to the same
[rules](http://wiki.winehq.org/SubmittingPatches). Please be patient and
give us up to about a week to review them - we're a very small team, so
it might take some time, and we want to make sure that the implementation
doesn't contain any critical errors, which could cause regressions. If you
want to contribute huge sets of patches, we would really like you to *stay
contributing* in the future. Even if we accepted your patches, this doesn't
necessary mean we understand all of it, and if you cannot or don't want
to maintain them (especially in case of errors, or difficult rebasing),
we will probably end up removing them again.
You can also suggest adding patches written by other people - in this case
your request should include who wrote the patch. Anonymous patches which
don't include the author information aren't welcome, similar to the rules
for upstream Wine.
Attribution guidelines
----------------------
The Wine Staging repository expects all patches to conform to
Wine's (undocumented) attribution guidelines. There are a variety of ways
to attribute patches, but they all involve an additional line to the patch
subject:
```
commit 0000000000000000000000000000000000000000
Author: Example Author <example.email@email-provider.com>
Date: Sat Jul 26 12:31:50 2014 -0600
Name of patch.
TYPE-OF-ATTRIBUTION.
```
TYPE-OF-ATTRIBUTION can be any of the following:
`Found/Spotted by FINDER.`: The resolved issue was found by FINDER, they
should receive appropriate credit for finding the problem - even though
their patch was not used in the final implementation.
`Based on patch by AUTHOR.`: The patch created by AUTHOR was a starting point
for the patch, some modifications were made to their patch - but they should
receive credit since the original implementation was theirs.

View File

@@ -2,9 +2,8 @@ What is Wine Staging?
=====================
**Warning: Do not report bugs at bugs.winehq.org when using this version!
Please take a look at our
[Wiki](https://github.com/wine-compholio/wine-staging/wiki/Reporting-bugs)
for more information about how to report bugs.**
Please take a look [here](http://bugs.wine-staging.com) for more information
about how to report bugs.**
**Wine Staging** (formerly wine-compholio) is a special wine version containing
bug fixes and features that are not yet available in regular wine versions. The
@@ -24,8 +23,7 @@ How to install and use Wine Staging
Ready-to-use packages for Wine Staging are available for a variety
of different Linux distributions directly for download. Just follow the
instructions available on the
[Wiki](https://github.com/wine-compholio/wine-staging/wiki/Installation).
instructions available on the [website](http://www.wine-staging.com/install.html).
When using Wine Staging there are a few differences compared to regular
Wine. The main difference is that it is not sufficient to type `wine` to

View File

@@ -19,24 +19,31 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
#
import binascii
import cPickle as pickle
import hashlib
import itertools
import math
import multiprocessing.pool
import operator
import os
import patchutils
import pickle
import progressbar
import re
import signal
import subprocess
import sys
import tempfile
import textwrap
_devnull = open(os.devnull, 'wb')
# Cached information to speed up patch dependency checks
latest_wine_commit = None
cached_patch_result = {}
cached_original_src = {}
class config(object):
path_depcache = ".depcache"
path_srccache = ".srccache"
path_depcache = ".patchupdate.cache"
path_patches = "patches"
path_changelog = "debian/changelog"
@@ -48,9 +55,6 @@ class config(object):
path_README_md = "README.md"
path_template_README_md = "debian/tools/README.md.in"
path_DEVELOPER_md = "DEVELOPER.md"
path_template_DEVELOPER_md = "debian/tools/DEVELOPER.md.in"
class PatchUpdaterError(RuntimeError):
"""Failed to update patches."""
pass
@@ -78,13 +82,29 @@ def _pairs(a):
def _unique(iterable, key=None):
"List unique elements, preserving order. Remember only the element just seen."
# unique_justseen('AAAABBBCCDAABBB') --> A B C D A B
# unique_justseen('ABBCcAD', str.lower) --> A B C A D
# _unique('AAAABBBCCDAABBB') --> A B C D A B
# _unique('ABBCcAD', str.lower) --> A B C A D
return itertools.imap(next, itertools.imap(operator.itemgetter(1), itertools.groupby(iterable, key)))
def _split_seq(iterable, size):
"""Split an iterator into chunks of a given size."""
it = iter(iterable)
items = list(itertools.islice(it, size))
while items:
yield items
items = list(itertools.islice(it, size))
def _merge_seq(iterable, callback=None):
"""Merge lists/iterators into a new one. Call callback after each chunk"""
for i, items in enumerate(iterable):
if callback is not None:
callback(i)
for obj in items:
yield obj
def _escape(s):
"""Escape string inside of '...' quotes."""
return s.replace("\\", "\\\\").replace("\"", "\\\"").replace("'", "'\\''")
return s.replace("\\", "\\\\\\\\").replace("\"", "\\\"").replace("'", "'\\''")
def _load_dict(filename):
"""Load a Python dictionary object from a file."""
@@ -99,7 +119,17 @@ def _save_dict(filename, value):
with open(filename, "wb") as fp:
pickle.dump(value, fp, pickle.HIGHEST_PROTOCOL)
def parse_int(val, default=0):
def _sha256(fp):
"""Calculate sha256sum from a file descriptor."""
m = hashlib.sha256()
fp.seek(0)
while True:
buf = fp.read(16384)
if buf == "": break
m.update(buf)
return m.digest()
def _parse_int(val, default=0):
"""Parse an integer or boolean value."""
r = re.match("^[0-9]+$", val)
if r:
@@ -109,21 +139,21 @@ def parse_int(val, default=0):
except AttributeError:
return default
# Read information from changelog
def _read_changelog():
"""Read information from changelog."""
with open(config.path_changelog) as fp:
for line in fp:
r = re.match("^([a-zA-Z0-9][^(]*)\((.*)\) ([^;]*)", line)
if r: yield (r.group(1).strip(), r.group(2).strip(), r.group(3).strip())
# Get version number of the latest stable release
def _stable_compholio_version():
"""Get version number of the latest stable release."""
for package, version, distro in _read_changelog():
if distro.lower() != "unreleased":
return version
# Get latest wine commit
def _latest_wine_commit():
"""Get latest wine commit."""
if not os.path.isdir(config.path_wine):
raise PatchUpdaterError("Please create a symlink to the wine repository in %s" % config.path_wine)
commit = subprocess.check_output(["git", "rev-parse", "origin/master"], cwd=config.path_wine).strip()
@@ -149,8 +179,7 @@ def enum_directories(revision, path):
else:
filename = "%s:%s" % (revision, path)
try:
with open(os.devnull, 'w') as devnull:
content = subprocess.check_output(["git", "show", filename], stderr=devnull)
content = subprocess.check_output(["git", "show", filename], stderr=_devnull)
except subprocess.CalledProcessError as e:
if e.returncode != 128: raise
return [] # ignore error
@@ -166,7 +195,6 @@ def enum_directories(revision, path):
def read_definition(revision, filename, name_to_id):
"""Read a definition file and return information as tuple (depends, fixes)."""
filename = os.path.join(filename, "definition")
if revision is None:
with open(filename) as fp:
@@ -174,9 +202,8 @@ def read_definition(revision, filename, name_to_id):
else:
filename = "%s:%s" % (revision, filename)
try:
with open(os.devnull, 'w') as devnull:
content = subprocess.check_output(["git", "show", filename], stderr=devnull)
except CalledProcessError:
content = subprocess.check_output(["git", "show", filename], stderr=_devnull)
except subprocess.CalledProcessError:
raise IOError("Failed to load %s" % filename)
depends = set()
@@ -186,18 +213,15 @@ def read_definition(revision, filename, name_to_id):
for line in content.split("\n"):
if line.startswith("#"):
continue
tmp = line.split(":", 1)
if len(tmp) != 2:
continue
key, val = tmp[0].lower(), tmp[1].strip()
if key == "depends":
if name_to_id is not None:
if not name_to_id.has_key(val):
raise PatchUpdaterError("Definition file %s references unknown dependency %s" % (filename, val))
depends.add(name_to_id[val])
elif key == "fixes":
r = re.match("^[0-9]+$", val)
if r:
@@ -208,10 +232,8 @@ def read_definition(revision, filename, name_to_id):
fixes.append((int(r.group(1)), r.group(2).strip()))
continue
fixes.append((None, val))
elif key == "disabled":
disabled = parse_int(val)
disabled = _parse_int(val)
elif revision is None:
print "WARNING: Ignoring unknown command in definition file %s: %s" % (filename, line)
@@ -219,7 +241,6 @@ def read_definition(revision, filename, name_to_id):
def read_patchset(revision = None):
"""Read information about all patchsets for a specific revision."""
unique_id = itertools.count()
all_patches = {}
name_to_id = {}
@@ -285,15 +306,12 @@ def causal_time_relation_any(all_patches, indices):
return False
return True
def causal_time_permutations(all_patches, indices, filename):
def causal_time_permutations(all_patches, indices):
"""Iterate over all possible permutations of patches affecting
a specific file, which are compatible with dependencies."""
for permutation in itertools.permutations(indices):
if causal_time_relation(all_patches, permutation):
selected_patches = []
for i in permutation:
selected_patches += [patch for patch in all_patches[i].patches if patch.modified_file == filename]
yield selected_patches
yield permutation
def contains_binary_patch(all_patches, indices, filename):
"""Checks if any patch with given indices affecting filename is a binary patch."""
@@ -303,30 +321,43 @@ def contains_binary_patch(all_patches, indices, filename):
return True
return False
def get_wine_file(filename, force=False):
def get_wine_file(filename):
"""Return the hash and optionally the content of a file."""
# If we're not forced, we try to save time and only lookup the cached checksum
entry = "%s:%s" % (latest_wine_commit, filename)
if not force and cached_original_src.has_key(entry):
return (cached_original_src[entry], None)
# Grab original file from the wine git repository
entry = "%s:%s" % (latest_wine_commit, filename)
result = tempfile.NamedTemporaryFile()
try:
with open(os.devnull, 'w') as devnull:
content = subprocess.check_output(["git", "show", entry], cwd=config.path_wine, stderr=devnull)
content = subprocess.check_call(["git", "show", entry], cwd=config.path_wine, \
stdout=result, stderr=_devnull)
except subprocess.CalledProcessError as e:
if e.returncode != 128: raise
content = ""
result.flush() # shouldn't be necessary because the subprocess writes directly to the fd
return result
content_hash = hashlib.sha256(content).digest()
cached_original_src[entry] = content_hash
return (content_hash, content)
def select_patches(all_patches, indices, filename):
"""Create a temporary patch file for each patchset and calculate the checksum."""
selected_patches = {}
def verify_patch_order(all_patches, indices, filename):
for i in indices:
p = tempfile.NamedTemporaryFile()
m = hashlib.sha256()
for patch in all_patches[i].patches:
if patch.modified_file != filename:
continue
for chunk in patch.read_chunks():
p.write(chunk)
m.update(chunk)
p.write("\n")
m.update("\n")
p.flush()
selected_patches[i] = (m.digest(), p)
return selected_patches
def verify_patch_order(all_patches, indices, filename, pool):
"""Checks if the dependencies are defined correctly by applying
the patches on a (temporary) copy from the git tree."""
global cached_patch_result
# If one of patches is a binary patch, then we cannot / won't verify it - require dependencies in this case
if contains_binary_patch(all_patches, indices, filename):
@@ -335,55 +366,99 @@ def verify_patch_order(all_patches, indices, filename):
(filename, ", ".join([all_patches[i].name for i in indices])))
return
# Get at least the checksum of the original file
original_content_hash, original_content = get_wine_file(filename)
original_content = get_wine_file(filename)
original_content_hash = _sha256(original_content)
selected_patches = select_patches(all_patches, indices, filename)
try:
# Check for possible ways to apply the patch
failed_to_apply = False
last_result_hash = None
for patches in causal_time_permutations(all_patches, indices, filename):
# Calculate unique hash based on the original content and the order in which the patches are applied
m = hashlib.sha256()
m.update(original_content_hash)
for patch in patches:
m.update(patch.hash())
unique_hash = m.digest()
# Fast path -> we know that it applies properly
if cached_patch_result.has_key(unique_hash):
result_hash = cached_patch_result[unique_hash]
assert result_hash is not None
else:
# Now really get the file, if we don't have it yet
if original_content is None:
original_content_hash, original_content = get_wine_file(filename, force=True)
# Apply the patches (without fuzz)
def _test_apply(permutations):
"""Tests if specific permutations of patches apply on the wine source tree."""
patch_stack_indices = []
patch_stack_patches = []
try:
content = patchutils.apply_patch(original_content, patches, fuzz=0)
except patchutils.PatchApplyError:
# Remember that we failed to apply the patches, but continue, if there is still a chance
# that it applies in a different order (to give a better error message).
failed_to_apply = True
if last_result_hash is None:
continue
break
# Get hash of resulting file and add to cache
result_hash = hashlib.sha256(content).digest()
cached_patch_result[unique_hash] = result_hash
for permutation in permutations:
# No known hash yet, remember the result. If we failed applying before, we can stop now.
if last_result_hash is None:
last_result_hash = result_hash
if failed_to_apply: break
# Calculate hash
m = hashlib.sha256()
m.update(original_content_hash)
for i in permutation:
m.update(selected_patches[i][0])
input_hash = m.digest()
# Applied successful, but result has a different hash - also treat as failure.
elif last_result_hash != result_hash:
failed_to_apply = True
break
# Fast path -> we know that it applies properly
try:
yield cached_patch_result[input_hash]
continue
except KeyError:
pass
# Remove unneeded patches from patch stack
while list(permutation[:len(patch_stack_indices)]) != patch_stack_indices:
patch_stack_indices.pop()
patch_stack_patches.pop().close()
# Apply the patches (without fuzz)
try:
while len(patch_stack_indices) < len(permutation):
i = permutation[len(patch_stack_indices)]
original = patch_stack_patches[-1] if len(patch_stack_indices) else original_content
patchfile = selected_patches[i][1]
patch_stack_patches.append(patchutils.apply_patch(original, patchfile, fuzz=0))
patch_stack_indices.append(i)
output_hash = _sha256(patch_stack_patches[-1])
except patchutils.PatchApplyError:
output_hash = None
cached_patch_result[input_hash] = output_hash
yield output_hash
finally:
# Ensure temporary files are cleaned up properly
while len(patch_stack_patches):
patch_stack_patches.pop().close()
# Show a progress bar while applying the patches - this task might take some time
chunk_size = 20
total_tasks = (math.factorial(len(indices)) + chunk_size - 1) / chunk_size
with progressbar.ProgressBar(desc=filename, total=total_tasks) as progress:
failed_to_apply = False
last_result_hash = None
# Check for possible ways to apply the patch
it = _split_seq(causal_time_permutations(all_patches, indices), chunk_size)
for output_hash in _merge_seq(pool.imap_unordered(lambda seq: list(_test_apply(seq)), it), \
callback=progress.update):
# Failed to apply patch, continue checking the rest.
if output_hash is None:
failed_to_apply = True
if last_result_hash is None:
continue
break
# No known hash yet, remember the result. If we failed applying before, we can stop now.
elif last_result_hash is None:
last_result_hash = output_hash
if failed_to_apply: break
# Applied successful, but result has a different hash - also treat as failure.
elif last_result_hash != output_hash:
failed_to_apply = True
break
if failed_to_apply:
progress.finish("<failed to apply>")
elif verbose:
progress.finish(binascii.hexlify(last_result_hash))
finally:
original_content.close()
for _, (_, p) in selected_patches.iteritems():
p.close()
# If something failed, then show the appropriate error message.
if failed_to_apply and last_result_hash is None:
@@ -403,14 +478,11 @@ def verify_dependencies(all_patches):
def _load_patch_cache():
"""Load dictionary for cached patch dependency tests."""
global cached_patch_result
global cached_original_src
cached_patch_result = _load_dict(config.path_depcache)
cached_original_src = _load_dict(config.path_srccache)
def _save_patch_cache():
"""Save dictionary for cached patch dependency tests."""
_save_dict(config.path_depcache, cached_patch_result)
_save_dict(config.path_srccache, cached_original_src)
_save_dict(config.path_depcache, cached_patch_result.copy())
enabled_patches = dict([(i, patch) for i, patch in all_patches.iteritems() if not patch.disabled])
max_patches = max(enabled_patches.keys()) + 1
@@ -450,11 +522,13 @@ def verify_dependencies(all_patches):
# Check if patches always apply correctly
_load_patch_cache()
pool = multiprocessing.pool.ThreadPool(processes=8)
try:
for f, indices in modified_files.iteritems():
verify_patch_order(enabled_patches, indices, f)
verify_patch_order(enabled_patches, indices, f, pool)
finally:
_save_patch_cache()
pool.close()
def generate_makefile(all_patches):
"""Generate Makefile for a specific set of patches."""
@@ -464,9 +538,9 @@ def generate_makefile(all_patches):
with open(config.path_Makefile, "w") as fp:
fp.write(template.format(patchlist="\t" + " \\\n\t".join(
["%s.ok" % patch.name for i, patch in all_patches.iteritems() if not patch.disabled])))
["%s.ok" % patch.name for _, patch in all_patches.iteritems() if not patch.disabled])))
for i, patch in all_patches.iteritems():
for _, patch in all_patches.iteritems():
fp.write("# Patchset %s\n" % patch.name)
fp.write("# |\n")
@@ -502,7 +576,7 @@ def generate_makefile(all_patches):
fp.write("\n");
def generate_markdown(all_patches, stable_patches, stable_compholio_version):
"""Generate README.md and DEVELOPER.md including information about specific patches and bugfixes."""
"""Generate README.md including information about specific patches and bugfixes."""
def _format_bug(mode, bugid, bugname):
if mode < 0: bugname = "~~%s~~" % bugname
@@ -513,13 +587,13 @@ def generate_markdown(all_patches, stable_patches, stable_compholio_version):
all_fixes = {}
# Get fixes for current version
for i, patch in all_patches.iteritems():
for _, patch in all_patches.iteritems():
for bugid, bugname in patch.fixes:
key = bugid if bugid is not None else bugname
all_fixes[key] = [1, bugid, bugname]
# Compare with fixes for latest stable version
for i, patch in stable_patches.iteritems():
for _, patch in stable_patches.iteritems():
for bugid, bugname in patch.fixes:
key = bugid if bugid is not None else bugname
if all_fixes.has_key(key):
@@ -558,13 +632,15 @@ def generate_markdown(all_patches, stable_patches, stable_compholio_version):
with open(config.path_README_md, "w") as fp:
fp.write(template.format(fixes="\n".join(lines)))
# Update DEVELOPER.md
with open(config.path_template_DEVELOPER_md) as template_fp:
template = template_fp.read()
with open(config.path_DEVELOPER_md, "w") as fp:
fp.write(template.format(version=stable_compholio_version))
if __name__ == "__main__":
verbose = "-v" in sys.argv[1:]
# Hack to avoid KeyboardInterrupts on worker threads
def _sig_int(signum=None, frame=None):
signal.signal(signal.SIGINT, signal.SIG_IGN)
raise RuntimeError("CTRL+C pressed")
signal.signal(signal.SIGINT, _sig_int)
try:
# Get information about Wine and Compholio version
@@ -578,7 +654,7 @@ if __name__ == "__main__":
# Check dependencies
verify_dependencies(all_patches)
# Update Makefile, README.md and DEVELOPER.md
# Update Makefile and README.md
generate_makefile(all_patches)
generate_markdown(all_patches, stable_patches, stable_compholio_version)

View File

@@ -19,16 +19,19 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
#
import email.header
import collections
import difflib
import email.header
import hashlib
import itertools
import os
import re
import shutil
import subprocess
import tempfile
_devnull = open(os.devnull, 'wb')
class PatchParserError(RuntimeError):
"""Unable to parse patch file - either an unimplemented feature, or corrupted patch."""
pass
@@ -44,7 +47,7 @@ class PatchObject(object):
self.patch_subject = header['subject']
self.patch_revision = header['revision'] if header.has_key('revision') else 1
self.extracted_patch = None
# self.extracted_patch = None
self.unique_hash = None
self.filename = filename
@@ -70,76 +73,58 @@ class PatchObject(object):
fp.seek(self.offset_begin)
i = self.offset_end - self.offset_begin
while i > 0:
buf = fp.read(4096 if i > 4096 else i)
buf = fp.read(16384 if i > 16384 else i)
if buf == "": raise IOError("Unable to extract patch.")
yield buf
i -= len(buf)
def extract(self):
"""Create a temporary file containing the extracted patch."""
if not self.extracted_patch:
self.extracted_patch = tempfile.NamedTemporaryFile()
for chunk in self.read_chunks():
self.extracted_patch.write(chunk)
self.extracted_patch.flush()
return self.extracted_patch
class _FileReader(object):
def __init__(self, filename):
self.filename = filename
self.fp = open(self.filename)
self.peeked = None
def hash(self):
"""Hash the content of the patch."""
if not self.unique_hash:
m = hashlib.sha256()
for chunk in self.read_chunks():
m.update(chunk)
self.unique_hash = m.digest()
return self.unique_hash
def close(self):
self.fp.close()
def __enter__(self):
return self
def __exit__(self, type, value, traceback):
self.close()
def seek(self, pos):
"""Change the file cursor position."""
self.fp.seek(pos)
self.peeked = None
def tell(self):
"""Return the current file cursor position."""
if self.peeked is None:
return self.fp.tell()
return self.peeked[0]
def peek(self):
"""Read one line without changing the file cursor."""
if self.peeked is None:
pos = self.fp.tell()
tmp = self.fp.readline()
if len(tmp) == 0: return None
self.peeked = (pos, tmp)
return self.peeked[1]
def read(self):
"""Read one line from the file, and move the file cursor to the next line."""
if self.peeked is None:
tmp = self.fp.readline()
if len(tmp) == 0: return None
return tmp
tmp, self.peeked = self.peeked, None
return tmp[1]
def read_patch(filename):
"""Iterates over all patches contained in a file, and returns PatchObject objects."""
class _FileReader(object):
def __init__(self, filename):
self.filename = filename
self.fp = open(self.filename)
self.peeked = None
def close(self):
self.fp.close()
def __enter__(self):
return self
def __exit__(self, type, value, traceback):
self.close()
def seek(self, pos):
"""Change the file cursor position."""
self.fp.seek(pos)
self.peeked = None
def tell(self):
"""Return the current file cursor position."""
if self.peeked is None:
return self.fp.tell()
return self.peeked[0]
def peek(self):
"""Read one line without changing the file cursor."""
if self.peeked is None:
pos = self.fp.tell()
tmp = self.fp.readline()
if len(tmp) == 0: return None
self.peeked = (pos, tmp)
return self.peeked[1]
def read(self):
"""Read one line from the file, and move the file cursor to the next line."""
if self.peeked is None:
tmp = self.fp.readline()
if len(tmp) == 0: return None
return tmp
tmp, self.peeked = self.peeked, None
return tmp[1]
def _read_single_patch(fp, header, oldname=None, newname=None):
"""Internal function to read a single patch from a file."""
@@ -351,35 +336,29 @@ def read_patch(filename):
else:
assert fp.read() == line
def apply_patch(content, patches, reverse=False, fuzz=2):
def apply_patch(original, patchfile, reverse=False, fuzz=2):
"""Apply a patch with optional fuzz - uses the commandline 'patch' utility."""
if not isinstance(patches, collections.Sequence):
patches = [patches]
contentfile = tempfile.NamedTemporaryFile(delete=False)
result = tempfile.NamedTemporaryFile(delete=False)
try:
contentfile.write(content)
contentfile.close()
# We open the file again to avoid race-conditions with multithreaded reads
with open(original.name) as fp:
shutil.copyfileobj(fp, result)
result.close()
for patch in patches:
cmdline = ["patch", "--no-backup-if-mismatch", "--force", "--silent", "-r", "-"]
if reverse: cmdline.append("--reverse")
if fuzz != 2: cmdline.append("--fuzz=%d" % fuzz)
cmdline += [result.name, patchfile.name]
patchfile = patch.extract()
cmdline = ["patch", "--force", "--silent", "-r", "-"]
if reverse: cmdline.append("--reverse")
if fuzz != 2: cmdline.append("--fuzz=%d" % fuzz)
cmdline += [contentfile.name, patchfile.name]
with open(os.devnull, 'w') as devnull:
exitcode = subprocess.call(cmdline, stdout=devnull, stderr=devnull)
if exitcode != 0:
raise PatchApplyError("Failed to apply patch (exitcode %d)." % exitcode)
with open(contentfile.name) as fp:
content = fp.read()
finally:
os.unlink(contentfile.name)
return content
exitcode = subprocess.call(cmdline, stdout=_devnull, stderr=_devnull)
if exitcode != 0:
raise PatchApplyError("Failed to apply patch (exitcode %d)." % exitcode)
# Hack - we can't keep the file open while patching ('patch' might rename/replace
# the file), so create a new _TemporaryFileWrapper object for the existing path.
return tempfile._TemporaryFileWrapper(file=open(result.name, 'r+b'), \
name=result.name, delete=True)
except:
os.unlink(result.name)
raise

106
debian/tools/progressbar.py vendored Normal file
View File

@@ -0,0 +1,106 @@
#!/usr/bin/python2
#
# Python progressbar functions.
#
# Copyright (C) 2014 Sebastian Lackner
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
#
import fcntl
import os
import signal
import struct
import sys
import termios
def _sig_winch(signum=None, frame=None):
"""Signal handler for SIGWINCH."""
global _term_width
h, w, hp, wp = struct.unpack('HHHH', fcntl.ioctl(sys.stdout.fileno(),
termios.TIOCGWINSZ, struct.pack('HHHH', 0, 0, 0, 0)))
_term_width = w
try:
_sig_winch()
signal.signal(signal.SIGWINCH, _sig_winch)
except IOError:
_term_width = int(os.environ.get('COLUMNS', 80)) - 1
class ProgressBar(object):
def __init__(self, desc="", msg=None, current=0, total=100):
"""Initialize a new progress bar with given properties."""
self.desc = desc
self.msg = msg
self.current = current
self.total = total
def __enter__(self):
self.update()
return self
def __exit__(self, type, value, traceback):
if type is not None:
sys.stdout.write("\r")
msg = "<interrupted>"
else:
msg = None
self.finish(msg)
if self.msg is not None:
sys.stdout.write("\n")
def update(self, value = None):
"""Redraw the progressbar and optionally update the value."""
if value is not None:
self.current = value
if self.current == 0 or (self.current >= self.total and self.msg is None):
sys.stdout.write("%s\r" % (' ' * _term_width))
sys.stdout.flush()
return
width = _term_width / 2
s1 = self.desc.ljust(width - 1, ' ')[:width - 1]
width = _term_width - width
if self.current >= self.total:
s2 = self.msg.ljust(width, ' ')[:width]
elif width > 2:
numbars = min(self.current * (width - 2) / self.total, width - 2)
s2 = "[%s%s]" % ('#' * numbars, '-' * (width - 2 - numbars))
percent = " %d%% " % min(self.current * 100 / self.total, 100)
i = (len(s2)-len(percent))/2
s2 = "%s%s%s" % (s2[:i], percent, s2[i+len(percent):])
sys.stdout.write("%s %s\r" % (s1, s2))
sys.stdout.flush()
def finish(self, msg = None):
"""Finalize the progressbar."""
if msg is not None:
self.msg = msg
self.current = self.total
self.update()
sys.stdout.flush()
if __name__ == '__main__':
import time
print ""
with ProgressBar(desc="description") as x:
for i in xrange(100):
x.update(i)
time.sleep(1)

View File

@@ -0,0 +1,51 @@
From 8c7754a1da9f43cf15057a8467c0b76c9da2ce40 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 22 Nov 2014 05:49:30 +0100
Subject: ntdll: Fix issues with write watches when using Exagear.
---
dlls/ntdll/virtual.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index 1a8e4a4..4140323 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -1558,6 +1558,26 @@ NTSTATUS virtual_handle_fault( LPCVOID addr, DWORD err )
{
void *page = ROUND_ADDR( addr, page_mask );
BYTE *vprot = &view->prot[((const char *)page - (const char *)view->base) >> page_shift];
+#ifdef EXAGEAR_COMPAT
+ /* Exagear doesn't correctly set err, so always check for write watches, and
+ * retry after removing the VPROT_WRITEWATCH or VPROT_WRITECOPY flag. In
+ * contrary to the general implementation below this is not completely race-
+ * condition safe. When multiple threads trigger the write watch at the same
+ * time only the first thread will properly continue the execution, the rest
+ * will crash. */
+ if ((view->protect & VPROT_WRITEWATCH) && (*vprot & VPROT_WRITEWATCH))
+ {
+ *vprot &= ~VPROT_WRITEWATCH;
+ VIRTUAL_SetProt( view, page, page_size, *vprot );
+ if (VIRTUAL_GetUnixProt( *vprot ) & PROT_WRITE) ret = STATUS_SUCCESS;
+ }
+ if (*vprot & VPROT_WRITECOPY)
+ {
+ *vprot = (*vprot & ~VPROT_WRITECOPY) | VPROT_WRITE;
+ VIRTUAL_SetProt( view, page, page_size, *vprot );
+ if (VIRTUAL_GetUnixProt( *vprot ) & PROT_WRITE) ret = STATUS_SUCCESS;
+ }
+#else
if (err & EXCEPTION_WRITE_FAULT)
{
if ((view->protect & VPROT_WRITEWATCH) && (*vprot & VPROT_WRITEWATCH))
@@ -1573,6 +1593,7 @@ NTSTATUS virtual_handle_fault( LPCVOID addr, DWORD err )
/* ignore fault if page is writable now */
if (VIRTUAL_GetUnixProt( *vprot ) & PROT_WRITE) ret = STATUS_SUCCESS;
}
+#endif
if (*vprot & VPROT_GUARD)
{
VIRTUAL_SetProt( view, page, page_size, *vprot & ~VPROT_GUARD );
--
2.1.3

View File

@@ -0,0 +1,25 @@
From 67cc0e23b26d5d9abda7eb771dc2bec309cb8650 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 23 Nov 2014 22:33:51 +0100
Subject: server: Don't attempt to use ptrace when running with Exagear.
---
server/ptrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/ptrace.c b/server/ptrace.c
index cb436b6..fb29b5a 100644
--- a/server/ptrace.c
+++ b/server/ptrace.c
@@ -531,7 +531,7 @@ void get_selector_entry( struct thread *thread, int entry, unsigned int *base,
#if defined(linux) && (defined(HAVE_SYS_USER_H) || defined(HAVE_ASM_USER_H)) \
- && (defined(__i386__) || defined(__x86_64__))
+ && (defined(__i386__) || defined(__x86_64__)) && !defined(EXAGEAR_COMPAT)
#ifdef HAVE_SYS_USER_H
#include <sys/user.h>
--
2.1.3

View File

@@ -0,0 +1 @@
Depends: ntdll-WRITECOPY

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,26 @@
From 47bc6db7c7dcb5c396b505dbb3c18263858122d9 Mon Sep 17 00:00:00 2001
From: Gerald Pfeifer <gerald@pfeifer.com>
Date: Sat, 29 Nov 2014 12:59:26 +0100
Subject: wordpad: Check for array index before using it in
registry_set_filelist.
---
programs/wordpad/registry.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/programs/wordpad/registry.c b/programs/wordpad/registry.c
index 472ed4d..5b570e7 100644
--- a/programs/wordpad/registry.c
+++ b/programs/wordpad/registry.c
@@ -293,7 +293,7 @@ void registry_set_filelist(LPCWSTR newFile, HWND hMainWnd)
if(lstrcmpiW(newFile, pFiles[0]))
{
- for(i = 0; pFiles[i] && i < FILELIST_ENTRIES; i++)
+ for(i = 0; i < FILELIST_ENTRIES && pFiles[i]; i++)
{
if(!lstrcmpiW(pFiles[i], newFile))
{
--
2.1.3

View File

@@ -1,15 +1,15 @@
From 3e4695fd4eab3f7666cd5361f98f2ace34c43739 Mon Sep 17 00:00:00 2001
From 948a8706d6045fb6f8f624072bfa6ab97e91dc16 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 2 Oct 2014 19:44:31 +0200
Subject: kernel32: Add winediag message to show warning, that this isn't
vanilla wine.
---
dlls/kernel32/process.c | 11 +++++++++++
1 file changed, 11 insertions(+)
dlls/kernel32/process.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index 301c64a..5c5be22 100644
index 0a087ab..1052a79 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -65,6 +65,7 @@
@@ -20,23 +20,22 @@ index 301c64a..5c5be22 100644
#ifdef __APPLE__
extern char **__wine_get_main_environment(void);
@@ -1092,6 +1093,16 @@ static DWORD WINAPI start_process( PEB *peb )
@@ -1099,6 +1100,15 @@ static DWORD WINAPI start_process( PEB *peb )
DPRINTF( "%04x:Starting process %s (entryproc=%p)\n", GetCurrentThreadId(),
debugstr_w(peb->ProcessParameters->ImagePathName.Buffer), entry );
+ /* Wine developers don't like it, when bug are reported with Wine versions containing our patches. */
+ if (CreateEventA(0, 0, 0, "__winestaging_warn_event") && GetLastError() != ERROR_ALREADY_EXISTS)
+ {
+ FIXME_(winediag)("Wine Staging is a Wine testing version containing experimental patches.\n");
+ FIXME_(winediag)("Please don't report bugs at winehq.org and use our issue tracker instead:\n");
+ FIXME_(winediag)("https://github.com/wine-compholio/wine-staging/issues\n");
+ FIXME_(winediag)("Wine Staging is a testing version containing experimental patches.\n");
+ FIXME_(winediag)("Please report bugs at http://bugs.wine-staging.com (instead of winehq.org).\n");
+ }
+ else
+ WARN_(winediag)("Wine Staging is a Wine testing version containing experimental patches.\n");
+ WARN_(winediag)("Wine Staging is a testing version containing experimental patches.\n");
+
SetLastError( 0 ); /* clear error code */
if (peb->BeingDebugged) DbgBreakPoint();
return call_process_entry( peb, entry );
--
2.1.1
2.1.3

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,58 @@
From f15052fa02af7b2cfa23131b713ba95a2bc1cfd5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Wed, 26 Nov 2014 21:31:43 +0100
Subject: api-ms-win-core-fibers-l1-1-0: Add dll.
---
configure.ac | 1 +
dlls/api-ms-win-core-fibers-l1-1-0/Makefile.in | 1 +
dlls/api-ms-win-core-fibers-l1-1-0/api-ms-win-core-fibers-l1-1-0.spec | 4 ++++
tools/make_specfiles | 1 +
4 files changed, 7 insertions(+)
create mode 100644 dlls/api-ms-win-core-fibers-l1-1-0/Makefile.in
create mode 100644 dlls/api-ms-win-core-fibers-l1-1-0/api-ms-win-core-fibers-l1-1-0.spec
diff --git a/configure.ac b/configure.ac
index 04bcbd8..08baf3d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2649,6 +2649,7 @@ WINE_CONFIG_DLL(api-ms-win-core-com-l1-1-0)
WINE_CONFIG_DLL(api-ms-win-core-console-l1-1-0)
WINE_CONFIG_DLL(api-ms-win-core-debug-l1-1-1)
WINE_CONFIG_DLL(api-ms-win-core-errorhandling-l1-1-1)
+WINE_CONFIG_DLL(api-ms-win-core-fibers-l1-1-0)
WINE_CONFIG_DLL(api-ms-win-core-file-l1-2-0)
WINE_CONFIG_DLL(api-ms-win-core-handle-l1-1-0)
WINE_CONFIG_DLL(api-ms-win-core-heap-l1-2-0)
diff --git a/dlls/api-ms-win-core-fibers-l1-1-0/Makefile.in b/dlls/api-ms-win-core-fibers-l1-1-0/Makefile.in
new file mode 100644
index 0000000..f4cc782
--- /dev/null
+++ b/dlls/api-ms-win-core-fibers-l1-1-0/Makefile.in
@@ -0,0 +1 @@
+MODULE = api-ms-win-core-fibers-l1-1-0.dll
diff --git a/dlls/api-ms-win-core-fibers-l1-1-0/api-ms-win-core-fibers-l1-1-0.spec b/dlls/api-ms-win-core-fibers-l1-1-0/api-ms-win-core-fibers-l1-1-0.spec
new file mode 100644
index 0000000..26afab1
--- /dev/null
+++ b/dlls/api-ms-win-core-fibers-l1-1-0/api-ms-win-core-fibers-l1-1-0.spec
@@ -0,0 +1,4 @@
+@ stdcall FlsAlloc(ptr) kernel32.FlsAlloc
+@ stdcall FlsFree(long) kernel32.FlsFree
+@ stdcall FlsGetValue(long) kernel32.FlsGetValue
+@ stdcall FlsSetValue(long ptr) kernel32.FlsSetValue
diff --git a/tools/make_specfiles b/tools/make_specfiles
index 9eae0ac..7f232f3 100755
--- a/tools/make_specfiles
+++ b/tools/make_specfiles
@@ -134,6 +134,7 @@ my @dll_groups =
"api-ms-win-core-processthreads-l1-1-1",
"api-ms-win-core-debug-l1-1-1",
"api-ms-win-core-errorhandling-l1-1-1",
+ "api-ms-win-core-fibers-l1-1-0",
"api-ms-win-core-interlocked-l1-2-0",
"api-ms-win-core-profile-l1-1-0",
"api-ms-win-core-string-l1-1-0",
--
1.9.1

Some files were not shown because too many files have changed in this diff Show More