Open Source Software — CSCI-4961-01 — Summer 2018 Quiz 1 June 28, 2018 Name: @rpi.edu RCS ID: RIN#: Honor pledge: On my honor I have neither given nor received aid on this exam. Please sign here to indicate that you agree with the honor pledge: Instructions: • Clearly print your name, RCS ID (in all caps.) and your RIN at the top of your exam. • This test is open book, open notes and open computer. You may not use the internet. Please turn off your wifi. • There are 7 questions on this test worth a total of 95 points. 1. Short answers (18 pts) (a) Richard Stallman defines free software as possessing four essential freedoms. Please list them below. (12 pts) i. ii. iii. iv. (b) Open source licenses generally fall into two basic types: Copyleft and Permissive. Please define Copyleft and Permissive licenses below. (6 pts) i. The characteristics of a Copyleft license are: ii. The characteristics of a Permissive license are: 2. Please indicate whether each of the following licenses or licensing scenarios results in a permissive, copyleft, proprietary or public domain (12 points): (a) Licensed with GPL: (b) Licensed with BSD: (c) An integration of two open source projects one licensed copyleft and the other licensed permissive: (d) No license: 3. For each question below, circle the best answer (12 pts) (a) Which command shows you a summary of all commits into a git repository? i. git branch ii. git status iii. git checkout newbranch iv. git log 2 (b) Literate programming: i. Is well structured code with minimal comments ii. Cannot express complicated algorithms iii. Mixes code and comments in an easily human readable format iv. Is a failed development methodology (c) Open or Free software: i. Cannot be used for a commercial purpose ii. Can be redistributed either for free or for a fee iii. Can be sold, but only for the nominal cost of the media used to store it iv. Must be maintained by unpaid volunteers (d) It is a good idea when selecting an open source license to: i. Go to an authority such as the OSI and pick an approved license ii. Create a new license from scratch because it is unlikely that an existing license would meet your needs iii. Just place the code in a public repository. Easily available code is the same as open iv. Take an existing, approved license and modify to better represent your unique personality 4. Give a sequence of git commands to accomplish the following (you can assume that you are always working on the “master” branch”) (15 pts): (a) Create a new git repository on your local machine. (b) Assume you have a new file “foo.txt” in your local directory. Add this file to your repository. (c) Set up your repository to communicate with a public repository at “https://www.mypublicrepository/public.git” (d) Send your changes to the public repository (e) Assume someone else makes changes to the repository. Add the changes in the public repository into your local version. Write git commands below: 3 5. Write markdown to duplicate the document below. You can assume the photo name is “photo.jpg” (15 pts): Write Markdown commands below: 4 6. Assume you have 3 source files a main file “prog.c” and two additional files“f1.c”, and “f2.c” containing code that “prog” depends upon. Write a Makefile that creates object files for all 3 sources, creates a library containing the code from “f1.c” and “f2.c”, and then appropriately creates an executable named “prog.exe”. Make sure your Makefile contains appropriate “all” and “clean” targets. (15 pts): Write your Makefile below: 7. Repeat the previous exercise for CMake. (8 pts): Write your CMakeLists.txt file below: 5
欢迎咨询51作业君