#!/bin/shset -eux
exportCC=x86_64-unknown-openbsd6.5-egcc
exportCXX=x86_64-unknown-openbsd6.5-eg++
git_check(){ git rev-parse --resolve-git-dir "$1/.git" > /dev/null 2>&1}git_clone(){destination="$1";shiftsource="$1";shiftif ! git_check "$destination";then git clone "$@" -- "$source""$destination"fi}cd ~/mastodon
git fetch --depth 1 origin v2.3.0
git reset --hard FETCH_HEAD
# brianmario/charlock_holmes#127sed -Ei '/^(gem '\''charlock_holmes'\''), '\''~> 0[.]7[.]5'\''$/s//\1, '\''~> 0.7.6'\''/' Gemfile
sed -Ei '/^( charlock_holmes) [(]0[.]7[.]5[)]$/s//\1 (0.7.6)/' Gemfile.lock
sed -Ei '/^( charlock_holmes) [(]~> 0[.]7[.]5[)]$/s//\1 (~> 0.7.6)/' Gemfile.lock
bundle25 install -j "$(getconf NPROCESSORS_ONLN)" --deployment --without 'development test'# https://npm.community/t/crash-npm-err-cb-never-called/858if[$(sysctl -n kern.maxfiles) -lt 20000];then >&2printf'fatal: %s\n''please set sysctl(8) variable kern.maxfiles to at least 20000'exit1elif[$(ulimit -n) -lt 10000];then >&2printf'fatal: %s\n''please set openfiles[-cur] to at least 1000 in login.conf(5)' >&2printf'fatal: %s\n''for example: mastodon_:openfiles=10000:tc=daemon:'exit1fi# uws@^8.14.0 no longer installs properly on Node.js 10 (V8 API changes)version=$(node -v)if[${version%%.*}= v10 ];then >&2printf'fatal: %s\n''this version of Mastodon is incompatible with Node.js 10' >&2printf'fatal: %s %s %s %s %s\n''for OpenBSD 6.5-release, try to build'\'node-8.12.0p1.tgz by checking out your ports tree at OPENBSD_6_5_BASE'\'then typing: mkdir -p ...; cvsps -g -p ... -f lang/node/Makefile -r'\'OPENBSD_6_4_BASE -r OPENBSD_6_5_BASE -l objections; patch -Rfp1 <'\'.../145752.patch; cd lang/node; make; doas make install'exit1fi# rake assets:precompile has a hard dependency on yarnmkdir -p .../local
cd .../local
npm init -y
npm install yarn
cd -
exportPATH=$(pwd)/.../local/node_modules/.bin:$PATH# package.json also needs to be installed with yarn rather# than npm, or else some emoji picker assets will fail to# compile with module not found errors (as of 2.2.0)yarn install --pure-lockfile
exportRAILS_ENV=production
# not available until 2.3.0 (tootsuite/documentation#562)# bundle25 exec rake mastodon:setupcp /.back/mastodon/.env.production .
# or s/rake/rails/bundle25 exec rake db:migrate
bundle25 exec rake assets:precompile
# tmux new-session -ds mastodon
#!/bin/shset -eux
exportCC=x86_64-unknown-openbsd6.5-egcc
exportCXX=x86_64-unknown-openbsd6.5-eg++
git_check(){ git rev-parse --resolve-git-dir "$1/.git" > /dev/null 2>&1}git_clone(){destination="$1";shiftsource="$1";shiftif ! git_check "$destination";then git clone "$@" -- "$source""$destination"fi}cd ~/mastodon
git fetch --depth 1 origin v2.5.0
git reset --hard FETCH_HEAD
bundle25 install -j "$(getconf NPROCESSORS_ONLN)" --deployment --without 'development test'# https://npm.community/t/crash-npm-err-cb-never-called/858if[$(sysctl -n kern.maxfiles) -lt 20000];then >&2printf'fatal: %s\n''please set sysctl(8) variable kern.maxfiles to at least 20000'exit1elif[$(ulimit -n) -lt 10000];then >&2printf'fatal: %s\n''please set openfiles[-cur] to at least 1000 in login.conf(5)' >&2printf'fatal: %s\n''for example: mastodon_:openfiles=10000:tc=daemon:'exit1fi# node-zopfli@^2.0.2 does not install properly (ENOENT in sed(1) for a gzip_container.o.d.raw),# but yarn says that this isn't the end of the world because it's an optional dependency# uws@10.148.0 doesn't install properly for reasons that are unclear (!g node-gyp fno-exceptions),# but we can work around this with a wrapper for $CXX that appends -fexceptionsmkdir -p .../bin
rm -f .../bin/$CXX> .../bin/$CXXprintf'#!/bin/sh\nexec %s "$@" -fexceptions\n'"$(command -v $CXX)"chmod +x .../bin/$CXXexportPATH=$(pwd)/.../bin:$PATH# rake assets:precompile has a hard dependency on yarnmkdir -p .../local
cd .../local
npm init -y
npm install yarn
cd -
exportPATH=$(pwd)/.../local/node_modules/.bin:$PATH# package.json also needs to be installed with yarn rather# than npm, or else some emoji picker assets will fail to# compile with module not found errors (as of 2.2.0)yarn install --pure-lockfile
exportRAILS_ENV=production
# not available until 2.3.0 (tootsuite/documentation#562)# bundle25 exec rake mastodon:setupcp /.back/mastodon/.env.production .
# rake assets:precompile has a hard dependency on rubymkdir -p .../bin
ln -sf $(command -v ruby25) .../bin/ruby
exportPATH=$(pwd)/.../bin:$PATH# or s/rake/rails/SKIP_POST_DEPLOYMENT_MIGRATIONS=true bundle25 exec rake db:migrate
bundle25 exec rake assets:precompile
>&2printf'%s; continue?\n''now restart all Mastodon processes'read -r
bundle25 exec rake db:migrate
# tmux new-session -ds mastodon
#!/bin/shset -eux
# using g++%8/gcc%8 breaks assets:precompile with only node "size mismatch, relink your program"# > maybe those errors are finally making a difference and I should try a different compiler# using g++%4.9/gcc%4.9 breaks bundle26 install on nokogiri with "fatal error: stdalign.h" ENOENT# > GCC's own fucking documentation says that stdalign.h was added in 4.7 but go off I guess# > https://gcc.gnu.org/wiki/C11Status# using clang++/clang breaks rake assets:precompile silently; output ends "Compilation failed:"# > I guess I was right and "relink your program" was always a red herring# trying webpack --config config/webpack/production.js (rails/webpacker#1677) reveals a SIGSEGV# > lang/node has COMPILER = base-clang so it's clearly not the compiler so... fuck it I give upexportCC=clang
exportCXX=clang++
git_check(){ git rev-parse --resolve-git-dir "$1/.git" > /dev/null 2>&1}git_clone(){destination="$1";shiftsource="$1";shiftif ! git_check "$destination";then git clone "$@" -- "$source""$destination"fi}cd ~/mastodon
git fetch --depth 1 origin v2.7.0
git reset --hard FETCH_HEAD
bundle26 install -j "$(getconf NPROCESSORS_ONLN)" --deployment --without 'development test'# https://npm.community/t/crash-npm-err-cb-never-called/858if[$(sysctl -n kern.maxfiles) -lt 20000];then >&2printf'fatal: %s\n''please set sysctl(8) variable kern.maxfiles to at least 20000'exit1elif[$(ulimit -n) -lt 10000];then >&2printf'fatal: %s\n''please set openfiles[-cur] to at least 1000 in login.conf(5)' >&2printf'fatal: %s\n''for example: mastodon_:openfiles=10000:tc=daemon:'exit1fiexportCC=x86_64-unknown-openbsd6.5-egcc
exportCXX=x86_64-unknown-openbsd6.5-eg++
# uws@10.148.0 doesn't install properly for reasons that are unclear (!g node-gyp fno-exceptions),# but we can work around this with a wrapper for $CXX that appends -fexceptionsmkdir -p .../bin
rm -f .../bin/$CXX> .../bin/$CXXprintf'#!/bin/sh\nexec %s "$@" -fexceptions\n'"$(command -v $CXX)"chmod +x .../bin/$CXXexportPATH=$(pwd)/.../bin:$PATH# rake assets:precompile has a hard dependency on yarnmkdir -p .../local
cd .../local
npm init -y
npm install yarn
cd -
exportPATH=$(pwd)/.../local/node_modules/.bin:$PATH# package.json also needs to be installed with yarn rather# than npm, or else some emoji picker assets will fail to# compile with module not found errors (as of 2.2.0)yarn install --pure-lockfile
exportRAILS_ENV=production
# not available until 2.3.0 (tootsuite/documentation#562)# bundle26 exec rake mastodon:setupcp /.back/mastodon/.env.production .
# rake assets:precompile has a hard dependency on rubymkdir -p .../bin
ln -sf $(command -v ruby26) .../bin/ruby
exportPATH=$(pwd)/.../bin:$PATH# or s/rake/rails/SKIP_POST_DEPLOYMENT_MIGRATIONS=true bundle26 exec rake db:migrate
bundle26 exec rake assets:precompile
yarn run webpack --config config/webpack/production.js
>&2printf'%s; continue?\n''now restart all Mastodon processes'read -r
bundle26 exec rake db:migrate
>&2printf'%s; continue?\n''now restart all Mastodon processes'read -r
# tmux new-session -ds mastodon
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.