2 src9=/n/sources/plan9 # what to export
3 dist=/sys/lib/dist # where this machinery lives
4 scr=/n/other/dist # scratch space before copying to web.protect
5 # import /sys/lib/dist/web.protect from the outside
10 ncd:V: $scr/plan9-new.iso.bz2
12 ncd-dist:V: $scr/plan9-new.iso.bz2
13 mk $dist/web.protect/plan9-new.iso.bz2
15 cd-dist:V: $scr/plan9.iso.bz2
16 mk $dist/web.protect/plan9.iso.bz2
18 contrib-cd:V: $scr/contrib.iso.bz2
19 mk $dist/web.protect/contrib.iso.bz2
21 $scr/%.iso:D: $src9/dist/replica/plan9.log
22 @ { cd pc; mk cddisk }
24 bind pc/cddisk cdstub/bootdisk.img
25 if(! test -f $src9/bootdisk.img)
27 title=`{date | sed 's/(...) (...) (..) (..:..):.. (...) (....)/Plan 9 - \2 \3 \6 \4/'}
30 disk/mk9660 -9cj -v $title -s $src9 -b bootdisk.img $target
32 # copy compressed file from scratch space to the distribution, carefully
33 $dist/web.protect/%.iso.bz2: $scr/%.iso.bz2
35 chmod +t $target.new # waste write buf, not venti store
36 cp $prereq $target.new
37 # replace previous version with a flash cut
39 mv $target $target.old # try to not clobber downloads in progress
40 mv $target.new $target
43 rm -f $dist/web.protect/*.iso.bz2.old # remove old versions after a delay
45 # generate replica log & db for $src9 only
47 test -d $scr # make sure other was mounted above
49 test -d $dist/web.protect
50 lock scan.lock replica/scan $dist/sources.replica
51 chmod +t $src9/dist/replica/*.^(db log)
53 # generate replica log & db for all of /n/sources
59 lock scanall.lock replica/scan $dist/sourcesall.replica
60 chmod +t $src9/dist/replica/*.^(db log)
65 awk -f logcompress.awk $src9/dist/replica/plan9.log |
66 awk -f logtime.awk -v 't='^`{date -n} >/tmp/plan9.log
67 rm -f $src9/dist/replica/plan9.new.log
68 cp /tmp/plan9.log $src9/dist/replica/plan9.new.log &&
69 mv $src9/dist/replica/plan9.new.log $src9/dist/replica/plan9.log
73 # rm -f $src9/dist/replica/plan9.db
74 # rm -f $src9/dist/replica/plan9.log
75 # chmod 664 $src9/dist/replica/plan9.db >$src9/dist/replica/plan9.db
76 # chmod 664 $src9/dist/replica/plan9.log >$src9/dist/replica/plan9.log
77 # chmod +a $src9/dist/replica/plan9.log
81 disk/dump9660 -9cj -v 'Plan 9 4e Dumps' -s $src9 \
82 -p /sys/lib/sysconfig/proto/allproto $scr/distdump.iso
85 # if(~ $sysname achille){
86 # echo; echo; echo '*** run this on a real machine, like chips.'
89 bzip2 -9 <$scr/plan9.iso >web.protect/nplan9.iso.bz2
92 D=/n/roro/usr/rob/testplan9
95 cp $D$dist/pc/ndisk $dist/web.protect/ndisk
96 cp $D$dist/pc/9loaddebug $dist/web.protect/n9loaddebug
99 if(! ~ $sysname achille){
100 echo; echo; echo '*** this needs to run on achille.'
104 for (i in plan9.iso.bz2 disk 9loaddebug vmware.zip)
106 mv $i _$i && { mv n$i $i || mv _$i $i }
108 rm /srv/ramfs.9down4e
114 mount /srv/9660.xxx /n/kremvax $scr/plan9.iso
115 now=`{mtime $dist/web.protect/plan9.iso.bz2 | awk '{print $1}'}
116 ls -l /rls/plan9/4e.iso
117 disk/dump9660 -9cj -s /n/kremvax -n $now /rls/plan9/4e.iso
118 ls -l /rls/plan9/4e.iso
122 rm -f $scr/nplan9.iso
125 mount /srv/9660.xxx /n/kremvax $scr/plan9.iso
126 disk/mk9660 -9cj -v 'Plan 9 4th Edition' -s /n/kremvax \
127 -b bootdisk.img $scr/nplan9.iso
130 # compress a cd image in scratch space
131 $scr/%.iso.bz2:D: $scr/%.iso
134 bzip2 -9 <$stem.iso >n$stem.iso.bz2 &&
136 if (test -e $stem.iso.bz2)
137 mv $stem.iso.bz2 _$stem.iso.bz2
138 mv n$stem.iso.bz2 $stem.iso.bz2
140 echo `{date} md5 `{md5sum <$stem.iso.bz2} \
141 sha1 `{sha1sum <$stem.iso.bz2} \
142 $stem.iso.bz2 >>/usr/web/plan9checksums.txt
147 disk/mk9660 -9cj -v 'Plan 9 Extras' -s /n/sources \
148 -p ./contrib.proto $target
151 chmod +l build.lock >>build.lock
155 chmod +l build.lock >>build.lock
157 datemail 'nightly build errors' 9trouble <buildit.out
158 datemail 'nightly build differences' 9trouble <checkbuild.out
162 scansources | datemail 'nightly fs vs. sources scan' 9trouble
164 worldwritable-mail:V:
166 @ {cd /n/sources; /usr/rsc/bin/$cputype/lsr -t -d} |
167 awk '$2 ~ /[2367]$/' | grep -vf ok-writable |
168 datemail 'WRITABLE FILES ON SOURCES' 9trouble || status=''
172 /usr/rsc/bin/$cputype/lsr -t -d $src9
174 awk '$2 ~ /[2367][^2367].$/' |
175 datemail 'non-group-writable files on sources' 9trouble
177 # use /n/boot to avoid walking the archives mounted under
178 # /lib/vac, or other mounts or binds.
182 /usr/rsc/bin/$cputype/lsr -t -d /n/boot/sys /n/boot/lib |
183 grep -v '/lib/audio/|/sys/src/cmd/vac/test/' | # give us a break
184 awk '$2 ~ /[2367][^2367].$/' |
185 datemail 'non-group-writable files on fs' 9trouble
193 bind -a $src9 $src9/sys/src
195 tar c LICENSE NOTICE 9
200 cp 9.tar.gz /n/sources/extra/9.tgz
201 chmod +t /n/sources/extra/9.tgz
209 bind /n/empty $src9/lib/font
210 bind /n/empty $src9/sys/lib/postscript/font
211 bind /n/empty $src9/sys/lib/ghostscript
212 bind /n/empty $src9/sys/src/cmd/gs
213 tar c plan9/LICENSE* plan9/NOTICE plan9/*/mkfile plan9/*/include \
214 plan9/acme/*/src plan9/acme/bin/source \
215 plan9/^(adm cron lib lp mail rc sys tmp usr)
218 plan9-export:V: plan9.tar.bz2
220 chmod +t plan9.tar.bz2
221 mv plan9.tar.bz2 /n/sources/extra/plan9.tar.bz2