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

PPA for Travis #187

Closed
automata opened this issue Mar 31, 2015 · 21 comments
Closed

PPA for Travis #187

automata opened this issue Mar 31, 2015 · 21 comments
Labels

Comments

@automata
Copy link

Is there any PPA available for Travis building instead the preinstall script?

@lovell
Copy link
Owner

lovell commented Mar 31, 2015

Hi Vilson, I'm not aware of a PPA for Ubuntu 12.04 as used Travis.

Amongst many other packages, https://launchpad.net/~dhor/+archive/ubuntu/myway provides a pre-compiled libvips-dev and dependencies for 14.04 and 14.10.

If you know of one or would be willing to maintain one, I'd be very happy to use it :)

@gasi
Copy link

gasi commented May 5, 2015

+1 for being able to install sharp on Travis CI’s new sudo-less container infrastructure: http://docs.travis-ci.com/user/workers/container-based-infrastructure/ Unfortunately, preinstall.sh currently requires sudo. We were forced to use the new infrastructure due to some other dependency (Sauce Connect) not working well on the old Travis infrastructure but I will give it another shot. Is there a way to make preinstall.sh work without sudo?

@lovell
Copy link
Owner

lovell commented May 5, 2015

@gasi I believe PPAs require sudo access so this probably won't help you.

#42 is the best place to discuss non-root installation of libvips and #186 is the most tempting solution I've seen so far.

@gasi
Copy link

gasi commented Jul 11, 2015

Small update: We’ve opted back into sudo: required on Travis and preinstall.sh works. However, all dependencies are installed via apt-get but libvips itself is compiled from source which unfortunately adds several minutes to our build process. When I add the following for Travis’ Debian Precise:

        precise|wheezy|maya)
          # Debian 7, Ubuntu 12.04, Mint 13

          # ...

          echo "Installing libvips via apt-get"
          apt-get install -y libvips-dev libgsf-1-dev

it seems to install libvips successfully but sharp’s build process fails with the message:

Package vips was not found in the pkg-config search path.
Perhaps you should add the directory containing `vips.pc'
to the PKG_CONFIG_PATH environment variable
No package 'vips' found

Any suggestions on how to install via apt-get on Travis to avoid long compilation time?

@lovell
Copy link
Owner

lovell commented Jul 11, 2015

I still believe #186 provides the best (potential) solution to avoid users having to compile dependencies and allow sudo-less installation.

@lovell
Copy link
Owner

lovell commented Jul 15, 2015

For Ubuntu 12.04, a pre-compiled v7.40.6 of the libvips-dev package and friends are now available via:

sudo add-apt-repository ppa:lovell/precise-backport-vips

...and for Ubuntu 14.04:

sudo add-apt-repository ppa:lovell/trusty-backport-vips

This is the most recent version of vips that I can get to package correctly (dependencies etc.)

I can't use this PPA for sharp itself as the functional tests require v7.42.0+.

@gasi
Copy link

gasi commented Jul 16, 2015

@lovell This is great — I just tested it and it works! 👍

For anyone else, who needs VIPS on Travis, ensure the following in .travis.yml:

  1. Enable sudo: required

  2. Optional:

      # Suggested setting for `apt`:
      # http://docs.travis-ci.com/user/caching/#Caching-Ubuntu-packages
      cache: apt
    
  3. Install VIPS using PPA:

      before_install:
        - echo "Installing libvips..."
        - sudo add-apt-repository -y ppa:lovell/precise-backport-vips
        - sudo apt-get update
        - sudo apt-get install -y libvips-dev
        - echo "Completed libvips installation."
    

@lovell In order to use Travis’ more modern container-based infrastructure (using Docker), we’d need to add your PPA to this whitelist: https://github.com/travis-ci/apt-package-whitelist

See: http://docs.travis-ci.com/user/migrating-from-legacy/#How-do-I-install-APT-sources-and-packages%3F

Want me to do it or would you like to?

@lovell
Copy link
Owner

lovell commented Jul 16, 2015

@gasi If you're a paying customer of Travis then it makes sense for you to make this request. I can see one other PPA in the "whitelist", namely libssl-dev/lucid, so I guess its inclusion should be OK.

@gasi
Copy link

gasi commented Jul 16, 2015

@lovell Thanks, I submitted it as travis-ci/travis-ci#4398. In the meantime, I learned that one can compile from source and then cache that:

I don’t have time to explore that at this point but if anyone wants to, this could get us back onto Travis’ container infrastructure (sudo: false).

@raphaelokon
Copy link

Are there any news on this topic? The sudo preinstall.sh is blocking our deployment from being moved to the newer Travis container infrastructure.

Thanks.

@lovell
Copy link
Owner

lovell commented Aug 17, 2015

@nordisk I notice you've found and commented on travis-ci/apt-source-safelist#68 :)

@raphaelokon
Copy link

Aye. Still not sure how to proceed on this one tho :)

@lovell
Copy link
Owner

lovell commented Sep 9, 2015

@lovell
Copy link
Owner

lovell commented Sep 10, 2015

(@nordisk Not sure if he told you but @nicklester and I worked together a few years' ago.)

@raphaelokon
Copy link

@lovell He told me that actually after I used sharp for one of our tools and he saw you as the author :)

@lovell
Copy link
Owner

lovell commented Nov 1, 2015

If you've not already seen it, please subscribe to #42 for updates about the forthcoming dependency-less installation of sharp. This will allow for sudo-less operation on Travis CI e.g. https://travis-ci.org/lovell/sharp/jobs/87978123

@lovell
Copy link
Owner

lovell commented Nov 10, 2015

Last call for comments on #42.

@lovell
Copy link
Owner

lovell commented Nov 23, 2015

I'll be closing this question soon as v0.12.0 (and the current master branch) no longer require root/sudo access on 64-bit Linux, which includes Travis.

@raphaelokon
Copy link

Cheers!

@lovell
Copy link
Owner

lovell commented Nov 23, 2015

v0.12.0 now available via npm

@lovell lovell closed this as completed Nov 23, 2015
@raphaelokon
Copy link

Aces! thanks for the great work @lovell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants