-
Notifications
You must be signed in to change notification settings - Fork 39
Developers Guide
Developers guide to make changes in the packaging repo for debain/redhat contrail packages
SKU -- Openstack release name (mitaka, newton etc..)
SERIES -- OS release (trusty, xenial etc..)
Makefile has common target %-deb , which can handle make of all the packages for all SKU’s/SERIES, This is achieved by
Making rules and control or control.in work for the Latest/greatest SKU/SERIES
Create control. and/or control.. for each package under debian (only if it is different)
Finding the control/rules file dynamically during make, following is the precedence order to determine the control and rules files to use.
control <—————Lowest precedence
contro.in
control.<SERIES>.in
control.<SERIES>.<SKU>.in <—————Highest precedence
Similarly rule file precedent order follows,
rules <—————Lowest precedence
rules.<SERIES>
rules.<SERIES>.<SKU> <—————Highest precedence
When introducing new SKU/SERIES,
If there is a change in dependency for the new SKU/SERIES, Rollback the control.in as below
Copy existing control.in to control.<PREVIOUS_SERIES>.in
Copy existing control.in to control.<PREVIOUS_SERIES>.<PREVIOUS_SKU>.in and add dependency specific to that SKU (Only if a particular SKU has different set of dependencies other than control.<PREVIOUS_SERIES>.in created in previous step)
Modify the existing control.in to work for the new SKU/SERIES
If there is a change in files to be installed/packaged for the new SKU/SERIES, Rollback the rules as below
Copy existing rules to rules.<PREVIOUS_SERIES>.in
Copy existing rules.in to rules.<PREVIOUS_SERIES>.<PREVIOUS_SKU>.in and add install files specific to that SKU (Only if a particular SKU has different set of files to be installed/packaged other than rules.<PREVIOUS_SERIES>.in created in previous step)
Modify the existing rules to work for the new SKU/SERIES
If there is no change in dependencies and files to be installed/packaged for the new SKU/SERIES
Existing rules/control will work for the new SKU/SERIES
Advantages of this design
we can avoid code duplication in Makefile for every SKU with just the target name suffix change
No need to worry about control.in/rules change if there is no difference between previous and new SKU/SERIES