Support using app-extensions during the build#129
Closed
alexlarsson wants to merge 1 commit intoflatpak:masterfrom
Closed
Support using app-extensions during the build#129alexlarsson wants to merge 1 commit intoflatpak:masterfrom
alexlarsson wants to merge 1 commit intoflatpak:masterfrom
Conversation
This adds add-build-extensions which is similar to add-extensions except the extension is added at build-init time, so can be used during the build. It can also optionally be removed after the build is done. This depends on the flatpak work in: flatpak/flatpak#1598 With this I was able to build the following app which runs 32bit binaries in a 64bit build: ``` { "app-id": "org.example.Multilib", "runtime": "org.freedesktop.Platform", "sdk": "org.freedesktop.Sdk", "runtime-version": "1.6", "command": "/usr/bin/true", "add-build-extensions": { "org.freedesktop.Platform.Compat32": { "directory": "lib/32bit", "add-ld-path": "lib", "version": "1.6" } }, "modules": [ { "name": "test 32bit", "buildsystem": "simple", "build-commands": [ "ln -s /app/lib/32bit/lib/ld-linux.so.2 /app/lib/ld-linux.so.2", "/app/lib/32bit/bin/echo echoing from 32bit world" ] } ] } ```
Member
Author
|
@johnramsden I think this is a step on the way for what you want. I think with the better multilib setup in freedesktop 1.8 it would be even nicer. |
|
Thanks @alexlarsson, this looks perfect. |
Member
Author
|
📌 Commit 35d4945 has been approved by |
|
⚡ Test exempted: pull fully rebased and already tested. |
2 tasks
|
@alexlarsson regarding what you mentioned #129 (comment) about the new multilib setup in freedesktop 1.8, where can I find some more information about it? I took a look at flatpak/freedesktop-sdk-images, but I could only find reference to versions 1.6 and below. |
Member
Author
leaeasy
pushed a commit
to leaeasy/flatpak-builder
that referenced
this pull request
Jun 25, 2018
This adds add-build-extensions which is similar to add-extensions except the extension is added at build-init time, so can be used during the build. It can also optionally be removed after the build is done. This depends on the flatpak work in: flatpak/flatpak#1598 With this I was able to build the following app which runs 32bit binaries in a 64bit build: ``` { "app-id": "org.example.Multilib", "runtime": "org.freedesktop.Platform", "sdk": "org.freedesktop.Sdk", "runtime-version": "1.6", "command": "/usr/bin/true", "add-build-extensions": { "org.freedesktop.Platform.Compat32": { "directory": "lib/32bit", "add-ld-path": "lib", "version": "1.6" } }, "modules": [ { "name": "test 32bit", "buildsystem": "simple", "build-commands": [ "ln -s /app/lib/32bit/lib/ld-linux.so.2 /app/lib/ld-linux.so.2", "/app/lib/32bit/bin/echo echoing from 32bit world" ] } ] } ``` Closes: flatpak#129 Approved by: alexlarsson
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds add-build-extensions which is similar to add-extensions
except the extension is added at build-init time, so can be
used during the build. It can also optionally be removed after
the build is done.
This depends on the flatpak work in:
flatpak/flatpak#1598
With this I was able to build the following app which runs 32bit binaries
in a 64bit build:
{ "app-id": "org.example.Multilib", "runtime": "org.freedesktop.Platform", "sdk": "org.freedesktop.Sdk", "runtime-version": "1.6", "command": "/usr/bin/true", "add-build-extensions": { "org.freedesktop.Platform.Compat32": { "directory": "lib/32bit", "add-ld-path": "lib", "version": "1.6" } }, "modules": [ { "name": "test 32bit", "buildsystem": "simple", "build-commands": [ "ln -s /app/lib/32bit/lib/ld-linux.so.2 /app/lib/ld-linux.so.2", "/app/lib/32bit/bin/echo echoing from 32bit world" ] } ] }