Skip to content

Comments

Add metainfo.xml for Flatpak, etc.#3281

Closed
elsiehupp wants to merge 1 commit intomasterfrom
metainfo
Closed

Add metainfo.xml for Flatpak, etc.#3281
elsiehupp wants to merge 1 commit intomasterfrom
metainfo

Conversation

@elsiehupp
Copy link
Member

@elsiehupp elsiehupp commented May 6, 2021

metainfo.xml is part of the FreeDesktop AppStream specification and is used to generate product pages on various software-distribution front-ends, in particular Flatpak. Much of the content of metainfo.xml overlaps with the .desktop file, but metainfo.xml can contain additional metadata of particular use in, e.g., GNOME Software.

I initially updated the metainfo.xml on the Flathub repository with additional info from the .desktop file, but @tilosp recommended I submit the metainfo upstream instead in order for the changes to percolate out to other distribution endpoints (like Fedora).

The main benefit of adding metainfo.xml to the main Nextcloud Desktop repository is that it would help keep the product-page metadata consistent between the various downstream distribution points.

@elsiehupp elsiehupp requested a review from tilosp May 6, 2021 19:51
Copy link
Member

@tilosp tilosp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should get integrated into cmake the same way the desktop file already is. This way it get automatically installed by the build system and the template system could be used for app-id and name.

</screenshots>
<url type="homepage">https://nextcloud.com</url>
<releases>
<release version="3.1.3" date="2021-02-19"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nextcloud/desktop how does the release process currently work, would it be possible to somehow add the same changelog here as in the github release?

Otherwise i would make sense to autogenerate this section using cmake to keep it up to date.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the version tag is added to the build in git2changelog.py, but I don’t know exactly what would be involved in creating the list in XML. Presumably it would involve Python writing directly to XML and reconstructing the version list from scratch, which is a bit beyond me at the moment (though idk I could look into it regardless).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks i didn't know about git2changelog.py.

IMHO the changelog integration is not nessesary and could be added later on.

The main problem is see with this currently is that either someone has to update it manually or it will become out of date on the next release. One simple solution would be to have only a single release in the meta-info file, and set it using templates. So maybe using @MIRALL_VERSION@ but i am not sure where the date would come from.

@elsiehupp
Copy link
Member Author

/rebase

@elsiehupp
Copy link
Member Author

By the way, I left the Nextcloud screenshot because I assume it would be unchanged for OEM builds. (Also there aren’t any existing CMake variables for screenshots.)

@elsiehupp
Copy link
Member Author

One big issue, by the way, is that APPLICATION_REV_DOMAIN is com.nextcloud.desktopclient, while the Flathub ID is com.nextcloud.desktopclient.nextcloud.desktop. I assume the Flathub ID is this doubled-up string for historical reasons, but the mismatch is probably going to be a problem.

Signed-off-by: Elsie Hupp <9206310+elsiehupp@users.noreply.github.com>
@nextcloud-desktop-bot
Copy link

AppImage file: Nextcloud-PR-3281-2d4c519114802f61e2b7b0467f122040b2e1a632-x86_64.AppImage

To test this change/fix you can simply download above AppImage file and test it.

Please make sure to quit your existing Nextcloud app and backup your data.

@tilosp
Copy link
Member

tilosp commented May 7, 2021

One big issue, by the way, is that APPLICATION_REV_DOMAIN is com.nextcloud.desktopclient, while the Flathub ID is com.nextcloud.desktopclient.nextcloud.desktop. I assume the Flathub ID is this doubled-up string for historical reasons, but the mismatch is probably going to be a problem.

APPLICATION_REV_DOMAIN it not actually the app-id, the app id is stored in LINUX_APPLICATION_ID

configure_file(${CMAKE_SOURCE_DIR}/mirall.desktop.in
${CMAKE_CURRENT_BINARY_DIR}/${LINUX_APPLICATION_ID}.desktop)

which gets set from concatenating APPLICATION_REV_DOMAIN and LINUX_PACKAGE_SHORTNAME

set( LINUX_APPLICATION_ID "${APPLICATION_REV_DOMAIN}.${LINUX_PACKAGE_SHORTNAME}")

So the real app-id is com.nextcloud.desktopclient.nextcloud which matches with flathub.

endif()

configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
configure_file(metainfo.xml.in ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_REV_DOMAIN}.metainfo.xml)
Copy link
Member

@tilosp tilosp May 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should go next to the desktop file since it should only be used on linux

configure_file(${CMAKE_SOURCE_DIR}/mirall.desktop.in
${CMAKE_CURRENT_BINARY_DIR}/${LINUX_APPLICATION_ID}.desktop)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LINUX_APPLICATION_ID}.desktop DESTINATION ${DATADIR}/applications )

and it should also get installed like the desktop file, so something like this:

configure_file(${CMAKE_SOURCE_DIR}/metainfo.xml.in 
               ${CMAKE_CURRENT_BINARY_DIR}/${LINUX_APPLICATION_ID}.metainfo.xml) 
install(FILES  ${CMAKE_CURRENT_BINARY_DIR}/${LINUX_APPLICATION_ID}.metainfo.xml DESTINATION ${DATADIR}/metainfo )

@elsiehupp elsiehupp marked this pull request as draft May 8, 2021 18:14
@FlexW
Copy link

FlexW commented May 10, 2021

Before reviewing this, @elsiehupp could you please make the intent of your pr clear. What will be the benefit?

EDIT: I see you marked it as draft, but regardless please explain your intent when doing a pr.

@elsiehupp
Copy link
Member Author

Before reviewing this, @elsiehupp could you please make the intent of your pr clear. What will be the benefit?

EDIT: I see you marked it as draft, but regardless please explain your intent when doing a pr.

I edited the main PR description to explain the purpose of the file. Basically metainfo.xml is already used downstream, and incorporating it in the main repository would help keep the various downstream copies properly synchronized.

@elsiehupp elsiehupp closed this Nov 18, 2021
@Rello Rello deleted the metainfo branch February 17, 2025 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants