From e2b225dc2aed127b55bd31f04bb7d0b99bf99492 Mon Sep 17 00:00:00 2001 From: Kai Krakow Date: Thu, 31 Jan 2019 05:14:51 +0100 Subject: [PATCH] [wip] tooling: Add patch collection tooling. 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 --- docs/patches/staging.yml | 37 +++++++++++++++++++++++++++++++++++++ tools/mkpatchlist.rb | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 docs/patches/staging.yml create mode 100755 tools/mkpatchlist.rb diff --git a/docs/patches/staging.yml b/docs/patches/staging.yml new file mode 100644 index 00000000000..41e1f5a2956 --- /dev/null +++ b/docs/patches/staging.yml @@ -0,0 +1,37 @@ +Compiler_Warnings: [] +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-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-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: [] diff --git a/tools/mkpatchlist.rb b/tools/mkpatchlist.rb new file mode 100755 index 00000000000..ee11b0856ba --- /dev/null +++ b/tools/mkpatchlist.rb @@ -0,0 +1,38 @@ +#!/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| + dir = File.join "patches", source_directory + files = File.join dir, "*.patch" + puts "# expanded from #{files}" + begin + definition = File.join dir, "definition" + File.read(definition).each_line do |line| + next if line =~ /^(#|Depends:)/ + puts "# #{line}" + end + rescue Errno::ENOENT + end + puts Dir.glob(files).sort + puts "" + 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 + +patches = Dir.glob('docs/patches/*.yml').inject({}) do |all,series| + all.merge! YAML.load_file(series) +end + +Dependencies.walk patches