TOP  >  blog  >  serizawa  >  mastodon  >  mastodonアップデート V2.1.0からV2.1.3へ

serizawa さんの日記

 
2018
1月 17
(水)
21:00
mastodonアップデート V2.1.0からV2.1.3へ
前の日記 次の日記 カテゴリー  mastodon
タグ 
本文

mastodonのバージョンをV2.1.0からV2.1.3にアップデートしました。

mastodon$ cd ~ && git clone https://github.com/tootsuite/mastodon.git live213 && cd live213

Cloning into 'live213'...
remote: Counting objects: 56588, done.
remote: Total 56588 (delta 0), reused 0 (delta 0), pack-reused 56587
Receiving objects: 100% (56588/56588), 52.55 MiB | 11.04 MiB/s, done.
Resolving deltas: 100% (37279/37279), done.
Checking out files: 100% (4560/4560), done.

mastodon$ git checkout -b v2.1.3

Switched to a new branch 'v2.1.3'


mastodon$ bundle install --deployment --without development test

The latest bundler is 1.16.0, but you are currently running 1.16.0.pre.2.
To install the latest version, run `gem install bundler`
Warning: the running version of Bundler (1.16.0.pre.2) is older than the version that created the lockfile (1.16.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
Fetching gem metadata from https://rubygems.org/..................
Fetching rake 12.3.0
Installing rake 12.3.0
Fetching concurrent-ruby 1.0.5
Installing concurrent-ruby 1.0.5
Fetching i18n 0.9.1
Installing i18n 0.9.1
Fetching minitest 5.10.3
Installing minitest 5.10.3
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.4
Installing tzinfo 1.2.4
Fetching activesupport 5.1.4
Installing activesupport 5.1.4
Fetching builder 3.2.3
Installing builder 3.2.3
Fetching erubi 1.7.0
Installing erubi 1.7.0
Fetching mini_portile2 2.3.0
Installing mini_portile2 2.3.0
Fetching nokogiri 1.8.1
Installing nokogiri 1.8.1 with native extensions
Fetching rails-dom-testing 2.0.3
Installing rails-dom-testing 2.0.3
Fetching crass 1.0.3
Installing crass 1.0.3
Fetching loofah 2.1.1
Installing loofah 2.1.1
Fetching rails-html-sanitizer 1.0.3
Installing rails-html-sanitizer 1.0.3
Fetching actionview 5.1.4
Installing actionview 5.1.4
Fetching rack 2.0.3
Installing rack 2.0.3
Fetching rack-test 0.8.2
Installing rack-test 0.8.2
Fetching actionpack 5.1.4
Installing actionpack 5.1.4
Fetching nio4r 2.1.0
Installing nio4r 2.1.0 with native extensions
Fetching websocket-extensions 0.1.3
Installing websocket-extensions 0.1.3
Fetching websocket-driver 0.6.5
Installing websocket-driver 0.6.5 with native extensions
Fetching actioncable 5.1.4
Installing actioncable 5.1.4
Fetching globalid 0.4.1
Installing globalid 0.4.1
Fetching activejob 5.1.4
Installing activejob 5.1.4
Fetching mini_mime 1.0.0
Installing mini_mime 1.0.0
Fetching mail 2.7.0
Installing mail 2.7.0
Fetching actionmailer 5.1.4
Installing actionmailer 5.1.4
Fetching activemodel 5.1.4
Installing activemodel 5.1.4
Fetching case_transform 0.2
Installing case_transform 0.2
Fetching jsonapi-renderer 0.2.0
Installing jsonapi-renderer 0.2.0
Fetching active_model_serializers 0.10.7
Installing active_model_serializers 0.10.7
Fetching arel 8.0.0
Installing arel 8.0.0
Fetching activerecord 5.1.4
Installing activerecord 5.1.4
Fetching public_suffix 3.0.1
Installing public_suffix 3.0.1
Fetching addressable 2.5.2
Installing addressable 2.5.2
Fetching encryptor 3.0.0
Installing encryptor 3.0.0
Fetching attr_encrypted 3.0.3
Installing attr_encrypted 3.0.3
Fetching climate_control 0.2.0
Installing climate_control 0.2.0
Fetching cocaine 0.5.8
Installing cocaine 0.5.8
Fetching av 0.9.0
Installing av 0.9.0
Fetching aws-sigv4 1.0.2
Installing aws-sigv4 1.0.2
Fetching jmespath 1.3.1
Installing jmespath 1.3.1
Fetching aws-sdk-core 2.10.100
Installing aws-sdk-core 2.10.100
Fetching aws-sdk-resources 2.10.100
Installing aws-sdk-resources 2.10.100
Fetching aws-sdk 2.10.100
Installing aws-sdk 2.10.100
Fetching bcrypt 3.1.11
Installing bcrypt 3.1.11 with native extensions
Fetching msgpack 1.1.0
Installing msgpack 1.1.0 with native extensions
Fetching bootsnap 1.1.5
Installing bootsnap 1.1.5 with native extensions
Fetching browser 2.5.2
Installing browser 2.5.2
Using bundler 1.16.0.pre.2
Fetching charlock_holmes 0.7.5
Installing charlock_holmes 0.7.5 with native extensions
Fetching chunky_png 1.3.8
Installing chunky_png 1.3.8
Fetching ffi 1.9.18
Installing ffi 1.9.18 with native extensions
Fetching cld3 3.2.1
Installing cld3 3.2.1 with native extensions
Fetching colorize 0.8.1
Installing colorize 0.8.1
Fetching connection_pool 2.2.1
Installing connection_pool 2.2.1
Fetching css_parser 1.6.0
Installing css_parser 1.6.0
Fetching orm_adapter 0.5.0
Installing orm_adapter 0.5.0
Fetching method_source 0.9.0
Installing method_source 0.9.0
Fetching thor 0.20.0
Installing thor 0.20.0
Fetching railties 5.1.4
Installing railties 5.1.4
Fetching responders 2.4.0
Installing responders 2.4.0
Fetching warden 1.2.7
Installing warden 1.2.7
Fetching devise 4.3.0
Installing devise 4.3.0
Fetching rotp 2.1.2
Installing rotp 2.1.2
Fetching devise-two-factor 3.0.2
Installing devise-two-factor 3.0.2
Fetching unf_ext 0.0.7.4
Installing unf_ext 0.0.7.4 with native extensions
Fetching unf 0.1.4
Installing unf 0.1.4
Fetching domain_name 0.5.20170404
Installing domain_name 0.5.20170404
Fetching doorkeeper 4.2.6
Installing doorkeeper 4.2.6
Fetching dotenv 2.2.1
Installing dotenv 2.2.1
Fetching dotenv-rails 2.2.1
Installing dotenv-rails 2.2.1
Fetching et-orbi 1.0.8
Installing et-orbi 1.0.8
Fetching excon 0.59.0
Installing excon 0.59.0
Fetching execjs 2.7.0
Installing execjs 2.7.0
Fetching fast_blank 1.0.0
Installing fast_blank 1.0.0 with native extensions
Fetching formatador 0.2.5
Installing formatador 0.2.5
Fetching fog-core 1.45.0
Installing fog-core 1.45.0
Fetching multi_json 1.12.2
Installing multi_json 1.12.2
Fetching fog-json 1.0.2
Installing fog-json 1.0.2
Fetching fog-local 0.4.0
Installing fog-local 0.4.0
Fetching ipaddress 0.8.3
Installing ipaddress 0.8.3
Fetching fog-openstack 0.1.22
Installing fog-openstack 0.1.22
Fetching http-cookie 1.0.3
Installing http-cookie 1.0.3
Fetching http-form_data 1.0.3
Installing http-form_data 1.0.3
Fetching http_parser.rb 0.6.0
Installing http_parser.rb 0.6.0 with native extensions
Fetching http 2.2.2
Installing http 2.2.2
Fetching oj 3.3.9
Installing oj 3.3.9 with native extensions
Fetching goldfinger 2.0.1
Installing goldfinger 2.0.1
Fetching temple 0.8.0
Installing temple 0.8.0
Fetching tilt 2.0.8
Installing tilt 2.0.8
Fetching hamlit 2.8.5
Installing hamlit 2.8.5 with native extensions
Fetching hamlit-rails 0.2.0
Installing hamlit-rails 0.2.0
Fetching hamster 3.0.0
Installing hamster 3.0.0
Fetching hiredis 0.6.1
Installing hiredis 0.6.1 with native extensions
Fetching hkdf 0.3.0
Installing hkdf 0.3.0
Fetching htmlentities 4.3.4
Installing htmlentities 4.3.4
Fetching http_accept_language 2.1.1
Installing http_accept_language 2.1.1
Fetching httplog 0.99.7
Installing httplog 0.99.7
Fetching idn-ruby 0.1.0
Installing idn-ruby 0.1.0 with native extensions
Fetching iso-639 0.2.8
Installing iso-639 0.2.8
Fetching link_header 0.0.8
Installing link_header 0.0.8
Fetching rdf 2.2.12
Installing rdf 2.2.12
Fetching json-ld 2.1.7
Installing json-ld 2.1.7
Fetching json-ld-preloaded 2.2.2
Installing json-ld-preloaded 2.2.2
Fetching jwt 2.1.0
Installing jwt 2.1.0
Fetching kaminari-core 1.1.1
Installing kaminari-core 1.1.1
Fetching kaminari-actionview 1.1.1
Installing kaminari-actionview 1.1.1
Fetching kaminari-activerecord 1.1.1
Installing kaminari-activerecord 1.1.1
Fetching kaminari 1.1.1
Installing kaminari 1.1.1
Fetching request_store 1.3.2
Installing request_store 1.3.2
Fetching lograge 0.7.1
Installing lograge 0.7.1
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching mario-redis-lock 1.2.0
Installing mario-redis-lock 1.2.0
Fetching mime-types-data 3.2016.0521
Installing mime-types-data 3.2016.0521
Fetching mime-types 3.1
Installing mime-types 3.1
Fetching mimemagic 0.3.2
Installing mimemagic 0.3.2
Fetching nokogumbo 1.4.13
Installing nokogumbo 1.4.13 with native extensions
Fetching rack-protection 2.0.0
Installing rack-protection 2.0.0
Fetching sidekiq 5.0.5
Installing sidekiq 5.0.5
Fetching statsd-ruby 1.2.1
Installing statsd-ruby 1.2.1
Fetching nsa 0.2.4
Installing nsa 0.2.4
Fetching ostatus2 2.0.2
Installing ostatus2 2.0.2
Fetching ox 2.8.2
Installing ox 2.8.2 with native extensions
Fetching paperclip 5.1.0
Installing paperclip 5.1.0
Fetching paperclip-av-transcoder 0.6.4
Installing paperclip-av-transcoder 0.6.4
Fetching pg 0.21.0
Installing pg 0.21.0 with native extensions
Fetching pghero 1.7.0
Installing pghero 1.7.0
Fetching pkg-config 1.2.8
Installing pkg-config 1.2.8
Fetching premailer 1.11.1
Installing premailer 1.11.1
Fetching premailer-rails 1.10.1
Installing premailer-rails 1.10.1
Fetching puma 3.11.0
Installing puma 3.11.0 with native extensions
Fetching pundit 1.1.0
Installing pundit 1.1.0
Fetching rack-attack 5.0.1
Installing rack-attack 5.0.1
Fetching rack-cors 0.4.1
Installing rack-cors 0.4.1
Fetching rack-proxy 0.6.2
Installing rack-proxy 0.6.2
Fetching rack-timeout 0.4.2
Installing rack-timeout 0.4.2
Fetching sprockets 3.7.1
Installing sprockets 3.7.1
Fetching sprockets-rails 3.2.1
Installing sprockets-rails 3.2.1
Fetching rails 5.1.4
Installing rails 5.1.4
Fetching rails-i18n 5.0.4
Installing rails-i18n 5.0.4
Fetching rails-settings-cached 0.6.6
Installing rails-settings-cached 0.6.6
Fetching rdf-normalize 0.3.2
Installing rdf-normalize 0.3.2
Fetching redis-store 1.4.1
Installing redis-store 1.4.1
Fetching redis-rack 2.0.3
Installing redis-rack 2.0.3
Fetching redis-actionpack 5.0.2
Installing redis-actionpack 5.0.2
Fetching redis-activesupport 5.0.4
Installing redis-activesupport 5.0.4
Fetching redis-namespace 1.6.0
Installing redis-namespace 1.6.0
Fetching redis-rails 5.0.2
Installing redis-rails 5.0.2
Fetching rqrcode 0.10.1
Installing rqrcode 0.10.1
Fetching ruby-oembed 0.12.0
Installing ruby-oembed 0.12.0
Fetching ruby-progressbar 1.9.0
Installing ruby-progressbar 1.9.0
Fetching rufus-scheduler 3.4.2
Installing rufus-scheduler 3.4.2
Fetching sanitize 4.5.0
Installing sanitize 4.5.0
Fetching sidekiq-bulk 0.1.1
Installing sidekiq-bulk 0.1.1
Fetching sidekiq-scheduler 2.1.10
Installing sidekiq-scheduler 2.1.10
Fetching sidekiq-unique-jobs 5.0.10
Installing sidekiq-unique-jobs 5.0.10
Fetching simple-navigation 4.0.5
Installing simple-navigation 4.0.5
Fetching simple_form 3.5.0
Installing simple_form 3.5.0
Fetching strong_migrations 0.1.9
Installing strong_migrations 0.1.9
Fetching twitter-text 1.14.7
Installing twitter-text 1.14.7
Fetching tzinfo-data 1.2017.3
Installing tzinfo-data 1.2017.3
Fetching uglifier 3.2.0
Installing uglifier 3.2.0
Fetching webpacker 3.0.2
Installing webpacker 3.0.2
Fetching webpush 0.3.3
Installing webpush 0.3.3
Bundle complete! 99 Gemfile dependencies, 166 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into `./vendor/bundle`
Post-install message from encryptor:

Please be aware that Encryptor v2.0.0 had a major security bug when using AES--GCM algorithms.

By default You will not be able to decrypt data that was previously encrypted using an AES-*-GCM algorithm.

Please see the README and https://github.com/attr-encrypted/encryptor/pull/22 for more information.

Post-install message from attr_encrypted:

WARNING: Several insecure default options and features were deprecated in attr_encrypted v2.0.0.

Additionally, there was a bug in Encryptor v2.0.0 that insecurely encrypted data when using an AES-*-GCM algorithm.

This bug was fixed but introduced breaking changes between v2.x and v3.x.

Please see the README for more information regarding upgrading to attr_encrypted v3.0.0.

Post-install message from paperclip:

##################################################

# NOTE FOR UPGRADING FROM 4.3.0 OR EARLIER #

##################################################

Paperclip is now compatible with aws-sdk >= 2.0.0.

If you are using S3 storage, aws-sdk >= 2.0.0 requires you to make a few small
changes:

You must set the `s3_region`
If you are explicitly setting permissions anywhere, such as in an initializer,
note that the format of the permissions changed from using an underscore to
using a hyphen. For example, `:public_read` needs to be changed to
`public-read`.

For a walkthrough of upgrading from 4 to 5 and aws-sdk >= 2.0 you can watch
http://rubythursday.com/episodes/ruby-snack-27-upgrade-paperclip-and-aws-sdk-in-prep-for-rails-5


yarn install  (結構、時間かかります。)

yarn run v1.2.1
error Command "install(時間" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[mastodon@tk2-208-13619 live213]$ yarn install
yarn install v1.2.1
[1/6] Validating package.json...
[2/6] Resolving packages...
[3/6] Fetching packages...
info fsevents@1.1.3: The platform "linux" is incompatible with this module.
info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/6] Linking dependencies...
[5/6] Building fresh packages...
[6/6] Cleaning modules...
warning Your current version of Yarn is out of date. The latest version is "1.3.2" while you're on "1.2.1".
info To upgrade, run the following command:
$ sudo yum install yarn
$ npm rebuild node-sass

 > node-sass@4.7.2 install /home/mastodon/live213/node_modules/node-sass
 > node scripts/install.js

node-sass build Binary found at /home/mastodon/live213/node_modules/node-sass/vendor/linux-x64-57/binding.node

 > node-sass@4.7.2 postinstall /home/mastodon/live213/node_modules/node-sass
 > node scripts/build.js

Binary found at /home/mastodon/live213/node_modules/node-sass/vendor/linux-x64-57/binding.node
Testing binary
Binary is fine
node-sass@4.7.2 /home/mastodon/live213/node_modules/node-sass
Done in 168.19s.


.env.productionをコピーする。

cp -a ./live/.env.production ./live213/

vi ./live213/docker-compose.yml

#を2か所削除する。

### Uncomment to enable DB persistance

# volumes:
  - ./postgres:/var/lib/postgresql/data

### Uncomment to enable REDIS persistance

# volumes:
  - ./redis:/data


画像をコピーする。(これに時間がかかるのが悩みどころ。)

cd ~
cp -a ./live/public/system ./live213/public/

vi ./live213/config/environments/production.rb

config/environments/production.rb 内の :user_name と :password
をコメントアウトします。

mastodonサーバー内のメールサーバーを使う場合は、そうしないと新規登録メールが届きません。


リネームする。

mastodon$ mv live live210(これが実質backupとなるので失敗した場合、旧バージョンに戻す。)
mastodon$ mv live213 live

$ cd live
$ RAILS_ENV=production bundle exec rails db:migrate

Migrating to MoreFasterIndexOnNotifications (20171226094803)
== 20171226094803 MoreFasterIndexOnNotifications: migrating ===================

    • add_index(:notifications, [:account_id, :id], {:order=>{:id=>:desc}, :algorithm=>:concurrently})
        -> 0.2143s
    • remove_index(:notifications, {:name=>:index_notifications_on_id_and_account_id_and_activity_type})
        -> 0.0280s
      == 20171226094803 MoreFasterIndexOnNotifications: migrated (0.2437s) ==========

Migrating to AddIndexOnStatusesForApiV1AccountsAccountIdStatuses (20180106000232)
== 20180106000232 AddIndexOnStatusesForApiV1AccountsAccountIdStatuses: migrating

    • add_index(:statuses, [:account_id, :id, :visibility, :updated_at], {:order=>{:id=>:desc}, :algorithm=>:concurrently, :name=>:index_statuses_20180106})
        -> 0.9807s
    • remove_index(:statuses, {:name=>:index_statuses_on_account_id_id})
        -> 0.0560s
      == 20180106000232 AddIndexOnStatusesForApiV1AccountsAccountIdStatuses: migrated (1.0371s)

$ RAILS_ENV=production bundle exec rails assets:precompile

