public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Owen W. Taylor <otaylor@fishsoup.net>
To: git-commits@fedoraproject.org
Subject: [flatpaks/flatpak-runtime] f45: Make it easy to make the "base profiles" the main profiles
Date: Fri, 11 Sep 2026 14:40:48 GMT	[thread overview]
Message-ID: <178913764810.1.18412363924823220894.flatpaks-flatpak-runtime-a2f26ec9c31e@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : flatpaks/flatpak-runtime
            Branch : f45
            Commit : a2f26ec9c31ee43decee766a5fccdcc16ca7d66c
            Author : Owen W. Taylor <otaylor@fishsoup.net>
            Date   : 2020-03-20T21:51:58+01:00
            Stats  : +93/-15 in 5 file(s)
            URL    : https://src.fedoraproject.org/flatpaks/flatpak-runtime/c/a2f26ec9c31ee43decee766a5fccdcc16ca7d66c?branch=f45

            Log:
            Make it easy to make the "base profiles" the main profiles

Add a single setting in util.py that can be enabled to make the
runtime and SDK based off of org.freedesktop.* rather than
org.gnome.*.

---
diff --git a/flatpak-runtime-baseonly.in.yaml b/flatpak-runtime-baseonly.in.yaml
new file mode 100644
index 0000000..0308cf3
--- /dev/null
+++ b/flatpak-runtime-baseonly.in.yaml
@@ -0,0 +1,47 @@
+document: modulemd
+version: 1
+data:
+    summary: 'Flatpak Runtime'
+    description: >-
+         This module defines a runtimes for Flatpaks. The 'sdk' profile defines
+         the corresponding SDKs that applications can be built against with flatpak-builder.
+    license:
+        module: [ MIT ]
+    dependencies:
+        buildrequires:
+            platform: @STREAM@
+        requires:
+            platform: @STREAM@
+    profiles:
+        runtime:
+            rpms: []
+        sdk:
+            rpms: []
+        buildroot:
+            rpms: [flatpak-rpm-macros, flatpak-runtime-config]
+    api:
+        rpms:
+            - flatpak-rpm-macros
+            - flatpak-runtime-config
+    components:
+        rpms:
+            flatpak-rpm-macros:
+                rationale: Set up build root for flatpak RPMS
+                ref: master
+            flatpak-runtime-config:
+                rationale: Runtime configuration files
+                ref: master
+    xmd:
+        # This is used when building applications against this module so that
+        # the resulting Flatpak will embed a reference to the correct runtime
+        flatpak:
+            branch: @STREAM@
+            runtimes:
+                # Map from profile name to pre-profile information - the
+                # profile named 'runtime' is the default.
+                runtime:
+                    id: @ID_PREFIX@.Platform
+                    sdk: @ID_PREFIX@.Sdk
+                sdk:
+                    id: @ID_PREFIX@.Sdk
+                    sdk: @ID_PREFIX@.Platform

diff --git a/runtime-template.html b/runtime-template.html
index 8a9b4a7..fcdf91c 100644
--- a/runtime-template.html
+++ b/runtime-template.html
@@ -22,14 +22,18 @@
 	    {%endif%}
 	  </td>
 	</tr>
+        {%if not baseonly%}
 	<tr><td>GN/P</td><td> - org.gnome.Platform
 	    {%if unmatched.gnome_platform > 0%}
 	    (<a href="out/gnome-Platform.unmatched">{{unmatched.gnome_platform}} unmatched</a>)
 	    {%endif%}
 	  </td>
 	</tr>
+        {%endif%}
 	<tr><td>FD/S</td><td> - org.freedesktop.Sdk</td></tr>
+        {%if not baseonly%}
 	<tr><td>GN/S</td><td> - org.gnome.Sdk</td></tr>
+        {%endif%}
 	<tr><td>LIVE</td><td> - F30 live image</td></tr>
 	<tr><td class="root"></td><td> - Root package, only included because of files in runtime</td></tr>
 	<tr><td class="files"></td><td> - Included because of files in runtime, also depended upon</td></tr>
@@ -47,9 +51,13 @@
 	<tr class="letter-header">
 	  <th class="letter">{{ letter.letter }}</th>
 	  <th title="org.freedesktop.Platform">FD/P</th>
+          {%if not baseonly%}
 	  <th title="org.gnome.Platform">GN/P</th>
+          {%endif%}
 	  <th title="org.freedesktop.Sdk">FD/S</th>
+          {%if not baseonly%}
 	  <th title="org.gnome.Sdk">GN/S</th>
+          {%endif%}
 	  <th>LIVE</th>
 	  <th></th>
 	</tr>
@@ -57,9 +65,13 @@
 	<tr class="source-package {{ spackage.klass }}">
 	  <td>{{ spackage.name }}</td>
 	  <td></td>
+          {%if not baseonly%}
 	  <td></td>
+          {%endif%}
 	  <td></td>
+          {%if not baseonly%}
 	  <td></td>
+          {%endif%}
 	  <td></td>
 	  <td>{{ spackage.modules }}</td>
 	</tr>
@@ -67,9 +79,13 @@
 	<tr class="package {{ package.klass }}">
 	  <td>{{ package.name }}</td>
 	  <td class="{{package.freedesktop_platform_inclusion}}" title="{{ package.freedesktop_platform_why }}"></td>
+          {%if not baseonly%}
 	  <td class="{{package.gnome_platform_inclusion}}" title="{{ package.gnome_platform_why }}"></td>
+          {%endif%}
 	  <td class="{{package.freedesktop_sdk_inclusion}}" title="{{ package.freedesktop_sdk_why }}"></td>
+          {%if not baseonly%}
 	  <td class="{{package.gnome_sdk_inclusion}}" title="{{ package.gnome_sdk_why }}"></td>
+          {%endif%}
 	  <td class="{{package.live_inclusion}}"></td>
 	  <td>{{ package.note }}</td>
 	</tr>

diff --git a/tools/generate-modulemd.py b/tools/generate-modulemd.py
index b1a45b7..a4f99dc 100755
--- a/tools/generate-modulemd.py
+++ b/tools/generate-modulemd.py
@@ -1,9 +1,11 @@
 #!/usr/bin/python3
 import sys
 from yaml_utils import ordered_load, ordered_dump
-from util import ID_PREFIX, STREAM
+from util import ID_PREFIX, STREAM, BASEONLY
 
-with open('flatpak-runtime.in.yaml') as f:
+template = 'flatpak-runtime-baseonly.in.yaml' if BASEONLY else 'flatpak-runtime.in.yaml'
+
+with open(template) as f:
     modulemd_string = f.read()
 
 modulemd_string = modulemd_string \
@@ -18,10 +20,14 @@ def set_profile(profile_name, list_file):
     print("{}: {} packages".format(profile_name, len(packages)), file=sys.stderr)
     modulemd['data']['profiles'][profile_name]['rpms'] = packages
 
-set_profile('runtime', 'out/runtime.profile')
-set_profile('runtime-base', 'out/runtime-base.profile')
-set_profile('sdk', 'out/sdk.profile')
-set_profile('sdk-base', 'out/sdk-base.profile')
+if BASEONLY:
+    set_profile('runtime', 'out/runtime-base.profile')
+    set_profile('sdk', 'out/sdk-base.profile')
+else:
+    set_profile('runtime', 'out/runtime.profile')
+    set_profile('runtime-base', 'out/runtime-base.profile')
+    set_profile('sdk', 'out/sdk.profile')
+    set_profile('sdk-base', 'out/sdk-base.profile')
 
 with open('flatpak-runtime.new.yaml', 'w') as f:
     ordered_dump(modulemd, stream=f, default_flow_style=False, encoding="utf-8")

diff --git a/tools/generate-runtime-report.py b/tools/generate-runtime-report.py
index 2dc0249..9c469bb 100755
--- a/tools/generate-runtime-report.py
+++ b/tools/generate-runtime-report.py
@@ -8,7 +8,7 @@ import re
 import subprocess
 import sys
 import util
