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

insync: 3.3.5.40925 -> 3.8.5.50499 #205954

Merged
merged 3 commits into from
May 15, 2023
Merged

Conversation

hellwolf
Copy link
Contributor

@hellwolf hellwolf commented Dec 13, 2022

Description of changes

The insync-v3 package is currently broken in both master and 22.11.

Resolution

  • Deleting insync-v3 from top-level, superseded by insync.
  • Using buildFHSEnv to simplify packaging process.
  • Drop backport attempt for 22.11 for this package going forward.

Related Issues

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 23.05 Release Notes (or backporting 22.11 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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@hellwolf
Copy link
Contributor Author

Current the binary crashes, will find the root cause of it.

@hellwolf
Copy link
Contributor Author

hellwolf commented Dec 26, 2022

Update: I managed to make it work, but I still need to make some extra fixes to make shiboken2 and pyside2 built for python 2.7, I am merging upstream code then pushing to this pull request soon.

image

@hellwolf
Copy link
Contributor Author

hellwolf commented Dec 26, 2022

Pulled out the python packages change to #207829

@benley
Copy link
Member

benley commented Dec 26, 2022

When you are eventually ready to merge this, would you like to take over maintainership of the derivation in nixpkgs? I'm going to remove myself from the meta.maintainers line since I haven't been using insync for a few years now.

@hellwolf
Copy link
Contributor Author

When you are eventually ready to merge this, would you like to take over maintainership of the derivation in nixpkgs? I'm going to remove myself from the meta.maintainers line since I haven't been using insync for a few years now.

Happy to do so, since I am still using it as part of the workflow. I don't know how to add myself to maintainers list yet, I will look into it.

@hellwolf
Copy link
Contributor Author

For some reason, the system tray icon is not visible. I am using gnomeExtensions.appindicator.

It seems a chronic bug in upstream insync, I will consider it a known bug and mark this PR ready for now.

@hellwolf hellwolf marked this pull request as ready for review December 27, 2022 12:02
@hellwolf
Copy link
Contributor Author

hellwolf commented Dec 27, 2022

@benley do you want me to update the maintainer-list.nix and change the meta.maintainers in the same pull request.

Never mind, I just noticed that you already removed yourself from upstream.

Ready to merge!

@benley
Copy link
Member

benley commented Dec 27, 2022

doing some testing now!

@hellwolf
Copy link
Contributor Author

hellwolf commented May 8, 2023

Now things segfault using or not using steam-run:

$ ./result/lib/insync/insync start --no-daemon
Segmentation fault (core dumped)
$ ./result/bin/insync start --no-daemon
$ # nothing

to be continued...

@hellwolf
Copy link
Contributor Author

hellwolf commented May 8, 2023

Good news folks! It works now! Without using full steam-run, instead with a very minimum FHS! Please give it a try!

Although the system tray icon still not working:

$ result/bin/insync-3.8.5.50499 start --no-daemon 
QApplication: invalid style override passed, ignoring it.
    Available styles: Windows, Fusion
QSystemTrayIcon::setVisible: No Icon set

I will give a few more debugging of this before call it known bug and consider we are good to go for this package again!

@hellwolf
Copy link
Contributor Author

hellwolf commented May 8, 2023

@ofborg build insync

@hellwolf hellwolf force-pushed the fix-insync-v3 branch 2 times, most recently from 206998a to 4c5f1b0 Compare May 9, 2023 09:03
@hellwolf hellwolf marked this pull request as ready for review May 9, 2023 09:03
@hellwolf
Copy link
Contributor Author

hellwolf commented May 9, 2023

Everyone this is ready now!!

  • Removed insync-v3 from top-level, with only insync superseding it.
  • insync: 3.3.5.40925 -> 3.8.5.50499
    • Simplified packaging process:
      • Use as much vendor provided binaries as possible.
      • Only replace glibc with system provided ones (2.36+ required, hence
        nixos 22.11 is out).
      • Use buildFHSEnv to create FHS environment to run insync in.
    • Known bug(s):
      1. Currently the system try icon does not render correctly.
      2. libqtvirtualkeyboardplugin does not have necessary Qt library shipped from vendor.

@hellwolf hellwolf changed the title insync-v3: update to 3.8.5.50499 insync: 3.3.5.40925 -> 3.8.5.50499 May 9, 2023
@SuperSandro2000
Copy link
Member

Please don't use steam-run as it is giant and has a proprietary dependencies on steam, use a plain fhs instead and add the libraries that are required to it.

Comment on lines 92 to 109
in buildFHSEnv { # ref: pkgs/build-support/build-fhsenv-bubblewrap/default.nix
name = "${pname}-${version}";
inherit meta;

# for including insync's xdg data dirs
extraOutputsToInstall = [ "share" ];

targetPkgs = pkgs: [
insync-pkg
];

multiPkgs = pkgs: with pkgs; [
# apparently only package needed for the FHS :)
libudev0-shim
];

runScript = writeShellScript "insync-wrapper.sh" ''
export QT_STYLE_OVERRIDE=Fusion
exec "${insync-pkg.outPath}/lib/insync/insync" "$@"
'';
# "insync start" command starts a daemon.
dieWithParent = false;
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
in buildFHSEnv { # ref: pkgs/build-support/build-fhsenv-bubblewrap/default.nix
name = "${pname}-${version}";
inherit meta;
# for including insync's xdg data dirs
extraOutputsToInstall = [ "share" ];
targetPkgs = pkgs: [
insync-pkg
];
multiPkgs = pkgs: with pkgs; [
# apparently only package needed for the FHS :)
libudev0-shim
];
runScript = writeShellScript "insync-wrapper.sh" ''
export QT_STYLE_OVERRIDE=Fusion
exec "${insync-pkg.outPath}/lib/insync/insync" "$@"
'';
# "insync start" command starts a daemon.
dieWithParent = false;
in buildFHSEnv {
name = "${pname}-${version}";
inherit pname version;
# for including insync's xdg data dirs
extraOutputsToInstall = [ "share" ];
targetPkgs = pkgs: [
insync-pkg
];
multiPkgs = pkgs: with pkgs; [
libudev0-shim
];
runScript = writeShellScript "insync-wrapper.sh" ''
export QT_STYLE_OVERRIDE=Fusion
exec "${insync-pkg.outPath}/lib/insync/insync" "$@"
'';
# "insync start" command starts a daemon.
dieWithParent = false;
inherit meta;

Do we really must enforce the qt style?
Do we need to use multiPkgs aka 32 and 64 bit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we really must enforce the qt style?

Not necessarily, it was added to suppress one warning from Qt output.

Do we need to use multiPkgs aka 32 and 64 bit?

No, only 64bit binaries are shipped from the vendor.

pkgs/applications/networking/insync/default.nix Outdated Show resolved Hide resolved
pkgs/applications/networking/insync/default.nix Outdated Show resolved Hide resolved
pkgs/applications/networking/insync/default.nix Outdated Show resolved Hide resolved
Comment on lines 66 to 68
preBuild = ''
addAutoPatchelfSearchPath $out/lib/insync/
'';
Copy link
Member

Choose a reason for hiding this comment

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

Do we need this even when using fhs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will give it a try, probably not anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, no longer needed, eliminated.

@hellwolf
Copy link
Contributor Author

hellwolf commented May 9, 2023

Please don't use steam-run as it is giant and has a proprietary dependencies on steam, use a plain fhs instead and add the libraries that are required to it.

Yep, using buildFHSEnv now after other recommending, works like a charm.

@hellwolf
Copy link
Contributor Author

Anything more I can do to help to get this merged?

Copy link
Member

@benley benley left a comment

Choose a reason for hiding this comment

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

Let's give @SuperSandro2000 a chance to chime in once more before merging but this looks pretty solid to me!

@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-ready-for-review/3032/2199

@@ -33912,8 +33912,6 @@ with pkgs;

insync = callPackage ../applications/networking/insync { };

insync-v3 = libsForQt5.callPackage ../applications/networking/insync/v3.nix { };
Copy link
Member

Choose a reason for hiding this comment

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

we should add an alias for this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it still good to keep this -v3 alias though? maybe time to deprecate it if there is no intention to keep maintaining multiple versions going forward?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for pointing this out, I amended the commits!

insync-v3 has been merged into the insync package; use insync instead.
- Simplified packaging process:
  - Use as much vendor provided binaries as possible.
  - Only replace glibc with system provided ones (2.36+ required, hence
    nixos 22.11 is out).
  - Use buildFHSEnv to create FHS environment to run insync in.

Known bug(s):
  1) Currently the system try icon does not render correctly.
  2) libqtvirtualkeyboardplugin does not have necessary Qt library shipped from vendor.
@hellwolf
Copy link
Contributor Author

Good day everyone! I have fixed the alias issue as suggested by @SuperSandro2000 , can this still make to the 2023-05-15 timeline?

@SuperSandro2000
Copy link
Member

That timeline is not relevant for unimportant leave packages.

@SuperSandro2000 SuperSandro2000 merged commit 1e8edc1 into NixOS:master May 15, 2023
@hellwolf hellwolf deleted the fix-insync-v3 branch May 15, 2023 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

insync-v3 does not build because it cannot access a <source> deb insync-v3 server doesn't seem to start
9 participants