1 # its more notes than a script, so no #!/bin/sh yet
3 # s/ivan/username/ in buildsysrc and below
18 mkdir buildsys/ref/SRPMS
21 for a in build-freeside buildsysrc cvs-check-and-build enrpm expect-addsign expect-signrepo ovid2flute refresh-repo; do
22 ln -s ~/freeside/rpm/build/$a .
31 #ftp://ftp.pld-linux.org/people/hawk/vserver-templates/Centos
32 #sudo vserver centos5 build -m template --context 5 --hostname centos5.freeside.biz --interface dummy0:10.5.4.5/24 -- -d centos5 -t centos5-i686.tar.bz2
33 sudo vserver centos5 build -m template --context 5 --hostname centos5.freeside.biz --interface dummy0:10.5.4.5/24 -- -d centos5 -t centos5-x86_64.tar.bz2
35 #something like this as /etc/init.d/vserver-nat:
38 iptables -t nat -A POSTROUTING -s 10.5.4.0/24 -d ! 10.5.4.0/24 -j SNAT --to-source 192.168.1.143
42 #edit /etc/resolv.conf (easier from outside, no vi inside yet)
45 yum install openssh-server vim-minimal zsh screen sudo perl patch cvs diffutils rpm-build rsync
47 adduser ivan #username
50 vi .ssh/authorized_keys
58 chown -R ivan:ivan redhat
61 %_gpg_path /home/ivan/.gnupg
62 %_gpg_name Freeside Internet Services, Inc. RPM Signing Key
64 vi /etc/ssh/sshd_config #ListenAddress
65 #also need to edit on the host so the vserver can claim its address
69 #session required pam_loginuid.so
71 /etc/init.d/sshd restart
75 exit #and test ssh'ing in
81 #copy the stuff from rpm/build/native into /home/ivan (#username) in the vserver
83 for a in build-from-cvs freeside-cvs makesrpm ovid2flute ovid-0.12-1.x86_64.rpm Ovid.diff; do
84 cp $a /var/lib/vservers/centos5/home/ivan/
87 for a in build-from-cvs freeside-cvs makesrpm ovid2flute; do
88 chmod a+rx /var/lib/vservers/centos5/home/ivan/$a
91 vserver centos5 enter #or ssh 10.5.4.5 and sudo
93 rpm -i ovid-0.12-1.x86_64.rpm
94 cd /usr/lib/perl5/site_perl/5.*/Ovid
95 patch < ~ivan/Ovid.diff
97 #also checkout the necessary freeside versions...
98 export CVSROOT=":pserver:anonymous:anonymous@cvs.freeside.biz:/home/cvs/cvsroot"
100 cvs checkout -rFREESIDE_1_7_BRANCH -d freeside-1.7 freeside
101 #cvs checkout -rFREESIDE_1_9_BRANCH -d freeside-1.9 freeside
107 cp -i /var/lib/vservers/centos5/etc/yum.repos.d/CentOS-Base.repo /etc/yum/repos.d/
108 #and s/$releasever/5/g;
110 cp expect-* /usr/local/bin/
111 #edit them and set your real passphrase for the gpg key you're using
112 #(as per that dir above)
119 mkdir -p public_html/repo/centos/5/freeside-1.7/testing/x86_64/
120 mkdir public_html/repo/centos/5/freeside-1.7/testing/i686
126 vserver centos5 enter
127 yum install perl-libwww-perl make
129 install RPM::Specfile
130 #if it fails, might need to go to /root/.cpan/build/RPM-Specfile-* and do it manually
133 #for user cpan-ability
136 cp /usr/lib/perl5/5.8.8/CPAN/Config.pm .cpan/CPAN/MyConfig.pm
137 vi .cpan/CPAN/MyConfig.pm #and just leave and change the /root ones
138 chmod a+rx .cpan/CPAN/MyConfig.pm
140 #edit ovid2flue and set user
146 http://www.freeside.biz/mediawiki/index.php/Freeside:Documentation:CreatingRPMRepo