-from util import DATASET_ARG
+from util import BASEONLY, DATASET_ARG
 
 def start(msg):
     print("{}: \033[90m{} ... \033[39m".format(os.path.basename(sys.argv[0]), msg), file=sys.stderr, end="")
@@ -89,7 +89,9 @@ class Package(object):
     def note(self):
         if self._note:
             return self._note
-        elif self.gnome_platform and not self.live:
+        elif not BASEONLY and self.gnome_platform and not self.live:
+            return "platform package not on Live image"
+        elif BASEONLY and self.freedesktop_platform and not self.live:
             return "platform package not on Live image"
         else:
             return ""
@@ -309,14 +311,16 @@ devel_packages['gdk-pixbuf2'] = 'gdk-pixbuf2-devel'
 
 add_packages('out/freedesktop-Platform.packages', 'freedesktop_platform', resolve_deps=True)
 add_packages('out/freedesktop-Sdk.packages', 'freedesktop_sdk', resolve_deps=True)
-add_packages('out/gnome-Platform.packages', 'gnome_platform', resolve_deps=True)
-add_packages('out/gnome-Sdk.packages', 'gnome_sdk', resolve_deps=True)
+if not BASEONLY:
+    add_packages('out/gnome-Platform.packages', 'gnome_platform', resolve_deps=True)
+    add_packages('out/gnome-Sdk.packages', 'gnome_sdk', resolve_deps=True)
 add_packages('data/f30-live.packages', 'live', only_if_exists=True)
 
 add_package_files('out/freedesktop-Platform.matched', 'freedesktop_platform')
 add_package_files('out/freedesktop-Sdk.matched', 'freedesktop_sdk')
-add_package_files('out/gnome-Platform.matched', 'gnome_platform')
-add_package_files('out/gnome-Sdk.matched', 'gnome_sdk')
+if not BASEONLY:
+    add_package_files('out/gnome-Platform.matched', 'gnome_platform')
+    add_package_files('out/gnome-Sdk.matched', 'gnome_sdk')
 
 # Add extra packages
 extra_base = []
@@ -341,8 +345,9 @@ for name, note, flag in read_package_notes():
 
 add_packages(extra_base, 'freedesktop_platform', resolve_deps=True)
 add_packages(extra_base_sdk, 'freedesktop_sdk', resolve_deps=True)
-add_packages(extra, 'gnome_platform', resolve_deps=True)
-add_packages(extra_sdk, 'gnome_sdk', resolve_deps=True)
+if not BASEONLY:
+    add_packages(extra, 'gnome_platform', resolve_deps=True)
+    add_packages(extra_sdk, 'gnome_sdk', resolve_deps=True)
 
 source_packages = {}
 for package in packages.values():
@@ -425,4 +430,6 @@ env = Environment(
 template = env.get_template('runtime-template.html')
 
 with open('reports/runtime.html', 'w') as f:
-    f.write(template.render(letters=letters, unmatched=unmatched_counts))
+    f.write(template.render(baseonly=BASEONLY,
+                            letters=letters,
+                            unmatched=unmatched_counts))

diff --git a/tools/util.py b/tools/util.py
index 3f18fa6..7bec455 100644
--- a/tools/util.py
+++ b/tools/util.py
@@ -10,6 +10,8 @@ import xml.sax
 STREAM = 'f30'
 ID_PREFIX = 'org.fedoraproject'
 DATASET_ARG = '--dataset=f30'
+# If this is True, then we'll use the "base" profiles (freedesktop-based) as the main profiles
+BASEONLY = False
 
 XDG_CACHE_HOME = os.environ.get("XDG_CACHE_HOME") or os.path.expanduser("~/.cache")
 

                 reply	other threads:[~2026-09-11 14:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178913764810.1.18412363924823220894.flatpaks-flatpak-runtime-a2f26ec9c31e@fedoraproject.org \
    --to=otaylor@fishsoup.net \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox