Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Centos 7.7 builds #1

Open
wants to merge 5 commits into
base: 2.0-nutanix
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,21 @@ build_iso:
- "debugging"
- "nutanix-ahv-group"
iso_root_fs_packages:
- "anaconda"
- "anaconda-dracut"
# packages needed by anaconda
- "redhat-upgrade-dracut"
- "grub2"
- "yum-langpacks"
mock_iso_repo_name: "host_os"
mock_iso_repo_dir: "/host-os-repo"
distro_repos_urls:
base: "http://vault.centos.org/altarch/7.3.1611/os/ppc64le/"
updates: "http://vault.centos.org/altarch/7.3.1611/updates/ppc64le/"
extras: "http://vault.centos.org/altarch/7.3.1611/extras/ppc64le/"
base: "http://vault.centos.org/altarch/7.7.1908/os/ppc64le/"
updates: "http://vault.centos.org/altarch/7.7.1908/updates/ppc64le/"
extras: "http://vault.centos.org/altarch/7.7.1908/extras/ppc64le/"
epel: "http://download.fedoraproject.org/pub/epel/7/ppc64le/"
distro_repo_args:
- "--excludepkgs=kernel*,qemu*,libvirt,libvirt-client,libvirt-daemon*,SLOF,nmap-ncat"
- "--excludepkgs=kernel*,qemu*,libvirt,libvirt-client,libvirt-daemon*,nmap-ncat"
update_metapackage:
push_repo_url:
push_repo_branch: "master"
Expand Down
24 changes: 22 additions & 2 deletions lib/iso_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ def _setup(self):
LOG.info("Initializing a chroot")
self._run_mock_command("--init")

package_list = ["createrepo", "pungi"]
package_list = [
"yum-plugin-priorities", "yum-utils", "createrepo", "pungi"]
LOG.info("Installing %s inside the chroot" % " ".join(package_list))
self._run_mock_command("--install %s" % " ".join(package_list))

Expand Down Expand Up @@ -148,7 +149,26 @@ def _create_iso_kickstart(self):

