mkfile 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. # /sys/lib/dist/mkfile
  2. d=/n/sources/plan9
  3. dist=/sys/lib/dist
  4. x=`{9fs sources; 9fs fsother; import -c tcp!204.178.31.2!666 $dist/web.protect}
  5. cd:V: /n/fsother/dist/plan9.iso
  6. ncd:V: /n/fsother/dist/plan9-new.iso.bz2
  7. ncd-dist:V: /n/fsother/dist/plan9-new.iso.bz2
  8. mk $dist/web.protect/plan9-new.iso.bz2
  9. cd-dist:V: /n/fsother/dist/plan9.iso.bz2
  10. mk $dist/web.protect/plan9.iso.bz2
  11. contrib-cd:V: /n/fsother/dist/contrib.iso.bz2
  12. /n/fsother/dist/%.iso:D: /n/sources/plan9/dist/replica/plan9.log
  13. @{cd pc; mk cddisk; cd ..}
  14. rm -f $target
  15. bind pc/cddisk cdstub/bootdisk.img
  16. if(! test -f $d/bootdisk.img)
  17. bind -a cdstub $d
  18. title=`{date | sed 's/(...) (...) (..) (..:..):.. (...) (....)/Plan 9 - \2 \3 \6 \4/'}
  19. title=$"title
  20. echo 'CD:' $title
  21. disk/mk9660 -9cj -v $title -s $d -b bootdisk.img $target
  22. $dist/web.protect/%.iso.bz2: /n/fsother/dist/%.iso.bz2
  23. cp $prereq $target
  24. scan:V:
  25. test -d /n/fsother/dist # make sure fsother was mounted above
  26. test -d $d
  27. test -d $dist/web.protect
  28. replica/scan $dist/sources.replica <scan.lock
  29. compresslog:V:
  30. awk -f logcompress.awk $d/dist/replica/plan9.log |
  31. awk -f logtime.awk -v 't='^`{date -n} >/tmp/plan9.log
  32. rm $d/dist/replica/plan9.log
  33. cp /tmp/plan9.log $d/dist/replica/plan9.log
  34. #restart:V:
  35. # rm -f $d/dist/replica/plan9.db
  36. # rm -f $d/dist/replica/plan9.log
  37. # chmod 664 $d/dist/replica/plan9.db >$d/dist/replica/plan9.db
  38. # chmod 664 $d/dist/replica/plan9.log >$d/dist/replica/plan9.log
  39. # chmod +a $d/dist/replica/plan9.log
  40. # mk scan
  41. odump:V:
  42. disk/dump9660 -9cj -v 'Plan 9 4e Dumps' -s $d \
  43. -p /sys/lib/sysconfig/proto/allproto /n/fsother/dist/distdump.iso
  44. cd.install:V:
  45. if(~ $sysname achille){ echo; echo; echo '*** run this on a real machine, like olive.'; exit bad }
  46. bzip2 -9 < /n/fsother/dist/plan9.iso >web.protect/nplan9.iso.bz2
  47. D.install:V:
  48. D=/n/roro/usr/rob/testplan9
  49. 9fs roro
  50. test -d $D
  51. cp $D$dist/pc/ndisk $dist/web.protect/ndisk
  52. cp $D$dist/pc/9loaddebug $dist/web.protect/n9loaddebug
  53. reallyinstall:V:
  54. if(! ~ $sysname achille){ echo; echo; echo '*** this needs to run on achille.'; exit bad }
  55. cd web.protect
  56. for (i in plan9.iso.bz2 disk 9loaddebug vmware.zip)
  57. if(test -f n$i){
  58. mv $i _$i && { mv n$i $i || mv _$i $i }
  59. }
  60. rm /srv/ramfs.9down4e
  61. $dist/startcache
  62. dump:V:
  63. rm -f /srv/9660.xxx
  64. 9660srv 9660.xxx
  65. mount /srv/9660.xxx /n/kremvax /n/fsother/dist/plan9.iso
  66. now=`{mtime $dist/web.protect/plan9.iso.bz2 | awk '{print $1}'}
  67. ls -l /rls/plan9/4e.iso
  68. disk/dump9660 -9cj -s /n/kremvax -n $now /rls/plan9/4e.iso
  69. ls -l /rls/plan9/4e.iso
  70. rm /srv/9660.xxx
  71. reencode:V:
  72. rm -f /n/fsother/dist/nplan9.iso
  73. rm -f /srv/9660.xxx
  74. 9660srv 9660.xxx
  75. mount /srv/9660.xxx /n/kremvax /n/fsother/dist/plan9.iso
  76. disk/mk9660 -9cj -v 'Plan 9 4th Edition' -s /n/kremvax \
  77. -b bootdisk.img /n/fsother/dist/nplan9.iso
  78. rm /srv/9660.xxx
  79. /n/fsother/dist/%.iso.bz2:D: /n/fsother/dist/%.iso
  80. @ {
  81. cd /n/fsother/dist
  82. bzip2 -9 <$stem.iso >n$stem.iso.bz2 &&
  83. {
  84. if (test -e $stem.iso.bz2)
  85. mv $stem.iso.bz2 _$stem.iso.bz2
  86. mv n$stem.iso.bz2 $stem.iso.bz2
  87. }
  88. echo `{date} md5 `{md5sum <$stem.iso.bz2} \
  89. sha1 `{sha1sum <$stem.iso.bz2} \
  90. $stem.iso.bz2 >>/usr/web/plan9checksums.txt
  91. }
  92. /n/fsother/dist/contrib.iso:DV:
  93. rm -f $target
  94. disk/mk9660 -9cj -v 'Plan 9 Extras' -s /n/sources \
  95. -p ./contrib.proto $target
  96. rebuild-mail:V:
  97. rebuild
  98. datemail 'nightly build errors' 9trouble <buildit.out
  99. datemail 'nightly build differences' 9trouble <checkbuild.out
  100. status=''
  101. scansources-mail:V:
  102. scansources | datemail 'nightly fs vs. martha scan' 9trouble
  103. worldwritable-mail:V:
  104. test -e /n/sources/plan9
  105. @ {cd /n/sources; /usr/rsc/bin/$cputype/lsr -t -d} |
  106. awk '$2 ~ /[2367]$/' | grep -vf ok-writable |
  107. datemail 'WRITABLE FILES ON SOURCES' 9trouble || status=''
  108. status=''
  109. @ {
  110. cd /n/sources/plan9
  111. /usr/rsc/bin/$cputype/lsr -t -d /n/sources/plan9
  112. } |
  113. awk '$2 ~ /[2367][^2367].$/' |
  114. datemail 'non-group-writable files on sources' 9trouble
  115. status=''
  116. # use /n/boot to avoid walking the archives mounted under
  117. # /lib/vac, or other mounts or binds.
  118. rfork n
  119. 9fs boot
  120. test -e /n/boot/sys
  121. /usr/rsc/bin/$cputype/lsr -t -d /n/boot/sys /n/boot/lib |
  122. awk '$2 ~ /[2367][^2367].$/' |
  123. datemail 'non-group-writable files on fs' 9trouble
  124. status=''
  125. 9.tar.gz:V:
  126. @{
  127. rfork n
  128. 9fs sources
  129. test -e /n/sources/plan9
  130. bind -a /n/sources/plan9 /n/sources/plan9/sys/src
  131. cd /n/sources/plan9/sys/src
  132. tar c LICENSE NOTICE 9
  133. } | gzip >$target
  134. 9-export:V: 9.tar.gz
  135. 9fs sources
  136. cp 9.tar.gz /n/sources/extra/9.tgz
  137. chmod +t /n/sources/extra/9.tgz
  138. plan9.tar.bz2:V:
  139. @{
  140. rfork n
  141. 9fs sources
  142. cd /n/sources
  143. test -e /n/sources/plan9
  144. bind /n/empty /n/sources/plan9/lib/font
  145. bind /n/empty /n/sources/plan9/sys/lib/postscript/font
  146. bind /n/empty /n/sources/plan9/sys/lib/ghostscript
  147. bind /n/empty /n/sources/plan9/sys/src/cmd/gs
  148. tar c plan9/LICENSE* plan9/NOTICE plan9/*/mkfile plan9/*/include \
  149. plan9/acme/*/src plan9/acme/bin/source \
  150. plan9/^(adm cron lib lp mail rc sys tmp usr)
  151. } | bzip2 >$target
  152. plan9-export:V: plan9.tar.bz2
  153. 9fs sources
  154. mv plan9.tar.bz2 /n/sources/extra/plan9.tar.bz2
  155. chmod +t /n/sources/extra/plan9.tar.bz2