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

epson-escpr: 1.7.20 -> 1.8.6 #369304

Merged
merged 1 commit into from
Jan 4, 2025
Merged

Conversation

Arjun31415
Copy link
Contributor

@Arjun31415 Arjun31415 commented Dec 30, 2024

Also fixed gcc14 build issues
Got patches from Gentoo repo : https://gitweb.gentoo.org/repo/gentoo.git/tree/net-print/epson-inkjet-printer-escpr/files

Edit:

Fixes: #368161

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.

@PedroHLC
Copy link
Member

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 369304


x86_64-linux

✅ 1 package built:
  • epson-escpr

Copy link
Member

@PedroHLC PedroHLC left a comment

Choose a reason for hiding this comment

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

The resulting file looks good to me.

@Shawn8901
Copy link
Contributor

i am not having a escpr(1) compatible printer so i can not test, sorry

@Shawn8901 Shawn8901 removed their request for review December 30, 2024 17:09
@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Dec 31, 2024
@Arjun31415
Copy link
Contributor Author

If review is successful, could this be merged please

@JuliusFreudenberger
Copy link

I'm also waiting for this to land, however 2 approvals are needed. That is why this is not merged yet. All we can do afaik is wait patiently.

@Shawn8901
Copy link
Contributor

I'm also waiting for this to land, however 2 approvals are needed. That is why this is not merged yet. All we can do afaik is wait patiently.

fyi: a person with commit rights is needed for merging a pr, not actually a specific number of approvals.

@JuliusFreudenberger
Copy link

Thanks for the clarification. I was misleaded by the '1 pending reviewer' part.

@Shawn8901
Copy link
Contributor

Thanks for the clarification. I was misleaded by the '1 pending reviewer' part.

github visualizes that as there is no approval by a person with commiter rights.

@SigmaSquadron
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 369304


x86_64-linux

✅ 1 package built:
  • epson-escpr

@Arjun31415
Copy link
Contributor Author

The only issue I can see right now is that in postUnpackPhase the cd command directory is hardcoded.

@Arjun31415
Copy link
Contributor Author

Arjun31415 commented Jan 3, 2025

Wait, isn't it just ${src//.tar.gz/}?

That is what I did first

    set -x
    echo $src
    cd \$\{src//.tar.gz/\};

Escaping the characters so that nix does not parse it.

but that fails -

@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/972jwlhgjhxq3gq3xmcbzqlw8gzjqfry-epson-inkjet-printer-escpr-1.8.6-1.tar.gz
source root is epson-inkjet-printer-escpr-1.8.6
++++ echo /nix/store/972jwlhgjhxq3gq3xmcbzqlw8gzjqfry-epson-inkjet-printer-escpr-1.8.6-1.tar.gz
/nix/store/972jwlhgjhxq3gq3xmcbzqlw8gzjqfry-epson-inkjet-printer-escpr-1.8.6-1.tar.gz
++++ cd '${src//.tar.gz/}'
/nix/store/d0gfdcag8bxzvg7ww4s7px4lf8sxisyx-stdenv-linux/setup: line 229: cd: ${src//.tar.gz/}: No such file or directory
+ exitHandler
+ exitCode=1

@SigmaSquadron
Copy link
Contributor

That is what I did first

Don't escape it.

@Arjun31415
Copy link
Contributor Author

Arjun31415 commented Jan 3, 2025

That won't work

       error: syntax error, unexpected '.'
       at /nix/store/p8ckw6jagsw4ng12ramzv50limcllkvl-source/pkgs/by-name/ep/epson-escpr/package.nix:38:15:
           37|     echo $src
           38|     cd ${src//.tar.gz/};

${..} is for nix variable substitution

@SigmaSquadron
Copy link
Contributor

SigmaSquadron commented Jan 3, 2025

Oh! Right. Try escaping it like this: ''${src//.tar.gz/}

@Arjun31415
Copy link
Contributor Author

Arjun31415 commented Jan 3, 2025

Ok that works
but unfortunately the source root is epson-inkjet-printer-escpr-1.8.6, but the stripped directory becomes /nix/store/972jwlhgjhxq3gq3xmcbzqlw8gzjqfry-epson-inkjet-printer-escpr-1.8.6-1

The extra -1.
Epson and their weird naming schemes.

Maybe this is fine for now, unless there is some other source root env variable I'm not aware of

@SigmaSquadron
Copy link
Contributor

SigmaSquadron commented Jan 3, 2025

We will need temporary variables.

Try this:

{
  postUnpack = ''
    a=''${src//.tar.gz/} # Trim the file extension.
    b=''${a#-*} # Trim the extra version information
    cd ''${b#*-} # Trim the /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeee-
  '';
}

@Arjun31415
Copy link
Contributor Author

yeah, but then i also need to find how to remove the /nix store prefix along with the hash also

@SigmaSquadron
Copy link
Contributor

SigmaSquadron commented Jan 3, 2025

That's what ${b#*-} does. I've added comments to the lines.

@SigmaSquadron
Copy link
Contributor

Actually, now that I think about it, the first substitution is unnecessary.

@SigmaSquadron
Copy link
Contributor

SigmaSquadron commented Jan 3, 2025

Try this:

dir=''${src%-*}
cd ''${dir#*-}

Apparently % is for trailing matches????

...why? who designed this

@Arjun31415
Copy link
Contributor Author

Arjun31415 commented Jan 3, 2025 via email

Also fixed gcc14 build issues
Got patches from Gentoo repo
@wegank wegank removed the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Jan 3, 2025
@SigmaSquadron SigmaSquadron added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Jan 3, 2025
@wegank wegank added 12.approvals: 2 This PR was reviewed and approved by two reputable people and removed 12.approvals: 1 This PR was reviewed and approved by one reputable person labels Jan 3, 2025
@PedroHLC
Copy link
Member

PedroHLC commented Jan 3, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 369304


x86_64-linux

✅ 1 package built:
  • epson-escpr

@PedroHLC
Copy link
Member

PedroHLC commented Jan 4, 2025

Copy link
Member

@Ekleog Ekleog left a comment

Choose a reason for hiding this comment

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

People reported this working, the diff looks safe to me, and the CI failure seems like a misconfiguration of CI (it looks like CI is trying to automatically request a review from a non-committer?).

@artuuge Considering you didn't answer since the issue was opened I'm landing this to unbreak nixos-unstable; if you don't have commit rights and have a better fix please ping me on any follow-up PR and I'll do my best to review it :)

@Ekleog
Copy link
Member

Ekleog commented Jan 4, 2025

Actually the last-minute check reminded me I still need to wait for ofborg to finish eval before landing, and to run this test too:

@ofborg build epson-escpr

Hopefully this can land soon!

@Ekleog
Copy link
Member

Ekleog commented Jan 4, 2025

Oh weird, apparently ofborg is down? PRs from 14 hours ago don't even have it as pending at all, and this is not the only relatively old-ish PR to not have the eval results back yet.

Welp, guess I'd be very surprised if this broke eval, so I'll just cross my fingers and land as is 🤞

@Ekleog Ekleog merged commit 75ad852 into NixOS:master Jan 4, 2025
23 of 25 checks passed
@Arjun31415 Arjun31415 deleted the epson-escpr-1.8.6 branch January 4, 2025 16:00
@SigmaSquadron
Copy link
Contributor

the CI failure seems like a misconfiguration of CI

Yes. Infinisil is working on fixing the review requests. #370456 (comment)

Oh weird, apparently ofborg is down?

Not just down, but dead and buried. The Equinix Metal sponsorship that financed OfBorg's build machines ended on 2025-01-01. OfBorg no longer has any builders to run CI on PRs.

@Ekleog
Copy link
Member

Ekleog commented Jan 4, 2025

Thank you for the information ! I completely distanced myself from most of the communication channels, and have been only following from very far away recently, for lack of time

@andrevmatos andrevmatos mentioned this pull request Jan 6, 2025
13 tasks
@andrevmatos
Copy link
Member

Package is not good: ensure-printers.service errors, cups.service complains that File "/nix/store/sg1cmrdpdj1z3h0s7d076g2jawmxfj2l-cups-progs/lib/cups/filter/epson-escpr-wrapper" not available: No such file or directory, while epson-escpr-wrapper is only found inside a /nix/store/d0rilfvqd699fkzl2r0n8g95c7pzb938-epson-escpr-1.8.6-1/store/26fb46gwc5sbd045nj3dxw4zqpml359i-cups-2.4.11/lib/cups/filter/ folder, so it looks like wrapper is putting a store/ folder in escpr's $out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 12.approvals: 2 This PR was reviewed and approved by two reputable people
Projects
None yet
Development

Successfully merging this pull request may close these issues.

epson-escpr-1.7.20 failed with exit code 2 after 11s in buildPhase
8 participants