dapp 0.7.35 → 0.7.36

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b6665d179aa8fd446c4a406ad4cae8665d490e83
4
- data.tar.gz: 12871613932b5a1460fce21bd6246ed235c472e6
3
+ metadata.gz: adca48a7c835ec4933a2b8bb3c1f16de64a5221a
4
+ data.tar.gz: 724dfed9ee30db37ea650ec775908cbe76753ca8
5
5
  SHA512:
6
- metadata.gz: 87333a0f027c07530a0c51a66c11f45c0aff51204e7cb3fd807916f58dd0818c5f4a80f902e56426e7eb3b0db56d214e96debc00a323d6aead4af3612b88a88f
7
- data.tar.gz: 8e2c64a0ad3df10aa11200f29dc875064d899bee2d29924ef9ce6a6e980c2f39ea7ce0ab9b10e82ebcc2b05373469ab1ba64a776ebb77521206299df3247653b
6
+ metadata.gz: f43599e74343261ed0dbb5f8664f3145d944b247bb04088247cab42ae3c4b1e96e647b4c0832ecd2ead546276a5e4baca5df2850252ea543c9f2ee52420cb740
7
+ data.tar.gz: fcd6dd54e7d1e3f4718dea2b22fa77b5e1408ddea2bb66c1cf1b20f2bf53a6fa5388a0dcd29ce9823ad88b0fcd12aea3ed1d4fe5e2e1e609d50074f86329fa0a
@@ -18,7 +18,7 @@ module Dapp
18
18
  group = artifact[:options][:group]
19
19
  to = artifact[:options][:to]
20
20
 
21
- command = safe_cp(cwd, artifact_dimg.container_tmp_path(artifact_name).to_s, Process.uid, Process.gid, include_paths, exclude_paths)
21
+ command = safe_cp(cwd, artifact_dimg.container_tmp_path(artifact_name).to_s, nil, nil, include_paths, exclude_paths)
22
22
  run_artifact_dimg(artifact_dimg, artifact_name, command)
23
23
 
24
24
  command = safe_cp(dimg.container_tmp_path('artifact', artifact_name).to_s, to, owner, group, include_paths, exclude_paths)
@@ -11,8 +11,12 @@ module Dapp
11
11
  make_path(project.local_cookbook_path, *path)
12
12
  end
13
13
 
14
+ def tmp_base_dir
15
+ File.expand_path(project.cli_options[:tmp_dir_prefix] || '/tmp')
16
+ end
17
+
14
18
  def tmp_path(*path)
15
- @tmp_path ||= Dir.mktmpdir('dapp-', project.cli_options[:tmp_dir_prefix] || '/tmp')
19
+ @tmp_path ||= Dir.mktmpdir('dapp-', tmp_base_dir)
16
20
  make_path(@tmp_path, *path).expand_path.tap { |p| p.parent.mkpath }
17
21
  end
18
22
 
data/lib/dapp/dimg.rb CHANGED
@@ -158,7 +158,18 @@ module Dapp
158
158
  end
159
159
 
160
160
  def cleanup_tmp
161
- FileUtils.rm_rf(tmp_path)
161
+ # В tmp-директории могли остаться файлы, владельцами которых мы не являемся.
162
+ # Такие файлы могут попасть туда при экспорте файлов артефакта.
163
+ # Чтобы от них избавиться — запускаем docker-контейнер под root-пользователем
164
+ # и удаляем примонтированную tmp-директорию.
165
+ cmd = "".tap do |cmd|
166
+ cmd << "docker run --rm"
167
+ cmd << " --volume #{tmp_base_dir}:#{tmp_base_dir}"
168
+ cmd << " ubuntu:16.04"
169
+ cmd << " rm -rf #{tmp_path}"
170
+ end
171
+ project.shellout! cmd
172
+
162
173
  artifacts.each(&:cleanup_tmp)
163
174
  end
164
175
 
data/lib/dapp/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # Version
2
2
  module Dapp
3
- VERSION = '0.7.35'.freeze
4
- BUILD_CACHE_VERSION = '6.4'
3
+ VERSION = '0.7.36'.freeze
4
+ BUILD_CACHE_VERSION = '6.5'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.35
4
+ version: 0.7.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Stolyarov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-26 00:00:00.000000000 Z
11
+ date: 2017-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-shellout