Refresh patches

This commit is contained in:
Pirate Praveen 2018-11-08 20:39:57 +05:30
parent 31040b1715
commit ea6a49adbe
21 changed files with 97 additions and 238 deletions

View file

@ -9,7 +9,7 @@ gitlab Gemfile
gem_versions['activerecord_sane_schema_dumper'] = rails5? ? '1.0' : '0.2' gem_versions['activerecord_sane_schema_dumper'] = rails5? ? '1.0' : '0.2'
-gem_versions['default_value_for'] = rails5? ? '~> 3.0.5' : '~> 3.0.0' -gem_versions['default_value_for'] = rails5? ? '~> 3.0.5' : '~> 3.0.0'
+gem_versions['default_value_for'] = rails5? ? '~> 3.0.5' : '~> 3.0' +gem_versions['default_value_for'] = rails5? ? '~> 3.0.5' : '~> 3.0'
gem_versions['rails'] = rails5? ? '5.0.6' : '4.2.10' gem_versions['rails'] = rails5? ? '5.0.7' : '4.2.10'
gem_versions['rails-i18n'] = rails5? ? '~> 5.1' : '~> 4.0.9' gem_versions['rails-i18n'] = rails5? ? '~> 5.1' : '~> 4.0.9'
# --- The end of special code for migrating to Rails 5.0 --- # --- The end of special code for migrating to Rails 5.0 ---
@@ -13,12 +13,12 @@ @@ -13,12 +13,12 @@
@ -27,18 +27,9 @@ gitlab Gemfile
# Default values for AR models # Default values for AR models
gem 'default_value_for', gem_versions['default_value_for'] gem 'default_value_for', gem_versions['default_value_for']
@@ -28,7 +28,7 @@
gem 'pg', '~> 0.18.2', group: :postgres
gem 'rugged', '~> 0.27'
-gem 'grape-route-helpers', '~> 2.1.0'
+gem 'grape-route-helpers', '~> 2.1'
gem 'faraday', '~> 0.12'
@@ -37,35 +37,35 @@ @@ -37,35 +37,35 @@
gem 'doorkeeper', '~> 4.3' gem 'doorkeeper', '~> 4.3'
gem 'doorkeeper-openid_connect', '~> 1.3' gem 'doorkeeper-openid_connect', '~> 1.5'
gem 'omniauth', '~> 1.8' gem 'omniauth', '~> 1.8'
-gem 'omniauth-auth0', '~> 2.0.0' -gem 'omniauth-auth0', '~> 2.0.0'
+gem 'omniauth-auth0', '~> 2.0' +gem 'omniauth-auth0', '~> 2.0'
@ -54,12 +45,12 @@ gitlab Gemfile
gem 'omniauth-kerberos', '~> 0.3.0', group: :kerberos gem 'omniauth-kerberos', '~> 0.3.0', group: :kerberos
gem 'omniauth-oauth2-generic', '~> 0.2.2' gem 'omniauth-oauth2-generic', '~> 0.2.2'
gem 'omniauth-saml', '~> 1.10' gem 'omniauth-saml', '~> 1.10'
-gem 'omniauth-shibboleth', '~> 1.2.0' -gem 'omniauth-shibboleth', '~> 1.3.0'
+gem 'omniauth-shibboleth', '~> 1.2' +gem 'omniauth-shibboleth', '~> 1.3'
gem 'omniauth-twitter', '~> 1.4' gem 'omniauth-twitter', '~> 1.4'
-gem 'omniauth_crowd', '~> 2.2.0' -gem 'omniauth_crowd', '~> 2.2.0'
+gem 'omniauth_crowd', '~> 2.2' +gem 'omniauth_crowd', '~> 2.2'
gem 'omniauth-authentiq', '~> 0.3.1' gem 'omniauth-authentiq', '~> 0.3.3'
-gem 'rack-oauth2', '~> 1.2.1' -gem 'rack-oauth2', '~> 1.2.1'
-gem 'jwt', '~> 1.5.6' -gem 'jwt', '~> 1.5.6'
+gem 'rack-oauth2', '~> 1.2', '>= 1.2.1' +gem 'rack-oauth2', '~> 1.2', '>= 1.2.1'
@ -83,7 +74,7 @@ gitlab Gemfile
# Browser detection # Browser detection
gem 'browser', '~> 2.2' gem 'browser', '~> 2.2'
@@ -86,12 +86,12 @@ @@ -86,15 +86,15 @@
gem 'gitlab-gollum-rugged_adapter', '~> 0.4.4', require: false gem 'gitlab-gollum-rugged_adapter', '~> 0.4.4', require: false
# Language detection # Language detection
@ -96,9 +87,13 @@ gitlab Gemfile
-gem 'rack-cors', '~> 1.0.0', require: 'rack/cors' -gem 'rack-cors', '~> 1.0.0', require: 'rack/cors'
+gem 'rack-cors', '~> 1.0', require: 'rack/cors' +gem 'rack-cors', '~> 1.0', require: 'rack/cors'
# GraphQL API
-gem 'graphql', '~> 1.8.0'
+gem 'graphql', '~> 1.8'
gem 'graphiql-rails', '~> 1.4.10'
# Disable strong_params so that Mash does not respond to :permitted? # Disable strong_params so that Mash does not respond to :permitted?
gem 'hashie-forbidden_attributes' @@ -104,7 +104,7 @@
@@ -100,7 +100,7 @@
gem 'kaminari', '~> 1.0' gem 'kaminari', '~> 1.0'
# HAML # HAML
@ -107,7 +102,7 @@ gitlab Gemfile
# Files attachments # Files attachments
gem 'carrierwave', '~> 1.2' gem 'carrierwave', '~> 1.2'
@@ -109,9 +109,9 @@ @@ -114,9 +114,9 @@
gem 'dropzonejs-rails', '~> 0.7.1' gem 'dropzonejs-rails', '~> 0.7.1'
# for backups # for backups
@ -119,7 +114,7 @@ gitlab Gemfile
gem 'fog-local', '~> 0.3' gem 'fog-local', '~> 0.3'
gem 'fog-openstack', '~> 0.1' gem 'fog-openstack', '~> 0.1'
gem 'fog-rackspace', '~> 0.1.1' gem 'fog-rackspace', '~> 0.1.1'
@@ -124,32 +124,32 @@ @@ -129,35 +129,35 @@
gem 'unf', '~> 0.1.4' gem 'unf', '~> 0.1.4'
# Seed data # Seed data
@ -127,23 +122,23 @@ gitlab Gemfile
+gem 'seed-fu', '~> 2.3', '>= 2.3.7' +gem 'seed-fu', '~> 2.3', '>= 2.3.7'
# Markdown and HTML processing # Markdown and HTML processing
-gem 'html-pipeline', '~> 2.7.1' gem 'html-pipeline', '~> 2.8'
-gem 'deckar01-task_list', '2.0.0' -gem 'deckar01-task_list', '2.0.0'
-gem 'gitlab-markup', '~> 1.6.2' -gem 'gitlab-markup', '~> 1.6.4'
+gem 'html-pipeline', '~> 2.7', '>= 2.7.1'
+gem 'deckar01-task_list', '2.0' +gem 'deckar01-task_list', '2.0'
+gem 'gitlab-markup', '~> 1.6', '>= 1.6.2' +gem 'gitlab-markup', '~> 1.6', '>= 1.6.4'
gem 'redcarpet', '~> 3.4' gem 'redcarpet', '~> 3.4'
gem 'commonmarker', '~> 0.17' gem 'commonmarker', '~> 0.17'
-gem 'RedCloth', '~> 4.3.2' -gem 'RedCloth', '~> 4.3.2'
+gem 'RedCloth', '~> 4.3', '>= 4.3.2' +gem 'RedCloth', '~> 4.3', '>= 4.3.2'
gem 'rdoc', '~> 4.2' gem 'rdoc', '~> 6.0'
gem 'org-ruby', '~> 0.9.12' gem 'org-ruby', '~> 0.9.12'
gem 'creole', '~> 0.5.0' gem 'creole', '~> 0.5.0'
gem 'wikicloth', '0.8.1' gem 'wikicloth', '0.8.1'
-gem 'asciidoctor', '~> 1.5.6' -gem 'asciidoctor', '~> 1.5.6'
-gem 'asciidoctor-plantuml', '0.0.8'
+gem 'asciidoctor', '~> 1.5', '>= 1.5.6' +gem 'asciidoctor', '~> 1.5', '>= 1.5.6'
gem 'asciidoctor-plantuml', '0.0.8' +gem 'asciidoctor-plantuml', '~> 0.0.8'
gem 'rouge', '~> 3.1' gem 'rouge', '~> 3.1'
gem 'truncato', '~> 0.7.9' gem 'truncato', '~> 0.7.9'
-gem 'bootstrap_form', '~> 2.7.0' -gem 'bootstrap_form', '~> 2.7.0'
@ -151,6 +146,9 @@ gitlab Gemfile
+gem 'bootstrap_form', '~> 2.7' +gem 'bootstrap_form', '~> 2.7'
+gem 'nokogiri', '~> 1.8', '>= 1.8.2' +gem 'nokogiri', '~> 1.8', '>= 1.8.2'
# Calendar rendering
gem 'icalendar'
# Diffs # Diffs
-gem 'diffy', '~> 3.1.0' -gem 'diffy', '~> 3.1.0'
+gem 'diffy', '~> 3.1' +gem 'diffy', '~> 3.1'
@ -162,17 +160,17 @@ gitlab Gemfile
gem 'unicorn-worker-killer', '~> 0.4.4' gem 'unicorn-worker-killer', '~> 0.4.4'
end end
@@ -162,7 +162,7 @@ @@ -170,7 +170,7 @@
# Background jobs # Background jobs
gem 'sidekiq', '~> 5.0' gem 'sidekiq', '~> 5.1'
gem 'sidekiq-cron', '~> 0.6.0' gem 'sidekiq-cron', '~> 0.6.0'
-gem 'redis-namespace', '~> 1.5.2' -gem 'redis-namespace', '~> 1.6.0'
+gem 'redis-namespace', '~> 1.5', '>= 1.5.2' +gem 'redis-namespace', '~> 1.6'
gem 'sidekiq-limit_fetch', '~> 3.4', require: false gem 'sidekiq-limit_fetch', '~> 3.4', require: false
# Cron Parser # Cron Parser
@@ -175,39 +175,39 @@ @@ -186,39 +186,39 @@
gem 'rainbow', '~> 2.2' gem 'ruby-progressbar'
# GitLab settings # GitLab settings
-gem 'settingslogic', '~> 2.0.9' -gem 'settingslogic', '~> 2.0.9'
@ -218,22 +216,21 @@ gitlab Gemfile
# Asana integration # Asana integration
gem 'asana', '~> 0.6.0' gem 'asana', '~> 0.6.0'
@@ -219,11 +219,11 @@ @@ -227,11 +227,11 @@
gem 'kubeclient', '~> 3.0' gem 'ruby-fogbugz', '~> 0.2.1'
# d3 # Kubernetes integration
-gem 'd3_rails', '~> 3.5.0' -gem 'kubeclient', '~> 3.1.0'
+gem 'd3_rails', '~> 3.5' +gem 'kubeclient', '~> 3.1'
# Sanitize user input # Sanitize user input
-gem 'sanitize', '~> 4.6.5' gem 'sanitize', '~> 4.6.5'
-gem 'babosa', '~> 1.0.2' -gem 'babosa', '~> 1.0.2'
+gem 'sanitize', '~> 4.6', '>= 4.6.5'
+gem 'babosa', '~> 1.0', '>= 1.0.2' +gem 'babosa', '~> 1.0', '>= 1.0.2'
# Sanitizes SVG input # Sanitizes SVG input
gem 'loofah', '~> 2.2' gem 'loofah', '~> 2.2'
@@ -232,13 +232,13 @@ @@ -240,13 +240,13 @@
gem 'licensee', '~> 8.9' gem 'licensee', '~> 8.9'
# Protect against bruteforcing # Protect against bruteforcing
@ -250,7 +247,7 @@ gitlab Gemfile
# Detect and convert string character encoding # Detect and convert string character encoding
gem 'charlock_holmes', '~> 0.7.5' gem 'charlock_holmes', '~> 0.7.5'
@@ -253,42 +253,42 @@ @@ -261,41 +261,41 @@
gem 'webpack-rails', '~> 0.9.10' gem 'webpack-rails', '~> 0.9.10'
gem 'rack-proxy', '~> 0.6.0' gem 'rack-proxy', '~> 0.6.0'
@ -260,14 +257,11 @@ gitlab Gemfile
+gem 'uglifier', '~> 2.7', '>= 2.7.2' +gem 'uglifier', '~> 2.7', '>= 2.7.2'
-gem 'addressable', '~> 2.5.2' -gem 'addressable', '~> 2.5.2'
-gem 'bootstrap-sass', '~> 3.3.0'
+gem 'addressable', '~> 2.5', '>= 2.5.2' +gem 'addressable', '~> 2.5', '>= 2.5.2'
+gem 'bootstrap-sass', '~> 3.3'
gem 'font-awesome-rails', '~> 4.7' gem 'font-awesome-rails', '~> 4.7'
gem 'gemojione', '~> 3.3' gem 'gemojione', '~> 3.3'
-gem 'gon', '~> 6.1.0' gem 'gon', '~> 6.2'
-gem 'jquery-atwho-rails', '~> 1.3.2' -gem 'jquery-atwho-rails', '~> 1.3.2'
+gem 'gon', '~> 6.1'
+gem 'jquery-atwho-rails', '~> 1.3', '>= 1.3.2' +gem 'jquery-atwho-rails', '~> 1.3', '>= 1.3.2'
gem 'request_store', '~> 1.3' gem 'request_store', '~> 1.3'
-gem 'select2-rails', '~> 3.5.9' -gem 'select2-rails', '~> 3.5.9'
@ -309,7 +303,7 @@ gitlab Gemfile
# Metrics # Metrics
group :metrics do group :metrics do
@@ -398,15 +398,15 @@ @@ -401,15 +401,15 @@
gem 'oauth2', '~> 1.4' gem 'oauth2', '~> 1.4'
# Health check # Health check
@ -323,17 +317,16 @@ gitlab Gemfile
+gem 'sys-filesystem', '~> 1.1', '>= 1.1.6' +gem 'sys-filesystem', '~> 1.1', '>= 1.1.6'
# SSH host key support # SSH host key support
-gem 'net-ssh', '~> 4.2.0' gem 'net-ssh', '~> 5.0'
-gem 'sshkey', '~> 1.9.0' -gem 'sshkey', '~> 1.9.0'
+gem 'net-ssh', '~> 4.2'
+gem 'sshkey', '~> 1.9' +gem 'sshkey', '~> 1.9'
# Required for ED25519 SSH host key support # Required for ED25519 SSH host key support
group :ed25519 do group :ed25519 do
@@ -417,12 +417,12 @@ @@ -419,12 +419,12 @@
# Gitaly GRPC client # Gitaly GRPC client
gem 'gitaly-proto', '~> 0.99.0', require: 'gitaly' gem 'gitaly-proto', '~> 0.105.0', require: 'gitaly'
-gem 'grpc', '~> 1.11.0' -gem 'grpc', '~> 1.11.0'
+gem 'grpc', '~> 1.11' +gem 'grpc', '~> 1.11'
@ -346,9 +339,3 @@ gitlab Gemfile
# Feature toggles # Feature toggles
gem 'flipper', '~> 0.13.0' gem 'flipper', '~> 0.13.0'
@@ -434,4 +434,4 @@
gem 'grape_logging', '~> 1.7'
# Asset synchronization
-gem 'asset_sync', '~> 2.2.0'
+gem 'asset_sync', '~> 2.2'

View file

@ -2,7 +2,7 @@ Bundler will fail when it can't find these locally
--- a/Gemfile --- a/Gemfile
+++ b/Gemfile +++ b/Gemfile
@@ -277,7 +277,6 @@ @@ -284,7 +284,6 @@
gem 'rails-i18n', gem_versions['rails-i18n'] gem 'rails-i18n', gem_versions['rails-i18n']
gem 'gettext_i18n_rails', '~> 1.8' gem 'gettext_i18n_rails', '~> 1.8'
gem 'gettext_i18n_rails_js', '~> 1.3' gem 'gettext_i18n_rails_js', '~> 1.3'
@ -10,7 +10,7 @@ Bundler will fail when it can't find these locally
gem 'batch-loader', '~> 1.2', '>= 1.2.1' gem 'batch-loader', '~> 1.2', '>= 1.2.1'
@@ -301,21 +300,6 @@ @@ -307,21 +306,6 @@
gem 'raindrops', '~> 0.18' gem 'raindrops', '~> 0.18'
end end

View file

@ -20,4 +20,4 @@ Subject: [PATCH] allow specifying DB choice via ENV variable
+gem 'pg', '~> 0.18.2' if ENV["DB"] == "all" || ENV["DB"] == "postgres" +gem 'pg', '~> 0.18.2' if ENV["DB"] == "all" || ENV["DB"] == "postgres"
gem 'rugged', '~> 0.27' gem 'rugged', '~> 0.27'
gem 'grape-route-helpers', '~> 2.1' gem 'grape-path-helpers', '~> 1.0'

