Skip to content

Instantly share code, notes, and snippets.

@Filirom1
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Filirom1/8984801 to your computer and use it in GitHub Desktop.
Save Filirom1/8984801 to your computer and use it in GitHub Desktop.
Generate OpenShift Enterprise RPM from SRPM

Install mockchain and add the openshift dependency repo in /etc/mock/default.cfg

    [openshift-deps]
    name=openshift-deps
    enabled=1
    gpgcheck=0
    baseurl=https://mirror.openshift.com/pub/origin-server/release/4/rhel-6/dependencies/x86_64/
    priority=2
    failovermethod=priority


    [epel]
    name=Extra Packages for Enterprise Linux 6 - $basearch
    #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
    mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
    failovermethod=priority
    enabled=1
    gpgcheck=0


    [scl]
    name=CentOS-$releasever - SCL 
    baseurl=http://mirror.centos.org/centos/$releasever/SCL/$basearch/
    gpgcheck=0
    enabled=0

#!/bin/bash
export PATH=/usr/local/bin:/bin:/usr/bin
cd /mnt
wget -m --no-parent -l 1 -N http://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/RHOSE/SRPMS/
# Compile the srpm with mockchain
cd /mnt/ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/RHOSE/SRPMS
for pkgs in *.src.rpm ; do mockchain -r default -l /mnt/rpms/ $pkgs; done
mockchain -l /mnt/rpms/ -r default *.src.rpm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment