]> xenbits.xensource.com Git - people/gdunlap/xsatool.git/commitdiff
README.md: Add documentation for dedup-patches
authorGeorge Dunlap <george.dunlap@citrix.com>
Fri, 27 Jul 2018 13:52:37 +0000 (14:52 +0100)
committerGeorge Dunlap <george.dunlap@citrix.com>
Fri, 27 Jul 2018 13:52:37 +0000 (14:52 +0100)
Signed-off-by: George Dunlap <george.dunlap@citrix.com>
README.md

index 4b76407caaf87ce9311142396e062d9008edee73..cca0d83e43fc142c3ba8ffcf41206ea39f2d40d4 100644 (file)
--- a/README.md
+++ b/README.md
@@ -244,6 +244,29 @@ For each version for which `xsa/213/${v}` exists, this will:
  - Generate patches in xsa.git
 
  - Update the recipe for that version in `xsa213.meta`
+`xsatool 213 dedup-patches`
+Sync-patches will always generate a separate set of patches for each
+version.  But it's often the case that a single patch or set of
+patches can apply to multiple versions.
+
+This command will go through the supported versions, from newest to
+oldest, checking to see if the patches in the recipe are functionally
+equivalent to those in the next higher version:
+
+ - Create a branch called `xsa/dedup-canonical` using the current
+   recipe for version `${v}`
+   
+ - Attempt to create a branch called `xsa/dedup-candidate` using the
+   recipe for version `${v}+1`.  If the `git am` fails, the current
+   patches are not redundant and move on to the next version.
+   
+ - Compare a hash of the two trees (generated with `git rev-partse
+   $branch:`).  If they match, replace the recipe `${v}` with the
+   recipe for `${v}+1`.  Otherwise, leave it as it is.
+   
+NB at the moment this only works for the xen repo.
 
 ## Creating XSA metadata from existing patches