Difference between revisions of "COMP 3000 Lab 5 2012"

From Soma-notes
Jump to navigation Jump to search
Line 13: Line 13:
Note the answers for this part go in a file PART-A, with each answer on a line by itself, starting with the first line.  There should be '''no''' line numbers; just the commands that are asked for.  Expect these answers to be graded automatically!
Note the answers for this part go in a file PART-A, with each answer on a line by itself, starting with the first line.  There should be '''no''' line numbers; just the commands that are asked for.  Expect these answers to be graded automatically!


# Install the <tt>dpkg-dev</tt> package.  Give the exact apt-get command you used to install it.
# Install the <tt>netcat-traditional</tt> package.  Give the exact apt-get command you used to install it.
# Install the <tt>netcat-traditional</tt> package.  Give the exact apt-get command you used to install it.
# Download the source for <tt>netcat-traditional</tt>.  Give the exact apt-get command you used to download the source.
# Give the command to make netcat (nc) listen on port 4000 for incoming connections and execute /usr/bin/bc on every connection.  (Note it will be difficult to do this if you use the netcat-openbsd package.)
# Give the command to make netcat (nc) listen on port 4000 for incoming connections and execute /usr/bin/bc on every connection.  (Note it will be difficult to do this if you use the netcat-openbsd package.)
# Give the command needed to have netcat connect to the server you created in the previous question.  Connect from the same machine, i.e., use "localhost" as the host.
# Give the command needed to have netcat connect to the server you created in the previous question.  Connect from the same machine, i.e., use "localhost" as the host.
# Give the command line needed to extract the contents of the <tt>netcat-traditional</tt> package you installed into the directory CONTENTS, using the <tt>dpkg-deb</tt> command.
# Give the command line needed to extract the contents of the <tt>netcat-traditional</tt> package you installed into the directory CONTENTS, using the <tt>dpkg-deb</tt> command.
# Give the command line needed to extract the control files of the <tt>netcat-traditional</tt> package you installed into the directory CONTROL, using the <tt>dpkg-deb</tt> command.
# Give the command line needed to extract the control files of the <tt>netcat-traditional</tt> package you installed into the directory CONTROL, using the <tt>dpkg-deb</tt> command.
# Install the <tt>dpkg-dev</tt> package.  Give the exact apt-get command you used to install it.
# Install the <tt>fakeroot</tt> package.  Give the exact apt-get command you used to install it.
# Install the <tt>quilt</tt> package.  Give the exact apt-get command you used to install it.
# Download the unpacked source for <tt>netcat-traditional</tt>.  Give the exact apt-get command you used to download the source.
# Give the command line needed to build the source package you downloaded, using dpkg-buildpackage and fakeroot, only building the binary packages.


==Part B==
==Part B==

Revision as of 14:46, 28 October 2012

THIS LAB IS STILL UNDER CONSTRUCTION

In this lab you will be creating a new package for ubuntu called netcat-comp3000, based on the netcat-traditional package. We will be grading the .deb file you create using scripts, so be sure to follow the directions below carefully!

(Note that there exist other netcat packages, such as netcat-openbsd. Please use netcat-traditional for this lab!)

You will submit a file netcat-comp3000_1.10-39comp3000_amd64.deb or netcat-comp3000_1.10-39comp3000_i386.deb, depending on whether you are running a 64 or 32-bit version of Ubuntu 12.04. The answers to Part A should appear in a file /usr/share/doc/netcat-comp3000/PART-A when the package is installed, with each answer appearing on one line, and with the very first answer appearing on the very first line of the file. This file MUST be a UNIX next file (delimited by LF)!

If you do not manage to finish Part B, just submit this answers file for partial credit.

Part A

Note the answers for this part go in a file PART-A, with each answer on a line by itself, starting with the first line. There should be no line numbers; just the commands that are asked for. Expect these answers to be graded automatically!

  1. Install the netcat-traditional package. Give the exact apt-get command you used to install it.
  2. Give the command to make netcat (nc) listen on port 4000 for incoming connections and execute /usr/bin/bc on every connection. (Note it will be difficult to do this if you use the netcat-openbsd package.)
  3. Give the command needed to have netcat connect to the server you created in the previous question. Connect from the same machine, i.e., use "localhost" as the host.
  4. Give the command line needed to extract the contents of the netcat-traditional package you installed into the directory CONTENTS, using the dpkg-deb command.
  5. Give the command line needed to extract the control files of the netcat-traditional package you installed into the directory CONTROL, using the dpkg-deb command.
  6. Install the dpkg-dev package. Give the exact apt-get command you used to install it.
  7. Install the fakeroot package. Give the exact apt-get command you used to install it.
  8. Install the quilt package. Give the exact apt-get command you used to install it.
  9. Download the unpacked source for netcat-traditional. Give the exact apt-get command you used to download the source.
  10. Give the command line needed to build the source package you downloaded, using dpkg-buildpackage and fakeroot, only building the binary packages.

Part B

Outline for lab

  • install netcat deb, binary package, run it, examine contents
  • examine source package, modify, build binary package
  • look at default configuration, work with debconf
  • make netcat-based server that is started at boot time: server should print seconds since boot and student name?