rileytestut / AltServer-Windows

GNU Affero General Public License v3.0
141 stars 49 forks source link

Moving AltSign into its own repository #38

Open haukepribnow opened 2 years ago

haukepribnow commented 2 years ago

First of all: Thanks for creating AltServer.

tl;dr

Would you be willing to move AltSign into a separate repository...

Background

I'm currently working on integrating AltSign into my CI/CD pipelines. For this, I have started creating a Linux-based command line-version of AltSign; its working title is "AltSign-CLI". As core part of its original foundation, I've used the Linux-"ported" AltSign version from https://github.com/NyaMisty/AltSign-Linux.

My CD pipeline will fetch UDIDs of the relevant devices from a database and will then use AltSign-CLI to:

  1. register the UDIDs of new devices with my Apple ID
  2. generate the provisioning profile
  3. finalize/sign the .ipa file

The CD pipeline will then upload the signed .ipa file to a server where it should (hopefully) be installable as described in https://stackoverflow.com/questions/23561370/download-and-install-an-ipa-from-self-hosted-url-on-ios/23561783#23561783.

As a note on Anisette data: AltSign-CLI downloads/retrieves the Anisette data from an "Anisette-as-a-Service" solution. (I'm currently using the Docker-based "Anisette-as-a-Service" solution from https://hub.docker.com/r/nyamisty/alt_anisette_server / repo: https://github.com/NyaMisty/alt-anisette-server, whose core is heavily based on https://github.com/rileytestut/AltServer-Windows/blob/master/AltServer/AnisetteDataManager.cpp. And just FYI: Moving forward, I'm considering to change the "Anisette-as-a-Service" solution to use a different new implementation of an Anisette "generator" that appears to be a little more straight-forward: https://github.com/lennyerik/windows-anisette - but I will need to do some more investigation before I actually switch over.)

Problem to be solved

The version of AltSign that I've been initially using (https://github.com/NyaMisty/AltSign-Linux) is a Linux "port" of AltSign that seems to have been "forked" from the AltServer-Windows commit d3079dcf4af6faeaf108af523b1364b6012bbf98 or earlier. I've put "forked" in quotes because AltSign-Linux seems to have been based on a simple copy of the files in the AltSign folder from back then, i.e. AltServer-Window's Git history has gone lost in the AltSign-Linux repo. And I've put "port" in quotes because there were actually no major changes required; the only key changes are regarding OS differences regarding wide char strings: Windows often uses wide char strings where Linux requires "normal" strings. (That means for the key changes from the "port": Most instances of L"example" were replaced with "example" and StringFromWideString/WideStringFromString calls have been removed).

What AltSign-Linux has shown is that it is pretty easy to make AltSign compile & work also on Linux, thereby proving its usability in the Linux-dominated field of CI/CD pipelines. What AltSign-Linux has unfortunately also shown is that it is currently difficult to contribute to the development of AltSign outside of the context of AltServer, i.e. as its own separate library: Already now, the AltSign-Linux "fork" misses some important commits compared to AltServer-Windows' develop branch (especially the handling of the SMS-based authentication method). While I was able to work some black Git magic on my local machine to "reestablish" the history of AltSign-Linux being a true fork from the AltServer-Windows commit d3079dcf4af6faeaf108af523b1364b6012bbf98 and then integrating the changes from the AltServer-Windows repo since then back into my local AltSign-Linux repo, it was a rather painful job that nobody should do.

Instead of relying on this rather wonky approach with maintaining both a Windows AltSign version and a separate Linux AltSign version (and that one even with a rewritten Git history), it would be much more convenient to contribute directly to one single "canonical" AltSign version; for example, I would be happy to issue a pull request that makes AltSign build both for Linux and for Windows. However, to avoid mixing the AltServer code (that is only targeting Windows) with the enhanced AltSign code (which would then target multiple platforms) - and to make AltSign usable more easily as a "stand-alone library" outside of the AltServer context, my proposal is to move AltSign into its own repository with its own Issue tracker and the ability to raise Pull Requests separately from AltServer-Windows.