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

exhibit: 1.2.0 -> 1.4.1 #369684

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

lucasew
Copy link
Contributor

@lucasew lucasew commented Dec 31, 2024

Closes: #369543

  • exhibit: 1.2.0 -> 1.4.1

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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Dec 31, 2024
@ddogfoodd
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 369684


x86_64-linux

❌ 1 package failed to build:
  • exhibit

Copy link
Contributor

@ddogfoodd ddogfoodd left a comment

Choose a reason for hiding this comment

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

got this build error on x86_64-linux:

error: builder for '/nix/store/0dff57hx7lsylzw52psnln83b803d6pi-exhibit-1.4.1.drv' failed with exit code 1;
       last 25 log lines:
       > Source dir: /build/source
       > Build dir: /build/source/build
       > Build type: native build
       > Project name: exhibit
       > Project version: 1.4.1
       > Host machine cpu family: x86_64
       > Host machine cpu: x86_64
       > Found pkg-config: YES (/nix/store/0d4m43yp69lrm8imxbqgl9zxjwwz52jw-pkg-config-wrapper-0.29.2/bin/pkg-config) 0.29.2
       > Build-time dependency gio-2.0 found: YES 2.82.1
       > Program /nix/store/y8fxzs8srzd6d74a85zbpssjr8wkj9q4-glib-2.82.1-dev/bin/glib-compile-resources found: YES (/nix/store/y8fxzs8srzd6d74a85zbpssjr8wkj9q4-glib-2.82.1-dev/bin/glib-compile-resources)
       > Program msgfmt found: YES (/nix/store/9a46kza0vbb4vdsdmpzbdc7f31y7hs0i-gettext-0.22.5/bin/msgfmt)
       > Program desktop-file-validate found: YES (/nix/store/1a68w7414qcrvh3dkmyk434jckrzg41s-desktop-file-utils-0.28/bin/desktop-file-validate)
       > Program appstreamcli found: NO
       > Program glib-compile-schemas found: YES (/nix/store/y8fxzs8srzd6d74a85zbpssjr8wkj9q4-glib-2.82.1-dev/bin/glib-compile-schemas)
       > Program python3 found: YES (/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/bin/python3)
       > Configuring exhibit using configuration
       > Program msginit found: YES (/nix/store/9a46kza0vbb4vdsdmpzbdc7f31y7hs0i-gettext-0.22.5/bin/msginit)
       > Program msgmerge found: YES (/nix/store/9a46kza0vbb4vdsdmpzbdc7f31y7hs0i-gettext-0.22.5/bin/msgmerge)
       > Program xgettext found: YES (/nix/store/9a46kza0vbb4vdsdmpzbdc7f31y7hs0i-gettext-0.22.5/bin/xgettext)
       > Could not find file LINGUAS in /build/source/help
       > Program itstool found: NO
       >
       > help/meson.build:1:6: ERROR: Program 'itstool' not found or not executable
       >
       > A full log can be found at /build/source/build/meson-logs/meson-log.txt
       For full logs, run 'nix log /nix/store/0dff57hx7lsylzw52psnln83b803d6pi-exhibit-1.4.1.drv'.
error: 1 dependencies of derivation '/nix/store/4diz0g8kw7vkac646y4pzgq8bk3b7z4k-review-shell.drv' failed to build

@lucasew lucasew force-pushed the 20241231-upd-exhibit branch 2 times, most recently from 4cfa684 to a0526a6 Compare December 31, 2024 18:37
@lucasew
Copy link
Contributor Author

lucasew commented Dec 31, 2024

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 369684


x86_64-linux

✅ 1 package built:
  • exhibit

@ddogfoodd
Copy link
Contributor

builds fine now but still seems to miss some dependency.
When executing I get:

Traceback (most recent call last):
  File "/nix/store/l122xj8im5zgxjcdw21ifb67n3f0ljav-exhibit-1.4.1/bin/.exhibit-wrapped", line 46, in <module>
    from exhibit import main
  File "/nix/store/l122xj8im5zgxjcdw21ifb67n3f0ljav-exhibit-1.4.1/share/exhibit/exhibit/main.py", line 26, in <module>
    from .window import Viewer3dWindow
  File "/nix/store/l122xj8im5zgxjcdw21ifb67n3f0ljav-exhibit-1.4.1/share/exhibit/exhibit/window.py", line 29, in <module>
    from wand.image import Image
