kameleon-builder 2.6.1 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
 - data/.bumpversion.cfg +1 -1
 - data/CHANGES +9 -0
 - data/contrib/kameleon_bashrc.sh +5 -5
 - data/lib/kameleon/cli.rb +4 -0
 - data/lib/kameleon/engine.rb +1 -0
 - data/lib/kameleon/persistent_cache.rb +19 -3
 - data/version.txt +1 -1
 - metadata +21 -29
 
    
        checksums.yaml
    ADDED
    
    | 
         @@ -0,0 +1,7 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            SHA1:
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 641d4aa0ae1153b3203739f7cea51334c764aca6
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: a97530956b36a105c8b20802e9fa2faab6f2b0bb
         
     | 
| 
      
 5 
     | 
    
         
            +
            SHA512:
         
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: a5f1c1175bcd1e1bf262da3341bca3287ab2ad05056217072a6ac4488bbc260951d3c748674727a88003131784aa3180207deba1ed3a81f6dbab582819405419
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 68bc3a162b4ea851a3446153f3709d53ead045eff5a6cc53aa3b46dfcaec5cba7c4e16ebab4322ada53bad946e69aa5f45dda17078e090cf953f9a0247d50068
         
     | 
    
        data/.bumpversion.cfg
    CHANGED
    
    
    
        data/CHANGES
    CHANGED
    
    | 
         @@ -1,6 +1,15 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            Kameleon CHANGELOG
         
     | 
| 
       2 
2 
     | 
    
         
             
            ==================
         
     | 
| 
       3 
3 
     | 
    
         | 
| 
      
 4 
     | 
    
         
            +
            Version 2.6.2
         
     | 
| 
      
 5 
     | 
    
         
            +
            -------------
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            Released on August 25th 2015
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            - Added ``cache_archive_compression`` option to choose compression tool
         
     | 
| 
      
 10 
     | 
    
         
            +
            - Tried using curl before wget
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
       4 
13 
     | 
    
         
             
            Version 2.6.1
         
     | 
| 
       5 
14 
     | 
    
         
             
            -------------
         
     | 
| 
       6 
15 
     | 
    
         | 
    
        data/contrib/kameleon_bashrc.sh
    CHANGED
    
    | 
         @@ -142,12 +142,12 @@ fi 
     | 
|
| 
       142 
142 
     | 
    
         | 
| 
       143 
