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

Add iOS builds to nFPM deb pkgs #3410

Closed
2 tasks done
blacktop opened this issue Sep 27, 2022 · 18 comments · Fixed by #3436
Closed
2 tasks done

Add iOS builds to nFPM deb pkgs #3410

blacktop opened this issue Sep 27, 2022 · 18 comments · Fixed by #3436
Assignees

Comments

@blacktop
Copy link

blacktop commented Sep 27, 2022

Is your feature request related to a problem? Please describe.

No problem, but there is a community of people that pkg bins/apps for jailbroken phones etc and this would make it much easier for them to include my tools in their distros.

Describe the solution you'd like

I believe that we could also pkg the GOOS ios GOARCH arm64 builds into deb pkgs if we set the "Architecture: field in the control file to iphoneos-arm64".

Is that possible to add as a config?

Describe alternatives you've considered

I'm not sure how else to do this?

Search

  • I did search for other open and closed issues before opening this.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Additional context

I think from a UX point of view you would just add ios as a one of the builds to be packaged and it would auto set the iphoneos-arm64 and apologies if you have already implemented this.

@blacktop blacktop added enhancement New feature or request triage Issue pending triage by one of the maintainers labels Sep 27, 2022
@blacktop
Copy link
Author

I just tested it and all non-linux builds are ignored in the nfpms config

@caarlos0
Copy link
Member

wait... jailbroken iphones can install debs?

if so... can we run automated tests on github actions? if not, I'd be inclined to not implement this.

@blacktop
Copy link
Author

@CRKatri ? I assume that it's not testable unless macOS can also install debs?

@CRKatri
Copy link

CRKatri commented Sep 27, 2022

You can test packaging them, and the code should be identical to the packaging code used for Linux debs. You obviously can't test running the iOS binaries with GitHub actions, you could probably do something with corellium, but that's very expensive for no real benefit.

@blacktop
Copy link
Author

blacktop commented Sep 27, 2022

@CRKatri I can see where @caarlos0 is testing his debs here - https://github.com/goreleaser/goreleaser/blob/main/Taskfile.yml#L162

Is there a docker image that can approximate the iOS environment at least just from an installing debs point of view?

@CRKatri
Copy link

CRKatri commented Sep 27, 2022

No. As I said though, as long as the Linux debs work, the ios debs will too.

@blacktop
Copy link
Author

@caarlos0 is there a "generic" step for packaging that I could use to create these debs should you choose not to implement?

@caarlos0
Copy link
Member

if its just setting that arch, you can use nfpm directly... but within goreleaser, no there isn't...

@Elara6331
Copy link
Contributor

Elara6331 commented Oct 2, 2022

wait... jailbroken iphones can install debs?

Yes, the jailbreaking tools actually install dpkg and apt on them.

if so... can we run automated tests on github actions? if not, I'd be inclined to not implement this.

You wouldn't be able to test on iOS itself, but as I said, it uses unmodified apt just like Debian/Ubuntu, so the current tests should be sufficient, goreleaser and nfpm would just have to allow setting GOOS to ios

@caarlos0
Copy link
Member

caarlos0 commented Oct 3, 2022

goreleaser allows setting GOOS to ios, not sure if github actions et al build it though (pretty sure they don't without a good amount of modifications), but goreleaser will not package debs for ios.

maybe we could do something like:

nfpm:
- id: foo
  package_name: etc
  goos: ios

so, goos is linux by default, but users can specify ios as well. Is that the only modification needed?

@blacktop
Copy link
Author

blacktop commented Oct 3, 2022

I believe we would also need to ensure in your nfpm pkg that ios/arm64 would map to:

Architecture: field in the control file to iphoneos-arm64

@blacktop
Copy link
Author

blacktop commented Oct 3, 2022

I was thinking you could add support for an ios build to be added to the nfpm builds array, but then you'd have to handle/worry about people trying to include other GOOSes etc into the future so I like you suggest of just having ios be another option for this small edge case. 👍

@blacktop
Copy link
Author

blacktop commented Oct 3, 2022

Also just FYI in order to build GOOS ios in goreleaser you have to do this - https://github.com/blacktop/ipsw/blob/master/.goreleaser.yml#L32 from a macOS host/VM.

Also I've been using Zig for cross compiling instead of using a FULL Github Action VM or one of those docker images and it has be working GREAT and might be something you'd want to officially support via goreleaser in the future 😎

@caarlos0
Copy link
Member

caarlos0 commented Oct 3, 2022

I believe we would also need to ensure in your nfpm pkg that ios/arm64 would map to:

Architecture: field in the control file to iphoneos-arm64

yes, that would be the idea...

@caarlos0
Copy link
Member

caarlos0 commented Oct 3, 2022

I was thinking you could add support for an ios build to be added to the nfpm builds array, but then you'd have to handle/worry about people trying to include other GOOSes etc into the future so I like you suggest of just having ios be another option for this small edge case. 👍

hmm, that might be even simpler, as the majority of projects don't build for ios anyway...

will think about it for a bit... having a rough couple of weeks personal life wise, but will see what I can do...

@blacktop
Copy link
Author

blacktop commented Oct 3, 2022

Really appreciate everything you do @caarlos0 ❤️

@caarlos0 caarlos0 removed the triage Issue pending triage by one of the maintainers label Oct 5, 2022
caarlos0 added a commit that referenced this issue Oct 5, 2022
Jailbroken iOS can install deb packages, and it seems the only change
needed is to set the OS to `ios` instead of `linux`.

Closes #3410
@caarlos0 caarlos0 removed the enhancement New feature or request label Oct 5, 2022
@caarlos0
Copy link
Member

caarlos0 commented Oct 6, 2022

check out #3436

caarlos0 added a commit that referenced this issue Oct 13, 2022
Jailbroken iOS can install deb packages, and it seems the only change
needed is to set the OS to `ios` instead of `linux`.

Closes #3410

cc/ @blacktop

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants