Ubuntu PPA

Packaging for Ubuntu via a PPA.

Launchpad team: https://launchpad.net/~diaspora-ppa
Project: https://launchpad.net/diaspora-ppa

Target: have Diaspora* install and run on Ubuntu as easily as possible, user only needs to add PPA, install the Diaspora* package(s) and create development and production environments easily with a few commands.


Note: This discussion was imported from Loomio. Click here to view the original discussion.

Just to explain what I have been doing and what I have planned/would like to see:

I added a branch with the 0.0.1 release code. This needs to be packaged as a separate package (imho) called diaspora-source for example. It should only be updated with stable releases.

I don’t think it makes real sense to package the development code? Any user wanting to do development needs the git clone anyway - so we could just get it from git - just need to make control scripts for setting environments up.

Diaspora package (current branch https://code.launchpad.net/~jaywink/diaspora-ppa/diaspora-develop-setup) would do this magic, it would do all the dependencies, set up Ruby (via RVM) and etc. It would also contain in the control script (diasoractrl) commands like ‘setup stable [name]’ ‘setup devel [name]’ etc that would create environments for the user and for development envs automatically start them with default configurations. This would make it easy for devs to start developing on Ubuntu.

I was thinking the ‘setup devel’ would just clone the current develop branch to the selected place, configure it, start it and then the user could do what they want.

Any points, ideas, etc?

Currently add/remove of dependencies, RVM and Ruby has been done and is available in the diaspora package in PPA https://launchpad.net/~jaywink/+archive/diaspora … I am currently working on implementing the ‘setup devel’ feature.

(oh and 12.04 only atm, fixes for other versions appreciated)

Just built the latest version to my PPA https://launchpad.net/~jaywink/+archive/diaspora

So basically currently it does the following:

  • Pulls in required dependencies (12.04 only atm)
  • Installs/removes RVM
  • Setup development environment (including configs, db, rake stuff etc)

Currently it’s only meant to easily set up a dev environment. After this has been done, I’ll start to add to it required things to set up stable production environment to run a production pod.

If you want to test it (once version 0.0.1.1-0~7~precise1 has updated to the PPA) on 12.04, do the following:

$ sudo apt-add-repository ppa:jaywink/diaspora
$ sudo apt-get update
$ sudo apt-get install diaspora

(RVM will be installed during package configuration. If you already have .rvm installed, it will overwrite, if you want you can choose another user)

$ diasporactrl setup develop mydevenv

(install script does stuff)

$ cd mydevenv
$ diasporactrl start

Some questions are asked along the way but generally that’s it if all goes well.

If someone is brave enough to test it, let me know if this makes any sense, whether something doesn’t work or something crucial is missing.

I’ll write something a bit longer on this in a few days…

Oh and currently it pulls the ‘develop’ branch from the Diaspora* github which isn’t really ideal if you want to do development. I’m thinking of ways to have the users git username asked and (presuming ssh key has been set up) then automate as much as possible the git stuff, including installing of git flow etc. Basically the idea is two fold:

  1. make it as easy as possible for new devs to start working on bugs
  2. make it as easy as possible for podmins to install pods

Let me know what you think :slight_smile:

Maybe name it diaspora-dev then? If it is named diaspora people will try to run production setups from it.

Yeah I started thinking too after posting this that it would totally make sense to separate this as a development tool package and call it diaspora-dev or diaspora-dev-tools.

The production setup needs to work a bit differently and it removes the problem of having to add the Diaspora* source package on launchpad as a dependency to this dev tools package.

Btw, I just installed this on my work laptop and it doesn’t overwrite an existing RVM - it upgrades it.

Hey all,

We got a new member to the Launchpad team, @mikezentz - welcome! Could use this opportunity to kick of things a bit again :slight_smile:

Just to get some kind of plan I think it would be good to document first (Launchpad blueprints?) what packages with what functionality we want to achieve.

From some discussion before I propose something like the following;

  1. diaspora-dev
    A package containing utils (like the already existing diasporactrl) to help in developing Diaspora* code. The main function is to set up development environments and dev configuration - just to make it easier to dig in to the code quickly (=more devs).

  2. diaspora
    A package that when installed allows easy configuration of a production instance of Diaspora*.

  3. diaspora-src
    Source of Diaspora*, used by Diaspora* production package. This is updated when new releases are made in upstream.

Dev package should pull github sources since development always happens in develop branch.

For dev environment we could IMHO use RVM since it is the easiest to pull in, and is also the recommended way to do development. For production instance I would also go for RVM unless someone has other ideas?

Btw, I managed to acquire https://launchpad.net/diaspora which had been reserved by someone - I suggest we use that as the project site instead of diaspora-ppa. I will transfer it to our Diaspora PPA team and migrate the existing diaspora-dev package source there.

Hello everyone,
I like Diaspora, Ubuntu, and easy installs. I’m here to help make it happen. Look forward to working with you guys. I’ve never done this before so until I figure out how to contribute more I’m happy to do whatever grunt work needs doing.
Cheers,
Mike

Hey,
is there already a one-click diaspora.deb package for a userfriendly installation?
I’m asking because I want to set up a small pod on my little ARM PC.
I can’t find anything on the Diaspora Launchpad side?

MatAL nah not yet, there is an outdated deb for Precise to set up a dev environment, but it wont work without some love since the configuration of D* has changed since.

So the normal install instructions for now I’m afraid :slight_smile:

@praveenarimbrathodiyil and some other Debian packagers did a lot of work to package up Diaspora for Debian, perhaps there can be some reconcilation of packages that can be put in the Ubuntu PPA, considering that Ubuntu is a spinoff of Debian?

Hey folks. I found that I’ve got some extra spare time coming up, and I’d be interested in trying to figure out how to get the ball rolling on Ubuntu packaging. We’ve had a lot of wonderful work done by the Debian packaging folks, and in my mind, we have two options to go with for the PPA:

  1. Port all the Debian Diaspora packages to the Ubuntu PPA.

  2. Set up the Ubuntu PPA package to instead use RVM for gems.

I think we should discuss this a little, come to a decision, and find a way to get this going. There are more than a few members of the Ubuntu community that I’m sure would be more than happy to promote the PPA and the effort, and in turn help bring more attention, devs, and potential packagers to D*.

What’s everyone’s thoughts?

Or 3. Use bundler for dependency management. See my Archlinux package for an example.

By the way, we need more pods running the develop code and there are always users (like me :p) who want to have the most recent code possible, so I think having a package for running the develop branch but without installing the development stuff is a good idea, @jasonrobinson

Personally I would say RVM way - just to not have to care about Ruby dependencies or versions. But I would also be ready to take the Bundler way which Jonne likes.

What I would like would be two packages available;

  1. diaspora-dev … Meant for development, does not use packaged source but instead user uses own fork
  2. diaspora - production package which pulls also a third package, diaspora-src which is debian packaged Diaspora* source following master branch.

Whether all this is done via bundler or RVM is really just picking details. But a big no from me for porting all gems to Ubuntu - it’s too much work out of the scope of Diaspora*.

Basically, use cases;

Developers;
Install diaspora-dev with;
sudo apt-get install diaspora-dev

Then user puts their Diaspora fork username in for example .diasporarc config file and the dev environment is set up - no need for any configuration. This has mostly been done already once in the PPA.

Production env;
User installs diaspora package;
sudo apt-get install diaspora

All necessary stuff is pulled in, including MySQL/Postresql, Apache / nginx and what is needed. Configuration is done via a helper tool for podmins - or directly to Diaspora config files. The important thing is user does not need to know how to set up a pod - he/she just needs to know what domain is used, what is his admin email, basic configuration stuff.

We just need the basic packages done properly and then we can evolve.

@jasonrobinson what about a production pod but running the develop branch?

@flaburgan sure we should have that option too, but then it cannot use any source packaged in launchpad. It could install the diaspora-src package but maybe a configuration option or helper tool command could move the pod to develop branch using either the diaspora github repo OR persons own branch

Maybe it wouldn’t be a bad idea to have a diaspora-dev package for Diaspora pulled from the latest develop branch, and a separate diaspora package for those wanting to run a production instance of the latest stable Diaspora release?