@@ -208,9 +208,46 @@ The extensions are mounted in alphabetical path order of directory.
208208 by Flatpak builder like ``.Locale, .Debug `` also do not need to be
209209 in application manifest.
210210
211- ``org.freedesktop.Platform.ffmpeg-full `` is an application extension
212- (mounted inside ``/app/extension_directory ``) belonging to
213- ``org.freedesktop.Platform ``.
211+ Finding Base Runtime Version
212+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
213+
214+ Some extensions are either built as part of the runtimes or have their
215+ extension points defined within them. These typically follow the branch
216+ pattern of the runtime. In case of
217+ ``org.gnome.{Platform, Sdk}, org.kde.{Platform, Sdk} `` they follow the
218+ branch pattern of Freedesktop SDK (``org.freedesktop.{Platform, Sdk} ``).
219+
220+ When using such extensions, the extension version must match the base
221+ runtime version. This ensures ABI and API compatibility.
222+
223+ For example, ``org.freedesktop.Platform.ffmpeg-full `` is built as part
224+ of the Freedesktop SDK and provides versions
225+ ``22.08, 23.08, 24.08, ... ``. Suppose the application uses the runtime
226+ ``org.kde.Platform//5.15-23.08 ``, which is based on Freedesktop SDK.
227+
228+ To find the base runtime version of ``org.kde.Platform//5.15-23.08 ``,
229+ run::
230+
231+ flatpak remote-info flathub -m org.kde.Platform//5.15-23.08 | \
232+ grep -A 5 -F '[Extension org.freedesktop.Platform.GL]'
233+
234+ The output will have ``versions=23.08;23.08-extra;1.4 ``, and thus the
235+ base runtime version is of ````org.kde.Platform//5.15-23.08 `` is
236+ ``23.08 ``.
237+
238+ Similarly, for ``org.freedesktop.Sdk.Extension.texlive ``, the extension
239+ point ``org.freedesktop.Sdk.Extension `` is defined in the Freedesktop
240+ SDK. To determine the base runtime version for a derived runtime such as
241+ ``org.gnome.Platform//46 ``, run::
242+
243+ flatpak remote-info flathub -m org.gnome.Sdk//46 | \
244+ grep -A 5 -F '[Extension org.freedesktop.Sdk.Extension]'
245+
246+ The output will have ``versions=23.08 ``, and thus ``23.08 `` needs
247+ to be used as ``version `` in ``add-extensions ``.
248+
249+ Examples
250+ ^^^^^^^^^
214251
215252.. code-block :: yaml
216253
@@ -221,26 +258,23 @@ The extensions are mounted in alphabetical path order of directory.
221258 command : foo
222259 add-extensions :
223260 org.freedesktop.Platform.ffmpeg-full :
224- version : ' 23.08'
261+ version : ' 23.08' # replace by appropriate version
225262 directory : lib/ffmpeg
226263 add-ld-path : .
227264 cleanup-commands :
228265 - mkdir -p ${FLATPAK_DEST}/lib/ffmpeg
229266
230- ``org.freedesktop.Sdk.Extension `` is an extension point defined in
231- ``org.freedesktop.Sdk ``.
232-
233267 .. code-block :: yaml
234268
235269 id : org.flatpak.cool-app
236- runtime : org.freedesktop .Platform
237- runtime-version : ' 23.08 '
270+ runtime : org.gnome .Platform
271+ runtime-version : ' 46 '
238272 sdk : org.freedesktop.Sdk
239273 command : foo
240274 add-extensions :
241275 org.freedesktop.Sdk.Extension.texlive :
242276 directory : texlive
243- version : ' 23.08'
277+ version : ' 23.08' # replace by appropriate version
244278 cleanup-commands :
245279 - mkdir -p ${FLATPAK_DEST}/texlive
246280
@@ -298,9 +332,10 @@ manifests. These are:
298332 command : foo
299333
300334 - ``sdk-extensions `` can be used to install extra extensions having
301- an extension point in the parent runtime that has to be installed for the
302- app to build. These are similarly made available during build and
303- not in the final flatpak.
335+ an extension point in the parent runtime that has to be installed for
336+ the app to build. These are similarly made available during build and
337+ not in the final flatpak. These always follow the branch pattern
338+ of the base runtime (see above).
304339
305340.. code-block :: yaml
306341
@@ -545,25 +580,25 @@ These are common to the Freedesktop SDK and runtime:
545580 has two branches ``${RUNTIME_VERSION} `` and
546581 ``${RUNTIME_VERSION}-extra ``, the latter containing support for
547582 patented codecs.
548-
583+
549584 ``org.freedesktop.Platform.GL.Debug `` – Debug extension point for
550585 ``org.freedesktop.Platform.GL ``, managed by the runtime but the user needs
551586 to explicitly install ``org.freedesktop.Platform.GL.Debug.default//${RUNTIME_VERSION} ``
552587 and ``org.freedesktop.Platform.GL.Debug.default//${RUNTIME_VERSION}-extra ``
553588 to have the debug symbols available.
554589
555590 The following extensions utilise the above two extension points::
556-
591+
557592 org.freedesktop.Platform.GL.default//${RUNTIME_VERSION}
558593 org.freedesktop.Platform.GL.default//${RUNTIME_VERSION}-extra
559594 org.freedesktop.Platform.GL.Debug.default//${RUNTIME_VERSION}
560595 org.freedesktop.Platform.GL.Debug.default//${RUNTIME_VERSION}-extra
561-
596+
562597 org.freedesktop.Platform.GL32.default//${RUNTIME_VERSION}
563598 org.freedesktop.Platform.GL32.default//${RUNTIME_VERSION}-extra
564599 org.freedesktop.Platform.GL32.Debug.default//${RUNTIME_VERSION}
565600 org.freedesktop.Platform.GL32.Debug.default//${RUNTIME_VERSION}-extra
566-
601+
567602 org.freedesktop.Platform.GL.nvidia-${DRIVER_VERSION}
568603 org.freedesktop.Platform.GL32.nvidia-${DRIVER_VERSION}
569604
0 commit comments