Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/cloudera-os-build' into cloudera…
…-os-build
- Loading branch information
Showing
5 changed files
with
285 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
|
||
# This file contains lobrary routines needed to build Sledgehammer on Centos 5.7 | ||
|
||
EXTRA_REPOS=('http://mirror.centos.org/centos/5/os/$basearch' \ | ||
'http://mirror.centos.org/centos/5/updates/$basearch' \ | ||
'http://mirror.centos.org/centos/5/extras/$basearch' \ | ||
'http://mirror.pnl.gov/epel/5/$basearch' \ | ||
'http://www.nanotechnologies.qc.ca/propos/linux/centos-live/$basearch/live' \ | ||
'http://rbel.frameos.org/stable/el5/$basearch') | ||
|
||
setup_sledgehammer_chroot() { | ||
local repo rnum | ||
sudo rm -f "$CHROOT/etc/yum.repos.d/"* | ||
rnum=0 | ||
for repo in "${EXTRA_REPOS[@]}"; do | ||
add_repos "bare r${rnum} 10 $repo" | ||
rnum=$((rnum + 1)) | ||
done | ||
# Make sure yum does not throw away our caches for any reason. | ||
in_chroot /bin/sed -i -e '/keepcache/ s/0/1/' /etc/yum.conf | ||
in_chroot sh -c "echo 'exclude = *.i386' >>/etc/yum.conf" | ||
# fourth, have yum bootstrap everything else into usefulness | ||
in_chroot mkdir -p "/usr/lib/python2.4/site-packages/urlgrabber.broke" | ||
for f in "$CHROOT/usr/lib/python2.4/site-packages/urlgrabber/keepalive"*; do | ||
in_chroot mv "${f#$CHROOT}" \ | ||
"/usr/lib/python2.4/site-packages/urlgrabber.broke/" | ||
done | ||
chroot_install livecd-tools rhpl kudzu | ||
# Force livecd-creator to use ext2 instead of ext3. | ||
in_chroot /bin/sed -i -e '/self.__fstype/ s/ext3/ext2/' \ | ||
/usr/lib/python2.4/site-packages/imgcreate/creator.py | ||
|
||
in_chroot /bin/mv "/sbin/mksquashfs" "/sbin/mksquashfs.orig" | ||
in_chroot touch /sbin/mksquashfs | ||
in_chroot chmod 777 /sbin/mksquashfs | ||
cat > "$CHROOT/sbin/mksquashfs" <<"EOF" | ||
#!/bin/bash | ||
# nuke any -no-progress arg, leave the rest unchanged. | ||
/sbin/mksquashfs.orig "${@//-no-progress/}" </dev/null 2>/dev/null >/dev/nul | ||
EOF | ||
in_chroot /bin/chmod 777 /sbin/mksquashfs | ||
in_chroot /bin/chmod 777 /sbin/mksquashfs.orig | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
lang en_US.UTF-8 | ||
keyboard us | ||
timezone US/Eastern | ||
auth --useshadow --enablemd5 | ||
selinux --disabled | ||
firewall --disabled | ||
|
||
repo --name=a-base --baseurl=http://mirror.centos.org/centos/5/os/$basearch | ||
repo --name=a-updates --baseurl=http://mirror.centos.org/centos/5/updates/$basearch | ||
repo --name=a-extras --baseurl=http://mirror.centos.org/centos/5/extras/$basearch | ||
repo --name=a-epel --baseurl=http://mirror.pnl.gov/epel/5/$basearch | ||
repo --name=a-live --baseurl=http://www.nanotechnologies.qc.ca/propos/linux/centos-live/$basearch/live | ||
repo --name=a-rbel --baseurl=http://rbel.frameos.org/stable/el5/$basearch | ||
|
||
%packages | ||
bash | ||
kernel | ||
syslinux | ||
passwd | ||
policycoreutils | ||
chkconfig | ||
authconfig | ||
rootfiles | ||
comps-extras | ||
xkeyboard-config | ||
dhclient | ||
tcpdump | ||
vim-enhanced | ||
openssh-clients | ||
openssh-server | ||
OpenIPMI-tools | ||
OpenIPMI | ||
portmap | ||
nfs-utils | ||
procmail | ||
wget | ||
lshw | ||
dmidecode | ||
glibc.i686 | ||
libxml2 | ||
libxml2-devel | ||
zlib | ||
zlib-devel | ||
libxslt | ||
libxml2.i386 | ||
compat-libstdc++-33.i386 | ||
pciutils | ||
ntp | ||
which | ||
rpm | ||
coreutils | ||
tar | ||
gzip | ||
mktemp | ||
libsysfs.x86_64 | ||
libsysfs.i386 | ||
yum | ||
curl | ||
ruby | ||
ruby-libs.x86_64 | ||
ruby-devel.x86_64 | ||
ruby-ri | ||
ruby-rdoc | ||
rubygems | ||
rubygem-chef | ||
rubygem-ohai | ||
git | ||
gcc | ||
gcc-c++ | ||
automake | ||
autoconf | ||
make | ||
perl-XML-Twig | ||
parted | ||
|
||
%post | ||
|
||
yum -y remove '*.i?86' | ||
|
||
######################################################################## | ||
# Create a sub-script so the output can be captured | ||
# Must change "$" to "\$" and "`" to "\`" to avoid shell quoting | ||
######################################################################## | ||
cat > /root/post-install << EOF_post | ||
#!/bin/bash | ||
|
||
echo ################################################################### | ||
echo ## Creating the centos-live init script | ||
echo ################################################################### | ||
|
||
cat > /etc/rc.d/init.d/openstack-start-up << EOF_initscript | ||
#!/bin/bash | ||
# | ||
# live: Init script for live image | ||
# | ||
# chkconfig: 345 72 28 | ||
# description: Init script for live image. | ||
|
||
|
||
EOF_initscript | ||
|
||
/sbin/chkconfig --add openstack-start-up | ||
|
||
EOF_post | ||
|
||
/bin/bash -x /root/post-install 2>&1 | tee /root/post-install.log | ||
|
||
|
||
%post --nochroot | ||
|
||
######################################################################## | ||
# Create a sub-script so the output can be captured | ||
# Must change "$" to "\$" and "`" to "\`" to avoid shell quoting | ||
######################################################################## | ||
cat > /root/postnochroot-install << EOF_postnochroot | ||
#!/bin/bash | ||
|
||
cp *.gem $INSTALL_ROOT/root | ||
|
||
cp start-up.sh $INSTALL_ROOT/etc/rc.d/init.d/openstack-start-up | ||
chmod +x $INSTALL_ROOT/etc/rc.d/init.d/openstack-start-up | ||
cp sshd_config $INSTALL_ROOT/etc/ssh/sshd_config | ||
|
||
cp dhclient.conf $INSTALL_ROOT/etc | ||
|
||
EOF_postnochroot | ||
|
||
/bin/bash -x /root/postnochroot-install 2>&1 | tee /root/postnochroot-install.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.