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

Provide 32bit builds #112

Merged
merged 8 commits into from
Mar 20, 2016
Merged

Provide 32bit builds #112

merged 8 commits into from
Mar 20, 2016

Conversation

RazZziel
Copy link

Related to issue #91.

Binaries are being uploaded to https://bintray.com/raziel/generic. Please test on as many systems as possible, 32 and 64bit.

@RazZziel RazZziel changed the title Provide 32bit builds [#91] Provide 32bit builds Mar 11, 2016
@probonopd
Copy link
Member

Exciting work!
To merge this, binaries shouldn't be uploaded to https://bintray.com/raziel/generic. Also In don't think we should be mirroring bintray.sh in this repo; i'd like to maintain it in just one rather than two places (solution might be to wget it from AppImages repo on demand).

@RazZziel
Copy link
Author

To merge this, binaries shouldn't be uploaded to https://bintray.com/raziel/generic

Of course, but I don't have your Bintray API key, and without it the build would fail and Travis won't accept the PR. You can just commit your changes to the branch to make it publish to your Bintray instead of mine, and then merge.

Also In don't think we should be mirroring bintray.sh in this repo; i'd like to maintain it in just one rather than two places (solution might be to wget it from AppImages repo on demand).

Makes sense, didn't came up with a solution that wasn't convoluted, like having the .sh in AppImageKit and make it a submodule of AppImages, but a wget would work fine as well.

Right now I think the only compatibility problem between my modifications and the AppImages repo would be that I use a space as separator between the package name and the version instead of a dash, because I think it's both more human-readable and easier to parse, but I can add a pattern to make it compatible with AppImages filenames

@shoogle
Copy link

shoogle commented Mar 12, 2016

We've been discussing similar issues over at MuseScore. If you are modifying @probonopd's bintray.sh then take a look at our bintray.sh to see how we solved them.

  1. Here's how we extract the version from the AppImage filename.

  2. We moved these lines right to the top of the file (they used to be here) to avoid the build failing on a pull request (because BINTRAY_API_KEY wouldn't be set in Travis environment on a PR).

  3. Rather than uploading to a Bintray user account, we have an account for MuseScore as an organisation. This allows multiple collaborators to upload to the same repo. If @probonopd were to create an AppImage organisation then he could add you to it and give you upload privileges. We include an optional environment variable which developers can override to upload to their own repo for testing purposes if they don't have permission to upload to the official MuseScore one.
    We did it like this:

    # If you DO NOT have permission to upload to MuseScore's repo then set
    # $BINTRAY_REPO_OWNER in Travis environment to your own username.
    [ "$BINTRAY_REPO_OWNER" ] || BINTRAY_REPO_OWNER="musescore"
    

    but another way would be like this:

    # If you DO have permission to upload to MuseScore's repo then you can set
    # $BINTRAY_REPO_OWNER to "musescore" in Travis environment.
    [ "$BINTRAY_REPO_OWNER" ] || BINTRAY_REPO_OWNER=$BINTRAY_USER
    
  4. We also treat nightlies differently to stable releases, but that's probably not something you are interested in right now.

* Install dependencies within the script, with apt, yum and pacman
* Append \n to curl output, so the next command output doesn't get mangled
* Implemented compatibility with non-AppImage files, so we can upload AppRun
* Made package description optional
* Changed version extraction from the file name to use regexp (should be more robust, supporting any kind of version schemas and package architectures, etc)
* Implemented support for spaces in the file name
@RazZziel RazZziel force-pushed the feature/32bit_builds_docker branch from f9a7bfa to 0eb3daa Compare March 12, 2016 17:23
@RazZziel
Copy link
Author

Made it build without references to my account, defaulting to @probonopd credentials, but allowing me to override all the settings from my Travis environment (which apparently I'm allowed to change for my builds)

BINTRAY_USER="${BINTRAY_USER:-probono}"
BINTRAY_API_KEY="$BINTRAY_API_KEY" # env
BINTRAY_REPO="${BINTRAY_REPO:-AppImages}"
BINTRAY_REPO_OWNER="${BINTRAY_REPO_OWNER:-$BINTRAY_USER}" # owner and user not always the same
WEBSITE_URL="${WEBSITE_URL:-http://appimage.org}"
ISSUE_TRACKER_URL="${ISSUE_TRACKER_URL:-https://github.com/probonopd/AppImages/issues}"
VCS_URL="${VCS_URL:-https://github.com/probonopd/AppImages.git}" # Mandatory for packages in free Bintray repos

Either way, having a Bintray organization for AppImageKit, like (https://bintray.com/portablelinuxgames, separated from https://bintray.com/raziel/), is probably a good idea :)

We also treat nightlies differently to stable releases, but that's probably not something you are interested in right now.

That's actually pretty interesting in order to separate which version of AppImage developers should be using to create packages, and which versions are just for testing

@probonopd
Copy link
Member

Do we really need https://raw.githubusercontent.com/RazZziel/AppImages/feature/bintray_for_AppImageKit/bintray.sh?

@RazZziel
Copy link
Author

Only while AppImageCommunity/pkg2appimage#36 is not merged

@probonopd
Copy link
Member

Which it is now ;-)

@RazZziel
Copy link
Author

Awesome, URL changed

@probonopd
Copy link
Member

Looks like stuff is broken at the moment. Please make sure that we don't have spaces in the filenames. Naming convention for the AppImages in my repo is MyApp-1.0-x86_64.AppImage (might be different for other repos).

@RazZziel
Copy link
Author

Hmmm what's broken exactly? Github tells me all checks have passed here (https://travis-ci.org/probonopd/AppImageKit/builds/115799130 and https://travis-ci.org/probonopd/AppImageKit/builds/115799133)

@probonopd
Copy link
Member

I think travis is not getting the correct result code, but looking at the log:

Creating package AppRun 5-37-gbb25042-i686...
{"message":"Package for path 'raziel/generic' was invalid"}
Uploading and publishing out/AppRun 5-37-gbb25042-i686...
{"message":"Failed to resolve package name"}
Adding Travis CI log to release notes...
{"message":"Package 'AppRun 5-37-gbb25042-i686' was not found"}

@RazZziel
Copy link
Author

Hmm, indeed bintray.sh is not being triggered here right now because Skipping a deployment with the releases provider because the current build is a pull request., and https://travis-ci.org/probonopd/AppImageKit/jobs/115799134 doesn't fail properly

AppImage upload works

Uploading and publishing out/AppImageAssistant 5-37-gbb25042-i686.AppImage...
{"message":"success"}

Uploading and publishing out/AppImageExtract 5-37-gbb25042-i686.AppImage...
{"message":"success"}

Uploading and publishing out/AppImageMonitor 5-37-gbb25042-i686.AppImage...
{"message":"success"}

The problem only happens with AppRun, which is not an AppImage, so there must be a regression extracting metadata from a non-AppImage name

@probonopd
Copy link
Member

Where are names like AppImageExtract 5-37-gbb25042-i686.AppImage coming from? Should be AppimageExtract or AppImageExtract-gbb25042-i686.AppImage...

@RazZziel
Copy link
Author

#91 (comment)

Btw, I stopped using git rev-list --count HEAD for versioning, because it will give either wrong or empty results in docker Travis, so now I'm using only git describe --tags, which should provide a good enough output both for releases (0 commits after a tag) and for nightlies (>0 commits after a tag)
#91 (comment)
Travis by default fetches the last 50 commits (--depth=50), not the whole history, which seems to alter the output of git rev-list --count HEAD

#112 (comment):

Right now I think the only compatibility problem between my modifications and the AppImages repo would be that I use a space as separator between the package name and the version instead of a dash, because I think it's both more human-readable and easier to parse, but I can add a pattern to make it compatible with AppImages filenames

Summing up:

  • AppimageExtract was not valid because it doesn't contain the package version, and it's not in the metadata either
  • AppImageExtract-gbb25042-i686.AppImage was discarded because it was difficult to parse

It can be changed at the end of build.sh

@probonopd
Copy link
Member

I don't agree with the "solution" of using a blank in #112 (comment) because it tends to be breaky. Instead, we should not parse the filename but use proper X-AppImage-... metadata in the .desktop file instead.

@RazZziel
Copy link
Author

Blanks shouldn't be breaky if scripts are coded with a bit of care, and they could be replaced by underscore. Anyway using proper metadata should be way better indeed.

Would using underscores instead of blanks be fine for this PR while we implement metadata?

@probonopd
Copy link
Member

Yes

Eric Fontaine and others added 2 commits March 16, 2016 08:54
if pass --fetch-dependencies-only to then quit build prematurely before actually compile

added python as apt-get dependency, which is needed if build on a fresh minimal debian wheezy
allow create pre-built wheezy arm docker image w/ dependencies
@RazZziel
Copy link
Author

Commited on 19f2a71, but depends on PR AppImageCommunity/pkg2appimage#39

@RazZziel RazZziel force-pushed the feature/32bit_builds_docker branch from 19f2a71 to fb72145 Compare March 20, 2016 16:49
RazZziel added a commit that referenced this pull request Mar 20, 2016
@RazZziel RazZziel force-pushed the feature/32bit_builds_docker branch from fb72145 to 4a7b562 Compare March 20, 2016 16:54
RazZziel added a commit that referenced this pull request Mar 20, 2016
@RazZziel RazZziel force-pushed the feature/32bit_builds_docker branch from 4a7b562 to a663e12 Compare March 20, 2016 19:16
@RazZziel
Copy link
Author

Build passing again! Is this ready to merge?

probonopd added a commit that referenced this pull request Mar 20, 2016
@probonopd probonopd merged commit 3487b7b into master Mar 20, 2016
@probonopd probonopd deleted the feature/32bit_builds_docker branch April 9, 2016 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants