Generating OpenH264 RPMs and sending them to Cisco

Description

OpenH264 RPMs are a special case and we need to handle it with caution.

The process is as follows:

  1. We generate and sign the RPMs using koji dist-repo.

  2. We send the RPMs to Cisco for hosting.

  3. Once we get confirmation from Cisco that they published the RPMs on their CDN we publish the repodata on our side.

OpenH264 is a free software library for real-time encoding and decoding video streams in the H.264/MPEG-4 AVC format.

In 2013 Cisco released both binaries and source code, and pay all royalties for its use to MPEG LA themselves for any software projects that use Cisco’s precompiled binaries (thus making Cisco’s OpenH264 binaries free to use); any software projects that use Cisco’s source code instead of its binaries would be legally responsible for paying all royalties to MPEG LA themselves, however.

The workaround is that the Cisco binaries are built in Fedora’s infrastructure but distributed by Cisco.

Warning

The RPMs must never be distributed via our build system or websites.

The process

Prerequisites

  1. Valid Kerberos token (kinit).

  2. Koji admin permission (set within Koji itself).

  3. sysadmin-releng FAS group membership.

Generating the repository

Once a request comes in through the RelEng issue tracker to update OpenH264 to a new version we will first need to generate the RPMs and repodata. We do this using the koji dist-repo utility.

Note

The arguments that should be passed to the commands will certainly vary from the examples listed below.

Practice common sense and double check everything.

Run this command:

$ koji dist-repo f43-openh264 31645531 --noinherit --with-src -a aarch -a
ppc64le -a s390x -a x86_64

In the case of the above command:

  1. f43-openh264 is the tag the builds are tagged into.

  2. 31645531 is the signing key for the RPMs. The keys for various versions can be found here.

  3. --noinherit causes only packages tagged into f43-openh264 to be included, without inheritance from the parent tag (e.g. f43).

  4. --with-src causes the source RPM to be included.

  5. -a <ARG> options are the respective architectures.

After the command finishes the directory should appear here.

The RPMs are visible through the web frontend, but we have a rewrite rule that redirects any attempt to download them to a wiki page saying why that is not possible.

In order to get to the RPMs themselves we must do it from a host on which Koji is mounted where they will be in the /mnt/koji/repos-dist/f43-openh264 directory.

For example:

$ ssh compose-branched01.iad2.fedoraproject.org

After you verify that everything needed is there you may clone the directory to your local machine.

$ rsync -avhHP username@compose-branched01.iad2.fedoraproject.org:/mnt/koji/repos-dist/f43-openh264/6555489 /home/username/openh264/2.6.0/f43

Sending the RPMs to Cisco for hosting

Preparing the tarball

We now have the necessary directory on our local machine. Now we need to package it into a tarball and send it to Cisco.

Create a new directory into which we can copy the RPMs and out of which we will create the tarball.

$ mkdir /home/username/openh264/2.6.0/f43/f43_2.6.0_rpms

Copy the RPMs (including the source RPM) from the original directory to the new directory.

$ cd /home/username/openh264/2.6.0/f43/
$ cp -rv 6553481/*/*/*/*rpm f43_2.6.0_rpms

Create a list of the RPMs that will be sent to Cisco along with the tarball.

$ ls f43_2.6.0_rpms > f43_2.6.0_rpms_list.txt

Create the tarball.

$ tar -cJvf f43_2.6.0_rpms.tar.xz f43_2.6.0_rpms

Sending the tarball to Cisco

The main way to communicate with Cisco is through the openh264-publishing@cisco.com mailing list.

Send an e-mail to the list informing Cisco that the RPMs are ready. In return, Cisco will send a URL to a website where the tarball can be uploaded.

Upload the tarball and let Cisco know.

Publishing the repodata

Once we receive confirmation from Cisco that their CDN was updated we can verify it using curl.

$ curl -I http://ciscobinary.openh264.org/openh264-2.6.0-1.fc43.x86_64.rpm

Now it is time to publish the repodata on our infrastructure. Navigate to the relevant directory on your local machine and sync the dist-repo directory to your home directory on sundries01.

$ rsync -avhHP 6556232 sundries01.iad2.fedoraproject.org/home/fedora/username/openh264/2.6.0/43

Connect to sundries01.

$ ssh sundries01.iad2.fedoraproject.org

Navigate to the relevant directory.

$ pwd
/home/fedora/username/openh264/2.6.0/43

Sync the contents of the directory to /srv/web/codecs.fedoraproject.org.

$ sudo rsync -avhHP 6556232/. /srv/web/codecs.fedoraproject.org/openh264/43

Make sure the directory is owned by root.

$ sudo chown -R root:root /srv/web/codecs.fedoraproject.org/openh264/43