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

qrencode: Add support for PIC image type #274151

Closed
wants to merge 1 commit into from
Closed

Conversation

afh
Copy link
Member

@afh afh commented Dec 14, 2023

Description of changes

This PR adds the changes from fukuchi/libqrencode#208 PR, to the qrencode nixpkgs.
fukuchi/libqrencode#208 brings support for the PIC (a graphics format used with groff and TeX) image type.

ℹ️ The add_pic_image_type.patch patch slightly differs from the changes proposed in fukuchi/libqrencode#208 as those target the master branch, where nixpkgs patch file targets the latest release, i.e. 4.1.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/)
  • 24.05 Release Notes (or backporting 23.05 and 23.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
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@afh
Copy link
Member Author

afh commented Dec 14, 2023

Yikes, I did not expect this PR to trigger so many rebuilds. Please let me know if this PRs merge-base should rather be staging than master.

@afh afh force-pushed the add-qrencode-pic branch from d0d1e4c to 10b2dfb Compare December 14, 2023 08:52
@Ma27
Copy link
Member

Ma27 commented Dec 16, 2023

Yes, definitely.

However I have another issue with this: I'm not convinced that it's a good idea to add a bunch of unreviewed C code to our repos. No offense, but bearing in mind the amount of CVEs in C code from image libraries (imagemagick, libjpeg, etc) I don't think it's wise to apply third-party patches here that didn't even have a review from the authors.

Also, in my experience we don't really apply patches on our own that are not security fixes or changes to make the software runnable under NixOS.

All in all, I'd prefer to reject this[1], but I'll leave the final call to our qrencode maintainers.

[1] your best option IMHO is to apply the patch yourself in your config, e.g. via

{ pkgs, ... }:

{
 environment.systemPackages = [
    (qrencode.overrideAttrs ({ patches ? [], ... }: {
      patches = patches ++ [ ./pic-support.patch ];
    });
  ];
}

@afh
Copy link
Member Author

afh commented Dec 17, 2023

Thank you for your feedback and context, @Ma27. I'm going to retract and close this PR as I agree with your point that only patches for "security fixes or changes to make the software runnable under NixOS" should be applied.

Hopefully the maintainer of the upstream qrencode will take the time to review and include the proposed patch to add pic image support at some point in the future and create another release.

@afh afh closed this Dec 17, 2023
@afh afh deleted the add-qrencode-pic branch December 17, 2023 15:33
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.

2 participants