microsoft / linux-package-repositories

Microsoft Packaged Linux Software (DEBs, RPMs, etc) are hosted on packages.microsoft.com (PMC) made available as native Linux repositories for use with package managers like APT, YUM, etc.
https://packages.microsoft.com
MIT License
71 stars 17 forks source link

Microsoft YUM repositories are missing AppStream metadata #4

Open Conan-Kudo opened 2 years ago

Conan-Kudo commented 2 years ago

I noticed with the Microsoft Edge and Microsoft Visual Studio Code YUM repositories that AppStream metadata is not present in the YUM repository metadata. This makes it impossible for software centers like GNOME Software and Plasma Discover to advertise the availability of those applications when the repositories are enabled on the system.

In particular, Fedora is considering shipping the repository definitions for Visual Studio Code (pagureio#fedora-workstation#283) and Edge (pagureio#fedora-workstation#291), but the lack of proper repository metadata makes it a non-starter.

From a practical perspective, what needs to happen after you create the repository metadata with createrepo_c is:

  1. Generate AppStream repodata from the RPMs
  2. Append the AppStream repodata to the YUM repository

Step 1 is done by using appstream-builder:

appstream-builder           \
    --origin=Microsoft      \
    --basename=appstream        \
    --cache-dir=/tmp/asb-cache  \
    --enable-hidpi          \
    --max-threads=1         \
    --min-icon-size=32      \
    --output-dir=/tmp/asb-md    \
    --packages-dir=x86_64/      \
    --temp-dir=/tmp/asb-icons

Step 2 is done with modifyrepo_c:

modifyrepo_c                \
    /tmp/asb-md/appstream.xml.gz    \
    x86_64/repodata/
modifyrepo_c                \
    /tmp/asb-md/appstream-icons.tar.gz  \
    x86_64/repodata/

Once this is done, you now have YUM repository metadata with AppStream repository metadata for software centers to leverage for showing your applications for users to install.

daviddavis commented 2 years ago

Hi @Conan-Kudo! Good to see you. I will take a look into this and report back. Thanks for opening an issue.

daviddavis commented 2 years ago

We're evaluating Pulp to potentially handle publishing our rpm metadata and it looks like it currently doesn't support this. I opened an issue though:

https://github.com/pulp/pulp_rpm/issues/2432