aboutsummaryrefslogtreecommitdiffstats
path: root/bin/common/srtool_patcher.py
AgeCommit message (Collapse)Author
2019-01-19srtool_patcher: fix in-line change handling in public areaDavid Reyna
Only capture the custom sections in the in-line patch file, so that changes to the public areas are kept to the original file. This allows the user to push those public differences or remove them, and not affect the application of the custom patch file. Signed-off-by: David Reyna <David.Reyna@windriver.com>
2019-01-19srtool_patcher: add custom exclusion supportDavid Reyna
Add the ability to exclude sections of the common code. The primary use case is if the common code is executinga function that causes undesired side effects for the customization. Here is example code in "bin/acme/patcher/inplace/bin/srt.patch": ### ACME_EXTENSION_EXCLUDE_BEGIN ### #echo "The system will $CMD." # ### ACME_EXTENSION_EXCLUDE_END ### ### ACME_EXTENSION_BEGIN ### # # NOTE: Exclusions should be used only when necessary # NOTE: The excluded lines are commented so that they are inactive # but restorable # echo "The ACME SRTool system will now $CMD!" ### ACME_EXTENSION_END ### The content in the excluded section are commented, so that when it is cleaned those lines can be restored to the original. Signed-off-by: David Reyna <David.Reyna@windriver.com>
2019-01-19srtool: add in-place custom patching supportDavid Reyna
Add 'in-place' patch support for customizing organization patches on top of regular upstream SRTool files. An example is provided in "bin/acme/patcher/inplace/bin/srt", which adds a custom hello message. * To assert (merge) the custom version for runtime, run: $ ./bin/common/srtool_patcher.py -J bin/acme/patcher.json -I * To stash the customized version and replace with clean version (but keep any changes in the public sections for pushing upstream), run: $ ./bin/common/srtool_patcher.py -J bin/acme/patcher.json -i Signed-off-by: David Reyna <David.Reyna@windriver.com>
2019-01-17srtool: clean up patcher scriptDavid Reyna
Fix the description and usage examples in the header. Remove unused command. Signed-off-by: David Reyna <David.Reyna@windriver.com>
2019-01-17srtool: patcher, Jira template, Jira ACMEDavid Reyna
Add formal support for extending and customizing shared template code files. * The initial use case is a shared Jira integration file that partners can extend to their particular installation. A working example is provided in the ACME directory: upstream: "bin/common/srtool_jira_template.py" custom : "bin/acme/srtool_jira_acme.py" * The custom sections are blocked off with comment tags (e.g. ACME) ### ACME_EXTENSION_BEGIN ### ... ### ACME_EXTENSION_END ### * The './bin/common/srtool_patcher.py' tool provides the support, for example: To merge shared upstream code into the custom Jira script, run: $ ./bin/common/srtool_patcher.py -j bin/acme/patcher.json --merge-original To merge edits in script's common areas back to upstream, run: $ ./bin/common/srtool_patcher.py -j bin/acme/patcher.json --merge-custom Signed-off-by: David Reyna <David.Reyna@windriver.com>