How To
Summary
How to create clone of parent and child channels to a certain package update date using spacewalk-clone-by-date using CLI
Objective
Environment
Steps
susemanager:~/jupiter# spacecmd -q -- softwarechannel_listbasechannels
sle-product-sles15-pool-ppc64le
sle-product-sles15-pool-s390x
sle-product-sles15-pool-x86_64
sle-product-sles15-sp1-pool-s390x
sle-product-sles15-sp1-pool-x86_64
sle-product-sles_sap15-pool-ppc64le
sle-product-sles_sap15-sp1-pool-ppc64le
sle-product-sles_sap15-sp1-pool-x86_64
sle11-sp4-sap-pool-ppc64
sle12-sp3-sap-pool-ppc64le
sle12-sp4-sap-pool-ppc64le
sle12-sp4-sap-pool-x86_64
sles11-sp4-pool-ppc64
sles11-sp4-pool-s390x
sles11-sp4-pool-x86_64
sles12-sp2-pool-x86_64
sles12-sp3-pool-ppc64le
sles12-sp3-pool-s390x
sles12-sp3-pool-x86_64
sles12-sp4-pool-ppc64le
sles12-sp4-pool-s390x
sles12-sp4-pool-x86_64
in this case the base (parent ) channel we are going to clone the child from is sles12-sp4-pool-s390x
susemanager:~/jupiter# spacecmd -q -- softwarechannel_listchildchannels sles12-sp4-pool-s390x
sle-ha12-sp4-pool-s390x
sle-ha12-sp4-updates-s390x
sle-manager-tools12-pool-s390x-sp4
sle-manager-tools12-updates-s390x-sp4
sle-sdk12-sp4-pool-s390x
sle-sdk12-sp4-updates-s390x
sles12-sp4-updates-s390x
suse-packagehub-12-sp4-pool-s390x
suse-packagehub-12-sp4-standard-pool-s390x
3. We will need to use the GUI to create a clone parent channel in order to clone the parent ( base channel ) :
From GUI go to the side menu and choose :
Software ==> Manage Software Channels ==> click at (+ Create Channel )
Fill in the details of the channel , for this example we will fill in these details
Channel Name*: s390x-patch-archives-channel
Channel Label*: s390x-patch-archives-channel
Parent Channel: None
Architecture: s390x
Repository Checksum Type: sha1
Tip: sha1 offers the widest compatibility with clients. sha256 offers higher security, but is compatible only with newer clients: Fedora 11 and newer, Red Hat Enterprise Linux 6 and newer or SLES11-SP1 and newer.
Channel Summary*: s390x-patch-archives-channel
Enable GPG check : yes ( check mark )
Then Click on Create Channel
sles12-sp4-updates-s390x
Spacewalk-clone-by-date configuration file :
Here is below a sample of the configuration file after being modified :
{
"username":"susemanager",
"to_date": "2019-09-30", ç========== the date should be identified to the last day the updates needed
"skip_depsolve":false,
"security_only":false,
"use_update_date":false,
"no_errata_sync":false,
"dry_run":false,
"channels":[
{
"sles12-sp4-pool-s390x":
{
"label": "s390x-patch-archives-channel",
"existing-parent-do-not-modify": true
},
"sles12-sp4-updates-s390x":
{
"label": "sles12-sp4-updates-s390x-clone-jupiter-last",
"name": "Jupiter Last Clone test",
"summary": "This is my channel's summary example",
"description": "This is my channel's description example"
}
}
]
}
============================================Config File End=====================================================
susemanager:~/jupiter# spacewalk-clone-by-date -c jupiter.conf
Password:
Reading repository information.
Using issue_date.
By continuing the following channels will be created:
sles12-sp4-updates-s390x-clone-jupiter-last
Continue with channel creation (y/n)?y
Cloning sles12-sp4-updates-s390x to sles12-sp4-updates-s390x-clone-jupiter-last with original package set.
Copying repodata, please wait.
Solving Dependencies (0):
________________________________________
######################################## - complete
Processing Dependencies:
________________________________________
######################################## - complete
By continuing the following will be cloned:
sles12-sp4-updates-s390x -> sles12-sp4-updates-s390x-clone-jupiter-last (472/499 Errata)
Continue with clone (y/n)?y
Cloning Errata into sles12-sp4-updates-s390x-clone-jupiter-last (472):
________________________________________
######################################## - complete
Copying repodata, please wait.
Solving Dependencies (2031):
________________________________________
######################################## - complete
Processing Dependencies:
________________________________________
######################################## - complete
Dependencies added, looking for new dependencies
Solving Dependencies (9):
________________________________________
######################################## - complete
Processing Dependencies:
________________________________________
######################################## - complete
9 RPM(s) added to sles12-sp4-updates-s390x-clone-jupiter-last to resolve dependencies.
6 errata added to sles12-sp4-updates-s390x-clone-jupiter-last to resolve dependencies.
Please see /var/log/rhn/errata-clone.log for details.
susemanager:~/jupiter#
susemanager:~/jupiter# spacecmd -q -- softwarechannel_listchildchannels | grep last
sles12-sp4-updates-s390x-clone-jupiter-last
susemanager:~/jupiter#
or from GUI :
Software ==> Manage Software Channels ==> Overview
susemanager:~/jupiter# spacewalk-clone-by-date -d 2019-09-30 -u susemanager -p yourpass -l sles12-sp4-updates-s390x sles12-sp4-updates-s390x-clone-jupiter-last -a sles12-sp4-pool-s390x s390x-patch-archives-channel
Related Information
Document Location
Worldwide
Was this topic helpful?
Document Information
Modified date:
01 April 2021
UID
ibm11085979