I, [2018-01-17T20:50:02.231446 #12799] INFO -- : Writing /home/mastodon/live/public/assets/doorkeeper/admin/application-50d68ad91b15067c63771e4811d971d7a56406c472a878021d1fb95d066efd8d.css
I, [2018-01-17T20:50:02.231993 #12799] INFO -- : Writing /home/mastodon/live/public/assets/doorkeeper/admin/application-50d68ad91b15067c63771e4811d971d7a56406c472a878021d1fb95d066efd8d.css.gz
I, [2018-01-17T20:50:02.262218 #12799] INFO -- : Writing /home/mastodon/live/public/assets/doorkeeper/application-29873392fba1f6a4fd5359214f854d900e24920096164f6e5343dbc0de69df0d.css
I, [2018-01-17T20:50:02.262516 #12799] INFO -- : Writing /home/mastodon/live/public/assets/doorkeeper/application-29873392fba1f6a4fd5359214f854d900e24920096164f6e5343dbc0de69df0d.css.gz
I, [2018-01-17T20:50:10.691968 #12799] INFO -- : Writing /home/mastodon/live/public/assets/pghero/application-a013dbdf269bc5d5f3610778edb4075c172f162ee90827f8839c4e8128a3a54d.js
I, [2018-01-17T20:50:10.692366 #12799] INFO -- : Writing /home/mastodon/live/public/assets/pghero/application-a013dbdf269bc5d5f3610778edb4075c172f162ee90827f8839c4e8128a3a54d.js.gz
I, [2018-01-17T20:50:10.719433 #12799] INFO -- : Writing /home/mastodon/live/public/assets/pghero/application-c2618b70600dfedb0f3ba1f916d97a2f93a3f265aba10356abb763bd663d0cbd.css
I, [2018-01-17T20:50:10.719793 #12799] INFO -- : Writing /home/mastodon/live/public/assets/pghero/application-c2618b70600dfedb0f3ba1f916d97a2f93a3f265aba10356abb763bd663d0cbd.css.gz
Webpacker is installed ? ?
意sing /home/mastodon/live/config/webpacker.yml file for setting up webpack paths
Compiling…
Compiled all packs in /home/mastodon/live/public/packs


$ sudo systemctl restart mastodon-web.service
$ sudo systemctl restart mastodon-sidekiq.service
$ sudo systemctl restart mastodon-streaming.service


無事、V2.1.3になりました。


Warning: the running version of Bundler (1.16.0.pre.2) is older than the version that created the lockfile (1.16.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.

上記警告がでていたのでbundlerをインストールしました。

mastodon$ gem install bundler

Fetching: bundler-1.16.1.gem (100%)
Successfully installed bundler-1.16.1
Parsing documentation for bundler-1.16.1
Installing ri documentation for bundler-1.16.1
Done installing documentation for bundler after 13 seconds
1 gem installed

閲覧(102125)

新しくコメントをつける

題名
ゲスト名
投稿本文
より詳細なコメント入力フォームへ
検索

ページの一覧 索引

ログイン

ユーザー名:


パスワード:





パスワード紛失  |新規登録

メインメニュー

更新ページ

ad
スポンサーリンク

投稿一覧

オンライン状況
13 人のユーザが現在オンラインです。 (11 人のユーザが blog を参照しています。)

登録ユーザ: 0
ゲスト: 13

もっと...