Revision 735f81c2
Added by Jason Montleon almost 12 years ago
el5-i386.cfg | ||
---|---|---|
config_opts['root'] = 'el5-i386'
|
||
config_opts['target_arch'] = 'i386'
|
||
config_opts['legal_host_arches'] = ('i386', 'i586', 'i686', 'x86_64')
|
||
config_opts['chroot_setup_cmd'] = 'install buildsys-build'
|
||
config_opts['dist'] = 'el5' # only useful for --resultdir variable subst
|
||
config_opts['macros']['%__arch_install_post'] = '%{nil}'
|
||
config_opts['macros']['%dist'] = ".el5"
|
||
|
||
config_opts['yum.conf'] = """
|
||
[main]
|
||
cachedir=/var/cache/yum
|
||
debuglevel=1
|
||
logfile=/var/log/yum.log
|
||
reposdir=/dev/null
|
||
retries=20
|
||
obsoletes=1
|
||
gpgcheck=0
|
||
assumeyes=1
|
||
syslog_ident=mock
|
||
syslog_device=
|
||
|
||
# repos
|
||
|
||
[core]
|
||
name=base
|
||
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=i386&repo=os
|
||
|
||
[update]
|
||
name=updates
|
||
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=i386&repo=updates
|
||
|
||
[groups]
|
||
name=groups
|
||
baseurl=http://buildsys.fedoraproject.org/buildgroups/rhel5/i386/
|
||
|
||
[extras]
|
||
name=epel
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=i386
|
||
|
||
[foreman]
|
||
name=foreman
|
||
baseurl=http://yum.theforeman.org/development/el5/i386
|
||
|
||
[testing]
|
||
name=epel-testing
|
||
enabled=0
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=testing-epel5&arch=i386
|
||
|
||
[local]
|
||
name=local
|
||
baseurl=http://kojipkgs.fedoraproject.org/repos/dist-5E-epel-build/latest/i386/
|
||
cost=2000
|
||
enabled=0
|
||
|
||
[epel-debug]
|
||
name=epel-debug
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-5&arch=i386
|
||
failovermethod=priority
|
||
enabled=0
|
||
"""
|
el5-x86_64.cfg | ||
---|---|---|
config_opts['root'] = 'el5-x86_64'
|
||
config_opts['target_arch'] = 'x86_64'
|
||
config_opts['legal_host_arches'] = ('x86_64',)
|
||
config_opts['chroot_setup_cmd'] = 'install buildsys-build'
|
||
config_opts['dist'] = 'el5' # only useful for --resultdir variable subst
|
||
config_opts['macros']['%__arch_install_post'] = '%{nil}'
|
||
config_opts['macros']['%dist'] = ".el5"
|
||
config_opts['yum.conf'] = """
|
||
[main]
|
||
cachedir=/var/cache/yum
|
||
debuglevel=1
|
||
logfile=/var/log/yum.log
|
||
reposdir=/dev/null
|
||
retries=20
|
||
obsoletes=1
|
||
gpgcheck=0
|
||
assumeyes=1
|
||
syslog_ident=mock
|
||
syslog_device=
|
||
|
||
# repos
|
||
|
||
[core]
|
||
name=base
|
||
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=os
|
||
|
||
[update]
|
||
name=updates
|
||
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=updates
|
||
|
||
[groups]
|
||
name=groups
|
||
baseurl=http://buildsys.fedoraproject.org/buildgroups/rhel5/x86_64/
|
||
|
||
[extras]
|
||
name=epel
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=x86_64
|
||
|
||
[foreman]
|
||
name=foreman
|
||
baseurl=http://yum.theforeman.org/development/el5/x86_64
|
||
|
||
[testing]
|
||
name=epel-testing
|
||
enabled=0
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=testing-epel5&arch=x86_64
|
||
|
||
[local]
|
||
name=local
|
||
baseurl=http://kojipkgs.fedoraproject.org/repos/dist-5E-epel-build/latest/x86_64/
|
||
cost=2000
|
||
enabled=0
|
||
|
||
[epel-debug]
|
||
name=epel-debug
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-5&arch=x86_64
|
||
failovermethod=priority
|
||
enabled=0
|
||
"""
|
el6-i386.cfg | ||
---|---|---|
config_opts['root'] = 'el6-i386'
|
||
config_opts['target_arch'] = 'i686'
|
||
config_opts['legal_host_arches'] = ('i386', 'i586', 'i686', 'x86_64')
|
||
config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
|
||
config_opts['dist'] = 'el6' # only useful for --resultdir variable subst
|
||
|
||
config_opts['yum.conf'] = """
|
||
[main]
|
||
cachedir=/var/cache/yum
|
||
debuglevel=1
|
||
reposdir=/dev/null
|
||
logfile=/var/log/yum.log
|
||
retries=20
|
||
obsoletes=1
|
||
gpgcheck=0
|
||
assumeyes=1
|
||
syslog_ident=mock
|
||
syslog_device=
|
||
|
||
# repos
|
||
[base]
|
||
name=BaseOS
|
||
enabled=1
|
||
mirrorlist=http://mirrorlist.centos.org/?release=6&arch=i386&repo=os
|
||
failovermethod=priority
|
||
|
||
[updates]
|
||
name=updates
|
||
enabled=1
|
||
mirrorlist=http://mirrorlist.centos.org/?release=6&arch=i386&repo=updates
|
||
failovermethod=priority
|
||
|
||
[epel]
|
||
name=epel
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=i386
|
||
failovermethod=priority
|
||
|
||
[foreman]
|
||
name=foreman
|
||
baseurl=http://yum.theforeman.org/development/el6/i386
|
||
|
||
[testing]
|
||
name=epel-testing
|
||
enabled=0
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=testing-epel6&arch=i386
|
||
failovermethod=priority
|
||
|
||
[local]
|
||
name=local
|
||
baseurl=http://kojipkgs.fedoraproject.org/repos/dist-6E-epel-build/latest/i386/
|
||
cost=2000
|
||
enabled=0
|
||
|
||
[epel-debug]
|
||
name=fedora-debug
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-6&arch=i386
|
||
failovermethod=priority
|
||
enabled=0
|
||
"""
|
el6-x86_64.cfg | ||
---|---|---|
config_opts['root'] = 'el6-x86_64'
|
||
config_opts['target_arch'] = 'x86_64'
|
||
config_opts['legal_host_arches'] = ('x86_64',)
|
||
config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
|
||
config_opts['dist'] = 'el6' # only useful for --resultdir variable subst
|
||
|
||
config_opts['yum.conf'] = """
|
||
[main]
|
||
cachedir=/var/cache/yum
|
||
debuglevel=1
|
||
reposdir=/dev/null
|
||
logfile=/var/log/yum.log
|
||
retries=20
|
||
obsoletes=1
|
||
gpgcheck=0
|
||
assumeyes=1
|
||
syslog_ident=mock
|
||
syslog_device=
|
||
|
||
# repos
|
||
[base]
|
||
name=BaseOS
|
||
enabled=1
|
||
mirrorlist=http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os
|
||
failovermethod=priority
|
||
|
||
[updates]
|
||
name=updates
|
||
enabled=1
|
||
mirrorlist=http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=updates
|
||
failovermethod=priority
|
||
|
||
[epel]
|
||
name=epel
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=x86_64
|
||
failovermethod=priority
|
||
|
||
[foreman]
|
||
name=foreman
|
||
baseurl=http://yum.theforeman.org/development/el6/x86_64
|
||
|
||
[testing]
|
||
name=epel-testing
|
||
enabled=0
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=testing-epel6&arch=x86_64
|
||
failovermethod=priority
|
||
|
||
[local]
|
||
name=local
|
||
baseurl=http://kojipkgs.fedoraproject.org/repos/dist-6E-epel-build/latest/x86_64/
|
||
cost=2000
|
||
enabled=0
|
||
|
||
[epel-debug]
|
||
name=epel-debug
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-6&arch=x86_64
|
||
failovermethod=priority
|
||
enabled=0
|
||
"""
|
f16-i386.cfg | ||
---|---|---|
config_opts['root'] = 'f16-i386'
|
||
config_opts['target_arch'] = 'i686'
|
||
config_opts['legal_host_arches'] = ('i386', 'i586', 'i686', 'x86_64')
|
||
config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
|
||
config_opts['dist'] = 'fc16' # only useful for --resultdir variable subst
|
||
|
||
config_opts['yum.conf'] = """
|
||
[main]
|
||
cachedir=/var/cache/yum
|
||
debuglevel=1
|
||
reposdir=/dev/null
|
||
logfile=/var/log/yum.log
|
||
retries=20
|
||
obsoletes=1
|
||
gpgcheck=0
|
||
assumeyes=1
|
||
syslog_ident=mock
|
||
syslog_device=
|
||
|
||
# repos
|
||
|
||
[fedora]
|
||
name=fedora
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-16&arch=i386
|
||
failovermethod=priority
|
||
|
||
[updates-released]
|
||
name=updates
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f16&arch=i386
|
||
failovermethod=priority
|
||
|
||
[local]
|
||
name=local
|
||
baseurl=http://kojipkgs.fedoraproject.org/repos/f16-build/latest/i386/
|
||
cost=2000
|
||
enabled=0
|
||
|
||
[foreman]
|
||
name=foreman
|
||
baseurl=http://yum.theforeman.org/development/f16/i386
|
||
|
||
[fedora-debug]
|
||
name=fedora-debug
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-16&arch=i386
|
||
failovermethod=priority
|
||
enabled=0
|
||
|
||
[updates-debug]
|
||
name=updates-debug
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-debug-f16&arch=i386
|
||
failovermethod=priority
|
||
enabled=0
|
||
"""
|
f16-x86_64.cfg | ||
---|---|---|
config_opts['root'] = 'f16-x86_64'
|
||
config_opts['target_arch'] = 'x86_64'
|
||
config_opts['legal_host_arches'] = ('x86_64',)
|
||
config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
|
||
config_opts['dist'] = 'fc16' # only useful for --resultdir variable subst
|
||
|
||
config_opts['yum.conf'] = """
|
||
[main]
|
||
cachedir=/var/cache/yum
|
||
debuglevel=1
|
||
reposdir=/dev/null
|
||
logfile=/var/log/yum.log
|
||
retries=20
|
||
obsoletes=1
|
||
gpgcheck=0
|
||
assumeyes=1
|
||
syslog_ident=mock
|
||
syslog_device=
|
||
|
||
# repos
|
||
|
||
[fedora]
|
||
name=fedora
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-16&arch=x86_64
|
||
failovermethod=priority
|
||
|
||
[updates-released]
|
||
name=updates
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f16&arch=x86_64
|
||
failovermethod=priority
|
||
|
||
[local]
|
||
name=local
|
||
baseurl=http://kojipkgs.fedoraproject.org/repos/f16-build/latest/x86_64/
|
||
cost=2000
|
||
enabled=0
|
||
|
||
[foreman]
|
||
name=foreman
|
||
baseurl=http://yum.theforeman.org/development/f16/x86_64
|
||
|
||
[fedora-debug]
|
||
name=fedora-debug
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-16&arch=x86_64
|
||
failovermethod=priority
|
||
enabled=0
|
||
|
||
[updates-debug]
|
||
name=updates-debug
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-debug-f16&arch=x86_64
|
||
failovermethod=priority
|
||
enabled=0
|
||
"""
|
f17-i386.cfg | ||
---|---|---|
config_opts['root'] = 'f17-i386'
|
||
config_opts['target_arch'] = 'i686'
|
||
config_opts['legal_host_arches'] = ('i386', 'i586', 'i686', 'x86_64')
|
||
config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
|
||
config_opts['dist'] = 'fc17' # only useful for --resultdir variable subst
|
||
|
||
config_opts['yum.conf'] = """
|
||
[main]
|
||
cachedir=/var/cache/yum
|
||
debuglevel=1
|
||
reposdir=/dev/null
|
||
logfile=/var/log/yum.log
|
||
retries=20
|
||
obsoletes=1
|
||
gpgcheck=0
|
||
assumeyes=1
|
||
syslog_ident=mock
|
||
syslog_device=
|
||
|
||
# repos
|
||
|
||
[fedora]
|
||
name=fedora
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-17&arch=i386
|
||
failovermethod=priority
|
||
|
||
[updates-released]
|
||
name=updates
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f17&arch=i386
|
||
failovermethod=priority
|
||
|
||
[local]
|
||
name=local
|
||
baseurl=http://kojipkgs.fedoraproject.org/repos/f17-build/latest/i386/
|
||
cost=2000
|
||
enabled=0
|
||
|
||
[foreman]
|
||
name=foreman
|
||
baseurl=http://yum.theforeman.org/development/f17/i386
|
||
|
||
[fedora-debug]
|
||
name=fedora-debug
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-17&arch=i386
|
||
failovermethod=priority
|
||
enabled=0
|
||
|
||
[updates-debug]
|
||
name=updates-debug
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-debug-f17&arch=i386
|
||
failovermethod=priority
|
||
enabled=0
|
||
"""
|
f17-x86_64.cfg | ||
---|---|---|
config_opts['root'] = 'f17-x86_64'
|
||
config_opts['target_arch'] = 'x86_64'
|
||
config_opts['legal_host_arches'] = ('x86_64',)
|
||
config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
|
||
config_opts['dist'] = 'fc17' # only useful for --resultdir variable subst
|
||
|
||
config_opts['yum.conf'] = """
|
||
[main]
|
||
cachedir=/var/cache/yum
|
||
debuglevel=1
|
||
reposdir=/dev/null
|
||
logfile=/var/log/yum.log
|
||
retries=20
|
||
obsoletes=1
|
||
gpgcheck=0
|
||
assumeyes=1
|
||
syslog_ident=mock
|
||
syslog_device=
|
||
|
||
# repos
|
||
|
||
[fedora]
|
||
name=fedora
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-17&arch=x86_64
|
||
failovermethod=priority
|
||
|
||
[updates-released]
|
||
name=updates
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f17&arch=x86_64
|
||
failovermethod=priority
|
||
|
||
[local]
|
||
name=local
|
||
baseurl=http://kojipkgs.fedoraproject.org/repos/dist-f17-build/latest/x86_64/
|
||
cost=2000
|
||
enabled=0
|
||
|
||
[foreman]
|
||
name=foreman
|
||
baseurl=http://yum.theforeman.org/development/f17/x86_64
|
||
|
||
[fedora-debug]
|
||
name=fedora-debug
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-17&arch=x86_64
|
||
failovermethod=priority
|
||
enabled=0
|
||
|
||
[updates-debug]
|
||
name=updates-debug
|
||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-debug-f17&arch=x86_64
|
||
failovermethod=priority
|
||
enabled=0
|
||
"""
|
foremanbuild.sh | ||
---|---|---|
#!/bin/bash
|
||
|
||
#clone rpm spec files, patches, and sources, and stage everything
|
||
cd; git clone https://github.com/theforeman/foreman-rpms.git rpmbuild
|
||
cd rpmbuild; git config user.name nightly
|
||
rpmdev-setuptree
|
||
cd ~/rpmbuild/SOURCES; git clone https://github.com/theforeman/foreman.git -b develop; git clone git://github.com/theforeman/smart-proxy.git -b develop ./foreman-proxy; tar jcvf foreman-proxy-1.0.0.tar.bz2 foreman-proxy; tar jcvf foreman-1.0.0.tar.bz2 foreman;
|
||
|
||
for distro in el5 el6 f16 f17; do
|
||
mkdir -p ~/foreman/$distro/{source,i386,x86_64}
|
||
git checkout $distro
|
||
|
||
#Build the SRPMS for mock to work with
|
||
rpmbuild -bs --define "_source_filedigest_algorithm md5" --define "_binary_filedigest_algorithm md5" ~/rpmbuild/SPECS/foreman.spec
|
||
rpmbuild -bs --define "_source_filedigest_algorithm md5" --define "_binary_filedigest_algorithm md5" ~/rpmbuild/SPECS/foreman-proxy.spec
|
||
|
||
|
||
#Build foreman-proxy for all distros and archs
|
||
for arch in i386 x86_64; do
|
||
mock -r $distro-$arch ~/rpmbuild/SRPMS/foreman-proxy*
|
||
mv /var/lib/mock/$distro-$arch/result/*src.rpm ~/foreman/$distro/source
|
||
mv /var/lib/mock/$distro-$arch/result/*noarch.rpm ~/foreman/$distro/$arch
|
||
done
|
||
rm -f ~/rpmbuild/SRPMS/foreman-proxy*
|
||
|
||
#Build foreman for all distros and archs
|
||
for arch in i386 x86_64; do
|
||
mock -r $distro-$arch ~/rpmbuild/SRPMS/foreman*
|
||
mv /var/lib/mock/$distro-$arch/result/*src.rpm ~/foreman/$distro/source
|
||
mv /var/lib/mock/$distro-$arch/result/*noarch.rpm ~/foreman/$distro/$arch
|
||
done
|
||
rm -f ~/rpmbuild/SRPMS/foreman*
|
||
|
||
# stash changes to foreman.spec so we can checkout next branch
|
||
git stash
|
||
|
||
done
|
||
|
||
rsync -avHpz ~/foreman/ account@shell...
|
||
|
||
for distro in el5 el6 f16 f17; do
|
||
for arch in source i386 x86_64; do
|
||
ssh account@shell... createrepo .../$distro/$arch
|
||
done
|
||
done
|
||
|
||
#clean up after ourselves
|
||
cd; rm -rf ~/rpmbuild
|
||
cd; rm -rf ~/foreman
|
foremannightly.sh | ||
---|---|---|
#!/bin/bash
|
||
|
||
#clone rpm spec files, patches, and sources, and stage everything
|
||
cd; git clone https://github.com/theforeman/foreman-rpms.git rpmbuild
|
||
cd rpmbuild; git config user.name nightly
|
||
rpmdev-setuptree
|
||
cd ~/rpmbuild/SOURCES; git clone https://github.com/theforeman/foreman.git -b develop; git clone git://github.com/theforeman/smart-proxy.git -b develop ./foreman-proxy; tar jcvf foreman-proxy-1.0.0.tar.bz2 foreman-proxy; tar jcvf foreman-1.0.0.tar.bz2 foreman;
|
||
|
||
for distro in el5 el6 f16 f17; do
|
||
git checkout $distro
|
||
|
||
#Add todays date to the release
|
||
sed -i ~/rpmbuild/SPECS/foreman.spec -e 's/\%{dist}/\.\%\(date +\%\%Y\%\%m\%\%d\)\%{dist}/'
|
||
sed -i ~/rpmbuild/SPECS/foreman-proxy.spec -e 's/\%{dist}/\.\%\(date +\%\%Y\%\%m\%\%d\)\%{dist}/'
|
||
|
||
#Build the SRPMS for mock to work with
|
||
rpmbuild -bs --define "_source_filedigest_algorithm md5" --define "_binary_filedigest_algorithm md5" ~/rpmbuild/SPECS/foreman.spec
|
||
rpmbuild -bs --define "_source_filedigest_algorithm md5" --define "_binary_filedigest_algorithm md5" ~/rpmbuild/SPECS/foreman-proxy.spec
|
||
|
||
#Build foreman-proxy for each arch and distro
|
||
for arch in i386 x86_64; do
|
||
mock -r $distro-$arch ~/rpmbuild/SRPMS/foreman-proxy*
|
||
scp /var/lib/mock/$distro-$arch/result/*src.rpm account@shell.../$distro/source
|
||
scp /var/lib/mock/$distro-$arch/result/*noarch.rpm account@shell.../$distro/$arch
|
||
done
|
||
rm -f ~/rpmbuild/SRPMS/foreman-proxy*
|
||
|
||
#Build foreman for each arch and distro
|
||
for arch in i386 x86_64; do
|
||
mock -r $distro-$arch ~/rpmbuild/SRPMS/foreman*
|
||
scp /var/lib/mock/$distro-$arch/result/*src.rpm account@shell.../$distro/source
|
||
scp /var/lib/mock/$distro-$arch/result/*noarch.rpm account@shell.../$distro/$arch
|
||
done
|
||
|
||
|
||
#Update repo files for each arch and distro
|
||
for arch in source i386 x86_64; do
|
||
ssh account@shell createrepo .../$distro/$arch
|
||
done
|
||
|
||
# stash changes to foreman.spec so we can checkout next branch
|
||
git stash
|
||
done
|
||
|
||
#clean up after ourselves
|
||
cd; rm -rf ~/rpmbuild
|
Also available in: Unified diff
Revert "add mock files and build scripts"
This reverts commit f1b74c4ff9df22fb922bd98fb84a8176540751e4.