Skip to content

Comments

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

Merged
nh2 merged 1 commit intoNixOS:stagingfrom
nh2:libtiff-static-lerc-pc-file
Jun 16, 2024
Merged

libtiff: Add patch to fix missing Lerc in libtiff-4.pc#320105
nh2 merged 1 commit intoNixOS:stagingfrom
nh2:libtiff-static-lerc-pc-file

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
@ofborg ofborg bot requested review from imincik, l0b0, nialov, sikmir and willcohen June 15, 2024 18:39
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants