├── 195 ├── 211bsd-0.ini ├── 211bsd-195.ini ├── 211bsd-195-run.ini ├── script.txt ├── mk211p195tape.pl ├── 211bsd-pl0-test.expect ├── 211bsd-0-mk-tape.expect ├── 211bsd-195.expect └── 211bsd-0-ts.expect ├── hints ├── 12.setup ├── 13.setup ├── 11.setup ├── 15.setup ├── 101.unshar ├── 10.setup ├── 102.unshar ├── 103.unshar ├── 60.setup ├── 1.setup ├── 18.setup ├── 47.setup ├── 19.setup ├── 24.setup ├── 25.setup ├── 26.setup ├── 27.setup ├── 37.setup ├── 176.unpatch ├── 163.unshar ├── 43.unpatch ├── 172.unshar ├── 141.unshar ├── 149.unshar ├── 161.unshar ├── 162.unshar ├── 165.unshar ├── 166.unshar ├── 168.unshar ├── 170.unshar ├── 9.unshar ├── 136.unshar ├── 137.unshar ├── 75.unshar ├── 122.unshar ├── 151.unshar ├── 178.unpatch ├── 143.unshar ├── 40.unpatch ├── 16.unpatch ├── 84.unpatch ├── 93.localopts.diff ├── 127.unshar ├── 3.unpatch ├── 187.unshar ├── 80.fixup ├── 37a.unpatch ├── 134.unshar ├── 154.unshar ├── 118.unpatch ├── 174.unshar ├── 1a.unpatch ├── 93.unpatch ├── 2.mu ├── 14.unshar ├── 169.unshar ├── 4.unshar ├── 153.unpatch ├── 164.unshar ├── 78.unpatch ├── 171.unshar ├── 123.fixup ├── 72.unshar ├── root.cache ├── 152.fixup ├── 185.unshar ├── 17.unshar ├── 123.unpatch ├── 167.unshar ├── 121.unshar ├── 132.unshar ├── 178.fixup ├── 173.unshar ├── 42.unpatch ├── 158.unshar ├── 106.unshar ├── build.sh ├── 184.unpatch ├── 173.ranlib-2.diff ├── 80.unpatch ├── 36.unpatch ├── 180.unshar ├── 36.GENERIC-Makefile.diff ├── 142.unshar ├── 124.unshar ├── 0.unshar ├── 160.unshar ├── 2.unpatch ├── 159.unshar ├── 152.unpatch ├── 2.tmscpboot.diff ├── 173.ranlib.diff ├── 175.unshar ├── 160.ld.diff ├── 175.fixup ├── build2.sh └── KAZOO ├── doit ├── apout.patch ├── vars ├── gen211git ├── 2tape.pl ├── LICENSE ├── fetch-tuhs ├── test-p80 ├── notes.md ├── README.md ├── 2.11BSD-ANNOUNCE ├── paper.md └── patches ├── 42a ├── 78a ├── 18a └── 1a /hints/12.setup: -------------------------------------------------------------------------------- 1 | # 12 2 | cd $ROOT211/usr/src/lib/cpp 3 | -------------------------------------------------------------------------------- /hints/13.setup: -------------------------------------------------------------------------------- 1 | # 13 2 | cd $ROOT211/usr/src/sys/sys 3 | -------------------------------------------------------------------------------- /hints/11.setup: -------------------------------------------------------------------------------- 1 | # 11 2 | cd $ROOT211/usr/src/bin/make 3 | 4 | -------------------------------------------------------------------------------- /hints/15.setup: -------------------------------------------------------------------------------- 1 | cd $ROOT211/usr/src/usr.lib/sendmail/src 2 | -------------------------------------------------------------------------------- /hints/101.unshar: -------------------------------------------------------------------------------- 1 | # 101 adds less, remove it 2 | rm -rf $ROOT211/usr/src/local/less 3 | -------------------------------------------------------------------------------- /hints/10.setup: -------------------------------------------------------------------------------- 1 | # patch 10 is relative to usr/ucb/Mail 2 | cd $ROOT211/usr/src/ucb/Mail 3 | -------------------------------------------------------------------------------- /hints/102.unshar: -------------------------------------------------------------------------------- 1 | # 102 adds welcome, remove it 2 | rm -rf $ROOT211/usr/src/local/welcome 3 | -------------------------------------------------------------------------------- /hints/103.unshar: -------------------------------------------------------------------------------- 1 | # 103 adds popper, remove it 2 | rm -rf $ROOT211/usr/src/local/popper 3 | -------------------------------------------------------------------------------- /hints/60.setup: -------------------------------------------------------------------------------- 1 | # patch 60 is relative to the rshd src dir 2 | cd $ROOT211/usr/src/etc/rshd 3 | -------------------------------------------------------------------------------- /hints/1.setup: -------------------------------------------------------------------------------- 1 | # patch 1 is relative to usr/src/bin, so cd there first 2 | cd $ROOT211/usr/src/bin 3 | -------------------------------------------------------------------------------- /hints/18.setup: -------------------------------------------------------------------------------- 1 | # patch 37 is relative to usr/src/bin, so cd there first 2 | chdir $ROOT211/usr/src/bin 3 | -------------------------------------------------------------------------------- /hints/47.setup: -------------------------------------------------------------------------------- 1 | # patch 47 is relative to usr/src/etc, so cd there first 2 | chdir $ROOT211/usr/src/etc 3 | -------------------------------------------------------------------------------- /hints/19.setup: -------------------------------------------------------------------------------- 1 | # patch 37 is relative to usr/src/ucb/ex, so cd there first 2 | chdir $ROOT211/usr/src/ucb/ex 3 | -------------------------------------------------------------------------------- /hints/24.setup: -------------------------------------------------------------------------------- 1 | # patch 37 is relative to usr/src/lib/c2, so cd there first 2 | chdir $ROOT211/usr/src/lib/c2 3 | -------------------------------------------------------------------------------- /hints/25.setup: -------------------------------------------------------------------------------- 1 | # patch 37 is relative to usr/src/lib/ccom, so cd there first 2 | chdir $ROOT211/usr/src/lib/ccom 3 | -------------------------------------------------------------------------------- /hints/26.setup: -------------------------------------------------------------------------------- 1 | # patch 37 is relative to usr/src/lib/ccom, so cd there first 2 | chdir $ROOT211/usr/src/lib/ccom 3 | -------------------------------------------------------------------------------- /hints/27.setup: -------------------------------------------------------------------------------- 1 | # patch 37 is relative to usr/src/lib/ccom, so cd there first 2 | chdir $ROOT211/usr/src/lib/ccom 3 | -------------------------------------------------------------------------------- /hints/37.setup: -------------------------------------------------------------------------------- 1 | # patch 37 is relative to usr/src/sys/mdec, so cd there first 2 | chdir $ROOT211/usr/src/sys/mdec 3 | -------------------------------------------------------------------------------- /hints/176.unpatch: -------------------------------------------------------------------------------- 1 | # Patch 176 is a nop. It's a bookend for the patch train that started in 2 | # 158. Expet nothing to happen, so provide a do nothing shell. 3 | -------------------------------------------------------------------------------- /hints/163.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 163 creates ld and ar, so we need to remove them. 4 | cd $ROOT211 5 | rm -rf $ROOT211/usr/src/bin/ar $ROOT211/usr/src/bin/ld 6 | -------------------------------------------------------------------------------- /hints/43.unpatch: -------------------------------------------------------------------------------- 1 | cd $ROOT211 2 | patch -V none -p1 -R < $patch 3 | cp -p usr/src/ucb/sendbug/bugformat usr/lib 4 | # xxx unsure if this should be done here or in build2.sh 5 | -------------------------------------------------------------------------------- /hints/172.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 172 creates symorder.c, symcompact.c, and strcompact.c 4 | # just remove them... 5 | cd $ROOT211 6 | rm -rf usr/src/ucb/symorder.c 7 | rm -rf usr/src/ucb/symcompact.c 8 | rm -rf usr/src/ucb/strcompact.c 9 | -------------------------------------------------------------------------------- /hints/141.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 141 The shar file creaets 5 patchs. Just apply them all. 3 | # 4 | sed -e '1,/===cut here===/d' < $patch | sed -e "s=/tmp/=$TEMP/=" | sh -x 5 | cd $ROOT211 6 | patch -V none -R -p1 < $TEMP/23 7 | patch -V none -R -p1 < $TEMP/19 8 | -------------------------------------------------------------------------------- /hints/149.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 151 has a patch and a new file. Just need to apply it backwards and remove the new file. 4 | rm $ROOT211/usr/src/bin/mkdir.c $ROOT211/usr/src/man/man1/mkdir.1 5 | from2.10.1 usr/src/bin/mkdir.c usr/src/man/man1/mkdir.1 6 | -------------------------------------------------------------------------------- /hints/161.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 161 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | cd $TEMP 5 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 6 | cd $ROOT211 7 | patch -V none -R -p1 < $TEMP/patchfile 8 | -------------------------------------------------------------------------------- /hints/162.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 164 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | cd $TEMP 5 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 6 | cd $ROOT211 7 | patch -V none -R -p1 < $TEMP/patchfile 8 | -------------------------------------------------------------------------------- /hints/165.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 165 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | cd $TEMP 5 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 6 | cd $ROOT211 7 | patch -V none -R -p1 < $TEMP/patchfile 8 | -------------------------------------------------------------------------------- /hints/166.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 166 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | cd $TEMP 5 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 6 | cd $ROOT211 7 | patch -V none -R -p1 < $TEMP/patchfile 8 | -------------------------------------------------------------------------------- /hints/168.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 168 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | cd $TEMP 5 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 6 | cd $ROOT211 7 | patch -V none -R -p1 < $TEMP/patchfile 8 | -------------------------------------------------------------------------------- /hints/170.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 170 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | cd $TEMP 5 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 6 | cd $ROOT211 7 | patch -V none -R -p1 < $TEMP/patchfile 8 | -------------------------------------------------------------------------------- /hints/9.unshar: -------------------------------------------------------------------------------- 1 | # 9 2 | # Applies a patch and Creates: 3 | # /usr/src/local/trace.c 4 | # so undo all that. 5 | sed -n -e '/^sed.*\/tmp\/c/,/^SHAR_EOF/p' < $patch | sed -e "s=/tmp/c=$TEMP/patchfile=" | sh -x 6 | cd $ROOT211 7 | patch -R -V none -p1 < $TEMP/patchfile 8 | rm usr/src/local/trace.c 9 | -------------------------------------------------------------------------------- /hints/136.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 136 The shar file creaets 5 patchs. Just apply them all. 3 | # 4 | sed -e '1,/---cut here---/d' < $patch | sh -x 5 | cd $ROOT211 6 | patch -V none -R -p1 < $TEMP/1 7 | patch -V none -R -p1 < $TEMP/5 8 | patch -V none -R -p1 < $TEMP/6 9 | patch -V none -R -p1 < $TEMP/14 10 | -------------------------------------------------------------------------------- /hints/137.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 137 The shar file creaets 5 patchs. Just apply them all. 3 | # 4 | sed -e '1,/---cut here---/d' < $patch | sh -x 5 | cd $ROOT211 6 | patch -V none -R -p1 < $TEMP/3 7 | patch -V none -R -p1 < $TEMP/4 8 | patch -V none -R -p1 < $TEMP/17 9 | patch -V none -R -p1 < $TEMP/18 10 | -------------------------------------------------------------------------------- /hints/75.unshar: -------------------------------------------------------------------------------- 1 | # 75: A few file names were overlooked in the "liberation from the 14 2 | # character limit". 3 | # Sadly, we need to reimprision them. 4 | cd $ROOT211/usr/src/usr.lib/sendmail/cf.named 5 | mv nicregistered.m4 nicregistered. 6 | mv postwriterule.m4 postwriterule. 7 | mv prewriterule.m4 prewriterule.m 8 | -------------------------------------------------------------------------------- /hints/122.unshar: -------------------------------------------------------------------------------- 1 | # 122 brings in rdump, so we need to reverse apply the patch and 2 | # then delete the new file. 3 | 4 | cd $TEMP 5 | sed -n -e '/^sed.*\/tmp\/c/,/^SHAR_EOF/p' < $patch | sed -e "s=/tmp/c=$TEMP/patchfile=" | sh -x 6 | cd $ROOT211 7 | patch -V none -R -p1 < $TEMP/patchfile 8 | rm usr/src/etc/dump/dumprmt.c 9 | -------------------------------------------------------------------------------- /hints/151.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 151 has a patch and a new file. Just need to apply it backwards and remove the new file. 4 | cd $TEMP 5 | sed -n -e '/^sed.*\/tmp\/c/,/^SHAR_EOF/p' < $patch | sed -e "s=/tmp/c=$TEMP/patchfile=" | sh -x 6 | cd $ROOT211 7 | patch -V none -R -p1 < $TEMP/patchfile 8 | rm $ROOT211/usr/src/sys/pdpstand/toyset.s 9 | -------------------------------------------------------------------------------- /hints/178.unpatch: -------------------------------------------------------------------------------- 1 | # 2 | # 178.unpatch 3 | # 4 | # A file was removed here. We'll need it later... 5 | # 6 | cd $ROOT211 7 | patch -V none -R -p1 < $patch 8 | from2.10.1 usr/src/sys/netinet/ip_acct.h 9 | # need to apply all the patches 2.11 patch set has already appled to 2.10.1 start 10 | patch -V none -R -p1 < $HINTSDIR/178.fixup 11 | -------------------------------------------------------------------------------- /hints/143.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 143 The shar file creaets 5 patchs. Just apply them all. 3 | # 4 | sed -e '1,/===cut here===/d' < $patch | sed -e "s=/tmp/=$TEMP/=" | sh -x 5 | cd $ROOT211 6 | patch -V none -R -p1 < $TEMP/22 7 | patch -V none -R -p1 < $TEMP/12 8 | patch -V none -R -p1 < $TEMP/2 9 | patch -V none -R -p1 < $TEMP/13 10 | patch -V none -R -p1 < $TEMP/20 11 | -------------------------------------------------------------------------------- /hints/40.unpatch: -------------------------------------------------------------------------------- 1 | # This is an announcement for corrupt files. so it's optional. We'll 2 | # recreate the non-currupt tape. 3 | # /usr/src/games/mille/end.c 4 | # /usr/src/games/banner.c 5 | # /usr/src/games/warp/{sig.c,smap.1,smp.5} 6 | # It is impossible to recreate the corruption, so we'll silently assume 7 | # that it's ok to create a non-currupt version of them. 8 | -------------------------------------------------------------------------------- /doit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | date 6 | 7 | sh mk211bsd 8 | cp src.tap 195 9 | cd 195 10 | # Make a pristine 195 system... then bootstrap pl0 11 | expect 211bsd-195.expect 12 | expect 211bsd-pl0-test.expect 13 | # Boot 2.11pl0 to make the tape 14 | expect 211bsd-0-mk-tape.expect 15 | # automated 2.11pl0 install 16 | expect 211bsd-0-ts.expect 17 | 18 | date 19 | -------------------------------------------------------------------------------- /hints/16.unpatch: -------------------------------------------------------------------------------- 1 | # To apply the following patch: 2 | # 3 | # 1) cd /usr/src/lib 4 | # 2) rm mip/* 5 | # 3) zcat PORT/mip.tar.Z | tar xf - 6 | # 4) cd mip 7 | # 5) patch < the_patch_below 8 | # 9 | # So to unapply, I have to rm stuff 10 | rm $ROOT211/usr/src/lib/mip/* 11 | for i in $(cd $ROOT2101 ; find usr/src/lib/mip -type f); do 12 | from2.10.1 $i 13 | done 14 | -------------------------------------------------------------------------------- /hints/84.unpatch: -------------------------------------------------------------------------------- 1 | # un-Apply patch 2 | patch -V none -p1 -R < $patch 3 | 4 | cd $ROOT211 5 | # This patch removed the TMSCP_VEC from the config files. We need to add it back. 6 | grep TMSCP_VEC sys/conf/GENERIC | awk '{printf "#define\tTMSCP_VEC\t%s\n", $2;}' >> sys/GENERIC/tms.h 7 | grep TMSCP_VEC sys/conf/KAZOO | awk '{printf "#define\tTMSCP_VEC\t%s\n", $2;}' >> sys/KAZOO/tms.h 8 | -------------------------------------------------------------------------------- /hints/93.localopts.diff: -------------------------------------------------------------------------------- 1 | --- /dune/imp/localopts.h~ 2020-08-06 14:53:51.059851000 -0600 2 | +++ /dune/imp/localopts.h 2020-08-06 14:54:12.738637000 -0600 3 | @@ -17,8 +17,8 @@ 4 | #define LINEHZ 60 5 | #ifdef KERNEL 6 | #define NBUF 32 7 | +#define Q22 1 8 | #define UNIBUS_MAP 1 9 | -#define Q22 1 10 | #define VIRUS_VFORK 1 11 | #define UCB_RUSAGE 1 12 | #endif /* KERNEL */ 13 | -------------------------------------------------------------------------------- /hints/127.unshar: -------------------------------------------------------------------------------- 1 | # 127 creates some files, so just delete them 2 | 3 | for i in /usr/src/lib/libc/pdp/sys/wait4.s \ 4 | /usr/src/man/man2/wait.2 \ 5 | /usr/src/lib/libc/gen/popen.c \ 6 | /usr/src/lib/libc/gen/system.c \ 7 | /usr/src/lib/libc/gen/wait.c \ 8 | /usr/src/lib/libc/gen/wait3.c \ 9 | /usr/src/lib/libc/gen/waitpid.c; do 10 | rm $ROOT211/$i 11 | done 12 | -------------------------------------------------------------------------------- /hints/3.unpatch: -------------------------------------------------------------------------------- 1 | # 3 has one issues 2 | # 1, MAKEDEV doesn't apply, so don't reverse 3 | # however, it looks like the copy in usr/src/sys/pdpdist/MAKEDEV 4 | # hasn't changed, so assume it is the one that should be in /dev 5 | chmod +wx $TEMP/3 6 | sed -e '88,193d' < $TEMP/3/b.2 > $TEMP/3/new.b.2 7 | cp $TEMP/3/new.b.2 $TEMP/3/b.2 8 | cp $ROOT211/usr/src/sys/pdpdist/MAKEDEV $ROOT211/dev/MAKEDEV 9 | -------------------------------------------------------------------------------- /hints/187.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 187 adds the fchdir system call. To undo it we just have to apply 3 | # the patch backwards and remove fchdir.s 4 | # 5 | # This introduces some turbulence that we need to hack around, alas 6 | # 7 | sed -n -e '/^sed.*\/tmp\/187/,/^SHAR_EOF/p' < $patch | sed -e "s=/tmp/=$TEMP/=" | sh -x 8 | cd $ROOT211 9 | patch -V none -R -p1 < $TEMP/187 10 | rm usr/src/lib/libc/pdp/sys/fchdir.s 11 | -------------------------------------------------------------------------------- /hints/80.fixup: -------------------------------------------------------------------------------- 1 | --- /usr/src/local/Makefile.old 2020-06-02 22:51:21.717212000 -0600 2 | +++ /usr/src/local/Makefile 2020-06-02 22:51:39.289621000 -0600 3 | @@ -10,7 +10,7 @@ 4 | # C programs that live in the current directory and do not need 5 | # explicit make lines. 6 | # 7 | -STD= trace decompr16 8 | +STD= trace 9 | 10 | # C programs that live in the current directory and need explicit make lines. 11 | # 12 | -------------------------------------------------------------------------------- /195/211bsd-0.ini: -------------------------------------------------------------------------------- 1 | SET CPU 11/93, 4M 2 | SET CPU IDLE 3 | 4 | SET RQ ENABLE 5 | SET RQ0 ENABLE, RD54, WRITEENABLED 6 | ATTACH RQ0 ./211bsd-0.rd54 7 | 8 | SET TQ ENABLE 9 | SET TQ0 CAPAC=0,WRITEENABLED 10 | ATTACH TQ0 ./211bsd-pl0-tape1.tap 11 | 12 | SET DLI ENABLE 13 | SET DLO0 NODATASET,8B 14 | SHOW DLO0 15 | ; allow vi/more to work 16 | SET CONSOLE PCHAR=01000023600 17 | 18 | echo "At the colon prompt type: ra(0,0)unix" 19 | BOOT RQ0 20 | -------------------------------------------------------------------------------- /apout.patch: -------------------------------------------------------------------------------- 1 | diff --git a/bsdtrap.c b/bsdtrap.c 2 | index 2c450d5..cf06364 100644 3 | --- a/bsdtrap.c 4 | +++ b/bsdtrap.c 5 | @@ -434,6 +434,8 @@ dostat: 6 | case S_CHOWN: /* DONE */ 7 | buf = xlate_filename((char *)&dspace[uarg1]); 8 | i = chown(buf, sarg2, sarg3); break; 9 | + case S_FCHOWN: /* DONE */ 10 | + i = fchown(sarg1, sarg2, sarg3); break; 11 | case S_PIPE: /* DONE */ 12 | i = pipe(pfd); 13 | #ifdef STREAM_BUFFERING 14 | -------------------------------------------------------------------------------- /hints/37a.unpatch: -------------------------------------------------------------------------------- 1 | # 2 | # Small message change to backgammon was overlooked. Which is kinda 3 | # stupid because all it changes is the date it was last updated... 4 | # 5 | # This also means that when the time comes for going forward to 195, 6 | # this will also be wrong there :(. 7 | # 8 | cd $ROOT211 9 | sed -I.bak -e "s/Sunday, January 16, 1994/Tuesday, June 5, 1990/g" usr/src/games/backgammon/message.c 10 | rm usr/src/games/backgammon/message.c.bak 11 | 12 | -------------------------------------------------------------------------------- /hints/134.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 134 has a patch and a share that creates 3 | # /usr/src/lib/libc/pdp/crt/ultof.s 4 | # /usr/src/lib/libc/pdp/crt/ulsh.s 5 | # /usr/src/lib/libc/pdp/crt/ulrem.s 6 | # /usr/src/lib/libc/pdp/crt/uldiv.s 7 | # 8 | cd $ROOT211 9 | patch -V none -R -p1 < $patch 10 | rm $ROOT211/usr/src/lib/libc/pdp/crt/ultof.s 11 | rm $ROOT211/usr/src/lib/libc/pdp/crt/ulsh.s 12 | rm $ROOT211/usr/src/lib/libc/pdp/crt/ulrem.s 13 | rm $ROOT211/usr/src/lib/libc/pdp/crt/uldiv.s 14 | -------------------------------------------------------------------------------- /hints/154.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 154 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | # It also creates: 5 | # /usr/src/usr.lib/libvmf/* 6 | # /usr/include/vmf.h 7 | # /usr/src/include/vmf.h 8 | # so remove those too 9 | cd $TEMP 10 | sed -n -e '/^sed.*vmf.patch/,/^SHAR_EOF/p' < $patch | sed -e "s=/tmp/=$TEMP/=" | sh -x 11 | cd $ROOT211 12 | patch -V none -R -p1 < $TEMP/vmf.patch 13 | rm -rf usr/src/usr.lib/libvmf usr/include/vmf.h usr/src/include/vmf.h 14 | -------------------------------------------------------------------------------- /hints/118.unpatch: -------------------------------------------------------------------------------- 1 | # 2 | # 118 replaces ucb/Mail, so we snag the old one from 2.10.1 on 3 | # the theory that the main line development happened in 4BSD and 4 | # this wasn't updated in time for 2.11BSD release 5 | # 6 | cd $ROOT211 7 | find usr/src/ucb/Mail -type f | xargs rm 8 | mkdir usr/src/ucb/Mail/misc 9 | for i in $(cd $ROOT2101 ; find usr/src/ucb/Mail -type f); do 10 | from2.10.1 $i 11 | done 12 | cd usr/src/ucb/Mail 13 | # Patch 10 updates this file 14 | patch -V none -p1 < $PATCHDIR/10 15 | -------------------------------------------------------------------------------- /hints/174.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 174 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | cd $TEMP 5 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 6 | cd $ROOT211 7 | patch -V none -R -p1 < $TEMP/patchfile 8 | # Patch 174 is missing one chunk for sendmail.MX/src/daemon.c, so dig that out of patchfile and apply it. 9 | sed -ne '/sendmail.src.daemon.c.old/,/sendmail.src.conf.h.old/p' < $TEMP/patchfile | \ 10 | sed -e 's=/sendmail/=/sendmail.MX/=' | patch -V none -R -p1 11 | -------------------------------------------------------------------------------- /hints/1a.unpatch: -------------------------------------------------------------------------------- 1 | # first, apply the patch 2 | cd $ROOT211 3 | patch -V none -p1 -R < $patch 4 | 5 | # This patch moves the man page, so we have to remove the old man pages and 6 | # popualte the new... this movement isn't in the patch. 7 | from2.10.1 usr/src/man/man1/tftp.1 8 | from2.10.1 usr/src/man/man8/tftpd.8 9 | rm usr/src/etc/tftpd/tftpd.8 10 | rm usr/src/ucb/tftp/tftp.1 11 | 12 | # This wasn't a symlink originally... 13 | rm usr/src/etc/tftpd/tftpsubs.c 14 | cp -p usr/src/ucb/tftp/tftpsubs.c usr/src/etc/tftpd/tftpsubs.c 15 | -------------------------------------------------------------------------------- /hints/93.unpatch: -------------------------------------------------------------------------------- 1 | patch -V none -p1 -R < $patch 2 | cd $ROOT211 3 | cd usr/src/sys 4 | # Move from SMS -> KAZOO with this break 5 | rm -rf GENERIC SMS 6 | cd conf 7 | rm SMS 8 | # KAZOO is best effort... we have not a lot to go on and may not work 9 | ./config KAZOO 10 | ./config GENERIC 11 | cd ../GENERIC 12 | # Sigh, this looks like it was tweaked by hand, all the way back to 2.11 :( 13 | patch -V none < $HINTSDIR/93.localopts.diff 14 | # This is as good a place as any to snag this... 15 | cd $ROOT211 16 | from2.10.1 GENALLSYS 17 | -------------------------------------------------------------------------------- /195/211bsd-195.ini: -------------------------------------------------------------------------------- 1 | SET CPU 11/93, 4M 2 | SET CPU IDLE 3 | 4 | SET RQ ENABLE 5 | SET RQ0 ENABLE, RD54, WRITEENABLED 6 | ATTACH RQ0 ./211bsd-195.rd54 7 | SET RQ1 ENABLE, RD54, WRITEENABLED 8 | ATTACH RQ1 ./211bsd-0.rd54 9 | 10 | SET TQ ENABLE 11 | SET TQ0 CAPAC=0,LOCKED 12 | ATTACH TQ0 ./211bsd-195.tap 13 | ; ATTACH TQ0 ./src.tap 14 | 15 | SET DLI ENABLE 16 | SET DLO0 NODATASET,8B 17 | SHOW DLO0 18 | ; allow vi/more to work 19 | SET CONSOLE PCHAR=01000023600 20 | 21 | ; echo "At the colon prompt type: ra(0,0)raunix" 22 | ; BOOT RQ0 23 | -------------------------------------------------------------------------------- /hints/2.mu: -------------------------------------------------------------------------------- 1 | --- /usr/src/sys/mdec/bruboot.s.old 2020-06-14 08:25:17.715240000 -0600 2 | +++ /usr/src/sys/mdec/bruboot.s 2020-06-14 08:25:29.172329000 -0600 3 | @@ -45,8 +45,6 @@ 4 | nop / These two lines must be present or DEC 5 | br start / boot ROMs will refuse to run boot block! 6 | start: 7 | - clr r0 / XXX - for Rome 11/70, boot card doesn't work 8 | - mov $176714,r1 / XXX - for Rome 11/70, boot card doesn't work 9 | movb r0,unit+1 / save the unit in high byte (for brcs) 10 | mov r1,csr / and csr from the ROMs (not base addr!) 11 | mov $..,sp 12 | -------------------------------------------------------------------------------- /hints/14.unshar: -------------------------------------------------------------------------------- 1 | # 14 2 | # cd /usr/src/usr.bin 3 | # rm lint/* 4 | # zcat PORT/lint.tar.Z | tar xf - 5 | # cd lint 6 | # rm :yyfix llib-* 7 | # cp -p /tmp/libs libs 8 | # Then patch makefile, which is really 'take what's there, throw it away and..." so we just need 9 | # to un throw it away. The old stuff doesn't build w/o errors (warnings?), or run, so this is 10 | # our best guess. 11 | cd $ROOT211 12 | # restore all of lint from 2.10.1 13 | rm usr/src/usr.bin/lint/* 14 | for i in $(cd $ROOT2101 ; find usr/src/usr.bin/lint -type f); do 15 | from2.10.1 $i 16 | done 17 | -------------------------------------------------------------------------------- /hints/169.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 169 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | # Also creates three new files: 5 | # /usr/src/man/man1/symorder.1 6 | # /usr/src/man/man1/strcompact.1 7 | # /usr/src/man/man1/symcompact.1 8 | # so delete them to go back... 9 | cd $TEMP 10 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 11 | cd $ROOT211 12 | patch -V none -R -p1 < $TEMP/patchfile 13 | rm $ROOT211/usr/src/man/man1/symorder.1 14 | rm $ROOT211/usr/src/man/man1/strcompact.1 15 | rm $ROOT211/usr/src/man/man1/symcompact.1 16 | -------------------------------------------------------------------------------- /hints/4.unshar: -------------------------------------------------------------------------------- 1 | # 4 2 | # Applies a patch and Creates: 3 | # spl/:splfix.mfps 4 | # spl/:splfix.movb+mfps 5 | # spl_3com/:splfix.mfps 6 | # spl_3com/:splfix.movb+mfps 7 | # so undo all that. 8 | sed -n -e '/^sed.*\/tmp\/dif/,/^SHAR_EOF/p' < $patch | sed -e "s=/tmp/dif=$TEMP/patchfile=" | sh -x 9 | cd $ROOT211/usr/src/sys/conf 10 | patch -R -V none < $TEMP/patchfile 11 | rm spl/:splfix.mfps 12 | rm spl/:splfix.movb+mfps 13 | rm spl_3com/:splfix.mfps 14 | rm spl_3com/:splfix.movb+mfps 15 | # Now we need to apply it to our kernels (just GENERIC?) 16 | cp spl/:splfix.movb ../GENERIC/SPLFIX 17 | -------------------------------------------------------------------------------- /hints/153.unpatch: -------------------------------------------------------------------------------- 1 | # Patch 152 and 153 do a lot of work with the assembler. 2 | # It is combined into just 2 files, then patched. Going 3 | # backwards, we'll just copy the 2.10.1 stuff and see if 4 | # it works going back foward and adjust as needed. 5 | # 6 | # See 152.unpatch 7 | # 8 | # So here, we remove as2.s, and copy all the as2?.s 9 | # files. 10 | # 11 | # Save p153 version for comparison 12 | mkdir -p ${SAVE}/153 13 | cp $ROOT211/usr/src/bin/as/* ${SAVE}/153 14 | rm $ROOT211/usr/src/bin/as/as2.s 15 | for i in 1 2 3 4 5 6 7 8 9; do 16 | from2.10.1 usr/src/bin/as/as2${i}.s 17 | done 18 | -------------------------------------------------------------------------------- /hints/164.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 164 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | # It also removes: 5 | # rm -f /usr/src/etc/named/tools/nslookup/shortnames.h 6 | # rm -f /usr/src/etc/named/named/shortnames.h 7 | # rm -f /usr/src/etc/talkd/shortnames.h 8 | # So add them back from 2.10.1BSD 9 | cd $TEMP 10 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 11 | cd $ROOT211 12 | patch -V none -R -p1 < $TEMP/patchfile 13 | from2.10.1 usr/src/etc/named/tools/nslookup/shortnames.h usr/src/etc/named/named/shortnames.h usr/src/etc/talkd/shortnames.h 14 | -------------------------------------------------------------------------------- /hints/78.unpatch: -------------------------------------------------------------------------------- 1 | pprint 1 "Reverse applying $PATCHDIR/$p" 2 | echo "Reverse applying $PATCHDIR/$p" 3 | patch -V none -R -p1 < $PATCHDIR/$p 4 | # disktab was patched, so we need to copy it to /etc. The 5 | # instructions say merge it in, but since there's no local 6 | # changes for us, cp is all we need to do. 7 | cp ${ROOT211}/usr/src/sys/pdpdist/disktab ${ROOT211}/etc/disktab 8 | # Note: patch 2 touches /etc/disktab as well. However, it 9 | # applies the same sort of patch included here, so that patch 10 | # won't reverse apply. This is OK since the goal is to get back 11 | # to patch level 0, and then walk forward one patch at a time. 12 | -------------------------------------------------------------------------------- /195/211bsd-195-run.ini: -------------------------------------------------------------------------------- 1 | SET CPU 11/93, 4M 2 | SET CPU IDLE 3 | 4 | SET RQ ENABLE 5 | SET RQ0 ENABLE, RD54, WRITEENABLED 6 | ATTACH RQ0 ./211bsd-195.rd54 7 | SET RQ1 ENABLE, RD54, WRITEENABLED 8 | ATTACH RQ1 ./211bsd-0.rd54 9 | 10 | ; To run with networking! 11 | ; SET XQ ENABLED 12 | ;SET XQ TYPE=DEQNA 13 | ;SET XQ MAC=08-00-2b-11-07-82 14 | ;ATTACH XQ tap:tap0 15 | 16 | SET TQ ENABLE 17 | SET TQ0 CAPAC=0,LOCKED 18 | ATTACH TQ0 ./src.tap 19 | 20 | SET DLI ENABLE 21 | SET DLO0 NODATASET,8B 22 | SHOW DLO0 23 | ; allow vi/more to work 24 | SET CONSOLE PCHAR=01000023600 25 | show config 26 | 27 | echo "At the colon prompt type: ra(0,0)unix" 28 | BOOT RQ0 29 | -------------------------------------------------------------------------------- /hints/171.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 171 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | # It removes /usr/src/ucb/window/shortnames.h, /usr/src/ucb/tn3270/shortnames.h, 5 | # and /usr/src/ucb/symorder.c. Copy them from 2.10.1BSD 6 | 7 | cd $TEMP 8 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 9 | cd $ROOT211 10 | patch -V none -R -p1 < $TEMP/patchfile 11 | from2.10.1 usr/src/ucb/symorder.c usr/src/ucb/tn3270/shortnames.h usr/src/ucb/window/shortnames.h 12 | # Patch 50 patches symorder.c, so we need to do that too. 13 | sed -n -e'/\*\*\* .*\/ucb\/symorder.c.orig/,$p' < $PATCHDIR/50 | patch -V none -p1 14 | -------------------------------------------------------------------------------- /hints/123.fixup: -------------------------------------------------------------------------------- 1 | *** /usr/doc/2.10/setup.2.11/4.t.old Wed Dec 30 01:12:05 1992 2 | --- /usr/doc/2.10/setup.2.11/4.t Sat Feb 6 00:29:22 1993 3 | *************** 4 | *** 2,8 **** 5 | .\" All rights reserved. The Berkeley software License Agreement 6 | .\" specifies the terms and conditions for redistribution. 7 | .\" 8 | ! .\" @(#)4.t 2.1 (2.11BSD GTE) Feb 6, 1993 9 | .\" 10 | .de IR 11 | \fI\\$1\fP\|\\$2 12 | --- 2,8 ---- 13 | .\" All rights reserved. The Berkeley software License Agreement 14 | .\" specifies the terms and conditions for redistribution. 15 | .\" 16 | ! .\" @(#)4.t 2.0 (2.11BSD GTE) 12/30/92 17 | .\" 18 | .de IR 19 | \fI\\$1\fP\|\\$2 20 | -------------------------------------------------------------------------------- /hints/72.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 72 adds the toy support and toy.o to the prototype makefiles. 3 | # We need to copy stuff over afterwards since it updates the 4 | # prototype Make.xxxx files. 5 | # 6 | cd $TEMP 7 | sed -n -e "/^sed.*SHAR_EOF > 'c'/,/^SHAR_EOF/p" < $patch | sh -x 8 | cd $ROOT211 9 | patch -V none -R -p1 < $TEMP/c 10 | rm usr/src/sys/pdp/toy.s 11 | cp usr/src/sys/conf/Make.pdp usr/src/sys/GENERIC 12 | sed -n -e '/Make.sunix/,/Make.unix/p' < $TEMP/c | sed -e 's=/conf/Make.sunix=/GENERIC/Makefile=' | patch -V none -p1 -R 13 | cp usr/src/sys/conf/Make.pdp usr/src/sys/KAZOO 14 | sed -n -e '/Make.nsunix/,/Make.sunix/p' < $TEMP/c | sed -e 's=/conf/Make.nsunix=/KAZOO/Makefile=' | patch -V none -p1 -R 15 | -------------------------------------------------------------------------------- /hints/root.cache: -------------------------------------------------------------------------------- 1 | ; @(#)root.cache 5.1 (Berkeley) 06/30/90 2 | 3 | ; Initial cache data for root domain servers. 4 | . IN NS NS.NIC.DDN.MIL. 5 | IN NS A.ISI.EDU. 6 | IN NS AOS.BRL.MIL. 7 | IN NS C.NYSER.NET. 8 | IN NS GUNTER-ADAM.AF.MIL. 9 | IN NS NS.NASA.GOV. 10 | IN NS TERP.UMD.EDU. 11 | 12 | ; Prep the cache (hotwire the addresses). Order does not matter. 13 | NS.NIC.DDN.MIL IN A 192.67.67.53 14 | A.ISI.EDU IN A 26.3.0.103 15 | IN A 128.9.0.107 16 | AOS.BRL.MIL IN A 128.20.1.2 17 | IN A 192.5.25.82 18 | C.NYSER.NET. IN A 192.33.4.12 19 | GUNTER-ADAM.AF.MIL. IN A 26.1.0.13 20 | NS.NASA.GOV. IN A 128.102.16.10 21 | IN A 192.52.195.10 22 | TERP.UMD.EDU. IN A 128.8.10.90 23 | -------------------------------------------------------------------------------- /hints/152.fixup: -------------------------------------------------------------------------------- 1 | --- /usr/src/bin/as/as19.s~ 2020-06-05 19:56:36.998209000 -0600 2 | +++ /usr/src/bin/as/as19.s 2020-06-05 21:08:14.848339000 -0600 3 | @@ -193,7 +193,6 @@ 4 | ; 01;0000262 5 | ; 01;0000264 6 | ; 01;0000270 7 | -; 01;0000240 8 | ; 01;0000000 9 | ; 01;0000001 10 | ; 01;0000004 11 | --- /usr/src/bin/as/as29.s~ 2020-06-05 19:56:37.006342000 -0600 12 | +++ /usr/src/bin/as/as29.s 2020-06-05 21:08:26.231997000 -0600 13 | @@ -160,7 +160,6 @@ 14 | 01;0000262 /sev 15 | 01;0000264 /sez 16 | 01;0000270 /sen 17 | -01;0000240 /nop 18 | 01;0000000 /halt 19 | 01;0000001 /wait 20 | 01;0000004 /iot 21 | -------------------------------------------------------------------------------- /hints/185.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 185 patches the m4 man page and replaces m4. Grab the m4 from 2.10.1BSD on the theory they weren't changed. 3 | # we need to look at the CSRG SCCS archive and the bsd patches group to me sure. 4 | # 5 | sed -n -e '/^sed.*\/tmp\/m4.man.patch/,/^SHAR_EOF/p' < $patch | sed -e "s=/tmp/=$TEMP/=" | sh -x 6 | cd $ROOT211 7 | patch -V none -R -p1 < $TEMP/m4.man.patch 8 | rm -rf usr/src/usr.bin/m4 9 | mkdir usr/src/usr.bin/m4 10 | from2.10.1 usr/src/usr.bin/m4/Makefile usr/src/usr.bin/m4/m4.c usr/src/usr.bin/m4/m4y.y 11 | # Patch 115 makes some fixes to Makefile, so draw those in too so 115 undoes them 12 | sed -n -e'/\*\*\* .*m4\/Makefile.old/,/*\*\* .*\/prof\/Makefile.old/p' < $PATCHDIR/115 | patch -V none -p1 13 | -------------------------------------------------------------------------------- /hints/17.unshar: -------------------------------------------------------------------------------- 1 | # 17 2 | # we remove INDEX :rofix fort.h.vax 3 | # cd /usr/src/lib/pcc 4 | # rm INDEX :rofix fort.h.vax 5 | # cp /tmp/stab.c . 6 | # mv macdefs macdefs.h 7 | # mv mac2defs mac2defs.h 8 | # cd .. 9 | # zcat PORT/pcc.tar.Z | tar xvf - pcc/localdefs.h pcc/DEBUGS pcc/INFO 10 | # 11 | sed -n -e '/^sed.*\/tmp\/c/,/^SHAR_EOF/p' < $patch | sed -e "s=/tmp/c=$TEMP/patchfile=" | sh -x 12 | cd $ROOT211 13 | for i in INDEX :rofix fort.h.vax; do 14 | from2.10.1 usr/src/lib/pcc/$i 15 | done 16 | cd usr/src/lib/pcc/ 17 | patch -V none -p1 -R 2 | boot ts0 3 | ; 4 | ts(0,1) 5 | ra(0,0) 6 | 15884 7 | 8 | 9 | : 10 | ts(0,2) 11 | ts(0,4) 12 | ra(0,0) 13 | 14 | : 15 | ra(0,0)unix 16 | # 17 | dd if=/mdec/rauboot of=/dev/ra0a count=1 18 | disk=ra 19 | part=c 20 | name=${disk}0${part} 21 | cd /dev 22 | rm *mt* 23 | ./MAKEDEV ts0 24 | sync 25 | newfs $name rd54 26 | mount /dev/$name /usr 27 | cd /usr 28 | mt rew 29 | mt fsf 5 30 | tar xpbf 20 /dev/rmt12 31 | mt -f /dev/rmt12 fsf 32 | mkdir src 33 | cd src 34 | tar xpbf 20 /dev/rmt12 35 | cd / 36 | chmod 755 / /usr /usr/src /usr/src/sys 37 | rm -f sys 38 | ln -s usr/src/sys sys 39 | cd /usr/src 40 | tar xpbf 20 /dev/rmt12 41 | vi /etc/netstart # fill in hostname, etc 42 | vi /etc/networks # add local network 43 | mv /usr/lib/sendmail /usr/lib/sendmail.off 44 | -------------------------------------------------------------------------------- /hints/167.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 168 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | # Also, it cretes 5 | # /usr/src/lib/libc/gen/nlist.c 6 | # /usr/src/lib/libc/pdp/gen/nsym.c 7 | # and removes 8 | # /usr/src/lib/libc/gen/nlist.c 9 | # /usr/src/lib/libc/gen/nsym.c 10 | # 11 | # nsym.c didn't appear to be there before. It's not in any makefiles before this, 12 | # not in 2.10.1. the new nsym.c is added in the right place, and it's added to the 13 | # right makefile, and nsym.c isn't removed from a different makefile. 14 | cd $TEMP 15 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 16 | cd $ROOT211 17 | patch -V none -R -p1 < $TEMP/patchfile 18 | rm $ROOT211/usr/src/lib/libc/gen/nlist.c 19 | rm $ROOT211/usr/src/lib/libc/pdp/gen/nsym.c 20 | from2.10.1 usr/src/lib/libc/gen/nlist.c 21 | -------------------------------------------------------------------------------- /hints/121.unshar: -------------------------------------------------------------------------------- 1 | # 121 removes files created by 98 and replaces them. 2 | 3 | chdir $ROOT211 4 | rm $ROOT211/usr/src/sys/pdpif/if_qt.c 5 | rm $ROOT211/usr/src/sys/pdpif/if_qtreg.h 6 | 7 | # 8 | # Snag the files that this reapplaces from patch 98, which was a beta version of 9 | # this driver 10 | # 11 | sed -n -e'/\*\*\* .*if_qt.c.old/,/*\*\* .*\/if_uba.c.old/p' < $PATCHDIR/98 | patch -V none -p1 12 | 13 | # 14 | # While a placeholder qt driver was introduced in patch 98, it didn't work. I am 15 | # going to arbitrarily say the QT kernel config made no sense before here. This stops 16 | # us back-patching it and makes things a little easier. 17 | # XXX going forward, though, we might need to hack this to save off the current state 18 | # XXX so we can recover it since there doesn't appear to be any patches for this. 19 | # 20 | rm -rf usr/src/sys/QT usr/src/sys/conf/QT 21 | -------------------------------------------------------------------------------- /hints/132.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 132 replaces named/tools and has a patch, so undo the patch and just update 3 | # the tools from 2.10.1. The patch describes them as ancient, and 2.10.1 qualifies. 4 | # 5 | sed -e '1,/===cut here===/d' < $patch | sh -x 6 | uudecode c.tar.Z.uu 7 | rm c.tar.Z.uu 8 | uncompress c.tar.Z 9 | cd $ROOT211 10 | patch -V none -R -p1 < $TEMP/c.patch 11 | find usr/src/etc/named/tools -type f | xargs rm 12 | for i in $(cd $ROOT2101 ; find usr/src/etc/named/tools -type f); do 13 | from2.10.1 $i 14 | done 15 | # patch 76 fixes some stuff 16 | patch -V none -p1 < $PATCHDIR/76 17 | # Patch 108 makes some fixes to Makefile, so apply those in too so 108 undoes them 18 | sed -n -e'/\*\*\* .*\/tools\/Makefile.old/,/*\*\* .*\/restor\/Makefile.old/p' < $PATCHDIR/108 | patch -V none -p1 19 | # root.cache came in here. Replace it with the one from 1990 in the CSRG archives. 20 | cp $HINTSDIR/root.cache $ROOT211/usr/src/etc/named/master/root.cache 21 | -------------------------------------------------------------------------------- /vars: -------------------------------------------------------------------------------- 1 | # Vars 2 | TOP=$(pwd) 3 | if [ -d $HOME/tuhs ]; then 4 | TUHS=$HOME/tuhs 5 | else 6 | TUHS=$TOP/tuhs 7 | fi 8 | UCB=$TUHS/Distributions/UCB 9 | TOOLS=${TOP}/tools 10 | TOOLBIN=$TOOLS/bin 11 | APOUT_SRC=${TOOLS}/apout 12 | APOUT=${APOUT_SRC}/apout 13 | TAPE211=${TOP}/tape-2.11 14 | ROOT211=${TOP}/root-2.11 15 | TAPE2101=${TOP}/tape-2.10.1 16 | ROOT2101=${TOP}/root-2.10.1 17 | TAPEV7=${TUHS}/Distributions/Research/Henry_Spencer_v7/v7.tar.gz 18 | ROOTV7=${TOP}/root-v7 19 | PATCHSRC=${UCB}/2.11BSD/Patches 20 | PATCHDIR=${TOP}/patches 21 | HINTSDIR=${TOP}/hints 22 | APOUT_ROOT=/ 23 | export TEMPDIR=${TOP}/tmp 24 | LOGS=${TOP}/log 25 | RECOVERY_LOG=${LOGS}/recovery.log 26 | ROOT211TAR=$TOP/root-2.11.tar.xz 27 | export SAVE=${TOP}/saveit 28 | P80TESTDIR=${TOP}/p80-test 29 | GITREPO=${TOP}/git-2.11 30 | 31 | # Common routines 32 | 33 | die() { 34 | echo $* 35 | exit 1 36 | } 37 | 38 | clean_tree() { 39 | chmod -R +w $1 40 | rm -rf $1 41 | } 42 | -------------------------------------------------------------------------------- /hints/178.fixup: -------------------------------------------------------------------------------- 1 | *** /usr/src/sys/netinet/ip_acct.h.old Fri Apr 29 19:59:05 1988 2 | --- /usr/src/sys/netinet/ip_acct.h Fri Dec 31 23:46:28 1993 3 | *************** 4 | *** 3,9 **** 5 | * All rights reserved. The Berkeley software License Agreement 6 | * specifies the terms and conditions for redistribution. 7 | * 8 | ! * @(#)ip_acct.h 1.2 (2.11BSD GTE) 12/31/93 9 | */ 10 | 11 | /* 12 | --- 3,9 ---- 13 | * All rights reserved. The Berkeley software License Agreement 14 | * specifies the terms and conditions for redistribution. 15 | * 16 | ! * @(#)ip_acct.h 1.1 (2.10BSD Berkeley) 12/1/86 17 | */ 18 | 19 | /* 20 | *************** 21 | *** 14,21 **** 22 | name. 23 | */ 24 | 25 | ! #ifndef pdp11 26 | ! #define IP_ACCT /* doesn't work in 2.xBSD */ 27 | #endif 28 | 29 | struct ip_acct { 30 | --- 14,21 ---- 31 | name. 32 | */ 33 | 34 | ! #ifndef BSD2_10 35 | ! #define IP_ACCT /* doesn't work in 2.10BSD */ 36 | #endif 37 | 38 | struct ip_acct { 39 | -------------------------------------------------------------------------------- /hints/173.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 173 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | # It also adds a randlib directory to replace ranlib.c. So, remove ranlib dir and 5 | # Copy ranlib.c from 2.10.1BSD on the assumption that it hasn't changed. 6 | cd $TEMP 7 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 8 | cd $ROOT211 9 | patch -V none -R -p1 < $TEMP/patchfile 10 | 11 | # ranlib is a hybrid of the 2.10.1 and the 4.3BSD one. ranlib still produced 12 | # old-style tables, so pull it from 2.10.1 and apply hand crafted patch which 13 | # replaces a few lines in main and the entire nextel, fixsize and fixdate 14 | # functions. 15 | rm -rf usr/src/usr.bin/ranlib 16 | from2.10.1 usr/src/usr.bin/ranlib.c 17 | 18 | # Now apply the reconstruction patch 19 | patch -V none -p1 < $HINTSDIR/173.ranlib.diff 20 | 21 | # Bug from 24 Oct 89 Message-ID: <38871@wlbr.IMSD.CONTEL.COM> 22 | # But there's a conflict, so i've cached a hand-applied version. 23 | patch -V none -p1 < $HINTSDIR/173.ranlib-2.diff 24 | -------------------------------------------------------------------------------- /gen211git: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | . vars 5 | 6 | # Generate the git repo for the 2.11BSD project. 7 | 8 | # Blow away old git repo 9 | [ -d $GITREPO ] && clean_tree $GITREPO 10 | mkdir -p $GITREPO 11 | 12 | # Initialize the repo 13 | chdir $GITREPO 14 | git init 15 | echo Patch-Level: -1 > PATCH-LEVEL 16 | git checkout -b 211bsd 17 | git add PATCH-LEVEL 18 | git commit -m"2.11BSD history reconstruction project, initial empty commit" 19 | 20 | # Copy the initial tree 21 | # This list is ugly, but not all the src is under /usr/src 22 | (cd $ROOT211; tar cf - GENALLSYS README VERSION dev etc \ 23 | usr/adm usr/lib usr/dict usr/doc usr/guest usr/hosts usr/include \ 24 | usr/pub usr/skel usr/spool usr/src) | tar xvf - 25 | 26 | # Note: Patch-Level wasn't updated by each of the patches, especailly the early 27 | # ones, but we use it to keep track of things and NOT bump it when we have 28 | # 'discovered' patches that were rolled up into the 'checkpoints' we have but 29 | # don't appear prior as an individual patch. 30 | echo Patch-Level: 0 > PATCH-LEVEL 31 | git add * 32 | git commit -m"Import 2.11BSD, as released, as reconstructed" 33 | -------------------------------------------------------------------------------- /hints/42.unpatch: -------------------------------------------------------------------------------- 1 | # un-Apply patch 2 | patch -V none -p1 -R < $patch 3 | 4 | # We have to undo these instructions: 5 | # First, move the OTHERS/dhv modules to the right place and remove 6 | # the OTHERS/dhv directory. 7 | # 8 | # mv /sys/OTHERS/dhv/dhv.c /sys/pdpuba/dhv.c 9 | # mv /sys/OTHERS/dhv/dhvreg.h /sys/pdpuba/dhvreg.h 10 | # mv /sys/OTHERS/dhv/dhvauto.c /sys/autoconfig/dhvauto.c 11 | # rm -r /sys/OTHERS/dhv 12 | cd $ROOT211 13 | cd usr/src/sys 14 | mkdir OTHERS/dhv 15 | mv pdpuba/dhv.c OTHERS/dhv 16 | mv pdpuba/dhvreg.h OTHERS/dhv 17 | mv autoconfig/dhvauto.c OTHERS/dhv 18 | 19 | # And then we have to update Make.pdpuba and KAZOO/Makefile 20 | # to cope with Make.nsunix changing and GENERIC/Makefile to 21 | # cope with Make.sunix changing. 22 | cd $ROOT211 23 | sed -n -e '/Make.nsunix/,/Make.pdpuba/p' < $patch | sed -e 's=/conf/Make.nsunix=/KAZOO/Makefile=' | patch -V none -p1 -R 24 | sed -n -e '/Make.sunix/,/Make.unix/p' < $patch | sed -e 's=/conf/Make.sunix=/GENERIC/Makefile=' | patch -V none -p1 -R 25 | # Make.pdpuba changed, we need to copy that into the config areas... 26 | for i in KAZOO GENERIC; do 27 | cp sys/conf/Make.pdpuba sys/$i 28 | done 29 | -------------------------------------------------------------------------------- /hints/158.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 158 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | # It also does: 5 | # rm -f /usr/include/a.out.h 6 | # rm -f /usr/include/nlist.h 7 | # rm -f /usr/include/ar.h 8 | # rm -f /usr/include/ranlib.h 9 | # rm -f /usr/include/short_names.h 10 | # It also creates: 11 | # /usr/include/a.out.h 12 | # /usr/include/nlist.h 13 | # /usr/include/ar.h 14 | # /usr/include/ranlib.h 15 | # So we can just copy over stuff from 2.10.1BSD or 4.3BSD and not worry about removal. 16 | cd $TEMP 17 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 18 | cd $ROOT211 19 | patch -V none -R -p1 < $TEMP/patchfile 20 | for i in a.out.h nlist.h short_names.h; do 21 | from2.10.1 usr/include/$i 22 | cp -f $ROOT211/usr/include/$i $ROOT211/usr/src/include 23 | done 24 | # But we have concluded that ar and ranlib, at least, came from 4.3BSD in the 2.11BSD 25 | # release for the transition to portable archive format. a.out didn't change from 26 | # 2.10.1 to 2.11, but did change in this series of patches, so we should grab it from 27 | # 2.10.1. 28 | echo "Recovering from 4.3 now" 29 | for i in ar.h ranlib.h; do 30 | from4.3 usr/src/include/$i 31 | cp -f $ROOT211/usr/src/include/$i $ROOT211/usr/include 32 | done 33 | -------------------------------------------------------------------------------- /hints/106.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 106 patches a bunch of stuff after deleting some man pages and moving 3 | # some others. 4 | # 5 | # mv /usr/src/man/man6/battlestar.6 /usr/src/games/battlestar/battlestar.6 6 | # mv /usr/src/man/man6/sail.6 /usr/src/games/sail/sail.6 7 | # rm /usr/src/new/shar/getopt.3 8 | # rm /usr/src/etc/ftpd/getusershell.3 9 | # rm /usr/src/usr.lib/sendmail/aux/logger.1 10 | # rm /usr/src/usr.lib/sendmail/doc/mailaddr.7 11 | # rm /usr/src/usr.lib/sendmail/doc/sendmail.8 12 | # rm /usr/src/usr.lib/sendmail/aux/vacation.1 13 | # rm /usr/src/man/man8/tftpd.8 14 | cd $ROOT211 15 | patch -V none -R -p1 < $patch 16 | # move these back 17 | mv usr/src/games/battlestar/battlestar.6 usr/src/man/man6/battlestar.6 18 | mv usr/src/games/sail/sail.6 usr/src/man/man6/sail.6 19 | # copy these from the non-redundant location 20 | cp $(find . -name getopt.3) usr/src/new/shar/getopt.3 21 | cp $(find . -name getusershell.3) usr/src/etc/ftpd/getusershell.3 22 | cp $(find . -name logger.1) usr/src/usr.lib/sendmail/aux/logger.1 23 | cp $(find . -name mailaddr.7) usr/src/usr.lib/sendmail/doc/mailaddr.7 24 | cp $(find . -name sendmail.8) usr/src/usr.lib/sendmail/doc/sendmail.8 25 | cp $(find . -name vacation.1) usr/src/usr.lib/sendmail/aux/vacation.1 26 | cp $(find . -name tftpd.8) usr/src/man/man8/tftpd.8 27 | -------------------------------------------------------------------------------- /hints/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Script to build a 2.11BSD pl 0 system from recoverd sources on a 2.11pl195 4 | # system that we have extant. 5 | 6 | R=/ur 7 | S=$R/usr/src 8 | 9 | # The build requires /dev/null to work, so create it. While we're here, go head 10 | # and create all the devices we'll need. 11 | echo Creating devices 12 | cd $R/dev 13 | sh ./MAKEDEV std hk0 hk1 ra0 ra1 ra2 ra3 mt0 mt1 nmt0 nmt1 xp0 xp1 rl0 rl1 pty0 dz0 lp0 local 14 | 15 | # 16 | # Once we have the .o files, we need to link them into binaries. We also need to 17 | # create libraries. ld(1) is what turns .o files into other .o files as well as 18 | # executables. nm(1) is used by the lorder(1) script to create the long list of 19 | # library dependencies, so it has to grok the old formwat too. We don't build 20 | # ar(1) here, though, because the ar(5) format is the same, even if the ar(1) 21 | # program changed to be the one from 4.3BSD in patch 173. 22 | # 23 | echo Bootstrapping ld and nm and faking ranlib 24 | cd $S/bin 25 | cc -o ld -O -i -I$R/usr/include ld.c -lc 26 | cc -o nm -O -i -I$R/usr/include nm.c -lc 27 | mkdir -p $R/bs 28 | cp ld nm as/as as/as2 $R/bs 29 | 30 | # OK, now it's time to jump into the chroot. 31 | echo Launching the chroot build 32 | cd / 33 | #chroot $R sh -c /usr/urbsd/build2.sh 34 | -------------------------------------------------------------------------------- /hints/184.unpatch: -------------------------------------------------------------------------------- 1 | # 2 | # Patch 184 replaces the temporary files with a shell pipeline for 3 | # all assembler files in the tree. Pretty straight forward, but it 4 | # also deletes a few things. These are compat / low-churn items, so 5 | # it's pretty safe to get them from 2.10.1. 6 | # 7 | # However, the directories we're getting them from were renamed from com-2.9 and 8 | # com-4.1 to compat-2.9 and compat-4.1 respectively so we have to jump through 9 | # some hoops for that to still have proper tracking of the recovery. 10 | # 11 | # So we need to create the compat-4.1 directory, add the SYS.h symlink, add the 12 | # profiled directory. Then we need to change DEFS.h to SYS.h in the files we 13 | # snagged from 2.10.1BSD to reflect the differences between 2.10.1 and 2.11. 14 | # 15 | cd $ROOT211 16 | patch -V none -p1 -R < $patch 17 | pdp=usr/src/lib/libc/pdp 18 | mkdir $pdp/com-4.1 19 | from2.10.1 $pdp/com-4.1/Makefile $pdp/com-4.1/reset.s 20 | mv $pdp/com-4.1 $pdp/compat-4.1 21 | mkdir $pdp/compat-4.1/profiled 22 | ln -s ../sys/SYS.h $pdp/compat-4.1 23 | sed -I.bak -e"s/DEFS.h/SYS.h/g;s/com-4.1/compat-4.1/g" $pdp/compat-4.1/Makefile $pdp/compat-4.1/reset.s 24 | rm $pdp/compat-4.1/*.bak 25 | mkdir $pdp/com-2.9 26 | from2.10.1 $pdp/com-2.9/HEADER 27 | mv $pdp/com-2.9/HEADER $pdp/compat-2.9 28 | rmdir $pdp/com-2.9 29 | -------------------------------------------------------------------------------- /2tape.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | use strict; 3 | # Written by Will Senn. Create a bootable SimH tap file to install the system. 4 | # Inspired by various Perl scripts and based on Hellwig Geisse's mktape.c 5 | # 6 | # modified 20171012 binmode required for windows use 7 | # This is just a hack to mount tapes for the 2.11 project 8 | 9 | my @files = ("src.tar"); 10 | my @blkszs = (10240); 11 | 12 | my $outfile = "src.tap"; 13 | 14 | my $EOF = "\x00\x00\x00\x00"; 15 | my $EOT = "\xFF\xFF\xFF\xFF"; 16 | 17 | open(OUTFILE, ">$outfile") || die("Unable to open $outfile: $!\n"); 18 | binmode(OUTFILE); 19 | for(my $i = 0; $i <= $#files; $i++) { 20 | my ($bytes, $blocksize, $buffer, $packedlen, $blockswritten, $file) = 0; 21 | 22 | $file = $files[$i]; 23 | $blocksize = $blkszs[$i]; 24 | $packedlen = pack("V", $blocksize); 25 | 26 | open(INFILE, $file) || die("Unable to open $file: $!\n"); 27 | binmode(INFILE); 28 | while($bytes = read(INFILE, $buffer, $blocksize)) { 29 | $buffer .= $bytes < $blocksize ? "\x00" x ($blocksize - $bytes) : ""; 30 | print OUTFILE $packedlen, $buffer, $packedlen; 31 | $blockswritten++; 32 | } 33 | close(INFILE); 34 | print OUTFILE $EOF; 35 | printf "%s: %d bytes = %d records (blocksize %d bytes)\n", $file, $blockswritten * $blocksize, $blockswritten, $blocksize; 36 | } 37 | print OUTFILE $EOT 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 2-Clause License 2 | 3 | Copyright (c) 2020, Warner Losh 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 19 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 22 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 23 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 24 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /hints/173.ranlib-2.diff: -------------------------------------------------------------------------------- 1 | --- /usr/src/usr.bin/ranlib.c~ 2020-07-24 22:08:53.237794000 -0600 2 | +++ /usr/src/usr.bin/ranlib.c 2020-07-24 22:15:37.349736000 -0600 3 | @@ -27,10 +27,18 @@ 4 | char **argv; 5 | { 6 | char buf[256]; 7 | + register int just_touch = 0; 8 | /* magbuf must be an int array so it is aligned on an int-ish 9 | boundary, so that we may access its first word as an int! */ 10 | int magbuf[(SARMAG+sizeof(int))/sizeof(int)]; 11 | 12 | + /* check for the "-t" flag */ 13 | + if (argc > 1 && strcmp(argv[1], "-t") == 0) { 14 | + just_touch++; 15 | + argc--; 16 | + argv++; 17 | + } 18 | + 19 | --argc; 20 | while(argc--) { 21 | fi = fopen(*++argv,"r"); 22 | @@ -48,6 +56,25 @@ 23 | fprintf(stderr, "archive: %s\n", *argv); 24 | continue; 25 | } 26 | + if (just_touch) { 27 | + register int len; 28 | + 29 | + fseek(fi, (long) sizeof (exp.a_magic), 0); 30 | + if (fread(buf, sizeof arp.ar_name, 1, fi) != 1) { 31 | + fprintf(stderr, "malformed archive: %s\n", 32 | + *argv); 33 | + continue; 34 | + } 35 | + len = strlen(tempnm); 36 | + if (bcmp(buf, tempnm, len) != 0 || 37 | + buf[len] != '\0') { 38 | + fprintf(stderr, "no symbol table: %s\n", *argv); 39 | + continue; 40 | + } 41 | + fclose(fi); 42 | + fixdate(*argv); 43 | + continue; 44 | + } 45 | fseek(fi, (long)SARMAG, 0); 46 | new = tnum = 0; 47 | if(nextel(fi) == 0) 48 | -------------------------------------------------------------------------------- /195/mk211p195tape.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | use strict; 3 | # Written by Will Senn. Create a bootable SimH tap file to install the system. 4 | # Inspired by various Perl scripts and based on Hellwig Geisse's mktape.c 5 | # 6 | # modified 20171012 binmode required for windows use 7 | # hacked 20200717 by Warner Losh to create a 2.11BSDpl195 tape 8 | 9 | my @files = ("bootstrap", "mkfs.bin", "restor.bin", "icheck.bin", "root.dmp", "usr.tar", "sys.tar", "src.tar"); 10 | my @blkszs = (512, 1024, 1024, 1024, 10240, 10240, 10240, 10240, 10240); 11 | 12 | my $outfile = "211bsd-195.tap"; 13 | 14 | my $EOF = "\x00\x00\x00\x00"; 15 | my $EOT = "\xFF\xFF\xFF\xFF"; 16 | 17 | open(OUTFILE, ">$outfile") || die("Unable to open $outfile: $!\n"); 18 | binmode(OUTFILE); 19 | for(my $i = 0; $i <= $#files; $i++) { 20 | my ($bytes, $blocksize, $buffer, $packedlen, $blockswritten, $file) = 0; 21 | 22 | $file = $files[$i]; 23 | $blocksize = $blkszs[$i]; 24 | $packedlen = pack("V", $blocksize); 25 | 26 | open(INFILE, $file) || die("Unable to open $file: $!\n"); 27 | binmode(INFILE); 28 | while($bytes = read(INFILE, $buffer, $blocksize)) { 29 | $buffer .= $bytes < $blocksize ? "\x00" x ($blocksize - $bytes) : ""; 30 | print OUTFILE $packedlen, $buffer, $packedlen; 31 | $blockswritten++; 32 | } 33 | close(INFILE); 34 | print OUTFILE $EOF; 35 | printf "%s: %d bytes = %d records (blocksize %d bytes)\n", $file, 36 | $blockswritten * $blocksize, $blockswritten, $blocksize; 37 | } 38 | print OUTFILE $EOT 39 | -------------------------------------------------------------------------------- /hints/80.unpatch: -------------------------------------------------------------------------------- 1 | # 80 2 | # 3 | # Patch 80 didn't exist, except it did... usr.update.tar.Z was part of this big patch-kit. 4 | # 5 | # And instead of there being no other patches, it turns out that a number of things were included. 6 | # In email with Steve, prior to patch 195, /usr/src/new and /usr/src/local were unofficial parts 7 | # of the release (included, but not closely tracked), so there's no real patches for this stuff 8 | # so I have to match things up as best I can. 9 | # 10 | # /usr/src/new and /usr/src/local had been unofficial add-ons for various bits of Usenet 11 | # code that had been accumulated. The patchkit resyncrhonized these adding a number of things 12 | # so that proper patches never were generated (the silent replacement issues, which is why 13 | # we need to have a fixup patch here). 14 | 15 | rm $ROOT211/usr/src/local/decompr16.c 16 | rm -rf $ROOT211/usr/src/local/cxref 17 | rm -rf $ROOT211/usr/src/local/mtools 18 | rm -rf $ROOT211/usr/src/local/zmodem 19 | rm -rf $ROOT211/usr/src/new/tcsh 20 | 21 | # Now kermit5.181 wasn't mentioned here (and isn't in the patchkit catchup 22 | # files). However, it popped into the tree at some point. It's only a few weeks 23 | # too early for it (released 23 Nov 92 vs this likely dropping in Sep 92). 24 | # it fits better here, even if there's a bit of a temopral anomaly. 25 | # XXX need to record this with from2.10.1 somehow? fromtree maybe? 26 | rm -rf $ROOT211/usr/src/new/kermit5.188 27 | (cd $ROOT2101/usr/src/new ; tar cf - kermit) | (cd $ROOT211/usr/src/new ; tar xvf -) 28 | 29 | cd $ROOT211 30 | patch -V none -p1 < $HINTSDIR/80.fixup 31 | -------------------------------------------------------------------------------- /hints/36.unpatch: -------------------------------------------------------------------------------- 1 | # un-Apply patch 2 | patch -V none -p1 -R < $patch 3 | 4 | # change GENERIC/Makefile to cope with Make.sunix changing. 5 | cd $ROOT211 6 | sed -n -e '/Make.sunix/,/README/p' < $patch | sed -e 's=/conf/Make.sunix=/GENERIC/Makefile=' | patch -V none -p1 -R 7 | # However, there's a note in the patch: 8 | # The GENERIC kernel wouldn't fit using the distributed Make.sunix 9 | # file - this was annoying since the dist kit obviously has a 10 | # GENERIC kernel on it. Also, a reminder is added to both 11 | # the pdpstand/README and the pdpstand/Makefile to install a 12 | # 'generic' version of /etc/dtab when building a GENERIC boot tape. 13 | # So 2 things. (1) do we need to copy the un-patched dtab to /etc now? 14 | # and (2) GENERIC makefile was afu, hence the need for this change, so apply 15 | # our best guess as to how it was AFU'd based on the data we have from patch 16 | # 2 b.1 file. We can't say for sure what BASE, OV1, OV2 and the first line of OV3 17 | # are, so we'll have to test this reconstruction. We can make close guesses, 18 | # though, which is what this patch enshrines. 19 | patch -V none -p1 < $HINTSDIR/36.GENERIC-Makefile.diff 20 | 21 | # And then, we need to fix autoconfig after we've unpatched 22 | # Move the autoconfig routines into the /sys/autoconfig directory: 23 | # cd /sys/autoconfig 24 | # mv ../pdpuba/*auto* . 25 | # mv ../pdp/cnauto.c . 26 | # make tags 27 | # So do the reverse and skip the make tags... With the files moved, make 28 | # automatically adds the -I lines we need to rebuild autoconfig. 29 | cd sys/autoconfig 30 | mv cnauto.c ../pdp 31 | mv *auto* ../pdpuba 32 | -------------------------------------------------------------------------------- /hints/180.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 180 creates new and improved strcompact tools 3 | # 4 | # It creates: 5 | # /usr/src/ucb/symcompact.c 6 | # /usr/src/ucb/symdump.c 7 | # /usr/src/ucb/strcompact.c 8 | # but also removes: 9 | # Xrm -f /usr/src/ucb/symcompact.c 10 | # Xrm -f /usr/src/ucb/symdump.c 11 | # Xrm -f /usr/src/ucb/strcompact.c 12 | # 13 | # And patches usr/src/ucb/Makefile 14 | # 15 | # So, we ned to reverse apply that patch, and get the old sources from 16 | # $SOMEWHERE. They aren't in 2.10.1BSD. 17 | # 18 | # So, {str,sym}compact.c are mentioned in 171, but created in 172. They are 19 | # mentioned in 176, but that's just a list of everything patched in 158 through 175. 20 | # To undo, we just need extract them. 21 | # 22 | # symdump.c is removed in 180, but also created there. It's the only patch file 23 | # it is mentioned in, and it isn't in 2.10.1BSD either. And this patch adds it 24 | # to the Makefile. I conclude it's an extra rm that's not actually needed and 25 | # we create it here, so to undo, we just remove it. 26 | # 27 | # tl;dr: extract and apply patch from 180, extract {str,sym}compact.c from 172 and 28 | # remove symdump.c 29 | # 30 | sed -n -e '/^sed.*\/tmp\/patchfile/,/^SHAR_EOF/p' < $patch | sed -e "s=/tmp/=$TEMP/=" | sh -x 31 | cd $ROOT211 32 | patch -V none -R -p1 < $TEMP/patchfile 33 | sed -n -e '/^Xsed.*symcompact.c/,/^XSHAR_EOF/p' < $PATCHDIR/172 | sed -e "s=/usr/src/ucb/=$TEMP/=;s/^X//" | sh -x 34 | sed -n -e '/^Xsed.*strcompact.c/,/^XSHAR_EOF/p' < $PATCHDIR/172 | sed -e "s=/usr/src/ucb/=$TEMP/=;s/^X//" | sh -x 35 | cp $TEMP/symcompact.c $ROOT211/usr/src/ucb 36 | cp $TEMP/strcompact.c $ROOT211/usr/src/ucb 37 | rm -f $ROOT211/usr/src/ucb/symdump.c 38 | -------------------------------------------------------------------------------- /hints/36.GENERIC-Makefile.diff: -------------------------------------------------------------------------------- 1 | --- /usr/src/sys/GENERIC/Makefile~ 2020-07-22 22:26:06.049375000 -0600 2 | +++ /usr/src/sys/GENERIC/Makefile 2020-07-23 11:39:01.442472000 -0600 3 | @@ -47,19 +47,20 @@ 4 | 5 | BASE= br.o dh.o dhu.o dkbad.o dr.o dz.o hk.o init_sysent.o kern_clock.o \ 6 | kern_descrip.o kern_mman.o kern_proc.o kern_sig.o kern_subr.o \ 7 | - kern_synch.o lp.o machdep.o ra.o ram.o rk.o rl.o rx.o si.o \ 8 | + kern_synch.o lp.o ram.o rk.o rl.o rx.o si.o \ 9 | subr_rmap.o subr_xxx.o sys_inode.o sys_pipe.o trap.o tty.o \ 10 | tty_conf.o tty_subr.o tty_tb.o tty_tty.o ufs_alloc.o ufs_bio.o \ 11 | ufs_bmap.o ufs_dsort.o ufs_fio.o ufs_inode.o ufs_namei.o \ 12 | - ufs_subr.o vm_proc.o vm_sched.o vm_swap.o vm_swp.o vm_text.o xp.o 13 | -OV1= kern_prot.o sys_generic.o ufs_syscalls.o mem.o 14 | + ufs_subr.o vm_proc.o vm_sched.o vm_swap.o vm_text.o xp.o 15 | +OV1= sys_generic.o ufs_syscalls.o mem.o 16 | OV2= kern_acct.o kern_exec.o kern_exit.o kern_fork.o kern_resource.o 17 | -OV3= clock.o cons.o init_main.o kern_pdp.o kern_rtp.o kern_time.o \ 18 | - kern_xxx.o machdep2.o quota_sys.o subr_prf.o sys_process.o \ 19 | - syscalls.o ufs_mount.o 20 | -OV4= tty_pty.o quota_kern.o quota_subr.o quota_ufs.o subr_log.o 21 | +OV3= clock.o init_main.o kern_pdp.o kern_rtp.o kern_time.o \ 22 | + kern_xxx.o quota_sys.o subr_prf.o sys_process.o \ 23 | + syscalls.o ufs_mount.o subr_log.o vm_swp.o 24 | +OV4= tty_pty.o quota_kern.o quota_subr.o quota_ufs.o machdep2.o \ 25 | + ra.o kern_prot.o machdep.o 26 | OV5= ht.o tm.o ts.o 27 | -OV6= tmscp.o 28 | +OV6= tmscp.o cons.o 29 | 30 | KERNOBJ=${CONF} ${BASE} ${OV1} ${OV2} ${OV3} ${OV4} ${OV5} \ 31 | ${OV6} ${OV7} ${OV8} ${OV9} ${OV10} ${OV11} ${OV12} \ 32 | -------------------------------------------------------------------------------- /fetch-tuhs: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # one time only fetch of the artifacts from TUHS needed for this to run will at 4 | # least get everything locally, may need to hack mk211bsd to point to a 5 | # different TUHS. Takes ~75MB of space, so please be kind to the tuhs mirror and 6 | # don't constantly fetch. 7 | 8 | TUHS=https://www.tuhs.org/Archive/ 9 | UCB=Distributions/UCB 10 | 11 | fetchone() ( 12 | file=$1 13 | dir=$(dirname $1) 14 | mkdir -p $dir 15 | chdir $dir 16 | wget ${TUHS}/$file 17 | ) 18 | 19 | mkdir tuhs 20 | cd tuhs 21 | fetchone Distributions/Research/Henry_Spencer_v7/v7.tar.gz 22 | fetchone Distributions/Research/Dennis_v1/svntree-20081216.tar.gz 23 | fetchone $UCB/2.11BSD/root.afio.gz 24 | fetchone $UCB/2.11BSD-pl195.tar 25 | fetchone $UCB/2.10.1bsd.tar 26 | fetchone $UCB/4.3BSD/srcsys.tar.gz 27 | fetchone $UCB/4.3BSD/src.tar.gz 28 | fetchone $UCB/2.11BSD/root.afio.gz 29 | ( # Official 2.11 Patches 30 | mkdir -p $UCB/2.11BSD/Patches 31 | cd $UCB/2.11BSD/Patches 32 | wget -L --mirror -nH --cut-dirs=5 https://www.tuhs.org/Archive/Distributions/UCB/2.11BSD/Patches/ -A '[0-9]*' 33 | wget https://www.tuhs.org/Archive/Distributions/UCB/2.11BSD/Patches/usr_update.tar.bz2 34 | ) 35 | ( # Usenet 2.10.1 patches for a few things 36 | mkdir -p Usenet/comp.bugs.2bsd 37 | cd Usenet/comp.bugs.2bsd 38 | fetch https://people.freebsd.org/~imp/comp.bugs.2bsd/1989-August.txt.gz 39 | fetch https://people.freebsd.org/~imp/comp.bugs.2bsd/1989-October.txt.gz 40 | fetch https://people.freebsd.org/~imp/comp.bugs.2bsd/1989-December.txt.gz 41 | ) 42 | ( # Not tuhs, but internet archive, to get a few missing bits 43 | mkdir -p archive.org 44 | cd archive.org 45 | fetch https://archive.org/download/usenet-comp/comp.bugs.2bsd.mbox.zip 46 | tar xvf comp.bugs.2bsd.mbox.zip 47 | ) 48 | -------------------------------------------------------------------------------- /hints/142.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 142 The shar file creaets 5 patchs. Just apply them all. 3 | # and there's instructions to make copies. Remove them instead 4 | # 5 | sed -e '1,/===cut here===/d' < $patch | sed -e "s=/tmp/=$TEMP/=" | sh -x 6 | cd $ROOT211 7 | patch -V none -R -p1 < $TEMP/8 8 | patch -V none -R -p1 < $TEMP/9 9 | patch -V none -R -p1 < $TEMP/10 10 | patch -V none -R -p1 < $TEMP/11 11 | patch -V none -R -p1 < $TEMP/16 12 | rm $ROOT211/sys/pdp/libc_uldiv.s $ROOT211/sys/pdp/libc_ulsh.s 13 | # 14 | # The patch 142 instructions included: 15 | # 16 | # Then for *each* kernel you have configured on your system 17 | # (/sys/GENERIC is one, you probably have others such as 18 | # /sys/KNASE, /sys/FOO, and so on): 19 | # 20 | # cp /sys/conf/Make.pdp /sys/FOO/Make.pdp 21 | # ... 22 | # cp /sys/conf/Make.pdp /sys/GENERIC/Make.pdp 23 | # 24 | # Next you need to update the main 'Makefile' in each configured 25 | # kernel. See the file '16' below - that patch updates the 26 | # GENERIC 'Makefile', you need to do something similar to the 27 | # Makefile in /sys/FOO. You very likely can use the same patch 28 | # (cd /sys/FOO; patch < /tmp/16), all that you need to do is 29 | # add the line: 30 | # libc_uldiv.o libc_ulsh.o \ 31 | # after the line with 'libc_remque.o' in it. 32 | # 33 | # So we have to undo all that here... 34 | cd usr/src/sys 35 | # Copy Make.pdp 36 | for i in [A-Z]*; do 37 | case $i in 38 | OTHER) continue ;; 39 | esac 40 | cp conf/Make.pdp $i/Make.pdp 41 | done 42 | # And now patch the Makefile, generic already done above 43 | for i in [A-Z]*; do 44 | case $i in 45 | OTHER) continue ;; 46 | GENERIC) continue ;; 47 | esac 48 | [ -f $i/Makefile ] || continue 49 | echo Patching $i/Makefile 50 | (cd $i; patch -V none -R < $TEMP/16) 51 | done 52 | -------------------------------------------------------------------------------- /hints/124.unshar: -------------------------------------------------------------------------------- 1 | # 124 removes files and creates two patches. Reverse apply the patches and copy 2 | # the files from 2.10.1 3 | 4 | cd $TEMP 5 | sed -e '1,/================cut here/d' < $patch | sh -x 6 | cd $ROOT211 7 | patch -V none -p1 -R < $TEMP/patch.conf 8 | patch -V none -p1 -R < $TEMP/patch.param.c 9 | for i in \ 10 | usr/src/lib/libc/gen/popen.c \ 11 | usr/src/lib/libc/gen/system.c \ 12 | usr/src/lib/libc/pdp/sys/wait.s \ 13 | usr/src/lib/libc/pdp/sys/wait3.s \ 14 | usr/src/man/man2/rtp.2 \ 15 | usr/src/man/man2/wait.2 \ 16 | usr/src/sys/sys/kern_rtp.c; do 17 | from2.10.1 $i 18 | done 19 | 20 | # Tweak name 21 | cp $ROOT2101/usr/src/lib/libc/pdp/com-2.9/rtp.s usr/src/lib/libc/pdp/compat-2.9/rtp.s 22 | echo "Recovering usr/src/lib/libc/pdp/com-2.9/rtp.s to usr/src/lib/libc/pdp/compat-2.9/rtp.sfrom 2.10.1BSD" >> $RECOVERY_LOG 23 | 24 | # Changes to the config / kernel need to be hand applied -- this duplicates what config 25 | # would have done, had we run it. We don't due to the overlay issues. 26 | # Add back the CGL_RTP line to the SMS config file 27 | sed -n -e '/conf.VAX/,/config.old/p;s=VAX=SMS=g' < $TEMP/patch.conf | patch -V none -p1 -R 28 | # Need to update Make.sys and param.c in GENERIC and SMS 29 | cp usr/src/sys/conf/Make.sys usr/src/sys/conf/param.c usr/src/sys/GENERIC 30 | cp usr/src/sys/conf/Make.sys usr/src/sys/conf/param.c usr/src/sys/SMS 31 | # Need to un-mix-in the changes to Make.nsunix, which is only relevant to SMS 32 | sed -n -e '/Make.nsunix/,/Make.sunix/p' < $TEMP/patch.conf | sed -e 's=/conf/Make.nsunix=/SMS/Makefile=' | patch -V none -p1 -R 33 | # Need to un-mix-in the changes to Make.sunix, which is only relevant to GENERIC 34 | sed -n -e '/Make.sunix/,/Make.sys/p' < $TEMP/patch.conf | sed -e 's=/conf/Make.sunix=/GENERIC/Makefile=' | patch -V none -p1 -R 35 | # Make.unix also changed, but nothing uses it 36 | -------------------------------------------------------------------------------- /195/211bsd-pl0-test.expect: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/expect 2 | 3 | # expect script for using 2.11p195 to bootstrap a 2.11pl0 system 4 | 5 | set startTime [clock seconds] 6 | puts "Started : [clock format $startTime]\n" 7 | 8 | set prompt "root--> " 9 | set timeout 500 10 | 11 | spawn pdp11 211bsd-195-run.ini 12 | 13 | # Bring up multi-user and login as root 14 | expect "93Boot" 15 | expect ": " {send "ra(0,0)unix\r"} 16 | # 17 | # set the time to 3:15pm on March 15th, 1991 18 | # We set the time for all the src files to March 14th at 7:31am when the announcement 19 | # was sent out. This would be a build that happened the next day... The date 20 | # information has been lost, and was likely sometime in late Feb or early March 21 | # but this is as good as we can get and enshrines at least one known date. 22 | # 23 | expect "# " {send "date 9103151515\r"} 24 | expect "# " {send "\004"} 25 | expect "login: " {send "root\r"} 26 | expect "$prompt" {send "newfs ra1a rd54\r"} 27 | expect "$prompt" {send "newfs ra1g rd54\r"} 28 | expect "$prompt" {send "mkdir -p /ur\r"} 29 | expect "$prompt" {send "mount /dev/ra1a /ur\r"} 30 | expect "$prompt" {send "mkdir -p /ur/usr\r"} 31 | expect "$prompt" {send "mount /dev/ra1g /ur/usr\r"} 32 | expect "$prompt" {send "cd /ur\r"} 33 | expect "$prompt" {send "mt -f /dev/rmt12 rew\r"} 34 | expect "$prompt" {send "tar xv\r"} 35 | expect "$prompt" {send "sh -ex ./usr/urbsd/build.sh\r"} 36 | set timeout 3600 37 | expect "$prompt" {send "chroot /ur sh -ex /usr/urbsd/build2.sh\r"} 38 | # Should do something smart on timeout... 39 | 40 | # And we're done... 41 | expect "$prompt" {send "sync\r"} 42 | expect "$prompt" {send "sync\r"} 43 | expect "$prompt" {send "sync\r"} 44 | expect "$prompt" {send "halt\r"} 45 | expect "sim> " {send "quit\r"} 46 | 47 | set endTime [clock seconds] 48 | puts "Ended : [clock format $endTime]\n" 49 | -------------------------------------------------------------------------------- /hints/0.unshar: -------------------------------------------------------------------------------- 1 | # touch some files to get the dates more correct, 2 | # though this is fraught. 3 | 4 | cd $ROOT211 5 | # We know that there's a bin/copyh that's been in the system a long time (but 6 | # not in 2.10.1). Newest tapes have this: Apr 20 20:22:25 1989 copyh 7 | touch -d 1989-04-20T20:22:25Z $ROOT211/bin/copyh 8 | 9 | # Awk has a temporal abnormality as well. Though the files aren't different 10 | # than 2.10.1, the 195 tape has dates in 1994 on them. Reset them back to 11 | # the 2.10.1BSD dates. It's unclear why they changed on this date, but 12 | # these are the more likely dates that 2.11 shipped with. 13 | # Ditto with two Makefiles that are otherwise identical 14 | # 4 -r--r--r-- 1 imp imp 1119 Dec 10 20:13:12 1988 Makefile 15 | # 4 -rw-r--r-- 1 imp imp 1305 Mar 13 08:24:32 1987 token.c 16 | # 4 -r--r--r-- 1 imp imp 733 Feb 26 01:17:24 1987 usr/src/lib/Makefile 17 | # 4 -r--r--r-- 1 imp imp 625 Aug 12 08:47:05 1988 usr/src/new/crash/Makefile 18 | touch -d 1988-12-10T20:13:12Z usr/src/bin/awk/Makefile 19 | touch -d 1987-03-13T08:24:32Z usr/src/bin/awk/token.c 20 | touch -d 1987-02-26T01:17:24Z usr/src/lib/Makefile 21 | touch -d 1988-09-12T08:47:05Z usr/src/new/crash/Makefile 22 | 23 | # lint was broken in 2.11BSD a bit. It used the 2.10.1 24 | # files because its regeneration wasn't automated. 25 | rm usr/lib/lint/*.ln 26 | rm usr/lib/lint/llib-ltermlib 27 | ln -s llib-termcap usr/lib/lint/llib-ltermlib 28 | cp -va $ROOT2101/usr/lib/lint/*.* usr/lib/lint 29 | 30 | # The 195 tape has wlonex entry, better to use the 2.10.1BSD one 31 | from2.10.1 usr/lib/uucp/L.sys 32 | 33 | # use the aliases file from 2.10.1. The date from the 2.11 reconstruction 34 | # is too new, but there's only one change. 35 | from2.10.1 usr/lib/aliases 36 | 37 | # There's more changes for crontab, but this is a reasonable reconstruction 38 | # since we don't have diffs for the original. 39 | from2.10.1 usr/lib/crontab 40 | -------------------------------------------------------------------------------- /195/211bsd-0-mk-tape.expect: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/expect 2 | 3 | # expect script for 2.11p195 install. Newer versions need a diffferent script. 4 | 5 | set tsprompt ": " 6 | set prompt "# " 7 | set disk "ra" 8 | set part "g" 9 | set name "${disk}0${part}" 10 | 11 | set timeout -1 12 | 13 | proc hitreturn {prompt} { 14 | set timeout 1 15 | for {set tries 0} {$tries <= 5} {incr tries} { 16 | expect { 17 | "$prompt" { 18 | set timeout -1 19 | return 0 20 | } 21 | timeout { 22 | send "\r" 23 | } 24 | } 25 | } 26 | 27 | } 28 | 29 | spawn pdp11 211bsd-0.ini 30 | 31 | # create root file system 32 | #nn Boot unix and configure 33 | expect "3Boot" 34 | expect "$tsprompt" {send "${disk}(0,0)unix\r"} 35 | expect "$prompt" {send "fsck -y /dev/ra0a\r"} 36 | expect { 37 | "REBOOT UNIX*# " { 38 | send "/etc/halt\r" 39 | expect "sim> " 40 | send "quit\r" 41 | exit 1 42 | } 43 | "$prompt" { send "\r" } 44 | } 45 | expect "$prompt" {send "fsck -t xxx -y /dev/ra0c\r"} 46 | expect "$prompt" {send "mount /dev/ra0c /usr\r"} 47 | expect "$prompt" {send "cd /dev\r"} 48 | expect "$prompt" {send "rm *mt*\r"} 49 | expect "$prompt" {send "sh ./MAKEDEV tu0\r"} 50 | expect "$prompt" {send "/etc/dump 0f /usr/root.dump /dev/ra0a\r"} 51 | expect "$prompt" {send "cd /sys/pdpstand\r"} 52 | expect "$prompt" {send "make\r"} 53 | expect "$prompt" {send "make distribution\r"} 54 | expect "Switch tapes. Hit CR when second tape is mounted." {send "\005"} 55 | expect "sim> " {send "ATTACH TQ0 ./211bsd-pl0-tape2.tap\r"} 56 | expect "sim> " {send "cont\r"} 57 | hitreturn "cd /usr/src;" 58 | expect "$prompt" {send "\005"} 59 | expect "sim> " {send "ATTACH TQ0 ./211bsd-pl0-tq.tap\r"} 60 | expect "sim> " {send "cont\r"} 61 | hitreturn "$prompt" 62 | send "\r" 63 | expect "$prompt" {send "make tmscptape\r"} 64 | expect "$prompt" {send "/etc/halt\r"} 65 | expect "sim> " {send "quit\r"} 66 | -------------------------------------------------------------------------------- /test-p80: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | __p() { 4 | case "$1" in 5 | /*) echo "$TSRC/$1" ;; 6 | *) echo "$1" ;; 7 | esac 8 | } 9 | 10 | missing() { 11 | echo "MISSING: $1" 12 | # exit 13 | } 14 | 15 | cd() { 16 | chdir $(__p $1) 17 | } 18 | 19 | rm() ( 20 | set +f 21 | flags= 22 | if [ "$1" = "-r" ]; then 23 | shift 24 | flags=-r 25 | fi 26 | 27 | for i; do 28 | fn=$(__p $i) 29 | # Expand the globs in the args, we disabled them before starting 30 | for j in $fn; do 31 | if [ -f "$j" ]; then 32 | echo "removing $j" 33 | /bin/rm -f $flags $j 34 | else 35 | missing $j 36 | fi 37 | done 38 | done 39 | ) 40 | 41 | mv() { 42 | src=$(__p $1) 43 | dst=$(__p $2) 44 | if [ -f $src ]; then 45 | echo "Moving $src to $dst" 46 | /bin/mv -f $src $dst 47 | else 48 | missing $src 49 | fi 50 | } 51 | 52 | set -e 53 | # Test to see if p80 / the catch-up kil works. 54 | . vars 55 | export TSRC=${P80TESTDIR}/211bsd 56 | export P80=${P80TESTDIR}/p80 57 | 58 | /bin/rm -rf $P80TESTDIR 59 | mkdir -p $P80TESTDIR 60 | 61 | mkdir -p $TSRC 62 | chdir $TSRC 63 | tar xf $TOP/src.tar 64 | 65 | mkdir -p $P80 66 | chdir $P80 67 | tar xvf $PATCHSRC/usr_update.tar.bz2 68 | tar xvf patches.tar.bz2 69 | 70 | # README says to run root.step1. However, that's bogus for us. It renames a device we don't have. 71 | # it creates a hard link that was in 2.10.1BSD which we have. And it applies patches, but with a 72 | # command that's bogus for us. 73 | # skip root.step1 74 | 75 | # apply the patches for / 76 | chdir $TSRC 77 | patch -t -V none -p1 < $P80/root_patch 78 | 79 | # usr step 1, use the script 80 | # The functions above do some sanity checks before moving 81 | chdir $TSRC 82 | set -f 83 | . $P80/usr.step1 84 | set +f 85 | 86 | # usr step 2, extract 87 | chdir $TSRC/usr 88 | tar xpf $P80/usr.update.tar.Z 89 | 90 | find $TSRC/usr/src -type f | xargs chmod +w 91 | 92 | # user step 3, patch 93 | chdir $TSRC 94 | for i in $P80/xa?; do 95 | echo ------------------- $i ----------------------- 96 | patch -t -V none -p1 < $i 97 | done 98 | -------------------------------------------------------------------------------- /hints/160.unshar: -------------------------------------------------------------------------------- 1 | # 160 creates a patch file you are expected to apply. So extract it and reverse apply. 2 | # It also does: 3 | # rm -f /usr/src/bin/csh/shortnames.h 4 | # rm -f /usr/src/bin/ar.c 5 | # rm -f /usr/src/bin/ld.c 6 | # rm -f /usr/src/bin/adb/dummy.c /usr/src/bin/adb/mac.h 7 | # rm -f /usr/src/bin/adb/machine.h /usr/src/bin/adb/mode.h 8 | # rm -rf /usr/src/bin/nm rm /usr/src/bin/ld /usr/src/bin/ar 9 | # mkdir /usr/src/bin/nm /usr/src/bin/ld /usr/src/bin/ar 10 | # chmod 755 /usr/src/bin/nm /usr/src/bin/ld /usr/src/bin/ar 11 | # mv /usr/src/bin/nm.c /usr/src/bin/nm/nm.c 12 | # So add them back from 2.10.1BSD, remove dirs or move nm.c back 13 | cd $TEMP 14 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 15 | cd $ROOT211 16 | patch -V none -R -p1 < $TEMP/patchfile 17 | # need to move this AFTER because the patch patches it in the new place. 18 | mv $ROOT211/usr/src/bin/nm/nm.c $ROOT211/usr/src/bin/nm.c 19 | rm -rf $ROOT211/usr/src/bin/nm 20 | 21 | for i in csh/shortnames.h ld.c adb/dummy.c adb/mac.h adb/machine.h adb/mode.h; do 22 | from2.10.1 usr/src/bin/$i 23 | done 24 | 25 | from4.3 usr/src/bin/ar.c 26 | 27 | # There's one known patch to ld.c that is post 2.10.1 that appeared 28 | # in comp.bugs.2bsd: 29 | # From: sms at wlv.imsd.contel.com (Steven M. Schultz) 30 | # Date: 2 Aug 89 05:40:21 GMT 31 | # Subject: ld symboltable size is wrong 32 | # Message-ID: <34359@wlbr.IMSD.CONTEL.COM> 33 | # 34 | # Index: bin/ld.c 2.10BSD 35 | # extract it and apply. 36 | ##cd $ROOT211/usr/src/bin 37 | ##zcat $TUHS/Usenet/comp.bugs.2bsd/1989-August.txt.gz | \ 38 | ## sed -n -e '/^Index:.*bin\/ld.c/,/^==========/p' | patch -V none -p1 39 | # ld.diff is the putative diffs between 2.10.1 and 2.11, but it's not quite 40 | # right because the offsets aren't quite right. It's closer, but untested. 41 | cd $ROOT211 42 | patch -V none -p1 < $HINTSDIR/160.ld.diff 43 | # And because ld.c was 2.11 pl 141 apply it in as well 44 | cd $TEMP 45 | sed -e '1,/===cut here===/d' < $PATCHDIR/141 | sed -e "s=/tmp/=$TEMP/=" | sh -x 46 | cd $ROOT211 47 | patch -V none -p1 < $TEMP/19 48 | # 23 also in this arcive patches ld.1, which we're not recoverying from 2.10.1 49 | -------------------------------------------------------------------------------- /hints/2.unpatch: -------------------------------------------------------------------------------- 1 | chmod +w $TEMP/2 2 | mv $TEMP/2/b.0 $TEMP # b.0 has no patches, so we need to remove 3 | 4 | # This patch actually makes things out of sync. Patch 78 resyncs them. Since we 5 | # copy the pdpdist version of disktab to etc after unpatching there, this turns 6 | # out to not be needed to recover back to patch 0. 7 | rm -f $TEMP/2/b.16 # disktab 8 | 9 | # bruboot.s has 2 extra lines in it that we need to remove before this patch 10 | # will work. Unsure why this is the case, but apparently the 11/70 in Rome 11 | # didn't pass 0 in r0 or csr in r1 as expected. This removes those two 12 | # unexpected lines. 13 | (cd $ROOT211; patch -V none -p1 < $HINTSDIR/2.mu) 14 | 15 | # b.2 has this 16 | # NOTE: Remove 'tmscpboot.s' and 'tmscptape.data' from 17 | # /sys/pdpstand, they are no longer needed. 18 | # so we need to reconstruct these. this is a bit tricky since they were not in 19 | # 2.10.1 at all. However, from hints in the 2.11BSD mtboot.s after this patch, 20 | # it's clear that this code was derived from the ULTRIX-11 bootloader. By 21 | # chance, that's in the tree as /sys/OTHERS/tk/pdpstand/tkboot.s and it almost 22 | # compiles out of box. We apply a patch to it that moves it's load location to 23 | # be consistent with mtboot.s in 2.11BSD pl 0 and makes a couple of other minor 24 | # tweaks to allow it to compile and work. There's a number of ways one could 25 | # speculatively reconstruct this (eg taking mtboot.s and putting the tkstart, 26 | # tkrew and tkread functions into it after ripping out everything 27 | # else). However, that's what patch b.2 does to squeeze it all into 512 bytes, 28 | # so I've opted for minimal likely changes instead. 29 | # 30 | # Plus we need a tweaked maketape.data file for the tmscptape.data which I think 31 | # is the same with tmscpboot replacing mtboot. 32 | # 33 | cp $ROOT211/sys/OTHERS/tk/pdpstand/tkboot.s $ROOT211/sys/pdpstand/tmscpboot.s 34 | (cd $ROOT211; patch -V none -p1 < $HINTSDIR/2.tmscpboot.diff) 35 | sed -e s/mtboot/tmscpboot/g < $ROOT211/sys/pdpstand/maketape.data > $ROOT211/sys/pdpstand/tmscptape.data 36 | 37 | # Need to grab the maketape.data from 2.10.1 since it is unchanged 38 | from2.10.1 sys/pdpstand/maketape.data 39 | -------------------------------------------------------------------------------- /hints/159.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 159 creates a 2 patch filse you are expected to apply. So extract it and reverse apply. 4 | # Fun twist: they are uuencoded and compressed! 5 | cd $TEMP 6 | sed -e '1,/================cut here/d' < $patch | sh -x 7 | uudecode patchfile1.Z.uu 8 | rm patchfile1.Z.uu 9 | uncompress patchfile1.Z 10 | uudecode patchfile2.Z.uu 11 | rm patchfile2.Z.uu 12 | uncompress patchfile2.Z 13 | cd $ROOT211 14 | patch -V none -R -p1 < $TEMP/patchfile1 15 | patch -V none -R -p1 < $TEMP/patchfile2 16 | # 17 | # Patch 159 has the following instructions: 18 | # 19 | # 5) Several of the files are examples, you need to update any 20 | # local files: 21 | # 22 | # /sys/YOUR_KERNELS/Makefile 23 | # /sys/YOUR_KERNELS/SPLFIX 24 | # /sys/YOUR_KERNELS/NETSPLFIX 25 | # 26 | # Use the patches in the patchfile{1,2} as guides (you will probably 27 | # be able to use them directly). 28 | # 29 | # The changes to the kernel Makefile are to run the 'symorder', 30 | # 'symcompact' and 'strcompact' programs after linking the kernel. 31 | # 32 | # The changes to the SPLFIX and NETSPLFIX scripts deal with the 33 | # longer symbol names ('splclock' was previously truncated to 34 | # 'splcloc' for example). If you do not edit the SPL scripts 35 | # you will have undefined symbols during a kernel recompile. 36 | # 37 | # The change to the GENERIC kernel config file was to increase 38 | # the number of MSCP controllers from 1 to 2. Very useful for 39 | # disaster recovery if more than one MSCP controller is present. 40 | # 41 | # Of course it is possible to simply delete your current kernel 42 | # build directory and re-run the 'config' script again. This 43 | # will set up the Makefile and SPL scripts for you. 44 | # 45 | # Which is a long way of saying that we need to copy over Make.bdp, patch Makefile 46 | # and update SPLFIX and NETSPLFIX. The SMS and QT kernels use the same thing, so 47 | # we hack it a bit. 48 | cd usr/src/sys 49 | # Copy Make.pdp 50 | for i in [A-Z]*; do 51 | case $i in 52 | OTHER) continue ;; 53 | GENERIC) continue ;; 54 | esac 55 | cp conf/Make.pdp $i/Make.pdp 56 | cp conf/spl/:splfix.movb+mfps $i/NETSPLFIX 57 | cp conf/spl/:splfix.mfps $i/SPLFIX 58 | done 59 | # And now patch the Makefile, generic already done above 60 | for i in [A-Z]*; do 61 | case $i in 62 | OTHER) continue ;; 63 | GENERIC) continue ;; 64 | esac 65 | [ -f $i/Makefile ] || continue 66 | echo Patching $i/Makefile 67 | (cd $i; sed -ne '/Makefile/,/FRC/p' < $TEMP/patchfile2 | patch -V none -R) 68 | done 69 | -------------------------------------------------------------------------------- /hints/152.unpatch: -------------------------------------------------------------------------------- 1 | # Patch 152 and 153 do a lot of work with the assembler. 2 | # It is combined into just 2 files, then patched. Going 3 | # backwards, we'll just copy the 2.10.1 stuff and see if 4 | # it works going back foward and adjust as needed. 5 | # 6 | # So here, we remove as0.s, and copy all the as1?.s 7 | # files. 8 | mkdir -p ${SAVE}/152 9 | rm $ROOT211/usr/src/bin/as/as0.s 10 | for i in 1 2 3 4 5 6 7 8 9; do 11 | from2.10.1 usr/src/bin/as/as1${i}.s 12 | done 13 | # Maybe I should snag the patch from 152 for just Makefile, but 14 | # I'm lazy atm. 15 | from2.10.1 usr/src/bin/as/Makefile 16 | 17 | cd $ROOT211 18 | # Before we start to recover using the changes post 2.11, we need to do the ones between 2.10.1 19 | # and 2.11. These were posted in comp.bugs.2bsd (which the release notes say were applied to 20 | # 2.11). 21 | # 22 | # One bug from 23 Aug 89 fixes nops 23 | # Message-ID: <35363@wlbr.IMSD.CONTEL.COM> 24 | # One bug from 15 Dec 89 fixing 1st phase of assembler not being split I/D friendly 25 | # Message-ID: <42590@wlbr.IMSD.CONTEL.COM> 26 | # One bug from 26 Dec 89 fixes 2nd phase of assembler not being split I/D friendly 27 | # Message-ID: <43068@wlbr.IMSD.CONTEL.COM> 28 | # 29 | # We re-apply them in date order, even though they appear to be backwards in the archive. 30 | ( 31 | cd usr/src/bin/as 32 | 33 | # Message-ID: <35363@wlbr.IMSD.CONTEL.COM> 34 | zcat $TUHS/Usenet/comp.bugs.2bsd/1989-August.txt.gz | \ 35 | sed -n -e '/Index:.bin\/as 2.10BSD/,/^From /p' | \ 36 | patch -V none -p1 37 | 38 | # Message-ID: <42590@wlbr.IMSD.CONTEL.COM> 39 | zcat $TUHS/Usenet/comp.bugs.2bsd/1989-December.txt.gz | \ 40 | sed -n -e '/Index:.bin\/as\/as1\?\.s 2.10BSD/,/^From /p' | \ 41 | patch -V none -p1 42 | 43 | # Message-ID: <43068@wlbr.IMSD.CONTEL.COM> 44 | zcat $TUHS/Usenet/comp.bugs.2bsd/1989-December.txt.gz | \ 45 | sed -n -e '/Index:.bin\/as\/as2\?\.s 2.10BSD/,/^From /p' | \ 46 | patch -V none -p1 47 | ) 48 | 49 | # The August 1989 patch added nop. The nop was already in the table in the wrong 50 | # place, so it needs to be removed to recover what was released in 2.11 51 | patch -V none -p1 < $HINTSDIR/152.fixup 52 | 53 | # 65 patches both as1 and as2 files, so do them both here. Going the other way 54 | # it will be fine so we don't need to be perfect. 55 | patch -V none -p1 < $PATCHDIR/65 56 | 57 | # 71 patches both as1 and as2 files, so do them both here. Going the other way 58 | # it will be fine so we don't need to be perfect. 59 | patch -V none -p1 < $PATCHDIR/71 60 | 61 | # Patch 107 makes some fixes to Makefile, so apply those in too so 107 undoes 62 | # them. 63 | sed -n -e'/\*\*\* .*\/as\/Makefile.old/,/*\*\* .*\/awk\/Makefile.old/p' < $PATCHDIR/107 | patch -V none -p1 64 | 65 | cp $ROOT211/usr/src/bin/as/* ${SAVE}/152 66 | -------------------------------------------------------------------------------- /notes.md: -------------------------------------------------------------------------------- 1 | # ur211BSD notes 2 | 3 | Various notes about the current state of things. 4 | 5 | # Latest bad-date info 6 | 7 | Filtered set of files that have bad dates in the final build. 8 | 9 | Size | date | file | notes 10 | -----|------|------|------ 11 | 64184 | Jan 16 1994 | ./usr/games/lib/battle_strings | needs to be installed by hand 12 | 75 | Jan 16 1994 | ./usr/games/words | OK, was in old source, not sure why its date changes 13 | 4 | Feb 16 1994 | ./usr/lib/uucp/SEQF 14 | 76 | Jul 12 1994 | ./usr/lib/uucp/L.sys 15 | 66625 | Jun 12 1994 | ./usr/lib/find/find.codes 16 | 209 | Dec 30 1992 | ./usr/lib/crontab 17 | 622 | Jul 12 1994 | ./usr/lib/aliases 18 | 1241 | Jan 9 1994 | ./usr/man/makewhatis.sed 19 | 873 | Jan 9 1994 | ./usr/man/manroff 20 | 34557 | Jul 17 1994 | ./usr/man/whatis 21 | 109 | Jan 15 1994 | ./usr/man/man.template 22 | 2 | Jul 12 1994 | ./usr/msgs/bounds 23 | 10 | Jul 11 1994 | ./usr/spool/at/lasttimedone 24 | 0 | Dec 28 1991 | ./usr/spool/lpd/errs 25 | 0 | Jul 12 1994 | ./usr/spool/lpd/acct 26 | 4 | Jun 21 1994 | ./usr/spool/lpd/.seq 27 | 25 | Jun 21 1994 | ./usr/spool/lpd/status 28 | 0 | Jul 12 1994 | ./usr/spool/mqueue/syslog 29 | 0 | Jul 12 1994 | ./usr/spool/uucp/LOGFILE 30 | 62 | Apr 28 1991 | ./usr/src/sys/pdpstand/maketape.data 31 | 1516 | Jan 6 1994 | ./usr/src/include/a.out.h 32 | 1389 | Jan 6 1994 | ./usr/src/include/nlist.h 33 | 849 | Apr 26 1993 | ./usr/src/etc/named/master/root.cache 34 | 2962 | Jun 25 1991 | ./usr/src/lib/mip/manifest.h 35 | 1306 | Aug 3 1991 | ./usr/src/lib/mip/ndu.h 36 | 526 | Jul 19 1991 | ./usr/src/lib/mip/onepass.h 37 | 3095 | Jul 30 1991 | ./usr/src/lib/pcc/Makefile.twopass 38 | 733 | Jan 20 1993 | ./usr/src/lib/Makefile 39 | 9826 | Jun 10 1992 | ./usr/src/new/rn/Pnews 40 | 1590 | Jun 10 1992 | ./usr/src/new/rn/config.sh 41 | 2836 | Jun 10 1992 | ./usr/src/new/rn/config.h 42 | 5615 | Jun 10 1992 | ./usr/src/new/rn/Rnmail 43 | 3534 | Jun 10 1992 | ./usr/src/new/rn/newsetup 44 | 1375 | Jun 10 1992 | ./usr/src/new/rn/newsgroups 45 | 1143 | Jun 10 1992 | ./usr/src/new/rn/newsnews 46 | 625 | Jan 22 1993 | ./usr/src/new/crash/Makefile 47 | 13181 | Dec 31 1993 | ./usr/src/usr.lib/sendmail.MX/src/daemon.c 48 | 49 | ## Observations 50 | 51 | So we still have 18 files in /usr/src to contend with. 7 of them are rn files that likely need to be regenerated with an old date from the ur2.11BSD tree. 52 | 53 | maketape.data is super close in time, and likely can be ignored. 54 | 55 | /usr/src/include likely needs to be copied from /usr/include 56 | 57 | 5 files appear releated to pcc. 58 | 59 | master/root.cache is oddly out of place and needs investigating. 60 | 61 | src/lib/Makefile suggests a missing patch of some flavor or just an editor oops. 62 | 63 | src/new/crash/Makefile likewise suggest same 64 | 65 | and the daemon.c one is weird. 66 | 67 | -------------------------------------------------------------------------------- /hints/2.tmscpboot.diff: -------------------------------------------------------------------------------- 1 | --- /usr/src/sys/pdpstand/tmscpboot.s- 1991-03-14 00:31:17.000000000 -0700 2 | +++ /usr/src/sys/pdpstand/tmscpboot.s 2020-07-28 02:14:40.793055000 -0600 3 | @@ -1,58 +1,44 @@ 4 | -/ 5 | -////////////////////////////////////////////////////////////////////// 6 | -/ Copyright (c) Digital Equipment Corporation 1984, 1985, 1986. / 7 | -/ All Rights Reserved. / 8 | -/ Reference "/usr/src/COPYRIGHT" for applicable restrictions. / 9 | -////////////////////////////////////////////////////////////////////// 10 | -/ 11 | -/ ULTRIX-11 Block Zero Bootstrap for TMSCP Magtape 12 | -/ 13 | -/ SCCSID: @(#)tkboot.s 3.0 4/21/86 14 | -/ 15 | -/ On entry boot leaves: 16 | -/ r0 = unit # 17 | -/ r1 = aip register address 18 | -/ 19 | -/ magtape boot program to load and transfer 20 | -/ to a unix entry 21 | -/ 22 | -/ Chung_wu Lee 2/8/85 23 | -/ 24 | + /* Reconstructed tmscpboot.s from tkboot.s, lightly edited to work */ 25 | +/* 26 | + * Copyright (c) Digital Equipment Corporation 1984, 1985, 1986. 27 | + * All Rights Reserved. 28 | + * Reference "/usr/src/COPYRIGHT" for applicable restrictions. 29 | + * 30 | + * ULTRIX-11 Block Zero Bootstrap for TMSCP Magtape 31 | + * 32 | + * SCCSID: @(#)tkboot.s 3.0 4/21/86 33 | + * 34 | + * Chung_wu Lee 2/8/85 35 | + * 36 | + * Steven M. Schultz (sms@wlv.imsd.contel.com) Aug 20 1990. Port to 2.11BSD 37 | +*/ 38 | + 39 | +NEWLOC = [48.*1024.] / we relocate ourselves to this address 40 | +OURSIZE=512 41 | 42 | nop = 240 43 | s1 = 4000 44 | go = 1 45 | 46 | -core = 28. 47 | -.. = [core*2048.]-512. 48 | +.. = NEWLOC 49 | 50 | / establish sp and check if running below 51 | / intended origin, if so, copy 52 | -/ program up to 'core' K words. 53 | start: 54 | - nop / DEC boot block standard 55 | - br 1f / " 56 | + nop / DEC boot block standard 57 | + br 1f / " " " " 58 | 1: 59 | - mov $..,sp 60 | + mov $NEWLOC,sp / give ourselves a stack to work with 61 | clr r4 62 | mov sp,r5 63 | - cmp pc,r5 64 | - bhis 2f 65 | - cmp (r4),$407 66 | - bne 1f 67 | - mov $20,r4 68 | -1: 69 | - mov (r4)+,(r5)+ 70 | - cmp r5,$end 71 | - blo 1b 72 | - jmp (sp) 73 | - 74 | -/ Clear core to make things clean, 75 | + mov $OURSIZE\/2,r3 / primary boot size in words 76 | 2: 77 | - clr (r4)+ 78 | - cmp r4,sp 79 | - blo 2b 80 | - 81 | + clr OURSIZE(r5) / clear work area (major & TS/MSCP area) 82 | + mov (r4)+,(r5)+ / move primary boot to just above 83 | + sob r3,2b / the stack 84 | + jmp *$3f / bypass the relocation code 85 | +3: 86 | + 87 | / TK initialization 88 | 89 | mov r0,bdunit / save unit # booted from 90 | @@ -104,10 +90,10 @@ 91 | jsr pc,tkrew 92 | clr r1 93 | mov $2,bc 94 | - jsr pc,tkread /* skip the first two blocks 95 | + jsr pc,tkread / skip the first two blocks 96 | clr r1 97 | mov $1,bc 98 | - jsr pc,tkread /* read the first block 99 | + jsr pc,tkread / read the first block 100 | 101 | / Find out how big boot is 102 | mov *$2,r0 / text segment size 103 | -------------------------------------------------------------------------------- /195/211bsd-195.expect: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/expect 2 | 3 | # expect script for 2.11p195 install. Newer versions need a diffferent script. 4 | 5 | set tsprompt ": " 6 | set disk "ra" 7 | set part "g" 8 | set name "${disk}0${part}" 9 | 10 | set timeout 500 11 | 12 | spawn pdp11 211bsd-195.ini 13 | 14 | expect "sim> " {send "boot tq0\r"} 15 | 16 | # create root file system 17 | expect "$tsprompt" {send "tms(0,1)\r"} 18 | expect "file system: " {send "${disk}(0,0)\r"} 19 | # This is in 1k blocks, disktab is in 512 blocks, so it is pa / 2 20 | expect "file sys size: " {send "7942\r"} 21 | expect "interleaving factor (m; 5 default): " {send "\r"} 22 | expect "interleaving modulus (n; 100 default): " {send "\r"} 23 | 24 | # Restore root filesystem from file 4 25 | expect "$tsprompt" {send "tms(0,2)\r"} 26 | expect "Tape? " {send "tms(0,4)\r"} 27 | expect "Disk? " {send "${disk}(0,0)\r"} 28 | expect "Last chance before scribbling on disk. " {send "\r"} 29 | 30 | # Boot unix and configure 31 | expect "$tsprompt" {send "${disk}(0,0)unix\r"} 32 | # install boot loader 33 | expect "# " {send "dd if=/mdec/rauboot of=/dev/ra0a count=1\r"} 34 | # Fix mt dev nodes to match the ts drive we have 35 | expect "# " {send "cd /dev\r"} 36 | expect "# " {send "rm *mt*\r"} 37 | expect "# " {send "./MAKEDEV tu0\r"} 38 | expect "# " {send "sync\r"} 39 | expect "# " {send "cd /\r"} 40 | # newfs /usr 41 | expect "# " {send "newfs ${name} rd54\r"} 42 | expect "# " {send "mount /dev/${name} /usr\r"} 43 | expect "# " {send "cd /usr\r"} 44 | expect "# " {send "mt -f /dev/rmt12 rew\r"} 45 | expect "# " {send "mt -f /dev/rmt12 fsf 5\r"} 46 | expect "# " {send "echo extracting /usr\r"} 47 | expect "# " {send "tar xpbf 20 /dev/rmt12\r"} 48 | # fixup permissions before extracting src tarballs 49 | expect "# " {send "cd /\r"} 50 | expect "# " {send "rm -f sys\r"} 51 | expect "# " {send "ln -s usr/src/sys sys\r"} 52 | expect "# " {send "cd /usr\r"} 53 | expect "# " {send "mkdir src\r"} 54 | expect "# " {send "cd src\r"} 55 | # Extract /usr/src/{include,sys} 56 | expect "# " {send "echo extracting /usr/src/{sys,include}\r"} 57 | expect "# " {send "mt -f /dev/rmt12 rew\r"} 58 | expect "# " {send "mt -f /dev/rmt12 fsf 6\r"} 59 | expect "# " {send "tar xpbf 20 /dev/rmt12\r"} 60 | expect "# " {send "mt -f /dev/rmt12 rew\r"} 61 | expect "# " {send "mt -f /dev/rmt12 fsf 7\r"} 62 | # Extracting the rest of /us/rsrc 63 | expect "# " {send "echo extracting /usr/src\r"} 64 | expect "# " {send "tar xpbf 20 /dev/rmt12\r"} 65 | # Sendmail hangs on boot, turn it off... 66 | expect "# " {send "mv /usr/lib/sendmail /usr/lib/sendmail.off\r"} 67 | # Fix some more permissions 68 | expect "# " {send "chmod 755 / /usr /usr/src /usr/src/sys\r"} 69 | # Add /usr to fstab 70 | expect "# " {send "echo /dev/${name}:/usr:rw:1:2 >> /etc/fstab\r"} 71 | expect "# " {send "\r"} 72 | # OK, build and install the SMS kernel 73 | expect "# " {send "cd /sys/SMS && make clean && make && make install\r"} 74 | # And we're done... 75 | expect "# " {send "sync\r"} 76 | expect "# " {send "sync\r"} 77 | expect "# " {send "sync\r"} 78 | expect "# " {send "halt\r"} 79 | expect "sim> " {send "quit\r"} 80 | -------------------------------------------------------------------------------- /hints/173.ranlib.diff: -------------------------------------------------------------------------------- 1 | --- /usr/src/usr.bin/ranlib.c- 1987-03-11 20:41:22.000000000 -0700 2 | +++ /usr/src/usr.bin/ranlib.c 2020-07-14 05:38:03.523560000 -0600 3 | @@ -19,11 +19,17 @@ 4 | char tempnm[] = "__.SYMDEF"; 5 | char firstname[17]; 6 | long offdelta; 7 | +long arsize; 8 | +long atol(); 9 | +#define OARMAG 0177545 10 | 11 | main(argc, argv) 12 | char **argv; 13 | { 14 | char buf[256]; 15 | + /* magbuf must be an int array so it is aligned on an int-ish 16 | + boundary, so that we may access its first word as an int! */ 17 | + int magbuf[(SARMAG+sizeof(int))/sizeof(int)]; 18 | 19 | --argc; 20 | while(argc--) { 21 | @@ -32,13 +38,17 @@ 22 | fprintf(stderr, "nm: cannot open %s\n", *argv); 23 | continue; 24 | } 25 | - off = sizeof(exp.a_magic); 26 | - fread((char *)&exp, 1, sizeof(MAGIC), fi); /* get magic no. */ 27 | - if (MAGIC != ARMAG) 28 | - { fprintf(stderr, "not archive: %s\n", *argv); 29 | + off = SARMAG; 30 | + fread((char *)magbuf, 1, SARMAG, fi); 31 | + if (strncmp((char *)magbuf, ARMAG, SARMAG)) { 32 | + if (magbuf[0] == OARMAG) 33 | + fprintf(stderr, "old format "); 34 | + else 35 | + fprintf(stderr, "not an "); 36 | + fprintf(stderr, "archive: %s\n", *argv); 37 | continue; 38 | } 39 | - fseek(fi, 0L, 0); 40 | + fseek(fi, (long)SARMAG, 0); 41 | new = tnum = 0; 42 | if(nextel(fi) == 0) 43 | { fclose(fi); 44 | @@ -102,15 +112,20 @@ 45 | FILE *af; 46 | { 47 | register r; 48 | + char *cp; 49 | 50 | oldoff = off; 51 | fseek(af, off, 0); 52 | r = fread((char *)&arp, 1, sizeof(struct ar_hdr), af); /* read archive header */ 53 | if (r <= 0) 54 | return(0); 55 | - if (arp.ar_size & 1) 56 | - ++arp.ar_size; 57 | - off = ftell(af) + arp.ar_size; /* offset to next element */ 58 | + for (cp=arp.ar_name; cp < & arp.ar_name[sizeof(arp.ar_name)]; cp++) 59 | + if (*cp == ' ') 60 | + *cp = '\0'; 61 | + arsize = atol(arp.ar_size); 62 | + if (arsize & 1) 63 | + ++arsize; 64 | + off = ftell(af) + arsize; /* offset to next element */ 65 | return(1); 66 | } 67 | 68 | @@ -129,15 +144,15 @@ 69 | fixsize() 70 | { int i; 71 | offdelta = tnum * sizeof(struct tab) + sizeof(arp); 72 | - off = sizeof(MAGIC); 73 | + off = SARMAG; 74 | nextel(fi); 75 | - if(strncmp(arp.ar_name, tempnm, 14) == 0) 76 | + if(strncmp(arp.ar_name, tempnm, sizeof(arp.ar_name)) == 0) 77 | { new = 0; 78 | - offdelta -= sizeof(arp) + arp.ar_size; 79 | + offdelta -= sizeof(arp) + arsize; 80 | } 81 | else 82 | { new = 1; 83 | - strncpy(firstname, arp.ar_name, 14); 84 | + strncpy(firstname, arp.ar_name, sizeof(arp.ar_name)); 85 | } 86 | for(i=0; i " {send "boot ts0\r"} 31 | 32 | # create root file system 33 | expect "$tsprompt" {send "ts(0,1)\r"} 34 | expect "file system: " {send "${disk}(0,0)\r"} 35 | # This is in 1k blocks, disktab is in 512 blocks, so it is pa / 2 36 | expect "file sys size: " {send "7942\r"} 37 | expect "interleaving factor (m; 5 default): " {send "\r"} 38 | expect "interleaving modulus (n; 100 default): " {send "\r"} 39 | 40 | # Restore root filesystem from file 4 41 | expect "$tsprompt" {send "ts(0,2)\r"} 42 | expect "Tape? " {send "ts(0,4)\r"} 43 | expect "Disk? " {send "${disk}(0,0)\r"} 44 | expect "Last chance before scribbling on disk. " {send "\r"} 45 | 46 | # Boot unix and configure 47 | expect "$tsprompt" {send "${disk}(0,0)unix\r"} 48 | # Set the time, toy clock isn't working yet: April 10, 1991 at 11:12am 49 | expect "# " {send "date 9104101112\r"} 50 | # install boot loader 51 | expect "# " {send "dd if=/mdec/rauboot of=/dev/ra0a count=1\r"} 52 | # Fix mt dev nodes to match the ts drive we have 53 | expect "# " {send "cd /dev\r"} 54 | expect "# " {send "rm *mt*\r"} 55 | expect "# " {send "sh ./MAKEDEV ts0\r"} 56 | expect "# " {send "sync\r"} 57 | expect "# " {send "cd /\r"} 58 | # newfs /usr 59 | expect "# " {send "newfs ${name} rd54-rqdx3 93\r"} 60 | expect "# " {send "mount /dev/${name} /usr\r"} 61 | expect "# " {send "cd /usr\r"} 62 | expect "# " {send "mt -f /dev/rmt12 rew\r"} 63 | expect "# " {send "mt -f /dev/rmt12 fsf 5\r"} 64 | expect "# " {send "echo extracting /usr\r"} 65 | expect "# " {send "tar xpbf 20 /dev/rmt12\r"} 66 | # fixup permissions before extracting src tarballs 67 | expect "# " {send "cd /\r"} 68 | expect "# " {send "rm -f sys\r"} 69 | expect "# " {send "ln -s usr/src/sys sys\r"} 70 | expect "# " {send "cd /usr\r"} 71 | expect "# " {send "mkdir src\r"} 72 | expect "# " {send "cd src\r"} 73 | # Extract /usr/src/{include,sys} 74 | expect "# " {send "echo extracting /usr/src/{sys,include}\r"} 75 | expect "# " {send "mt -f /dev/rmt12 rew\r"} 76 | expect "# " {send "mt -f /dev/rmt12 fsf 6\r"} 77 | expect "# " {send "tar xpbf 20 /dev/rmt12\r"} 78 | expect "# " {send "mt -f /dev/rmt12 rew\r"} 79 | expect "# " {send "mt -f /dev/rmt12 fsf 7\r"} 80 | # Extracting the rest of /us/rsrc 81 | expect "# " {send "echo extracting /usr/src\r"} 82 | expect "# " {send "\005"} 83 | expect "sim> " {send "ATTACH TS0 ./211bsd-pl0-tape2.tap\r"} 84 | expect "sim> " {send "cont\r"} 85 | hitreturn "# " 86 | send "\r" 87 | expect "# " {send "mt -f /dev/rmt12 status\r"} 88 | expect "# " {send "mt -f /dev/rmt12 rew\r"} 89 | expect "# " {send "tar xpbf 20 /dev/rmt12\r"} 90 | # Fix some more permissions 91 | expect "# " {send "chmod 755 / /usr /usr/src /usr/src/sys\r"} 92 | # Add /usr to fstab 93 | expect "# " {send "echo /dev/${name}:/usr:rw:1:2 >> /etc/fstab\r"} 94 | expect "# " {send "\r"} 95 | expect "# " {send "echo Done test installing 2.11BSD pl 0....\r"} 96 | # And we're done... 97 | expect "# " {send "sync\r"} 98 | expect "# " {send "sync\r"} 99 | expect "# " {send "sync\r"} 100 | expect "# " {send "halt\r"} 101 | expect "sim> " {send "quit\r"} 102 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 2.11BSD Recovery Project 2 | 3 | Almost all of the BSD releases survive to the present. Except one major on: 2.11BSD. 4 | 5 | But wait, 2.11BSD is everywhere today. That's true. But it's 2.11BSD pl 470 or 6 | some other patched version. The original release has been lost in the sands of 7 | time. We have all the patches? what gives? 8 | 9 | Why? Well, the 2BSD series was released for the PDP-11. It only ran on the 10 | PDP-11 (until modern times when RetroBSD used it to run on MIPS-based PIC 11 | microcontrollers). The PDP-11 were low-end mini computers once the VAX were 12 | released. They had very little disk space, and tapes were expensive. This meant 13 | that tapes were reused, and disk contents were pruned often. Adding to the 14 | confusion is that the 2.11BSD tapes were expensive when originally released. One 15 | needed to but an AT&T Unix license, which was hundreds of dollars. 16 | 17 | So, these factors have conspired to mena that 2.11BSD pl 195 is the earliest 18 | surviving 2.11BSD. We have 2.10BSD and 2.10.1BSD, but nothing until the 19 | 2.11BSDpl195. A big reason for this is that in the 160s or so in the patch 20 | stream the compiler was modernized and nobody wanted the older version because 21 | the amount of software that could be compiled was diminishing year by year. 22 | 23 | So the goal is to recreate a git repo with all the patches from 2.11BSD as 24 | released (or as close as we can get) to 2.11BSD pl 470 (or whatever the latest 25 | is). It would be nice to produce boot tapes for 2.11BSD as released, even if 26 | they are a bit speculative in places (more on that later) 27 | 28 | ## Why? 29 | 30 | But can't you run the patches backwards? We have them all? Why is this project 31 | even needed? 32 | 33 | Good question. The "patches" in the 2.11BSD series weren't modern unified diffs 34 | that retained all the info, even when deleting files. Oftne times, they were 35 | shell scripts that removed the files. Or did other things that destroyed 36 | information. Destroyed information is impossible to recover, so it's hopeless. 37 | 38 | ## But is it? 39 | 40 | Well, to get a 100% perfect recreation is impossible. But how close can we get? 41 | That's what this project is doing. We know that 95% of the files are the same as 42 | they were in 2.11BSD. We know that many files that were destroyed are the same 43 | as they were in 2.10.1BSD, so we can recover them. Others came from 4.3BSD. Only 44 | a few files need 'restoration' work. 45 | 46 | # Status 47 | 48 | We've worked our way back to 2.11BSD pl 0. Or at least a possible 2.11BSD pl 49 | 0. Now we have to prove it can create a bootable system and all the patches can 50 | apply to it to get back to an identical 2.11BSD pl 195 we have. Work is underway 51 | to roll things forward in an automated way (starting with 2.11BSD pl 195 and 52 | clawing our way back to 2.11BSD pl 0, rebuilding pl 0 and then moving forward). 53 | 54 | Wait, why use 2.11BSD pl 195. Can't you use the latest? There's plenty of 55 | distributions because of the PiDP-11... 56 | 57 | Well. no. 2.11BSD represented a rather eclectic collection of improvements and 58 | old-school binary compatibility. A lot of the comatibility was removed from the 59 | system (both use as well as support) to slim the system down. As a result, 60 | latter-day kernels can't run earlier binaries. So we have to install 2.11BSD pl195. 61 | This is a challenge because the 2.11 instructions for doing this are hard to come 62 | by (but at least possible). And this pre-dates disk labels, so you have to learn 63 | about old-school partitioning schemes. 64 | 65 | So why not 2.10.1BSD? That might be possible, but is tricky: the system call 66 | interface changed radically betweent 2.10.1BSD and 2.11BSD, so initital attempts 67 | have hit roadblocks since a number of tool-chain components also changed formats. 68 | 69 | So there' sa lot ot do still to prove this out, and I need to write the paper to 70 | go along with it. 71 | 72 | -------------------------------------------------------------------------------- /hints/175.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 175 copies a bunch of files from /usr/include to /usr/src/include, but as far as we know 4 | # only patch 158 gets them out of sync. And only for: 5 | # /usr/include/arpa/inet.h 6 | # /usr/include/arpa/nameser.h 7 | # /usr/include/netdb.h 8 | # /usr/include/ndbm.h 9 | # /usr/include/setjmp.h 10 | # /usr/include/syscall.h 11 | # so, if we 2.11BSD shipped with them in sync, that means all we need to do is reach over 12 | # into patch 158, snag those patches and apply them to the /usr/src/include versions 13 | # of those files. All other earlier patches touch both copies, and both 2.10BSD and 14 | # 2.10.1BSD shipped with them in sync. Apply Occam's Razor. 15 | # 16 | # Except there's evidence to suggest that it's more complicated than that, and there 17 | # were bugs post 2.10.1 pre 2.11 that might account for the long list. 18 | # 19 | # The patch trough the line 20 | # X*** /usr/include/Makefile.old Sun May 27 00:45:47 1990 21 | # is all we need to grab, massage and reverse apply. It's easier to grab the whole patch, 22 | # then delete the last bits once we unpack it as part of the massage. 23 | # 24 | 25 | # Note: have to fix the generated patches from 158, so moved to 175.fixup so 26 | # it can evolve as new data comes to light. The number of compressed patches 27 | # in the chain makes it harder to know for sure 'this is it'. The list 28 | # is unusually long and may just be the result of find (eg, I can find no 29 | # evidence of pascal/unixio.h being changed in either the patch train or in 30 | # the 1989 or 1990 comp.bugs.2bsd archive). 31 | cd $ROOT211 32 | patch -V none -R -p1 < $HINTSDIR/175.fixup 33 | from2.10.1 usr/src/include/short_names.h 34 | # 35 | # Here's the full list. 36 | # 37 | # cp -p /usr/include/pascal/unixio.h /usr/src/include/pascal/unixio.h 38 | # cp -p /usr/include/protocols/dumprestor.h /usr/src/include/protocols/dumprestor.h 39 | # cp -p /usr/include/protocols/routed.h /usr/src/include/protocols/routed.h 40 | # cp -p /usr/include/protocols/rwhod.h /usr/src/include/protocols/rwhod.h 41 | # cp -p /usr/include/protocols/talkd.h /usr/src/include/protocols/talkd.h 42 | # cp -p /usr/include/protocols/timed.h /usr/src/include/protocols/timed.h 43 | # cp -p /usr/include/arpa/ftp.h /usr/src/include/arpa/ftp.h 44 | # cp -p /usr/include/arpa/inet.h /usr/src/include/arpa/inet.h 45 | # cp -p /usr/include/arpa/nameser.h /usr/src/include/arpa/nameser.h 46 | # cp -p /usr/include/arpa/telnet.h /usr/src/include/arpa/telnet.h 47 | # cp -p /usr/include/arpa/tftp.h /usr/src/include/arpa/tftp.h 48 | # cp -p /usr/include/a.out.h /usr/src/include/a.out.h 49 | # cp -p /usr/include/ar.h /usr/src/include/ar.h 50 | # cp -p /usr/include/assert.h /usr/src/include/assert.h 51 | # cp -p /usr/include/ctype.h /usr/src/include/ctype.h 52 | # cp -p /usr/include/curses.h /usr/src/include/curses.h 53 | # cp -p /usr/include/dbm.h /usr/src/include/dbm.h 54 | # cp -p /usr/include/OLD/dk.h /usr/src/include/OLD/dk.h 55 | # cp -p /usr/include/OLD/psout.h /usr/src/include/OLD/psout.h 56 | # cp -p /usr/include/disktab.h /usr/src/include/disktab.h 57 | # cp -p /usr/include/errno.h /usr/src/include/errno.h 58 | # cp -p /usr/include/fcntl.h /usr/src/include/fcntl.h 59 | # cp -p /usr/include/frame.h /usr/src/include/frame.h 60 | # cp -p /usr/include/fstab.h /usr/src/include/fstab.h 61 | # cp -p /usr/include/grp.h /usr/src/include/grp.h 62 | # cp -p /usr/include/lastlog.h /usr/src/include/lastlog.h 63 | # cp -p /usr/include/math.h /usr/src/include/math.h 64 | # cp -p /usr/include/memory.h /usr/src/include/memory.h 65 | # cp -p /usr/include/mp.h /usr/src/include/mp.h 66 | # cp -p /usr/include/mtab.h /usr/src/include/mtab.h 67 | # cp -p /usr/include/ndbm.h /usr/src/include/ndbm.h 68 | # cp -p /usr/include/netdb.h /usr/src/include/netdb.h 69 | # cp -p /usr/include/nlist.h /usr/src/include/nlist.h 70 | # cp -p /usr/include/paths.h /usr/src/include/paths.h 71 | # cp -p /usr/include/pcc.h /usr/src/include/pcc.h 72 | # cp -p /usr/include/pwd.h /usr/src/include/pwd.h 73 | # cp -p /usr/include/sgtty.h /usr/src/include/sgtty.h 74 | # cp -p /usr/include/ranlib.h /usr/src/include/ranlib.h 75 | # cp -p /usr/include/regexp.h /usr/src/include/regexp.h 76 | # cp -p /usr/include/resolv.h /usr/src/include/resolv.h 77 | # cp -p /usr/include/vmf.h /usr/src/include/vmf.h 78 | # cp -p /usr/include/setjmp.h /usr/src/include/setjmp.h 79 | # cp -p /usr/include/signal.h /usr/src/include/signal.h 80 | # cp -p /usr/include/stab.h /usr/src/include/stab.h 81 | # cp -p /usr/include/stdio.h /usr/src/include/stdio.h 82 | # cp -p /usr/include/string.h /usr/src/include/string.h 83 | # cp -p /usr/include/strings.h /usr/src/include/strings.h 84 | # cp -p /usr/include/struct.h /usr/src/include/struct.h 85 | # cp -p /usr/include/syscall.h /usr/src/include/syscall.h 86 | # cp -p /usr/include/sysexits.h /usr/src/include/sysexits.h 87 | # cp -p /usr/include/syslog.h /usr/src/include/syslog.h 88 | # cp -p /usr/include/time.h /usr/src/include/time.h 89 | # cp -p /usr/include/ttyent.h /usr/src/include/ttyent.h 90 | # cp -p /usr/include/tzfile.h /usr/src/include/tzfile.h 91 | # cp -p /usr/include/utmp.h /usr/src/include/utmp.h 92 | # cp -p /usr/include/varargs.h /usr/src/include/varargs.h 93 | # cp -p /usr/include/vfont.h /usr/src/include/vfont.h 94 | -------------------------------------------------------------------------------- /2.11BSD-ANNOUNCE: -------------------------------------------------------------------------------- 1 | ath: gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!caen!sdd.hp.com!elroy.jpl.nasa.gov!mahendo!wlbr!news 2 | From: s...@wlv.imsd.contel.com (Steven M. Schultz) 3 | Newsgroups: comp.sys.dec.micro 4 | Subject: 2.11BSD Release Announcement 5 | Message-ID: <1991Mar14.073117.24966@wlbr.imsd.contel.com> 6 | Date: 14 Mar 91 07:31:17 GMT 7 | Sender: n...@wlbr.imsd.contel.com (news) 8 | Organization: Contel Federal Systems 9 | Lines: 114 10 | Nntp-Posting-Host: wlv.imsd.contel.com 11 | 12 | 13 | I know there was a discussion a while back about whether 11/73s 14 | (93s, 83s, 53s) were "dec.micro" or not. My (non-ECC;-) memory recalls 15 | that they are, so i'm posting this announcement here as well as 16 | comp.bugs.2bsd (the front panel of my 11/73 says Micro-Pdp on it 17 | after all). 18 | 19 | Steven M. Schultz 20 | s...@wlv.imsd.contel.com 21 | --------------------------------------------------------------------------- 22 | Second Distribution of Berkeley PDP-11 Software for UNIX 23 | Release 2.11 24 | (Revised January 1991) 25 | 26 | 27 | The USENIX Association is pleased to announce the distribution of 28 | a new release of the "Second Berkeley Software Distribution" 29 | (2.11BSD). 30 | 31 | This release will be handled by USENIX, and is available to all 32 | V7, System III, System V, and 2.9BSD licensees. The Association will 33 | continue to maintain the non-profit price of $200. The release will 34 | consist of two 2400 ft. 1600 bpi tapes or one TK50 tape cartridge 35 | (approximately 80M) and approximately 100 pages of documentation. 36 | 37 | If you have questions about the distribution of the release, or 38 | require 800 bpi tapes, please contact USENIX. USENIX's address and 39 | phone number is as follows: 40 | 41 | 2.11BSD 42 | USENIX Association 43 | 2560 Ninth St. Suite 215 44 | Berkeley, CA 94710 45 | +1-415-528-8649 46 | 47 | USENIX may also be contacted by electronic mail at: 48 | 49 | {ucbvax,decvax}!usenix!office 50 | 51 | If you have technical questions about the release, please contact 52 | Steven M. Schultz at: 53 | 54 | s...@wlv.imsd.contel.com 55 | wlbr!wlv!sms 56 | 57 | This release is in celebration of the 20th anniversary of the 58 | PDP-11! Work has been ongoing since the release of 2.10.1BSD in Janu- 59 | ary 1989. This release incorporates all fixes and changes posted to 60 | the USENET newsgroup comp.bugs.2bsd since 2.10.1BSD was released. 61 | 62 | Present in this release are several more missing pieces from the 63 | 4.3BSD distribution: 64 | 65 | o 1) the kernel logger (/dev/klog) 66 | 67 | o 2) the namei cache and argument encapsulation calling 68 | sequence 69 | 70 | o 3) readv(2)/writev(2) as system calls rather than 71 | emulation/compatibility routines 72 | 73 | o 4) shadow password file implementation (the May 1989 4.3BSD 74 | update) 75 | 76 | o 5) a TMSCP (TK50/TU81) driver with standalone support (boot- 77 | block and standalone driver) 78 | 79 | o 6) Pronet and LH/DH IMP networking support 80 | 81 | o 7) the portable ascii archive file format (ar, ranlib) 82 | 83 | o 8) the Unibus Mapping Register (UMR) handling of the network 84 | was rewritten to avoid allocating excessive UMRs. 85 | 86 | o 9) the necessary mods to the IP portion of the networking 87 | were made to allow traceroute (which is present in 2.11BSD) 88 | to run 89 | 90 | o 10) long filenames in the file system 91 | 92 | This last addition is the reason a coldstart kit is necessary. 93 | The 4.3BSD on-disk directory structure has been ported (along with the 94 | utilities that know about on-disk directories via the raw filesystem: 95 | fsck, ncheck, icheck, dcheck, etc.) and is not compatible with previ- 96 | ous versions of UNIX for the PDP-11. 97 | 98 | A limited amount of filesystem backward compatibility with ear- 99 | lier versions of 2BSD (2.9BSD, 2.10BSD and 2.10.1BSD) is present in a 100 | version of dump(8) which can read old filesystems. The disk partition 101 | sizes have not changed from 2.10.1BSD (the urge to standardize the 102 | haphazard partition sizes was suppressed in the interest of backwards 103 | compatibility). The restor(8) utility automatically converts old dump 104 | tapes to the new format on input. 105 | 106 | The constant MAXNAMLEN is now 63 instead of 14. While it is pos- 107 | sible the limit could be higher, with MAXPATHLEN at 256 a MAXNAMLEN of 108 | 63 was judged sufficient. 109 | 110 | MANY other fixes and changes have also been made, see the 111 | ``Changes To The Kernel'' document which describes the changes made to 112 | both the kernel and the application programs. 113 | 114 | 115 | Steven M. Schultz 116 | Contel Federal Systems 117 | 31717 La Tienda Drive 118 | Westlake Village CA 91359 119 | s...@wlv.imsd.contel.com 120 | wlbr!wlv!sms 121 | _________________________ 122 | 123 | DEC, PDP, Unibus and VAX are trademarks of Digital Equipment Corporation 124 | 125 | UNIX is a trademark of Bell Laboratories 126 | -------------------------------------------------------------------------------- /hints/160.ld.diff: -------------------------------------------------------------------------------- 1 | --- /usr/src/bin/ld.c+ 1988-08-14 02:09:04.000000000 -0600 2 | +++ /usr/src/bin/ld.c 2020-06-24 20:42:07.847200000 -0600 3 | @@ -254,6 +254,7 @@ 4 | long ladd(); 5 | int delexit(); 6 | long lseek(); 7 | +long atol(); 8 | char *savestr(); 9 | char *malloc(); 10 | char *mktemp(); 11 | @@ -542,9 +543,10 @@ 12 | case 1: 13 | error(-1, 14 | "warning: archive has no table of contents; add one using ranlib(1)"); 15 | - nloc = 1; 16 | + nloc = SARMAG >> 1; 17 | while (step(nloc)) 18 | - nloc += (archdr.ar_size + sizeof(archdr) + 1) >> 1; 19 | + nloc += (sizeof(archdr) + 20 | + atol(archdr.ar_size) + 1) >> 1; 21 | break; 22 | 23 | /* 24 | @@ -555,17 +557,16 @@ 25 | * when there is a table of contents!) 26 | */ 27 | case 2: 28 | - tnum = archdr.ar_size / sizeof(struct tab); 29 | + tnum = atol(archdr.ar_size) / sizeof(struct tab); 30 | if (tnum >= TABSZ) 31 | error(1, "toc buffer too small"); 32 | - lseek(infil, (long)(sizeof(filhdr.a_magic) + sizeof(archdr)), 0); 33 | + lseek(infil, (long)(SARMAG + sizeof(archdr)), 0); 34 | read(infil, (char *)tab, tnum * sizeof(struct tab)); 35 | while (ldrand()) 36 | - ; 37 | + continue; 38 | libp->loc = -1; 39 | libp++; 40 | break; 41 | - 42 | /* 43 | * Table of contents is out of date, so search 44 | * as a normal library (but skip the __.SYMDEF file). 45 | @@ -573,9 +574,10 @@ 46 | case 3: 47 | error(-1, 48 | "warning: table of contents for archive is out of date; rerun ranlib(1)"); 49 | - for (nloc = 1 + ((archdr.ar_size + sizeof(archdr) + 1) >> 1); 50 | - step(nloc); 51 | - nloc += (archdr.ar_size + sizeof(archdr) + 1) >> 1); 52 | + nloc = SARMAG >> 1; 53 | + do 54 | + nloc += (sizeof(archdr) + atol(archdr.ar_size)) >> 1; 55 | + while (step(nloc)); 56 | break; 57 | } 58 | close(infil); 59 | @@ -913,7 +915,7 @@ 60 | } else { /* scan archive members referenced */ 61 | for (lp = libp; lp->loc != -1; lp++) { 62 | dseek(&text, lp->loc, sizeof archdr); 63 | - mget((int *)&archdr, sizeof archdr); 64 | + getarhdr(); 65 | mkfsym(archdr.ar_name); 66 | load2(lp->loc + (sizeof archdr) / 2); 67 | } 68 | @@ -1091,7 +1093,8 @@ 69 | { 70 | register u_int n, *p; 71 | register SYMBOL *sp, *symp; 72 | - 73 | + long before, after; 74 | + 75 | if (numov) { 76 | /* int aovno = adrof("__ovno"); XXX KB */ 77 | int aovhndlr[NOVL+1]; 78 | @@ -1127,6 +1130,9 @@ 79 | copy(&troutb); 80 | copy(&droutb); 81 | } 82 | + 83 | + flush(&toutb); 84 | + before = lseek(toutb.fildes , 0L, 1); 85 | if (sflag==0) { 86 | if (xflag==0) 87 | copy(&soutb); 88 | @@ -1146,7 +1152,27 @@ 89 | p++; 90 | } 91 | } 92 | +/* 93 | + * the following is a workaround ("kludge") to insure that the 94 | + * correct size of the symbol table is written to the header. this 95 | + * was occasioned by noticing that the value of a_syms for /unix showed 96 | + * 0115200 (39552) instead of 0115544 (39780). somewhere 19 symbols were 97 | + * not being counted - (oh where oh where have the symbols gone...?;-)) 98 | + * but they were being written out! Granted, it is not proper to 99 | + * treat the symptom instead of the problem, but this works, and if you 100 | + * fix it for real i'd like a copy of ld.c - Steven M. Schultz 101 | + * 102 | + * I really think this should be calculated anyhow, makes as much sense 103 | + * as trying to maintain counts everywhere else. 104 | +*/ 105 | + 106 | flush(&toutb); 107 | + after = lseek(toutb.fildes, 0L, 1); 108 | + lseek(toutb.fildes, 0L, 0); 109 | + read(toutb.fildes, &filhdr, sizeof (filhdr)); 110 | + filhdr.a_syms = after - before; 111 | + lseek(toutb.fildes, 0L, 0); 112 | + write(toutb.fildes, &filhdr, sizeof (filhdr)); 113 | close(toutb.fildes); 114 | if (!ofilfnd) { 115 | unlink("a.out"); 116 | @@ -1171,6 +1197,18 @@ 117 | 118 | } 119 | 120 | +getarhdr() 121 | +{ 122 | + register char *cp; 123 | + 124 | + mget((char *)&archdr, sizeof archdr); 125 | + for (cp=archdr.ar_name; cp<&archdr.ar_name[sizeof(archdr.ar_name)];) 126 | + if (*cp++ == ' ') { 127 | + cp[-1] = 0; 128 | + return; 129 | + } 130 | +} 131 | + 132 | mget(aloc, an) 133 | int *aloc; 134 | { 135 | @@ -1251,6 +1289,7 @@ 136 | getfile(acp) 137 | char *acp; 138 | { 139 | + char arcmag[SARMAG+1]; 140 | struct stat stb; 141 | 142 | archdr.ar_name[0] = '\0'; 143 | @@ -1266,18 +1305,20 @@ 144 | page[0].nuser = page[1].nuser = 0; 145 | text.pno = reloc.pno = (PAGE *)&fpage; 146 | fpage.nuser = 2; 147 | - dseek(&text, 0L, 2); 148 | + dseek(&text, 0L, SARMAG); 149 | if (text.size <= 0) 150 | error(1, "premature EOF"); 151 | - if (get(&text) != ARMAG) 152 | - return (0); /* regular file */ 153 | - dseek(&text, 1L, sizeof archdr); /* word addressing */ 154 | + mget((char *)arcmag, SARMAG); 155 | + arcmag[SARMAG] = 0; 156 | + if (strcmp(arcmag, ARMAG)) 157 | + return (0); 158 | + dseek(&text, (long)SARMAG>>1, sizeof archdr); /* word addressing */ 159 | if (text.size <= 0) 160 | - return (1); /* regular archive */ 161 | - mget((int *)&archdr, sizeof archdr); 162 | + return (1); 163 | + getarhdr(); 164 | if (strncmp(archdr.ar_name, "__.SYMDEF", sizeof(archdr.ar_name)) != 0) 165 | - return (1); /* regular archive */ 166 | - return (stb.st_mtime > archdr.ar_date ? 3 : 2); 167 | + return (1); 168 | + return (stb.st_mtime > atol(archdr.ar_date) ? 3 : 2); 169 | } 170 | 171 | /* 172 | -------------------------------------------------------------------------------- /paper.md: -------------------------------------------------------------------------------- 1 | # 2.11BSD patch level 0 Recovery Project 2 | 3 | According to https://www.krsaborio.net/bsd/research/1991/0314.htm 2.11BSD was 4 | released on March 14, 1991 to celebtrate the 20th anniversary of the PDP-11 5 | computer. It was quickly followed by a series of patches. Sadly, the original 6 | tapes for 2.11BSD have been lost. In the run-up to the 30th anniversary of the 7 | release of 2.11BSD, I wanted to recreate 2.11BSD patch 0, the binary images and 8 | a git repo of all the patches it. 2.11BSD was used as the basis for retrobsd 9 | (https://github.com/RetroBSD/retrobsd) and is currently enjoy a resurgence as 10 | various recreation hardware emulate the PDP-11. The earliest tape is from patch 11 | level 195, and many of these 195 patches destroy information since they were 12 | shell scripts rather than modern patches. The challenge has been to recreate as 13 | much information as possible that's been lost and use that to come up with a 14 | plausable set of original sources, ideally buildable; to recreate the original 15 | tapes, to the degree possible at this late date; and to create a complete github 16 | repo for future generations to study. 17 | 18 | ## The Challenge 19 | 20 | 2.11BSD presents a number of challenges to recover the original system. First, 21 | it was a PDP-11 operating system that only ran on the largest PDP-11 22 | systems. Second, it dates from an era where source code control practices were 23 | less robust than today. Third, a number of patches weren't simply files to feed 24 | to patch(1), but rather were instructions of modifications to transition the 25 | system new new patch levels. Forth, sometimes the instructions omitted key steps 26 | that people were evidentially expected to know what to do, but that require 27 | careful research to reconstruct at this late date. Fifth, kernel configs were 28 | inconsistently patched: sometimes the base files to generate the files need to 29 | build the kernel were pathed, other times the generated files were patched 30 | (someitmes in ways that led to conflicts). Finally, a number of small mistakes 31 | were made when the patches were generated, as evidenced by other patches failing 32 | to apply. All these challenges had to be dealt with in order to arrive at a most 33 | likely 2.11BSD system. 34 | 35 | ### Background on PDP-11 36 | 37 | The PDP-11 was introduced in 1970 38 | (https://history-computer.com/ModernComputer/Electronic/PDP-11.html) and started 39 | out life as a minicomputer. It had no MMU and could address 56kB of memory with 40 | an addition 8k for I/O space for devices. Over the years, it was expanded to 18 41 | and then 22 bits with a MMU and later separte I&D space existed to boost the 42 | largest userland address space to 128kB (64kB of instructions and 64kB of 43 | data). It expanded to have a number of different modes apart from Userland and 44 | Kernel. The disks drives expanded from about 5MB for the RK02 that was common on 45 | earlier drives to 3rd party drives late in its life taht could store several 46 | hundred MB. 47 | 48 | As such, space was always an issue. By the time 2.11BSD was released, it could 49 | only run on the largest of these machines featuring split I&D space as well as 50 | requiring SUPERVISOR mode support. A large number of overlays were required to 51 | squeeze the kernel into the constrained address space available. This meant that 52 | the system could only run on: PDP-11/44/53/70/73/83/84/93/94 with 22 bit 53 | addressing, a megabyte and floating point. 54 | 55 | In 1991 when 2.11BSD was released, it was still encumbered software. Caldera's 56 | freeing of ancient unix was still over a decade away, so the number of origial 57 | tapes made by USENIX was relatively small. An image of the tape was almost 58 | 100MB, which was large for the day, so copies weren't saved. 59 | 60 | Also, many of the PDP-11s runing 2.11BSD were connected to the internet via 61 | USENET and ultra slow connections. This lead to many tricks to keep the patches 62 | small. This means that patches weren't unified diffs for everything like current 63 | systems. For example, patch 160 includes the instructions: 64 | 0) Be in a temp directory ("cd /tmp" or "cd /usr/tmp") 65 | 1) Save the following shar archive to a file (/tmp/160 for example) 66 | 2) Unpack the archive: sh 160 67 | 3) Run the script: ./script 68 | 4) Patch the files: patch -p0 < patchfile 69 | 5) rm 160 script patchfile 70 | which doesn't sound too bad, but script contains 71 | #! /bin/sh 72 | rm -f /usr/src/bin/csh/shortnames.h 73 | rm -f /usr/src/bin/ar.c 74 | rm -f /usr/src/bin/ld.c 75 | rm -f /usr/src/bin/adb/dummy.c /usr/src/bin/adb/mac.h 76 | rm -f /usr/src/bin/adb/machine.h /usr/src/bin/adb/mode.h 77 | rm -rf /usr/src/bin/nm rm /usr/src/bin/ld /usr/src/bin/ar 78 | mkdir /usr/src/bin/nm /usr/src/bin/ld /usr/src/bin/ar 79 | hmod 755 /usr/src/bin/nm /usr/src/bin/ld /usr/src/bin/ar 80 | mv /usr/src/bin/nm.c /usr/src/bin/nm/nm.c 81 | cat > /usr/src/bin/nm/Makefile <<'_MAKEFILE_' 82 | ... 83 | chmod 644 /usr/src/bin/nm/Makefile /usr/src/bin/ld/Makefile 84 | which has a stray 'rm,' but more importantly it removes the old copies of all 85 | these files. In modern patches, the unified diff would just remove all the lines 86 | of the file, giving us a record of the old file. This means we have to get 87 | copies of these files somewhere else. 88 | 89 | ### Source Code Control Practices 90 | 91 | 92 | 93 | ### Upgrade by Script 94 | 95 | ### Missing Instructions 96 | 97 | ### Inconsistently Patched Kernels 98 | 99 | ### Errors in the Patches 100 | -------------------------------------------------------------------------------- /hints/175.fixup: -------------------------------------------------------------------------------- 1 | Generated by: 2 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $PATCHDIR/158 | sh 3 | sed -e '/^\*\*\* .*Makefile.old/,$d;s=/usr/include/=/usr/src/include/=' < $TEMP/patchfile > $TEMP/p2 4 | And then tweaked to actually work. 5 | 6 | *** /usr/src/include/arpa/inet.h.old Sun Jun 13 22:50:39 1993 7 | --- /usr/src/include/arpa/inet.h Fri Dec 31 21:53:27 1993 8 | *************** 9 | *** 14,20 **** 10 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 11 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12 | * 13 | ! * @(#)inet.h 5.2.1 (2.11BSD GTE) 6/12/93 14 | */ 15 | 16 | /* 17 | --- 14,20 ---- 18 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 19 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 | * 21 | ! * @(#)inet.h 5.2.2 (2.11BSD GTE) 12/31/93 22 | */ 23 | 24 | /* 25 | *************** 26 | *** 21,30 **** 27 | * External definitions for 28 | * functions in inet(3N) 29 | */ 30 | - #ifdef BSD2_10 31 | - #include /* Hopefully this will go away soon */ 32 | - #endif 33 | 34 | unsigned long inet_addr(); 35 | char *inet_ntoa(); 36 | struct in_addr inet_makeaddr(); 37 | --- 21,27 ---- 38 | *** /usr/src/include/arpa/nameser.h.old Mon Apr 26 19:52:58 1993 39 | --- /usr/src/include/arpa/nameser.h Mon Jan 10 21:25:21 1994 40 | *************** 41 | *** 14,20 **** 42 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 43 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 44 | * 45 | ! * @(#)nameser.h 5.20 (Berkeley) 10/7/88 46 | */ 47 | 48 | /* 49 | --- 14,20 ---- 50 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 51 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 52 | * 53 | ! * @(#)nameser.h 5.20.1 (2.11BSD GTE) 12/31/93 54 | */ 55 | 56 | /* 57 | *************** 58 | *** 127,133 **** 59 | #define BYTE_ORDER BIG_ENDIAN 60 | #endif 61 | #endif /* BYTE_ORDER */ 62 | ! #if defined(pdp11) || defined(BSD2_10) 63 | #define BYTE_ORDER PDP_ENDIAN 64 | #endif 65 | 66 | --- 127,133 ---- 67 | #define BYTE_ORDER BIG_ENDIAN 68 | #endif 69 | #endif /* BYTE_ORDER */ 70 | ! #if defined(pdp11) 71 | #define BYTE_ORDER PDP_ENDIAN 72 | #endif 73 | 74 | *** /usr/src/include/netdb.h.old Thu Jan 5 21:56:27 1989 75 | --- /usr/src/include/netdb.h Mon Jan 10 21:25:47 1994 76 | *************** 77 | *** 9,21 **** 78 | * software without specific prior written permission. This software 79 | * is provided ``as is'' without express or implied warranty. 80 | * 81 | ! * @(#)netdb.h 5.9 (Berkeley) 4/5/88 82 | */ 83 | 84 | - #ifdef BSD2_10 85 | - #include 86 | - #endif 87 | - 88 | /* 89 | * Structures returned by network 90 | * data base library. All addresses 91 | --- 9,17 ---- 92 | * software without specific prior written permission. This software 93 | * is provided ``as is'' without express or implied warranty. 94 | * 95 | ! * @(#)netdb.h 5.9.1 (2.11BSD GTE) 12/31/93 96 | */ 97 | 98 | /* 99 | * Structures returned by network 100 | * data base library. All addresses 101 | *************** 102 | *** 40,50 **** 103 | char *n_name; /* official name of net */ 104 | char **n_aliases; /* alias list */ 105 | int n_addrtype; /* net address type */ 106 | - #ifdef BSD2_10 107 | - long n_net; /* network # */ 108 | - #else 109 | unsigned long n_net; /* network # */ 110 | - #endif 111 | }; 112 | 113 | struct servent { 114 | --- 36,42 ---- 115 | *************** 116 | *** 76,83 **** 117 | #define NO_DATA 4 /* Valid name, no data record of requested type */ 118 | #define NO_ADDRESS NO_DATA /* no address, look for MX record */ 119 | 120 | - #ifdef BSD2_10 121 | - long gethostid(); 122 | - #else 123 | unsigned long gethostid(); 124 | - #endif 125 | --- 68,71 ---- 126 | *** /usr/src/include/ndbm.h.old Thu Jan 5 21:55:54 1989 127 | --- /usr/src/include/ndbm.h Mon Jan 10 21:26:31 1994 128 | *************** 129 | *** 3,9 **** 130 | * All rights reserved. The Berkeley software License Agreement 131 | * specifies the terms and conditions for redistribution. 132 | * 133 | ! * @(#)ndbm.h 5.1 (Berkeley) 5/30/85 134 | */ 135 | 136 | /* 137 | --- 3,9 ---- 138 | * All rights reserved. The Berkeley software License Agreement 139 | * specifies the terms and conditions for redistribution. 140 | * 141 | ! * @(#)ndbm.h 5.1.1 (2.11BSD GTE) 12/31/93 142 | */ 143 | 144 | /* 145 | *************** 146 | *** 10,24 **** 147 | * Hashed key data base library. 148 | */ 149 | #define PBLKSIZ 1024 150 | ! #ifdef BSD2_10 151 | #define DBLKSIZ 512 152 | #else 153 | #define DBLKSIZ 4096 154 | - #endif 155 | - 156 | - #ifdef BSD2_10 157 | - #define dbm_pagbno dbm_bno /* 8 char limit */ 158 | - #define dbm_dirbno dbm_dno 159 | #endif 160 | 161 | typedef struct { 162 | --- 10,19 ---- 163 | * Hashed key data base library. 164 | */ 165 | #define PBLKSIZ 1024 166 | ! #ifdef pdp11 167 | #define DBLKSIZ 512 168 | #else 169 | #define DBLKSIZ 4096 170 | #endif 171 | 172 | typedef struct { 173 | *** /usr/src/include/setjmp.h.old Tue Jan 6 01:36:13 1987 174 | --- /usr/src/include/setjmp.h Fri Dec 31 23:25:52 1993 175 | *************** 176 | *** 1,7 **** 177 | ! /* setjmp.h 4.1 83/05/03 */ 178 | 179 | typedef int jmp_buf[10]; 180 | - 181 | - #ifdef BSD2_10 182 | - #define longjmperror _ljerr 183 | - #endif BSD2_10 184 | --- 1,3 ---- 185 | ! /* setjmp.h 4.1 93/12/31 */ 186 | 187 | typedef int jmp_buf[10]; 188 | *** /usr/src/include/syscall.h.old Mon Mar 15 18:20:43 1993 189 | --- /usr/src/include/syscall.h Mon Jan 10 21:26:51 1994 190 | *************** 191 | *** 3,9 **** 192 | * All rights reserved. The Berkeley software License Agreement 193 | * specifies the terms and conditions for redistribution. 194 | * 195 | ! * @(#)syscall.h 5.4 (Berkeley) 4/3/86 196 | */ 197 | 198 | #define SYS_exit 1 199 | --- 3,9 ---- 200 | * All rights reserved. The Berkeley software License Agreement 201 | * specifies the terms and conditions for redistribution. 202 | * 203 | ! * @(#)syscall.h 5.4.1 (2.11BSD GTE) 12/31/93 204 | */ 205 | 206 | #define SYS_exit 1 207 | *************** 208 | *** 158,164 **** 209 | #define SYS_getsockname 150 210 | 211 | /* 212 | ! * BSD2.11 special calls 213 | */ 214 | /* 151 is unused */ 215 | #define SYS_nostk 152 216 | --- 158,164 ---- 217 | #define SYS_getsockname 150 218 | 219 | /* 220 | ! * 2BSD special calls 221 | */ 222 | /* 151 is unused */ 223 | #define SYS_nostk 152 224 | -------------------------------------------------------------------------------- /patches/42a: -------------------------------------------------------------------------------- 1 | *** /old/src/games/warp/Makefile Tue Jun 5 17:29:53 1990 2 | --- /usr/src/games/warp/Makefile Wed Dec 25 00:08:20 1991 3 | *************** 4 | *** 12,22 **** 5 | # 6 | CC = cc 7 | bin = /usr/games 8 | ! mansrc = /usr/man/man6 9 | ! manext = 6 10 | ! CFLAGS = -O 11 | LDFLAGS = 12 | ! CHOWNER = daemon 13 | privlib = /usr/games/lib/warp 14 | NDIRC = 15 | NDIRO = 16 | --- 12,22 ---- 17 | # 18 | CC = cc 19 | bin = /usr/games 20 | ! mansrc = /tmp 21 | ! manext = 1 22 | ! CFLAGS = -O -O 23 | LDFLAGS = 24 | ! CHOWNER = bin 25 | privlib = /usr/games/lib/warp 26 | NDIRC = 27 | NDIRO = 28 | *************** 29 | *** 148,154 **** 30 | cc sm.c $(SMALL) -o sm 31 | 32 | depend: makedepend 33 | ! makedepend 34 | 35 | clist: 36 | echo $(c) | tr ' ' '\012' >.clist 37 | --- 148,154 ---- 38 | cc sm.c $(SMALL) -o sm 39 | 40 | depend: makedepend 41 | ! ./makedepend 42 | 43 | clist: 44 | echo $(c) | tr ' ' '\012' >.clist 45 | *** /old/src/games/warp/UU/filexp Sat Aug 29 13:49:20 1987 46 | --- /usr/src/games/warp/UU/filexp Tue Dec 24 23:39:58 1991 47 | *************** 48 | *** 2,8 **** 49 | : expand filename 50 | case "$1" in 51 | ~/*|~) 52 | ! echo $1 | sed "s|~|${HOME-$LOGDIR}|" 53 | ;; 54 | ~*) 55 | if /bin/test -f /bin/csh; then 56 | --- 2,8 ---- 57 | : expand filename 58 | case "$1" in 59 | ~/*|~) 60 | ! echo $1 | /bin/sed "s|~|${HOME-$LOGDIR}|" 61 | ;; 62 | ~*) 63 | if /bin/test -f /bin/csh; then 64 | *************** 65 | *** 9,16 **** 66 | /bin/csh -f -c "glob $1" 67 | echo "" 68 | else 69 | ! name=`expr x$1 : '..\([^/]*\)'` 70 | ! dir=`sed -n -e "/^${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'$'"/\1/" -e p -e q -e '}' &2 74 | --- 9,16 ---- 75 | /bin/csh -f -c "glob $1" 76 | echo "" 77 | else 78 | ! name=`/bin/expr x$1 : '..\([^/]*\)'` 79 | ! dir=`/bin/sed -n -e "/^${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'$'"/\1/" -e p -e q -e '}' &2 83 | *************** 84 | *** 18,24 **** 85 | fi 86 | case "$1" in 87 | */*) 88 | ! echo $dir/`expr x$1 : '..[^/]*/\(.*\)'` 89 | ;; 90 | *) 91 | echo $dir 92 | --- 18,24 ---- 93 | fi 94 | case "$1" in 95 | */*) 96 | ! echo $dir/`/bin/expr x$1 : '..[^/]*/\(.*\)'` 97 | ;; 98 | *) 99 | echo $dir 100 | *** /old/src/games/warp/config.sh Sat Aug 29 13:53:14 1987 101 | --- /usr/src/games/warp/config.sh Tue Dec 24 23:43:57 1991 102 | *************** 103 | *** 19,37 **** 104 | uniq 105 | grep 106 | ' 107 | ! expr='expr' 108 | ! sed='sed' 109 | ! echo='echo' 110 | ! cat='cat' 111 | ! rm='rm' 112 | ! mv='mv' 113 | ! cp='cp' 114 | tail='' 115 | ! tr='tr' 116 | ! mkdir='mkdir' 117 | ! sort='sort' 118 | ! uniq='uniq' 119 | ! grep='grep' 120 | trylist=' 121 | test 122 | egrep 123 | --- 19,37 ---- 124 | uniq 125 | grep 126 | ' 127 | ! expr='/bin/expr' 128 | ! sed='/bin/sed' 129 | ! echo='/bin/echo' 130 | ! cat='/bin/cat' 131 | ! rm='/bin/rm' 132 | ! mv='/bin/mv' 133 | ! cp='/bin/cp' 134 | tail='' 135 | ! tr='/usr/bin/tr' 136 | ! mkdir='/bin/mkdir' 137 | ! sort='/bin/sort' 138 | ! uniq='/usr/bin/uniq' 139 | ! grep='/usr/ucb/grep' 140 | trylist=' 141 | test 142 | egrep 143 | *************** 144 | *** 64,70 **** 145 | d_ioctl='define' 146 | d_normsig='define' 147 | jobslib='' 148 | ! d_portable='define' 149 | d_rdchk='/*undef' 150 | d_scorfl='/*undef' 151 | d_sgndchr='define' 152 | --- 64,70 ---- 153 | d_ioctl='define' 154 | d_normsig='define' 155 | jobslib='' 156 | ! d_portable='/*undef' 157 | d_rdchk='/*undef' 158 | d_scorfl='/*undef' 159 | d_sgndchr='define' 160 | *************** 161 | *** 74,86 **** 162 | ndirc='' 163 | ndiro='' 164 | d_whoami='/*undef' 165 | ! hostname='kazoo' 166 | phostname='hostname' 167 | ! mydomain='.uucp' 168 | libc='/lib/libc.a' 169 | libnm='/usr/lib/libtermlib.a' 170 | ! mansrc='/usr/man/man6' 171 | ! manext='6' 172 | models='unsplit split' 173 | split='-i' 174 | small='' 175 | --- 74,86 ---- 176 | ndirc='' 177 | ndiro='' 178 | d_whoami='/*undef' 179 | ! hostname='sms' 180 | phostname='hostname' 181 | ! mydomain='.imsd.contel.com' 182 | libc='/lib/libc.a' 183 | libnm='/usr/lib/libtermlib.a' 184 | ! mansrc='/tmp' 185 | ! manext='1' 186 | models='unsplit split' 187 | split='-i' 188 | small='' 189 | *************** 190 | *** 87,93 **** 191 | medium='' 192 | large='' 193 | huge='' 194 | ! ccflags='' 195 | ldflags='' 196 | n='-n' 197 | c='' 198 | --- 87,93 ---- 199 | medium='' 200 | large='' 201 | huge='' 202 | ! ccflags='-O' 203 | ldflags='' 204 | n='-n' 205 | c='' 206 | *************** 207 | *** 123,128 **** 208 | startsh='#!/bin/sh' 209 | voidflags='7' 210 | bin='/usr/games' 211 | ! chowner='daemon' 212 | privlib='/usr/games/lib/warp' 213 | CONFIG=true 214 | --- 123,128 ---- 215 | startsh='#!/bin/sh' 216 | voidflags='7' 217 | bin='/usr/games' 218 | ! chowner='bin' 219 | privlib='/usr/games/lib/warp' 220 | CONFIG=true 221 | *** /old/src/games/warp/filexp Sat Aug 29 14:49:50 1987 222 | --- /usr/src/games/warp/filexp Tue Dec 24 23:39:59 1991 223 | *************** 224 | *** 2,8 **** 225 | : expand filename 226 | case "$1" in 227 | ~/*|~) 228 | ! echo $1 | sed "s|~|${HOME-$LOGDIR}|" 229 | ;; 230 | ~*) 231 | if /bin/test -f /bin/csh; then 232 | --- 2,8 ---- 233 | : expand filename 234 | case "$1" in 235 | ~/*|~) 236 | ! echo $1 | /bin/sed "s|~|${HOME-$LOGDIR}|" 237 | ;; 238 | ~*) 239 | if /bin/test -f /bin/csh; then 240 | *************** 241 | *** 9,16 **** 242 | /bin/csh -f -c "glob $1" 243 | echo "" 244 | else 245 | ! name=`expr x$1 : '..\([^/]*\)'` 246 | ! dir=`sed -n -e "/^${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'$'"/\1/" -e p -e q -e '}' &2 250 | --- 9,16 ---- 251 | /bin/csh -f -c "glob $1" 252 | echo "" 253 | else 254 | ! name=`/bin/expr x$1 : '..\([^/]*\)'` 255 | ! dir=`/bin/sed -n -e "/^${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'$'"/\1/" -e p -e q -e '}' &2 259 | *************** 260 | *** 18,24 **** 261 | fi 262 | case "$1" in 263 | */*) 264 | ! echo $dir/`expr x$1 : '..[^/]*/\(.*\)'` 265 | ;; 266 | *) 267 | echo $dir 268 | --- 18,24 ---- 269 | fi 270 | case "$1" in 271 | */*) 272 | ! echo $dir/`/bin/expr x$1 : '..[^/]*/\(.*\)'` 273 | ;; 274 | *) 275 | echo $dir 276 | *** /old/src/games/warp/makedepend Sat Aug 29 13:53:39 1987 277 | --- /usr/src/games/warp/makedepend Tue Dec 24 23:44:52 1991 278 | *************** 279 | *** 17,35 **** 280 | 281 | export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh $0; kill $$) 282 | 283 | ! cat='cat' 284 | ! cp='cp' 285 | cpp='cc -E' 286 | ! echo='echo' 287 | egrep='/usr/bin/egrep' 288 | ! expr='expr' 289 | ! mv='mv' 290 | ! rm='rm' 291 | ! sed='sed' 292 | ! sort='sort' 293 | test='/bin/test' 294 | ! tr='tr' 295 | ! uniq='uniq' 296 | 297 | $cat /dev/null >.deptmp 298 | $echo "(Note: this is going to take a while.)" 299 | --- 17,35 ---- 300 | 301 | export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh $0; kill $$) 302 | 303 | ! cat='/bin/cat' 304 | ! cp='/bin/cp' 305 | cpp='cc -E' 306 | ! echo='/bin/echo' 307 | egrep='/usr/bin/egrep' 308 | ! expr='/bin/expr' 309 | ! mv='/bin/mv' 310 | ! rm='/bin/rm' 311 | ! sed='/bin/sed' 312 | ! sort='/bin/sort' 313 | test='/bin/test' 314 | ! tr='/usr/bin/tr' 315 | ! uniq='/usr/bin/uniq' 316 | 317 | $cat /dev/null >.deptmp 318 | $echo "(Note: this is going to take a while.)" 319 | *** /old/src/games/warp/makedir Sat Aug 29 13:53:43 1987 320 | --- /usr/src/games/warp/makedir Tue Dec 24 23:44:56 1991 321 | *************** 322 | *** 16,22 **** 323 | 324 | case $# in 325 | 0) 326 | ! echo "makedir pathname filenameflag" 327 | exit 1 328 | ;; 329 | esac 330 | --- 16,22 ---- 331 | 332 | case $# in 333 | 0) 334 | ! /bin/echo "makedir pathname filenameflag" 335 | exit 1 336 | ;; 337 | esac 338 | *************** 339 | *** 29,35 **** 340 | 341 | : strip last component if it is to be a filename 342 | case X$2 in 343 | ! X1) set `echo $1 | sed 's:\(.*\)/[^/]*$:\1:'` ;; 344 | *) set $1 ;; 345 | esac 346 | 347 | --- 29,35 ---- 348 | 349 | : strip last component if it is to be a filename 350 | case X$2 in 351 | ! X1) set `/bin/echo $1 | /bin/sed 's:\(.*\)/[^/]*$:\1:'` ;; 352 | *) set $1 ;; 353 | esac 354 | 355 | *************** 356 | *** 43,49 **** 357 | case $1 in 358 | */*) 359 | list="$1 $list" 360 | ! set `echo $1 | sed 's:\(.*\)/:\1 :'` 361 | ;; 362 | *) 363 | break 364 | --- 43,49 ---- 365 | case $1 in 366 | */*) 367 | list="$1 $list" 368 | ! set `echo $1 | /bin/sed 's:\(.*\)/:\1 :'` 369 | ;; 370 | *) 371 | break 372 | *************** 373 | *** 54,58 **** 374 | set $list 375 | 376 | for dir do 377 | ! mkdir $dir >/dev/null 2>&1 378 | done 379 | --- 54,58 ---- 380 | set $list 381 | 382 | for dir do 383 | ! /bin/mkdir $dir >/dev/null 2>&1 384 | done 385 | *** /old/src/games/words/Makefile Wed Jul 8 14:25:56 1987 386 | -------------------------------------------------------------------------------- /hints/build2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Note: has to run in 2.11BSDpl195 4 | 5 | # 6 | # Build script meant to be kicked off in the chroot to do all the building w/o 7 | # contaminating the 2.11pl195 host. We'll need to use that host *A*LOT* and I'd 8 | # rather not have to reconfigure it all the time. 9 | # 10 | S=/usr/src 11 | 12 | # 13 | # These files historically have been owned by root as well 14 | # 15 | chown -R root $S 16 | 17 | # 18 | # This is real ugly, but there's a bug in make that has issues with directories 19 | # in the future... so we hack around that by touching all the directories... 20 | # except touch doesn't work on 2.11 on directories, and there's no xargs 21 | # on this system. This is a big hammer, I know, but there's too many date 22 | # issues. The build orchestration scripts will set the date to something 23 | # historically accuate, and this will allow things to work in the face 24 | # of make not descending into a directory that's in the future. 25 | # 26 | for i in `find $S -type d -print` ; do 27 | touch $i/__fred__ && rm $i/__fred__ 28 | done 29 | 30 | # 31 | # Bootstap as to make .s -> .o. That's done in the recovery script due to the 32 | # diffuclty of marshalling all the bits to the 2.11 system. Here we just copy 33 | # the results. We also clean up all the binaries we produced in the hacky way 34 | # so we don't have issues with permissions and/or timestamps later. We'll 35 | # also do a make clean, but this is an abundance of caution move at this staage 36 | # given the turn around time. 37 | # 38 | echo Copying bootstrapped as... 39 | # cd $S/bin/as 40 | # cp as /bin 41 | # cp as2 /lib 42 | # rm -f as as2 *.o 43 | cd /bs 44 | cp as ld nm /bin 45 | cp as2 /lib 46 | 47 | # 48 | # Copy over the bootstrapped nm and ld. 49 | # 50 | # Finally, we do technically need ranlib(1) if we don't want to do a crapton of 51 | # surgery on the source tree, so remove it and copy /bin/true into it's 52 | # place. This will result in slower link times for the first few binaries we 53 | # build, but the binaries will be the same and ranlib(1) will be one of those 54 | # libraries. Except for libc, which has some circular dependencies, so we have 55 | # to list -lc on the command line below to pull in all those cycles. It won't 56 | # actually link things multiple times, though, since it only gets .o's that 57 | # were missed in the first pass. 58 | # 59 | # cd .. 60 | # cp nm ld $R/bin # see above 61 | # rm -f ld nm 62 | rm $R/usr/bin/ranlib 63 | cp $R/bin/true $R/usr/bin/ranlib 64 | 65 | # 66 | # Time to build libc 67 | # 68 | echo Bootstrapping libc 69 | cd $S/lib/libc 70 | make clean 71 | make 72 | make install 73 | make clean 74 | 75 | [ -r /lib/libc.a ] || (echo no libc.a && exit 1) 76 | 77 | # 78 | # Now we can build new binaries. We build ranlib now because in the 2.11pl195 79 | # system, has inconsistent include files that lead to two struct nlist being 80 | # defined. Once we have ranlib built, then all the tools we need for the next 81 | # stage of bootstrapping are there. 82 | # 83 | echo Bootstrapping a real ranlib 84 | cd $S/usr.bin 85 | cc -O -i -o ranlib ranlib.c -lc 86 | cp ranlib /usr/bin 87 | rm -f ranlib 88 | ranlib /lib/libc.a 89 | 90 | # 91 | # Now we need to install a few binaries needed for the rest of the build 92 | # 93 | echo Bootrapping ar and strip 94 | cd $S/bin 95 | make ar strip 96 | cp ar strip /bin 97 | rm ar strip 98 | 99 | # 100 | # Install(1) knows about the format that changed, and so needs to be installed 101 | # before we use 'install -s' or that will fail. 102 | # 103 | echo Bootstrapping install 104 | cd $S/usr.bin 105 | make xinstall 106 | cp xinstall /usr/bin/install 107 | 108 | # 109 | # Build and install the C compiler. Rebuild and install 110 | # the C library. Rebuild and reinstall the C compiler. 111 | # (likely overkill). 112 | # 113 | # Then build and install all the libraries in $S/usr.lib, 114 | # but not the programs, they need these same libraries 115 | # so we'll catch them later. 116 | # 117 | # Finally, do a simple make all. 118 | # 119 | # Make build is almost the same as this (gets details 120 | # wrong about usr.lib), but fails in building libc the 121 | # second time for reasons unknown. This sequence should 122 | # be completely reproducible. 123 | # 124 | cd $S 125 | make clean 126 | ( 127 | cd lib 128 | for i in ccom cpp c2; do 129 | (cd $i; make; make install; make clean) 130 | done 131 | ( 132 | cd libc 133 | # Sometimes we fail to descend for reasons as 134 | # yet unknown -- same name or time of dir? idk 135 | cd pdp/compat-4.1 136 | make 137 | cd .. 138 | make 139 | cd .. 140 | make 141 | make install 142 | make clean 143 | ) 144 | for i in ccom cpp c2; do 145 | (cd $i; make; make install; make clean) 146 | done 147 | ) 148 | ( 149 | cd usr.lib 150 | # We need to only build real libraries here and lib.b 151 | # gets in the way of using the simple lib* here. 152 | for i in lib[0-9A-Za-z]*; do 153 | (cd $i; make; make install) 154 | done 155 | # usr.lib's install does this, since we're bypassing 156 | # that, we need to do the link here. Otherwise things 157 | # fail later. 158 | rm -f /usr/lib/libm.a /usr/lib/libm_p.a 159 | ln /usr/lib/libom.a /usr/lib/libm.a 160 | ln /usr/lib/libom_p.a /usr/lib/libm_p.a 161 | # 162 | # Rebuild these now too, while we're here 163 | # 164 | for i in lpr me sendmail; do 165 | (cd $i; make clean; make ; make install) 166 | done 167 | make getNAME 168 | make makekey 169 | ) 170 | # Build some man pages that aren't otherwise built 171 | # These all have dependencies in their Makefiles... 172 | # still need to work out how best to regenerate all the 173 | # man pages for the release. 174 | (cd bin/chpass; /usr/man/manroff chpass.1 > chpass.0) 175 | (cd bin/passwd; /usr/man/manroff passwd.1 > passwd.0) 176 | (cd etc/chroot; /usr/man/manroff chroot.8 > chroot.0) 177 | (cd etc/fingerd; /usr/man/manroff fingerd.8 > fingerd.0) 178 | (cd etc/ftpd; /usr/man/manroff ftpd.8 > ftpd.0) 179 | (cd etc/mkpasswd; /usr/man/manroff mkpasswd.8 > mkpasswd.0) 180 | (cd etc/vipw; /usr/man/manroff vipw.8 > vipw.0) 181 | (cd ucb/ftp; /usr/man/manroff ftp.1 > ftp.0) 182 | (cd ucb/lock; /usr/man/manroff lock.1 > lock.0) 183 | (cd new/patch; /usr/man/manroff patch.man > patch.0) 184 | 185 | # Now we need to clean out /usr/man/cat?/* and rebuild it 186 | # but the normal way of doing that freaks make out (line too 187 | # long). so we use the helper function to do all that. It 188 | # create the man page directly in /usr/man and then greps 189 | # through the Makefiles to create the hard links. 190 | ( 191 | find /usr/man/cat* -name "*.0" -exec rm {} \; 192 | cd /usr/src/man 193 | DESTDIR= 194 | export DESTDIR 195 | for i in man[1-8]; do 196 | echo doing /usr/src/man/$i 197 | cd /usr/src/man/$i 198 | MDIR=`grep MDIR= Makefile | awk '{print $2;}'` 199 | export MDIR 200 | for j in *.[1-9]; do 201 | c=`echo $j | sed -e 's=\.[1-9]$=.0='` 202 | case $j in 203 | eqn.1) 204 | eqn < $j | nroff -man -h > $MDIR/$c 205 | ;; 206 | *) 207 | nroff -man -h < $j > $MDIR/$c 208 | ;; 209 | esac 210 | done 211 | grep "ln " Makefile | sh -x 212 | done 213 | cd /usr/src 214 | ) 215 | 216 | # Build it all again now that we've done the above dance 217 | make all 218 | make install 219 | # words is installed in the wrong place, so move it 220 | mv $ROOT211/words $ROOT211/usr/games 221 | # Install a few artifacts that aren't done by default 222 | (cd games/battlestar ; make stringfile) 223 | ( # because make install doesn't work, we have to copy from the 224 | # /usr/src/man/Makefile and tewak slightly 225 | cd man; 226 | make scriptinstall 227 | # for file in `find /usr/man -type f -name '*.0' -print`; do \ 228 | # sed -n -f /usr/man/makewhatis.sed $$file; \ 229 | # done | sort -u > whatis.db 230 | # install -o bin -g bin -m 444 whatis.db /usr/man/whatis 231 | install -c -o bin -g bin -m 444 man.template /usr/man/man.template 232 | ) 233 | # Need to rebuild the find database... 234 | /usr/lib/find/updatedb 235 | make clean 236 | 237 | # 238 | # usr/adm needs some blank files created so logging, etc works. 239 | # 240 | cd /usr/adm 241 | rm -f lpd-errs acct shutdownlog usracct savacct daemonlog debuglog 242 | touch lpd-errs acct shutdownlog usracct savacct daemonlog debuglog 243 | 244 | # 245 | # Now build and install the kernel. If all went well, then we're good to go 246 | # here. Set the hostname to the name in the example kernel output from the 247 | # 2.11 setup docs. 248 | # 249 | hostname wlonex.imsd.contel.com 250 | cd /usr/src/sys/GENERIC 251 | make && make install && (cd / ; cp unix genunix; sh -x /GENALLSYS) 252 | 253 | # 254 | # Need to build mdec 255 | # 256 | cd /usr/src/sys/mdec 257 | make clean 258 | make 259 | make install 260 | 261 | # 262 | # Ditto autoconfig... 263 | # 264 | cd /usr/src/sys/autoconfig 265 | (set +e; rm -f ../pdpuba/autoconfig || true) 266 | make clean 267 | make 268 | # (set +e; mv ../pdpuba/autoconfig . || true) 269 | make install 270 | 271 | # 272 | # Ditto boot 273 | # 274 | cd /usr/src/sys/pdpstand 275 | make clean 276 | make 277 | make install 278 | 279 | # 280 | # Hacks for making things bootable 281 | # 282 | # Assume ra device for bootstrap we're ra1 still! 283 | dd if=/mdec/rauboot of=/dev/ra1a count=1 284 | # Try to mount /usr, but it's broken for reasons unknown 285 | # newer 2.11BSD want ra0g, but as released 2.11 wants 286 | # ra0c according to the man page... Need to check the 287 | # actual driver if this doesn't work. 288 | echo /dev/ra0c:/usr:rw:1:2 >> /etc/fstab 289 | 290 | # To boot, though, we have to neuter sendmail 291 | mv /usr/lib/sendmail /usr/lib/sendmail.off 292 | 293 | # And let's just copy the right kernel to unix 294 | cp /raunix /unix 295 | 296 | echo BUILD2 HAS COMPLETED SUCCESSFULLY 297 | -------------------------------------------------------------------------------- /patches/78a: -------------------------------------------------------------------------------- 1 | *** /old/src/new/rn/addng.c Sun Mar 15 20:10:54 1987 2 | --- /usr/src/new/rn/addng.c Thu Aug 27 11:04:00 1992 3 | *************** 4 | *** 39,68 **** 5 | 6 | bool 7 | newlist(munged,checkinlist) 8 | ! bool munged; /* are we scanning the whole file? */ 9 | bool checkinlist; 10 | { 11 | char *tmpname; 12 | ! register char *s; 13 | long birthof(); 14 | 15 | ! tmpname = savestr(filexp("/tmp/rnew.%$")); 16 | ! tmpfp = fopen(tmpname,"w"); 17 | if (tmpfp == Nullfp) { 18 | printf(cantcreate,tmpname) FLUSH; 19 | return FALSE; 20 | } 21 | while (fgets(buf,LBUFLEN,actfp) != Nullch) { 22 | if (s = index(buf,' ')) { 23 | *s++ = '\0'; 24 | ! if (strnEQ(buf,"to.",3)) 25 | continue; 26 | ! if (find_ng(buf) == nextrcline && 27 | ! (checkinlist ? 28 | ! (inlist(buf)) : 29 | ! (birthof(buf,(ART_NUM)atol(s)) > lasttime) 30 | ! ) 31 | ! ) { 32 | /* if not in .newsrc and younger */ 33 | /* than the last time we checked */ 34 | fprintf(tmpfp,"%s\n",buf); 35 | --- 39,89 ---- 36 | 37 | bool 38 | newlist(munged,checkinlist) 39 | ! bool munged; /* are we scanning the whole file? */ 40 | bool checkinlist; 41 | { 42 | char *tmpname; 43 | ! register char *s, *status; 44 | ! register NG_NUM ngnum; 45 | ! #ifndef ACTIVE_TIMES 46 | long birthof(); 47 | + #endif 48 | + extern char int_count; 49 | 50 | ! tmpname = filexp("/tmp/rnew.%$"); 51 | ! tmpfp = fopen(tmpname,"w+"); 52 | if (tmpfp == Nullfp) { 53 | printf(cantcreate,tmpname) FLUSH; 54 | return FALSE; 55 | } 56 | + UNLINK(tmpname); /* be nice to the world */ 57 | + 58 | while (fgets(buf,LBUFLEN,actfp) != Nullch) { 59 | + /* Check if they want to break out of the new newsgroups search */ 60 | + if (int_count) { 61 | + int_count = 0; 62 | + fclose(tmpfp); 63 | + return FALSE; 64 | + } 65 | if (s = index(buf,' ')) { 66 | + status=s; 67 | + while (isdigit(*status) || isspace(*status)) status++; 68 | *s++ = '\0'; 69 | ! if (strnEQ(buf,"to.",3) || *status == 'x' || *status == '=') 70 | ! /* since = groups are refiling to another group, just 71 | ! ignore their existence */ 72 | continue; 73 | ! #ifdef ACTIVE_TIMES 74 | ! if (inlist(buf) && ((ngnum = find_ng(buf)) == nextrcline 75 | ! || toread[ngnum] == TR_UNSUB) 76 | ! #else 77 | ! if (checkinlist ? 78 | ! (inlist(buf) && ((ngnum = find_ng(buf)) == nextrcline 79 | ! || toread[ngnum] == TR_UNSUB)) 80 | ! : (find_ng(buf) == nextrcline 81 | ! && birthof(buf,(ART_NUM)atol(s)) > lasttime) 82 | ! #endif 83 | ! ) { 84 | /* if not in .newsrc and younger */ 85 | /* than the last time we checked */ 86 | fprintf(tmpfp,"%s\n",buf); 87 | *************** 88 | *** 72,79 **** 89 | else { /* not really a new group */ 90 | if (!munged) { /* did we assume not munged? */ 91 | fclose(tmpfp); /* then go back, knowing that */ 92 | - UNLINK(tmpname); 93 | - free(tmpname); 94 | return TRUE; /* active file was indeed munged */ 95 | } 96 | } 97 | --- 93,98 ---- 98 | *************** 99 | *** 87,105 **** 100 | 101 | /* we have successfully generated the list */ 102 | 103 | ! fclose(tmpfp); 104 | ! tmpfp = fopen(tmpname,"r"); 105 | ! UNLINK(tmpname); /* be nice to the world */ 106 | ! if (tmpfp == Nullfp) { 107 | ! printf(cantopen,tmpname) FLUSH; 108 | ! return FALSE; 109 | ! } 110 | while (fgets(buf,LBUFLEN,tmpfp) != Nullch) { 111 | buf[strlen(buf)-1] = '\0'; 112 | get_ng(buf,TRUE); /* add newsgroup, maybe */ 113 | } 114 | fclose(tmpfp); /* be nice to ourselves */ 115 | - free(tmpname); 116 | return FALSE; /* do not call us again */ 117 | } 118 | 119 | --- 106,117 ---- 120 | 121 | /* we have successfully generated the list */ 122 | 123 | ! fseek(tmpfp,0L,0); /* rewind back to the beginning */ 124 | while (fgets(buf,LBUFLEN,tmpfp) != Nullch) { 125 | buf[strlen(buf)-1] = '\0'; 126 | get_ng(buf,TRUE); /* add newsgroup, maybe */ 127 | } 128 | fclose(tmpfp); /* be nice to ourselves */ 129 | return FALSE; /* do not call us again */ 130 | } 131 | 132 | *** /old/src/new/rn/common.h Mon Oct 8 14:05:08 1990 133 | --- /usr/src/new/rn/common.h Wed Jun 10 14:13:49 1992 134 | *************** 135 | *** 213,223 **** 136 | /* Space conservation section */ 137 | 138 | /* To save D space, cut down size of MAXRCLINE, NGMAX, VARYSIZE. */ 139 | ! #define MAXRCLINE 800 /* number of lines allowed in .newsrc -was 1000*/ 140 | /* several parallel arrays affected. */ 141 | /* (You can have more lines in the active file, */ 142 | /* just not in the .newsrc) */ 143 | ! #define HASHSIZ 881 /* should be prime, and at least MAXRCLINE + 10% 1013*/ 144 | #define NGMAX 10 /* number of newsgroups allowed on command line -10*/ 145 | /* undefine ONLY symbol to disable "only" feature */ 146 | #define VARYSIZE 128 /* this makes a block 1024 bytes long in DECville */ 147 | --- 213,223 ---- 148 | /* Space conservation section */ 149 | 150 | /* To save D space, cut down size of MAXRCLINE, NGMAX, VARYSIZE. */ 151 | ! #define MAXRCLINE 900 /* number of lines allowed in .newsrc */ 152 | /* several parallel arrays affected. */ 153 | /* (You can have more lines in the active file, */ 154 | /* just not in the .newsrc) */ 155 | ! #define HASHSIZ 991 /* should be prime, and at least MAXRCLINE + 10% */ 156 | #define NGMAX 10 /* number of newsgroups allowed on command line -10*/ 157 | /* undefine ONLY symbol to disable "only" feature */ 158 | #define VARYSIZE 128 /* this makes a block 1024 bytes long in DECville */ 159 | *************** 160 | *** 237,243 **** 161 | #define NOFIREWORKS /* keep whole screen from flashing on certain */ 162 | /* terminals such as older Televideos */ 163 | #define VERIFY /* echo the command they just typed */ 164 | ! #define HASHNG /* hash newsgroup lines for fast lookup-- */ 165 | /* linear search used if not defined */ 166 | #define CONDSUB /* allow %(cond?text:text) */ 167 | #define BACKTICK /* allow %`command` */ 168 | --- 237,243 ---- 169 | #define NOFIREWORKS /* keep whole screen from flashing on certain */ 170 | /* terminals such as older Televideos */ 171 | #define VERIFY /* echo the command they just typed */ 172 | ! #undef HASHNG /* hash newsgroup lines for fast lookup-- */ 173 | /* linear search used if not defined */ 174 | #define CONDSUB /* allow %(cond?text:text) */ 175 | #define BACKTICK /* allow %`command` */ 176 | *************** 177 | *** 282,288 **** 178 | #define ASYNC_PARSE /* allow parsing headers asyncronously to reading */ 179 | /* used by MCHASE and MUNGHEADER */ 180 | #define FINDNEWNG /* check for new newsgroups on startup */ 181 | ! #define FASTNEW /* do optimizations on FINDNEWNG for faster startup */ 182 | /* (this optimization can make occasional mistakes */ 183 | /* if a group is removed and another group of the */ 184 | /* same length is added, and if no softpointers are */ 185 | --- 282,288 ---- 186 | #define ASYNC_PARSE /* allow parsing headers asyncronously to reading */ 187 | /* used by MCHASE and MUNGHEADER */ 188 | #define FINDNEWNG /* check for new newsgroups on startup */ 189 | ! #undef FASTNEW /* do optimizations on FINDNEWNG for faster startup */ 190 | /* (this optimization can make occasional mistakes */ 191 | /* if a group is removed and another group of the */ 192 | /* same length is added, and if no softpointers are */ 193 | *************** 194 | *** 679,685 **** 195 | #endif 196 | typedef long ART_POS; /* char position in article file */ 197 | typedef int ART_LINE; /* line position in article file */ 198 | ! typedef short ACT_POS; /* char position in active file */ 199 | typedef unsigned int MEM_SIZE; /* for passing to malloc */ 200 | 201 | /* *** end of the machine dependent stuff *** */ 202 | --- 679,686 ---- 203 | #endif 204 | typedef long ART_POS; /* char position in article file */ 205 | typedef int ART_LINE; /* line position in article file */ 206 | ! /* following was short until 6/9/92 */ 207 | ! typedef long ACT_POS; /* char position in active file */ 208 | typedef unsigned int MEM_SIZE; /* for passing to malloc */ 209 | 210 | /* *** end of the machine dependent stuff *** */ 211 | *** /old/src/new/rn/ngdata.c Sun Mar 15 22:26:37 1987 212 | --- /usr/src/new/rn/ngdata.c Fri Jun 12 10:09:38 1992 213 | *************** 214 | *** 117,122 **** 215 | --- 117,123 ---- 216 | #ifdef MININACT 217 | { 218 | register char *s; 219 | + char *getval(); 220 | ART_NUM tmp; 221 | 222 | for (s=tmpbuf+len+1; isdigit(*s); s++) ; 223 | *************** 224 | *** 126,131 **** 225 | --- 127,148 ---- 226 | #else 227 | abs1st = tmp; 228 | #endif 229 | + if (!in_ng) { 230 | + for (s++; isdigit(*s); s++) ; 231 | + while (isspace(*s)) s++; 232 | + switch (*s) { 233 | + case 'n': moderated = getval("NOPOSTRING"," (no posting)"); break; 234 | + case 'm': moderated = getval("MODSTRING", " (moderated)"); break; 235 | + /* This shouldn't even occur. What are we doing in a non-existent 236 | + group? Disallow it. */ 237 | + case 'x': return TR_BOGUS; 238 | + /* what should be done about refiled groups? rn shouldn't even 239 | + be in them (ie, if sci.aquaria is refiled to rec.aquaria, then 240 | + get the news there) */ 241 | + case '=': return TR_BOGUS; 242 | + default: moderated = nullstr; 243 | + } 244 | + } 245 | } 246 | #endif 247 | return atol(tmpbuf+len+1); 248 | *** /old/src/new/rn/ngdata.h Sun Mar 15 22:37:32 1987 249 | --- /usr/src/new/rn/ngdata.h Fri Jun 12 10:06:37 1992 250 | *************** 251 | *** 22,27 **** 252 | --- 22,28 ---- 253 | # endif 254 | #endif 255 | 256 | + EXT char *moderated; 257 | 258 | void ngdata_init(); 259 | ART_NUM getngsize(); 260 | *** /old/src/new/rn/rcstuff.c Fri May 29 09:33:43 1987 261 | --- /usr/src/new/rn/rcstuff.c Thu Jun 11 08:17:37 1992 262 | *************** 263 | *** 111,117 **** 264 | finalize(1); 265 | } 266 | if (tmpfp != Nullfp && fgets(tmpbuf,10,tmpfp) != Nullch) 267 | ! softptr[newng] = atoi(tmpbuf); 268 | else 269 | softptr[newng] = 0; 270 | some_buf[--length] = '\0'; /* wipe out newline */ 271 | --- 111,117 ---- 272 | finalize(1); 273 | } 274 | if (tmpfp != Nullfp && fgets(tmpbuf,10,tmpfp) != Nullch) 275 | ! softptr[newng] = atol(tmpbuf); 276 | else 277 | softptr[newng] = 0; 278 | some_buf[--length] = '\0'; /* wipe out newline */ 279 | -------------------------------------------------------------------------------- /patches/18a: -------------------------------------------------------------------------------- 1 | *** /old/src/bin/csh/alloc.c Sun Feb 8 14:27:23 1987 2 | --- /usr/src/bin/csh/alloc.c Sat Aug 31 00:03:00 1991 3 | *************** 4 | *** 4,13 **** 5 | * specifies the terms and conditions for redistribution. 6 | */ 7 | 8 | ! #ifndef lint 9 | /* From "@(#)malloc.c 5.5 (Berkeley) 2/25/86"; */ 10 | static char *sccsid = "@(#)alloc.c 5.3 (Berkeley) 3/29/86"; 11 | ! #endif not lint 12 | 13 | /* 14 | * malloc.c (Caltech) 2/21/82 15 | --- 4,13 ---- 16 | * specifies the terms and conditions for redistribution. 17 | */ 18 | 19 | ! #if !defined(lint) && defined(DOSCCS) 20 | /* From "@(#)malloc.c 5.5 (Berkeley) 2/25/86"; */ 21 | static char *sccsid = "@(#)alloc.c 5.3 (Berkeley) 3/29/86"; 22 | ! #endif 23 | 24 | /* 25 | * malloc.c (Caltech) 2/21/82 26 | *** /old/src/bin/csh/alloc11.c Sun Feb 8 14:27:29 1987 27 | --- /usr/src/bin/csh/alloc11.c Sat Aug 31 00:03:33 1991 28 | *************** 29 | *** 1,4 **** 30 | --- 1,6 ---- 31 | + #if !defined(lint) && defined(DOSCCS) 32 | static char *sccsid = "@(#)alloc.c 4.1 10/9/80"; 33 | + #endif 34 | 35 | #include "sh.local.h" 36 | #ifdef debug 37 | *** /old/src/bin/csh/doprnt.c Sun Feb 8 14:27:24 1987 38 | --- /usr/src/bin/csh/doprnt.c Sat Aug 31 00:03:56 1991 39 | *************** 40 | *** 4,10 **** 41 | * specifies the terms and conditions for redistribution. 42 | */ 43 | 44 | ! #ifndef lint 45 | .ascii "@(#)doprnt.c 5.2 (Berkeley) 6/6/85" 46 | #endif 47 | 48 | --- 4,10 ---- 49 | * specifies the terms and conditions for redistribution. 50 | */ 51 | 52 | ! #if !defined(lint) && defined(DOSCCS) 53 | .ascii "@(#)doprnt.c 5.2 (Berkeley) 6/6/85" 54 | #endif 55 | 56 | *** /old/src/bin/csh/printf.c Sun Feb 8 14:27:25 1987 57 | --- /usr/src/bin/csh/printf.c Sat Aug 31 00:04:20 1991 58 | *************** 59 | *** 4,10 **** 60 | * specifies the terms and conditions for redistribution. 61 | */ 62 | 63 | ! #ifndef lint 64 | static char *sccsid = "@(#)printf.c 5.2 (Berkeley) 6/6/85"; 65 | #endif 66 | 67 | --- 4,10 ---- 68 | * specifies the terms and conditions for redistribution. 69 | */ 70 | 71 | ! #if !defined(lint) && defined(DOSCCS) 72 | static char *sccsid = "@(#)printf.c 5.2 (Berkeley) 6/6/85"; 73 | #endif 74 | 75 | *** /old/src/bin/csh/sh.c Sun Feb 8 14:27:27 1987 76 | --- /usr/src/bin/csh/sh.c Sat Aug 31 00:04:45 1991 77 | *************** 78 | *** 4,10 **** 79 | * specifies the terms and conditions for redistribution. 80 | */ 81 | 82 | ! #ifndef lint 83 | static char *sccsid = "@(#)sh.c 5.3 (Berkeley) 3/29/86"; 84 | #endif 85 | 86 | --- 4,10 ---- 87 | * specifies the terms and conditions for redistribution. 88 | */ 89 | 90 | ! #if !defined(lint) && defined(DOSCCS) 91 | static char *sccsid = "@(#)sh.c 5.3 (Berkeley) 3/29/86"; 92 | #endif 93 | 94 | *** /old/src/bin/csh/sh.char.c Sun Feb 8 14:27:24 1987 95 | --- /usr/src/bin/csh/sh.char.c Sat Aug 31 00:05:16 1991 96 | *************** 97 | *** 4,10 **** 98 | * specifies the terms and conditions for redistribution. 99 | */ 100 | 101 | ! #ifndef lint 102 | static char *sccsid = "@(#)sh.char.c 5.3 (Berkeley) 3/29/86"; 103 | #endif 104 | 105 | --- 4,10 ---- 106 | * specifies the terms and conditions for redistribution. 107 | */ 108 | 109 | ! #if !defined(lint) && defined(DOSCCS) 110 | static char *sccsid = "@(#)sh.char.c 5.3 (Berkeley) 3/29/86"; 111 | #endif 112 | 113 | *** /old/src/bin/csh/sh.dir.c Sun Feb 8 14:27:28 1987 114 | --- /usr/src/bin/csh/sh.dir.c Sat Aug 31 00:05:37 1991 115 | *************** 116 | *** 4,10 **** 117 | * specifies the terms and conditions for redistribution. 118 | */ 119 | 120 | ! #ifndef lint 121 | static char *sccsid = "@(#)sh.dir.c 5.3 (Berkeley) 6/11/85"; 122 | #endif 123 | 124 | --- 4,10 ---- 125 | * specifies the terms and conditions for redistribution. 126 | */ 127 | 128 | ! #if !defined(lint) && defined(DOSCCS) 129 | static char *sccsid = "@(#)sh.dir.c 5.3 (Berkeley) 6/11/85"; 130 | #endif 131 | 132 | *** /old/src/bin/csh/sh.dol.c Sun Feb 8 14:27:27 1987 133 | --- /usr/src/bin/csh/sh.dol.c Sat Aug 31 00:05:59 1991 134 | *************** 135 | *** 4,10 **** 136 | * specifies the terms and conditions for redistribution. 137 | */ 138 | 139 | ! #ifndef lint 140 | static char *sccsid = "@(#)sh.dol.c 5.3 (Berkeley) 3/29/86"; 141 | #endif 142 | 143 | --- 4,10 ---- 144 | * specifies the terms and conditions for redistribution. 145 | */ 146 | 147 | ! #if !defined(lint) && defined(DOSCCS) 148 | static char *sccsid = "@(#)sh.dol.c 5.3 (Berkeley) 3/29/86"; 149 | #endif 150 | 151 | *** /old/src/bin/csh/sh.err.c Sun Feb 8 14:27:25 1987 152 | --- /usr/src/bin/csh/sh.err.c Sat Aug 31 00:06:19 1991 153 | *************** 154 | *** 4,10 **** 155 | * specifies the terms and conditions for redistribution. 156 | */ 157 | 158 | ! #ifndef lint 159 | static char *sccsid = "@(#)sh.err.c 5.3 (Berkeley) 5/13/86"; 160 | #endif 161 | 162 | --- 4,10 ---- 163 | * specifies the terms and conditions for redistribution. 164 | */ 165 | 166 | ! #if !defined(lint) && defined(DOSCCS) 167 | static char *sccsid = "@(#)sh.err.c 5.3 (Berkeley) 5/13/86"; 168 | #endif 169 | 170 | *** /old/src/bin/csh/sh.exec.c Sun Dec 25 20:53:38 1988 171 | --- /usr/src/bin/csh/sh.exec.c Sat Aug 31 00:06:43 1991 172 | *************** 173 | *** 4,10 **** 174 | * specifies the terms and conditions for redistribution. 175 | */ 176 | 177 | ! #ifndef lint 178 | static char *sccsid = "@(#)sh.exec.c 5.2 (Berkeley) 6/6/85"; 179 | #endif 180 | 181 | --- 4,10 ---- 182 | * specifies the terms and conditions for redistribution. 183 | */ 184 | 185 | ! #if !defined(lint) && defined(DOSCCS) 186 | static char *sccsid = "@(#)sh.exec.c 5.2 (Berkeley) 6/6/85"; 187 | #endif 188 | 189 | *** /old/src/bin/csh/sh.exp.c Sun Feb 8 14:27:25 1987 190 | --- /usr/src/bin/csh/sh.exp.c Sat Aug 31 00:07:02 1991 191 | *************** 192 | *** 4,10 **** 193 | * specifies the terms and conditions for redistribution. 194 | */ 195 | 196 | ! #ifndef lint 197 | static char *sccsid = "@(#)sh.exp.c 5.3 (Berkeley) 6/23/85"; 198 | #endif 199 | 200 | --- 4,10 ---- 201 | * specifies the terms and conditions for redistribution. 202 | */ 203 | 204 | ! #if !defined(lint) && defined(DOSCCS) 205 | static char *sccsid = "@(#)sh.exp.c 5.3 (Berkeley) 6/23/85"; 206 | #endif 207 | 208 | *** /old/src/bin/csh/sh.file.c Sun Feb 8 14:27:24 1987 209 | --- /usr/src/bin/csh/sh.file.c Sat Aug 31 00:07:22 1991 210 | *************** 211 | *** 4,10 **** 212 | * specifies the terms and conditions for redistribution. 213 | */ 214 | 215 | ! #ifndef lint 216 | static char *sccsid = "@(#)sh.file.c 5.6 (Berkeley) 5/18/86"; 217 | #endif 218 | 219 | --- 4,10 ---- 220 | * specifies the terms and conditions for redistribution. 221 | */ 222 | 223 | ! #if !defined(lint) && defined(DOSCCS) 224 | static char *sccsid = "@(#)sh.file.c 5.6 (Berkeley) 5/18/86"; 225 | #endif 226 | 227 | *** /old/src/bin/csh/sh.func.c Sun Jul 19 12:03:23 1987 228 | --- /usr/src/bin/csh/sh.func.c Sat Aug 31 00:07:46 1991 229 | *************** 230 | *** 4,10 **** 231 | * specifies the terms and conditions for redistribution. 232 | */ 233 | 234 | ! #ifndef lint 235 | static char *sccsid = "@(#)sh.func.c 5.3 (Berkeley) 5/13/86"; 236 | #endif 237 | 238 | --- 4,10 ---- 239 | * specifies the terms and conditions for redistribution. 240 | */ 241 | 242 | ! #if !defined(lint) && defined(DOSCCS) 243 | static char *sccsid = "@(#)sh.func.c 5.3 (Berkeley) 5/13/86"; 244 | #endif 245 | 246 | *** /old/src/bin/csh/sh.glob.c Sun Feb 8 14:27:27 1987 247 | --- /usr/src/bin/csh/sh.glob.c Sat Aug 31 00:08:21 1991 248 | *************** 249 | *** 4,10 **** 250 | * specifies the terms and conditions for redistribution. 251 | */ 252 | 253 | ! #ifndef lint 254 | static char *sccsid = "@(#)sh.glob.c 5.4 (Berkeley) 5/13/86"; 255 | #endif 256 | 257 | --- 4,10 ---- 258 | * specifies the terms and conditions for redistribution. 259 | */ 260 | 261 | ! #if !defined(lint) && defined(DOSCCS) 262 | static char *sccsid = "@(#)sh.glob.c 5.4 (Berkeley) 5/13/86"; 263 | #endif 264 | 265 | *** /old/src/bin/csh/sh.hist.c Sun Feb 8 14:27:23 1987 266 | --- /usr/src/bin/csh/sh.hist.c Sat Aug 31 00:08:48 1991 267 | *************** 268 | *** 4,10 **** 269 | * specifies the terms and conditions for redistribution. 270 | */ 271 | 272 | ! #ifndef lint 273 | static char *sccsid = "@(#)sh.hist.c 5.2 (Berkeley) 6/6/85"; 274 | #endif 275 | 276 | --- 4,10 ---- 277 | * specifies the terms and conditions for redistribution. 278 | */ 279 | 280 | ! #if !defined(lint) && defined(DOSCCS) 281 | static char *sccsid = "@(#)sh.hist.c 5.2 (Berkeley) 6/6/85"; 282 | #endif 283 | 284 | *** /old/src/bin/csh/sh.init.c Sun Feb 15 18:37:11 1987 285 | --- /usr/src/bin/csh/sh.init.c Sat Aug 31 00:09:14 1991 286 | *************** 287 | *** 4,10 **** 288 | * specifies the terms and conditions for redistribution. 289 | */ 290 | 291 | ! #ifndef lint 292 | static char *sccsid = "@(#)sh.init.c 5.2 (Berkeley) 6/6/85"; 293 | #endif 294 | 295 | --- 4,10 ---- 296 | * specifies the terms and conditions for redistribution. 297 | */ 298 | 299 | ! #if !defined(lint) && defined(DOSCCS) 300 | static char *sccsid = "@(#)sh.init.c 5.2 (Berkeley) 6/6/85"; 301 | #endif 302 | 303 | *** /old/src/bin/csh/sh.lex.c Wed Jun 6 17:09:06 1990 304 | --- /usr/src/bin/csh/sh.lex.c Sat Aug 31 00:09:42 1991 305 | *************** 306 | *** 4,10 **** 307 | * specifies the terms and conditions for redistribution. 308 | */ 309 | 310 | ! #ifndef lint 311 | static char *sccsid = "@(#)sh.lex.c 5.4 (Berkeley) 3/29/86"; 312 | #endif 313 | 314 | --- 4,10 ---- 315 | * specifies the terms and conditions for redistribution. 316 | */ 317 | 318 | ! #if !defined(lint) && defined(DOSCCS) 319 | static char *sccsid = "@(#)sh.lex.c 5.4 (Berkeley) 3/29/86"; 320 | #endif 321 | 322 | *** /old/src/bin/csh/sh.misc.c Sun Feb 8 14:27:25 1987 323 | --- /usr/src/bin/csh/sh.misc.c Sat Aug 31 00:10:02 1991 324 | *************** 325 | *** 4,10 **** 326 | * specifies the terms and conditions for redistribution. 327 | */ 328 | 329 | ! #ifndef lint 330 | static char *sccsid = "@(#)sh.misc.c 5.3 (Berkeley) 3/29/86"; 331 | #endif 332 | 333 | --- 4,10 ---- 334 | * specifies the terms and conditions for redistribution. 335 | */ 336 | 337 | ! #if !defined(lint) && defined(DOSCCS) 338 | static char *sccsid = "@(#)sh.misc.c 5.3 (Berkeley) 3/29/86"; 339 | #endif 340 | 341 | *** /old/src/bin/csh/sh.parse.c Sun Feb 8 14:27:26 1987 342 | --- /usr/src/bin/csh/sh.parse.c Sat Aug 31 00:10:31 1991 343 | *************** 344 | *** 4,10 **** 345 | * specifies the terms and conditions for redistribution. 346 | */ 347 | 348 | ! #ifndef lint 349 | static char *sccsid = "@(#)sh.parse.c 5.3 (Berkeley) 5/13/86"; 350 | #endif 351 | 352 | --- 4,10 ---- 353 | * specifies the terms and conditions for redistribution. 354 | */ 355 | 356 | ! #if !defined(lint) && defined(DOSCCS) 357 | static char *sccsid = "@(#)sh.parse.c 5.3 (Berkeley) 5/13/86"; 358 | #endif 359 | 360 | *** /old/src/bin/csh/sh.print.c Sun Feb 8 14:27:23 1987 361 | --- /usr/src/bin/csh/sh.print.c Sat Aug 31 00:10:56 1991 362 | *************** 363 | *** 4,10 **** 364 | * specifies the terms and conditions for redistribution. 365 | */ 366 | 367 | ! #ifndef lint 368 | static char *sccsid = "@(#)sh.print.c 5.2 (Berkeley) 6/6/85"; 369 | #endif 370 | 371 | --- 4,10 ---- 372 | * specifies the terms and conditions for redistribution. 373 | */ 374 | 375 | ! #if !defined(lint) && defined(DOSCCS) 376 | static char *sccsid = "@(#)sh.print.c 5.2 (Berkeley) 6/6/85"; 377 | #endif 378 | 379 | *** /old/src/bin/csh/sh.proc.c Sun Feb 8 14:27:24 1987 380 | --- /usr/src/bin/csh/sh.proc.c Sat Aug 31 00:11:22 1991 381 | *************** 382 | *** 4,10 **** 383 | * specifies the terms and conditions for redistribution. 384 | */ 385 | 386 | ! #ifndef lint 387 | static char *sccsid = "@(#)sh.proc.c 5.5 (Berkeley) 5/13/86"; 388 | #endif 389 | 390 | --- 4,10 ---- 391 | * specifies the terms and conditions for redistribution. 392 | */ 393 | 394 | ! #if !defined(lint) && defined(DOSCCS) 395 | static char *sccsid = "@(#)sh.proc.c 5.5 (Berkeley) 5/13/86"; 396 | #endif 397 | 398 | *** /old/src/bin/csh/sh.sem.c Fri Aug 19 20:52:10 1988 399 | --- /usr/src/bin/csh/sh.sem.c Sat Aug 31 00:11:45 1991 400 | *************** 401 | *** 4,10 **** 402 | * specifies the terms and conditions for redistribution. 403 | */ 404 | 405 | ! #ifndef lint 406 | static char *sccsid = "@(#)sh.sem.c 5.4 (Berkeley) 5/13/86"; 407 | #endif 408 | 409 | --- 4,10 ---- 410 | * specifies the terms and conditions for redistribution. 411 | */ 412 | 413 | ! #if !defined(lint) && defined(DOSCCS) 414 | static char *sccsid = "@(#)sh.sem.c 5.4 (Berkeley) 5/13/86"; 415 | #endif 416 | 417 | *** /old/src/bin/csh/sh.set.c Sun Feb 8 14:27:26 1987 418 | --- /usr/src/bin/csh/sh.set.c Sat Aug 31 00:12:08 1991 419 | *************** 420 | *** 4,10 **** 421 | * specifies the terms and conditions for redistribution. 422 | */ 423 | 424 | ! #ifndef lint 425 | static char *sccsid = "@(#)sh.set.c 5.2 (Berkeley) 6/6/85"; 426 | #endif 427 | 428 | --- 4,10 ---- 429 | * specifies the terms and conditions for redistribution. 430 | */ 431 | 432 | ! #if !defined(lint) && defined(DOSCCS) 433 | static char *sccsid = "@(#)sh.set.c 5.2 (Berkeley) 6/6/85"; 434 | #endif 435 | 436 | *** /old/src/bin/csh/sh.time.c Wed May 20 18:57:14 1987 437 | --- /usr/src/bin/csh/sh.time.c Sat Aug 31 00:12:32 1991 438 | *************** 439 | *** 4,10 **** 440 | * specifies the terms and conditions for redistribution. 441 | */ 442 | 443 | ! #ifndef lint 444 | static char *sccsid = "@(#)sh.time.c 5.4 (Berkeley) 5/13/86"; 445 | #endif 446 | 447 | --- 4,10 ---- 448 | * specifies the terms and conditions for redistribution. 449 | */ 450 | 451 | ! #if !defined(lint) && defined(DOSCCS) 452 | static char *sccsid = "@(#)sh.time.c 5.4 (Berkeley) 5/13/86"; 453 | #endif 454 | 455 | *** /old/src/bin/dd.c Sun Feb 8 14:24:49 1987 456 | -------------------------------------------------------------------------------- /patches/1a: -------------------------------------------------------------------------------- 1 | *** /old/src/etc/tftpd/tftpd.c Thu Jul 30 22:40:39 1987 2 | --- /usr/src/etc/tftpd/tftpd.c Wed May 15 21:37:45 1991 3 | *************** 4 | *** 1,7 **** 5 | /* 6 | * Copyright (c) 1983 Regents of the University of California. 7 | ! * All rights reserved. The Berkeley software License Agreement 8 | ! * specifies the terms and conditions for redistribution. 9 | */ 10 | 11 | #ifndef lint 12 | --- 1,20 ---- 13 | /* 14 | * Copyright (c) 1983 Regents of the University of California. 15 | ! * All rights reserved. 16 | ! * 17 | ! * Redistribution and use in source and binary forms are permitted 18 | ! * provided that: (1) source distributions retain this entire copyright 19 | ! * notice and comment, and (2) distributions including binaries display 20 | ! * the following acknowledgement: ``This product includes software 21 | ! * developed by the University of California, Berkeley and its contributors'' 22 | ! * in the documentation or other materials provided with the distribution 23 | ! * and in all advertising materials mentioning features or use of this 24 | ! * software. Neither the name of the University nor the names of its 25 | ! * contributors may be used to endorse or promote products derived 26 | ! * from this software without specific prior written permission. 27 | ! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 28 | ! * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 29 | ! * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 30 | */ 31 | 32 | #ifndef lint 33 | *************** 34 | *** 8,18 **** 35 | char copyright[] = 36 | "@(#) Copyright (c) 1983 Regents of the University of California.\n\ 37 | All rights reserved.\n"; 38 | ! #endif not lint 39 | 40 | #ifndef lint 41 | ! static char sccsid[] = "@(#)tftpd.c 5.6 (Berkeley) 5/13/86"; 42 | ! #endif not lint 43 | 44 | #ifdef BSD2_10 45 | #define timeoutbuf to_buf 46 | --- 21,31 ---- 47 | char copyright[] = 48 | "@(#) Copyright (c) 1983 Regents of the University of California.\n\ 49 | All rights reserved.\n"; 50 | ! #endif /* not lint */ 51 | 52 | #ifndef lint 53 | ! static char sccsid[] = "@(#)tftpd.c 5.12 (Berkeley) 6/1/90"; 54 | ! #endif /* not lint */ 55 | 56 | #ifdef BSD2_10 57 | #define timeoutbuf to_buf 58 | *************** 59 | *** 29,46 **** 60 | #include 61 | #include 62 | #include 63 | 64 | #include 65 | 66 | #include 67 | 68 | ! #include 69 | #include 70 | #include 71 | #include 72 | - #include 73 | - #include 74 | #include 75 | 76 | #define TIMEOUT 5 77 | 78 | --- 42,60 ---- 79 | #include 80 | #include 81 | #include 82 | + #include 83 | 84 | #include 85 | 86 | #include 87 | 88 | ! #include 89 | ! #include 90 | #include 91 | #include 92 | #include 93 | #include 94 | + #include 95 | 96 | #define TIMEOUT 5 97 | 98 | *************** 99 | *** 56,67 **** 100 | struct sockaddr_in from; 101 | int fromlen; 102 | 103 | ! main() 104 | { 105 | register struct tftphdr *tp; 106 | ! register int n; 107 | int on = 1; 108 | 109 | openlog("tftpd", LOG_PID, LOG_DAEMON); 110 | if (ioctl(0, FIONBIO, &on) < 0) { 111 | syslog(LOG_ERR, "ioctl(FIONBIO): %m\n"); 112 | --- 70,88 ---- 113 | struct sockaddr_in from; 114 | int fromlen; 115 | 116 | ! #define MAXARG 4 117 | ! char *dirs[MAXARG+1]; 118 | ! 119 | ! main(ac, av) 120 | ! char **av; 121 | { 122 | register struct tftphdr *tp; 123 | ! register int n = 0; 124 | int on = 1; 125 | 126 | + ac--; av++; 127 | + while (ac-- > 0 && n < MAXARG) 128 | + dirs[n++] = *av++; 129 | openlog("tftpd", LOG_PID, LOG_DAEMON); 130 | if (ioctl(0, FIONBIO, &on) < 0) { 131 | syslog(LOG_ERR, "ioctl(FIONBIO): %m\n"); 132 | *************** 133 | *** 224,229 **** 134 | --- 245,253 ---- 135 | * have no uid or gid, for now require 136 | * file to exist and be publicly 137 | * readable/writable. 138 | + * If we were invoked with arguments 139 | + * from inetd then the file must also be 140 | + * in one of the given directory prefixes. 141 | * Note also, full path name must be 142 | * given as we have no login directory. 143 | */ 144 | *************** 145 | *** 233,241 **** 146 | --- 257,277 ---- 147 | { 148 | struct stat stbuf; 149 | int fd; 150 | + char *cp, **dirp; 151 | 152 | if (*filename != '/') 153 | return (EACCESS); 154 | + /* 155 | + * prevent tricksters from getting around the directory restrictions 156 | + */ 157 | + for (cp = filename + 1; *cp; cp++) 158 | + if(*cp == '.' && strncmp(cp-1, "/../", 4) == 0) 159 | + return(EACCESS); 160 | + for (dirp = dirs; *dirp; dirp++) 161 | + if (strncmp(filename, *dirp, strlen(*dirp)) == 0) 162 | + break; 163 | + if (*dirp==0 && dirp!=dirs) 164 | + return (EACCESS); 165 | if (stat(filename, &stbuf) < 0) 166 | return (errno == ENOENT ? ENOTFOUND : EACCESS); 167 | if (mode == RRQ) { 168 | *************** 169 | *** 437,443 **** 170 | register struct tftphdr *tp; 171 | int length; 172 | register struct errmsg *pe; 173 | - extern char *sys_errlist[]; 174 | 175 | tp = (struct tftphdr *)buf; 176 | tp->th_opcode = htons((u_short)ERROR); 177 | --- 473,478 ---- 178 | *************** 179 | *** 446,452 **** 180 | if (pe->e_code == error) 181 | break; 182 | if (pe->e_code < 0) { 183 | ! pe->e_msg = sys_errlist[error - 100]; 184 | tp->th_code = EUNDEF; /* set 'undef' errorcode */ 185 | } 186 | strcpy(tp->th_msg, pe->e_msg); 187 | --- 481,487 ---- 188 | if (pe->e_code == error) 189 | break; 190 | if (pe->e_code < 0) { 191 | ! pe->e_msg = strerror(error - 100); 192 | tp->th_code = EUNDEF; /* set 'undef' errorcode */ 193 | } 194 | strcpy(tp->th_msg, pe->e_msg); 195 | *** /old/src/etc/tunefs.c Sun Feb 15 23:29:08 1987 196 | *** /old/src/ucb/tftp/main.c Mon Dec 26 15:50:19 1988 197 | --- /usr/src/ucb/tftp/main.c Wed May 15 21:08:00 1991 198 | *************** 199 | *** 1,7 **** 200 | /* 201 | ! * Copyright (c) 1985 Regents of the University of California. 202 | ! * All rights reserved. The Berkeley software License Agreement 203 | ! * specifies the terms and conditions for redistribution. 204 | */ 205 | 206 | #ifndef lint 207 | --- 1,20 ---- 208 | /* 209 | ! * Copyright (c) 1983 Regents of the University of California. 210 | ! * All rights reserved. 211 | ! * 212 | ! * Redistribution and use in source and binary forms are permitted 213 | ! * provided that: (1) source distributions retain this entire copyright 214 | ! * notice and comment, and (2) distributions including binaries display 215 | ! * the following acknowledgement: ``This product includes software 216 | ! * developed by the University of California, Berkeley and its contributors'' 217 | ! * in the documentation or other materials provided with the distribution 218 | ! * and in all advertising materials mentioning features or use of this 219 | ! * software. Neither the name of the University nor the names of its 220 | ! * contributors may be used to endorse or promote products derived 221 | ! * from this software without specific prior written permission. 222 | ! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 223 | ! * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 224 | ! * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 225 | */ 226 | 227 | #ifndef lint 228 | *************** 229 | *** 8,18 **** 230 | char copyright[] = 231 | "@(#) Copyright (c) 1983 Regents of the University of California.\n\ 232 | All rights reserved.\n"; 233 | ! #endif not lint 234 | 235 | #ifndef lint 236 | ! static char sccsid[] = "@(#)main.c 5.5 (Berkeley) 2/7/86"; 237 | ! #endif not lint 238 | 239 | /* Many bug fixes are from Jim Guyton */ 240 | 241 | --- 21,31 ---- 242 | char copyright[] = 243 | "@(#) Copyright (c) 1983 Regents of the University of California.\n\ 244 | All rights reserved.\n"; 245 | ! #endif /* not lint */ 246 | 247 | #ifndef lint 248 | ! static char sccsid[] = "@(#)main.c 5.9 (Berkeley) 6/1/90"; 249 | ! #endif /* not lint */ 250 | 251 | /* Many bug fixes are from Jim Guyton */ 252 | 253 | *************** 254 | *** 24,30 **** 255 | #include 256 | 257 | #include 258 | - #include 259 | 260 | #include 261 | #include 262 | --- 37,42 ---- 263 | *************** 264 | *** 281,288 **** 265 | targ = index(cp, ':'); 266 | *targ++ = 0; 267 | hp = gethostbyname(cp); 268 | ! if (hp == 0) { 269 | ! printf("%s: Unknown host.\n", cp); 270 | return; 271 | } 272 | bcopy(hp->h_addr, (caddr_t)&sin.sin_addr, hp->h_length); 273 | --- 293,301 ---- 274 | targ = index(cp, ':'); 275 | *targ++ = 0; 276 | hp = gethostbyname(cp); 277 | ! if (hp == NULL) { 278 | ! fprintf(stderr, "tftp: %s: ", cp); 279 | ! herror((char *)NULL); 280 | return; 281 | } 282 | bcopy(hp->h_addr, (caddr_t)&sin.sin_addr, hp->h_length); 283 | *************** 284 | *** 373,380 **** 285 | 286 | *src++ = 0; 287 | hp = gethostbyname(argv[n]); 288 | ! if (hp == 0) { 289 | ! printf("%s: Unknown host.\n", argv[n]); 290 | continue; 291 | } 292 | bcopy(hp->h_addr, (caddr_t)&sin.sin_addr, hp->h_length); 293 | --- 386,394 ---- 294 | 295 | *src++ = 0; 296 | hp = gethostbyname(argv[n]); 297 | ! if (hp == NULL) { 298 | ! fprintf(stderr, "tftp: %s: ", argv[n]); 299 | ! herror((char *)NULL); 300 | continue; 301 | } 302 | bcopy(hp->h_addr, (caddr_t)&sin.sin_addr, hp->h_length); 303 | *** /old/src/ucb/tftp/tftp.c Sun Jul 3 18:51:17 1988 304 | --- /usr/src/ucb/tftp/tftp.c Wed May 15 21:56:15 1991 305 | *************** 306 | *** 1,15 **** 307 | /* 308 | ! * Copyright (c) 1985 Regents of the University of California. 309 | ! * All rights reserved. The Berkeley software License Agreement 310 | ! * specifies the terms and conditions for redistribution. 311 | */ 312 | 313 | #ifndef lint 314 | ! static char sccsid[] = "@(#)tftp.c 5.5 (Berkeley) 2/7/86"; 315 | ! #endif not lint 316 | 317 | #ifdef BSD2_10 318 | ! #define timeoutbuf to_buf 319 | #endif 320 | 321 | /* Many bug fixes are from Jim Guyton */ 322 | --- 1,28 ---- 323 | /* 324 | ! * Copyright (c) 1983 Regents of the University of California. 325 | ! * All rights reserved. 326 | ! * 327 | ! * Redistribution and use in source and binary forms are permitted 328 | ! * provided that: (1) source distributions retain this entire copyright 329 | ! * notice and comment, and (2) distributions including binaries display 330 | ! * the following acknowledgement: ``This product includes software 331 | ! * developed by the University of California, Berkeley and its contributors'' 332 | ! * in the documentation or other materials provided with the distribution 333 | ! * and in all advertising materials mentioning features or use of this 334 | ! * software. Neither the name of the University nor the names of its 335 | ! * contributors may be used to endorse or promote products derived 336 | ! * from this software without specific prior written permission. 337 | ! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 338 | ! * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 339 | ! * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 340 | */ 341 | 342 | #ifndef lint 343 | ! static char sccsid[] = "@(#)tftp.c 5.9 (Berkeley) 6/1/90"; 344 | ! #endif /* not lint */ 345 | 346 | #ifdef BSD2_10 347 | ! #define timeoutbuf to_buf 348 | #endif 349 | 350 | /* Many bug fixes are from Jim Guyton */ 351 | *************** 352 | *** 67,73 **** 353 | register struct tftphdr *ap; /* data and ack packets */ 354 | struct tftphdr *r_init(), *dp; 355 | register int block = 0, size, n; 356 | ! register u_long amount = 0; 357 | struct sockaddr_in from; 358 | int fromlen; 359 | int convert; /* true if doing nl->crlf conversion */ 360 | --- 80,86 ---- 361 | register struct tftphdr *ap; /* data and ack packets */ 362 | struct tftphdr *r_init(), *dp; 363 | register int block = 0, size, n; 364 | ! u_long amount = 0; 365 | struct sockaddr_in from; 366 | int fromlen; 367 | int convert; /* true if doing nl->crlf conversion */ 368 | *************** 369 | *** 305,314 **** 370 | nak(error) 371 | int error; 372 | { 373 | register struct tftphdr *tp; 374 | int length; 375 | ! register struct errmsg *pe; 376 | ! extern char *sys_errlist[]; 377 | 378 | tp = (struct tftphdr *)ackbuf; 379 | tp->th_opcode = htons((u_short)ERROR); 380 | --- 318,327 ---- 381 | nak(error) 382 | int error; 383 | { 384 | + register struct errmsg *pe; 385 | register struct tftphdr *tp; 386 | int length; 387 | ! char *strerror(); 388 | 389 | tp = (struct tftphdr *)ackbuf; 390 | tp->th_opcode = htons((u_short)ERROR); 391 | *************** 392 | *** 317,323 **** 393 | if (pe->e_code == error) 394 | break; 395 | if (pe->e_code < 0) { 396 | ! pe->e_msg = sys_errlist[error - 100]; 397 | tp->th_code = EUNDEF; 398 | } 399 | strcpy(tp->th_msg, pe->e_msg); 400 | --- 330,336 ---- 401 | if (pe->e_code == error) 402 | break; 403 | if (pe->e_code < 0) { 404 | ! pe->e_msg = strerror(error - 100); 405 | tp->th_code = EUNDEF; 406 | } 407 | strcpy(tp->th_msg, pe->e_msg); 408 | *** /old/src/ucb/tftp/tftpsubs.c Mon Dec 26 15:50:20 1988 409 | --- /usr/src/ucb/tftp/tftpsubs.c Wed May 15 21:34:37 1991 410 | *************** 411 | *** 1,12 **** 412 | /* 413 | ! * Copyright (c) 1985 Regents of the University of California. 414 | ! * All rights reserved. The Berkeley software License Agreement 415 | ! * specifies the terms and conditions for redistribution. 416 | */ 417 | 418 | #ifndef lint 419 | ! static char sccsid[] = "@(#)tftpsubs.c 1.2 (Berkeley) 2/7/86"; 420 | ! #endif not lint 421 | 422 | /* Simple minded read-ahead/write-behind subroutines for tftp user and 423 | server. Written originally with multiple buffers in mind, but current 424 | --- 1,25 ---- 425 | /* 426 | ! * Copyright (c) 1983 Regents of the University of California. 427 | ! * All rights reserved. 428 | ! * 429 | ! * Redistribution and use in source and binary forms are permitted 430 | ! * provided that: (1) source distributions retain this entire copyright 431 | ! * notice and comment, and (2) distributions including binaries display 432 | ! * the following acknowledgement: ``This product includes software 433 | ! * developed by the University of California, Berkeley and its contributors'' 434 | ! * in the documentation or other materials provided with the distribution 435 | ! * and in all advertising materials mentioning features or use of this 436 | ! * software. Neither the name of the University nor the names of its 437 | ! * contributors may be used to endorse or promote products derived 438 | ! * from this software without specific prior written permission. 439 | ! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 440 | ! * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 441 | ! * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 442 | */ 443 | 444 | #ifndef lint 445 | ! static char sccsid[] = "@(#)tftpsubs.c 5.5 (Berkeley) 6/1/90"; 446 | ! #endif /* not lint */ 447 | 448 | /* Simple minded read-ahead/write-behind subroutines for tftp user and 449 | server. Written originally with multiple buffers in mind, but current 450 | *************** 451 | *** 190,196 **** 452 | c = *p++; /* pick up a character */ 453 | if (prevchar == '\r') { /* if prev char was cr */ 454 | if (c == '\n') /* if have cr,lf then just */ 455 | ! fseek(file, -1L, 1); /* smash lf on top of the cr */ 456 | else 457 | if (c == '\0') /* if have cr,nul then */ 458 | goto skipit; /* just skip over the putc */ 459 | --- 203,209 ---- 460 | c = *p++; /* pick up a character */ 461 | if (prevchar == '\r') { /* if prev char was cr */ 462 | if (c == '\n') /* if have cr,lf then just */ 463 | ! fseek(file, -1L, 1); /* smash lf on top of the cr */ 464 | else 465 | if (c == '\0') /* if have cr,nul then */ 466 | goto skipit; /* just skip over the putc */ 467 | *** /old/src/ucb/vlp/vlp.c Mon Feb 16 23:55:12 1987 468 | -------------------------------------------------------------------------------- /hints/KAZOO: -------------------------------------------------------------------------------- 1 | # Machine configuration file for 2.11BSD distributed kernel. 2 | # 3 | # Format: 4 | # name value comments 5 | # An item's value may be either numerical, boolean or a string; if it's 6 | # boolean, use "YES" or "NO" to set it or unset it, respectively. Use 7 | # the default value and the comments field as indicators of the type of 8 | # field it is. 9 | 10 | ######################################### 11 | # MACHINE DEPENDENT PARAMETERS # 12 | ######################################### 13 | 14 | # Machine type 15 | # 2.11 runs on: 16 | # 11/44/53/70/73/83/84/93/94 with 22 bit addressing 17 | # 2.11 WILL NOT run on: 18 | # T11, 11/03/04/05/10/15/20/21/23/24/34/35/40/45/50/55 19 | # (45/50/55 because of max memory contraints, the others 20 | # because the MMUs do not have split I/D and/or supervisor) 21 | # Any QBUS machine using an ABLE Microverter should be treated as 22 | # if it were an 11/70. 23 | # 24 | # You should also make a point of having both floating point hardware and 25 | # at least a megabyte of memory, if possible. They aren't that expensive, 26 | # and they make a big difference. 27 | # 28 | # Including UNIBUS map support for machines without a UNIBUS will not cause 29 | # a kernel to die. It simply includes code to support UNIBUS mapping if 30 | # present. 31 | 32 | # The define UNIBUS_MAP implements kernel support for UNIBUS mapped 33 | # machines. However, a kernel compiled with UNIBUS_MAP does *not* have to 34 | # be run on a UNIBUS machine. The define simply includes support for UNIBUS 35 | # mapping if the kernel finds itself on a machine with UNIBUS mapping. 36 | UNIBUS_MAP NO # include support for UNIBUS mapping 37 | # always: 11/44/70/84 38 | # sometimes: 11/24 39 | # never: 11/23/34/35/40/45/50/53/ 40 | # 55/60/73/83 41 | 42 | # The define Q22 states that the configured system is a 22-bit Q-BUS machine 43 | # (if UNIBUS mapping isn't found) and no 18-bit DMA disk or tape devices 44 | # exist. If Q22 is defined and an 18-bit DMA disk or tape does exist, reads 45 | # and writes to the raw devices will cause DMA transfers to and from user 46 | # space which might be above 18-bits (256K) which would cause random 47 | # sections of memory (probably the kernel) to be overwritten (for reads). 48 | # An 18-bit DH isn't a problem since it never does DMA to user space and 49 | # clists (even with UCB_CLIST defined) are never above 18-bits. 50 | # 51 | # Note, the Q22 define is only effective if the kernel finds itself on a 52 | # machine without UNIBUS mapping. Note also that the presence of UNIBUS 53 | # mapping is only tested for if UNIBUS_MAP is defined. 54 | Q22 YES # 22-bit Qbus with no 18-bit devices 55 | # always 11/53/73/83 56 | # sometimes: 11/23 57 | # never: 11/24/34/35/40/44/50/ 58 | # 55/60/70/84 59 | 60 | # Defining NONFP to NO compiles in support for hardware floating point. 61 | # However, this doesn't require that floating point hardware be present. 62 | # Defining NONFP to YES will save you a few hundred bytes of text. 63 | NONFP NO # if no floating point hardware 64 | 65 | # Defining FPSIM to YES compiles a floating point simulator into the kernel 66 | # which will catch floating point instruction traps from user space. Note 67 | # that defining FPSIM to YES will only cost you text space. If you actually 68 | # have floating point hardware, the simulator just won't be used. The floating 69 | # point simulator is automatically compiled in if PDP11 (below) is GENERIC. 70 | FPSIM NO # floating point simulator 71 | 72 | #LINEHZ 50 # clock frequency European 73 | LINEHZ 60 # clock frequency USA 74 | 75 | # To enable profiling, the :splfix script must be changed to use spl6 instead 76 | # of spl7 (see conf/:splfix.profile), also, you have to have a machine with a 77 | # supervisor PAR/PDR pair, i.e. an 11/44/45/50/53/55/70/73/83/84, as well 78 | # as both a KW11-L and a KW11-P. 79 | # 80 | # Note that profiling is not currently working. We don't have any plans on 81 | # fixing it, so this is essentially a non-supported feature. 82 | PROFILE NO # system profiling with KW11P clock 83 | 84 | # PDP-11 machine type; allowable values are GENERIC, 23, 24, 34, 35, 40, 85 | # 44, 45, 50, 53, 55, 60, 70, 73, 83, 84. GENERIC should only be used to 86 | # build a distribution kernel. 87 | #PDP11 GENERIC # distribution kernel 88 | #PDP11 44 # PDP-11/44 89 | #PDP11 70 # PDP-11/70 90 | PDP11 73 # PDP-11/73 91 | 92 | ######################################### 93 | # GENERAL SYSTEM PARAMETERS # 94 | ######################################### 95 | 96 | IDENT KAZOO # machine name 97 | MAXUSERS 10 # maxusers on machine 98 | 99 | # BOOTDEV is the letter combination denoting the autoboot device, 100 | # or NONE if not using the autoboot feature. 101 | #BOOTDEV NONE # don't autoboot 102 | #BOOTDEV dvhp # DIVA Comp/V boot device 103 | #BOOTDEV hk6 # rk06 boot device 104 | #BOOTDEV hk7 # rk07 boot device 105 | BOOTDEV ra # MSCP boot device 106 | #BOOTDEV rl # rl01/02 boot device 107 | #BOOTDEV rm # rm02/03/05 boot device 108 | #BOOTDEV br # Eaton BR1537/BR1711 boot device 109 | #BOOTDEV sc11 # Emulex SC11/B boot device 110 | #BOOTDEV sc21 # Emulex SC21 boot device 111 | #BOOTDEV si # si 9500 boot device 112 | 113 | # Timezone, in minutes west of GMT 114 | #TIMEZONE 300 # EST 115 | #TIMEZONE 360 # CST 116 | #TIMEZONE 420 # WST 117 | TIMEZONE 480 # PST 118 | DST 1 # Daylight Savings Time (1 or 0) 119 | 120 | # Filesystem configuration 121 | # Rootdev, swapdev etc. should be in terms of makedev. For example, 122 | # if you have an SMD drive using the xp driver, rootdev would be xp0a, 123 | # or "makedev(10,0)". Swapdev would be the b partition, xp0b, or 124 | # "makedev(10,1)". The 10 is the major number of the device (the offset 125 | # in the bdevsw table in conf.c) and the 0 and 1 are the minor numbers 126 | # which correspond to the partitions as described in the section 4 manual 127 | # pages. You can also get the major numbers from the MAKEDEV script in 128 | # /dev. 129 | PIPEDEV makedev(5,1) # makedev(10,0) xp0a 130 | ROOTDEV makedev(5,1) # makedev(10,0) xp0a 131 | SWAPDEV makedev(5,2) # makedev(10,1) xp0b 132 | SWAPLO 0 # swap start address, normally 0 133 | 134 | # DUMPROUTINE indicates which dump routine should be used. DUMPDEV 135 | # should be in terms of makedev. If DUMPDEV is NODEV no automatic 136 | # dumps will be taken, and DUMPROUTINE needs to be set to "nulldev" to 137 | # resolve the reference. See param.h and ioconf.c for more information. 138 | # DUMPLO should leave room for the kernel to start swapping without 139 | # overwriting the dump. 140 | DUMPLO 512 # dump start address 141 | DUMPDEV makedev(5,2) # makedev(10,1) xp0b 142 | #DUMPROUTINE nulldev # no dump routine. 143 | #DUMPROUTINE hkdump # hk driver dump routine 144 | #DUMPROUTINE hpdump # hp driver dump routine 145 | DUMPROUTINE radump # ra driver dump routine 146 | #DUMPROUTINE rldump # rl driver dump routine 147 | #DUMPROUTINE rmdump # rm driver dump routine 148 | #DUMPROUTINE brdump # br driver dump routine 149 | #DUMPROUTINE sidump # si driver dump routine 150 | #DUMPROUTINE xpdump # xp driver dump routine 151 | #DUMPROUTINE tmsdump # tms driver dump routine 152 | 153 | # NSWAP should be set to the 512-byte block length of the swap device, e.g. 154 | # 9120 for an RM05 B partition. 155 | #NSWAP 9405 # dvhp?b or xp?b, DIVA COMP V 156 | #NSWAP 5940 # hk?a, RK611, RK06/07 157 | #NSWAP 2376 # hk?b, RK611, RK06/07 158 | #NSWAP 12122 # br?b, Eaton BR1538 or BR1711 159 | #NSWAP 8779 # hp?b or xp?b, RP04/05/06 160 | #NSWAP 4800 # rm?b or xp?b, RM02/03 161 | #NSWAP 9120 # xp?b, RM05 162 | #NSWAP 17300 # rd?b, RD51/52/53 163 | NSWAP 3100 # rd?c, RD51/52/53 164 | #NSWAP 10032 # ra?b, RC25 165 | #NSWAP 33440 # ra?b, RA60/80/81 166 | #NSWAP 16720 # ra?b, RD54, RA82 167 | #NSWAP 10240 # rl?, RL01 168 | #NSWAP 20480 # rl?, RL02 169 | 170 | ######################################### 171 | # KERNEL CONFIGURATION # 172 | ######################################### 173 | 174 | BADSECT NO # bad-sector forwarding 175 | CGL_RTP NO # allow one real time process 176 | EXTERNALITIMES NO # map out inode time values 177 | UCB_CLIST NO # clists moved from kernel data space 178 | UCB_FRCSWAP NO # force swap on expand/fork 179 | NOKA5 NO # KA5 not used except for buffers 180 | # and clists (_end < 0120000); 181 | QUOTA NO # dynamic file system quotas 182 | # NOTE -- *very* expensive 183 | 184 | # UCB_METER is fairly expensive. Unless you really look at the statistics 185 | # that it produces, don't bother running with it on. Suggested usage is 186 | # when you want to tune your system or you're curious about how effective 187 | # some algorithm, for example, the text coremap cacheing, is. UCB_RUSAGE 188 | # isn't nearly as bad, and should probably be included, although it's not 189 | # necessary for anything. 190 | UCB_METER NO # vmstat performance metering 191 | UCB_RUSAGE YES # enable more rusage fields 192 | 193 | # If your system is *seriously* short of memory, and you're doing a lot of 194 | # thrashing, 2.10's implementation of vfork can hurt you. Otherwise, run 195 | # with it on. You do not have to recompile any applications when you change 196 | # it. You should also get rid of any local code that uses VIRUS_VFORK to 197 | # decide whether to call fork or vfork, they should just call vfork. 198 | VIRUS_VFORK YES # include vfork system call 199 | 200 | # NBUF is the size of the buffer cache, and is directly related to the UNIBUS 201 | # mapping registers. There are 32 total mapping registers, of which 30 are 202 | # available. The 0'th is used for CLISTS, and the 31st is used for the I/O 203 | # page on some PDP's. It's suggested that you allow 7 mapping registers 204 | # per UNIBUS character device so that you can move 56K of data on each device 205 | # simultaneously. The rest should be assigned to the block buffer pool. So, 206 | # if you have a DR-11 and a TM-11, you would leave 14 unassigned for them and 207 | # allocate 16 to the buffer pool. Since each mapping register addresses 8 208 | # buffers for a 1K file system, NBUF would be 128. A possible exception would 209 | # be to reduce the buffers to save on data space, as they were 24 bytes per 210 | # header, last time I looked. 211 | # should be 'small' for GENERIC, so room for kernel + large program to run. 212 | NBUF 32 # buffer cache, *must* be <= 240 213 | 214 | # MAXMEM is the maximum core per process is allowed. First number 215 | # is Kb. 216 | MAXMEM (300*16) # 300K max per process ... 217 | 218 | # DIAGNOSTIC does various run-time checks, some of which are pretty 219 | # expensive and at a high priority. Suggested use is when the kernel 220 | # is crashing and you don't know why, otherwise run with it off. 221 | DIAGNOSTIC YES # misc. diagnostic loops and checks 222 | 223 | # The following entries used to be part of the kernel configuration, and, 224 | # for various reasons, are no longer modifiable. They are included here 225 | # for historical information ONLY. If "YES", they are always included in 226 | # the kernel, if "NO", they are never included. 227 | 228 | # ACCT YES # process accounting 229 | # DISPLAY NO # PDP-11/45/70 display routine 230 | # INSECURE NO # don't clear setuid/gid bits on write 231 | # INTRLVE NO # file system/disk interleaving 232 | # MENLO_JCL YES # job control 233 | # MENLO_KOV YES # kernel uses overlaid call sequence 234 | # MENLO_OVLY YES # support user process text overlays 235 | # MPX_FILS NO # hooks for multiplexed files 236 | # OLDTTY YES # old line discipline 237 | # RAND_XO YES # rand file exclusive open (flock(2)) 238 | # SMALL YES # smaller inode, buf, sched queues 239 | # TEXAS_AUTOBAUD YES # tty image mode to support autobauding 240 | # UCB_AUTOBOOT YES # system is able to reboot itself 241 | # UCB_BHASH YES # hashed buffer accessing 242 | # UCB_DBUF YES # use one buffer per disk 243 | # UCB_DEVERR YES # print device errors in mnemonics 244 | # UCB_ECC YES # disk drivers should do ECC 245 | # UCB_FSFIX YES # crash resistant filesystems 246 | # UCB_GRPMAST NO # group master accounts 247 | # UCB_IHASH YES # hashed inode table 248 | # UCB_LOAD YES # load average and uptime 249 | # UCB_LOGIN NO # login sys call 250 | # UCB_NTTY YES # new tty driver 251 | # UCB_PGRP NO # count process limit by process group 252 | # UCB_RENICE YES # renice system call (setpriority(2)) 253 | # UCB_SCRIPT YES # shell scripts can specify interpreter 254 | # UCB_SUBM YES # "submit" processing (stty(1)) 255 | # UCB_SYMLINKS YES # symbolic links 256 | # UCB_UPRINTF YES # send error messages to user 257 | # UCB_VHANGUP YES # revoke control tty access 258 | # UNFAST NO # don't use inline.h macro speedups 259 | 260 | # DISKMON has been absorbed into UCB_METER. 261 | # DISKMON UCB_METER # iostat disk monitoring 262 | 263 | # BSLOP was a #define in param.c for the TIU/Spider. It seems that 264 | # particular printer would DMA a few extra characters for you for free. 265 | # V7 came with a BSLOP of 2, but it was normally set to 0. Add the 266 | # following #defines to param.c, then change all occurrences of BSIZE 267 | # to bsize. 268 | # 269 | # /* BSLOP can be 0 unless you have a TIU/Spider*/ 270 | # #define BSLOP 0 271 | # int bsize = BSIZE + BSLOP; /* size of buffers */ 272 | 273 | # The UCB_NKB flag requires changes to UNIX boot pgms as well as changes to 274 | # dump, restore, icheck, dcheck, ncheck, mkfs. It includes the options 275 | # previously known as UCB_SMINO (smaller inodes, NADDR = 7) and UCB_MOUNT 276 | # (multiple superblocks per internal buffer). It's measured in KB byte 277 | # system buffers, it's not just a boolean. If you're not hearing what 278 | # I'm saying, don't even *think* of changing it. 279 | # UCB_NKB 1 # "n" KB byte system buffers 280 | 281 | ######################################### 282 | # PERIPHERALS: DISK DRIVES # 283 | ######################################### 284 | 285 | NBR 0 # EATON BR1537/BR1711, BR1538A, B, C, D 286 | 287 | NHK 0 # RK611, RK06/07 288 | 289 | NRAC 1 # NRAD controllers 290 | NRAD 1 # RX50, RC25, RD51/52/53, RA60/80/81 291 | 292 | NRK 0 # RK05 293 | 294 | NRL 0 # RL01/02 295 | 296 | NRX 0 # RX02 297 | 298 | NSI 0 # SI 9500 driver for CDC 9766 disks 299 | 300 | # Because the disk drive type registers conflict with other DEC 301 | # controllers, you cannot use XP_PROBE for the Ampex 9300 and 302 | # Diva drives. Read through /sys/pdpuba/hpreg.h and /sys/pdpuba/xp.c 303 | # for information on how to initialize for these drives. 304 | NXPC 0 # NXPD controllers (RH70/RH11 style) 305 | NXPD 0 # RM02/03/05, RP04/05/06, CDC 9766, 306 | # Ampex 9300, Diva, Fuji 160, SI Eagle. 307 | XP_PROBE YES # check drive types at boot 308 | 309 | NRAM 0 # RAM disk size (512-byte blocks) 310 | 311 | ######################################### 312 | # PERIPHERALS: TAPE DRIVES # 313 | ######################################### 314 | 315 | NHT 0 # TE16, TU45, TU77 316 | 317 | # Setting AVIVTM configures the TM driver for the AVIV 800/1600/6250 318 | # controller (the standard DEC TM only supports 800BPI). For more details, 319 | # see /sys/pdpuba/tm.c. 320 | NTM 0 # TM11 321 | AVIVTM YES # AVIV 800/1600/6250 controller 322 | 323 | NTS 0 # TS11 324 | 325 | NTMSCP 0 # TMSCP controllers 326 | NTMS 0 # TMSCP drives 327 | TMSCP_DEBUG YES # debugging code in TMSCP drive (EXPENSIVE) 328 | 329 | ######################################### 330 | # PERIPHERALS: TERMINALS # 331 | ######################################### 332 | 333 | # NKL includes both KL11's and DL11's. 334 | # It should always be at least 1, for the console. 335 | NKL 1 # KL11, DL11 336 | NDH 0 # DH11; NDH is in units of boards (16 each) 337 | NDM 0 # DM11; NDM is in units of boards (16 each) 338 | NDHU 0 # DHU11 339 | NDHV 0 # DHV11 340 | NDZ 1 # DZ11; NDZ is in units of boards (8 each) 341 | 342 | ######################################### 343 | # PERIPHERALS: OTHER # 344 | ######################################### 345 | NDN 0 # DN11 dialer 346 | NLP 0 # Line Printer 347 | LP_MAXCOL 132 # Maximum number of columns on line printers 348 | NDR 0 # DR11-W 349 | 350 | ######################################### 351 | # PSEUDO DEVICES, PROTOCOLS, NETWORKING # 352 | ######################################### 353 | # Networking only works with split I/D and SUPERVISOR space, i.e. with the 354 | # 11/44/45/50/53/55/70/73/83/84. NETHER should be non-zero for networking 355 | # systems using any ethernet. CHECKSTACK makes sure the networking stack 356 | # pointer and the kernel stack pointer don't collide; it's fairly expensive 357 | # at 4 extra instructions for EVERY function call AND return, always left 358 | # NO unless doing serious debugging. 359 | UCB_NET YES # TCP/IP 360 | CHECKSTACK NO # Kernel&Supervisor stack pointer checking 361 | NETHER 1 # ether pseudo-device 362 | 363 | # Note, PTY's and the select(2) system call do not require the kernel to 364 | # be configured for networking (UCB_NET). Note that you can allocate PTY's 365 | # in any number (multiples of 8, of 16, even, odd, prime, whatever). Nothing 366 | # in the kernel cares. PTY's cost 78 bytes apiece in kernel data space. You 367 | # should probably have at least 16 since so many applications use them: 368 | # script, jove, window, rlogin, ... 369 | NPTY 0 # pseudo-terminals - GENERIC sys needs NONE 370 | 371 | # To make the 3Com Ethernet board work correctly, splimp has to be promoted 372 | # to spl6; splfix files that do this are in conf/3Com; the config script 373 | # hopefully does the right thing. 374 | NEC 0 # 3Com Ethernet 375 | NDE 0 # DEUNA/DELUA 376 | NIL 0 # Interlan Ethernet 377 | NSL 1 # Serial Line IP 378 | NQE 1 # DEQNA 379 | NQT 0 # DEQTA (DELQA-YM, DELQA-PLUS) 380 | NACC 0 # ACC LH/DH ARPAnet IMP interface 381 | PLI NO # LH/DH is connected to a PLI 382 | NIMP 0 # ARPAnet IMP 1822 interface 383 | 384 | # The following devices are untested in 2.11BSD; some are untested since 385 | # before 2.9BSD. Some won't even compile. Most will require modification 386 | # of various Makefiles to include the correct source. Good luck. 387 | ENABLE34 NO # if have the ENABLE34 board 388 | 389 | NCSS 0 # DEC/CSS IMP11-A ARPAnet IMP interface 390 | NDMC 0 # DMC11 391 | NEN 0 # Xerox prototype (3 Mb) Ethernet 392 | NHY 0 # Hyperchannel 393 | NS 0 # Xerox NS (XNS) 394 | NSRI 0 # SRI DR11c ARPAnet IMP 395 | NTB 0 # RS232 interface for Genisco/Hitachi tablets 396 | --------------------------------------------------------------------------------