Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: Add AppStream meta data #1642

Merged
merged 24 commits into from
Feb 21, 2024
Merged

Build: Add AppStream meta data #1642

merged 24 commits into from
Feb 21, 2024

Conversation

buhtz
Copy link
Member

@buhtz buhtz commented Feb 14, 2024

This PR does add meta data in AppStream format for the "qt" component.

This will fix a packaging warning on Debian (and possible other distros).

AppStream (by freedesktop.org) is a format to describe software packages without technical details to users. The intention is to be independet from a specific operating system. AppStream is used in packaging software (e.g. synaptics) and "software centers" (e.g. "gnome-software") and other app-store-like applications. The target audience are desktop users. Beside fixing the Debian warning it increase the visibility of BIT in several software cataloges.

  • Please carefully check the content of the <summary> and <description> tags in the xml file. Keep the target audience in mind. The text shouldn't be to nerdy. The syntax is not Markdown and not HTML. There is just a small subset of HTML tags. No links allowed for example.

  • I will investigate further if and how to treat that file in our make system. Done.

  • Localization via GNU gettext and integration into Weblate is possible. I will do this in another PR also including localization of our *.desktop files.

Here you see how this meta data would be rendered with Gnome Software Center (via gnome-software --show-metainfo *.xml)
bit_gnomesoftware_example

qt/backintime-qt-root.desktop Outdated Show resolved Hide resolved
@buhtz buhtz marked this pull request as draft February 14, 2024 09:58
qt/configure Outdated Show resolved Hide resolved
@graysky2
Copy link
Contributor

I have also never used this.

@buhtz
Copy link
Member Author

buhtz commented Feb 16, 2024

FYI I just summarizing open questions I am working on

  1. I asked at AppStream about the consequences of having multiple <launchable> tags because the specs are not clear (to me) about that point.
  2. I asked at debian-python if upstream or a distro maintainer should take care of an appstream metadata file. I was not able to find an official guideline/policy about it. Facing the fact that some distro maintainers do not know what *.metainfo.xml is for I see no problem if upstream take care about the installation of that file.
  3. I asked at debian-desktop about an observed behavior that is contradicted to information I got from the Debian Appstream Wiki. Content from desktop-files (e.g. Name, description, comment, ...) should be overwritten by content from appstream metainfo files. But it was not in my tests.

@buhtz
Copy link
Member Author

buhtz commented Feb 20, 2024

I got no response about my questions. They are not so important or blocking to wait for it.
I vote to merge it.

  1. I asked at AppStream about the consequences of having multiple <launchable> tags because the specs are not clear (to me) about that point.

I see no risk and can not imagine any negative consequences about having to <launchable> tags. Would keep them.

  1. I asked at debian-python if upstream or a distro maintainer should take care of an appstream metadata file. I was not able to find an official guideline/policy about it. Facing the fact that some distro maintainers do not know what *.metainfo.xml is for I see no problem if upstream take care about the installation of that file.

I would like to manage its installation by us at upstream. Some maintainers do not know about AppStream.

  1. I asked at debian-desktop about an observed behavior that is contradicted to information I got from the Debian Appstream Wiki. Content from desktop-files (e.g. Name, description, comment, ...) should be overwritten by content from appstream metainfo files. But it was not in my tests.

Not relevant yet. It become relevant in the future when I integrate the AppStream metainfo file and the desktop file into our translation pipeline. It seems that AppStream meta data do not overwritte the desktop-files content in all cases. I will treat them both with the same priority and see no problem with that. We just need to keep the description/comment strings in both files identically to lower the burden for translators.

@buhtz buhtz marked this pull request as ready for review February 20, 2024 08:25
@buhtz buhtz self-assigned this Feb 20, 2024
Copy link
Contributor

@aryoda aryoda left a comment

Choose a reason for hiding this comment

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

Let's try it "in real (dev) life" (I cannot estimate the impact by only reviewing the code)

@buhtz buhtz merged commit a14de42 into bit-team:dev Feb 21, 2024
1 check failed
@buhtz buhtz deleted the feat/appstreamdata branch February 21, 2024 06:55
@willemw12
Copy link

I am getting an error, building backintime-git from the AUR:

# Install application
install -d /build/backintime-git/pkg/backintime-git/usr/bin
install --mode=755 backintime-qt /build/backintime-git/pkg/backintime-git/usr/bin
install --mode=755 backintime-qt_polkit /build/backintime-git/pkg/backintime-git/usr/bin
install -d /usr/share/metainfo
install: cannot change permissions of ‘/usr/share/metainfo’: No such file or directory
make: *** [Makefile:41: install] Error 1
make: Leaving directory '/build/backintime-git/src/backintime/qt'
==> ERROR: A failure occurred in package_backintime-git().

The install path should be relative to the package build output folder:

install -d /build/backintime-git/pkg/backintime-git/usr/share/metainfo

@buhtz
Copy link
Member Author

buhtz commented Feb 23, 2024

Dear willemw12,
thanks for reporting back.

Can you please open a new issue for this.
Please also post your full "Makefile".

The command install -d /usr/share/metainfo should create that folder. But the next error indicates this wasn't the case. Maybe you haven't had the rights creating that folder?

EDIT

See this line 179 in qt/configure:

printf "\tinstall -d /usr/share/metainfo\n" >> ${MAKEFILE}

Can you please modify it to:

addInstallDir "/share/metainfo"

Might this help?

@willemw12
Copy link

willemw12 commented Feb 23, 2024

Yes, with the usual "addInstallDir" it does build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants