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:
-
We generate and sign the RPMs using
koji dist-repo. -
We send the RPMs to Cisco for hosting.
-
Once we get confirmation from Cisco that they published the RPMs on their CDN we publish the repodata on our side.
Legal Background
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 pays 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.
|
The RPMs must never be distributed via our build system or websites. |
Prerequisites
-
Valid Kerberos token (
kinit). -
Koji admin permission (set within Koji itself).
-
sysadmin-relengFAS group membership.
Actions
Generating the RPMs
Once a request comes in through the Release Engineering issue tracker to update OpenH264 to
a new version (or to generate new RPMs for the new Rawhide after a mass branching), we will
first need to generate the RPMs and repodata. We do this using the koji dist-repo utility.
|
The command below is merely an example and some arguments passed to it (tag, signing key) will have to be changed depending on the situation. |
Run a command such as this:
$ koji dist-repo f46-openh264 91211fce --noinherit --split-debuginfo --with-src -a aarch64 -a ppc64le -a s390x -a x86_64
In the case of the above command:
-
f46-openh264is the tag the builds are tagged into. -
91211fceis the signing key for the RPMs. The keys for various versions can be found here. -
--noinheritcauses only packages tagged intof46-openh264to be included, without inheritance from the parent tag (e.g.f46). -
--split-debuginfocauses the debug packages to be placed in a separate debug repo. -
--with-srccauses the source RPM to be included. -
-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/f46-openh264 directory.
For example:
$ ssh username@compose-branched01.rdu3.fedoraproject.org
After you verify that everything needed is there you may clone the directory to your local machine:
$ rsync -avhHP username@compose-branched01.rdu3.fedoraproject.org:/mnt/koji/repos-dist/f46-openh264/6556232 /home/username/openh264/2.6.0/f46
|
It may be a good idea to copy the directory to your home directory on |
Sending the RPMs to Cisco
Preparing the Tarball
We now have the necessary files on our local machine. Now we need to package the files into a tarball and deliver 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/f46/f46_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/f46/ $ cp -rv 6556232/*/*/*/*rpm f46_2.6.0_rpms -
Create a list of the RPMs that will be sent to Cisco along with the tarball.
$ ls f46_2.6.0_rpms > f46_2.6.0_rpms_list.txt -
Create the tarball.
$ tar -cJvf f46_2.6.0_rpms.tar.xz f46_2.6.0_rpms
Uploading the Tarball
We now have the tarball and need to get it to Cisco.
-
Upload the tarball through Cisco’s upload link. The link can be found in Bitwarden.
-
Send an email to
openh264-publishing@cisco.comto let Cisco know the tarball has been uploaded and the RPMs are ready. Ask them to publish the RPMs and notify you once done. -
Wait for a reply from Cisco.
Publishing the Repodata
Cisco confirmed the RPMs are published. Now it is time to publish the repodata on Fedora’s infrastructure.
-
Verify the RPMs are available using
curl.$ curl -I http://ciscobinary.openh264.org/openh264-2.6.0-4.fc46.x86_64.rpm -
Navigate to the relevant directory on your local machine and sync the
dist-repodirectory to your home directory onsundries01.$ rsync -avhHP ./6556232 username@sundries01.rdu3.fedoraproject.org:/home/fedora/username/openh264/2.6.0/46 -
Connect to
sundries01.$ ssh username@sundries01.rdu3.fedoraproject.org -
Navigate to the relevant directory.
$ pwd /home/fedora/username/openh264/2.6.0/46 -
Sync the contents of the directory to
/srv/web/codecs.fedoraproject.org.$ sudo rsync -avhHP 6556232/. /srv/web/codecs.fedoraproject.org/openh264/46 -
Make sure the directory is owned by root.
$ sudo chown -R root:root /srv/web/codecs.fedoraproject.org/openh264/46
(Optional) Updating MirrorManager
At this point everything is done and MirrorManager will update automatically within a day. If you need it to update sooner, you can force a new cronjob run in OpenShift:
$ oc create job --from=cronjob/primary-mirror-codecs primary-mirror-codecs-username-YYYYMMDD.1 -n mirrormanager
The job name must be unique. Use your username and today’s date as shown above.
Want to help? Learn how to contribute to Fedora Docs ›