Packaging for Ubuntu via a PPA.
Launchpad team: 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.
Jason Robinson Sun 14 Oct 2012 12:36PM
(oh and 12.04 only atm, fixes for other versions appreciated)
Jason Robinson Tue 16 Oct 2012 8:23PM
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 :)
Jonne Haß Tue 16 Oct 2012 9:31PM
Maybe name it diaspora-dev then? If it is named diaspora people will try to run production setups from it.
Jason Robinson Wed 17 Oct 2012 6:11AM
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.
Jason Robinson Sat 5 Jan 2013 12:43PM
We got a new member to the Launchpad team, @mikezentz - welcome! Could use this opportunity to kick of things a bit again :)
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;
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).
A package that when installed allows easy configuration of a production instance of Diaspora*.
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?
Jason Robinson Sat 5 Jan 2013 12:46PM
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.
Mike Zentz Sat 5 Jan 2013 7:25PM
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.
matl Fri 15 Feb 2013 4:34PM
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?
Jason Robinson Fri 15 Feb 2013 7:52PM
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 :)
Sean Tilley Sun 17 Feb 2013 8:46PM
@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?
Sean Tilley Wed 1 May 2013 5:29PM
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:
Port all the Debian Diaspora packages to the Ubuntu PPA.
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?
Jonne Haß Wed 1 May 2013 9:03PM
Or 3. Use bundler for dependency management. See my Archlinux package for an example.
Flaburgan Thu 2 May 2013 8:36AM
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
Jason Robinson Thu 2 May 2013 10:18AM
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*.
Jason Robinson Thu 2 May 2013 10:28AM
Basically, use cases;
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.
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.
Flaburgan Thu 2 May 2013 12:02PM
@jasonrobinson what about a production pod but running the develop branch?
Jason Robinson Thu 2 May 2013 12:50PM
@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
Sean Tilley Thu 2 May 2013 4:30PM
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?
Jason Robinson Fri 3 May 2013 7:16AM
@seantilleycommunit I'm not sure there is a need to package Diaspora devel branch source code on Launchpad - it's way too fast moving to need packaging, why not just pull it from Github?
Master branch on the other hand is slower moving and packaging it would allow tying it to the Ubuntu Diaspora installer to make configuring easier for example.
Sean Tilley Fri 3 May 2013 4:33PM
Yeah, probably not. I was just curious as to whether packaging our bleeding edge would be useful for Ubuntu users. I mean, it's easy enough to set up a develop localhost environment. ;)
Jason Robinson Fri 3 May 2013 7:52PM
It's not as easy as doing "sudo apt-get install diaspora-dev" and starting development. That is how easy we need to make it :)
Sean Tilley Sun 5 May 2013 5:19AM
I definitely agree with you there. We need to make it really stupidly easy to set up a Diaspora pod, at least from the distribution's side of things.
Jason Robinson · Sun 14 Oct 2012 12:35PM
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.