Commit 57392a51 authored by David Boddie's avatar David Boddie
Browse files

Add sections about core packaging workflow

parent e4978ff5
......@@ -16,4 +16,4 @@ and patches.
.. _core_package_base_packages:
Adding Base Packages
Packages built by the Continuous Integration (CI) system can be included as base packages in the Librem 5 system image, which means that they are pre-installed on the phone.
.. contents::
Packaging Requirements
Only packages available in PureOS can be included in the system image for the Librem 5. See the :ref:`core_package_uploading` guide for information about creating packages for PureOS.
Base Packages
The base packages on the phone are defined in the `librem5-base`_ repository, which is used to generate metapackages -- packages that are used to group packages into collections for convenient installation. The CI system `builds system images <Image Builds_>`_ that include some of these metapackages pre-installed.
To ensure that a package is installed, it needs to be included in one of the `librem5-base`_ metapackages.
.. include:: /links.txt
Core Workflow
Software that is supplied with the phone is built using a process that aims to automate as much as possible. The process is summarized in the overview below.
.. toctree::
:maxdepth: 1
Software that should be included in system images or supplied as Debian packages is built and packaged using a multi-stage process, using different systems to test the software at each stage. The following steps describe how software is processed:
#. The developer creates Debian packaging for the software, testing it locally to ensure that it works.
#. The developer adds information about the public repository containing the software to the `deb-build-jobs`_ repository via a merge request. This is covered by the :ref:`core_package_building` section of this guide.
#. The developer tags a release using a signed git tag to ensure that it is published in the PureOS package repository. This is covered by the :ref:`core_package_uploading` section of this guide.
#. The Continuous Integration (CI) server runs the build scripts from the `deb-build-jobs`_ repository to produce packages.
#. Packages for signed releases are included in the PureOS package repository.
#. The Librem 5 system image is built using software from the repository using information from the `librem5-base`_ repository.
Packages can be downloaded from the page containing `Debian Package Builds for the Librem 5`_ and are also available from the `CI scratch repository`_.
Packages that need to be included in the Librem 5 system image must be added to the package lists in the ``librem5-base`` repository. This is described in the :ref:`core_package_base_packages` section.
.. include:: /links.txt
Package Building
.. _core_package_building:
.. note:: This section is mostly useful for core contributors.
Core Package Building
Some components are built by the Continuous Integration (CI) system as Debian packages to enable convenient distribution, installation and upgrade. This requires that the components have Debian packaging files that can be used by the CI system to build packages.
......@@ -15,7 +15,9 @@ Build Jobs and Packages
Information about the components to be packaged is held in the `deb-build-jobs`_ repository, where the ``jobs.yml`` file contains metadata for each of them. This is extracted and passed to a script that runs the `git-buildpackage`_ tool to perform the package build.
The packages built by the CI system are published on the `Debian Package Builds for the Librem 5`_ page and most of them are also published in the `Librem 5 scratch apt repository`_.
The packages built by the CI system are published on the `Debian Package Builds for the Librem 5`_ page and most of them are also published in the `Librem 5 scratch package repository`_.
Build reports for packages processed by the CI system are published on the `librem5-builds`_ mailing list.
Metadata Format
.. _core_package_uploading:
Uploading Packages to PureOS
Packages built by the Continuous Integration (CI) system can be published in the PureOS package repository. Only specific releases that are specially tagged are uploaded to the repository.
.. contents::
Packaging Requirements
Only packages built using the CI system can be submitted to the package repository for the phone. See :ref:`core_package_building` for instructions describing how to submit packages to the CI system.
If you are both the developer and packager of the software, specify ``amber-phone`` as the suite in the ``debian/changelog`` file for the latest release. For example::
phosh (0.1.0) amber-phone; urgency=medium
This indicates the suite where the package will be published.
Tag the Release with a Signed Tag
Each package that needs to be made available from the PureOS package repository must be generated from a commit that is tagged with a signed git tag by the developer.
Upstream Packaging
For packages where the packager is also the upstream developer, the release commit should be tagged with a signed tag as in this example:
.. code:: bash
git tag -s -m'phosh v0.1.0' v0.1.0
Here, ``phosh`` is the name of the package, as given in the ``debian/changelog`` file. The version must correspond to the latest package version, so ``v0.1.0`` corresponds to version 0.1.0 in the changelog::
phosh (0.1.0) amber-phone; urgency=medium
Ensure that the version numbers match and that the tag is prefixed with ``v`` both in the tag itself and in the message passed using the ``-m`` option.
Publish the tag in the publicly available repository for the software so that the CI system can find it. This must be the same repository specified in the ``jobs.yml`` file in the `deb-build-jobs`_ repository. The CI system will pull the signed tag automatically.
Uploading Packages
The CI system takes care of uploading packages to the PureOS package repository where they can be found using the `PureOS package search`_ tool. If a package does not appear when one is expected, check the messages in the `librem5-builds`_ mailing list to make sure that the package was built successfully.
Further Reading
See the `Librem5 pureos amber-phone uploads`_ note for more details about creating and preparing packages for upload to the PureOS package repository.
.. _`Librem5 pureos amber-phone uploads`:
.. include:: /links.txt
......@@ -3,6 +3,7 @@
.. _`AppStream`:
.. _`AppStream metadata`:
.. _`Building your first Flatpak`:
.. _`CI scratch repository`:
.. _`community/librem-5`:
.. _`community/librem-5-apps`:
.. _`community/librem-5-devkit`:
......@@ -105,6 +106,7 @@
.. _HdyTitleBar :
.. _`How to create a GTK application using Python`:
.. _`iio-sensor-proxy`:
.. _`image-builder`:
.. _`Image Builds`:
.. _`journalctl man page`:
.. _`KDE Community`:
......@@ -120,8 +122,11 @@
.. _libhandy website :
.. _`Librem 5 developer documentation repository`:
.. _`Librem 5 examples project`:
.. _`Librem 5 scratch apt repository`:
.. _`Librem 5 user guide`:
.. _`Librem 5 scratch apt repository`:
.. _`Librem 5 scratch package repository`:
.. _`librem5-base`:
.. _`librem5-builds`:
.. _`librem5-devkit-tools`:
.. _`librem5-m2-breakout repository`:
.. _`linux-emcraft repository`:
......@@ -141,6 +146,7 @@
.. _`Plasma Mobile application development`:
.. _`Issues for Plasma Mobile on Librem 5`:
.. _`PureOS`:
.. _`PureOS package search`:
.. _`Purism FAQ`:
.. _`PyGObject`:
.. _`PyGObject API Reference`:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment