Commit 4856846bfc9b1c20577ecab15ce08108e698c3fe
1 parent
ce362344
Exists in
master
and in
26 other branches
util/debian-install: revamp
- Always install with APT. When using local packages, create a local APT repository so that we always properly test dependency resolution. - Refresh local debs if the ones in pkg/ were updated - Use backports (needed for new dependencies)
Showing
2 changed files
with
29 additions
and
11 deletions
Show diff stats
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 | ... | ... |