Brian Fisher's picture

I have two questions relative to the content at the bottom of this page:


The documentation for the tklpatch process on this page references "patch patching". By this, I'm guessing the authors mean to extend a previously created patch or perhaps create larger versions of a patch as it is developed further?


1. Can someone give me a use case for patching a patch? I'd like to understand why to do it.


2. Can someone explain to me how to implement this patching scheme? Let's say that you have created a "patchA" and then later a "patchB". How would you put that into the directory structure described in the link above?



Jeremy Davis's picture

The usage scenario for nested paches would be building on a base. So for example you found a new whiz bang webserver that TKL didn't already produce an appliance for. You could create a base patch (let's call it wb-webserver) that should be applied to TKL Core.

You could then use that as the basis for a range of other appliances (that run on a web server). So instead of having to install wb-webserver within each patch, you could just nest the complete wb-webserver patch into each subsequent patch (that uses it as a base).

In the past I have created a patch to configure my servers exactly how I like them (a couple of extra packages and some proxy config). I have then nested that in patches I have applied making it a one step process.

Brian Fisher's picture

Thanks Jeremy!

That makes complete sense.

So, when you're creating the nested patches, what is the correct way to organize them? Here's the example from the page above:








Is the nesting based on the directory structure, or the alpha-numeric value? or both? In this example (assuming that patch5 is a patch that isn't *.tar.gz'd), would patch 5 occur first because it is the deepest in the tree? Then, patch3.tar.gz, patch4.tar.gz, then patch2 and finally patch1? If so, then patch1 would be the most recent patch that is built on top of the underlying patches?


Jeremy Davis's picture

First structure, then alpha-numeric.

I haven't actually tested it as I've allways just nested one level of patches and used alpha-numeric ordering, but my understanding is that the above example would execute in this order:

  1. patch5/
  2. patch3.tar.gz
  3. patch4.tar.gz
  4. patch2/
  5. patch1/
Brian Fisher's picture

OK, that is the way that I read it also.

Thanks for your input and insight!


Add new comment