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

libtiff: Add patch to fix missing Lerc in libtiff-4.pc #320105

Merged
merged 1 commit into from
Jun 16, 2024

Conversation

nh2
Copy link
Contributor

@nh2 nh2 commented Jun 15, 2024

Description of changes

Found in static-haskell-nix. This should help pkgsStatic equally.

Upstream PR is: https://gitlab.com/libtiff/libtiff/-/merge_requests/633

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.

@NixOS/geospatial

nh2 added a commit to nh2/static-haskell-nix that referenced this pull request Jun 15, 2024
Copy link
Contributor

@l0b0 l0b0 left a comment

Choose a reason for hiding this comment

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

Code LGTM; thank you for the thorough work! Some caveats/questions:

  • The patch hasn't been accepted upstream yet. It might be prudent to wait for that to happen before adding it.
  • Which situation does this fix in nixpkgs? Is Lerc in nixpkgs' libtiff already not working? (If so, which commit broke it?) Another way to think about it is: would it be possible to add a test for this to demonstrate what the patch fixes?
  • Does this remove the need for lerc in buildInputs? Is it equivalent? Complementary? Or just not related to that line?
  • We'll probably want a "TODO" comment marking this for git revert once the upstream patch is in the latest release of libtiff.

nh2 added a commit to nh2/static-haskell-nix that referenced this pull request Jun 15, 2024
@nh2
Copy link
Contributor Author

nh2 commented Jun 15, 2024

This was accidentally closed by nh2/static-haskell-nix@4c9cf63

with my commit message

nixpkgs: Update submodule to include libtiff fix

https://github.com/NixOS/nixpkgs/pull/320105

Looks like Github is way too agressive, parsing that as fixes https://github.com/NixOS/nixpkgs/pull/320105...

Reopening.

@nh2 nh2 reopened this Jun 15, 2024
@nh2 nh2 force-pushed the libtiff-static-lerc-pc-file branch from 7f937d0 to 762abd8 Compare June 15, 2024 23:14
@nh2
Copy link
Contributor Author

nh2 commented Jun 15, 2024

  • The patch hasn't been accepted upstream yet. It might be prudent to wait for that to happen before adding it.

Maybe for a while, yes.

It's quite certainly correct to do this, as libtiff's other build system (CMake instead of autoconf) does this as well.

I believe the only reason it isn't in their autoconf build system is that either they forgot it, or because in contrast to CMake, autoconf cannot check for the version number in which Lerc has a .pc file.

  • Which situation does this fix in nixpkgs? Is Lerc in nixpkgs' libtiff already not working?

This fixes pkgsStatic.libwebp.

In normal pkgs, it's already working; only fixes static builds.

  • Does this remove the need for lerc in buildInputs? Is it equivalent? Complementary? Or just not related to that line?

Unrelated to that line; lerc is still a dependency of libtiff.

  • We'll probably want a "TODO" comment marking this for git revert once the upstream patch is in the latest release of libtiff.

Done.

@ofborg ofborg bot requested a review from l0b0 June 15, 2024 23:46
Copy link
Contributor

@imincik imincik left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for this fix @nh2

@nh2 nh2 merged commit 446e138 into NixOS:staging Jun 16, 2024
23 of 24 checks passed
Yarny0 added a commit to Yarny0/nixpkgs that referenced this pull request Sep 18, 2024
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.

3 participants