diff --git a/debian/control b/debian/control index aec6cf0313..b61807f033 100644 --- a/debian/control +++ b/debian/control @@ -104,7 +104,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, # HAML ruby-hamlit (>= 2.8.8~), # Files attachments - ruby-carrierwave (>= 1.2.3~), + ruby-carrierwave (>= 1.3~), ruby-mini-magick, # for backups ruby-fog-aws (>= 2.0.1~), diff --git a/debian/patches/0470-relax-carrierwave.patch b/debian/patches/0470-relax-carrierwave.patch new file mode 100644 index 0000000000..0dc62d1dbd --- /dev/null +++ b/debian/patches/0470-relax-carrierwave.patch @@ -0,0 +1,46 @@ +--- a/Gemfile ++++ b/Gemfile +@@ -99,10 +99,7 @@ + # HAML + gem 'hamlit', '~> 2.8', '>= 2.8.8' + +-# Files attachments +-# Locked until https://github.com/carrierwaveuploader/carrierwave/pull/2332/files is merged. +-# config/initializers/carrierwave_patch.rb can be removed once that change is released. +-gem 'carrierwave', '= 1.2.3' ++gem 'carrierwave', '~> 1.3' + gem 'mini_magick' + + # for backups +--- a/config/initializers/carrierwave_patch.rb ++++ /dev/null +@@ -1,29 +0,0 @@ +-# This monkey patches CarrierWave 1.2.3 to make Google Cloud Storage work with +-# extra query parameters: +-# https://github.com/carrierwaveuploader/carrierwave/pull/2332/files +-module CarrierWave +- module Storage +- class Fog < Abstract +- class File +- def authenticated_url(options = {}) +- if %w(AWS Google Rackspace OpenStack).include?(@uploader.fog_credentials[:provider]) +- # avoid a get by using local references +- local_directory = connection.directories.new(key: @uploader.fog_directory) +- local_file = local_directory.files.new(key: path) +- expire_at = ::Fog::Time.now + @uploader.fog_authenticated_url_expiration +- case @uploader.fog_credentials[:provider] +- when 'AWS', 'Google' +- local_file.url(expire_at, options) +- when 'Rackspace' +- connection.get_object_https_url(@uploader.fog_directory, path, expire_at, options) +- when 'OpenStack' +- connection.get_object_https_url(@uploader.fog_directory, path, expire_at) +- else +- local_file.url(expire_at) +- end +- end +- end +- end +- end +- end +-end diff --git a/debian/patches/series b/debian/patches/series index ff902682c9..c42705f07b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -12,6 +12,7 @@ 0440-remove-puma.patch 0450-remove-bullet.patch 0460-relax-rspec-rails.patch +0470-relax-carrierwave.patch 0500-set-webpack-root.patch 0510-remove-dev-dependencies.patch 0520-add-system-lib-path-for-webpack.patch