Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Ensure all buildpack files have executable perms

Change-Id: Ia2707504dc3fe4eee3b50d3012936ac4ea20cdbb
  • Loading branch information...
commit 806bd6e08d235e2c8ac97f1a7fece281b60bacbd 1 parent 78d2dbe
authored
1  lib/vcap/staging/plugin/buildpack/plugin.rb
@@ -11,6 +11,7 @@ def stage_application
11 11
     Dir.chdir(destination_directory) do
12 12
       create_app_directories
13 13
       copy_source_files
  14
+      FileUtils.chmod_R(0744, app_dir)
14 15
       Bundler.with_clean_env do
15 16
         build_pack.compile
16 17
       end
11  spec/unit/buildpack_spec.rb
@@ -34,6 +34,17 @@
34 34
       end
35 35
     end
36 36
 
  37
+    it "ensures all files have executable permissions" do
  38
+      stage staging_env do |staged_dir|
  39
+        Dir.glob("#{staged_dir}/app/*").each do |file|
  40
+          expect(File.stat(file).mode.to_s(8)[3..5]).to eq("744") unless File.directory? file
  41
+        end
  42
+        start_script = File.join(staged_dir, 'startup')
  43
+        script_body = File.read(start_script)
  44
+        expect(script_body).to include('export FROM_BUILD_PACK="${FROM_BUILD_PACK:-yes}"')
  45
+      end
  46
+    end
  47
+
37 48
     it "stores everything in profile" do
38 49
       stage staging_env do |staged_dir|
39 50
         start_script = File.join(staged_dir, 'startup')
2  vendor/buildpacks/java
... ...
@@ -1 +1 @@
1  
-Subproject commit da521009f6f1b985e0709fae468fcf3cbab67b9d
  1
+Subproject commit da0d854b89c4251b93608146c445b7a5e814ca96

Git Notes

review

Code-Review+2: Jennifer Hickey <jhickey@vmware.com>
Verified+1: CI Master <cf-ci@rbcon.com>
Submitted-by: Jennifer Hickey <jhickey@vmware.com>
Submitted-at: Tue, 12 Feb 2013 23:48:36 +0000
Reviewed-on: http://reviews.cloudfoundry.org/13780
Project: vcap-staging
Branch: refs/heads/master

0 notes on commit 806bd6e

Please sign in to comment.
Something went wrong with that request. Please try again.