Closed phunkyfish closed 5 years ago
reason: installing to jailbroken device requires owner to be root
also let's add how to fix this for building from XCode (I've added my primary user to administrators) :
Creating org.xbmc.kodi-ios package version 18.2 revision 0~rc1
+ /usr/bin/sudo rm -rf ./org.xbmc.kodi-ios
sudo: no tty present and no askpass program specified
make: *** [/Users/piotr/gitrepos/kodi-ios/SylvainCecchetto/kodi-build/CMakeFiles/deb] Error 1
Command /bin/sh failed with exit code 2
("o tty present and no askpass program specified")
I'm not a heavy user of XCode, so I asked google and found this: https://stackoverflow.com/questions/6803329/how-to-use-sudo-inside-of-a-run-script-build-phase-in-xcode-4 ...
I did "sudo sh" and tried to built deb target as root. It failed at:
Check dependencies
Code Signing Error: No profiles for 'org.xbmc.kodi-ios' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'org.xbmc.kodi-ios'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.
Yes, the -allowProvisioningUpdates I know about.
Have you restarted your Mac since adding to admin group and then try to run deb target from Xcode? I just did a test with a non admin user, added them to admin but didn’t work until a restart.
Yes, I did a restart and it didn't helped. I run some tests and it seems, that below approach would work:
#!/bin/bash
echo insertYourPasswordHere
export SUDO_ASKPASS="$HOME/pass.sh"
alias sudo="sudo -A"
/Users/Shared/xbmc-depends/x86_64-darwin18.5.0-native/bin/cmake --build . --target "deb" --config "Debug"
That worked for me. Probably there are better and safer options for SUDO_ASKPASS , but I'm not so good in macOS - I come from Windows :-)
Well done. This must be what they do on Jenkins.
:-) thanks. However after I made ipa from deb file and sideloaded to my iPad, I couldn't find an icon and launch it. When I try to build deb target again, it hanged on sudo again. Damn. I'll delete kodi-build dir and try again.
Update: after successful attempt I run Xcode from terminal and tried again. It failed and , probably, messed up with shell/environment variables. Starting new terminal window and building deb from there, with askpass works again.
Once https://github.com/xbmc/xbmc/pull/15967 gets merged, and the ATV stuff is updated to match, hopefully the issue should be resolved.
Closing as will be resolved when rebased with PR above.
Just a note for myself, not at a computer till after the weekend.