Skip to content

Commit

Permalink
[wip] tooling: Add patch collection tooling.
Browse files Browse the repository at this point in the history
A work-in-progress list of applied patches is kept in `docs/patches` in
YAML format. The current design is a manually crafted inverse dependency
list. In the future it should generate this tree automatically from
staging definition files. The leafs of this tree are the patche series
applied to this repository.

Running `tools/mkpatchlist.rb` will generate a list of files suitable to
be fed to `git am`.

You need to point the tool to the staging patches repository by creating
a symlink to its patches directory, e.g.:

```bash
echo "/patches" >>.git/info/exclude
ln -s ../wine-staging/patches
```

Now run `tools/mkpatchlist.rb` to compile a list of patch files for
`git-am`. In the future this tool will be part of a toolchain to
recreate this wine branch from scratch on top of a vanilla wine branch.
Also in the future, it will list the Proton patches as individual patch
series to make crafting an individual wine version more easy. I'll then
push a wine patches repository forked from the staging patches
repository.

Signed-off-by: Kai Krakow <[email protected]>
  • Loading branch information
kakra committed Feb 5, 2019
1 parent 076e9bd commit e0f73a9
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
40 changes: 40 additions & 0 deletions docs/patches/staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
api-ms-win-Stub_DLLs:
kernel32-Processor_Group: []
d3d9-DesktopWindow: []
ddraw-Rendering_Targets: []
ddraw-Silence_FIXMEs: []
dinput-Deadlock: []
dsound-Fast_Mixer: []
gdi32-Lazy_Font_Initialization: []
gdi32-MultiMonitor: []
gdiplus-Performance-Improvements: []
iphlpapi-System_Ping: []
kernel32-K32GetPerformanceInfo: []
kernel32-NormalizeString:
libs-Unicode_Collation: []
kernel32-SCSI_Sysfs: []
ntdll-APC_Performance: []
ntdll-CriticalSection: []
ntdll-ThreadTime:
server-Realtime_Priority: []
ntdll-HideWineExports:
ntdll-UserSharedData:
winebuild-FakeDLLs:
ntdll-NtContinue: []
ntdll-Threading ntdll-Wait_User_APC server-Key_State server-PeekMessage server-ClipCursor server-Signal_Thread:
server-Shared_Memory: []
setupapi-Display_Device: []
shell32-IconCache: []
user32-minimized_windows: []
windowscodecs-GIF_Encoder windowscodecs-IWICPalette_InitializeFromBitmap:
windowscodecs-TIFF_Support:
windowscodecs-32bppPRGBA: []
wined3d-Accounting: []
wined3d-WINED3D_RS_COLORWRITEENABLE:
wined3d-Indexed_Vertex_Blending: []
wined3d-WINED3D_TEXF_ANISOTROPIC: []
wined3d-WINED3DFMT_B8G8R8X8_UNORM:
wined3d-DXTn:
d3dx9_36-DXTn: []
winepulse-PulseAudio_Support: []
ws2_32-APC_Performance: []
29 changes: 29 additions & 0 deletions tools/mkpatchlist.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env ruby

require 'yaml'

# Dependency walker to expand each patch series into a list of patch files
class Dependencies

def self.expand_patch series
series.split.each do |source_directory|
files = File.join "patches", source_directory, "*.patch"
puts "", "# expanded from #{files}"
puts Dir.glob(files)
end
end

def self.walk dependency_tree
dependency_tree.each_pair do |series,wanted_by|
expand_patch series
walk wanted_by unless wanted_by.empty?
end
end
end

puts "#!/usr/bin/env git am"
patches = Dir.glob('docs/patches/*.yml').inject({}) do |all,series|
all.merge! YAML.load_file(series)
end

Dependencies.walk patches

0 comments on commit e0f73a9

Please sign in to comment.