spacewalk-clone-by-date

8 Version 1.0

`spacewalk-clone-by-date`

spacewalk-clone-by-date is DEPRECATED. Please use Content Lifecycle Management Tool. Utility for cloning errata by date (For RHEL5 and above).

            spacewalk-clone-by-date
            options ...

            -a SRC_PARENT DEST_PARENT
    	--parents=SRC_PARENT DEST_PARENT

            -b PKG1,PKG2,PKG3
            --blacklist=PKG1,PKG2,PKG3

            -c CONFIGFILE
            --config=CONFIGFILE

            -d=YYYY-MM-DD
            --to_date=YYYY-MM-DD

            -e--errata

            -h--help

            -j--dry-run

            -k--skip_depsolve

            -l SRC DEST DEST_NAME DEST_SUMMARY DEST_DESCRIPTION
    	--channels=SRC DEST DEST_NAME DEST_SUMMARY DEST_DESCRIPTION

            -m--sample-config

            -n--no-errata-sync

            -o--security_only

            -p PASSWORD
            --password=PASSWORD

            -r PKG1,PKG2,PKG3
            --removelist=PKG1,PKG2,PKG3

            -u USERNAME
            --username=USERNAME

            -v--validate

            -x--skip-errata-depsolve

            -y--assumeyes

            -z--use-update-date

## Description

spacewalk-clone-by-date is DEPRECATED. Please use Content Lifecycle Management Tool.

spacewalk-clone-by-date tool, clones all the errata belonging to a specified channel, as of a specific date.

Script to clone all errata belonging to software channels as of a specific date, attempting to ensure any added packages have their dependencies satisfied. Any destination channels that do not exist will be created.

By specifying channels on the command line, only a single channel tree (a base channel and its children) can be cloned with a single command. If you would like to specify multiple trees within a single command, simply use a configuration file. See --sample-config for a sample.

All options can either be specified in the configuration file or via command line. Any option specified via command line will override a configuration file value with the exception of channels. If a configuration file is specified, --channels is not a valid command line argument.

Please note that spacewalk-clone-by-date will pull in any packages or errata needed to resolve dependencies for any errata being cloned. It is therefore possible for the cloned channel(s) to end up with errata and packages which are newer than the specified date. This is expected behavior.

Spacewalk-clone-by-date is tool that provides a best-effort attempt at cloning valid and dependency-complete channels. However, there is not enough information available to guarantee that the results will always be completely dependency-complete, especially if used with the --errata, --security_only, --blacklist, or --removelist options. This is a tool to assist Administrators with channel creation, it cannot replace them. Cases where spacewalk-clone-by-date cannot completely resolve all potential dependencies include but are not limited to: if the original channel is not dependency-complete, if the original channel does not have or contains incomplete errata information, or if packages are not strictly dependent on each other but conflict with specific versions.

Note: Unlike previous versions spacewalk-clone-by-date now clones entire errata that are determined to be required when doing dependency resolution, not just single packages. This solves a number of dependency-completeness problems but is still not a perfect solution. This may mean that errata end up being cloned that do not meet your specifications (for example, that were added after the --to_date or are not security errata when used with --security_only). This is expected behavior. The only way to avoid this is to run with --skip_depsolve and manually resolve any dependency cloning that may be required.

The addition of the --skip-errata-depsolve switch allows the user to control whether adding an erratum due to dependency resolution, will add all of that erratum's packages to the dependency-resolution list. The default is to add all such discovered packages. As for dependency-resolution in general, this may result in more packages and errata being added to the cloned channel than desired. The user can avoid this by specifying --skip-errata-depsolve, manually resolving any dependency issues that may be encountered.

Note: spacewalk-clone-by-date does not support RHEL4 and earlier versions. It's a limitation of this tool. Spacewalk-clone-by-date is intended for use with Red Hat channels. There is no guarantee that it will work properly with channels populated with content from third party sources.

## Options

-h, --help

- Display the help screen with a list of options.

-a `SRC_PARENT DEST_PARENT`, --parents=`SRC_PARENT DEST_PARENT`

- The parent channels that will be used for dependency resolution and that newly cloned channels will be created as children of. No changes will be made to these channels unless dependency resolution demands it. If only the destination parent channel is specified then the source parent channel will be automatically chosen as the channel the destination parent channel was cloned from. Both of these channels must already exist. The config file equivalent to this option is specifying '"existing-parent-do-not-modify": true' for a parent channel.

-b `PKG1,PKG2,PKG3`, --blacklist=`PKG1,PKG2,PKG3`

- Comma separated list of Perl-style regular expressions used to match package names to be removed after cloning. Only newly added packages will removed if they are on the blacklist. Dependency resolution is not ensured on resulting repository.

  Note: This option is global across all destination channels. To specify per channel blacklists, you must use a configuration file. See --sample-config for an example.

-c `FILE`, --config=`FILE`

- Configuration file holding parameters, see --sample-config for an example. Any command-line parameters override those in the specified config file.

-d `YYYY-MM-DD`, --to_date=`YYYY-MM-DD`

- All errata on or before the specified date will be cloned if it does not already exist in the destination channel(s). If this option is omitted no errata will be cloned (unless dependency resolution demands it).

-e --errata

- Clone only specified errata (and their dependencies). A comma-separated list (e.g. --errata=RHSA-2014:0043,RHBA-2014:0085).

-j --dry-run

- Creates a file for each pair of channels in the working directory that comprises the list of erratas that are to be cloned. No actual errata cloning takes place.

  Warning: If some of the destination channels do not exist, they will be created with the original package set.

-k --skip_depsolve

- Do not attempt to ensure added packages have needed dependencies (Not recommended).

-l `SRC_LABEL DEST_LABEL DEST_NAME DEST_SUMMARY DEST_DESCRIPTION`, --channels=`SRC_LABEL DEST_LABEL DEST_NAME DEST_SUMMARY DEST_DESCRIPTION`

- Space separated list of source channel and destination channel. Can be specified multiple times to provide base channel and child channel pairs of a single channel tree. Can optionally include destination channel name, summary, and description, in that order. To specify more than one channel tree, specify a config file.

-m --sample-config

- Generate a sample configuration file.

-n --no-errata-sync

- Do not automatically synchronize the package list of cloned errata with their originals. This may make spacewalk-clone-by-date have unexpected results if the original errata have been updated (e.g.: syncing another architecture for a channel) since the cloned errata were created. If omitted we will synchronize the cloned errata with the originals to ensure the expected packages are included (default).

  Errata clones do not necessarily get updated by satellite-syncing new architectures of existing channels. Another example would be if the errata contains some packages in one channel (say the base channel) and additional packages in another channel (say a child channel). Or it may be due to simply adding or removing packages from a custom errata that you have already created a clone of. Since cloned errata are not automatically updated when the original errata are, over time they may become out-of-sync and require synchronization in order for associating the cloned errata with a cloned channel to have the normally expected effect.

-o --security_only

- Clone only security errata (and their dependencies).

-p `PASSWORD`, --password=`PASSWORD`

- password of user that has administrative access. If not provided, password will be prompted for.

-r `PKG1,PKG2,PKG3`, --removelist=`PKG1,PKG2,PKG3`

- Comma separated list of Perl-style regular expressions used to match package names to be removed after cloning. All packages are considered for removal, even those not added by errata/channel cloning. Dependency resolution is not ensured on resulting repository.

  Note: This option is global across all destination channels. To specify per channel removelists, you must use a configuration file. See --sample-config for an example.

-u `USERNAME`, --username=`USERNAME`

- username of user that has administrative access.

-v --validate

- Run repoclosure on all provided channels. This overrides --to_date and will not perform any cloning.

-x --skip-errata-depsolv

- When pulling in an erratum to satisfy dependency-resolution, DO NOT add that erratum's packages to the list of packages to do dependency-resolution against. This will result in fewer packages/errata being included for dependency-resolution (sometimes MANY fewer) at the possible expense of a cloned channel that is not dependency-complete. If omitted, we will add an erratum's packages to the list required for dependency-resolution and recurse on the list (default).

-y --assumeyes

- Instead of asking for confirmation before cloning a channel or errata, continue uninterrupted.

-z --use-update-date

- While cloning errata by date, clone all errata that have last been updated on or before the date provided by to_date. If omitted will use issue date of errata (default).

## Examples

### Clone a base channel and child channel to 2008-12-20 with a blacklist excluding all versions of squid, and all versions of any package that starts with 'sendmail'.

spacewalk-clone-by-date --channels=rhel-x86_64-server-5 clone-rhel --channels=rhn-tools-rhel-x86_64-server-5 clone-tools 'Clone Tools Name' 'Clone Tools Summary' 'Clone Tools Description' --username admin --password redhat --to_date=2008-12-20 --blacklist='sendmail.*,squid,compat-libstdc\+\+'

### Clone with options completely from a config file.

spacewalk-clone-by-date --config=/etc/clone.conf

### Clone while overriding some options from the command line.

spacewalk-clone-by-date --config=/etc/clone.conf --username rocky --password squirrel --to_date=2010-10-09

## Log Output

In addition to writing to stdout, spacewalk-clone-by-date writes a detailed description of every run to a log file. This file can be found at /var/log/rhn/errata-clone.log Log output includes:

- The command-line arguments or config-file contents used for the run

- The output of each round of dependency-checking that adds packages/errata

- The complete list of all errata and packages cloned into each channel

## Authors

- Justin Sherrill jsherrill@redhat.com
- Stephen Herr sherr@redhat.com
- Grant Gainey ggainey@redhat.com