View file

@ -1,6 +1,6 @@
--- a/Gemfile --- a/Gemfile
+++ b/Gemfile +++ b/Gemfile
@@ -301,7 +301,7 @@ @@ -307,7 +307,7 @@
gem 'raindrops', '~> 0.18' gem 'raindrops', '~> 0.18'
end end
@ -9,7 +9,7 @@
gem 'bullet', '~> 5.5.0', require: !!ENV['ENABLE_BULLET'] gem 'bullet', '~> 5.5.0', require: !!ENV['ENABLE_BULLET']
gem 'pry-byebug', '~> 3.4.1', platform: :mri gem 'pry-byebug', '~> 3.4.1', platform: :mri
gem 'pry-rails', '~> 0.3.4' gem 'pry-rails', '~> 0.3.4'
@@ -356,9 +356,9 @@ @@ -359,9 +359,9 @@
gem 'simple_po_parser', '~> 1.1.2', require: false gem 'simple_po_parser', '~> 1.1.2', require: false
gem 'timecop', '~> 0.8.0' gem 'timecop', '~> 0.8.0'
@ -19,5 +19,5 @@
-group :test do -group :test do
+#group :test do +#group :test do
gem 'shoulda-matchers', '~> 3.1.2', require: false gem 'shoulda-matchers', '~> 3.1.2', require: false
gem 'email_spec', '~> 1.6.0' gem 'email_spec', '~> 2.2.0'
gem 'json-schema', '~> 2.8.0' gem 'json-schema', '~> 2.8.0'

View file

@ -1,8 +1,8 @@
--- a/Gemfile --- a/Gemfile
+++ b/Gemfile +++ b/Gemfile
@@ -362,7 +362,7 @@ @@ -365,7 +365,7 @@
gem 'shoulda-matchers', '~> 3.1.2', require: false gem 'shoulda-matchers', '~> 3.1.2', require: false
gem 'email_spec', '~> 1.6.0' gem 'email_spec', '~> 2.2.0'
gem 'json-schema', '~> 2.8.0' gem 'json-schema', '~> 2.8.0'
- gem 'webmock', '~> 2.3.2' - gem 'webmock', '~> 2.3.2'
+ gem 'webmock', '>= 2.3.2' + gem 'webmock', '>= 2.3.2'

View file

@ -8,4 +8,4 @@
+gem 'pg', '~> 0.19' if ENV["DB"] == "all" || ENV["DB"] == "postgres" +gem 'pg', '~> 0.19' if ENV["DB"] == "all" || ENV["DB"] == "postgres"
gem 'rugged', '~> 0.27' gem 'rugged', '~> 0.27'
gem 'grape-route-helpers', '~> 2.1' gem 'grape-path-helpers', '~> 1.0'

View file

@ -1,6 +1,6 @@
--- a/Gemfile --- a/Gemfile
+++ b/Gemfile +++ b/Gemfile
@@ -284,7 +284,6 @@ @@ -291,7 +291,6 @@
# Perf bar # Perf bar
gem 'peek', '~> 1.0', '>= 1.0.1' gem 'peek', '~> 1.0', '>= 1.0.1'
gem 'peek-gc', '~> 0.0.2' gem 'peek-gc', '~> 0.0.2'

View file

@ -1,6 +1,6 @@
--- a/Gemfile --- a/Gemfile
+++ b/Gemfile +++ b/Gemfile
@@ -170,7 +170,7 @@ @@ -178,7 +178,7 @@
gem 'rufus-scheduler', '~> 3.4' gem 'rufus-scheduler', '~> 3.4'
# HTTP requests # HTTP requests

View file

@ -1,11 +0,0 @@
--- a/Gemfile
+++ b/Gemfile
@@ -134,7 +134,7 @@
gem 'redcarpet', '~> 3.4'
gem 'commonmarker', '~> 0.17'
gem 'RedCloth', '~> 4.3', '>= 4.3.2'
-gem 'rdoc', '~> 4.2'
+gem 'rdoc', '>= 4.2'
gem 'org-ruby', '~> 0.9.12'
gem 'creole', '~> 0.5.0'
gem 'wikicloth', '0.8.1'

View file

@ -1,11 +0,0 @@
--- a/Gemfile
+++ b/Gemfile
@@ -400,7 +400,7 @@
end
# Gitaly GRPC client
-gem 'gitaly-proto', '~> 0.99.0', require: 'gitaly'
+gem 'gitaly-proto', '~> 0.99', require: 'gitaly'
gem 'grpc', '~> 1.11'
# Locked until https://github.com/google/protobuf/issues/4210 is closed

View file

