capistrano-magento2 0.9.3 → 0.9.4

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
  SHA256:
3
- metadata.gz: eaad2347f8c69fd68747d7a8494e38558b1ae3cdd5d75e6a71d04ee1225ad2ef
4
- data.tar.gz: 764b2205316cbc49e6f13ea576eb0e54e93db5c719dcbc2df246219412052da1
3
+ metadata.gz: 3b6164feaca7194a6bd34c839c8a11f6faa3e05dee906b015307fe88c51c262b
4
+ data.tar.gz: 51dcbf3463797d5cfcd682560ec44434f418bd5d365fd2d2afc3b93724b637b9
5
5
  SHA512:
6
- metadata.gz: 4660f8b4ca18c8b2e01689521c21c474dc8e7e79f7771de843e8e5c3b48b91585b45d4166cf7f00e9d368bd7203a425e4a22ffb375fcde3086258d591a611867
7
- data.tar.gz: 9cf38dee19d05b07354542618b85e82fb1f09c96c80285c59e76b20a0a6bbf4b6866d55ba494404306b3766528b73902d6a4bd6189907f70797de676fb443cb8
6
+ metadata.gz: d25dbda35cbd711cd6d067f68deb40c6d2e1712483ada876f6b5b4703110c705246d7f96e01d4af8114ad322258225644e2fa13d4df5b6d076c7304d148a0707
7
+ data.tar.gz: b7a12464ce89a05041040bb87ecc2e89268f12bd1aebbc5444f3b366ed4b9ef16f6d26f7401917869375e15940b6b77fc41ee885d6c73e71f02880a3c8c4ccd6
@@ -1,5 +1,10 @@
1
1
  # Capistrano::Magento2 Change Log
2
2
 
3
+ 0.9.4
4
+ =========
5
+
6
+ * Updated to now set SELinux context on `var` directory with default type of `httpd_sys_rw_content_t` to allow application writes where SELinux is enabled.
7
+
3
8
  0.9.3
4
9
  =========
5
10
 
data/README.md CHANGED
@@ -136,6 +136,8 @@ Before you can use Capistrano to deploy, you must configure the `config/deploy.r
136
136
  | `:magento_deploy_chmod_d` | `'2770'` | Default permissions applied to all directories in the release path
137
137
  | `:magento_deploy_chmod_f` | `'0660'` | Default permissions applied to all non-executable files in the release path
138
138
  | `:magento_deploy_chmod_x` | `['bin/magento']` | Default list of files in release path to set executable bit on
139
+ | `:magento_deploy_chcon_dirs` | `['var']` | Default list of directories on which to recursively set an SELinux context type
140
+ | `:magento_deploy_chcon_type` | `httpd_sys_rw_content_t` | Default SELinux context type to set on directories which should be writeable by application
139
141
  | `:magento_deploy_strategy` | `nil` | Can be `quick`, `standard` or `compact`
140
142
 
141
143
  #### Example Usage
@@ -42,6 +42,10 @@ set :magento_deploy_chmod_d, fetch(:magento_deploy_chmod_d, '2770')
42
42
  set :magento_deploy_chmod_f, fetch(:magento_deploy_chmod_f, '0660')
43
43
  set :magento_deploy_chmod_x, fetch(:magento_deploy_chmod_x, ['bin/magento'])
44
44
 
45
+ # deploy selinux defaults
46
+ set :magento_deploy_chcon_dirs, fetch(:magento_deploy_chcon_dirs, ['var'])
47
+ set :magento_deploy_chcon_type, fetch(:magento_deploy_chcon_type, 'httpd_sys_rw_content_t')
48
+
45
49
  # deploy configuration defaults
46
50
  set :magento_deploy_composer, fetch(:magento_deploy_composer, true)
47
51
  set :magento_deploy_confirm, fetch(:magento_deploy_confirm, [])
@@ -9,6 +9,6 @@
9
9
 
10
10
  module Capistrano
11
11
  module Magento2
12
- VERSION = '0.9.3'
12
+ VERSION = '0.9.4'
13
13
  end
14
14
  end
@@ -50,6 +50,7 @@ namespace :deploy do
50
50
  invoke 'magento:deploy:verify'
51
51
  invoke 'magento:composer:install' if fetch(:magento_deploy_composer)
52
52
  invoke 'magento:setup:permissions'
53
+ invoke 'magento:setup:selinux'
53
54
 
54
55
  if fetch(:magento_deploy_production)
55
56
  invoke 'magento:setup:static-content:deploy'
@@ -298,6 +298,21 @@ namespace :magento do
298
298
  end
299
299
  end
300
300
 
301
+ desc 'Sets proper selinux context on directories which are written to by web processes'
302
+ task :selinux do
303
+ on release_roles :all do
304
+ with path: '/usr/sbin:$PATH' do
305
+ if test "selinuxenabled"
306
+ within release_path do
307
+ fetch(:magento_deploy_chcon_dirs).each() do |dir|
308
+ execute :chcon, "-RP -t #{fetch(:magento_deploy_chcon_type)} #{release_path}/#{dir}"
309
+ end
310
+ end
311
+ end
312
+ end
313
+ end
314
+ end
315
+
301
316
  namespace :di do
302
317
  desc 'Runs dependency injection compilation routine'
303
318
  task :compile do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-magento2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Alger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-15 00:00:00.000000000 Z
11
+ date: 2020-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano