This is a small project for testing the current NCC setup.
- inifile / rubygem-inifile https://build.opensuse.org/project/repositories?project=devel%3Alanguages%3Aruby%3Aextensions
- xml-simple / rubygem-xml-simple https://build.opensuse.org/project/repositories?project=devel%3Alanguages%3Aruby%3Aextensions
- suseRegister
- git - to get the sources and for development
Prepares a new chroot directory by installing the required packages downloaded from repositories given as parameters. Repositories are configured in /etc/ncc_registration.conf in Repos section (alias = URL). The new chroot repository must not exist.
Prepares the system to a 'clean' state. All previous registrations are removed by deleting NCC Credentials.
Installs some products into the system and marks one as the base one.
Runs registration using /etc/suseRegister.conf and /etc/ncc_registration.conf
Lists all currently used repositories, services and applicable patches.
suse_register command is used for manual registration:
suse_register -a email='[email protected]' -a regcode-sles='SLES-registration-code' --restore-repos --force-registration
The current solution in 'register' script uses registration data entered into /etc/ncc_registration.conf file which you have to create on your system using default_registration.conf in the base directory of this project.
NCC Testsuite can be called in chroot (not to destroy your system). To prepare a chroot with openSUSE 12.1 as the base system, run the following commands. In this example, /chroot-1/ is used for the chroot directory.
mkdir -pv /chroot-1/
zypper --root=/chroot-1/ --gpg-auto-import-keys ar --refresh http://download.opensuse.org/distribution/12.1/repo/oss/ openSUSE_12.1_OSS
zypper --non-interactive --root=/chroot-1/ --gpg-auto-import-keys ref
mkdir -pv /chroot-1/proc
mount --bind /proc/ /chroot-1/proc/
mkdir -pv /chroot-1/dev
mount --bind /dev/ /chroot-1/dev/
zypper --non-interactive --root=/chroot-1/ install --auto-agree-with-licenses suseRegister yast2-trans-en_US suse-build-key openssl-certs
- suseRegister is needed for running registration in chroot
- ca-certificates-cacert and ca-certificates-mozilla are needed for SSL communication
- yast2-trans-en_US is some language package required by suseRegister (otherwise no repositories are returned from NU service) [should be required by suseRegister? bug or feature?]
- openSUSE-build-key contains GPG keys for SUSE repositories (alternatively can be replaced with suse-build-key) [should be required by suseRegister? bug or feature?]
ln --force /etc/resolv.conf /chroot-1/etc/