Home
>>    




Software Design and Implementation

CS 251 (SD), Fall 2018

A tarball is a single file that records the structure and contents of multiple other files and directories, for convenient transport and reconstitution. For example, all the source code and auxiliary files (e.g., Makefile) needed to build a project could be packed into a tarball, then that tarball could be copied to another computer, and unpacked in order to produce a copy of those source and auxiliary files, in order to build that software on the new machine. Tarballs provide a standard way to share software, particularly for Linux. In CS 251, teams deliver their software to the public by creating a tarball of their project code and adding that tarball file to their team's project page.

This page describes an in-class exercise in which each project team

Exercise

  1. Making a tarball.
    • Include README file, Makefile, all source files, example data, everything needed to make and test your program
    • Exclude .o files, executables, ~ files, etc.

    For this exercise, include some subset of your files that compiles and runs, temporarily modifying your Makefile if necessary

    README should explain how to build and run your project code

    Command line:

    %  tar cfz proj.tar.gz README Makefile *.cpp *.h ...
    

    Makefile target (invoke using % make tarball ):

    TARBALL_FILES = README Makefile $(wildcard *.cpp *.h) ...
    tarball:  $(TARBALL_FILES)
    	tar cfz proj.tar.gz $(TARBALL_FILES)
    

    Finally, upload your tarball to the wiki, link to your wiki page, and add your wiki page to the Community portal

  2. testing another team's tarball

    • Retrieve from Community portal

    • %  mkdir proj
      %  mv proj.tar.gz proj
      %  cd proj
      %  tar xvfz proj.tar.gz
      

    • Examine README file within the expanded tarball (perhaps in a subdirectory of proj for instructions for building the code.

    • Use the team's Makefile to make the code, according to the README instructions

    • Try a test run...

  3. providing feedback to the other team - feedback form