143 
     | 
    
         
             
            function __download {
         
     | 
| 
       144 
144 
     | 
    
         
             
                echo "Downloading: $1..."
         
     | 
| 
       145 
     | 
    
         
            -
                if which  
     | 
| 
       146 
     | 
    
         
            -
                     
     | 
| 
      
 145 
     | 
    
         
            +
                if which curl >/dev/null; then
         
     | 
| 
      
 146 
     | 
    
         
            +
                    curl -# -L --retry 999 --retry-max-time 0 "$1" -o "$2" 2>&1
         
     | 
| 
       147 
147 
     | 
    
         
             
                else
         
     | 
| 
       148 
     | 
    
         
            -
                    echo " 
     | 
| 
       149 
     | 
    
         
            -
                    if which  
     | 
| 
       150 
     | 
    
         
            -
                         
     | 
| 
      
 148 
     | 
    
         
            +
                    echo "curl is missing, trying with wget..."
         
     | 
| 
      
 149 
     | 
    
         
            +
                    if which wget >/dev/null; then
         
     | 
| 
      
 150 
     | 
    
         
            +
                        wget --retry-connrefused --progress=bar:force "$1" -O "$2" 2>&1
         
     | 
| 
       151 
151 
     | 
    
         
             
                    else
         
     | 
| 
       152 
152 
     | 
    
         
             
                        echo "curl is missing, trying with python..."
         
     | 
| 
       153 
153 
     | 
    
         
             
                        if which python >/dev/null; then
         
     | 
    
        data/lib/kameleon/cli.rb
    CHANGED
    
    | 
         @@ -220,6 +220,10 @@ module Kameleon 
     | 
|
| 
       220 
220 
     | 
    
         
             
                method_option :from_cache, :type => :string ,
         
     | 
| 
       221 
221 
     | 
    
         
             
                              :default => nil,
         
     | 
| 
       222 
222 
     | 
    
         
             
                              :desc => "Uses a persistent cache tar file to build the image."
         
     | 
| 
      
 223 
     | 
    
         
            +
                method_option :cache_archive_compression, :type => :string ,
         
     | 
| 
      
 224 
     | 
    
         
            +
                              :enum => ["gzip", "xz", "bz2"],
         
     | 
| 
      
 225 
     | 
    
         
            +
                              :default => "gz",
         
     | 
| 
      
 226 
     | 
    
         
            +
                              :desc => "Uses a persistent cache tar file to build the image."
         
     | 
| 
       223 
227 
     | 
    
         
             
                method_option :proxy_path, :type => :string ,
         
     | 
| 
       224 
228 
     | 
    
         
             
                              :default => nil,
         
     | 
| 
       225 
229 
     | 
    
         
             
                              :desc => "Full path of the proxy binary to use for the persistent cache."
         
     | 
    
        data/lib/kameleon/engine.rb
    CHANGED
    
    | 
         @@ -43,6 +43,7 @@ module Kameleon 
     | 
|
| 
       43 
43 
     | 
    
         
             
                    # I'm passing the Pathname objects
         
     | 
| 
       44 
44 
     | 
    
         
             
                    @cache.recipe_files = @recipe.all_files
         
     | 
| 
       45 
45 
     | 
    
         
             
                    @cache.recipe_path = @recipe.path
         
     | 
| 
      
 46 
     | 
    
         
            +
                    @cache.archive_format = @options[:cache_archive_compression]
         
     | 
| 
       46 
47 
     | 
    
         | 
| 
       47 
48 
     | 
    
         
             
                    if @recipe.global["in_context"]["proxy_cache"].nil? then
         
     | 
| 
       48 
49 
     | 
    
         
             
                      raise BuildError, "Missing varible for in context 'proxy_cache' when using the option --cache"
         
     | 
| 
         @@ -20,6 +20,7 @@ module Kameleon 
     | 
|
| 
       20 
20 
     | 
    
         
             
                attr_accessor :name
         
     | 
| 
       21 
21 
     | 
    
         
             
                attr_accessor :recipe_files # FIXME have to check those.
         
     | 
| 
       22 
22 
     | 
    
         
             
                attr_accessor :recipe_path
         
     | 
| 
      
 23 
     | 
    
         
            +
                attr_accessor :archive_format
         
     | 
| 
       23 
24 
     | 
    
         | 
| 
       24 
25 
     | 
    
         
             
                def initialize()
         
     | 
| 
       25 
26 
     | 
    
         
             
                  ## we must configure Polipo to be execute for the in and out context
         
     | 
| 
         @@ -145,8 +146,20 @@ module Kameleon 
     | 
|
| 
       145 
146 
     | 
    
         
             
                end
         
     | 
| 
       146 
147 
     | 
    
         | 
| 
       147 
148 
     | 
    
         
             
                def pack()
         
     | 
| 
       148 
     | 
    
         
            -
                   
     | 
| 
       149 
     | 
    
         
            -
             
     | 
| 
      
 149 
     | 
    
         
            +
                  if @archive_format.eql? "gzip"
         
     | 
| 
      
 150 
     | 
    
         
            +
                    env = {"GZIP" => "-9"}
         
     | 
| 
      
 151 
     | 
    
         
            +
                    Kameleon.ui.info("Packing up the generated cache in #{@cwd}/#{@name}-cache.tar.gz")
         
     | 
| 
      
 152 
     | 
    
         
            +
                    execute("tar","-czvf #{@name}-cache.tar.gz -C #{@cache_dir} .", @cwd, env)
         
     | 
| 
      
 153 
     | 
    
         
            +
                  elsif @archive_format.eql? "bz2"
         
     | 
| 
      
 154 
     | 
    
         
            +
                    env = {"BZIP" => "-9"}
         
     | 
| 
      
 155 
     | 
    
         
            +
                    Kameleon.ui.info("Packing up the generated cache in #{@cwd}/#{@name}-cache.tar.bz2")
         
     | 
| 
      
 156 
     | 
    
         
            +
                    execute("tar","-cjvf #{@name}-cache.tar.bz2 -C #{@cache_dir} .", @cwd, env)
         
     | 
| 
      
 157 
     | 
    
         
            +
                  elsif @archive_format.eql? "xz"
         
     | 
| 
      
 158 
     | 
    
         
            +
                    env = {"XZ_OPT" => "-9"}
         
     | 
| 
      
 159 
     | 
    
         
            +
                    Kameleon.ui.info("Packing up the generated cache in #{@cwd}/#{@name}-cache.tar.xz")
         
     | 
| 
      
 160 
     | 
    
         
            +
                    execute("tar","-cJf #{@name}-cache.tar.xz -C #{@cache_dir} .", @cwd, env)
         
     | 
| 
      
 161 
     | 
    
         
            +
                  end
         
     | 
| 
      
 162 
     | 
    
         
            +
             
     | 
| 
       150 
163 
     | 
    
         
             
                end
         
     | 
| 
       151 
164 
     | 
    
         | 
| 
       152 
165 
     | 
    
         
             
                def unpack(cache_path)
         
     | 
| 
         @@ -253,10 +266,13 @@ module Kameleon 
     | 
|
| 
       253 
266 
     | 
    
         
             
                  return recipe_file
         
     | 
| 
       254 
267 
     | 
    
         
             
                end
         
     | 
| 
       255 
268 
     | 
    
         | 
| 
       256 
     | 
    
         
            -
                def execute(cmd,args,dir=nil)
         
     | 
| 
      
 269 
     | 
    
         
            +
                def execute(cmd,args, dir=nil, environment={})
         
     | 
| 
       257 
270 
     | 
    
         
             
                  command = [cmd ] + args.split(" ")
         
     | 
| 
       258 
271 
     | 
    
         
             
                  process = ChildProcess.build(*command)
         
     | 
| 
       259 
272 
     | 
    
         
             
                  process.cwd = dir unless dir.nil?
         
     | 
| 
      
 273 
     | 
    
         
            +
                  environment.each do |key, value|
         
     | 
| 
      
 274 
     | 
    
         
            +
                    process.environment[key] = value
         
     | 
| 
      
 275 
     | 
    
         
            +
                  end
         
     | 
| 
       260 
276 
     | 
    
         
             
                  process.start
         
     | 
| 
       261 
277 
     | 
    
         
             
                  process.wait
         
     | 
| 
       262 
278 
     | 
    
         
             
                end
         
     | 
    
        data/version.txt
    CHANGED
    
    | 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            2.6. 
     | 
| 
      
 1 
     | 
    
         
            +
            2.6.2
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,8 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: kameleon-builder
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 2.6. 
     | 
| 
       5 
     | 
    
         
            -
              prerelease: 
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.6.2
         
     | 
| 
       6 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       7 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       8 
7 
     | 
    
         
             
            - Salem Harrache
         
     | 
| 
         @@ -13,66 +12,60 @@ authors: 
     | 
|
| 
       13 
12 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       14 
13 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       15 
14 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       16 
     | 
    
         
            -
            date: 2015-08- 
     | 
| 
      
 15 
     | 
    
         
            +
            date: 2015-08-25 00:00:00.000000000 Z
         
     | 
| 
       17 
16 
     | 
    
         
             
            dependencies:
         
     | 
| 
       18 
17 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       19 
18 
     | 
    
         
             
              name: childprocess
         
     | 
| 
       20 
19 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       21 
     | 
    
         
            -
                none: false
         
     | 
| 
       22 
20 
     | 
    
         
             
                requirements:
         
     | 
| 
       23 
     | 
    
         
            -
                - - ~>
         
     | 
| 
      
 21 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       24 
22 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       25 
23 
     | 
    
         
             
                    version: 0.5.3
         
     | 
| 
       26 
     | 
    
         
            -
                - -  
     | 
| 
      
 24 
     | 
    
         
            +
                - - ">="
         
     | 
| 
       27 
25 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       28 
26 
     | 
    
         
             
                    version: 0.3.0
         
     | 
| 
       29 
27 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       30 
28 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       31 
29 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       32 
     | 
    
         
            -
                none: false
         
     | 
| 
       33 
30 
     | 
    
         
             
                requirements:
         
     | 
| 
       34 
     | 
    
         
            -
                - - ~>
         
     | 
| 
      
 31 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       35 
32 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       36 
33 
     | 
    
         
             
                    version: 0.5.3
         
     | 
| 
       37 
     | 
    
         
            -
                - -  
     | 
| 
      
 34 
     | 
    
         
            +
                - - ">="
         
     | 
| 
       38 
35 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       39 
36 
     | 
    
         
             
                    version: 0.3.0
         
     | 
| 
       40 
37 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       41 
38 
     | 
    
         
             
              name: thor
         
     | 
| 
       42 
39 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       43 
     | 
    
         
            -
                none: false
         
     | 
| 
       44 
40 
     | 
    
         
             
                requirements:
         
     | 
| 
       45 
     | 
    
         
            -
                - - ~>
         
     | 
| 
      
 41 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       46 
42 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       47 
43 
     | 
    
         
             
                    version: '0.19'
         
     | 
| 
       48 
     | 
    
         
            -
                - -  
     | 
| 
      
 44 
     | 
    
         
            +
                - - ">="
         
     | 
| 
       49 
45 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       50 
46 
     | 
    
         
             
                    version: 0.15.0
         
     | 
| 
       51 
47 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       52 
48 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       53 
49 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       54 
     | 
    
         
            -
                none: false
         
     | 
| 
       55 
50 
     | 
    
         
             
                requirements:
         
     | 
| 
       56 
     | 
    
         
            -
                - - ~>
         
     | 
| 
      
 51 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       57 
52 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       58 
53 
     | 
    
         
             
                    version: '0.19'
         
     | 
| 
       59 
     | 
    
         
            -
                - -  
     | 
| 
      
 54 
     | 
    
         
            +
                - - ">="
         
     | 
| 
       60 
55 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       61 
56 
     | 
    
         
             
                    version: 0.15.0
         
     | 
| 
       62 
57 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       63 
58 
     | 
    
         
             
              name: table_print
         
     | 
| 
       64 
59 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       65 
     | 
    
         
            -
                none: false
         
     | 
| 
       66 
60 
     | 
    
         
             
                requirements:
         
     | 
| 
       67 
     | 
    
         
            -
                - - ~>
         
     | 
| 
      
 61 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       68 
62 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       69 
63 
     | 
    
         
             
                    version: 1.5.2
         
     | 
| 
       70 
64 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       71 
65 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       72 
66 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       73 
     | 
    
         
            -
                none: false
         
     | 
| 
       74 
67 
     | 
    
         
             
                requirements:
         
     | 
| 
       75 
     | 
    
         
            -
                - - ~>
         
     | 
| 
      
 68 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       76 
69 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       77 
70 
     | 
    
         
             
                    version: 1.5.2
         
     | 
| 
       78 
71 
     | 
    
         
             
            description: The mindful appliance builder
         
     | 
| 
         @@ -87,10 +80,10 @@ executables: 
     | 
|
| 
       87 
80 
     | 
    
         
             
            extensions: []
         
     | 
| 
       88 
81 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
       89 
82 
     | 
    
         
             
            files:
         
     | 
| 
       90 
     | 
    
         
            -
            - .bumpversion.cfg
         
     | 
| 
       91 
     | 
    
         
            -
            - .editorconfig
         
     | 
| 
       92 
     | 
    
         
            -
            - .env
         
     | 
| 
       93 
     | 
    
         
            -
            - .gitignore
         
     | 
| 
      
 83 
     | 
    
         
            +
            - ".bumpversion.cfg"
         
     | 
| 
      
 84 
     | 
    
         
            +
            - ".editorconfig"
         
     | 
| 
      
 85 
     | 
    
         
            +
            - ".env"
         
     | 
| 
      
 86 
     | 
    
         
            +
            - ".gitignore"
         
     | 
| 
       94 
87 
     | 
    
         
             
            - AUTHORS
         
     | 
| 
       95 
88 
     | 
    
         
             
            - CHANGES
         
     | 
| 
       96 
89 
     | 
    
         
             
            - COPYING
         
     | 
| 
         @@ -170,28 +163,27 @@ files: 
     | 
|
| 
       170 
163 
     | 
    
         
             
            homepage: http://kameleon.imag.fr/
         
     | 
| 
       171 
164 
     | 
    
         
             
            licenses:
         
     | 
| 
       172 
165 
     | 
    
         
             
            - GPL-2
         
     | 
| 
      
 166 
     | 
    
         
            +
            metadata: {}
         
     | 
| 
       173 
167 
     | 
    
         
             
            post_install_message: 
         
     | 
| 
       174 
168 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       175 
169 
     | 
    
         
             
            require_paths:
         
     | 
| 
       176 
170 
     | 
    
         
             
            - lib
         
     | 
| 
       177 
171 
     | 
    
         
             
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
       178 
     | 
    
         
            -
              none: false
         
     | 
| 
       179 
172 
     | 
    
         
             
              requirements:
         
     | 
| 
       180 
     | 
    
         
            -
              - -  
     | 
| 
      
 173 
     | 
    
         
            +
              - - ">="
         
     | 
| 
       181 
174 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       182 
175 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       183 
176 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       184 
     | 
    
         
            -
              none: false
         
     | 
| 
       185 
177 
     | 
    
         
             
              requirements:
         
     | 
| 
       186 
     | 
    
         
            -
              - -  
     | 
| 
      
 178 
     | 
    
         
            +
              - - ">="
         
     | 
| 
       187 
179 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       188 
180 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       189 
181 
     | 
    
         
             
            requirements:
         
     | 
| 
       190 
182 
     | 
    
         
             
            - polipo 1.0.3, or greater
         
     | 
| 
       191 
183 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       192 
     | 
    
         
            -
            rubygems_version:  
     | 
| 
      
 184 
     | 
    
         
            +
            rubygems_version: 2.2.2
         
     | 
| 
       193 
185 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       194 
     | 
    
         
            -
            specification_version:  
     | 
| 
      
 186 
     | 
    
         
            +
            specification_version: 4
         
     | 
| 
       195 
187 
     | 
    
         
             
            summary: Kameleon is a tool to build virtual machines from scratch
         
     | 
| 
       196 
188 
     | 
    
         
             
            test_files:
         
     | 
| 
       197 
189 
     | 
    
         
             
            - tests/helper.rb
         
     |