You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: deployment/desktop/desktop-application-metadata-overview.md
+15-13Lines changed: 15 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,22 @@
1
1
---
2
-
Title: How to package a desktop application
2
+
title: How to package a desktop application
3
3
subsection: desktop
4
-
4
+
order: 2
5
5
---
6
6
7
7
# {{page.title}}
8
8
9
-
###System Architecture
10
-
####Linux File Hierarchy
9
+
### System Architecture
10
+
#### Linux File Hierarchy
11
+
11
12
Applications on Linux are expected to install binary files to /usr/bin, the install architecture independent data files to /usr/share/ and configuration files to /etc. Small temporary files can be stored in /tmp and much larger files in /var/tmp. Per-user configuration is either stored in the users home directory (in ~/.config) or stored in a binary settings store such as dconf.
12
13
See the File Hierarchy Standard[[1](https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard)] for more information.
13
14
14
-
###Desktop files
15
+
### Desktop files
16
+
15
17
Desktop files have been around for a long while now and are used by almost all Linux desktops to provide the basic description of a desktop application that your desktop environment will display. Like a human readable name and an icon.
16
18
17
-
So the creation of a desktop file on Linux allows a program to be visible to the graphical environment, e.g. KDE or GNOME Shell. If applications do not have a desktop file they must be manually launched using a terminal emulator. Desktop files must adhere to the Desktop File Specification[[2](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#introduction)] and provide metadata in an ini-style format such as:
19
+
So the creation of a desktop file on Linux allows a program to be visible to the graphical environment, e.g. KDE or GNOME Shell. If applications do not have a desktop file they must be manually launched using a terminal emulator. Desktop files must adhere to the Desktop File Specification[[2](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#introduction)] and provide metadata in an ini-style format such as:
18
20
19
21
- Binary type, typically ‘Application’
20
22
- Program name (optionally localized)
@@ -55,7 +57,8 @@ This tools is available through the desktop-file-utils package, which you can in
55
57
56
58
dnf install desktop-file-utils
57
59
58
-
###AppData Files
60
+
### AppData Files
61
+
59
62
At least one valid AppData file with the suffix .appdata.xml file should be installed into /usr/share/appdata with a name that matches the name of the .desktop file, e.g. gimp.desktop & gimp.appdata.xml or org.gnome.Nautilus.desktop & org.gnome.Nautilus.appdata.xml.
60
63
61
64
In the AppData file you should include several 16:9 aspect screenshots along with a compelling translated description made up of multiple paragraphs.
@@ -121,21 +124,22 @@ A typical (albeit somewhat truncated) AppData file is shown below:
The AppStream specification is a mature and evolving standard that allows upstream applications to provide metadata such as localized descriptions, screenshots, extra keywords and content ratings for parental control. The basic concept is that the upstream project ships one extra AppData XML file which is used to build a global application catalog called an AppStream file. Over 1000 open source projects now include AppData files, and the software center shipped in Fedora, Ubuntu and OpenSuse is an easy-to-use application filled with useful application metadata. Applications without AppData files are no longer shown which provides quite some incentive to upstream projects wanting visibility in popular desktop environments.
127
130
128
131
The AppStream specification is an mature and evolving standard that allows upstream applications to provide metadata such as localized descriptions, screenshots, extra keywords and content ratings for parental control. The basic concept is that the upstream project ships one extra AppData XML file which is used to build a global application catalog called an AppStream file. Over 1000 open source projects now include AppData files, and the software center shipped in Fedora, Ubuntu and OpenSuse is now an easy to use application filled with useful application metadata. Applications without AppData files are no longer shown which provides quite some incentive to upstream projects wanting visibility in popular desktop environments.
129
132
130
-
AppStream[[3](https://www.freedesktop.org/software/appstream/docs/)] was first introduced in 2008 and since then many people have contributed to the specification. It is being used primarily for application metadata but also now is used for drivers, firmware, input methods and fonts. There are multiple projects producing AppStream metadata and also a number of projects consuming the final XML metadata.
133
+
AppStream[[3](https://www.freedesktop.org/software/appstream/docs/)] was first introduced in 2008 and since then many people have contributed to the specification. It is being used primarily for application metadata but also now is used for drivers, firmware, input methods and fonts. There are multiple projects producing AppStream metadata and also a number of projects consuming the final XML metadata.
131
134
132
135
When applications are being built as packages by a distribution then the AppStream generation is done automatically, and you do not need to do anything other than installing a .desktop file and an appdata.xml file in the upstream tarball or zip file.
133
136
134
137
If the application is being built on your own machines or cloud instance then the distributor will need to generate the AppStream metadata manually. This would for example be the case when internal-only or closed source software is being either used or produced. This document assumes you are currently building RPM packages and exporting yum-style repository metadata for Fedora or RHEL although the concepts are the same for rpm-on-OpenSuse or deb-on-Ubuntu.
135
138
136
139
NOTE: If you are building packages, make sure that there are not two applications installed with one single package. If this is currently the case split up the package so that there are multiple subpackages or mark one of the .desktop files as NoDisplay=true. Make sure the application-subpackages depend on any -common subpackage and deal with upgrades (perhaps using a metapackage) if you’ve shipped the application before.
137
140
138
-
###Summary of Package building
141
+
### Summary of Package building
142
+
139
143
The steps outlined above explain the extra metadata that you need for your application to show up in GNOME Software. This tutorial does not cover how to set up your build system to build these, but both for Meson and autotools you should be able to find a plethora of examples online.
140
144
And there are also major resources available to explain how to create a [Fedora RPM](https://fedoraproject.org/wiki/How_to_create_an_RPM_package) or [how to build a Flatpak](http://docs.flatpak.org/en/latest/). You probably also want to tie both the Desktop file and the AppData file into your i18n system so the metadata in them can be translated.
141
145
@@ -146,11 +150,9 @@ And there are also major resources available to explain how to create a [Fedora
146
150
147
151
It is worth nothing here that while this document explains how you can do everything yourself we do generally recommend relying on existing community infrastructure for hosting source code and packages if you can (for instance if your application is open source), as they will save you work and effort over time. For instance putting your sourcecode into the GNOME git will give you free access to the translator community in GNOME and thus increase the chance your application is internationalized significantly. And by building your package in Fedora you can get peer review of your package and free hosting of the resulting package. We are also working on a service that will automatically generate a Flatpack bundle of your application in Fedora, meaning you get a Flatpak version of your application for free as a result.
148
152
149
-
###Citations
153
+
###Citations
150
154
151
155
1.[Filesystem Hierarchy Standard: 17th October 2016](https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard)
152
156
2.[Desktop Specification: 17th October 2016](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#introduction)
153
157
3.[AppStream Specification 0.10: 17th October 2016](https://www.freedesktop.org/software/appstream/docs/)
154
158
4.[SPDX license list](https://spdx.org/licenses/)
155
-
156
-
[Back to index](how-to-package-a-desktop-application.md)
Copy file name to clipboardExpand all lines: deployment/desktop/desktop-software-hosting.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,21 @@
1
1
---
2
2
title: How to Host Desktop Software
3
3
subsection: desktop
4
-
4
+
order: 3
5
5
---
6
6
7
7
# {{page.title}}
8
8
9
-
##Setting up hosting infrastructure for your package
9
+
## Setting up hosting infrastructure for your package
10
+
10
11
We will here explain how you set up a Yum repository for RPM packages that provides the needed metadata. If you are making a Flatpak we recommend skipping ahead to the Flatpak section a bit further down.
11
12
12
-
###Yum hosting and metadata
13
+
### Yum hosting and metadata
14
+
13
15
When GNOME Software checks for updates it downloads various metadata files from the server describing the packages available in the repository. GNOME Software can also download AppStream metadata at the same time, allowing add-on repositories to include applications that are visible in the software center.
14
16
15
-
###Yum hosting and Metadata:
17
+
### Yum hosting and Metadata:
18
+
16
19
When GNOME Software checks for updates it downloads various metadata files from the server describing the packages available in the repository. GNOME Software can also download AppStream metadata at the same time, allowing add-on repositories to include applications that are visible in the the software center.
17
20
18
21
In most cases distributors are already building binary RPMS and then building metadata as an additional step by running something like this to generate the repomd files on a directory of packages. The tool for creating the repository metadata is called createrepo_c and is part of the package createrepo_c in Fedora. You can install it by running the command:
Copy file name to clipboardExpand all lines: deployment/desktop/how-to-host-yum-repo-on-github.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,13 @@
1
1
---
2
2
title: Hosting a Yum Repository on Github
3
3
subsection: desktop
4
-
4
+
order: 4
5
5
---
6
6
7
7
# {{page.title}}
8
8
9
-
####Hosting your Yum repository on Github
9
+
#### Hosting your Yum repository on Github
10
+
10
11
Github isn't really set up for hosting Yum repositories, but here is a method that currently works. So once you created a local copy of your repository create a new project on github. Then use the follow commands to import your repository into github.
11
12
12
13
cd ~/src/myrepository
@@ -32,5 +33,5 @@ Copy that URL as you will need the information from it to create your .repo file
32
33
So on top is your Repo shortname inside the brackets, then a name field with a more extensive name. For the baseurl paste the URL you copied earlier and remove the last bits until you are left with either the 'norach' directory or your platform directory for instance x86_64.
33
34
34
35
Once you have that file completed put it into /etc/yum.repos.d on your computer and load up GNOME Software. Click on the 'Updates' button in GNOME Software and then on the refresh button in the top left corner to ensure your database is up to date. If everything works as expected you should then be able to do a search in GNOME software and find your new application showing up.
Copy file name to clipboardExpand all lines: deployment/desktop/how-to-package-a-desktop-application.md
+18-12Lines changed: 18 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,41 +2,47 @@
2
2
title: Adding Applications to GNOME Software
3
3
section: deployment
4
4
subsection: desktop
5
-
5
+
description: >
6
+
How to build, package, and host your applications so they show up in GUI desktop tools for easy deployment by your users.
6
7
order: 1
7
8
---
8
9
9
10
# {{page.title}}
10
11
11
12
**Written by Richard Hughes and Christian F.K. Schaller**
12
13
13
-
##Abstract
14
+
##Abstract
14
15
15
16
Traditionally we have had little information about Linux applications before they have been installed. With the creation of a software center we require access to rich set of metadata about an application before it is deployed so it it can be displayed to the user and easily installed.
16
17
This document is meant to be a guide for developers who wish to get their software appearing in the Software stores in Fedora Workstation and other distributions. Without the metadata described in this document your application is likely to go undiscovered by many or most linux users, but by reading this document you should be able to relatively quickly prepare you application.
17
18
18
-

19
+

19
20
20
-
###Introduction to the technical details
21
+
###Introduction to the technical details
21
22
22
23
Installing applications on Linux has traditionally involved copying binary and data files into a directory and just writing a single desktop file into a per-user or per-system directory so that it shows up in the desktop environment. In this document we refer to applications as graphical programs, rather than other system add-on components like drivers and codecs. This document will explain why the extra metadata is required and what is required for an application to be visible in the software center. We will try to document how to do this regardless of if you choose to pakcage your application as a rpm package or as a flatpak bundle. The current rules is a combination of various standards that have evolved over the years and will will try to summarize and explain them here, going from bottom to top.
23
24
24
-
1. An introduction to [Desktop Application metadata](desktop-application-metadata-overview.md)
25
+
1. An introduction to [Desktop Application metadata](desktop-application-metadata-overview.html)
26
+
27
+
2. Special steps to [ setup and create desktop yum repo](desktop-software-hosting.html)
25
28
26
-
2. Special steps to [ setup and create desktop yum repo](desktop-software-hosting.md)
29
+
3. Instructions for [how to host a Yum repo on github](how-to-host-yum-repo-on-github.html)
27
30
28
-
3. Instrunctions for [how to host a Yum repo on github](how-to-host-yum-repo-on-github.md)
31
+
4. How to [setup and host flatpaks](how-to-setup-and-host-flatpaks.html)
29
32
30
-
4. How to [setup and host flatpaks](how-to-setup-and-host-flatpaks.md)
33
+
5. How to [propose third party software for Fedora listing](how-to-propose-a-3rd-party-application-for-inclusion-in-fedora.html)
31
34
32
-
5. How to [Propose 3rd party Software for Fedora listing](how-to-propose-a-3rd-party-application-for-inclusion-in-fedora.md)
33
35
36
+
### Summary
34
37
35
-
###Summary
36
38
AppStream files allow us to build a modern software center experience either using legacy distro packages with yum-style metadata or with the new flatpak application deployment framework. By including a desktop file and AppData file for your Linux binary build your application can be easily installed by end users.
37
-
###Future Work
39
+
40
+
### Future Work
41
+
38
42
AppData currently uses the OARS content rating system which will be expanded for more uses cases and filtering options.
39
-
### Related Work
43
+
44
+
### Related Work
45
+
40
46
The ODRS[1] is a web service which provides end-user moderated application reviews using the AppStream application ID.
Copy file name to clipboardExpand all lines: deployment/desktop/how-to-propose-a-3rd-party-application-for-inclusion-in-fedora.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,13 @@
1
1
---
2
2
title: Propose a Third Party App to Include in Fedora
3
3
subsection: desktop
4
-
4
+
order: 6
5
5
---
6
6
7
7
# {{page.title}}
8
8
9
-
###Getting it into Fedora Workstation
9
+
### Getting it into Fedora Workstation
10
+
10
11
You now have your repository created and ready for users to connect to it. The final step is getting your repository added to Fedora Workstation.
11
12
To start the process for this you can file a [Fedora ticket](https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora) against the Fedora-workstation-repositories component. The information needed is a decription of your application. We also need the URL where the repository is located.
Copy file name to clipboardExpand all lines: deployment/desktop/how-to-setup-and-host-flatpaks.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
---
2
2
title: Set Up and Host Flatpaks
3
3
subsection: desktop
4
-
4
+
order: 5
5
5
---
6
6
7
7
# {{page.title}}
8
8
9
-
###Flapak hosting and Metadata
9
+
###Flatpak hosting and Metadata
10
10
11
11
The flatpak-builder binary generates AppStream metadata automatically when building applications if the appstream-compose tool is installed on the flatpak build machine. Flatpak[1] repositories are exported with a separate ‘appstream’ branch which is automatically downloaded by GNOME Software and no additional work is required when building your application or updating the remote. Adding the remote is enough to add the application to the software center, on the assumption the AppData file is valid.
12
12
@@ -42,6 +42,7 @@ The best way to make your application and its Flatpak repository available to us
42
42
Comment=GNOME loves to cook
43
43
44
44
### Hosting a Flatpak repository on Github
45
+
45
46
Github isn't really set up for hosting Flatpak repositories, so we can't guarantee that this will keep working in the future. So once you created a local copy of your repository create a new project on github, enable github pages for the project and point it at the master branch.
46
47
Then use the follow commands to import your repository into github.
0 commit comments