Commit 87905aaaa4b2da1c24cb0e98964c5f2f348f5ca5
Exists in
staging
and in
42 other branches
Merge branch 'asset-pipeline-on-debian'
With this Debian support is restaured. script/quick-start should just work, and I went all the way to test production deployments with packages and all that. Should be good enough.
Showing
7 changed files
with
56 additions
and
21 deletions
Show diff stats
Gemfile
| ... | ... | @@ -20,18 +20,17 @@ gem 'locale', '~> 2.0.5' |
| 20 | 20 | gem 'whenever', :require => false |
| 21 | 21 | gem 'eita-jrails', '>= 0.9.5', :require => 'jrails' |
| 22 | 22 | |
| 23 | -group :assets do | |
| 24 | - gem 'uglifier', '>= 1.0.3' | |
| 25 | - gem 'sass-rails' | |
| 26 | -end | |
| 23 | +# asset pipeline | |
| 24 | +gem 'uglifier', '>= 1.0.3' | |
| 25 | +gem 'sass-rails' | |
| 27 | 26 | |
| 28 | 27 | group :production do |
| 29 | 28 | gem 'dalli', '~> 2.7.0' |
| 30 | 29 | end |
| 31 | 30 | |
| 32 | 31 | group :test do |
| 33 | - gem 'rspec', '~> 2.10.0' | |
| 34 | - gem 'rspec-rails', '~> 2.10.1' | |
| 32 | + gem 'rspec', '~> 2.14.0' | |
| 33 | + gem 'rspec-rails', '~> 2.14.1' | |
| 35 | 34 | gem 'mocha', '~> 1.1.0', :require => false |
| 36 | 35 | end |
| 37 | 36 | ... | ... |
debian/changelog
debian/control
| ... | ... | @@ -14,8 +14,8 @@ Build-Depends: cucumber, |
| 14 | 14 | ruby-database-cleaner, |
| 15 | 15 | ruby-gettext, |
| 16 | 16 | ruby-mocha, |
| 17 | - ruby-rspec, | |
| 18 | - ruby-rspec-rails, | |
| 17 | + ruby-rspec (>= 2.14), | |
| 18 | + ruby-rspec-rails (>= 2.14), | |
| 19 | 19 | ruby-selenium-webdriver, |
| 20 | 20 | ruby-sqlite3, |
| 21 | 21 | ruby-tidy, |
| ... | ... | @@ -59,7 +59,9 @@ Depends: adduser, |
| 59 | 59 | ruby-redcloth, |
| 60 | 60 | ruby-rest-client, |
| 61 | 61 | ruby-rmagick, |
| 62 | + ruby-sass-rails, | |
| 62 | 63 | ruby-tzinfo (>= 1.1.0-2~), |
| 64 | + ruby-uglifier, | |
| 63 | 65 | ruby-whenever, |
| 64 | 66 | ruby-will-paginate (>= 2.3.12-1~), |
| 65 | 67 | tango-icon-theme, | ... | ... |
lib/noosfero/version.rb
script/install-dependencies/debian-wheezy.sh
| 1 | -binary_packages='deb http://download.noosfero.org/debian/wheezy-1.1 ./' | |
| 1 | +binary_packages='deb http://download.noosfero.org/debian/wheezy-1.2 ./' | |
| 2 | 2 | |
| 3 | 3 | source_packages=$(echo "$binary_packages" | sed -e 's/^deb/deb-src/') |
| 4 | 4 | |
| ... | ... | @@ -53,6 +53,13 @@ FPQAoNmiMgP6zGF9rgOEWMEiFEryayrz |
| 53 | 53 | EOF |
| 54 | 54 | fi |
| 55 | 55 | |
| 56 | +if grep -qrl wheezy /etc/apt/sources.list* && ! grep -qrl wheezy-backports /etc/apt/sources.list*; then | |
| 57 | + sudo tee /etc/apt/sources.list.d/backports.list <<EOF | |
| 58 | +deb http://httpredir.debian.org/debian wheezy-backports main | |
| 59 | +EOF | |
| 60 | +fi | |
| 61 | + | |
| 62 | + | |
| 56 | 63 | if test -f tmp/debian/Release.gpg; then |
| 57 | 64 | echo "deb file://$(pwd)/tmp/debian/ ./" | sudo tee /etc/apt/sources.list.d/local.list |
| 58 | 65 | sudo apt-key add tmp/debian/signing-key.asc |
| ... | ... | @@ -65,6 +72,9 @@ run sudo apt-get -qy dist-upgrade |
| 65 | 72 | |
| 66 | 73 | run sudo apt-get -y install dctrl-tools |
| 67 | 74 | |
| 75 | +# *sigh* need ruby-rspec from backports | |
| 76 | +run sudo apt-get -y install -t wheezy-backports ruby-rspec | |
| 77 | + | |
| 68 | 78 | # needed to run noosfero |
| 69 | 79 | packages=$(grep-dctrl -n -s Build-Depends,Depends,Recommends -S -X noosfero debian/control | sed -e '/^\s*#/d; s/([^)]*)//g; s/,\s*/\n/g' | grep -v 'memcached\|debconf\|dbconfig-common\|misc:Depends\|adduser\|mail-transport-agent') |
| 70 | 80 | run sudo apt-get -y install $packages | ... | ... |
util/debian-install/Vagrantfile
| ... | ... | @@ -13,9 +13,11 @@ else |
| 13 | 13 | local_debs = Dir.glob('*.deb') |
| 14 | 14 | debs.each do |f| |
| 15 | 15 | fn = File.basename(f) |
| 16 | - if local_debs.include?(fn) | |
| 17 | - local_debs.delete(fn) | |
| 18 | - else | |
| 16 | + | |
| 17 | + local_debs.delete(fn) | |
| 18 | + | |
| 19 | + if File.stat(f) != File.stat(fn) | |
| 20 | + FileUtils::Verbose.rm_f(fn) | |
| 19 | 21 | FileUtils::Verbose.ln f, '.' |
| 20 | 22 | end |
| 21 | 23 | end | ... | ... |
util/debian-install/install
| ... | ... | @@ -61,19 +61,35 @@ deb http://download.noosfero.org/debian/wheezy-test ./ |
| 61 | 61 | deb-src http://download.noosfero.org/debian/wheezy-test ./ |
| 62 | 62 | EOF |
| 63 | 63 | |
| 64 | +sed -e 's/wheezy/&-backports/' \ | |
| 65 | + /etc/apt/sources.list > /etc/apt/sources.list.d/backports.list | |
| 66 | + | |
| 64 | 67 | export DEBIAN_FRONTEND=noninteractive |
| 65 | 68 | |
| 69 | +# local debs | |
| 70 | +if [ -n "$(find /vagrant -name '*.deb')" ]; then | |
| 71 | + apt-get install -qy apt-utils bzip2 | |
| 72 | + ( | |
| 73 | + rm -rf /opt/noosfero | |
| 74 | + mkdir /opt/noosfero | |
| 75 | + cp /vagrant/*.deb /opt/noosfero | |
| 76 | + cd /opt/noosfero | |
| 77 | + apt-ftparchive packages . > Packages | |
| 78 | + cat Packages | gzip - > Packages.gz | |
| 79 | + cat Packages | bzip2 - > Packages.bz2 | |
| 80 | + apt-ftparchive release . > Release | |
| 81 | + echo 'deb [trusted=yes] file:///opt/noosfero ./' > /etc/apt/sources.list.d/local.list | |
| 82 | + ) | |
| 83 | +else | |
| 84 | + rm -f /etc/apt/sources.list.d/local.list | |
| 85 | +fi | |
| 86 | + | |
| 66 | 87 | apt-get update |
| 67 | 88 | apt-get dist-upgrade -qy |
| 68 | -apt-get install -qy postgresql ruby1.8 | |
| 89 | +apt-get install -qy postgresql | |
| 69 | 90 | |
| 70 | -if dpkg --unpack /vagrant/noosfero_*.deb /vagrant/noosfero-apache_*.deb; then | |
| 71 | - apt-cache policy noosfero | |
| 72 | - apt-get install -qyf | |
| 73 | -else | |
| 74 | - apt-cache policy noosfero | |
| 75 | - apt-get install -qy noosfero noosfero-apache | |
| 76 | -fi | |
| 91 | +apt-cache policy noosfero | |
| 92 | +apt-get install -qy noosfero noosfero-apache | |
| 77 | 93 | |
| 78 | 94 | a2dissite 000-default |
| 79 | 95 | service apache2 reload | ... | ... |