Title: [263963] trunk/Tools
Revision
263963
Author
[email protected]
Date
2020-07-06 01:35:31 -0700 (Mon, 06 Jul 2020)

Log Message

[Flatpak SDK] Misc updates
https://bugs.webkit.org/show_bug.cgi?id=213968

Patch by Philippe Normand <[email protected]> on 2020-07-06
Reviewed by Sergio Villar Senin.

* buildstream/README.rst: ReST format fixes and doc additions.
* buildstream/elements/sdk/perl-term-readkey.bst: Remove perllocal.pod as it can clash with other recipes.
* flatpak/flatpakutils.py:
(run_in_sandbox_if_available): Add --flatpak- option pass-through support. This was lost
after the migration of run-minibrowser to python.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (263962 => 263963)


--- trunk/Tools/ChangeLog	2020-07-06 07:42:30 UTC (rev 263962)
+++ trunk/Tools/ChangeLog	2020-07-06 08:35:31 UTC (rev 263963)
@@ -1,3 +1,16 @@
+2020-07-06  Philippe Normand  <[email protected]>
+
+        [Flatpak SDK] Misc updates
+        https://bugs.webkit.org/show_bug.cgi?id=213968
+
+        Reviewed by Sergio Villar Senin.
+
+        * buildstream/README.rst: ReST format fixes and doc additions.
+        * buildstream/elements/sdk/perl-term-readkey.bst: Remove perllocal.pod as it can clash with other recipes.
+        * flatpak/flatpakutils.py:
+        (run_in_sandbox_if_available): Add --flatpak- option pass-through support. This was lost
+        after the migration of run-minibrowser to python.
+
 2020-07-05  Commit Queue  <[email protected]>
 
         Unreviewed, reverting r263960.

Modified: trunk/Tools/buildstream/README.rst (263962 => 263963)


--- trunk/Tools/buildstream/README.rst	2020-07-06 07:42:30 UTC (rev 263962)
+++ trunk/Tools/buildstream/README.rst	2020-07-06 08:35:31 UTC (rev 263963)
@@ -9,45 +9,65 @@
 Rebuilding the SDK is needed when you have to update WebKit test dependencies or
 add new dependencies to the SDK.
 
+To build the SDK, run:
 
-To build the SDK, run `Tools/Scripts/webkit-flatpak-sdk --build`, this can take
-hours and use gigabytes of your hard-drive. To build a single recipe, use
-something like:
+::
 
-`Tools/Scripts/bst-wrapper build sdk/gtk.bst`
+  $ Tools/Scripts/webkit-flatpak-sdk --build
 
+This can take hours and use gigabytes of your hard-drive. To build a single recipe, use something
+like:
+
+::
+
+  $ Tools/Scripts/bst-wrapper build sdk/gtk.bst
+
 To enter the Buildstream SDK shell and debug stuff when hacking on a specific
-dependency, `Tools/Scripts/bst-wrapper shell sdk/gtk.bst`.
+dependency:
 
+::
+
+  $ Tools/Scripts/bst-wrapper shell sdk/gtk.bst
+
 To test your changes in WebKit:
 
-{{{
-$ Tools/Scripts/webkit-flatpak -u --repo=Tools/buildstream/repo
-$ Tools/Scripts/run-minibrowser --gtk --flatpak-repo=Tools/buildstream/repo <url>
-...
-}}}
+::
 
-bst-wrapper has the same options as bst itself, documented on the `Buildstream
-website`_.
+  $ Tools/Scripts/webkit-flatpak -u --repo=$PWD/Tools/buildstream/repo
+  $ Tools/Scripts/run-minibrowser --gtk --flatpak-repo=$PWD/Tools/buildstream/repo <url>
+  $ Tools/Scripts/run-webkit-tests --gtk --repo=$PWD/Tools/buildstream/repo
+  ...
 
+bst-wrapper has the same options as bst itself, documented on the `Buildstream website`_.
+
+Recipe version updates should follow this procedure:
+
+- For recipes tracking git tags (with the `git_tag` source kind), you can manually update the branch
+  or tag name referenced in the `track` value (see rr.bst for example). and then run `bst-wrapper
+  track sdk/<recipe>.bst`. If the recipe tracks git master, no manual update is needed, just run the
+  track command.
+- For recipes tracking tarballs, update the `url` value and run `bst-wrapper track
+  sdk/<recipe>.bst`.
+
+
 Another nice feature of Buildstream is `workspace`, where you can make changes
 to recipes:
 
-{{{
-$ Tools/Scripts/bst-wrapper workspace open sdk/openxr.bst ~/Projects/openxr
-# hack hack hack in ~/Projects/openxr/
-$ Tools/Scripts/bst-wrapper build sdk/openxr.bst
-# Once you are happy, format changes from your workspace with git:
-$ cd ~/Projects/openxr
-$ git commit -a ...
-$ git format-patch -1
-$ mv *.patch ~/WebKit/Tools/buildstream/patches/
-# finally add patches as sources in openxr.bst
-# and close the workspace
-$ Tools/Scripts/bst-wrapper workspace close sdk/openxr.bst
-$ rm -fr ~/Projects/openxr
-}}}
+::
 
+  $ Tools/Scripts/bst-wrapper workspace open sdk/openxr.bst ~/Projects/openxr
+  # hack hack hack in ~/Projects/openxr/
+  $ Tools/Scripts/bst-wrapper build sdk/openxr.bst
+  # Once you are happy, format changes from your workspace with git:
+  $ cd ~/Projects/openxr
+  $ git commit -a ...
+  $ git format-patch -1
+  $ mv *.patch ~/WebKit/Tools/buildstream/patches/
+  # finally add patches as sources in openxr.bst
+  # and close the workspace
+  $ Tools/Scripts/bst-wrapper workspace close sdk/openxr.bst
+  $ rm -fr ~/Projects/openxr
+
 Internally the bst-wrapper will install Buildstream and a few other python
 dependencies in a local virtualenv managed by pipenv. This is all abstracted
 though, in theory direct access to the pipenv environment shouldn't be needed.

Modified: trunk/Tools/buildstream/elements/sdk/perl-term-readkey.bst (263962 => 263963)


--- trunk/Tools/buildstream/elements/sdk/perl-term-readkey.bst	2020-07-06 07:42:30 UTC (rev 263962)
+++ trunk/Tools/buildstream/elements/sdk/perl-term-readkey.bst	2020-07-06 08:35:31 UTC (rev 263963)
@@ -12,3 +12,9 @@
     integration-commands:
     - |
       perl -w -e "use Term::ReadKey;"
+
+config:
+  install-commands:
+    - |
+      %{make-install}
+      find "%{install-root}" -type f -name perllocal.pod -delete

Modified: trunk/Tools/flatpak/flatpakutils.py (263962 => 263963)


--- trunk/Tools/flatpak/flatpakutils.py	2020-07-06 07:42:30 UTC (rev 263962)
+++ trunk/Tools/flatpak/flatpakutils.py	2020-07-06 08:35:31 UTC (rev 263963)
@@ -1026,7 +1026,18 @@
     if not check_flatpak(verbose=False):
         return None
 
-    flatpak_runner = WebkitFlatpak.load_from_args(args, add_help=False)
+    # Filter out flatpakutils args for the app.
+    runner_args = []
+    app_args = []
+    opt_prefix = "--flatpak-"
+    for arg in args:
+        if arg.startswith(opt_prefix):
+            runner_args.append("--%s" % arg[len(opt_prefix):])
+        else:
+            runner_args.append(arg)
+            app_args.append(arg)
+
+    flatpak_runner = WebkitFlatpak.load_from_args(runner_args, add_help=False)
     if not flatpak_runner.clean_args():
         return None
 
@@ -1033,4 +1044,4 @@
     if not flatpak_runner.has_environment():
         return None
 
-    sys.exit(flatpak_runner.run_in_sandbox(*args))
+    sys.exit(flatpak_runner.run_in_sandbox(*app_args))
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to