Page MenuHomePhabricator

Create apt repo for MediaWiki-Vagrant to pull packages from
Closed, ResolvedPublic

Description

MediaWiki-Vagrant uses the WMF's apt repository to get most packages, but there are some roles that use software that for one reason or another is not in use on the WMF servers. Getting arbitrary packages imported into the WMF apt repo is a difficult (and often undesirable) process. To work around this there are roles that install software from various 3rd party apt repos or even resort to downloading source tarballs and compiling within the VM.

Introducing an apt repo dedicated to packages desired by MediaWiki-Vagrant would be easier to manage and also could provide some additional level of security for MediaWiki-Vagrant users. @yuvipanda mentioned that creating such a system should be possible and that there is a bit of a precedent in the apt repo which exists to support Tool Labs.

Details

Related Changes in Gerrit:

Event Timeline

bd808 raised the priority of this task from to Needs Triage.
bd808 updated the task description. (Show Details)
bd808 added a project: MediaWiki-Vagrant.
bd808 added subscribers: bd808, yuvipanda.

I second this idea. For example, for T124996 it is currently not possible to import Node 4 packages into our prod APT repo since that could break services that still run on Trusty and Node 0.10 in prod, most notably Parsoid, CXServer and possibly Etherpad and a bunch of others I'm not aware of or have deliberately forgotten.

Things that could be in apt:

I'll setup the aptly setup, and then someone else can take over the policy of who gets access and how packages are maintained :)

I've setup it on mwv-apt-01 instance, with aptly (see wikitech.wikimedia.org/wiki/Aptly for docs). You can check it locally by adding the following line to your MWV install:

deb [trusted=yes] http://mwv-apt.wmflabs.org/repo trusty-mwv-apt main

We can get rid of the [trusted=yes] once we figure out signing.

I've imported the node package from nodesource into it.

Ok, so it supports https, so maybe we can skip gpg signing? :D

What I like about Ubuntu's PPAs (I have not checked whether they allow accounts created by groups) is that the binary package is recreated from scratch every time, thus ensuring that it can be reproduced, and that the source files are "bundled" with the binary packages. With aptly, AFAIK you cannot store sources in any way, and you have to have a convention how binary packages are produced, i. e. strictly only unchanged checkouts from some master branch, a pbuilder environment, etc., and everyone must abide by that.

I think we can skip gpg signing for this one. Unassigning from myself so someone involved with the MediaWiki-Vagrant project can take-over to co-ordinate.

I think we should have some rules as to what packages are welcome here - possibly only packages that are directly imported from an upstream source (which could be wikimedia?)!

Example of backporting a package from jessie to trusty using this repo:

  1. Download the orig tar and debian tar from packages.debian.org
  2. Untar *.orig.tar.gz
  3. cd orig
  4. Untar ../*.debian.tar.gz
  5. dch --local ~wmf+ --distribution trusty "Rebuild for trusty"
  6. dpkg-buildpackage -us -uc
  7. cd ..
  8. scp *.deb mwv-apt-01.mwv-apt.eqiad.wmflabs:
  9. ssh mwv-apt-01.mwv-apt.eqiad.wmflabs
  10. sudo aptly repo add trusty-mwv-apt $DEB
  11. sudo aptly publish --skip-signing update trusty-mwv-apt

Change 296804 had a related patch set uploaded (by BryanDavis):
Add mwv-apt.wmflabs.org

https://gerrit.wikimedia.org/r/296804

Change 296804 merged by jenkins-bot:
Add mwv-apt.wmflabs.org

https://gerrit.wikimedia.org/r/296804

bd808 claimed this task.

I'm going to mark this as resolved now. We have a Labs VM that is hosting an aptly repo and it is wired into the MediaWiki-Vagrant Puppet process. Adding a package to the repo is documented in T125760#2418707 and follows the normal aptly process.

As for what to put in this repo, I think we can take it on a case by case basis. MediaWiki-Vagrant is much more lax than production or even Labs. Its primary utility will probably be for making WMF managed debs available to MediaWiki-Vagrant before they are ready to be put in the main Wikimedia repo.