ModuleNotFoundError: No module named 'wand'

@github-actions github-actions bot added 10.rebuild-darwin: 1-10 and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin labels Dec 31, 2024
@Atemu
Copy link
Member

Atemu commented Jan 1, 2025

Drafting until the issue above is resolved.

@Atemu Atemu marked this pull request as draft January 1, 2025 01:39
@ddogfoodd
Copy link
Contributor

ddogfoodd commented Jan 1, 2025

new error when running exhibit:

Traceback (most recent call last):
  File "/nix/store/xxvi52va23nasb7f6rxh4cr866d5rj9j-exhibit-1.4.1/bin/.exhibit-wrapped", line 46, in <module>
    from exhibit import main
  File "/nix/store/xxvi52va23nasb7f6rxh4cr866d5rj9j-exhibit-1.4.1/share/exhibit/exhibit/main.py", line 30, in <module>
    info = f3d.Engine.get_lib_info()
           ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'f3d.pyf3d.Engine' has no attribute 'get_lib_info'

@lucasew
Copy link
Contributor Author

lucasew commented Jan 1, 2025

new error when running exhibit:

Traceback (most recent call last):
  File "/nix/store/xxvi52va23nasb7f6rxh4cr866d5rj9j-exhibit-1.4.1/bin/.exhibit-wrapped", line 46, in <module>
    from exhibit import main
  File "/nix/store/xxvi52va23nasb7f6rxh4cr866d5rj9j-exhibit-1.4.1/share/exhibit/exhibit/main.py", line 30, in <module>
    info = f3d.Engine.get_lib_info()
           ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'f3d.pyf3d.Engine' has no attribute 'get_lib_info'

I know. I asked upstream for a release because of that.

@lucasew lucasew force-pushed the 20241231-upd-exhibit branch from be76980 to c594b09 Compare January 1, 2025 15:44
@lucasew
Copy link
Contributor Author

lucasew commented Jan 1, 2025

It works now but there is a detail.

The app reads the data location using the environment variable XDG_DATA_HOME, which by standard [1] has the default value of $HOME/.local/share, which is missing by default and the program has no fallback, which I added by patching it.

The problem, which doesn't happen in Flatpak, is that it doesn't create a subfolder inside there for that, so it assumes that, in this example, ~/.local/share is the root data folder, which causes a mess. And this is not a problem in the flatpak version because flatpak itself does the scoping and stuff not letting the mess happen.

So there is basically the following strategies:

  • Let the package the way it's now in this PR, patching a fallback in to the missing variable and allow the mess to happen.
  • Introduce a breaking change upstream that creates a scope folder to store stuff in.
  • Introduce the subfolder only locally, not upstreaming the change.
  • Introduce upstream the fallback value with the subfolder, so behavior on flatpak wouldn't change but in alternative packages there can be this issue.

I, myself, for these utility graphical packages, am prefering to use the flatpak versions because they are directly maintained upstream so I am inclined to basically just give up on this package and suggest people to just use the flatpak version.

What are your thoughs on this?

[1] https://specifications.freedesktop.org/basedir-spec/latest/

@lucasew lucasew marked this pull request as ready for review January 1, 2025 16:05
Comment on lines +27 to +31
postPatch = ''
substituteInPlace src/logger_lib.py src/window.py \
--replace-warn 'os.environ["XDG_DATA_HOME"]' 'os.environ.get("XDG_DATA_HOME", os.path.expanduser("~/.local/share"))'
'';

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 not disregard a user's XDG_DATA_HOME preference and hard code it to some path.

If the upstream code is this simply/dumb, please just patch it to do the right thing instead (create subdir under XDG_DATA_HOME and use that).

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 am not disregarding, I am adding a fallback.

If the variable is defined it will use the original value.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I read it wrong.

I'd prefer a patch or at least replace-fail.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Patch is too hardcoded and replace-fail would become a build failure if eventually upstream fixes that.

Copy link
Member

Choose a reason for hiding this comment

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

Yes that's the point.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And bot bumps fail silently

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Basically, r-ryantm only notifies you when everything went right.

Copy link
Member

Choose a reason for hiding this comment

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

We want to know when the patch no longer applies and needs to be updated. Making the build fail is the only reliable way to achieve that.

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update request: exhibit 1.2.0 → 1.4.1
4 participants