Ken Robinson's picture

So I am hacking away at TKLDev trying to setup a modified core for my usings. I am now at the point to create a new initialization hook.

I think I have the TKLDev toolchain down. I have written down how I think I understand the process just to confirm I got it down. 

When "make" is run it does the following

1. creates a copy using deck of the bootstrap file system to root.build or root.spec (not sure)

2. chroot and installs apps according to the plan to root.build

3. creates a copy using deck of the root.build to root.patched

4. chroot to root.patched copy config.d files and executed

(At some point the overlays are applied, I think this is between 3 and 2)

depending on create the chroot only (sandbox / root.tmp) it will make the root file system from root.patched and write out a iso using the cdroot dir as source

I think this is how it works, correct me if I am wrong. 

So then to customize/create a new app:

1. New packages go into the "plan"

2. Changes that can be made via script are scripted in the "conf.d"

3. New files and dirs go into the "overlays"

 

Assume that the above is correct, where then do I add my Initialization Hooks? I think they could be added via a script in the conf.d or better yet a new file in the overlay. 

 

On a side note. I must say as I am understanding the build process, I really like it. it's nice an DRY and it does not take much to customize or even create a whole new app.

 

 

Forum: 
Tags: 
Jeremy Davis's picture

Although TBH I am not 100% sure of the exact way things go. Having said that essentially AFAIK it goes like this:

  1. the plan is applied (hence why if you wish to install from a non-standard repo you need to do that with a conf.d script)
  2. the overlay is applied
  3. the conf.d scripts are processed (in alphanumeric order)

From my own experimentation I am pretty sure that the overlay is applied first as I have used it to add non-standard repos (which I have installed from in a conf.d script). However I note that Alon and Liraz always seem to add repos and apt preferences from conf.d scripts rather than add them as overlays. I'm not sure on their rationale but I have tried to follow it. OTOH I have always added inithook scripts to the overlays. To me that makes more sense...

Ken Robinson's picture

Thanks Jeremy,

Overlay then conf.d scripts makes sense, since the conf.d script may require files/dir.

I think then as long as the core devs don't see otherwise, will have new files/dir that pertain to the app in the overlay, and any changes to existing files/dir use a conf.d script. 

 

Also FYI, I am typing up a quick overview (for my self) but will post it to the general form for review and tweaks. It will be based on the current docs on github (I forked it and created a doc-update branch) I figured a doc for a newb written by one (sort of ) would be helpful in the quest of documentation nirvana!

Regards,

Ken  
":0)

http://www.github.com/DocCyblade

Jeremy Davis's picture

I think that it's great to share regardless, but especially if you have something that you're pretty happy with.

You could even consider sending a pull request through GitHub if you think that the core docs need adjustment! :)

Add new comment