POSSE RIT Tuesday

From Teaching Open Source

Jump to: navigation, search

Tuesday session for POSSE RIT. Theme for the day: Source

Contents

[edit] Status Check

  • Brief quiz/review of previous day.
  • Discussion of Overnight Deliverables -- status, problem encountered, concepts learned.
  • Rose/Thorn/Bud update from each participant
    • Rose: something learned
    • Thorn: problem encountered
    • Bud: something anticipated in the future
  • Physical wiki update.
  • Open source news -- current developments.

[edit] Getting and building source

[edit] Obtaining Source

    • Tarballs
    • Revision control
      • Legacy central-server model - CVS
      • Modern approaches: Mercurial (hg) and Git
      • Exercise: using git (our VCS of choice for the week) to check out SoaS documentation

[edit] RPM Packaging Basics

  • Why package?
    • Maintainability
    • Easy updating
    • Authentication of origin
    • Dependency management
  • What is an RPM?
    • One file containing:
      • Software
      • Documentation
      • Configuration files
      • Sample data
      • Metadata
      • Dependency and capability data
      • Installation and removal scripts
  • Using RPMs
    • Querying the RPM database (coderpm -q/code)
    • Installing, updating, removing
    • Using YUM
  • RPM Build Process
    • Components:
      1. Pristine sources
      2. Patches
      3. Spec file
    • Process:
      1. Obtain sources and patches
      2. Test and document build process
      3. Create spec file
      4. Build RPM
      5. Test
  • Looking at existing source RPMs
    • Getting SRPMs (yumdownloader --source packagename)
    • Installing (rpm -i package.src.rpm)
    • Rebuilding (rpmbuild --rebuild package.src.rpm)
  • Creating a spec file
    • Sections of a spec file
    • Creating the file (rpmdev-newspec package)
  • Building an RPM
    • rpmbuild -ba package.spec
  • Testing an RPM
    •  %test section
    • Trial installation (yum localinstall package.rpm)
    • rpmlint - run on the .spec, .src.rpm, and .rpm files
    • mock (mock -r fedora-11-i386 --rebuild package.src.rpm)
    • koji test builds (more on Wednesday)
  • Package review process - Overview
    • Bugzilla (more on Wednesday)
    • Koji (overview)
    • Bodhi (overview)
  • Creating a repository
    • codecreaterepo/code
    • Repo configuration files

[edit] Spins and Remixes

  • What is a Spin/Remix?
  • RIT Remix

[edit] Build Environments

Tuesday afternoon.

[edit] Code

    • Finding and Installing build dependencies
      • Using yum, MacPorts, etc.
    • Operating systems, cross-platform builds
    • Machine requirements
      • Fast I/O, lots of RAM (for linking)
    • Tools
    • Libraries
    • Settings
      • Environment variables, PATHs
  • Build Tools
    • autoconf
    • make
    • meta-make tools
    • Common open source approaches to automation (Python, Bash)
  • End to end Example Walkthrough
    • Get code for XXX (something open source and smallish)
    • Look at what we got
    • Configure (maybe explore a couple of options we can pass to configure)
    • Make XXX
    • Look at end result of what we built

Lab: Working with Build Systems

In this lab participants have the opportunity to work with a number of build systems, including:

  • A small one they create from scratch
  • Mozilla's Firefox build system

In the first part of the lab, the participants are presented with a small source project and asked to work together to create a Makefile in order that the build process can be fully automated. Once again, students are encouraged to use online communication tools in order to collaborate. Participants are also encouraged to consult online materials, examples in other open source projects (e.g., using Google Code Search), etc. One of the outcomes of this lab is that participants learn to leverage existing code, a key element of open source.

Next, having created a simple Makefile and learned the basic workings of make, participants are led through an examination of various parts of the Mozilla build system, including:

  • Compiling Firefox on Fedora
  • Understanding phases of the build, and what is happening as the build messages scroll by
  • Looking at a number of interesting aspects, and how they are implemented in Makefiles, configure scripts
  • Future directions (pymake)

[edit] Non-code

  • We will be learning about Publican, a build system for documentation.
  • Exercise: get the docbook xml for SoaS Creation Kit using the skills you learned this morning.
  • Exercise: build the SoaS Creation Kit docs on your local machine using Publican. (Mel will guide participants through this process.)
  • What is a patch?
  • Exercise: Create and submit a patch to the Creation Kit.

[edit] Overnight deliverable

Make yourself a working SoaS stick; use the manual you have built, along with any other instructions you can find, plus your ability to ask questions of other open source community members (including your POSSE cohort).

If you have extra time, see if you can figure out how to install whatever Activity you want to work on to your SoaS stick, and play with it.