summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Catanzaro <mcatanzaro@redhat.com>2023-04-20 12:20:16 -0500
committerMarge Bot <marge-bot@gnome.org>2023-05-07 22:07:58 +0000
commitc96d97686cbf003950eca530fab1c5ae5c6adab6 (patch)
tree4a4269f8c6bdc5993ee2d1efcbe9aac4264b16eb
parent5b69381141655ca52622571c5fe58d4a91dfd8aa (diff)
downloadepiphany-c96d97686cbf003950eca530fab1c5ae5c6adab6.tar.gz
Remove Canary stuff for now
Epiphany Canary has been dead for about half a year now since it depends on the WebKit runtime, which does not provide a GTK 4 build of WebKitGTK. It's confusing to keep unused files around indefinitely so time to go. Canary is welcome back in the future when it works again. Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1319>
-rw-r--r--generate-canary-manifest.py106
-rw-r--r--org.gnome.Epiphany.Canary.json.in158
2 files changed, 0 insertions, 264 deletions
diff --git a/generate-canary-manifest.py b/generate-canary-manifest.py
deleted file mode 100644
index d50432036..000000000
--- a/generate-canary-manifest.py
+++ /dev/null
@@ -1,106 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (C) 2021 Igalia S.L.
-#
-# This file is part of Epiphany.
-#
-# Epiphany is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Epiphany is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Epiphany. If not, see <http://www.gnu.org/licenses/>.
-
-from html.parser import HTMLParser
-import argparse
-import hashlib
-import json
-import os
-import re
-import sys
-import urllib.request
-
-ZIP_FILE = "webkitgtk.zip"
-
-# FIXME: Might be worth adding some JSON file listing builds on the servers.
-class MyHTMLParser(HTMLParser):
- builds = []
- def handle_starttag(self, tag, attrs):
- if tag != "a":
- return
- for (name, value) in attrs:
- if name == "href" and (value.startswith("release") or value.startswith("debug")) and '@main' in value:
- self.builds.append(value)
-
-def download_zipped_build(build_type, verbose):
- url = f"https://webkitgtk-{build_type}.igalia.com/built-products/"
- with urllib.request.urlopen(url) as page_fd:
- parser = MyHTMLParser()
- parser.feed(page_fd.read().decode("utf-8"))
- try:
- latest = parser.builds[-1]
- except IndexError:
- print(f"No build found in {url}")
- return ("", "")
-
- print(f"Downloading build {latest} from {url}")
- zip_file = open(ZIP_FILE, "wb")
-
- def update(blocks, bs, size):
- done = int(50 * blocks * bs / size)
- sys.stdout.write('\r[{}{}]'.format('█' * done, '.' * (50 - done)))
- sys.stdout.flush()
-
- args = []
- if verbose:
- args.append(update)
-
- urllib.request.urlretrieve(f"{url}/{latest}", ZIP_FILE, *args)
- h = hashlib.new('sha256')
- with open(ZIP_FILE, "rb") as f:
- h.update(f.read())
-
- checksum = h.hexdigest()
- return (ZIP_FILE, checksum)
-
-def main(args):
- parser = argparse.ArgumentParser()
- type_group = parser.add_mutually_exclusive_group()
- type_group.add_argument("--debug", help="Download a debug build.",
- dest='build_type', action="store_const", const="Debug")
- type_group.add_argument("--release", help="Download a release build.",
- dest='build_type', action="store_const", const="Release")
- parser.add_argument("--verbose", help="Show progress bar.", action=argparse.BooleanOptionalAction, default=False)
-
- if len(args) == 0:
- parser.print_help(sys.stderr)
- return 1
-
- parsed, _ = parser.parse_known_args(args=args)
- zip_filename, checksum = download_zipped_build(parsed.build_type.lower(), parsed.verbose)
- if not zip_filename:
- return 2
-
- manifest_path = "org.gnome.Epiphany.Canary.json"
- with open(f"{manifest_path}.in") as fd_in:
- json_input = json.load(fd_in)
- pwd = os.path.abspath(os.curdir)
- for module in json_input['modules']:
- if module['name'] == 'webkitgtk':
- path = os.path.join(pwd, zip_filename)
- module['sources'] = [{'type': 'archive', 'url': f'file://{path}', 'sha256': checksum,
- 'strip-components': 0}]
- elif module['name'] == 'epiphany':
- module['sources'] = [{'type': 'dir', 'path': pwd}]
- with open(manifest_path, 'w') as fd_out:
- json.dump(json_input, fd_out, indent=4)
-
- return 0
-
-if __name__ == "__main__":
- sys.exit(main(sys.argv[1:]))
diff --git a/org.gnome.Epiphany.Canary.json.in b/org.gnome.Epiphany.Canary.json.in
deleted file mode 100644
index 5dfb7fd9c..000000000
--- a/org.gnome.Epiphany.Canary.json.in
+++ /dev/null
@@ -1,158 +0,0 @@
-{
- "app-id" : "org.gnome.Epiphany.Canary",
- "runtime" : "org.webkit.Platform",
- "runtime-version" : "22.08",
- "sdk" : "org.webkit.Sdk",
- "command" : "ephy-wrapper",
- "tags" : [
- "nightly"
- ],
- "desktop-file-name-suffix" : " (Canary)",
- "finish-args" : [
- "--device=dri",
- "--filesystem=xdg-download",
- "--share=ipc",
- "--share=network",
- "--socket=fallback-x11",
- "--socket=pulseaudio",
- "--socket=wayland",
- "--system-talk-name=org.freedesktop.GeoClue2",
- "--own-name=org.gnome.Epiphany.WebAppProvider"
- ],
- "modules" : [
- {
- "name" : "libportal",
- "buildsystem" : "meson",
- "config-opts" : [
- "-Dbackends=gtk4",
- "-Dintrospection=false",
- "-Ddocs=false"
- ],
- "sources" : [
- {
- "type" : "git",
- "url" : "https://github.com/flatpak/libportal.git",
- "tag" : "0.6"
- }
- ]
- },
- {
- "name": "gcr",
- "buildsystem" : "meson",
- "config-opts" : [
- "-Dintrospection=false",
- "-Dvapi=false",
- "-Dgtk_doc=false",
- "-Dssh_agent=false",
- "-Dsystemd=disabled"
- ],
- "sources" : [
- {
- "type" : "git",
- "url" : "https://gitlab.gnome.org/GNOME/gcr.git"
- }
- ]
- },
- {
- "name" : "json-glib",
- "buildsystem" : "meson",
- "sources" : [
- {
- "type" : "git",
- "url" : "https://gitlab.gnome.org/GNOME/json-glib.git"
- }
- ]
- },
- {
- "name" : "libsass",
- "buildsystem" : "meson",
- "sources" : [
- {
- "type" : "git",
- "url" : "https://github.com/lazka/libsass.git",
- "branch" : "meson"
- }
- ]
- },
- {
- "name" : "sassc",
- "buildsystem" : "meson",
- "sources" : [
- {
- "type" : "git",
- "url" : "https://github.com/lazka/sassc.git",
- "branch" : "meson"
- }
- ]
- },
- {
- "name": "libadwaita",
- "buildsystem" : "meson",
- "config-opts" : [
- "-Dgtk_doc=false",
- "-Dvapi=false",
- "-Dtests=false",
- "-Dexamples=false"
- ],
- "sources" : [
- {
- "type" : "git",
- "url" : "https://gitlab.gnome.org/GNOME/libadwaita.git",
- "branch" : "main"
- }
- ]
- },
- {
- "name" : "webkitgtk",
- "buildsystem" : "simple",
- "build-commands" : [
- "cp -a lib/libjavascriptcore* /app/lib",
- "cp -a lib/libwebkit2gtk* /app/lib",
- "mkdir -p /app/libexec",
- "cp bin/WebKit*Process /app/libexec",
- "cp -r install/lib/pkgconfig /app/lib/",
- "sed -i 's;/app/webkit/WebKitBuild/Release/install;/app;g' /app/lib/pkgconfig/*.pc",
- "cp -r install/include /app/"
- ],
- "sources" : [
- ]
- },
- {
- "name" : "epiphany",
- "buildsystem" : "meson",
- "config-opts" : [
- "-Dprofile=Canary"
- ],
- "sources" : [
- {
- "type" : "git",
- "url" : "https://gitlab.gnome.org/GNOME/epiphany.git",
- "disable-shallow-clone" : true
- }
- ],
- "post-install" : [
- "sed -i 's;Exec=epiphany;Exec=ephy-wrapper;g' /app/share/applications/org.gnome.Epiphany.Canary.desktop"
- ]
- },
- {
- "name" : "ephy-wrapper",
- "buildsystem" : "simple",
- "build-commands" : [
- "install -m a+rx ephy-wrapper.sh /app/bin/ephy-wrapper"
- ],
- "sources" : [
- {
- "type" : "script",
- "dest-filename" : "ephy-wrapper.sh",
- "commands" : [
- "export WEBKIT_INJECTED_BUNDLE_PATH=/app/lib",
- "export WEBKIT_EXEC_PATH=/app/libexec",
- "export WEBKIT_GST_ENABLE_AUDIO_MIXER=1",
- "export GST_PLUGIN_FEATURE_RANK=vah264dec:MAX,vah265dec:MAX,vavp8dec:MAX,vavp9dec:MAX",
- "exec epiphany \"$@\""
- ]
- }
- ]
- }
- ]
-}