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

(pkgs, nixos)/unl0kr - update to accomodate upstream changes #362825

Merged
merged 1 commit into from
Dec 24, 2024

Conversation

hustlerone
Copy link
Contributor

@hustlerone hustlerone commented Dec 7, 2024

Things done

  • Fixed the test so it correctly assesses unl0kr on boot
  • Added an option to use the upstream password agent instead of unl0kr's (the upstream will be the one tested anyway.)
  • Unl0kr as a standalone package is no more.
  • 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 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Dec 7, 2024
@hustlerone
Copy link
Contributor Author

hustlerone commented Dec 7, 2024

It seems that changing from the unl0kr to package to buffybox is trivial. I'll test to see if it works on a real installation, then test how nicely it plays with early video loading then I'll mark the unl0kr package as deprecated

@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 7, 2024
@Aleksanaa Aleksanaa marked this pull request as draft December 7, 2024 15:52
@hustlerone
Copy link
Contributor Author

hustlerone commented Dec 7, 2024

I'm about to open an issue regarding the module needed in order to create tests. It's unacceptable that it takes an N amount of seconds to take two screenshots and type a string of characters

@hustlerone hustlerone marked this pull request as ready for review December 7, 2024 17:51
@hustlerone hustlerone changed the title [DRAFT] Replace standalone unl0kr package to buffybox Replace standalone unl0kr package to buffybox Dec 7, 2024
@hustlerone hustlerone force-pushed the master branch 2 times, most recently from e3979d5 to 5b02606 Compare December 7, 2024 17:57
@hustlerone
Copy link
Contributor Author

hustlerone commented Dec 7, 2024

How do I set a package as deprecated? (not to prevent anyone from using it just to warn that it's going to be removed soon)

@hustlerone hustlerone force-pushed the master branch 2 times, most recently from d0725e4 to 085dfe9 Compare December 7, 2024 18:19
@hustlerone hustlerone changed the title Replace standalone unl0kr package to buffybox nixos/unl0kr: fix tests, change default package to buffybox Dec 7, 2024
@hustlerone
Copy link
Contributor Author

let me finish the docs on this rq

@hustlerone
Copy link
Contributor Author

@ofborg test systemd-initrd-luks-unl0kr

@hustlerone
Copy link
Contributor Author

hustlerone commented Dec 7, 2024

The long awaited unl0kr update is real now

@hustlerone hustlerone changed the title nixos/unl0kr: fix tests, change default package to buffybox nixos/unl0kr: fix tests, change default package to buffybox (bumps unl0kr to 3.2.0-unstable-2024-11-10) Dec 7, 2024
@hustlerone
Copy link
Contributor Author

@ofborg test systemd-initrd-luks-unl0kr

@hustlerone
Copy link
Contributor Author

oh come on how could this happen

@hustlerone hustlerone marked this pull request as draft December 7, 2024 20:35
@hustlerone
Copy link
Contributor Author

@ofborg test systemd-initrd-luks-unl0kr

@hustlerone
Copy link
Contributor Author

@ofborg test systemd-initrd-luks-unl0kr

@hustlerone
Copy link
Contributor Author

@ofborg test systemd-initrd-luks-unl0kr

@hustlerone
Copy link
Contributor Author

@ofborg test systemd-initrd-luks-unl0kr

Copy link
Contributor

@ElvishJerricco ElvishJerricco left a comment

Choose a reason for hiding this comment

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

Test is still not passing. The module itself looks good now though.

nixos/tests/systemd-initrd-luks-unl0kr.nix Outdated Show resolved Hide resolved
@hustlerone
Copy link
Contributor Author

Test is still not passing. The module itself looks good now though.

Test passes on my local machine, both on interactive and non interactive

@hustlerone
Copy link
Contributor Author

@ofborg test systemd-initrd-luks-unl0kr

@hustlerone
Copy link
Contributor Author

There we go, looks like ofborg needs some more cpu

@ElvishJerricco
Copy link
Contributor

(finished: waiting for password to appear on screen, in 827.69 seconds)

uh, it "finished" on ofborg because it takes 13mins to recognize the unl0kr prompt. That's why I thought it was locking up. It definitely doesn't take so long for the prompt to appear, so I would not call this test working.

@hustlerone
Copy link
Contributor Author

(finished: waiting for password to appear on screen, in 827.69 seconds)

uh, it "finished" on ofborg because it takes 13mins to recognize the unl0kr prompt. That's why I thought it was locking up. It definitely doesn't take so long for the prompt to appear, so I would not call this test working.

Yeah, OCR is painful

@ElvishJerricco
Copy link
Contributor

Yeah, OCR is painful

? That's not really a reason it should take 13mins. That's not going to work here. Hydra will likely timeout on this test. It needs to be fixed.

@hustlerone
Copy link
Contributor Author

hustlerone commented Dec 23, 2024

Yeah, OCR is painful

? That's not really a reason it should take 13mins. That's not going to work here. Hydra will likely timeout on this test. It needs to be fixed.

How do I see previous test times to compare?

@hustlerone
Copy link
Contributor Author

ok so figured out, it used to take 12.

The original maintainer had run into problems when bumping so there's that. I'll attempt to see what I can do

@hustlerone
Copy link
Contributor Author

There. Let's see now. For some reason test time goes tenfold if two screenshots are attempted to be taken

@hustlerone
Copy link
Contributor Author

@ofborg test systemd-initrd-luks-unl0kr

@hustlerone
Copy link
Contributor Author

You know what, screw OCR. I'll see if I can just wait till the agent starts and then input the password blindly.

If it can take keyboard inputs it still counts, right?

nixos/unl0kr: accomodate for the future
@hustlerone
Copy link
Contributor Author

@ofborg test systemd-initrd-luks-unl0kr

@ElvishJerricco ElvishJerricco merged commit 08b6cf5 into NixOS:master Dec 24, 2024
26 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: clean-up 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants