diff --git a/registry/com.dbxio.dbx/0001-Fix-HAVE_VALGRIND-AM_CONDITIONAL.patch b/registry/com.dbxio.dbx/0001-Fix-HAVE_VALGRIND-AM_CONDITIONAL.patch new file mode 100644 index 0000000..411d7e9 --- /dev/null +++ b/registry/com.dbxio.dbx/0001-Fix-HAVE_VALGRIND-AM_CONDITIONAL.patch @@ -0,0 +1,51 @@ +From 729546c51806a1b3ea6cb6efb7a115b1baa811f1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Mon, 18 Nov 2019 19:58:53 +0100 +Subject: [PATCH 1/1] Fix HAVE_VALGRIND AM_CONDITIONAL + +The AM_CONDITIONAL should also be run with --disable-tests, otherwise +HAVE_VALGRIND is undefined. +--- + configure | 4 ++-- + configure.ac | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure b/configure +index 831a3bb..8913b9b 100644 +--- a/configure ++++ b/configure +@@ -14801,6 +14801,8 @@ else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } + have_valgrind=yes ++fi ++ + fi + if test "x$have_valgrind" = "xyes"; then + HAVE_VALGRIND_TRUE= +@@ -14811,8 +14813,6 @@ else + fi + + +-fi +- + + + +diff --git a/configure.ac b/configure.ac +index ace54d1..cbd38a6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -120,8 +120,8 @@ PKG_CHECK_MODULES(DBUSMENUTESTS, json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION + [have_tests=yes] + ) + PKG_CHECK_MODULES(DBUSMENUTESTSVALGRIND, valgrind, have_valgrind=yes, have_valgrind=no) +-AM_CONDITIONAL([HAVE_VALGRIND], [test "x$have_valgrind" = "xyes"]) + ]) ++AM_CONDITIONAL([HAVE_VALGRIND], [test "x$have_valgrind" = "xyes"]) + + AC_SUBST(DBUSMENUTESTS_CFLAGS) + AC_SUBST(DBUSMENUTESTS_LIBS) +-- +2.46.2 + diff --git a/registry/com.dbxio.dbx/0001-Make-introspection-configurable.patch b/registry/com.dbxio.dbx/0001-Make-introspection-configurable.patch new file mode 100644 index 0000000..1277e76 --- /dev/null +++ b/registry/com.dbxio.dbx/0001-Make-introspection-configurable.patch @@ -0,0 +1,44 @@ +From 8a09e6ad33c58c017c0c8fd756da036fc39428ea Mon Sep 17 00:00:00 2001 +From: Alexander Koskovich +Date: Sun, 29 Sep 2024 13:47:54 -0400 +Subject: [PATCH 1/1] Make introspection configurable + +--- + CMakeLists.txt | 1 + + src/CMakeLists.txt | 4 ++++ + 2 files changed, 5 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0e13fcd..f3e9ec0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,6 +12,7 @@ endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + option(ENABLE_TESTS "Enable all tests and checks" OFF) + option(ENABLE_COVERAGE "Enable coverage reports (includes enabling all tests and checks)" OFF) + option(ENABLE_WERROR "Treat all build warnings as errors" OFF) ++option(ENABLE_INTROSPECTION "Enable introspection" ON) + + if(ENABLE_COVERAGE) + set(ENABLE_TESTS ON) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 5b3638d..aca9481 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -108,6 +108,8 @@ install(TARGETS "ayatana-ido3-0.4" LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIB + + # AyatanaIdo3-0.4.gir + ++if (ENABLE_INTROSPECTION) ++ + find_package(GObjectIntrospection REQUIRED QUIET) + + if (INTROSPECTION_FOUND) +@@ -183,3 +185,5 @@ if (INTROSPECTION_FOUND) + endif () + + endif () ++ ++endif () +-- +2.46.2 + diff --git a/registry/com.dbxio.dbx/apply_extra.sh b/registry/com.dbxio.dbx/apply_extra.sh new file mode 100755 index 0000000..1e2f6b2 --- /dev/null +++ b/registry/com.dbxio.dbx/apply_extra.sh @@ -0,0 +1,26 @@ +#!/bin/sh +set -eu + +# Runs offline at install time inside org.gnome.Platform. The upstream Debian +# package is a plain FHS tree whose payload is a single self-contained Tauri +# binary (usr/bin/dbx; the frontend assets are embedded in the binary). We keep +# only that binary at a stable path the wrapper expects: /app/extra/dbx. The +# desktop file, icon and AppStream metainfo are shipped by the manifest at +# *build* time — extra-data is fetched later on the user's machine, so anything +# Flatpak must export cannot come from here. + +extra_root="${EXTRA_ROOT:-/app/extra}" +cd "$extra_root" + +[ -f dbx.deb ] || { echo "missing extra-data: dbx.deb" >&2; exit 1; } + +# The Platform runtime has no ar/dpkg, but bsdtar (libarchive) reads the .deb +# ar container directly; pipe its data member into a second bsdtar to unpack the +# tree (the inner data.tar compression is auto-detected). +rm -rf stage dbx +mkdir stage +bsdtar -xOf dbx.deb 'data.tar*' | bsdtar -xf - -C stage +[ -x stage/usr/bin/dbx ] || { echo "dbx binary not found in .deb" >&2; exit 1; } +mv stage/usr/bin/dbx dbx +rm -rf stage dbx.deb +chmod +x dbx diff --git a/registry/com.dbxio.dbx/com.dbxio.dbx.desktop b/registry/com.dbxio.dbx/com.dbxio.dbx.desktop new file mode 100644 index 0000000..433b939 --- /dev/null +++ b/registry/com.dbxio.dbx/com.dbxio.dbx.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Application +Name=DBX +Comment=Lightweight cross-platform database management tool +Exec=dbx %u +Icon=com.dbxio.dbx +Terminal=false +Categories=Development;Database; +StartupWMClass=dbx +StartupNotify=true +MimeType=application/sql;x-scheme-handler/dbx; +Keywords=database;sql;mysql;postgresql;sqlite;redis;mongodb;client; diff --git a/registry/com.dbxio.dbx/com.dbxio.dbx.metainfo.xml b/registry/com.dbxio.dbx/com.dbxio.dbx.metainfo.xml new file mode 100644 index 0000000..0400486 --- /dev/null +++ b/registry/com.dbxio.dbx/com.dbxio.dbx.metainfo.xml @@ -0,0 +1,64 @@ + + + com.dbxio.dbx + DBX + Lightweight cross-platform database client + CC0-1.0 + Apache-2.0 + + t8y2 + + https://dbxio.com + https://github.com/t8y2/dbx/issues + https://github.com/t8y2/dbx + +

This is a community package of DBX, maintained independently.

+

DBX is a lightweight, fast desktop database client and management tool for relational, document, key-value, vector and analytical databases.

+
    +
  • Supports MySQL, PostgreSQL, SQLite, SQL Server, Redis, MongoDB, DuckDB, ClickHouse and more
  • +
  • Query editor with executable-statement markers, result-source tracking and export
  • +
  • Data grid with filtering, navigation and in-cell editing; ER diagrams and table-structure editing
  • +
+

This package talks to databases over the network. Its own settings live in its private per-app directory. Local file databases (SQLite/DuckDB) and .sql scripts are opened through the file-chooser portal; to keep a local-file connection working across restarts, grant the path with "flatpak override --user --filesystem=/path/to/db com.dbxio.dbx".

+
+ com.dbxio.dbx.desktop + + Development + Database + + + database + sql + mysql + postgresql + sqlite + redis + mongodb + client + + + + keyboard + pointing + + + dbx + + + + Browsing data with the data grid + https://dl.dbxio.com/assets/screenshot-light.png + + + Exploring relationships with the ER diagram + https://dl.dbxio.com/assets/screenshot-er.png + + + Editing and filtering the data grid + https://dl.dbxio.com/assets/screenshot-grid.png + + + + + +
diff --git a/registry/com.dbxio.dbx/com.dbxio.dbx.png b/registry/com.dbxio.dbx/com.dbxio.dbx.png new file mode 100644 index 0000000..8bf8181 Binary files /dev/null and b/registry/com.dbxio.dbx/com.dbxio.dbx.png differ diff --git a/registry/com.dbxio.dbx/com.dbxio.dbx.yml b/registry/com.dbxio.dbx/com.dbxio.dbx.yml new file mode 100644 index 0000000..585ad5a --- /dev/null +++ b/registry/com.dbxio.dbx/com.dbxio.dbx.yml @@ -0,0 +1,143 @@ +id: com.dbxio.dbx +runtime: org.gnome.Platform +runtime-version: "50" +sdk: org.gnome.Sdk +command: dbx +separate-locales: false +build-options: + no-debuginfo: true +finish-args: + # Tauri/WebKitGTK database client (MySQL, PostgreSQL, SQLite, Redis, MongoDB, + # DuckDB, ClickHouse, SQL Server, ...). network is the core function — it talks + # to remote/local DB servers; dri for hardware-accelerated WebKit rendering. + - --share=ipc + - --share=network + - --socket=wayland + - --socket=fallback-x11 + - --device=dri + # System tray (Tauri tray-icon). + - --talk-name=org.kde.StatusNotifierWatcher + - --filesystem=xdg-run/tray-icon:create + # No --filesystem=home: dbx's own settings live in its private per-app dir, and + # local file databases (SQLite/DuckDB) and .sql scripts are opened through the + # file-chooser portal. To keep a local-file connection working across restarts + # (the portal grant is per-pick), grant the path with + # `flatpak override --user --filesystem=/path/to/db com.dbxio.dbx`. +modules: + # dbx's Tauri tray-icon dlopen-s libayatana-appindicator3.so.1 at startup (via + # libappindicator-sys) and the GNOME runtime does not ship it. Build the Ayatana + # stack from the Flathub-maintained shared-modules recipe + # (flathub/shared-modules/libayatana-appindicator), which carries the build-fix + # patches the modern toolchain needs (intltool perl5.26, libdbusmenu valgrind, + # ayatana-ido introspection). Git sources are pinned to immutable commits. + - name: intltool + cleanup: + - "*" + sources: + - type: archive + url: https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz + sha256: 67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd + - type: patch + path: intltool-perl5.26-regex-fixes.patch + - name: libdbusmenu + buildsystem: autotools + build-options: + cflags: -Wno-error + cleanup: + - "*.la" + - /include + - /lib/pkgconfig + - /libexec + - /share/doc + - /share/gtk-doc + config-opts: + - --with-gtk=3 + - --disable-dumper + - --disable-static + - --disable-tests + - --disable-gtk-doc + - --enable-introspection=no + - --disable-vala + sources: + - type: archive + url: https://launchpad.net/libdbusmenu/16.04/16.04.0/+download/libdbusmenu-16.04.0.tar.gz + sha256: b9cc4a2acd74509435892823607d966d424bd9ad5d0b00938f27240a1bfa878a + - type: patch + paths: + - 0001-Fix-HAVE_VALGRIND-AM_CONDITIONAL.patch + - name: ayatana-ido + buildsystem: cmake-ninja + cleanup: + - /include + - /lib/pkgconfig + config-opts: + - -DENABLE_INTROSPECTION=OFF + # Force /app/lib (not lib64): newer cmake defaults LIBDIR to lib64 on + # x86_64, but pkg-config only searches /app/lib/pkgconfig, so the next + # module would not find this one's .pc. Keep the whole stack in /app/lib. + - -DCMAKE_INSTALL_LIBDIR=lib + sources: + - type: git + url: https://github.com/AyatanaIndicators/ayatana-ido.git + tag: "0.10.4" + commit: f968079b09e2310fefc3fc307359025f1c74b3eb + - type: patch + paths: + - 0001-Make-introspection-configurable.patch + - name: libayatana-indicator + buildsystem: cmake-ninja + cleanup: + - /include + - /lib/pkgconfig + - /libexec + - /share + config-opts: + - -DCMAKE_INSTALL_LIBDIR=lib + sources: + - type: git + url: https://github.com/AyatanaIndicators/libayatana-indicator.git + tag: "0.9.4" + commit: 611bb384b73fa6311777ba4c41381a06f5b99dad + - name: libayatana-appindicator + buildsystem: cmake-ninja + cleanup: + - /include + - /lib/pkgconfig + config-opts: + - -DENABLE_BINDINGS_MONO=NO + - -DENABLE_BINDINGS_VALA=NO + - -DENABLE_GTKDOC=NO + - -DCMAKE_INSTALL_LIBDIR=lib + sources: + - type: git + url: https://github.com/AyatanaIndicators/libayatana-appindicator.git + tag: "0.5.94" + commit: 31e8bb083b307e1cc96af4874a94707727bd1e79 + - name: dbx + buildsystem: simple + build-commands: + - install -Dm755 apply_extra.sh /app/bin/apply_extra + - install -Dm755 dbx-wrapper /app/bin/dbx + - install -Dm644 com.dbxio.dbx.desktop /app/share/applications/com.dbxio.dbx.desktop + - install -Dm644 com.dbxio.dbx.metainfo.xml /app/share/metainfo/com.dbxio.dbx.metainfo.xml + - install -Dm644 com.dbxio.dbx.png /app/share/icons/hicolor/256x256/apps/com.dbxio.dbx.png + sources: + # BEGIN MANAGED EXTRA-DATA + - type: extra-data + filename: dbx.deb + only-arches: + - x86_64 + url: https://github.com/t8y2/dbx/releases/download/v0.5.41/DBX_0.5.41_amd64.deb + sha256: 9319ee4ada0b796f545d2e1be004364825e12d39e1ec8cca1059e48508bd5811 + size: 26681004 + # END MANAGED EXTRA-DATA + - type: file + path: apply_extra.sh + - type: file + path: dbx-wrapper + - type: file + path: com.dbxio.dbx.desktop + - type: file + path: com.dbxio.dbx.metainfo.xml + - type: file + path: com.dbxio.dbx.png diff --git a/registry/com.dbxio.dbx/dbx-wrapper b/registry/com.dbxio.dbx/dbx-wrapper new file mode 100755 index 0000000..4962d5e --- /dev/null +++ b/registry/com.dbxio.dbx/dbx-wrapper @@ -0,0 +1,16 @@ +#!/bin/sh +set -eu + +# dbx is a single Tauri (WebKitGTK) binary staged by apply_extra to +# /app/extra/dbx. It links only against libraries in org.gnome.Platform +# (webkit2gtk-4.1, gtk-3, libsoup-3) plus libayatana-appindicator, which the +# binary dlopen-s for its tray icon and which the manifest builds into /app/lib +# (the GNOME runtime does not ship it). + +# WebKitGTK's DMABUF renderer paints a blank window under many drivers inside the +# Flatpak sandbox — the same blank-screen failure users hit running the upstream +# .deb/AppImage directly. Disabling it is the reliable default. dbx itself checks +# this env var (it ships the workaround for the bare .deb too). +export WEBKIT_DISABLE_DMABUF_RENDERER=1 + +exec /app/extra/dbx "$@" diff --git a/registry/com.dbxio.dbx/flatpark.yml b/registry/com.dbxio.dbx/flatpark.yml new file mode 100644 index 0000000..78a2f3f --- /dev/null +++ b/registry/com.dbxio.dbx/flatpark.yml @@ -0,0 +1,25 @@ +id: com.dbxio.dbx +name: DBX +summary: Lightweight cross-platform database client +website: https://dbxio.com +source_url: https://github.com/t8y2/dbx +build: + manifest: com.dbxio.dbx.yml + branch: stable + mode: extra-data +catalog: + category: Development + tags: + - Database + - SQL + - MySQL + - PostgreSQL + - SQLite + - Redis + - MongoDB +update: + command: ./resolve-update.sh +policy: + proprietary: false + extra_data_first: true + dangerous_permissions: [] diff --git a/registry/com.dbxio.dbx/intltool-perl5.26-regex-fixes.patch b/registry/com.dbxio.dbx/intltool-perl5.26-regex-fixes.patch new file mode 100644 index 0000000..234b82b --- /dev/null +++ b/registry/com.dbxio.dbx/intltool-perl5.26-regex-fixes.patch @@ -0,0 +1,59 @@ +Description: Escape "{", to prevent complaints from perl 5.22 and 5.26 +Author: Roderich Schupp +Author: gregor herrmann +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=788705 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=826471 +Bug-Upstream: https://bugs.launchpad.net/intltool/+bug/1490906 + +Index: intltool-0.51.0/intltool-update.in +=================================================================== +--- intltool-0.51.0.orig/intltool-update.in 2017-07-23 17:24:35.113169465 +0200 ++++ intltool-0.51.0/intltool-update.in 2017-07-23 17:24:35.109169052 +0200 +@@ -1062,13 +1062,13 @@ + } + } + +- if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/) ++ if ($str =~ /^(.*)\$\{?([A-Z_]+)}?(.*)$/) + { + my $rest = $3; + my $untouched = $1; + my $sub = ""; + # Ignore recursive definitions of variables +- $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\${?$2}?/; ++ $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\$\{?$2}?/; + + return SubstituteVariable ("$untouched$sub$rest"); + } +@@ -1190,10 +1190,10 @@ + $name =~ s/\(+$//g; + $version =~ s/\(+$//g; + +- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/); +- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/); +- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/); +- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/); ++ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/); ++ $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/); ++ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/); ++ $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/); + } + + if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)[,]?([^,\)]+)?/m) +@@ -1219,11 +1219,11 @@ + $version =~ s/\(+$//g; + $bugurl =~ s/\(+$//g if (defined $bugurl); + +- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/); +- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/); +- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/); +- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/); +- $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\${?\w+}?/); ++ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/); ++ $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/); ++ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/); ++ $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/); ++ $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\$\{?\w+}?/); + } + + # \s makes this not work, why? diff --git a/registry/com.dbxio.dbx/resolve-update.sh b/registry/com.dbxio.dbx/resolve-update.sh new file mode 100755 index 0000000..2a4815c --- /dev/null +++ b/registry/com.dbxio.dbx/resolve-update.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# Update resolver for DBX. +# +# Prints the current version + the Linux x86_64 .deb as JSON on stdout: +# { "version": "0.5.41", "releaseDate": "YYYY-MM-DD", +# "sources": [ { "filename": "dbx.deb", "url": "..." } ] } +# Logs go to stderr. No hashing, no manifest rewriting — FlatPark downloads the +# URL and computes the extra-data sha256/size at build time. The version is +# compared against the latest in the AppStream metainfo. +set -euo pipefail + +repo="t8y2/dbx" + +need() { command -v "$1" >/dev/null 2>&1 || { echo "missing command: $1" >&2; exit 1; }; } +need curl; need jq + +rel="$(curl -fsSL ${GITHUB_TOKEN:+-H "Authorization: Bearer $GITHUB_TOKEN"} \ + "https://api.github.com/repos/$repo/releases/latest")" + +version="$(jq -r '.tag_name | ltrimstr("v")' <<<"$rel")" +date="$(jq -r '.published_at' <<<"$rel" | cut -c1-10)" +# The Linux x86_64 build is the `DBX__amd64.deb` asset (the arm64 .deb, +# the .rpm/.AppImage and the macOS/Windows builds are skipped). +url="$(jq -r '.assets[] | select(.name | test("_amd64\\.deb$")) | .browser_download_url' <<<"$rel" | head -n1)" + +[ -n "$version" ] && [ -n "$url" ] || { echo "failed to resolve dbx release" >&2; exit 1; } +echo "resolved dbx $version ($date): $url" >&2 + +jq -n --arg v "$version" --arg d "$date" --arg u "$url" \ + '{version:$v, releaseDate:$d, sources:[{filename:"dbx.deb", url:$u}]}'