BryanDavis has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/400198 )
Change subject: vagrant: Add plugin to set host file permissions ...................................................................... vagrant: Add plugin to set host file permissions Git does not have a means to version permissions on files other than the execute bit. The MediaWikiVagrant.FilePerms provisioner plugin lets us add manipulation of local file system permissions to a `vagrant {provision, up}` run. The initial use of this feature is making the cache/apt/partial directory world writable so that Stretch's _apt user can write downloaded files there. Bug: T183150 Change-Id: I8d0c7ed9f1d055fb5dbcebfb62cf72eac722f7e1 --- M Vagrantfile M lib/mediawiki-vagrant.rb A lib/mediawiki-vagrant/file_perms.rb 3 files changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/98/400198/1 diff --git a/Vagrantfile b/Vagrantfile index b26a372..76881d4 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -214,6 +214,8 @@ config.vm.provision :mediawiki_reload if mwv.reload? + config.vm.provision :file_perms + # Ensure that the VM has Puppet installed config.vm.provision :shell, path: 'support/puppet-bootstrap.sh' diff --git a/lib/mediawiki-vagrant.rb b/lib/mediawiki-vagrant.rb index 0efaf69..ae1ebf2 100644 --- a/lib/mediawiki-vagrant.rb +++ b/lib/mediawiki-vagrant.rb @@ -109,5 +109,10 @@ LsbCheck::Provisioner end + provisioner :file_perms do + require 'mediawiki-vagrant/file_perms' + FilePerms + end + end end diff --git a/lib/mediawiki-vagrant/file_perms.rb b/lib/mediawiki-vagrant/file_perms.rb new file mode 100644 index 0000000..5a1c4c4 --- /dev/null +++ b/lib/mediawiki-vagrant/file_perms.rb @@ -0,0 +1,14 @@ +require 'fileutils' + +require 'mediawiki-vagrant/plugin_environment' + +module MediaWikiVagrant + class FilePerms < Vagrant.plugin('2', :provisioner) + include PluginEnvironment + + def configure(_root_config) + # T183150: Make cache/apt/partial world writable + FileUtils.chmod 'a=wrx', @mwv.path('cache/apt/partial') + end + end +end -- To view, visit https://gerrit.wikimedia.org/r/400198 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8d0c7ed9f1d055fb5dbcebfb62cf72eac722f7e1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: stretch-migration Gerrit-Owner: BryanDavis <bda...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits