Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ente-auth: init at 4.0.2 #339059

Merged
merged 1 commit into from
Oct 1, 2024
Merged

ente-auth: init at 4.0.2 #339059

merged 1 commit into from
Oct 1, 2024

Conversation

niklaskorz
Copy link
Contributor

@niklaskorz niklaskorz commented Sep 2, 2024

Description of changes

Closes #336291

I'm aware there already is an open PR at #333514 but my PR inits ente-auth as a from-source build.
The appimage wrapped in #333514 has issues detecting OpenGL libraries at least on my system, while the from-source build works without issues on my setup.
I added @schnow265 as maintainer, assuming he's willing to help maintain a from-source flutter build as well. If not, please notify me if I should remove you from the list.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@schnow265
Copy link
Contributor

Of course I want to help.

@schnow265 schnow265 mentioned this pull request Sep 2, 2024
13 tasks
@niklaskorz niklaskorz marked this pull request as ready for review September 2, 2024 17:34
@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Sep 2, 2024
@ofborg ofborg bot requested a review from schnow265 September 2, 2024 18:39
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 1-10 10.rebuild-linux: 1 labels Sep 2, 2024
@niklaskorz niklaskorz added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Sep 2, 2024
@ofborg ofborg bot requested a review from schnow265 September 2, 2024 19:58
@niklaskorz
Copy link
Contributor Author

niklaskorz commented Sep 8, 2024

Added updateScript (removed the tests.version again as ente-auth actually does not have any way to print the version).

@niklaskorz niklaskorz mentioned this pull request Sep 22, 2024
13 tasks
pkgs/by-name/en/ente-auth/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/en/ente-auth/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/en/ente-auth/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/en/ente-auth/package.nix Show resolved Hide resolved
@zi3m5f
Copy link
Contributor

zi3m5f commented Sep 23, 2024

There is an open PR changing the binary name: ente-io/ente#3334

-  set(BINARY_NAME "ente_auth")
+  set(BINARY_NAME "enteauth")

@gepbird
Copy link
Contributor

gepbird commented Sep 25, 2024

I attempted to package ente-auth a few weeks before, but got stuck: one of the flutter dependencies called sqlite3_flutter_libs tries to download the native sqlite3, even though sqlite is specified in the build input. I'm surprised you don't have this in pubspec.lock.json, how did you generate this file?

Also I'd be happy to be a maintainer too :)

Copy link
Contributor

@gepbird gepbird left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running it on x86_64-linux in an x11 wm results in a black window, it prints the following:
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPlatformDirectoryException(Unable to get application documents directory)
I made sure ~/Documents exists, I'll troubleshoot this later.

Apart from the update script, code lgtm.

Also 4.0.2 got released recently.

pkgs/by-name/en/ente-auth/package.nix Outdated Show resolved Hide resolved
@zi3m5f
Copy link
Contributor

zi3m5f commented Sep 25, 2024

I attempted to package ente-auth a few weeks before, but got stuck: one of the flutter dependencies called sqlite3_flutter_libs tries to download the native sqlite3, even though sqlite is specified in the build input. I'm surprised you don't have this in pubspec.lock.json, how did you generate this file?

I had the same problem and fixed it in my pr #343645 (closed in favor of this one) implementing pkgs/development/compilers/dart/package-source-builders/sqlite3_flutter_libs/default.nix, would need to be adapted for newer/more versions though.

Also I'd be happy to be a maintainer too :)

Me too :)

@niklaskorz
Copy link
Contributor Author

Thanks for all the feedback, I'll address it shortly!

@Flo2410
Copy link

Flo2410 commented Sep 25, 2024

Running it on x86_64-linux in an x11 wm results in a black window, it prints the following: [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPlatformDirectoryException(Unable to get application documents directory) I made sure ~/Documents exists, I'll troubleshoot this later.

Apart from the update script, code lgtm.

Also 4.0.2 got released recently.

I had the same issue installing ente-auth.
I figured out that you have to install the xdg-user-dirs package to fix this issue.
Unforunatly I can't rember were I read this.

@gepbird
Copy link
Contributor

gepbird commented Sep 25, 2024

I had the same issue installing ente-auth.
I figured out that you have to install the xdg-user-dirs package to fix this issue.
Unforunatly I can't rember were I read this.

Upstream issue on arch: ente-io/ente#2046
Going into a nix shell with xdg-user-dirs fixes this error, but then there's a new error:
** (ente_auth:42549): WARNING **: 17:51:53.995: libsecret_error: Failed to unlock the keyring [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(Lib secret error, Failed to unlock the keyring, null, null)
On arch this is fixed by installing gnome-keyring, on NixOS going into a nix-shell with gnome-keyring doesn't fix it.
A weird thing is putting xdg-user-dirs into buildInputs doesn't fix the first error.

I'll check what keyring related NixOS options are later, thanks everyone for the help!

@Flo2410
Copy link

Flo2410 commented Sep 25, 2024

I had the same issue installing ente-auth.
I figured out that you have to install the xdg-user-dirs package to fix this issue.
Unforunatly I can't rember were I read this.

Upstream issue on arch: ente-io/ente#2046 Going into a nix shell with xdg-user-dirs fixes this error, but then there's a new error: ** (ente_auth:42549): WARNING **: 17:51:53.995: libsecret_error: Failed to unlock the keyring [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(Lib secret error, Failed to unlock the keyring, null, null) On arch this is fixed by installing gnome-keyring, on NixOS going into a nix-shell with gnome-keyring doesn't fix it. A weird thing is putting xdg-user-dirs into buildInputs doesn't fix the first error.

I'll check what keyring related NixOS options are later, thanks everyone for the help!

Oh ya, that issue is where I found that fix.
I'm using the kde wallet and it works fine.

@niklaskorz niklaskorz added 12.approvals: 3+ This PR was reviewed and approved by three or more reputable people and removed 12.approvals: 1 This PR was reviewed and approved by one reputable person labels Sep 30, 2024
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/1993

@zi3m5f
Copy link
Contributor

zi3m5f commented Oct 1, 2024

Shameless plug:
Is someone of you interested in ente-cli? My PR #343618 got stuck on waiting for review of the latest changes.

@h7x4 h7x4 merged commit 9c07833 into NixOS:master Oct 1, 2024
26 checks passed

# 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/ente_auth.appdata.xml
desktopItems = makeDesktopItem {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
desktopItems = makeDesktopItem {
desktopItems = [ (makeDesktopItem {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in #345778


pubspecLock = lib.importJSON ./pubspec.lock.json;

patchPhase = ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
patchPhase = ''
postPatch = ''

@niklaskorz niklaskorz deleted the ente-auth branch October 6, 2024 16:39
@gepbird gepbird added the backport release-24.05 Backport PR automatically label Oct 22, 2024
Copy link
Contributor

Successfully created backport PR for release-24.05:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 1-10 10.rebuild-linux: 1 11.by: package-maintainer This PR was created by the maintainer of the package it changes 12.approvals: 3+ This PR was reviewed and approved by three or more reputable people backport release-24.05 Backport PR automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package request: Ente Auth
10 participants