]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/dev/recipes/default.rb
Improve filesystem sandboxing for some services
[chef.git] / cookbooks / dev / recipes / default.rb
index 236564b702a2f8ad13c43aaaf2a35f4f103ebbf8..db2057372489085c7d582d39e9c5e698bab1cc9b 100644 (file)
@@ -72,6 +72,7 @@ package %w[
   python3-pyproj
   python3-gdal
   gdal-bin
+  proj-bin
   g++
   gcc
   make
@@ -125,8 +126,15 @@ package %w[
   whois
   redis
   r-base
+  pandoc
 ]
 
+# Add uk_os_OSTN15_NTv2_OSGBtoETRS.tif used for reprojecting OS data
+execute "uk_os_OSTN15_NTv2_OSGBtoETRS.tif" do
+  command "projsync --file uk_os_OSTN15_NTv2_OSGBtoETRS.tif --system-directory"
+  not_if { ::File.exist?("/usr/share/proj/uk_os_OSTN15_NTv2_OSGBtoETRS.tif") }
+end
+
 nodejs_package "svgo"
 
 python_package "geojson" do
@@ -284,8 +292,9 @@ if node[:postgresql][:clusters][:"14/main"]
     nice 10
     private_tmp true
     private_devices true
-    protect_system "full"
+    protect_system "strict"
     protect_home true
+    read_write_directories "/srv/%i.apis.dev.openstreetmap.org/logs"
     no_new_privileges true
   end
 
@@ -298,8 +307,9 @@ if node[:postgresql][:clusters][:"14/main"]
     exec_reload "/bin/kill -HUP $MAINPID"
     private_tmp true
     private_devices true
-    protect_system "full"
+    protect_system "strict"
     protect_home true
+    read_write_directories ["/srv/%i.apis.dev.openstreetmap.org/logs", "/srv/%i.apis.dev.openstreetmap.org/rails/tmp"]
     no_new_privileges true
     restart "on-failure"
   end