-
Notifications
You must be signed in to change notification settings - Fork 2.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 Go SDK extension #213
Closed
Closed
Add Go SDK extension #213
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<component type="runtime"> | ||
<id>org.freedesktop.Sdk.Extension.golang</id> | ||
<metadata_license>CC0-1.0</metadata_license> | ||
<name>Go programming language Sdk extension</name> | ||
<summary>Go compiler and tools</summary> | ||
</component> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
{ | ||
"id": "org.freedesktop.Sdk.Extension.golang", | ||
"branch": "1.6", | ||
"runtime": "org.freedesktop.Sdk", | ||
"build-extension": true, | ||
"sdk": "org.freedesktop.Sdk", | ||
"runtime-version": "1.6", | ||
"sdk-extensions": [], | ||
"separate-locales": false, | ||
"appstream-compose": false, | ||
"modules": [ | ||
{ | ||
"name": "golang", | ||
"buildsystem": "simple", | ||
"sources": [ | ||
{ | ||
"type": "archive", | ||
"only-arches": [ | ||
"i386" | ||
], | ||
"url": "https://dl.google.com/go/go1.9.2.linux-386.tar.gz", | ||
"sha256": "574b2c4b1a248e58ef7d1f825beda15429610a2316d9cbd3096d8d3fa8c0bc1a" | ||
}, | ||
{ | ||
"type": "archive", | ||
"only-arches": [ | ||
"arm" | ||
], | ||
"url": "https://dl.google.com/go/go1.9.2.linux-armv6l.tar.gz", | ||
"sha256": "8a6758c8d390e28ef2bcea511f62dcb43056f38c1addc06a8bc996741987e7bb" | ||
}, | ||
{ | ||
"type": "archive", | ||
"only-arches": [ | ||
"aarch64" | ||
], | ||
"url": "https://dl.google.com/go/go1.9.2.linux-arm64.tar.gz", | ||
"sha256": "0016ac65ad8340c84f51bc11dbb24ee8265b0a4597dbfdf8d91776fc187456fa" | ||
}, | ||
{ | ||
"type": "archive", | ||
"only-arches": [ | ||
"x86_64" | ||
], | ||
"url": "https://dl.google.com/go/go1.9.2.linux-amd64.tar.gz", | ||
"sha256": "de874549d9a8d8d8062be05808509c09a88a248e77ec14eb77453530829ac02b" | ||
} | ||
], | ||
"build-commands": [ | ||
"install -d /usr/lib/sdk/golang", | ||
"cp -rpv * /usr/lib/sdk/golang/" | ||
] | ||
}, | ||
{ | ||
"name": "scripts", | ||
"sources": [ | ||
{ | ||
"type": "script", | ||
"commands": [ | ||
"export GOROOT=/usr/lib/sdk/golang", | ||
"export PATH=$PATH:$GOROOT/bin" | ||
], | ||
"dest-filename": "enable.sh" | ||
} | ||
], | ||
"buildsystem": "simple", | ||
"build-commands": [ | ||
"cp enable.sh /usr/lib/sdk/golang/" | ||
] | ||
}, | ||
{ | ||
"name": "appdata", | ||
"buildsystem": "simple", | ||
"build-commands": [ | ||
"mkdir -p ${FLATPAK_DEST}/share/appdata", | ||
"cp org.freedesktop.Sdk.Extension.golang.appdata.xml ${FLATPAK_DEST}/share/appdata", | ||
"appstream-compose --basename=org.freedesktop.Sdk.Extension.golang --prefix=${FLATPAK_DEST} --origin=flatpak org.freedesktop.Sdk.Extension.golang" | ||
], | ||
"sources": [ | ||
{ | ||
"type": "file", | ||
"path": "org.freedesktop.Sdk.Extension.golang.appdata.xml" | ||
} | ||
] | ||
} | ||
] | ||
} |
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.
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.
I'm pretty sure this is the wrong arm architecture for our definition of ARM. We should test, but we may have to ban arm from this extension
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.
Ah, right, we're targetting armv7? I could probably make some workaround to build it from source, I'll take a look at it.
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.
If we can just build it from source that would be nice in general.
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.
After another look, seems to be potential time sink. Last release that doesn't require working Go compiler is 1.4 and it doesn't seem to build on my Odroid C2 (aarch64).
One option would be another extension to build this one (that would also cut some time for building), but use binary release just for aarch64.
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.
Yeah - I'd rather have go, and the bootstrap is super messy.
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.
@ramcq which exact arm do we use again? you were the last person who touched that as I remember ;-)
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.
Looking at how gcc is built, it's armv7-a. Fix will come in a minute…
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.
My bad, there are no binaries optimized for armv7. I will test armv6 one on my Odroid XU4 and merge it as is if it works properly.