rubber 2.11.0 → 2.12.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cb719c42daba4da22b9c9566bb445e3077b198b0
4
- data.tar.gz: 7fb644c6a3d571ee6019ac55fc2afae3aa0766f0
3
+ metadata.gz: e0c241edcf70cad1688c5546d8aa21d2afa70c11
4
+ data.tar.gz: aacfc3fdd0c3d1611f26dc338fecb1c80549ef3d
5
5
  SHA512:
6
- metadata.gz: bfcc3023241d63d494a98f1e441fc048e98800db6c2c390ee8c700c2572d551167a72de4e9e138dbbff121e0deaf6a164ac0c464a8900bfe5bd8d714c6bc6bdf
7
- data.tar.gz: e753355f2ea865547888732ccc864e0480a294a9f4094c126f768b4dcf17e0ece7f0350ce18bba47f735192ce370f452db2be938c5d5d2c6c7410075af244983
6
+ metadata.gz: 9c9ec2602ebe633357cbadce74ebf93466bc53bb3bf0574bc551ea73fd9b90a501bcfe684a4fa20d23d1d99fc89ac8775cb28b76aa20ddb9243549242149085e
7
+ data.tar.gz: 885ea154a928f2438c8ed5b2ea86e85a80b24286f36097670cb9205822f259fc934dcc73267321e53a9f473f809997158394944c65d7a37348c4bea9d129edd8
data/CHANGELOG CHANGED
@@ -1,3 +1,21 @@
1
+ 2.12.0 (08/19/2014)
2
+
3
+ New Features:
4
+ ============
5
+
6
+ [base] Added a task for cleaning up old kernels. <653bd0c>
7
+
8
+ Improvements:
9
+ ============
10
+
11
+ [core] Implemented a check that will only repeat 'apt-get update' calls if there's a change to the sources list. <adafdc0>
12
+
13
+ Bug Fixes:
14
+ =========
15
+
16
+ [passenger_nginx] Fixed a typo in the template preventing vulcanization. <cdc3ad8>
17
+
18
+
1
19
  2.11.0 (08/07/2014)
2
20
 
3
21
  New Features:
@@ -364,7 +382,7 @@ Bug Fixes:
364
382
 
365
383
  [core] Fixed a problem with tasks using the `:only` option being overwritten by rubber internally (#397) <d3ae2fa>
366
384
  [core] Don't install fog 1.16.0 until we're able to sort out API compatiblities with it <346c99b>
367
- [core] Presen the $REBOOT value across multiple calls to `maybe_reboot` <f03dc22>
385
+ [core] Present the $REBOOT value across multiple calls to `maybe_reboot` <f03dc22>
368
386
  [web_tools] Proxied service hostnames should not have underscores since that would be an invalid hostname <055919f>
369
387
 
370
388
 
@@ -445,7 +445,7 @@ namespace :rubber do
445
445
  sudo_script 'install_core_packages', <<-ENDSCRIPT
446
446
  export DEBIAN_FRONTEND=noninteractive
447
447
 
448
- apt-get -q update
448
+ #{apt_get_update_script}
449
449
 
450
450
  #{install_commands.join("\n")}
451
451
  ENDSCRIPT
@@ -598,6 +598,7 @@ namespace :rubber do
598
598
  end
599
599
  end
600
600
 
601
+
601
602
  def destroy_dyndns(instance_item)
602
603
  env = rubber_cfg.environment.bind(instance_item.role_names, instance_item.name)
603
604
  if env.dns_provider
@@ -630,15 +631,34 @@ namespace :rubber do
630
631
  expanded_pkg_list.join(' ')
631
632
  end
632
633
 
633
- rsudo "apt-get -q update"
634
634
  if upgrade
635
635
  if ENV['NO_DIST_UPGRADE']
636
- rsudo "export DEBIAN_FRONTEND=noninteractive; apt-get -q -o Dpkg::Options::=--force-confold -y --force-yes upgrade"
636
+ sudo_script 'upgrade_packages', <<-ENDSCRIPT
637
+ export DEBIAN_FRONTEND=noninteractive
638
+
639
+ #{apt_get_update_script}
640
+
641
+ apt-get -q -o Dpkg::Options::=--force-confold -y --force-yes upgrade
642
+ ENDSCRIPT
637
643
  else
638
- rsudo "export DEBIAN_FRONTEND=noninteractive; apt-get -q -o Dpkg::Options::=--force-confold -y --force-yes dist-upgrade"
644
+ sudo_script 'dist_upgrade_packages', <<-ENDSCRIPT
645
+ export DEBIAN_FRONTEND=noninteractive
646
+
647
+ #{apt_get_update_script}
648
+
649
+ apt-get -q -o Dpkg::Options::=--force-confold -y --force-yes dist-upgrade
650
+ ENDSCRIPT
639
651
  end
640
652
  else
641
- rsudo "export DEBIAN_FRONTEND=noninteractive; apt-get -q -o Dpkg::Options::=--force-confold -y --force-yes install $CAPISTRANO:VAR$", opts
653
+ install_packages_script = <<-ENDSCRIPT
654
+ export DEBIAN_FRONTEND=noninteractive
655
+
656
+ #{apt_get_update_script}
657
+
658
+ apt-get -q -o Dpkg::Options::=--force-confold -y --force-yes install $@
659
+ ENDSCRIPT
660
+
661
+ sudo_script 'install_packages', install_packages_script, opts.merge(:script_args => '$CAPISTRANO:VAR$')
642
662
  end
643
663
 
644
664
  maybe_reboot
@@ -812,4 +832,25 @@ namespace :rubber do
812
832
  end
813
833
  end
814
834
 
835
+ # Helper script that only issues an apt-get update command if the apt sources list has changed.
836
+ def apt_get_update_script
837
+ <<-ENDSCRIPT
838
+ if [[ ! -f /tmp/apt_sources.md5 ]]; then
839
+ apt-get -q update
840
+
841
+ md5sum /etc/apt/sources.list > /tmp/apt_sources.md5
842
+ md5sum /etc/apt/sources.list.d/*.list >> /tmp/apt_sources.md5
843
+ else
844
+ md5sum /etc/apt/sources.list > /tmp/apt_sources_compare.md5
845
+ md5sum /etc/apt/sources.list.d/*.list >> /tmp/apt_sources_compare.md5
846
+
847
+ if [[ `diff /tmp/apt_sources.md5 /tmp/apt_sources_compare.md5` ]]; then
848
+ apt-get -q update
849
+ fi
850
+
851
+ mv /tmp/apt_sources_compare.md5 /tmp/apt_sources.md5
852
+ fi
853
+ ENDSCRIPT
854
+ end
855
+
815
856
  end
@@ -1,3 +1,3 @@
1
1
  module Rubber
2
- VERSION = '2.11.0'.freeze
2
+ VERSION = '2.12.0'.freeze
3
3
  end
@@ -104,5 +104,11 @@ namespace :rubber do
104
104
  task :reinstall_virtualbox_additions, :only => { :provider => 'vagrant' } do
105
105
  rsudo "service vboxadd setup"
106
106
  end
107
+
108
+ task :cleanup_old_kernels do
109
+ rubber.sudo_script 'cleanup_old_kernels', <<-ENDSCRIPT
110
+ dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\\(.*\\)-\\([^0-9]\\+\\)/\\1/")"'/d;s/^[^ ]* [^ ]* \\([^ ]*\\).*/\\1/;/[0-9]/!d' | xargs dpkg --purge
111
+ ENDSCRIPT
112
+ end
107
113
  end
108
114
  end
@@ -14,4 +14,4 @@ use_ssl_key: false
14
14
 
15
15
  roles:
16
16
  passenger_nginx:
17
- packages: [libcurl4-openssl-dev, libpcre3-dev, nginx-extras, [passenger, "#{passenger_version}"]
17
+ packages: [libcurl4-openssl-dev, libpcre3-dev, nginx-extras, [passenger, "#{passenger_version}"]]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubber
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.0
4
+ version: 2.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Conway
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-08-07 00:00:00.000000000 Z
12
+ date: 2014-08-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement