Merge branch 'master' of github.com:diaspora/diaspora
This commit is contained in:
commit
bf42b5766c
7 changed files with 61 additions and 55 deletions
|
|
@ -2,9 +2,7 @@
|
|||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
||||
require File.join(Rails.root, 'lib/diaspora/user/friending')
|
||||
require File.join(Rails.root, 'lib/diaspora/user/querying')
|
||||
require File.join(Rails.root, 'lib/diaspora/user/receiving')
|
||||
require File.join(Rails.root, 'lib/diaspora/user')
|
||||
require File.join(Rails.root, 'lib/salmon/salmon')
|
||||
|
||||
class InvitedUserValidator < ActiveModel::Validator
|
||||
|
|
@ -20,9 +18,7 @@ end
|
|||
class User
|
||||
include MongoMapper::Document
|
||||
plugin MongoMapper::Devise
|
||||
include Diaspora::UserModules::Friending
|
||||
include Diaspora::UserModules::Querying
|
||||
include Diaspora::UserModules::Receiving
|
||||
include Diaspora::UserModules
|
||||
include Encryptor::Private
|
||||
QUEUE = MessageHandler.new
|
||||
|
||||
|
|
|
|||
11
lib/diaspora/user.rb
Normal file
11
lib/diaspora/user.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
require File.join(Rails.root, 'lib/diaspora/user/friending')
|
||||
require File.join(Rails.root, 'lib/diaspora/user/querying')
|
||||
require File.join(Rails.root, 'lib/diaspora/user/receiving')
|
||||
|
||||
module Diaspora
|
||||
module UserModules
|
||||
include Friending
|
||||
include Querying
|
||||
include Receiving
|
||||
end
|
||||
end
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
%global debug_package %{nil}
|
||||
%define git_release HEAD
|
||||
%define git_release 1010092232_b313272
|
||||
|
||||
Summary: A social network server
|
||||
Name: diaspora
|
||||
Version: 0.0.1
|
||||
Version: 0.0
|
||||
Release: 1.%{git_release}%{?dist}
|
||||
License: AGPLv3
|
||||
Group: Applications/Communications
|
||||
|
|
@ -19,7 +19,7 @@ BuildRoot: %{_rmpdir}/not-used-in-fedora/
|
|||
|
||||
Requires: mongodb-server
|
||||
Requires: ruby(abi) = 1.8
|
||||
Requires: diaspora-bundle = %{version}
|
||||
Requires: diaspora-bundle = 0.0-1.1010081636_d1a4ee0.fc13
|
||||
|
||||
|
||||
%description
|
||||
|
|
@ -34,10 +34,6 @@ find . -perm /u+x -type f -exec \
|
|||
|
||||
%build
|
||||
rm -rf master/vendor/bundle
|
||||
<<<<<<< HEAD
|
||||
mkdir master/tmp || :
|
||||
=======
|
||||
>>>>>>> upstream/master
|
||||
|
||||
%install
|
||||
rm -fr $RPM_BUILD_ROOT
|
||||
|
|
@ -59,14 +55,7 @@ cp %SOURCE3 $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/diaspora
|
|||
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/diaspora
|
||||
cp -ar master $RPM_BUILD_ROOT/%{_datadir}/diaspora
|
||||
<<<<<<< HEAD
|
||||
cp -ar master/.bundle $RPM_BUILD_ROOT/%{_datadir}/diaspora/master
|
||||
cp diaspora-setup $RPM_BUILD_ROOT/%{_datadir}/diaspora
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/diaspora/uploads
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/diaspora/tmp
|
||||
=======
|
||||
cp %SOURCE2 $RPM_BUILD_ROOT/%{_datadir}/diaspora
|
||||
>>>>>>> upstream/master
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/log/diaspora
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/diaspora/uploads
|
||||
|
|
@ -91,25 +80,8 @@ sed -i -e '\|.*/master/config.ru"$|d' \
|
|||
|
||||
|
||||
%post
|
||||
<<<<<<< HEAD
|
||||
rm -f %{_datadir}/diaspora/master/vendor/bundle
|
||||
rm -f %{_datadir}/diaspora/master/log
|
||||
rm -f %{_datadir}/diaspora/master/public/uploads
|
||||
rm -rf %{_datadir}/diaspora/master/tmp
|
||||
|
||||
ln -s %{_localstatedir}/log/diaspora \
|
||||
%{_datadir}/diaspora/master/log || :
|
||||
ln -s %{_libdir}/diaspora-bundle/master/vendor/bundle \
|
||||
%{_datadir}/diaspora/master/vendor || :
|
||||
ln -s %{_localstatedir}/lib/diaspora/uploads \
|
||||
%{_datadir}/diaspora/master/public/uploads || :
|
||||
ln -s %{_localstatedir}/lib/diaspora/tmp \
|
||||
%{_datadir}/diaspora/master/tmp || :
|
||||
/sbin/chkconfig --add diaspora-ws || :
|
||||
=======
|
||||
/sbin/chkconfig --add diaspora-wsd
|
||||
|
||||
>>>>>>> upstream/master
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
|
|
@ -124,27 +96,21 @@ rm -fr $RPM_BUILD_ROOT
|
|||
|
||||
%files -f files
|
||||
%defattr(-, root, root, 0755)
|
||||
<<<<<<< HEAD
|
||||
%doc README.md GNU-AGPL-3.0
|
||||
=======
|
||||
%doc AUTHORS README.md GNU-AGPL-3.0 COPYRIGHT README-Fedora.md
|
||||
>>>>>>> upstream/master
|
||||
%attr(-, diaspora, diaspora) %{_datadir}/diaspora/master/config.ru
|
||||
%attr(-, diaspora, diaspora) %{_datadir}/diaspora/master/config/environment.rb
|
||||
%attr(-, diaspora, diaspora) %{_localstatedir}/log/diaspora
|
||||
%attr(-, diaspora, diaspora) %{_localstatedir}/lib/diaspora/uploads
|
||||
%attr(-, diaspora, diaspora) %{_localstatedir}/lib/diaspora/tmp
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
%{_datadir}/diaspora/master/tmp
|
||||
%{_datadir}/diaspora/master/public/uploads
|
||||
%{_datadir}/diaspora/master/log
|
||||
>>>>>>> upstream/master
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/diaspora
|
||||
%{_sysconfdir}/init.d/diaspora-wsd
|
||||
|
||||
%changelog
|
||||
* Fri Sep 24 2010 Alec Leamas <leamas.alec@gmail.com> 0.0-1.1009280542_859ec2d
|
||||
* Fri Sep 24 2010 Alec Leamas <leamas.alec@gmail.com> 0.0-1.1010092232_b313272.fc13
|
||||
|
||||
- Initial attempt to create a spec fi+le
|
||||
|
||||
# rubygem-term-ansicolor in repo (1.0.5)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Bootstrap the distribution from git:
|
|||
cd diaspora/pkg/ubuntu
|
||||
|
||||
Install the dependencies (a good time for a coffe break)
|
||||
./diaspora-install-deps
|
||||
sudo ./diaspora-install-deps
|
||||
|
||||
Create and install the diaspora bundle and application:
|
||||
./make-dist.sh bundle
|
||||
|
|
@ -60,11 +60,19 @@ the stuff using git in this case.
|
|||
|
||||
The user diaspora is added during install.
|
||||
|
||||
Tools used for building package are installed globally. All of diasporas
|
||||
dependencies lives in the nothing is insalled by user or on system level.
|
||||
|
||||
make-dist.sh accepts arguments to get a specified commit and/or use another
|
||||
repo.
|
||||
|
||||
This has been tested on a Ubuntu 32-bit 10.10 , clean server. Since this
|
||||
is a very small dist, the dependencies should possibly be complete.
|
||||
This has been tested on a Ubuntu 32-bit 10.10 , clean server and on 10.04
|
||||
Lucid desktop, also clean installation.
|
||||
|
||||
mongodb is having problems occasionally. Sometimes the dependencies are not
|
||||
installed, and mongod refuses to start. invoke /usr/bin/mongod -f /etc/mongodb.conf
|
||||
fo test. The lockfile /var/lib/mongodb/mongod.conf is also a potential
|
||||
problem. Remove to make it start again.
|
||||
|
||||
The diaspora-wsd is just placeholder FTM, it does **not** work.
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ grep -v '^#' /etc/apt/sources.list | grep -q universe || {
|
|||
sudo apt-get update
|
||||
sudo apt-get install -qy --ignore-missing build-essential libxslt1-dev \
|
||||
libxml2 ruby-full mongodb rake python-software-properties git-core \
|
||||
imagemagick libmagick9-dev
|
||||
imagemagick libmagick9-dev xulrunner-1.9
|
||||
sudo add-apt-repository ppa:maco.m/ruby
|
||||
sudo apt-get update
|
||||
sudo apt-get install -qy rubygems
|
||||
|
|
|
|||
|
|
@ -14,7 +14,9 @@ test -n "$services" && {
|
|||
echo " $services"
|
||||
}
|
||||
|
||||
/usr/sbin/service mongodb start || :
|
||||
service mongodb stop || :
|
||||
rm -f /var/lib/mongodb/mongod.lock
|
||||
service mongodb start || :
|
||||
|
||||
cd /usr/share/diaspora/master
|
||||
|
||||
|
|
@ -26,11 +28,13 @@ if rake db:seed:dev; then
|
|||
else
|
||||
cat <<- EOF
|
||||
|
||||
Database config failed. You might want to remove all db files with
|
||||
'rm -rf /var/lib/mongodb/*' and/or resetting the config file by
|
||||
'cp config/app_config.yml.example config/app_config.yml' before
|
||||
making a new try. Also, make sure the mongodb server is running
|
||||
e. g., using '/sbin/service mongod status'.
|
||||
Database config failed. You might want to
|
||||
- Just remove the db lock file: rm /var/lib/mongodb/mongod.lock
|
||||
- Remove all db files: rm -rf /var/lib/mongodb/*
|
||||
- Reset the config file by
|
||||
cp config/app_config.yml.example config/app_config.yml
|
||||
Also, make sure the mongodb server is running e. g., using
|
||||
'service mongod status'.
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,4 +1,25 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Start diaspora websocket and main services
|
||||
#
|
||||
|
||||
# Is someone listening on the port already? (ipv4 only test ?)
|
||||
PORT=3000
|
||||
while getopts ":p:" OPTION
|
||||
do
|
||||
if OPTION='p'
|
||||
then
|
||||
PORT=$OPTARG
|
||||
fi
|
||||
done
|
||||
|
||||
services=$( netstat -nl | grep '[^:]:'$PORT'[ \t]')
|
||||
test -n "$services" && {
|
||||
echo "Warning: something is already using port "$PORT
|
||||
echo " $services"
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
# Check if Mongo is running
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue