Page MenuHomePhabricator

Install composer on tools-login
Closed, ResolvedPublic


This makes installation of web services written in PHP a lot easier since right now one can't do "git clone .." followed by "composer install".

"npm", for example, is installed. Would be nice to have composer as well.

Event Timeline

Krinkle raised the priority of this task from to Needs Triage.
Krinkle updated the task description. (Show Details)
Krinkle added projects: Toolforge, Cloud-Services.
Krinkle added subscribers: Krinkle, yuvipanda.

Is there a Debian package for it?

Krinkle renamed this task from Install composer on tools-bation to Install composer on tools-login.Aug 11 2015, 5:41 AM
Krinkle set Security to None.

Work around:

$ ssh tools-login
$ become mytool
$ mkdir bin
$ curl -sS | php -- --install-dir=bin --filename=composer
# Now installed in ~/bin/composer
# Make sure your bash PATH includes "$HOME/bin". Set in .bashrc if needed.
$ which composer
# /data/project/:tool/bin/composer

Now composer is available to e.g.

(mytool at tools-login in ~)$ cd my-repo
(mytool at tools-login in ~/my-repo)$ composer install --no-dev

After discussing with @Joe and @hashar:

  • backporting the package to precise and trusty is probably difficult.
  • to solve the issue on the integration cluster, is used (git checkout, then use /srv/deployment/integration/composer/vendor/bin/composer)

We could use the latter method for tool labs as well. See and for current usage.

A few things I tried.

  • building an fpm package from the integration/composer repo works:
    • but might not be an improvement over just using git co, unless we can automate it
  • backporting is more of an issue

Backporting log for @hashar:

  • sudo apt-get install devscripts debian-keyring equivs


after hacking the debian/rules, changing the version parsing to

| sed 's/.*(//' | sed 's/).*//')
  • fakeroot debian/rules binary

works, but

  • dpkg-buildpackage -us -uc


  • After rm bin/jsonlint-php, I can build (but of course not sign). But lintian jsonlint_1.3.1-2~toollabs1+1_all.deb passes! Good.

(this is after ca. 50 minutes of fiddling...)


worked immediately.

json-schema: same sed issue, but works with the same hack


This took me > 1 hour, so I gave up at this point.

Let's just do the git checkout + symlink option via puppet? We can make it a composer::install class or something and include it in both tools and integration

Change 246072 had a related patch set uploaded (by Merlijn van Deen):
toollabs: add composer to dev hosts

Change 246072 merged by Yuvipanda:
toollabs: add composer to dev hosts

valhallasw claimed this task.
Notice: /Stage[main]/Toollabs::Composer/File[/srv/composer]/ensure: created
Notice: /Stage[main]/Toollabs::Composer/Git::Clone[composer]/Exec[git_clone_composer]/returns: executed successfully
Notice: /Stage[main]/Toollabs::Composer/File[/usr/local/bin/composer]/ensure: created
valhallasw@tools-bastion-01:~$ composer --version
Composer version @package_branch_alias_version@ (@package_version@) @release_date@

uuuuh. According to the git log it's version 1.0.0-alpha10.