Commit 3d2238466423812a0e2050b29177f3d1f025f082
1 parent
d59ea6ae
Exists in
master
and in
29 other branches
utils/debian-install: make it easy to change source
Use case: upgrade tests, as documented in README.md
Showing
3 changed files
with
24 additions
and
4 deletions
Show diff stats
util/debian-install/README.md
... | ... | @@ -20,3 +20,16 @@ $ vagrant halt |
20 | 20 | $ vagrant destroy |
21 | 21 | $ rm -f *.deb |
22 | 22 | ``` |
23 | + | |
24 | +To test upgrades: | |
25 | + | |
26 | +``` | |
27 | +$ rm -f pkg/ | |
28 | +$ cd utils/debian-install/ | |
29 | +$ vagrant destroy | |
30 | +$ rm -f *.deb | |
31 | +$ REPOSITORY=wheezy vagrant up # install current stable version | |
32 | +$ cd ../../ | |
33 | +$ make noosfero:deb # build current packages | |
34 | +$ REPOSITORY=wheezy-next vagrant provision # upgrade | |
35 | +``` | ... | ... |
util/debian-install/Vagrantfile
... | ... | @@ -28,6 +28,6 @@ end |
28 | 28 | |
29 | 29 | Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| |
30 | 30 | config.vm.box = "debian-wheezy" |
31 | - config.vm.provision :shell, path: 'install' | |
31 | + config.vm.provision :shell, path: 'install', args: [ENV['REPOSITORY']].compact | |
32 | 32 | config.vm.provision :shell, path: 'test' |
33 | 33 | end | ... | ... |
util/debian-install/install
1 | 1 | #!/bin/sh |
2 | 2 | |
3 | +DISTRO=wheezy | |
4 | +REPOSITORY='wheezy-test' | |
5 | + | |
6 | +if [ -n "$1" ]; then | |
7 | + REPOSITORY="$1" | |
8 | +fi | |
9 | + | |
3 | 10 | set -e |
4 | 11 | sudo apt-get install -qy netcat-traditional shunit2 |
5 | 12 | |
... | ... | @@ -57,11 +64,11 @@ FPQAoNmiMgP6zGF9rgOEWMEiFEryayrz |
57 | 64 | EOF |
58 | 65 | |
59 | 66 | cat > /etc/apt/sources.list.d/noosfero.list <<EOF |
60 | -deb http://download.noosfero.org/debian/wheezy-test ./ | |
61 | -deb-src http://download.noosfero.org/debian/wheezy-test ./ | |
67 | +deb http://download.noosfero.org/debian/$REPOSITORY ./ | |
68 | +deb-src http://download.noosfero.org/debian/$REPOSITORY ./ | |
62 | 69 | EOF |
63 | 70 | |
64 | -sed -e 's/wheezy/&-backports/' \ | |
71 | +sed -e "s/$DISTRO/&-backports/" \ | |
65 | 72 | /etc/apt/sources.list > /etc/apt/sources.list.d/backports.list |
66 | 73 | |
67 | 74 | export DEBIAN_FRONTEND=noninteractive | ... | ... |