def _build(self):
LOG.info("Building ISO")
build_cmd = ("pungi -c %s --nosource --nodebuginfo --name %s --ver %s" %
build_cmd = ("pungi -c %s --nosource --nodebuginfo --name %s --ver %s -G -C" %
(self.config.get('automated_install_file'),
self.distro, self.version))
self._run_mock_command("--shell '%s'" % build_cmd)

# pylorax opens/creates installroot/proc/modules across the call to dracut
# to minimize warnings in the latter, but installroot/proc doesn't exist so
# it fails. Interestingly, dracut only produces one warning anyway.
self._run_mock_command(
"--shell 'sed -i s?proc/modules?proc-modules? /usr/lib/python2.7/site-packages/pylorax/treebuilder.py'");

# Increase the size of the temporary loop device used to build the live rootfs image
self._run_mock_command(
"--shell 'sed -i s?size=2,?size=4,? /usr/lib/python2.7/site-packages/pylorax/__init__.py'");

# Increase the size of the temporary loop device used to build the live rootfs image
self._run_mock_command(
"--shell 'sed -i s?size=2\):?size=4\):? /usr/lib/python2.7/site-packages/pylorax/treebuilder.py'");

build_cmd = ("pungi -c %s --nosource --nodebuginfo --name %s --ver %s -B -I" %
(self.config.get('automated_install_file'),
self.distro, self.version))
self._run_mock_command("--shell '%s'" % build_cmd)
Expand Down
7 changes: 4 additions & 3 deletions mock_configs/CentOS/7/CentOS-7-ppc64le.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ config_opts['target_arch'] = 'ppc64le'
config_opts['legal_host_arches'] = ('ppc64le',)
config_opts['dist'] = 'el7' # only useful for --resultdir variable subst
config_opts['releasever'] = '7'
config_opts['package_manager'] = 'yum'

config_opts['yum.conf'] = """
[main]
Expand All @@ -37,15 +38,15 @@ mdpolicy=group:primary
# repos
[base]
name=BaseOS
baseurl=http://vault.centos.org/altarch/7.3.1611/os/ppc64le/
baseurl=http://vault.centos.org/altarch/7.7.1908/os/ppc64le/
failovermethod=priority
gpgkey=file:///etc/pki/mock/RPM-GPG-KEY-CentOS-7,file:///etc/pki/mock/RPM-GPG-KEY-CentOS-SIG-AltArch-7-ppc64le
gpgcheck=0

[updates]
name=updates
enabled=1
baseurl=http://vault.centos.org/altarch/7.3.1611/updates/ppc64le/
baseurl=http://vault.centos.org/altarch/7.7.1908/updates/ppc64le/
failovermethod=priority
gpgkey=file:///etc/pki/mock/RPM-GPG-KEY-CentOS-7,file:///etc/pki/mock/RPM-GPG-KEY-CentOS-SIG-AltArch-7-ppc64le
gpgcheck=0
Expand All @@ -59,7 +60,7 @@ gpgcheck=0

[extras]
name=extras
baseurl=http://vault.centos.org/altarch/7.3.1611/extras/ppc64le/
baseurl=http://vault.centos.org/altarch/7.7.1908/extras/ppc64le/
failovermethod=priority
gpgkey=file:///etc/pki/mock/RPM-GPG-KEY-EPEL-7,file:///etc/pki/mock/RPM-GPG-KEY-CentOS-SIG-AltArch-7-ppc64le
gpgcheck=0
Expand Down
9 changes: 6 additions & 3 deletions mock_configs/CentOS/7/build-iso-CentOS-7-ppc64le.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ config_opts["macros"]["%__gzip"] = "/usr/bin/pigz"
config_opts["macros"]["%__bzip2"] = "/usr/bin/lbzip2"
config_opts['nspawn_args'] = ["--bind=/dev", "--bind=/dev/pts", "--bind=/dev/shm"]
config_opts['nspawn_args'] += ["--share-system"]
config_opts['nspawn_args'] += ["--capability=all"]
config_opts['root'] = 'CentOS-7-ppc64le'
config_opts['target_arch'] = 'ppc64le'
config_opts['legal_host_arches'] = ('ppc64le',)
config_opts['dist'] = 'el7' # only useful for --resultdir variable subst
config_opts['releasever'] = '7'
config_opts['package_manager'] = 'yum'

config_opts['yum.conf'] = """
[main]
Expand All @@ -34,19 +36,20 @@ assumeyes=1
syslog_ident=mock
syslog_device=
mdpolicy=group:primary
http_caching=packages

# repos
[base]
name=BaseOS
baseurl=http://vault.centos.org/altarch/7.3.1611/os/ppc64le/
baseurl=http://vault.centos.org/altarch/7.7.1908/os/ppc64le/
failovermethod=priority
gpgkey=file:///usr/share/distribution-gpg-keys/centos/RPM-GPG-KEY-CentOS-7,file:///usr/share/distribution-gpg-keys/centos//RPM-GPG-KEY-CentOS-SIG-AltArch-7-ppc64le
gpgcheck=1

[updates]
name=updates
enabled=1
baseurl=http://vault.centos.org/altarch/7.3.1611/updates/ppc64le/
baseurl=http://vault.centos.org/altarch/7.7.1908/updates/ppc64le/
failovermethod=priority
gpgkey=file:///usr/share/distribution-gpg-keys/centos/RPM-GPG-KEY-CentOS-7,file:///usr/share/distribution-gpg-keys/centos/RPM-GPG-KEY-CentOS-SIG-AltArch-7-ppc64le
gpgcheck=1
Expand All @@ -60,7 +63,7 @@ gpgcheck=1

[extras]
name=extras
baseurl=http://vault.centos.org/altarch/7.3.1611/extras/ppc64le/
baseurl=http://vault.centos.org/altarch/7.7.1908/extras/ppc64le/
failovermethod=priority
gpgkey=file:///usr/share/distribution-gpg-keys/centos/RPM-GPG-KEY-CentOS-7,file:///usr/share/distribution-gpg-keys/centos/RPM-GPG-KEY-CentOS-SIG-AltArch-7-ppc64le
gpgcheck=1
Expand Down