37 | | After importing all the changes with `directory-sync` (or manually), you need to commit them into your SCDB, after checking it compiles successfully and the changes in the profiles look appropriate (generally mainly some RPMS update). For this last check you can use `src/utils/profiles/compare_xml` script. After integrating the new templates, identify the changed templates, review the change if necessary and revert those not appropriate. You'll probably need to revert changes of all templates in directories `repository` (these templates are site specific but some of them are required to reside in standard directories for multiple version support). |
| 37 | This tool updates a directory with the contents of a reference source, doing the following : |
| 38 | * For each directory existing both in QWG repository and in source tree : |
| 39 | * Removes all `.pan` files from the destination directory (the directory to update). |
| 40 | * Copy all .pan files from the source directory (built by appending destination directory name to source directory root) |
| 41 | * For each directory in the source tree and not in the repository, copy the tree from the source tree and add files to SVN QWG repository. |
| 42 | * For each directory in the repository but no longer in the source tree, do a `svn rm` of the directory. |
| 43 | * Show the differences with `svn status` |
42 | | === Fresh Installation of New Middleware Templates === |
| 52 | {{{ |
| 53 | find grid os standard -type d -not -path '*.svn*' -exec tools/directory-sync {} /tmp/scdb-vanilla/cfg \; |
| 54 | }}} |
| 55 | |
| 56 | You need to fix manually the unexpected differences. Unexpected differences are all the templates that existed in the repository but no longer exist in the local workspace or all the templates copied from the source but not registered in the repository. There are 3 situations : |
| 57 | * A template has been renamed or moved. In this case, you should revert the change for this template, do the relevant `svn mv` and rerun [source:templates/trunk/tools/directory-sync directory-sync] to avoid breaking the template modification history. |
| 58 | * Else, if the template existed in the repository but is no longer present in the workspace (flagged `!` by `svn status`), it can be safely removed from the repository with command : |
| 59 | {{{ |
| 60 | # To remove template template_name.tpl |
| 61 | svn rm --force template_name.tpl |
| 62 | # To remove all templates no longer present in the repository |
| 63 | svn rm `svn status | grep '^\!' | awk '{print $2}'` |
| 64 | }}} |
| 65 | * Else, if the template is present in the workspace but not registered into the repository ((flagged `?` by `svn status`) and this is a new template, it should be added to the repository with one of theses commands : |
| 66 | {{{ |
| 67 | # Add one specific template template_name.tpl |
| 68 | svn add template_name.tpl |
| 69 | |
| 70 | # Add all the files not yet registered in the repository |
| 71 | svn add `svn status | grep '^\?' | awk '{print $2}'` |
| 72 | }}} |
| 73 | |
| 74 | When you have cleaned up the situation for all the templates, except those that are present in the workspace (because they are used in your local Quattor configuration) but don't need to be in the repository, you can do the final cleanup with : |
| 75 | {{{ |
| 76 | rm -f `svn status | grep '^\?' | awk '{print $2}'` |
| 77 | }}} |
| 78 | |
| 79 | When there is no more templates flagged as `!` (missing) or `?` (unknown), you can commit your changes to the repository. Please, take care of setting up a useful message for the commit as this is the only source for a ChangeLog... |
| 80 | |
| 81 | After importing all the changes with `directory-sync` (or manually), before committing them into your SCDB, check that you can compile them successfully and that the changes in the profiles look appropriate (generally mainly some RPMS update). For this last check you can use `src/utils/profiles/compare_profile` script. After integrating the new templates, identify the changed templates, review the change if necessary and revert those not appropriate. You'll probably need to revert changes of all templates in directories `repository` (these templates are site specific but some of them are required to reside in standard directories for multiple version support). |
| 82 | |
| 83 | == Fresh Installation of New Middleware Templates === |