]> git.ipfire.org Git - ipfire.org.git/commitdiff
Revert "downloads: Add document for the Raspberry Pi Imager"
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 25 Sep 2025 16:30:08 +0000 (16:30 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 25 Sep 2025 16:30:08 +0000 (16:30 +0000)
This reverts commit bb86abb372366bc3293e7c2121a5b2ec6ea3b413.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
src/backend/releases.py
src/static/img/ipfire-tux-40x40.png [deleted file]
src/web/__init__.py
src/web/downloads.py

index b94d2b96d4fea7e0f02109f909f8289395bd2a66..1886d9d327d4f5ac2a466ad63261620d30763c9f 100644 (file)
@@ -1105,7 +1105,6 @@ static_img_DATA = \
        src/static/img/default-avatar.jpg \
        src/static/img/fdroid-logo.svg \
        src/static/img/ipfire-tux.png \
-       src/static/img/ipfire-tux-40x40.png \
        src/static/img/iuse-not-found.png \
        src/static/img/kyberio-logo.svg \
        src/static/img/lightningwirelabs-logo.svg \
index 5990c4f6cdb300061e0b5e3d3fd4681f435fa4c3..895c6ca300690dad5f4f9d4ab84fe129195b36ce 100644 (file)
@@ -264,17 +264,10 @@ class Release(Object):
        def path(self):
                return self.__data.path
 
-       def get_file(self, type, arch=None):
+       def get_file(self, type):
                for file in self.files:
-                       # Skip anything where the type does not match
-                       if not file.type == type:
-                               continue
-
-                       # Optionally skip the architecture
-                       if arch and not file.arch == arch:
-                               continue
-
-                       return file
+                       if file.type == type:
+                               return file
 
        def __file_hash(self, filename, algo="sha256"):
                h = hashlib.new(algo)
@@ -361,37 +354,6 @@ class Release(Object):
        def netboot_args(self, arch, platform):
                return ""
 
-       # OS List (For Raspberry Pi Imager)
-
-       def make_os_list(self, arch):
-               """
-                       Returns an object according to this spec:
-
-                       https://github.com/raspberrypi/rpi-imager/blob/qml/doc/json-schema/os-list-schema.json
-                       https://github.com/raspberrypi/rpi-imager/blob/qml/doc/os-sublist-example.json
-               """
-               # Fetch the flash image
-               file = self.get_file(type="flash", arch=arch)
-
-               # Return an empty object if we could not find the image file
-               if not file:
-                       return {}
-
-               # Make the document
-               return {
-                       "name"         : self.name,
-                       "description"  : "The Open Source Linux-based Firewall Operating System"
-                               " with a Comprehensive Feature Set",
-                       "url"          : file.url,
-                       "icon"         : "https://www.ipfire.org/static/img/ipfire-tux-40x40.png",
-                       "website"      : "https://www.ipfire.org/",
-                       "release_date" : self.published.strftime("%Y-%m-%d"),
-
-                       # Image Metadata
-                       "image_download_size"   : file.size,
-                       "image_download_sha256" : file.sha256,
-               }
-
        @property
        def post(self):
                if self.__data.blog_id:
diff --git a/src/static/img/ipfire-tux-40x40.png b/src/static/img/ipfire-tux-40x40.png
deleted file mode 100644 (file)
index 4454116..0000000
Binary files a/src/static/img/ipfire-tux-40x40.png and /dev/null differ
index b3d45f71f3e451de2f3e94ce3fa03706316cf7e9..b042ac43ceab848d6e3dc888887c1554965d65a4 100644 (file)
@@ -169,8 +169,6 @@ class Application(tornado.web.Application):
                        (r"/downloads/mirrors", downloads.MirrorsHandler),
                        (r"/downloads/thank-you", downloads.ThankYouHandler),
                        (r"/downloads/([0-9a-z\-\.]+)", downloads.ReleaseHandler),
-                       (r"/downloads/latest/os\-list\.json", downloads.LatestOSListHandler),
-                       (r"/downloads/([0-9a-z\-\.]+)/os\-list\.json", downloads.OSListHandler),
 
                        # Donate
                        (r"/donate", donate.DonateHandler),
index 623d0974d0baeab87d692d51382be139baf51ee3..05f95994ebbc5385e329364d058a004597d6b211 100644 (file)
@@ -84,30 +84,3 @@ class FileHandler(base.AnalyticsMixin, base.BaseHandler):
                        we will have to redirect the user back to the main page
                """
                self.redirect("https://www.ipfire.org/error/%s" % status_code)
-
-
-class LatestOSListHandler(base.AnalyticsMixin, base.BaseHandler):
-       def get(self):
-               release = self.backend.releases.get_latest()
-               if not release:
-                       raise tornado.web.HTTPError(404)
-
-               # Redirect to latest release
-               self.redirect("/downloads/%s/os-list.json" % release.slug)
-
-
-class OSListHandler(base.AnalyticsMixin, base.BaseHandler):
-       def get(self, slug):
-               release = self.backend.releases.get_by_sname(slug)
-               if not release:
-                       raise tornado.web.HTTPError(404)
-
-               # Create the document
-               json = release.make_os_list(arch="aarch64")
-
-               # Fail if there was no image
-               if not json:
-                       raise tornado.web.HTTPError(404, "Empty document")
-
-               # Send the document to the client
-               self.finish(json)