Research PDP7 development
[unix-history] / README.md
CommitLineData
430b982f
DS
1# Unix History Repository
2The history and evolution of the Unix operating system is made available
3as a revision management repository, covering the period from its
4inception in 1970 as a 2.5 thousand line kernel and 26 commands,
5to 2017 as a widely-used 27 million line system. The 1.1GB repository
6contains about half a million commits and more than two thousand merges.
7The repository employs Git system for its storage and is hosted on GitHub.
8It has been created by synthesizing with custom software 24 snapshots of
9systems developed at Bell Labs, the University of California at Berkeley,
10and the 386BSD team, two legacy repositories, and the modern repository
11of the open source FreeBSD system.
12In total, about one thousand individual contributors are identified,
13the early ones through primary research.
14The data set can be used for empirical research in software engineering,
15information systems, and software archaeology.
16
17You can read more details about the contents, creation, and uses of this
18repository through [this link](http://www.dmst.aueb.gr/dds/pubs/jrnl/2016-EMPSE-unix-history/html/unix-history.html).
19
20Two repositories are associated with the project:
21* [unix-history-repo](https://github.com/dspinellis/unix-history-repo) is
22 a repository representing a
23 reconstructed version of the Unix history, based on the currently
24 available data. This repository will be often automatically regenerated from
25 scratch, so this is not a place to make contributions.
26 To ensure replicability its users are encouraged to fork it or archive it.
27* [unix-history-make](https://github.com/dspinellis/unix-history-make) is
28 a repository containing code and metadata used to build the above repository.
29 Contributions to this repository are welcomed.
30
31## Project status
32The project has achieved its major goal with the establishment of a continuous timeline from 1970 until today. The repository contains:
33
34* snapshots of PDP-7, V1, V2, V3, V4, V5, V6, and V7 Research Edition,
35* Unix/32V,
36* all available BSD releases,
37* the CSRG SCCS history,
38* two releases of 386BSD,
39* the 386BSD patchkit,
40* the FreeBSD 1.0 to 1.1.5 CVS history,
41* an import of the FreeBSD repository starting from its initial imports that led to FreeBSD 2.0, and
42* the current FreeBSD repository.
43
44The files appear to be added in the repository in chronological order according to their modification time, and large parts of the source code have been attributed to their actual authors. Commands like `git blame` and `git log` produce the expected results.
45
46The repository contains a number of two-way merges.
47
48* 3 BSD is merged from Unix/32V and Research Edition 6
49* Various BSD releases are merged from the development branch and a time point of BSD-SCCS
50* FreeBSD 1.0 is merged from Net/2 BSD and 386BSD-0.1-patchkit
51* FreeBSD 2.0 is merged from BSD 4.4/Lite1 and FreeBSD 1.1.5
52
53Blame is apportioned appropriately.
54
55## Tags and Branches
56The following tags or branch names mark specific releases, listed in rough chronological order.
57* Epoch
58* Research-PDP7
59* Research-V1
60* Research-V2
61* Research-V3
62* Research-V4
63* Research-V5
64* Research-V6
65* BSD-1
66* BSD-2
67* Research-V7
68* Bell-32V
69* BSD-3
70* BSD-4
71* BSD-4\_1\_snap
72* BSD-4\_1c\_2
73* BSD-4\_2
74* BSD-4\_3
75* BSD-4\_3\_Reno
76* BSD-4\_3\_Net\_1
77* BSD-4\_3\_Tahoe
78* BSD-4\_3\_Net\_2
79* BSD-4\_4
80* BSD-4\_4\_Lite1
81* BSD-4\_4\_Lite2
82* BSD-SCCS-END
83* 386BSD-0.0
84* 386BSD-0.1
85* 386BSD-0.1-patchkit
86* FreeBSD-release/1.0, 1.1, 1.1.5
87* FreeBSD-release/2.0 2.0.5, 2.1.0, 2.1.5, 2.1.6, 2.1.6.1, 2.1.7, 2.2.0, 2.2.1, 2.2.2, 2.2.5, 2.2.6, 2.2.7, 2.2.8
88* FreeBSD-release/3.0.0, 3.1.0, 3.2.0, 3.3.0, 3.4.0, 3.5.0
89* FreeBSD-release/4.0.0 4.1.0, 4.1.1, 4.2.0, 4.3.0, 4.4.0, 4.5.0, 4.6.0, 4.6.1, 4.6.2, 4.7.0, 4.8.0, 4.9.0, 4.10.0, 4.11.0
90* FreeBSD-release/5.0.0 5.1.0, 5.2.0, 5.2.1, 5.3.0, 5.4.0, 5.5.0
91* FreeBSD-release/6.0.0, 6.1.0, 6.2.0, 6.3.0, 6.4.0
92* FreeBSD-release/7.0.0, 7.1.0, 7.2.0, 7.3.0, 7.4.0
93* FreeBSD-release/8.0.0, 8.1.0, 8.2.0, 8.3.0, 8.4.0
94* FreeBSD-release/9.0.0, 9.1.0, 9.2.0
95* FreeBSD-release/10.0.0, 10.1.0, 10.2.0, 10.3.0
96* FreeBSD-release/11.0.0, 11.0.1
97
98A detailed description of the major tags is available in the
99file [releases.md](https://github.com/dspinellis/unix-history-make/blob/master/releases.md).
100
101More tags and branches are available.
102* The `-Snapshot-Development` branches denote commits that have been synthesized from a time-ordered sequence of a snapshot's files.
103* The `-VCS-Development` tags denote the point along an imported version control history branch where a particular release occurred.
104
105## Cool things you can do
106
107The easiest thing you can do is to
108watch the repository's [Gource Visualization](https://youtu.be/S7JB0mhrGCQ).
109
110If you have a broadband network connection and about 1.5GB of free disk space,
111you can download the repository and run Git commands that go back decades.
112Run
113```sh
114git clone https://github.com/dspinellis/unix-history-repo
115git checkout BSD-Release
116```
117to get a local copy of the Unix history repository.
118### View log across releases
119Running
120```sh
121git log --reverse --date-order
122```
123will give you commits such as the following
124
125```
126commit 64d7600ea5210a9125bd1a06e5d184ef7547d23d
127Author: Ken Thompson <ken@research.uucp>
128Date: Tue Jun 20 05:00:00 1972 -0500
129
130 Research V1 development
131 Work on file u5.s
132
133 Co-Authored-By: Dennis Ritchie <dmr@research.uucp>
134 Synthesized-from: v1/sys
135[...]
136commit 4030f8318890a026e065bc8926cebefb71e9d353
137Author: Ken Thompson <ken@research.uucp>
138Date: Thu Aug 30 19:30:25 1973 -0500
139
140 Research V3 development
141 Work on file sys/ken/slp.c
142
143 Synthesized-from: v3
144[...]
145commit c4999ec655319a01e84d9460d84df824006f9e2d
146Author: Dennis Ritchie <dmr@research.uucp>
147Date: Thu Aug 30 19:33:01 1973 -0500
148
149 Research V3 development
150 Work on file sys/dmr/kl.c
151
152 Synthesized-from: v3
153[...]
154commit 355c543c6840fa5f37d8daf2e2eaa735ea6daa4a
155Author: Brian W. Kernighan <bwk@research.uucp>
156Date: Tue May 13 19:43:47 1975 -0500
157
158 Research V6 development
159 Work on file usr/source/rat/r.g
160
161 Synthesized-from: v6
162[...]
163commit 0ce027f7fb2cf19b7e92d74d3f09eb02e8fea50e
164Author: S. R. Bourne <srb@research.uucp>
165Date: Fri Jan 12 02:17:45 1979 -0500
166
167 Research V7 development
168 Work on file usr/src/cmd/sh/blok.c
169
170 Synthesized-from: v7
171[...]
172Author: Eric Schmidt <schmidt@ucbvax.Berkeley.EDU>
173Date: Sat Jan 5 22:49:18 1980 -0800
174
175 BSD 3 development
176
177 Work on file usr/src/cmd/net/sub.c
178```
179### View changes to a specific file
180Run
181```sh
182git checkout Research-Release
183git log --follow --simplify-merges usr/src/cmd/c/c00.c
184```
185to see dates on which the C compiler was modified.
186### Annotate lines in a specific file by their version
187Run
188```
189git blame -C -C usr/sys/sys/pipe.c
190```
191to see how the Unix pipe functionality evolved over the years.
192```
1933cc1108b usr/sys/ken/pipe.c (Ken Thompson 1974-11-26 18:13:21 -0500 53) rf->f_flag = FREAD|FPIPE;
1943cc1108b usr/sys/ken/pipe.c (Ken Thompson 1974-11-26 18:13:21 -0500 54) rf->f_inode = ip;
1953cc1108b usr/sys/ken/pipe.c (Ken Thompson 1974-11-26 18:13:21 -0500 55) ip->i_count = 2;
196[...]
1971f183be2 usr/sys/sys/pipe.c (Ken Thompson 1979-01-10 15:19:35 -0500 122) register struct inode *ip;
1981f183be2 usr/sys/sys/pipe.c (Ken Thompson 1979-01-10 15:19:35 -0500 123)
1991f183be2 usr/sys/sys/pipe.c (Ken Thompson 1979-01-10 15:19:35 -0500 124) ip = fp->f_inode;
2001f183be2 usr/sys/sys/pipe.c (Ken Thompson 1979-01-10 15:19:35 -0500 125) c = u.u_count;
2011f183be2 usr/sys/sys/pipe.c (Ken Thompson 1979-01-10 15:19:35 -0500 126)
2021f183be2 usr/sys/sys/pipe.c (Ken Thompson 1979-01-10 15:19:35 -0500 127) loop:
2031f183be2 usr/sys/sys/pipe.c (Ken Thompson 1979-01-10 15:19:35 -0500 128)
2041f183be2 usr/sys/sys/pipe.c (Ken Thompson 1979-01-10 15:19:35 -0500 129) /*
2059a9f6b22 usr/src/sys/sys/pipe.c (Bill Joy 1980-01-05 05:51:18 -0800 130) * If error or all done, return.
2069a9f6b22 usr/src/sys/sys/pipe.c (Bill Joy 1980-01-05 05:51:18 -0800 131) */
2079a9f6b22 usr/src/sys/sys/pipe.c (Bill Joy 1980-01-05 05:51:18 -0800 132)
2089a9f6b22 usr/src/sys/sys/pipe.c (Bill Joy 1980-01-05 05:51:18 -0800 133) if (u.u_error)
2099a9f6b22 usr/src/sys/sys/pipe.c (Bill Joy 1980-01-05 05:51:18 -0800 134) return;
2106d632e85 usr/sys/ken/pipe.c (Ken Thompson 1975-07-17 10:33:37 -0500 135) plock(ip);
2116d632e85 usr/sys/ken/pipe.c (Ken Thompson 1975-07-17 10:33:37 -0500 136) if(c == 0) {
2126d632e85 usr/sys/ken/pipe.c (Ken Thompson 1975-07-17 10:33:37 -0500 137) prele(ip);
2136d632e85 usr/sys/ken/pipe.c (Ken Thompson 1975-07-17 10:33:37 -0500 138) u.u_count = 0;
2146d632e85 usr/sys/ken/pipe.c (Ken Thompson 1975-07-17 10:33:37 -0500 139) return;
2156d632e85 usr/sys/ken/pipe.c (Ken Thompson 1975-07-17 10:33:37 -0500 140) }
216```
217## How you can help
218You can help if you were there at the time, or if you can locate a
219source that contains information that is currently missing.
220* If your current GitHub account is not linked to your past contributions,
221 (you can search them through
222 [this page](http://www.spinellis.gr/cgi-bin/namegrep.pl)),
223 associate your past email with your current account through your
224 [GitHub account settings](https://github.com/settings/emails).
225 (Contact me for instructions on how to add email addresses to which you no
226 longer have access.)
227* Look for errors and omissions in the
228 [files that map file paths to authors](https://github.com/dspinellis/unix-history-make/blob/master/src/author-path).
229* Look for parts of the system that have not yet been attributed
230 [in these files](https://github.com/dspinellis/unix-history-make/blob/master/src/unmatched)
231 and propose suitable attributions.
232 Keep in mind that attributions for parts that were developed in one place
233 and modified elsewhere (e.g. developed at Bell Labs and modified at Berkeley)
234 should be for the person who did the modification, not the original author.
235* Look for authors whose identifier starts with ```x-``` in the
236 author id to name map files for
237 [Bell Labs](https://github.com/dspinellis/unix-history-make/blob/master/src/bell.au),
238 and
239 [Berkeley](https://github.com/dspinellis/unix-history-make/blob/master/src/berkeley.au),
240 and provide or confirm their actual login identifier.
241 (The one used is a guess.)
242* Contribute a path regular expression to contributor map file
243 (see [v7.map](https://github.com/dspinellis/unix-history-make/blob/master/src/author-path/v7)) for
244 [4.2BSD](http://www.tuhs.org/Archive/4BSD/Distributions/4.2BSD/),
245 [4.3BSD](http://www.tuhs.org/Archive/4BSD/Distributions/4.3BSD/),
246 [4.3BSD-Reno](http://www.tuhs.org/Archive/4BSD/Distributions/4.3BSD-Reno/),
247 [4.3BSD-Tahoe](http://www.tuhs.org/Archive/4BSD/Distributions/4.3BSD-Tahoe/),
248 [4.3BSD-Alpha](http://www.tuhs.org/Archive/4BSD/Distributions/4.3BSD-Alpha/), and
249 [Net2](http://www.tuhs.org/Archive/4BSD/Distributions/Net2/).
250* Import further branches, such as 2BSD, NetBSD, OpenBSD, and _Plan 9 from Bell Labs_.
251
252## Re-creating the historical repository from scratch
253The -make repository is provided to share and document the creation process, rather than as a bullet-proof way to get consistent and repeatable results. For instance, importing the snapshots on a system that is case-insensitive (NTFS, HFS Plus with default settings) will result in a few files getting lost.
254
255### Prerequisites
256* Git
257* Perl
258* The Perl modules `VCS::SCCS` and `Git::FastExport`
259(Install with `sudo cpanm VCS::SCCS Git::FastExport`.)
260* If compiling patch under GNU/Linux and library `libbsd`
261(e.g. the `libbsd-dev` package).
262* Sudo (and authorization to use it to mount ISO images)
263
264### Repository creation
265The -repo repository can be created with the following commands.
266```sh
267make
268./import.sh
269```
270
271## Adding a single source
272If you want to add a new source without running the full import process,
273you can do the following.
274
275* Prepare the source's maps and data
276* `cd` to the repo directory
277* Checkout the repo at the point where the new source will branch out
278* Run a Perl command such as the following.
279
280```
281perl ../import-dir.pl [-v] -m Research-V7 -c ../author-path/Bell-32V \
282-n ../bell.au -r Research-V7 -i ../ignore/Bell-32V \
283$ARCHIVE/32v Bell 32V -0500 | gfi
284```
285
286## Further reading
287- Diomidis Spinellis. A repository of Unix history and evolution. *Empirical Software Engineering*, 2017. doi:10.1007/s10664-016-9445-5.
288[HTML](http://www.dmst.aueb.gr/dds/pubs/jrnl/2016-EMPSE-unix-history/html/unix-history.html), [PDF](http://www.dmst.aueb.gr/dds/pubs/jrnl/2016-EMPSE-unix-history/html/unix-history.pdf)
289- Diomidis Spinellis. A repository with 44 years of Unix evolution. In *MSR '15: Proceedings of the 12th Working Conference on Mining Software Repositories*, pages 13-16. IEEE, 2015. Best Data Showcase Award. [PDF](http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.pdf), [HTML](http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html), [poster](http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/poster.pdf).
290- Warren Toomey, First Edition Unix: Its Creation and Restoration, in *IEEE Annals of the History of Computing*, vol. 32, no. 3, pp. 74-82, July-Sept. 2010. doi:10.1109/MAHC.2009.55. [PDF](http://www.tuhs.org/Archive/Documentation/Papers/1eUnix_creation_restoration.pdf)
291- Warren Toomey, The Restoration of Early UNIX Artifacts, in *USENIX ATC '09: 2009 USENIX Annual Technical Conference*. 2009. [PDF](https://www.usenix.org/legacy/events/usenix09/tech/full_papers/toomey/toomey.pdf)
292- Diomidis Spinellis, Panagiotis Louridas, and Maria Kechagia. An exploratory study on the evolution of C programming in the Unix operating system. In Qing Wang and Guenther Ruhe, editors, *ESEM '15: 9th International Symposium on Empirical Software Engineering and Measurement*, pages 54–57. IEEE, October 2015. [HTML](http://www.dmst.aueb.gr/dds/pubs/conf/2015-ESEM-CodeStyle/html/SLK15.html), [PDF](http://www.dmst.aueb.gr/dds/pubs/conf/2015-ESEM-CodeStyle/html/SLK15.pdf)
293- Diomidis Spinellis, Panos Louridas, and Maria Kechagia. The evolution of C programming practices: A study of the Unix operating system 1973–2015. In Willem Visser and Laurie Williams, editors, *ICSE '16: Proceedings of the 38th International Conference on Software Engineering*, May 2016. Association for Computing Machinery. doi:10.1145/2884781.2884799. [PDF](http://www.dmst.aueb.gr/dds/pubs/conf/2016-ICSE-ProgEvol/html/SLK16.pdf), [HTML](http://www.dmst.aueb.gr/dds/pubs/conf/2016-ICSE-ProgEvol/html/SLK16.html)
294- Wikipedia: The Free Encyclopedia
295 - [History of Unix](https://en.wikipedia.org/wiki/History_of_Unix)
296 - [List of Unix systems](https://en.wikipedia.org/wiki/List_of_Unix_systems)
297 - [List of Unix commands](https://en.wikipedia.org/wiki/List_of_Unix_commands)
298 - [List of Unix daemons](https://en.wikipedia.org/wiki/List_of_Unix_daemons)
299 - [Research Unix](https://en.wikipedia.org/wiki/Research_Unix)
300 - [Berkeley Software Distribution](http://en.wikipedia.org/wiki/BSD_Unix)
301 - [Unix philosophy](https://en.wikipedia.org/wiki/Unix_philosophy)
302- TUHS: The Unix Heritage Society
303 - [The Unix Tree](http://minnie.tuhs.org/cgi-bin/utree.pl)
304- Historical documents and data
305 - [PDP-7 Unix restoration project](https://github.com/DoctorWkt/pdp7-unix)
306 - [First Edition Unix printout - 1972](http://bitsavers.trailing-edge.com/pdf/bellLabs/unix/PreliminaryUnixImplementationDocument_Jun72.pdf)
307 - [Unix 32/V Report - 1978](http://cm.bell-labs.com/cm/cs/who/dmr/otherports/32vscan.pdf)
308 - [Berkeley CSRG Archive CD-ROMs](https://www.mckusick.com/csrg/index.html)
309- Studies
310 - [M. Douglas McIlroy. A Research UNIX Reader: Annotated Excerpts from the Programmer's Manual, 1971-1986](https://archive.org/details/a_research_unix_reader)
311 - [Michael S. Mahoney. Unix at the Bell Labs - People](http://www.princeton.edu/~hos/Mahoney/unixpeople.htm)
312
313## Acknowledgements
314* The following people helped with Bell Labs login identifiers.
315 * Brian W. Kernighan
316 * Doug McIlroy
317 * Arnold D. Robbins
318* The following people helped with *BSD login identifiers.
319 * Clem Cole
320 * Era Eriksson
321 * Mary Ann Horton
322 * Warner Losh
323 * Kirk McKusick
324 * Jeremy C. Reed
325 * Ingo Schwarze
326 * Anatole Shaw
327* The BSD SCCS import code is based on work by
328 * [H. Merijn Brand](http://search.cpan.org/~hmbrand/VCS-SCCS-0.20/SCCS.pm)
329 * [Jonathan Gray](https://github.com/jonathangray/csrg-git-patches/)
330
331## Build identification
332* Software URL: https://github.com/dspinellis/unix-history-make
333* Software SHA: 2548f4c5a28844490f036cc103a41432b06d9e58
334* Build timestamp: 2018-11-29 15:37:02 UTC