TYPO3 Packaging

Version 1.0, valid until July 31st 2011

General

With the switch to Git/Gerrit, there was finally the time to rewrite the TYPO3 v4 packaging system. We decided to write a completely new packaging system based on "Phing" that also takes the introduction package (and maybe more packages like that in the future) into account.

Nomenclature

  • Release: An official TYPO3 release, like TYPO3 4.5.6 or TYPO3 4.3.2, in each distribution flavor.
  • Distribution: Installation files for a specific use-case, like the "Introduction Package" or the "Blank Package".
  • Core: The TYPO3 Core Source files, maintainted by the TYPO3 Core team, also referred to as "Base Package".
  • Blank Package: is now what we before had as the "Dummy Package", which is just a blank and clean TYPO3 installation.

Distributions & Collections

  • Base: This distribution is about generating the TYPO3 Source Package of the Core and Git interaction (tagging, branching, commits)
  • Blank: In earlier versions of TYPO3 this was know as the "dummy" package and is still the same - however the name has changed
  • Introcution: This distribution contains the Introduction Package for different TYPO3 versions (current development version and stable version)
  • Common: One the one hand this distribution contains several common tasks and actions, on the other side this one can be used to create all of the above distributions.

Each distribution is able to create snapshots (nightly builds), regular releases (4.5.3, 4.6.0, 4.6.1, etc.) and alpha/beta/RC releases.
Besides that each distribution has the ability to upload the targets to SourceForge.net which basically only makes sense for official TYPO3 packaging.

Architecture

TYPO3 consists of a base core package (or typo3_src package as you might recall it), and distribution files. For each release, the packaging system takes the static files for the initial setup of a TYPO3 installation and bundles that with TYPO3 Core Source files.

The new packaging system allows to create official releases as well as snapshots (nightly builds) for each of the packages.

Directory structure of each distribution repository:

  • Build - contains the build tasks for a particular distribution
    • build.xml
  • Common - contains common tasks for all distributions
    • Build
      • build.xml
      • common.xml
  • Resources - contains static resources that will be copied to the root of a particular distribution
  • (Targets) - will be created automtically and contains the zip and tgz target archives
  • (Work) - will be created automatically and contains the Core Source repository and temporary directories

Execute packaging scripts

Installation

Install Phing

Since the packaging process is build on Phing (which is the PHP alternative to Ant), you need a working setup of Phing.
Get the accordant Phing package and install it on your build host: http://www.phing.info/trac/wiki/Users/Download

Fetch distributions

Currently these four distributions are available via Git:

  • Common: git://git.typo3.org/TYPO3v4/Distributions/Common.git
  • Base: git://git.typo3.org/TYPO3v4/Distributions/Base.git
  • Blank: git://git.typo3.org/TYPO3v4/Distributions/Blank.git
  • Introcution: git://git.typo3.org/TYPO3v4/Distributions/Introduction.git

At least one of them needs to be fetched from git.typo3.org:


:# git clone git://git.typo3.org/TYPO3v4/Distributions/Common.git Common
:# cd Common
:# git submodule update --init

Build

Each build file, that contains the accordant instructions for Phing, is executed by the same command and takes the same arguments:

  • Type of the release (snapshot, regular, alpha, beta, rc)
  • Major version (branch) of the release
  • Whether to publish to SourceForge.net (only relevant for official TYPO3 releases)


:# phing -f Build/build.xml

The results can be found in the directory "./Targets/".

Build all packages (Common)


:# cd Common
:# phing -f Build/build.xml
Buildfile: Common/Build/build.xml
TYPO3v4Build > common:
Type of the release(snapshot,regular,alpha,beta,rc) [snapshot] snapshot
Major version of the release(4.1,4.2,4.3,4.4,4.5,4.6) [4.6] 4.6
Publish (Git repository, SourceForge)(y,n) [n] n
...

Build a specific package (Base, Blank, Introcution)


:# cd Introduction
:# phing -f Build/build.xml
Buildfile: Introduction/Build/build.xml
TYPO3v4IntroductionPackage > common:
Type of the release(snapshot,regular,alpha,beta,rc) [snapshot] snapshot
Major version of the release(4.1,4.2,4.3,4.4,4.5,4.6) [4.6] 4.6
Publish (Git repository, SourceForge)(y,n) [n] n
...