-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Add libirecovery and idevicerestore #59427
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I've left some comments.
Currently libirecovery
fails at a configure error
configure: error: Could not determine an appropriate user group for the udev activation rule.
Please manually specify a udev activation rule using --with-udevrule=<RULE>
Example: --with-udevrule="OWNER=\"root\", GROUP=\"myusergroup\", MODE=\"0660\""
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently
libirecovery
fails at a configure error
@worldofpeace You're right; this appears only on NixOS, not on Ubuntu, where I had built it. Now that my NixOS build got this far, I also got it.
Looking at the logic in https://github.com/libimobiledevice/libirecovery/blob/5da2a0d7d60f79d93c283964888c6fbbc17be1a3/configure.ac#L180-L185
it prefers one of these groups, in order: plugdev storage disk staff
.
plugdev
seems to be used in NixOS:
~/src/nixpkgs (git)-[idevicerestore] % git grep plugdev
nixos/modules/hardware/onlykey.udev:SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", GROUP+="plugdev"
nixos/modules/hardware/onlykey.udev:KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", GROUP+="plugdev"
pkgs/applications/radio/hackrf/default.nix: cmakeFlags = [ "-DUDEV_RULES_GROUP=plugdev" "-DUDEV_RULES_PATH=lib/udev/rules.d" ];
pkgs/tools/security/nitrokey-app/udev-rules.nix: substituteInPlace libnitrokey/data/41-nitrokey.rules --replace plugdev "${group}"
so I will go with that for now.
Build fixed, please take another look @worldofpeace. |
I feel that the So I think |
There was a problem hiding this 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 and builds.
Haven't tested the function because I don't have the exact means to do so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe correct licenses as specified in the source code.
That's already controlled by `dontDisableStatic`, see: * https://nixos.org/nixpkgs/manual/#ssec-configure-phase * NixOS#51540
OK, I've switched to that. |
@worldofpeace Why |
Clarified via IRC:
|
Another point:
My response:
|
@GrahamcOfBorg build |
@nh2 I'm noticing that libirecovery propagates |
Good point, I've changed to make them |
@GrahamcOfBorg build libirecovery idevicerestore libimobiledevice |
Motivation for this change
I want to restore an old iPad to factory settings.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)idevicerestore -l -e
successfully erased aniPad3,3
I tried it on to firmware9.3.5 (build 13G36)
on Ubuntu 16.04 with the built binarynix path-info -S
before and after)This PR also removes one unnecessary
--disable-static
configure flag from a dependency.