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

Use libvips-dev apk for alpine-linux packaging test #359

Merged
merged 2 commits into from
Feb 13, 2016

Conversation

wjordan
Copy link
Contributor

@wjordan wjordan commented Feb 13, 2016

This updates the alpine-linux packaging test to use the libvips-dev apk (currently being served from a custom s3 repository location; see alpinelinux/aports#29 for the upstream APK submission).

I realized that a Docker image probably isn't the most maintainable approach for distributing a compiled-library meant to be used as a base image for other projects, and found it easier to leverage the existing OS package management systems, in this case APKs (which are basically just tar-packages of the project's files, with some metadata). Following the APK conventions, the compiled libvips package is separated into libvips which is the compiled runtime library, and libvips-dev which includes the development headers needed for building projects linking to it. So for a packaging-test for Sharp, we want to link to the libvips-dev package.

Note- I've also created a node-sharp package which provides a pre-compiled Sharp on Alpine Linux- see alpinelinux/aports#30 for that upstream APK submission.

@lovell
Copy link
Owner

lovell commented Feb 13, 2016

Thanks Will, this is a much better approach.

https://circleci.com/gh/lovell/sharp/107 is reporting the following error:

fetch https://s3.amazonaws.com/wjordan-apk/x86_64/APKINDEX.tar.gz
ERROR: https://s3.amazonaws.com/wjordan-apk: Permission denied
WARNING: Ignoring APKINDEX.a33f1393.tar.gz: No such file or directory
fetch http://dl-4.alpinelinux.org/alpine/v3.3/main/x86_64/APKINDEX.tar.gz
fetch http://dl-4.alpinelinux.org/alpine/v3.3/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  libvips-dev (missing):
    required by: world[libvips-dev]

This looks like an S3 permission thing. Is this something you can fix?

wjordan and others added 2 commits February 13, 2016 16:07
vips requires main/gettext-0.19.7r1 for aports commit 4ef70b432b05b720f7f144c2060550749d378205 to link correctly.
@wjordan
Copy link
Contributor Author

wjordan commented Feb 13, 2016

oops- i forgot to add the public-read acl during my (currently manual) s3-upload command.

I tried linking against alpine:3.3, but it looks like this requires alpine:edge image to build+run correctly, as linking vips requires a recent update to the gettext apk (commit 4ef70b4).

tested locally and got alpine OK this time, so it should be running clean now. (Once CircleCI gave a 10-minute timeout on the packaging-test run, so it may require a retry to make it through clean.)

lovell added a commit that referenced this pull request Feb 13, 2016
Use libvips-dev apk for alpine-linux packaging test
@lovell lovell merged commit cd05c78 into lovell:master Feb 13, 2016
@lovell
Copy link
Owner

lovell commented Feb 13, 2016

Fantastic, thank you for all your help to get this working.

@AVVS
Copy link

AVVS commented Apr 11, 2016

@wjordan could you update your APK so that it works with :edge again ? Seem to be failing to build now :(

@wjordan
Copy link
Contributor Author

wjordan commented Apr 11, 2016

@AVVS OK, I took a look, the published packages should be working again. I had to rebuild the APKs because the libwebp package in the main Alpine repo was bumped to a new ABI-incompatible version (v0.5.0 providing libwebp.so.6 from v0.4.4 providing libwebp.so.5). I also bumped the libvips library version to the latest release (8.2.3).

It looks like the new "Overlay with numeric gravity" and "Overlay with string-based gravity" Sharp tests are causing segfaults in the Alpine packaging test, though that sounds like a separate issue.

@AVVS
Copy link

AVVS commented Apr 11, 2016

@wjordan thanks a lot, works like a charm now :)

@lovell not sure if there is anything you need to look at:

It looks like the new "Overlay with numeric gravity" and "Overlay with string-based gravity" Sharp tests are causing segfaults in the Alpine packaging test, though that sounds like a separate issue.

@lovell
Copy link
Owner

lovell commented Apr 12, 2016

The overlay logic is relatively stack-intensive so the segfault could be related to an overflow; I'll take a look.

@lovell
Copy link
Owner

lovell commented Apr 12, 2016

Backtrace from overlay test segfault:

#0  0x00007ffff7db8471 in kill () from /lib/ld-musl-x86_64.so.1
#1  0x000000000000000b in ?? ()
#2  0x00007ffff794d259 in uv_kill () from /usr/lib/libuv.so.1
#3  0x0000555555c2872d in node::Kill(v8::FunctionCallbackInfo<v8::Value> const&) ()
#4  0x00005555558a3899 in v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) ()

The use of Node v4 on Alpine leads me to believe this could be related to nodejs/node#4382 so I'm happy to ignore this one until that fix lands in LTS.

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