Archive:Anatomy of a package checkout

From FedoraProject

Revision as of 11:12, 30 December 2012 by Mschwendt (Talk | contribs)

Jump to: navigation, search
CVS usage has been replaced with Git. Usage of Make and Makefiles has been replaced with the fedpkg tool.

The anatomy of a package checkout



General Structure of a checked-out package


|-- common
|   |-- Makefile
|   |-- Makefile.common
|   |-- branches
|   |--
|-- devel
|   |-- Makefile
|   |-- sources
|   |-- system-config-display.spec
|   |-- fix-somthing.patch
|-- F-8
|   |-- Makefile
|   |-- branch
|   |-- sources
|   |-- system-config-display.spec
|   |-- fix-something.patch
|-- F-9
|   |-- Makefile
|   |-- branch
|   |-- sources
|   |-- system-config-display.spec
|   |-- fix-something.patch

For example, the CVS repository on the F-9 branch for a small package might contain:

Makefile foo.spec branch sources

The sources file lists the sources that are stored in the lookaside cache; in this case, it would just consist of:

3da5afb85bcdce51113d4b32bd79093f foo-1.2.3.tar.gz

The look-aside repository will contain a directory named foo (after the name of the package module) and a copy of the foo-1.2.3.tar.gz file referenced from the sources file. To check out the sources stored in the lookaside cache, you can simply do a make sources in the package checkout. make sources is also the default Makefile target, so a simple make will also have the same effect.

The branch file contains the name of the branch the build system will use. It relates to the Fedora version.

The .spec file is the RPM build instructions for the package.

Any other small files, such as Fedora-specific init scripts or patches, will also be included here.

Makefile capabilities

Within each of the distro subdirectories, the Makefile provides a range of functionality. Type make help to see all of the available options. For example, you can use 'make local' to initiate a local build of your package.