From 7ca848e6ed555382c037b6aebc67d4554a7f1cf0 Mon Sep 17 00:00:00 2001 From: Niklas Korz Date: Mon, 16 Mar 2026 10:07:23 +0100 Subject: [PATCH] ente-auth: 4.4.12 -> 4.4.17 Changelogs: - https://github.com/ente-io/ente/releases/tag/auth-v4.4.17 - https://github.com/ente-io/ente/releases/tag/auth-v4.4.15 --- .../en/ente-auth/0001-disable-updates.patch | 15 - pkgs/by-name/en/ente-auth/git-hashes.json | 2 +- pkgs/by-name/en/ente-auth/package.nix | 53 +++- pkgs/by-name/en/ente-auth/pubspec.lock.json | 79 +++-- .../en/ente-auth/strings.pubspec.lock.json | 272 ++++++++++++++++++ pkgs/by-name/en/ente-auth/update.sh | 10 +- 6 files changed, 386 insertions(+), 45 deletions(-) delete mode 100644 pkgs/by-name/en/ente-auth/0001-disable-updates.patch create mode 100644 pkgs/by-name/en/ente-auth/strings.pubspec.lock.json diff --git a/pkgs/by-name/en/ente-auth/0001-disable-updates.patch b/pkgs/by-name/en/ente-auth/0001-disable-updates.patch deleted file mode 100644 index 512106f8d853..000000000000 --- a/pkgs/by-name/en/ente-auth/0001-disable-updates.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/auth/lib/services/update_service.dart b/auth/lib/services/update_service.dart -index 716d553f1b..3946d87a7d 100644 ---- a/lib/services/update_service.dart -+++ b/lib/services/update_service.dart -@@ -134,9 +134,7 @@ class UpdateService { - } - - bool isIndependent() { -- return flavor == "independent" || -- _packageInfo.packageName.endsWith("independent") || -- PlatformUtil.isDesktop(); -+ return false; - } - } - \ No newline at end of file diff --git a/pkgs/by-name/en/ente-auth/git-hashes.json b/pkgs/by-name/en/ente-auth/git-hashes.json index 9b594708a9d6..1363dc639893 100644 --- a/pkgs/by-name/en/ente-auth/git-hashes.json +++ b/pkgs/by-name/en/ente-auth/git-hashes.json @@ -1,5 +1,5 @@ { - "ente_crypto_dart": "sha256-xBBK9BdXh4+OTj+Jkf3zh5sMZjXtvhyuE1R5LFE8iTY=", + "ente_crypto_dart": "sha256-/Pz9HPyQ6ts/sbqopShRSQCC99seiE5pCK0pR5mNji8=", "fk_user_agent": "sha256-GmuQPohnTi4SVta1FyEErOb7n0Jp6UdLcX/Cf+koJNA=", "flutter_local_authentication": "sha256-r50jr+81ho+7q2PWHLf4VnvNJmhiARZ3s4HUpThCgc0=", "move_to_background": "sha256-cLH3vUrPmEtYKlfn2hi6Wl4JQG4dt9aEyTmVCj7zBe0=", diff --git a/pkgs/by-name/en/ente-auth/package.nix b/pkgs/by-name/en/ente-auth/package.nix index 13a9da94e9c6..ceee123b2076 100644 --- a/pkgs/by-name/en/ente-auth/package.nix +++ b/pkgs/by-name/en/ente-auth/package.nix @@ -2,30 +2,29 @@ lib, flutter332, fetchFromGitHub, - sqlite, libayatana-appindicator, makeDesktopItem, copyDesktopItems, makeWrapper, jdk17_headless, - yq-go, }: let # fetch simple-icons directly to avoid cloning with submodules, # which would also clone a whole copy of flutter simple-icons = fetchFromGitHub (lib.importJSON ./simple-icons.json); desktopId = "io.ente.auth"; + flutter = flutter332; in -flutter332.buildFlutterApplication rec { +flutter.buildFlutterApplication rec { pname = "ente-auth"; - version = "4.4.12"; + version = "4.4.17"; src = fetchFromGitHub { owner = "ente-io"; repo = "ente"; sparseCheckout = [ "mobile" ]; tag = "auth-v${version}"; - hash = "sha256-1GJWGTzErV+wSkeAg3z0u7tBPFrq6hPc0fWniKT8w9M="; + hash = "sha256-qnjOrct70TaaO91QBHcbRIkzLZGH6mbpuLAAKE9k/es="; }; sourceRoot = "${src.name}/mobile/apps/auth"; @@ -33,15 +32,43 @@ flutter332.buildFlutterApplication rec { pubspecLock = lib.importJSON ./pubspec.lock.json; gitHashes = lib.importJSON ./git-hashes.json; - patches = [ - # Disable update notifications and auto-update functionality - ./0001-disable-updates.patch - ]; + customSourceBuilders.ente_strings = + { version, src, ... }: + # There currently is no covenient way to setup the flutter SDK outside of apps + # and we can't move this to the app's own build phase as it would still reference + # the immutable source variant without the generated l10n files. + flutter.buildFlutterApplication { + inherit version src; + inherit (src) passthru; + pname = "ente_strings"; + sourceRoot = "${src.name}/mobile/packages/strings"; + pubspecLock = lib.importJSON ./strings.pubspec.lock.json; + + buildPhase = '' + runHook preBuild + + flutter gen-l10n + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + # The $debug output can't be disabled for buildFlutterApplication. + # The $out structure must match that of ente-auth to correctly resolve + # the package as pubspec uses relative paths for workspace packages. + mkdir -p $debug $out/mobile/{apps/auth,packages} + rm pubspec.lock + cp -r . $out/mobile/packages/strings + + runHook postInstall + ''; + }; postPatch = '' rmdir assets/simple-icons ln -s ${simple-icons} assets/simple-icons - ${lib.getExe yq-go} -i 'del(.dependencies.sqlite3_flutter_libs)' pubspec.yaml ''; nativeBuildInputs = [ @@ -50,7 +77,6 @@ flutter332.buildFlutterApplication rec { ]; buildInputs = [ - sqlite libayatana-appindicator # The networking client used by ente-auth (native_dio_adapter) # introduces a transitive dependency on Java, which technically @@ -63,6 +89,11 @@ flutter332.buildFlutterApplication rec { # https://github.com/juliansteenbakker/flutter_secure_storage/issues/965 env.CXXFLAGS = toString [ "-Wno-deprecated-literal-operator" ]; + flutterBuildFlags = [ + # Disable update notifications and auto-update functionality + "--dart-define=app.flavor=independent" + ]; + # Based on https://github.com/ente-io/ente/blob/main/auth/linux/packaging/rpm/make_config.yaml # and https://github.com/ente-io/ente/blob/main/auth/linux/packaging/enteauth.appdata.xml desktopItems = [ diff --git a/pkgs/by-name/en/ente-auth/pubspec.lock.json b/pkgs/by-name/en/ente-auth/pubspec.lock.json index 3238c7d01ca7..ed5917dd813d 100644 --- a/pkgs/by-name/en/ente-auth/pubspec.lock.json +++ b/pkgs/by-name/en/ente-auth/pubspec.lock.json @@ -414,11 +414,11 @@ "dependency": "direct main", "description": { "name": "device_info_plus", - "sha256": "77f757b789ff68e4eaf9c56d1752309bd9f7ad557cb105b938a7f8eb89e59110", + "sha256": "98f28b42168cc509abc92f88518882fd58061ea372d7999aecc424345c7bff6a", "url": "https://pub.dev" }, "source": "hosted", - "version": "9.1.2" + "version": "11.5.0" }, "device_info_plus_platform_interface": { "dependency": "transitive", @@ -450,15 +450,6 @@ "source": "hosted", "version": "2.1.1" }, - "dir_utils": { - "dependency": "direct main", - "description": { - "path": "../../packages/dir_utils", - "relative": true - }, - "source": "path", - "version": "1.0.0" - }, "dots_indicator": { "dependency": "direct main", "description": { @@ -526,17 +517,35 @@ "source": "path", "version": "1.0.0" }, - "ente_crypto_dart": { + "ente_crypto_api": { "dependency": "direct main", + "description": { + "path": "../../packages/ente_crypto_api", + "relative": true + }, + "source": "path", + "version": "0.0.1" + }, + "ente_crypto_dart": { + "dependency": "transitive", "description": { "path": ".", "ref": "HEAD", - "resolved-ref": "f91e1545f8263df127762240c4da54a0c42835b2", + "resolved-ref": "dc995b62d6ec5bca3ba47966685b2af3c42235b2", "url": "https://github.com/ente-io/ente_crypto_dart.git" }, "source": "git", "version": "1.0.0" }, + "ente_crypto_dart_adapter": { + "dependency": "direct main", + "description": { + "path": "../../packages/ente_crypto_dart_adapter", + "relative": true + }, + "source": "path", + "version": "0.0.1" + }, "ente_events": { "dependency": "direct main", "description": { @@ -573,6 +582,15 @@ "source": "path", "version": "1.0.0" }, + "ente_pure_utils": { + "dependency": "direct main", + "description": { + "path": "../../packages/ente_pure_utils", + "relative": true + }, + "source": "path", + "version": "1.0.0" + }, "ente_qr": { "dependency": "direct main", "description": { @@ -601,7 +619,7 @@ "version": "1.0.0" }, "ente_utils": { - "dependency": "direct overridden", + "dependency": "direct main", "description": { "path": "../../packages/utils", "relative": true @@ -1275,6 +1293,16 @@ "source": "hosted", "version": "6.9.5" }, + "launcher_icon_switcher": { + "dependency": "direct main", + "description": { + "name": "launcher_icon_switcher", + "sha256": "a1e0778ed016107077f54f22b4987f322315de8d3df31a6ed494134f55c0ff41", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.0.2" + }, "leak_tracker": { "dependency": "transitive", "description": { @@ -1777,6 +1805,15 @@ "source": "hosted", "version": "0.11.0" }, + "scoped_dir_access": { + "dependency": "direct main", + "description": { + "path": "../../packages/scoped_dir_access", + "relative": true + }, + "source": "path", + "version": "1.0.0" + }, "screen_retriever": { "dependency": "transitive", "description": { @@ -2103,6 +2140,16 @@ "source": "hosted", "version": "2.7.6" }, + "sqlite3_flutter_libs": { + "dependency": "direct main", + "description": { + "name": "sqlite3_flutter_libs", + "sha256": "e07232b998755fe795655c56d1f5426e0190c9c435e1752d39e7b1cd33699c71", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.5.34" + }, "stack_trace": { "dependency": "transitive", "description": { @@ -2477,11 +2524,11 @@ "dependency": "transitive", "description": { "name": "win32_registry", - "sha256": "21ec76dfc731550fd3e2ce7a33a9ea90b828fdf19a5c3bcf556fa992cfa99852", + "sha256": "6f1b564492d0147b330dd794fee8f512cec4977957f310f9951b5f9d83618dae", "url": "https://pub.dev" }, "source": "hosted", - "version": "1.1.5" + "version": "2.1.0" }, "window_manager": { "dependency": "direct main", diff --git a/pkgs/by-name/en/ente-auth/strings.pubspec.lock.json b/pkgs/by-name/en/ente-auth/strings.pubspec.lock.json new file mode 100644 index 000000000000..e90f6b6ec139 --- /dev/null +++ b/pkgs/by-name/en/ente-auth/strings.pubspec.lock.json @@ -0,0 +1,272 @@ +{ + "packages": { + "async": { + "dependency": "transitive", + "description": { + "name": "async", + "sha256": "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.13.0" + }, + "boolean_selector": { + "dependency": "transitive", + "description": { + "name": "boolean_selector", + "sha256": "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.1.2" + }, + "characters": { + "dependency": "transitive", + "description": { + "name": "characters", + "sha256": "f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.4.0" + }, + "clock": { + "dependency": "transitive", + "description": { + "name": "clock", + "sha256": "fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.1.2" + }, + "collection": { + "dependency": "transitive", + "description": { + "name": "collection", + "sha256": "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.19.1" + }, + "fake_async": { + "dependency": "transitive", + "description": { + "name": "fake_async", + "sha256": "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.3.3" + }, + "flutter": { + "dependency": "direct main", + "description": "flutter", + "source": "sdk", + "version": "0.0.0" + }, + "flutter_lints": { + "dependency": "direct dev", + "description": { + "name": "flutter_lints", + "sha256": "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "5.0.0" + }, + "flutter_localizations": { + "dependency": "direct main", + "description": "flutter", + "source": "sdk", + "version": "0.0.0" + }, + "flutter_test": { + "dependency": "direct dev", + "description": "flutter", + "source": "sdk", + "version": "0.0.0" + }, + "intl": { + "dependency": "direct main", + "description": { + "name": "intl", + "sha256": "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.20.2" + }, + "leak_tracker": { + "dependency": "transitive", + "description": { + "name": "leak_tracker", + "sha256": "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "10.0.9" + }, + "leak_tracker_flutter_testing": { + "dependency": "transitive", + "description": { + "name": "leak_tracker_flutter_testing", + "sha256": "f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "3.0.9" + }, + "leak_tracker_testing": { + "dependency": "transitive", + "description": { + "name": "leak_tracker_testing", + "sha256": "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "3.0.1" + }, + "lints": { + "dependency": "transitive", + "description": { + "name": "lints", + "sha256": "c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "5.1.1" + }, + "matcher": { + "dependency": "transitive", + "description": { + "name": "matcher", + "sha256": "dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.12.17" + }, + "material_color_utilities": { + "dependency": "transitive", + "description": { + "name": "material_color_utilities", + "sha256": "f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.11.1" + }, + "meta": { + "dependency": "transitive", + "description": { + "name": "meta", + "sha256": "e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.16.0" + }, + "path": { + "dependency": "transitive", + "description": { + "name": "path", + "sha256": "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.9.1" + }, + "sky_engine": { + "dependency": "transitive", + "description": "flutter", + "source": "sdk", + "version": "0.0.0" + }, + "source_span": { + "dependency": "transitive", + "description": { + "name": "source_span", + "sha256": "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.10.1" + }, + "stack_trace": { + "dependency": "transitive", + "description": { + "name": "stack_trace", + "sha256": "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.12.1" + }, + "stream_channel": { + "dependency": "transitive", + "description": { + "name": "stream_channel", + "sha256": "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.1.4" + }, + "string_scanner": { + "dependency": "transitive", + "description": { + "name": "string_scanner", + "sha256": "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.4.1" + }, + "term_glyph": { + "dependency": "transitive", + "description": { + "name": "term_glyph", + "sha256": "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.2.2" + }, + "test_api": { + "dependency": "transitive", + "description": { + "name": "test_api", + "sha256": "fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.7.4" + }, + "vector_math": { + "dependency": "transitive", + "description": { + "name": "vector_math", + "sha256": "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.1.4" + }, + "vm_service": { + "dependency": "transitive", + "description": { + "name": "vm_service", + "sha256": "ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "15.0.0" + } + }, + "sdks": { + "dart": ">=3.7.0-0 <4.0.0", + "flutter": ">=3.18.0-18.0.pre.54" + } +} diff --git a/pkgs/by-name/en/ente-auth/update.sh b/pkgs/by-name/en/ente-auth/update.sh index caec2206d422..37b16a732435 100755 --- a/pkgs/by-name/en/ente-auth/update.sh +++ b/pkgs/by-name/en/ente-auth/update.sh @@ -20,13 +20,19 @@ echo "Updating to $short_version" mobile_tree="$(gh-curl "https://api.github.com/repos/ente-io/ente/git/trees/$version" | gojq '.tree[] | select(.path == "mobile") | .url' --raw-output)" apps_tree="$(gh-curl "$mobile_tree" | gojq '.tree[] | select(.path == "apps") | .url' --raw-output)" auth_tree="$(gh-curl "$apps_tree" | gojq '.tree[] | select(.path == "auth") | .url' --raw-output)" +packages_tree="$(gh-curl "$mobile_tree" | gojq '.tree[] | select(.path == "packages") | .url' --raw-output)" +strings_tree="$(gh-curl "$packages_tree" | gojq '.tree[] | select(.path == "strings") | .url' --raw-output)" pushd "$pkg_dir" -# Get lockfile, filter out incompatible sqlite dependency and convert to JSON +# Get lockfile and convert to JSON echo "Updating lockfile" pubspec_lock="$(gh-curl "$auth_tree" | gojq '.tree[] | select(.path == "pubspec.lock") | .url' --raw-output)" -gh-curl "$pubspec_lock" | gojq '.content | @base64d' --raw-output | gojq --yaml-input 'del(.packages.sqlite3_flutter_libs)' > pubspec.lock.json +gh-curl "$pubspec_lock" | gojq '.content | @base64d' --raw-output | gojq --yaml-input > pubspec.lock.json + +echo "Updating strings lockfile" +strings_pubspec_lock="$(gh-curl "$strings_tree" | gojq '.tree[] | select(.path == "pubspec.lock") | .url' --raw-output)" +gh-curl "$strings_pubspec_lock" | gojq '.content | @base64d' --raw-output | gojq --yaml-input > strings.pubspec.lock.json echo "Updating git hashes" ./fetch-git-hashes.py