@ -1,13 +0,0 @@
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18643
--- a/Gemfile
+++ b/Gemfile
@@ -139,7 +139,7 @@
gem 'creole', '~> 0.5.0'
gem 'wikicloth', '0.8.1'
gem 'asciidoctor', '~> 1.5', '>= 1.5.6'
-gem 'asciidoctor-plantuml', '0.0.8'
+gem 'asciidoctor-plantuml', '~> 0.0.8'
gem 'rouge', '~> 3.1'
gem 'truncato', '~> 0.7.9'
gem 'bootstrap_form', '~> 2.7'

View file

@ -1,7 +1,7 @@
--- a/Gemfile --- a/Gemfile
+++ b/Gemfile +++ b/Gemfile
@@ -107,7 +107,7 @@ @@ -112,7 +112,7 @@
gem 'carrierwave', '~> 1.2' gem 'mini_magick'
# Drag and Drop UI # Drag and Drop UI
-gem 'dropzonejs-rails', '~> 0.7.1' -gem 'dropzonejs-rails', '~> 0.7.1'

View file

@ -1,18 +0,0 @@
--- a/Gemfile
+++ b/Gemfile
@@ -389,13 +389,12 @@
gem 'sys-filesystem', '~> 1.1', '>= 1.1.6'
# SSH host key support
-gem 'net-ssh', '~> 4.2'
+gem 'net-ssh', '~> 5.0'
gem 'sshkey', '~> 1.9'
# Required for ED25519 SSH host key support
group :ed25519 do
- gem 'rbnacl-libsodium'
- gem 'rbnacl', '~> 4.0'
+ gem 'ed25519', '~> 1.2'
gem 'bcrypt_pbkdf', '~> 1.0'
end

View file

@ -1,11 +1,11 @@
--- a/config/webpack.config.js --- a/config/webpack.config.js
+++ b/config/webpack.config.js +++ b/config/webpack.config.js
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
const CompressionPlugin = require('compression-webpack-plugin'); const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
-const ROOT_PATH = path.resolve(__dirname, '..'); -const ROOT_PATH = path.resolve(__dirname, '..');
+const ROOT_PATH = '/usr/share/gitlab'; +const ROOT_PATH = '/usr/share/gitlab';
const CACHE_PATH = path.join(ROOT_PATH, 'tmp/cache');
const IS_PRODUCTION = process.env.NODE_ENV === 'production'; const IS_PRODUCTION = process.env.NODE_ENV === 'production';
const IS_DEV_SERVER = process.argv.join(' ').indexOf('webpack-dev-server') !== -1; const IS_DEV_SERVER = process.argv.join(' ').indexOf('webpack-dev-server') !== -1;
const DEV_SERVER_HOST = process.env.DEV_SERVER_HOST || 'localhost';

View file

@ -1,26 +1,26 @@
--- a/package.json --- a/package.json
+++ b/package.json +++ b/package.json
@@ -96,36 +96,5 @@ @@ -103,36 +103,5 @@
"worker-loader": "^1.1.1" "worker-loader": "^2.0.0"
}, },
"devDependencies": { "devDependencies": {
- "axios-mock-adapter": "^1.10.0", - "axios-mock-adapter": "^1.15.0",
- "babel-eslint": "^8.0.2", - "babel-eslint": "^8.2.3",
- "babel-plugin-istanbul": "^4.1.6", - "babel-plugin-istanbul": "^4.1.6",
- "babel-plugin-rewire": "^1.1.0", - "babel-plugin-rewire": "^1.1.0",
- "babel-template": "^6.26.0", - "babel-template": "^6.26.0",
- "babel-types": "^6.26.0", - "babel-types": "^6.26.0",
- "chalk": "^2.4.1", - "chalk": "^2.4.1",
- "commander": "^2.15.1", - "commander": "^2.15.1",
- "eslint": "^3.18.0", - "eslint": "~4.12.1",
- "eslint-config-airbnb-base": "^10.0.1", - "eslint-config-airbnb-base": "^12.1.0",
- "eslint-import-resolver-webpack": "^0.8.3", - "eslint-import-resolver-webpack": "^0.10.0",
- "eslint-plugin-filenames": "^1.1.0", - "eslint-plugin-filenames": "^1.2.0",
- "eslint-plugin-html": "2.0.1", - "eslint-plugin-html": "4.0.3",
- "eslint-plugin-import": "^2.2.0", - "eslint-plugin-import": "^2.12.0",
- "eslint-plugin-jasmine": "^2.1.0", - "eslint-plugin-jasmine": "^2.1.0",
- "eslint-plugin-promise": "^3.5.0", - "eslint-plugin-promise": "^3.8.0",
- "eslint-plugin-vue": "^4.0.1", - "eslint-plugin-vue": "^4.5.0",
- "ignore": "^3.3.7", - "ignore": "^3.3.7",
- "istanbul": "^0.4.5", - "istanbul": "^0.4.5",
- "jasmine-core": "^2.9.0", - "jasmine-core": "^2.9.0",
@ -33,7 +33,7 @@
- "karma-sourcemap-loader": "^0.3.7", - "karma-sourcemap-loader": "^0.3.7",
- "karma-webpack": "3.0.0", - "karma-webpack": "3.0.0",
- "nodemon": "^1.17.3", - "nodemon": "^1.17.3",
- "prettier": "1.11.1", - "prettier": "1.12.1",
- "webpack-dev-server": "^3.1.4" - "webpack-dev-server": "^3.1.4"
} }
} }

View file

@ -1,6 +1,6 @@
--- a/config/webpack.config.js --- a/config/webpack.config.js
+++ b/config/webpack.config.js +++ b/config/webpack.config.js
@@ -232,6 +232,7 @@ @@ -85,6 +85,7 @@
resolve: { resolve: {
extensions: ['.js'], extensions: ['.js'],
@ -8,14 +8,14 @@
alias: { alias: {
'~': path.join(ROOT_PATH, 'app/assets/javascripts'), '~': path.join(ROOT_PATH, 'app/assets/javascripts'),
emojis: path.join(ROOT_PATH, 'fixtures/emojis'), emojis: path.join(ROOT_PATH, 'fixtures/emojis'),
@@ -244,6 +245,10 @@ @@ -290,6 +291,10 @@
},
}, devtool: NO_SOURCEMAPS ? false : devtool,
+ resolveLoader: { + resolveLoader: {
+ modules: ['/usr/share/gitlab/node_modules', '/usr/lib/nodejs'], + modules: ['/usr/share/gitlab/node_modules', '/usr/lib/nodejs'],
+ }, + },
+ +
// sqljs requires fs // sqljs requires fs
node: { node: { fs: 'empty' },
fs: 'empty', };

View file

@ -2,26 +2,27 @@
+++ b/config/webpack.config.js +++ b/config/webpack.config.js
@@ -5,7 +5,6 @@ @@ -5,7 +5,6 @@
const StatsWriterPlugin = require('webpack-stats-plugin').StatsWriterPlugin; const StatsWriterPlugin = require('webpack-stats-plugin').StatsWriterPlugin;
const CopyWebpackPlugin = require('copy-webpack-plugin');
const CompressionPlugin = require('compression-webpack-plugin'); const CompressionPlugin = require('compression-webpack-plugin');
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
-const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; -const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const ROOT_PATH = '/usr/share/gitlab'; const ROOT_PATH = '/usr/share/gitlab';
const IS_PRODUCTION = process.env.NODE_ENV === 'production'; const CACHE_PATH = path.join(ROOT_PATH, 'tmp/cache');
@@ -304,16 +303,4 @@ @@ -265,17 +264,6 @@
} // enable HMR only in webpack-dev-server
} DEV_SERVER_LIVERELOAD && new webpack.HotModuleReplacementPlugin(),
-if (WEBPACK_REPORT) { - // optionally generate webpack bundle analysis
- config.plugins.push( - WEBPACK_REPORT &&
- new BundleAnalyzerPlugin({ - new BundleAnalyzerPlugin({
- analyzerMode: 'static', - analyzerMode: 'static',
- generateStatsFile: true, - generateStatsFile: true,
- openAnalyzer: false, - openAnalyzer: false,
- reportFilename: path.join(ROOT_PATH, 'webpack-report/index.html'), - reportFilename: path.join(ROOT_PATH, 'webpack-report/index.html'),
- statsFilename: path.join(ROOT_PATH, 'webpack-report/stats.json'), - statsFilename: path.join(ROOT_PATH, 'webpack-report/stats.json'),
- }) - }),
- ); - ].filter(Boolean),
-}
- -
module.exports = config; devServer: {
host: DEV_SERVER_HOST,
port: DEV_SERVER_PORT,

View file

@ -1,64 +0,0 @@
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20284
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20820
--- a/lib/banzai/filter/sanitization_filter.rb
+++ b/lib/banzai/filter/sanitization_filter.rb
@@ -1,30 +1,25 @@
+# frozen_string_literal: true
+
module Banzai
module Filter
# Sanitize HTML
#
# Extends HTML::Pipeline::SanitizationFilter with a custom whitelist.
class SanitizationFilter < HTML::Pipeline::SanitizationFilter
+ include Gitlab::Utils::StrongMemoize
+
UNSAFE_PROTOCOLS = %w(data javascript vbscript).freeze
TABLE_ALIGNMENT_PATTERN = /text-align: (?<alignment>center|left|right)/
def whitelist
- whitelist = super
-
- customize_whitelist(whitelist)
-
- whitelist
+ strong_memoize(:whitelist) do
+ customize_whitelist(super.deep_dup)
+ end
end
private
- def customized?(transformers)
- transformers.last.source_location[0] == __FILE__
- end
-
def customize_whitelist(whitelist)
- # Only push these customizations once
- return if customized?(whitelist[:transformers])
-
# Allow table alignment; we whitelist specific text-align values in a
# transformer below
whitelist[:attributes]['th'] = %w(style)
--- a/spec/lib/banzai/filter/sanitization_filter_spec.rb
+++ b/spec/lib/banzai/filter/sanitization_filter_spec.rb
@@ -54,6 +54,18 @@
expect(instance.whitelist[:transformers].size).to eq control_count
end
+ it 'customizes the whitelist only once for different instances' do
+ instance1 = described_class.new('Foo1')
+ instance2 = described_class.new('Foo2')
+ control_count = instance1.whitelist[:transformers].size
+
+ instance1.whitelist
+ instance2.whitelist
+
+ expect(instance1.whitelist[:transformers].size).to eq control_count
+ expect(instance2.whitelist[:transformers].size).to eq control_count
+ end
+
it 'sanitizes `class` attribute from all elements' do
act = %q{<pre class="code highlight white c"><code>&lt;span class="k"&gt;def&lt;/span&gt;</code></pre>}
exp = %q{<pre><code>&lt;span class="k"&gt;def&lt;/span&gt;</code></pre>}

View file

@ -2,11 +2,9 @@ Required to support updation from 8 to 10
Bug, upstream: https://gitlab.com/gitlab-org/gitlab-ce/issues/48040 Bug, upstream: https://gitlab.com/gitlab-org/gitlab-ce/issues/48040
diff --git a/lib/gitlab/gitaly_client.rb b/lib/gitlab/gitaly_client.rb
index 0abae70c443..b16efe37fd2 100644
--- a/lib/gitlab/gitaly_client.rb --- a/lib/gitlab/gitaly_client.rb
+++ b/lib/gitlab/gitaly_client.rb +++ b/lib/gitlab/gitaly_client.rb
@@ -216,6 +216,12 @@ module Gitlab @@ -226,6 +226,12 @@
# Disabled features are always off! # Disabled features are always off!
return false if status == MigrationStatus::DISABLED return false if status == MigrationStatus::DISABLED

View file

@ -9,8 +9,3 @@
namespace ENV.fetch('GITLAB_ENV') { Rails.env } namespace ENV.fetch('GITLAB_ENV') { Rails.env }
class << self class << self
--- a/config/initializers/2_gitlab.rb
+++ b/config/initializers/2_gitlab.rb
@@ -1 +1 @@
-require_relative '../../lib/gitlab'
+require '/usr/share/gitlab/lib/gitlab'

View file

@ -6,17 +6,12 @@
0280-relax-pg.patch 0280-relax-pg.patch
0290-skip-peek-mysql2.patch 0290-skip-peek-mysql2.patch
0340-relax-httparty.patch 0340-relax-httparty.patch
0360-relax-rdoc.patch
0390-relax-gitaly-proto.patch
0396-relax-asciidoctor-plantuml.patch
0400-Relax-recaptcha-version.patch 0400-Relax-recaptcha-version.patch
0410-relax-dropzonejs-rails.patch 0410-relax-dropzonejs-rails.patch
0420-relax-net-ssh.patch
0500-set-webpack-root.patch 0500-set-webpack-root.patch
0510-remove-dev-dependencies.patch 0510-remove-dev-dependencies.patch
0520-add-system-lib-path-for-webpack.patch 0520-add-system-lib-path-for-webpack.patch
0530-remove-bundle-analyzer.patch 0530-remove-bundle-analyzer.patch
0600-html-sanitizer-2.8.patch
0610-source-init-functions.patch 0610-source-init-functions.patch
0620-pid-log-paths.patch 0620-pid-log-paths.patch
0630-fix-mail-room-path.patch 0630-fix-mail-room-path.patch