opening the source repository with anonymous cvs charles
play

OPENING THE SOURCE REPOSITORY WITH ANONYMOUS CVS Charles D. Cranor - PDF document

OPENING THE SOURCE REPOSITORY WITH ANONYMOUS CVS Charles D. Cranor AT&T Labs-Research chuck@research.att.com Theo de Raadt The OpenBSD Project deraadt@openbsd.org 10-Jun-99 Chuck Cranor 1 OUTLINE Introduction and motivation


  1. OPENING THE SOURCE REPOSITORY WITH ANONYMOUS CVS Charles D. Cranor AT&T Labs-Research chuck@research.att.com Theo de Raadt The OpenBSD Project deraadt@openbsd.org 10-Jun-99 Chuck Cranor 1

  2. OUTLINE Introduction and motivation Background Anonymous CVS: design and implementation Other open source repository tools Conclusions 10-Jun-99 Chuck Cranor 2

  3. INTRODUCTION Open source: making inroads projects: Linux, BSD, GNU tools, Apache, Mozilla,... key attributes: - source code freely available - open license advantages: promote reliability/quality via: - independent code review - rapid evolution 10-Jun-99 Chuck Cranor 3

  4. INTRODUCTION Only a relatively few users take advantage of having access to source few people download it, fewer read it pre-compiled distributions quite successful open source developers do access it 10-Jun-99 Chuck Cranor 4

  5. WHAT OPEN SOURCE LACKS Standard "Open Source" only partly meets the needs of open source developers missing features - access to old versions of code - annotated per-file modification history - set files to a distribution or date - get current snapshot - merge in local changes features provided by source control system - local: SCCS, RCS - networked: CVS 10-Jun-99 Chuck Cranor 5

  6. THE PROBLEM WITH CVS CVS was not designed to be open (1995) host with cvs repository network client client client Usage requirements: - account on repository host - write access to repository Only select group of privileged developers can access CVS repository Counter to open source philosophy 10-Jun-99 Chuck Cranor 6

  7. OPEN SOURCE REPOSITORY Fall 1995: OpenBSD project started goal: open access to CVS repository - attracts users - makes it easier to download, debug, and manage source tree - easier to learn about the evolution of code result: Anonymous CVS service - Internet users have read-only access to data in repository... - extends "Open Source" concept to "Open Source Repository" 10-Jun-99 Chuck Cranor 7

  8. BACKGROUND Traditional source distribution USENET comp.sources.* Anonymous FTP / web sup rsync CTM All: Open source, but not open source repository 10-Jun-99 Chuck Cranor 8

  9. ANONYMOUS CVS Design goals: security efficiency convenience 10-Jun-99 Chuck Cranor 9

  10. ANONYMOUS CVS DESIGN cvs.openbsd.org anoncvs.openbsd.org sup sup /cvs /cvs master mirror internet anonymous cvs src anoncvs client Put AnonCVS on secondary server machine - replicate repository on AnonCVS server - control anonymous load on main server - no direct anonymous access to master repository 10-Jun-99 Chuck Cranor 10

  11. ANONYMOUS CVS DESIGN anoncvs.openbsd.org chroot sandbox from sup mirror of repository master anoncvs shell cvs binaries rsh/ssh sandboxed /tmp anonymous clients cron gets repository (via sup or rsync) mirror owned by non-priv account "anoncvs" account: no password, captive shell cvs runs in chroot sandbox environment 10-Jun-99 Chuck Cranor 11

  12. ANONYMOUS CVS Implementation issues cvs required writable log file - added CVSREADONLYFS environment variable file locking - CVS locking not an issue with read-only repository - incomplete CVS file: cannot happen 1. create temporary file 2. write complete file data to tmp file 3. rename() tmp file to real file [atomic] - SUP removes a CVS file (should not happen) - old/new mix: possible (even with standard CVS) 10-Jun-99 Chuck Cranor 12

  13. ANONYMOUS CVS Implementation issues (cont.) network flow control problem - CVS design goal: minimize locking time - problem: 1. lock CVS files 2. send update to remote system 3. unlock CVS files what if we block in step 2? (network flow control) n/b n/b update buffering net process process repository problem: no limit on buffering process’ buffer size solution: limit buffer size, ignore locking 10-Jun-99 Chuck Cranor 13

  14. ANONYMOUS CVS Anonymous CVS deployment Fall 1995: first anonymous CVS server (wustl.edu) Currently OpenBSD has 20 AnonCVS servers Usage: 2000 transactions/week (main server) Attracted contributors 10-Jun-99 Chuck Cranor 14

  15. OPEN SOURCE REPOSITORY After Anonymous CVS New Open Source Repository Tools created CVS’ pserver (cvs developers) - adds anonymous support to CVS - uses special CVS server ports - user interface requires login/password - often does not run in chroot() environment - now included with CVS CVSWeb (Bill Fenner, FreeBSD) - browse CVS repository via web client - no local CVS tools required - graphic user interface to CVS 10-Jun-99 Chuck Cranor 15

  16. OPEN SOURCE REPOSITORY After Anonymous CVS (cont.) CVSSup (John Polstra) - current state of the art in Open Source Repository tools - can distribute repository or source tree - uses highly efficient streaming protocol - knows file formats: 1. CVS/RCS files 2. log files 3. unknown (uses rsync algorithm) - can merge into local repository - has graphic user interface - requires Modula3 to compile 10-Jun-99 Chuck Cranor 16

  17. CONTRIBUTIONS we have extended "Open Source" to the next level Open Source => Open Source Repository positive effect of Anonymous CVS (e.g. OpenBSD) Anonymous CVS helped lead to the introduction of new Open Source Repository tools Many large projects have embraced Anonymous CVS - Ecgs, FreeBSD, Mozilla, Apache, etc. 10-Jun-99 Chuck Cranor 17

Recommend


More recommend