Created
November 17, 2011 20:58
-
-
Save fapestniegd/1374498 to your computer and use it in GitHub Desktop.
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
# Fresh install centos5 on redwood | |
# redwood | |
yum install -y git | |
ssh-keyscan -t rsa freyr.websages.com > .ssh/known_hosts | |
wd deploy --to=redwood | |
clear; (cd /opt/local/jarvis/; ./universal.pl) | |
# look for @INC errors... Remediate them as follows: | |
yum install -y perl-POE perl-AppConfig perl-IO-stringy perl-Log-Dispatch \ | |
cpan2rpm --no-sign Filter::Template | |
rpm -Uvh /usr/src/redhat/RPMS/noarch/perl-Filter-Template-1.040-1.noarch.rpm | |
stow usr/src/redhat/RPMS/noarch/perl-Filter-Template-1.040-1.noarch.rpm | |
cpan2rpm --no-sign Log::Dispatch::Config | |
rpm -Uvh /usr/src/redhat/RPMS/noarch/perl-Log-Dispatch-Config-1.04-1.noarch.rpm | |
stow /usr/src/redhat/RPMS/noarch/perl-Log-Dispatch-Config-1.04-1.noarch.rpm | |
# Ugh | |
# cpan2rpm --no-sign --version 6.61 POE::Component::IRC | |
# POE/Component/IRC.pm won't cpan2rpm, | |
# ExtUtils::MakeMaker version 6.31 required--this is only version 6.30 | |
# cpan2rpm --no-sign --version 6.57 ExtUtils::MakeMaker | |
# rpm -Uvh /usr/src/redhat/RPMS/noarch/perl-ExtUtils-MakeMaker-6.57_10.tar.gz-6.57-1.noarch.rpm | |
# 70 files conflict with packages redhat ships. *goddamnit* | |
# and the new ExtUtils::MakeMaker fucks up cpan2rpm --no-sign RPM::Specfile | |
#fsaasd;lkgjas;lkjgsd;lkj;aslkgj;lkasfj;lkjsafs;lkshitfuck | |
################################################################################ | |
# re-install | |
yum install -y cpan2rpm perl-Filter-Template perl-Log-Dispatch-Config \ | |
perl-Archive-Tar perl-YAML | |
cpan2rpm --no-sign RPM::Specfile | |
rpm -Uvh /usr/src/redhat/RPMS/noarch/perl-RPM-Specfile-1.51-1.noarch.rpm | |
stow /usr/src/redhat/RPMS/noarch/perl-RPM-Specfile-1.51-1.noarch.rpm | |
wget -qO POE-Component-IRC-6.61.tar.gz \ | |
http://search.cpan.org/CPAN/authors/id/H/HI/HINRIK/POE-Component-IRC-6.61.tar.gz | |
cpanflute2 POE-Component-IRC-6.61.tar.gz | |
rpm -Uvh perl-POE-Component-IRC-6.61-8.src.rpm | |
rpmbuild -ba /usr/src/redhat/SPECS/perl-POE-Component-IRC.spec | |
# it won't build | |
# ExtUtils::MakeMaker version 6.31 required--this is only version 6.30 at Makefile.PL line 7. | |
wget http://backpan.perl.org/authors/id/M/MS/MSCHWERN/ExtUtils-MakeMaker-6.31.tar.gz | |
cpanflute2 ExtUtils-MakeMaker-6.31.tar.gz | |
rpm -Uvh perl-ExtUtils-MakeMaker-6.31-8.src.rpm | |
rpmbuild -ba /usr/src/redhat/SPECS/perl-ExtUtils-MakeMaker.spec | |
rpm -Uvh /usr/src/redhat/RPMS/noarch/perl-ExtUtils-MakeMaker-6.31-8.noarch.rpm | |
# try again... | |
rpmbuild -ba /usr/src/redhat/SPECS/perl-POE-Component-IRC.spec | |
rpm -Uvh /usr/src/redhat/RPMS/noarch/perl-POE-Component-IRC-6.61-8.noarch.rpm | |
# it needs a bunch of shit... one of which is a new version of POE and perl | |
# debian is at 6.35, so let's check out that... the latest on cpan is 6.37... | |
wget http://search.cpan.org/CPAN/authors/id/H/HI/HINRIK/POE-Component-IRC-6.37.tar.gz | |
rpm -Uvh ./perl-POE-Component-IRC-6.37-8.src.rpm | |
rpmbuild -ba /usr/src/redhat/SPECS/perl-POE-Component-IRC.spec | |
rpm -Uvh /usr/src/redhat/RPMS/noarch/perl-POE-Component-IRC-6.37-8.noarch.rpm | |
# it needs a bunch of shit... one of which is a new version of POE and perl | |
# ok, backpan | |
wget http://backpan.perl.org/authors/id/H/HI/HINRIK/POE-Component-IRC-6.35.tar.gz | |
cpanflute2 POE-Component-IRC-6.35.tar.gz | |
rpm -Uvh ./perl-POE-Component-IRC-6.35-8.src.rpm | |
rpmbuild -ba /usr/src/redhat/SPECS/perl-POE-Component-IRC.spec | |
rpm -Uvh /usr/src/redhat/SRPMS/perl-POE-Component-IRC-6.35-8.src.rpm | |
# still no joy POE, perl not right.. | |
POE-Component-IRC <= 6.32 needs ExtUtils::MakeMaker 6.42 | |
POE-Component-IRC > 6.24 needs POE > than centos 5.5 provides (POE >= 1.287) | |
POE-Component-IRC > 6.20 needs POE > than centos 5.5 provides (POE >= 1.284) | |
POE-Component-IRC >= 6.18 needs: POE::Component::Pluggable POE::Filter::IRCD | |
POE::Component::Pluggable needs: constant Task::Weaken | |
# so... | |
rpm -Uvh --force /usr/src/redhat/RPMS/noarch/perl-ExtUtils-MakeMaker-6.42-8.noarch.rpm | |
cpf http://search.cpan.org/CPAN/authors/id/S/SA/SAPER/constant-1.21.tar.gz | |
cpf http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/Task-Weaken-1.04.tar.gz | |
cpf http://search.cpan.org/CPAN/authors/id/B/BI/BINGOS/POE-Component-Pluggable-1.26.tar.gz | |
cpf http://search.cpan.org/CPAN/authors/id/B/BI/BINGOS/POE-Filter-IRCD-2.42.tar.gz | |
cpf http://backpan.perl.org/authors/id/H/HI/HINRIK/POE-Component-IRC-6.18.tar.gz | |
# finally | |
################################################################################ | |
cpan2rpm POE::Wheel::Null | |
rpm -Uvh /usr/src/redhat/RPMS/noarch/perl-POE-Wheel-Null-0.01-1.noarch.rpm | |
stow /usr/src/redhat/RPMS/noarch/perl-POE-Wheel-Null-0.01-1.noarch.rpm | |
cpf http://search.cpan.org/CPAN/authors/id/H/HA/HACHI/POE-Component-Client-LDAP-0.04.tar.gz | |
stow /usr/src/redhat/RPMS/noarch/perl-POE-Component-Client-LDAP-0.04-8.noarch.rpm | |
################################################################################ | |
yum install perl-Test-NoWarnings | |
cpf http://search.cpan.org/CPAN/authors/id/M/MS/MSERGEANT/POE-Component-Logger-1.00.tar.gz | |
################################################################################ | |
yum install perl-Module-Build perl-Test-Simple | |
cpf http://search.cpan.org/CPAN/authors/id/A/AP/APOCAL/POE-Component-SSLify-0.15.tar.gz | |
# kjsfa;laksj;lkja;sglq;lk;asdjj;saf;jlk sq | |
################################################################################ | |
# /usr/local/sbin/stow | |
#!/bin/bash | |
[ -z "$(which html2text)" ] && yum install -y html2text | |
path=$1; shift 1 | |
dist=$2;shift 1 | |
file=$(basename $path) | |
[ -z "$dist" ] && dist=jarvis | |
curl -X PUT -T ${path} \ | |
http://packages.lab.eftdomain.net/working/centos-5.5-${dist}/${file}|\ | |
html2text -nobs | |
################################################################################ | |
################################################################################ | |
# /usr/local/sbin/cpf | |
#!/bin/bash | |
URL=$1 | |
echo "${URL}" | |
file=$(echo "${URL}" | sed -e 's/.*\///g') | |
echo "Fetching [${file}]" | |
wget -qO $file "${URL}" | |
export SRPM=$(cpanflute2 "$file" 2>&1 | grep "src.rpm"| awk '{print $NF}') | |
echo "Installing: ${SRPM}" | |
rpm -Uvh ${SRPM} | |
if [ -z "${SRPM}" ];then | |
cpanflute2 "$file" | |
exit 1; | |
fi | |
SPEC=$(rpm -qlp ${SRPM} | grep '\.spec$') | |
grep "perl(perl)" /usr/src/redhat/SPECS/${SPEC} | |
if [ $? -eq 0 ]; then | |
echo "Re-writing bitched spec file perl(perl)" | |
cp /usr/src/redhat/SPECS/${SPEC} /usr/src/redhat/SPECS/${SPEC}.perl | |
sed -e 's/perl(perl)/perl/' /usr/src/redhat/SPECS/${SPEC}.perl > /usr/src/redhat/SPECS/${SPEC} | |
fi | |
echo "Building: ${SPEC}" | |
[ -z "${SPEC}" ] && exit 2; | |
RPM=$(rpmbuild -ba /usr/src/redhat/SPECS/${SPEC} 2>&1 | grep "^Wrote:"| grep -v "src.rpm"|sed -e 's/^Wrote: //') | |
[ -z "${RPM}" ] && exit 3; | |
rpm -Uvh $RPM | |
[ $? -eq 0 ] && exit 0; | |
################################################################################ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment