🚧 WIP: [advanced][dev] How to update a package for OpenMandriva Lx

Adaptation to wiki page from @AngryPenguin comment.

Introduction

Packaging is essential part of most Linux distribution. Each distribution has its own workflow, some use scripts to let user machine build the package, other have their own infrastructure which compiles packages for various architecture. This is the case of OpenMandriva which uses Github for storing configuration scripts and ABF for building packages and storing assets.

Which package should I choose.

If you want to participate in OpenMandriva, first thank you and welcome in the team :slight_smile:

Before you start practising, we highly recommend you to join the Cooker chat and the Cooker category in this topic, so you can stay in touch with other developers, and ask for rights to write in our Github organization.

You should first try to practise on a package which update should be seamless, ie a single package with some minor update. Let’s take as an example Geary mail client.

In repo for Cooker is version 0.13.2, while the latest version is 0.13.3.

Steps

Prepare your environment

  1. If not done yet., create account on GitHub and ABF. Ask someone to have rights to write in the OpenMandrivaAssociation Github organization where are hosted all configuration files for packaging.
  2. In ABF, search for geary and open it.
  3. Click on the GitHub button to open the related github repository for this package.

Manage the updated source code

  1. In a new browser tab, find for the upstream source to download it. In the case of Geary 0.13.3. get the archived source from here: Index of /pub/GNOME/sources/geary/0.13. Do not extract it.
  2. Open this website http://file-store.openmandriva.org/ and upload source archive here.
  3. When the upload ends, copy the hash - somethings like to “041ASD545D5D5D55D5D450”

Update the configuration files

  1. Go back to the browser tab where is opened the github repository for Geary, then open the .abf.yml file and edit it.
    • replace current name geary-0.13.2.tar.xz to new one, something like geary-0.13.3.tar.xz
    • replace also the hash with the new new one you got from step 6.
    • Save the file.
  2. Open the geary.spec file and edit it.
    • update the version number, ie from 0.13.2 to 0.13.3
    • for this package this should be all, so save the file.

Create the updated package

  1. Go back to ABF and your geary package.
    • in ABF for geary near to GitHub button you should find “New Build” button. Click on it.
      (here you can chose distro version, repository, branch or arch)
    • leave all options by default and click on “Start Build”
  2. Wait until build ends (it can take some time).

@AngryPenguin made a short film on how to build a simple package:

1 Like