RPM `primary.xml` updater
The primary.xml
RPM repository metadata file contains an entry for each package in the repository (or in our case, the project). Each time a new .src.rpm
file is uploaded, we need to update this repository file. (we may also need to update this file with .rpm
and .drpm
files, but that is TBD).
In this issue, we create a service that can update the primary.xml
given a package, and a collection of relevant metadata that needs to be written to the primry.xml
file. The data to update this file will likely be coming from the service defined in #372649 (closed), but as mentioned above, it may also be coming from the other metadata extraction services.
This is an example of what part of the primary.xml
file looks like:
Click to expand
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://linux.duke.edu/metadata/common" xmlns:rpm="http://linux.duke.edu/metadata/rpm" packages="58687">
<package type="rpm">
<name>0ad</name>
<arch>aarch64</arch>
<version epoch="0" ver="0.0.25b" rel="2.fc36"/>
<checksum type="sha256" pkgid="YES">56cd21bf16e17cdccb5ff4fb8da211502ea6f1071f3ac6067f9b4a591dfbe8a7</checksum>
<summary>Cross-Platform RTS Game of Ancient Warfare</summary>
<description>0 A.D. (pronounced "zero ey-dee") is a free, open-source, cross-platform
real-time strategy (RTS) game of ancient warfare. In short, it is a
historically-based war/economy game that allows players to relive or rewrite
the history of Western civilizations, focusing on the years between 500 B.C.
and 500 A.D. The project is highly ambitious, involving state-of-the-art 3D
graphics, detailed artwork, sound, and a flexible and powerful custom-built
game engine.
The game has been in development by Wildfire Games (WFG), a group of volunteer,
hobbyist game developers, since 2001.</description>
<packager>Fedora Project</packager>
<url>http://play0ad.com</url>
<time file="1632740155" build="1632736074"/>
<size package="8665452" installed="26595485" archive="26630252"/>
<location href="Packages/0/0ad-0.0.25b-2.fc36.aarch64.rpm"/>
<format>
<rpm:license>GPLv2+ and BSD and MIT and IBM and MPLv2.0</rpm:license>
<rpm:vendor>Fedora Project</rpm:vendor>
<rpm:group>Unspecified</rpm:group>
<rpm:buildhost>buildvm-a64-05.iad2.fedoraproject.org</rpm:buildhost>
<rpm:sourcerpm>0ad-0.0.25b-2.fc36.src.rpm</rpm:sourcerpm>
<rpm:header-range start="4504" end="42205"/>
<rpm:provides>
<rpm:entry name="0ad" flags="EQ" epoch="0" ver="0.0.25b" rel="2.fc36"/>
<rpm:entry name="0ad(aarch-64)" flags="EQ" epoch="0" ver="0.0.25b" rel="2.fc36"/>
<rpm:entry name="application()"/>
<rpm:entry name="application(0ad.desktop)"/>
<rpm:entry name="bundled(mozjs)" flags="EQ" epoch="0" ver="78"/>
<rpm:entry name="metainfo()"/>
<rpm:entry name="metainfo(0ad.appdata.xml)"/>
<rpm:entry name="mimehandler(application/x-pyromod+zip)"/>
</rpm:provides>
<rpm:requires>
<rpm:entry name="/usr/bin/sh"/>
<rpm:entry name="0ad-data" flags="EQ" epoch="0" ver="0.0.25b"/>
<rpm:entry name="hicolor-icon-theme"/>
<rpm:entry name="ld-linux-aarch64.so.1()(64bit)"/>
<rpm:entry name="ld-linux-aarch64.so.1(GLIBC_2.17)(64bit)"/>
<rpm:entry name="libGL.so.1()(64bit)"/>
<rpm:entry name="libSDL2-2.0.so.0()(64bit)"/>
<rpm:entry name="libX11.so.6()(64bit)"/>
<rpm:entry name="libboost_filesystem.so.1.76.0()(64bit)"/>
<rpm:entry name="libcurl.so.4()(64bit)"/>
<rpm:entry name="libenet.so.7()(64bit)"/>
<rpm:entry name="libfmt.so.8()(64bit)"/>
<rpm:entry name="libgcc_s.so.1()(64bit)"/>
<rpm:entry name="libgcc_s.so.1(GCC_3.0)(64bit)"/>
<rpm:entry name="libgcc_s.so.1(GCC_3.3)(64bit)"/>
<rpm:entry name="libgcc_s.so.1(GCC_4.5.0)(64bit)"/>
<rpm:entry name="libgloox.so.17()(64bit)"/>
<rpm:entry name="libicui18n.so.69()(64bit)"/>
<rpm:entry name="libicuuc.so.69()(64bit)"/>
<rpm:entry name="libm.so.6()(64bit)"/>
<rpm:entry name="libm.so.6(GLIBC_2.17)(64bit)"/>
<rpm:entry name="libm.so.6(GLIBC_2.27)(64bit)"/>
<rpm:entry name="libm.so.6(GLIBC_2.29)(64bit)"/>
<rpm:entry name="libminiupnpc.so.17()(64bit)"/>
<rpm:entry name="libnvtt.so.2.1()(64bit)"/>
<rpm:entry name="libopenal.so.1()(64bit)"/>
<rpm:entry name="libpng16.so.16()(64bit)"/>
<rpm:entry name="libpng16.so.16(PNG16_0)(64bit)"/>
<rpm:entry name="libsodium.so.23()(64bit)"/>
<rpm:entry name="libstdc++.so.6()(64bit)"/>
<rpm:entry name="libstdc++.so.6(CXXABI_1.3)(64bit)"/>
<rpm:entry name="libstdc++.so.6(CXXABI_1.3.11)(64bit)"/>
<rpm:entry name="libstdc++.so.6(CXXABI_1.3.5)(64bit)"/>
<rpm:entry name="libstdc++.so.6(CXXABI_1.3.7)(64bit)"/>
<rpm:entry name="libstdc++.so.6(CXXABI_1.3.8)(64bit)"/>
<rpm:entry name="libstdc++.so.6(CXXABI_1.3.9)(64bit)"/>
<rpm:entry name="libstdc++.so.6(GLIBCXX_3.4)(64bit)"/>
<rpm:entry name="libstdc++.so.6(GLIBCXX_3.4.11)(64bit)"/>
<rpm:entry name="libstdc++.so.6(GLIBCXX_3.4.14)(64bit)"/>
<rpm:entry name="libstdc++.so.6(GLIBCXX_3.4.15)(64bit)"/>
<rpm:entry name="libstdc++.so.6(GLIBCXX_3.4.17)(64bit)"/>
<rpm:entry name="libstdc++.so.6(GLIBCXX_3.4.18)(64bit)"/>
<rpm:entry name="libstdc++.so.6(GLIBCXX_3.4.19)(64bit)"/>
<rpm:entry name="libstdc++.so.6(GLIBCXX_3.4.20)(64bit)"/>
<rpm:entry name="libstdc++.so.6(GLIBCXX_3.4.21)(64bit)"/>
<rpm:entry name="libstdc++.so.6(GLIBCXX_3.4.22)(64bit)"/>
<rpm:entry name="libstdc++.so.6(GLIBCXX_3.4.26)(64bit)"/>
<rpm:entry name="libstdc++.so.6(GLIBCXX_3.4.29)(64bit)"/>
<rpm:entry name="libstdc++.so.6(GLIBCXX_3.4.9)(64bit)"/>
<rpm:entry name="libvorbisfile.so.3()(64bit)"/>
<rpm:entry name="libwx_baseu-3.0.so.0()(64bit)"/>
<rpm:entry name="libwx_baseu-3.0.so.0(WXU_3.0)(64bit)"/>
<rpm:entry name="libwx_baseu_xml-3.0.so.0()(64bit)"/>
<rpm:entry name="libwx_baseu_xml-3.0.so.0(WXU_3.0)(64bit)"/>
<rpm:entry name="libwx_gtk3u_core-3.0.so.0()(64bit)"/>
<rpm:entry name="libwx_gtk3u_core-3.0.so.0(WXU_3.0)(64bit)"/>
<rpm:entry name="libwx_gtk3u_core-3.0.so.0(WXU_3.0.5)(64bit)"/>
<rpm:entry name="libwx_gtk3u_gl-3.0.so.0()(64bit)"/>
<rpm:entry name="libwx_gtk3u_gl-3.0.so.0(WXU_3.0)(64bit)"/>
<rpm:entry name="libxml2.so.2()(64bit)"/>
<rpm:entry name="libxml2.so.2(LIBXML2_2.4.30)(64bit)"/>
<rpm:entry name="libxml2.so.2(LIBXML2_2.5.2)(64bit)"/>
<rpm:entry name="libxml2.so.2(LIBXML2_2.6.0)(64bit)"/>
<rpm:entry name="libxml2.so.2(LIBXML2_2.6.21)(64bit)"/>
<rpm:entry name="libxml2.so.2(LIBXML2_2.9.0)(64bit)"/>
<rpm:entry name="libz.so.1()(64bit)"/>
<rpm:entry name="libz.so.1(ZLIB_1.2.0)(64bit)"/>
<rpm:entry name="rtld(GNU_HASH)"/>
<rpm:entry name="libc.so.6(GLIBC_2.34)(64bit)"/>
</rpm:requires>
<file>/usr/bin/0ad</file>
<file>/usr/bin/pyrogenesis</file>
</format>
</package>
<package type="rpm">
<name>0ad-data</name>
<arch>noarch</arch>
<version epoch="0" ver="0.0.25b" rel="3.fc36"/>
<checksum type="sha256" pkgid="YES">7df8d6bc9817cf65f4b52a31721b54735b30b919869325879a5de61287a834a4</checksum>
<summary>The Data Files for 0 AD</summary>
<description>0 A.D. (pronounced "zero ey-dee") is a free, open-source, cross-platform
real-time strategy (RTS) game of ancient warfare. In short, it is a
historically-based war/economy game that allows players to relive or rewrite
the history of Western civilizations, focusing on the years between 500 B.C.
and 500 A.D. The project is highly ambitious, involving state-of-the-art 3D
graphics, detailed artwork, sound, and a flexible and powerful custom-built
game engine.
This package contains the 0ad data files.</description>
<packager>Fedora Project</packager>
<url>http://play0ad.com</url>
<time file="1644023437" build="1644020978"/>
<size package="1392722169" installed="3287125493" archive="3287133720"/>
<location href="Packages/0/0ad-data-0.0.25b-3.fc36.noarch.rpm"/>
<format>
<rpm:license>CC-BY-SA</rpm:license>
<rpm:vendor>Fedora Project</rpm:vendor>
<rpm:group>Unspecified</rpm:group>
<rpm:buildhost>buildhw-a64-22.iad2.fedoraproject.org</rpm:buildhost>
<rpm:sourcerpm>0ad-data-0.0.25b-3.fc36.src.rpm</rpm:sourcerpm>
<rpm:header-range start="4504" end="14721"/>
<rpm:provides>
<rpm:entry name="0ad-data" flags="EQ" epoch="0" ver="0.0.25b" rel="3.fc36"/>
</rpm:provides>
<rpm:requires>
<rpm:entry name="dejavu-sans-fonts"/>
<rpm:entry name="dejavu-sans-mono-fonts"/>
</rpm:requires>
</format>
</package>
<package type="rpm">
<name>0xFFFF</name>
<arch>aarch64</arch>
<version epoch="0" ver="0.9" rel="4.fc36"/>
<checksum type="sha256" pkgid="YES">a4e3d7471796fdfb48dc3bd6fc793572501278d5d3595eb1156c9c244caaba53</checksum>
<summary>The Open Free Fiasco Firmware Flasher</summary>
<description>The 'Open Free Fiasco Firmware Flasher' aka 0xFFFF utility implements
a free (GPL3) userspace handler for the NOLO bootloader and related
utilities for the Nokia Internet Tablets like flashing setting device
options, packing/unpacking FIASCO firmware format and more.</description>
<packager>Fedora Project</packager>
<url>https://talk.maemo.org/showthread.php?t=87996</url>
<time file="1643111870" build="1642619583"/>
<size package="74531" installed="260633" archive="262188"/>
<location href="Packages/0/0xFFFF-0.9-4.fc36.aarch64.rpm"/>
<format>
<rpm:license>GPLv3</rpm:license>
<rpm:vendor>Fedora Project</rpm:vendor>
<rpm:group>Unspecified</rpm:group>
<rpm:buildhost>buildvm-a64-26.iad2.fedoraproject.org</rpm:buildhost>
<rpm:sourcerpm>0xFFFF-0.9-4.fc36.src.rpm</rpm:sourcerpm>
<rpm:header-range start="4504" end="9501"/>
<rpm:provides>
<rpm:entry name="0xFFFF" flags="EQ" epoch="0" ver="0.9" rel="4.fc36"/>
<rpm:entry name="0xFFFF(aarch-64)" flags="EQ" epoch="0" ver="0.9" rel="4.fc36"/>
</rpm:provides>
<rpm:requires>
<rpm:entry name="ld-linux-aarch64.so.1()(64bit)"/>
<rpm:entry name="ld-linux-aarch64.so.1(GLIBC_2.17)(64bit)"/>
<rpm:entry name="libusb-0.1.so.4()(64bit)"/>
<rpm:entry name="rtld(GNU_HASH)"/>
<rpm:entry name="libc.so.6(GLIBC_2.34)(64bit)"/>
</rpm:requires>
<file>/usr/bin/0xFFFF</file>
</format>
</package>
<package type="rpm">
<name>2048-cli</name>
<arch>aarch64</arch>
<version epoch="0" ver="0.9.1" rel="13.fc36"/>
<checksum type="sha256" pkgid="YES">4fd9b6811a92b38fe622cf8bfcc09fa30e4ec4450ef80539c8d0d54239221c46</checksum>
<summary>The game 2048 for your Linux terminal</summary>
<description>A cli version of the game 2048 for your Linux terminal.</description>
<packager>Fedora Project</packager>
<url>https://github.com/Tiehuis/2048-cli</url>
<time file="1643111883" build="1642619611"/>
<size package="20146" installed="73727" archive="75140"/>
<location href="Packages/2/2048-cli-0.9.1-13.fc36.aarch64.rpm"/>
<format>
<rpm:license>MIT</rpm:license>
<rpm:vendor>Fedora Project</rpm:vendor>
<rpm:group>Unspecified</rpm:group>
<rpm:buildhost>buildhw-a64-21.iad2.fedoraproject.org</rpm:buildhost>
<rpm:sourcerpm>2048-cli-0.9.1-13.fc36.src.rpm</rpm:sourcerpm>
<rpm:header-range start="4504" end="9049"/>
<rpm:provides>
<rpm:entry name="2048-cli" flags="EQ" epoch="0" ver="0.9.1" rel="13.fc36"/>
<rpm:entry name="2048-cli(aarch-64)" flags="EQ" epoch="0" ver="0.9.1" rel="13.fc36"/>
</rpm:provides>
<rpm:requires>
<rpm:entry name="ld-linux-aarch64.so.1()(64bit)"/>
<rpm:entry name="ld-linux-aarch64.so.1(GLIBC_2.17)(64bit)"/>
<rpm:entry name="libncurses.so.6()(64bit)"/>
<rpm:entry name="libtinfo.so.6()(64bit)"/>
<rpm:entry name="rtld(GNU_HASH)"/>
<rpm:entry name="libc.so.6(GLIBC_2.34)(64bit)"/>
</rpm:requires>
<file>/usr/bin/2048</file>
</format>
</package>
...
The exact format should be determined by looking through the source code of createrepo_c
and/or createrepo
(createrepo_c
is the most current version of the repository generator).