Update to v4.1.0+glitch

This commit is contained in:
2023-02-11 10:36:24 -05:00
parent 3d1f2d3bb7
commit fdda59498e
7 changed files with 114 additions and 31 deletions

View File

@@ -240,3 +240,12 @@
[1.10.0] [1.10.0]
* Update base image to 4.0.0 * Update base image to 4.0.0
[1.11.0]
* Update Mastodon to 4.1.0
* [Full changelog](https://github.com/mastodon/mastodon/releases/tag/v4.1.0)
* Add support for importing/exporting server-wide domain blocks (enbylenore, ClearlyClaire, dariusk, ClearlyClaire)
* Add listing of followed hashtags (connorshea)
* Add support for editing media description and focus point of already-sent posts (ClearlyClaire)
* Add follow request banner on account header (ClearlyClaire)
* Add confirmation screen when handling reports (ClearlyClaire, Gargron, tribela)
* Add option to make the landing page be /about even when trends are enabled (ClearlyClaire)

View File

@@ -5,8 +5,8 @@
"description": "file://DESCRIPTION.md", "description": "file://DESCRIPTION.md",
"changelog": "file://CHANGELOG", "changelog": "file://CHANGELOG",
"tagline": "Federated social network", "tagline": "Federated social network",
"version": "1.10.0", "version": "1.11.0",
"upstreamVersion": "4.0.2", "upstreamVersion": "4.1.0",
"healthCheckPath": "/about", "healthCheckPath": "/about",
"httpPort": 8000, "httpPort": 8000,
"memoryLimit": 1610612736, "memoryLimit": 1610612736,

View File

@@ -34,9 +34,9 @@ RUN gem install --no-document bundler
ENV RAILS_ENV production ENV RAILS_ENV production
ENV NODE_ENV production ENV NODE_ENV production
ARG VERSION=4.0.2 ARG VERSION=4.1.0
RUN git clone https://github.com/glitch-soc/mastodon.git /app/code && \ RUN curl -L https://github.com/tootsuite/mastodon/archive/v${VERSION}.tar.gz | tar -xz --strip-components 1 -f - && \
bundle config --local set deployment 'true' && \ bundle config --local set deployment 'true' && \
bundle config --local set without 'development test' && \ bundle config --local set without 'development test' && \
bundle config --local set silence_root_warning true && \ bundle config --local set silence_root_warning true && \

74
Dockerfile.cloudron Normal file
View File

@@ -0,0 +1,74 @@
FROM cloudron/base:4.0.0@sha256:31b195ed0662bdb06a6e8a5ddbedb6f191ce92e8bee04c03fb02dd4e9d0286df
RUN mkdir -p /app/code /app/pkg
WORKDIR /app/code
ARG NODE_VERSION=16.18.1
RUN mkdir -p /usr/local/node-${NODE_VERSION} && \
curl -L https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz | tar zxf - --strip-components 1 -C /usr/local/node-${NODE_VERSION}
ENV PATH /usr/local/node-${NODE_VERSION}/bin:$PATH
RUN apt-get update && \
apt install -y imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git-core \
g++ libprotobuf-dev protobuf-compiler pkg-config nodejs gcc autoconf \
bison build-essential libssl-dev libyaml-dev libreadline6-dev \
zlib1g-dev libncurses5-dev libffi-dev libgdbm-dev \
nginx redis-server redis-tools postgresql postgresql-contrib \
libidn11-dev libicu-dev libjemalloc-dev && \
rm -rf /var/cache/apt /var/lib/apt/lists
# install rbenv since we need ruby 3.0.4
RUN mkdir -p /usr/local/rbenv && curl -LSs "https://github.com/rbenv/rbenv/archive/refs/tags/v1.2.0.tar.gz" | tar -xz -C /usr/local/rbenv --strip-components 1 -f -
ENV PATH /usr/local/rbenv/bin:$PATH
RUN mkdir -p "$(rbenv root)"/plugins/ruby-build && curl -LSs "https://github.com/rbenv/ruby-build/archive/refs/tags/v20221101.tar.gz" | tar -xz -C "$(rbenv root)"/plugins/ruby-build --strip-components 1 -f -
# install specific ruby version (https://github.com/mastodon/mastodon/blob/main/Dockerfile)
ARG RUBY_VERSION=3.0.4
RUN rbenv install ${RUBY_VERSION}
# this allows cloudron user to access ruby
RUN chmod o+rx /root
ENV PATH /root/.rbenv/versions/${RUBY_VERSION}/bin:$PATH
RUN gem install --no-document bundler
ENV RAILS_ENV production
ENV NODE_ENV production
ARG VERSION=4.1.0
RUN git clone https://github.com/glitch-soc/mastodon.git /app/code && \
bundle config --local set deployment 'true' && \
bundle config --local set without 'development test' && \
bundle config --local set silence_root_warning true && \
bundle install && \
yarn install --pure-lockfile
# secret keys are not built into assets, so precompiling is safe to do here
# (these variables are required by rake though)
RUN SECRET_KEY_BASE=insecure.secret_key_base OTP_SECRET=insecure.otp_secret \
bundle exec rake assets:precompile
# https://github.com/rubygems/bundler/issues/5245 means that bundle exec writes to Gemfile.lock
RUN ln -fs /run/mastodon/bullet.log /app/code/log/bullet.log && \
rm -rf /app/code/tmp && ln -fs /tmp/mastodon /app/code/tmp && \
mv /app/code/Gemfile.lock /app/code/Gemfile.lock.original && ln -s /run/mastodon/Gemfile.lock /app/code/Gemfile.lock
# add nginx config
RUN rm /etc/nginx/sites-enabled/* && \
ln -sf /dev/stdout /var/log/nginx/access.log && \
ln -sf /dev/stderr /var/log/nginx/error.log
COPY nginx_readonlyrootfs.conf /etc/nginx/conf.d/readonlyrootfs.conf
COPY nginx/mastodon.conf /etc/nginx/sites-available/mastodon
RUN ln -s /etc/nginx/sites-available/mastodon /etc/nginx/sites-enabled/mastodon
# add supervisor configs
COPY supervisor/* /etc/supervisor/conf.d/
RUN ln -sf /run/mastodon/supervisord.log /var/log/supervisor/supervisord.log
RUN ln -fs /app/data/env.production /app/code/.env.production
RUN ln -fs /app/data/system /app/code/public/system
COPY start.sh cleanup.sh config.sh env.template /app/pkg/
CMD [ "/app/pkg/start.sh" ]

48
test/package-lock.json generated
View File

@@ -9,12 +9,12 @@
"version": "1.0.0", "version": "1.0.0",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"chromedriver": "^108.0.0" "chromedriver": "^110.0.0"
}, },
"devDependencies": { "devDependencies": {
"expect.js": "^0.3.1", "expect.js": "^0.3.1",
"mocha": "^10.2.0", "mocha": "^10.2.0",
"selenium-webdriver": "^4.7.1" "selenium-webdriver": "^4.8.0"
} }
}, },
"node_modules/@testim/chrome-version": { "node_modules/@testim/chrome-version": {
@@ -106,9 +106,9 @@
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
}, },
"node_modules/axios": { "node_modules/axios": {
"version": "1.1.3", "version": "1.3.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.1.3.tgz", "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.2.tgz",
"integrity": "sha512-00tXVRwKx/FZr/IDVFt4C+f9FYairX517WoGCL6dpOntqLkZofjhu43F/Xl44UOpqa+9sLFDrG/XAnFsUYgkDA==", "integrity": "sha512-1M3O703bYqYuPhbHeya5bnhpYVsDDRyQSabNja04mZtboLNSuZ4YrltestrLXfHgmzua4TpUqRiVKbiQuo2epw==",
"dependencies": { "dependencies": {
"follow-redirects": "^1.15.0", "follow-redirects": "^1.15.0",
"form-data": "^4.0.0", "form-data": "^4.0.0",
@@ -234,13 +234,13 @@
} }
}, },
"node_modules/chromedriver": { "node_modules/chromedriver": {
"version": "108.0.0", "version": "110.0.0",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-108.0.0.tgz", "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-110.0.0.tgz",
"integrity": "sha512-/kb0rb0dlC4RfXh2BOT7RV87K6d+It3VV5YXebLzO5a8t2knNffiTE23XPJQCH+l1xmgoW8/sOX/NB9irskvOQ==", "integrity": "sha512-Le6q8xrA/3fAt+g8qiN0YjsYxINIhQMC6wj9X3W5L77uN4NspEzklDrqYNwBcEVn7PcAEJ73nLlS7mTyZRspHA==",
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
"@testim/chrome-version": "^1.1.3", "@testim/chrome-version": "^1.1.3",
"axios": "^1.1.3", "axios": "^1.2.1",
"compare-versions": "^5.0.1", "compare-versions": "^5.0.1",
"extract-zip": "^2.0.1", "extract-zip": "^2.0.1",
"https-proxy-agent": "^5.0.1", "https-proxy-agent": "^5.0.1",
@@ -1103,14 +1103,14 @@
] ]
}, },
"node_modules/selenium-webdriver": { "node_modules/selenium-webdriver": {
"version": "4.7.1", "version": "4.8.0",
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.7.1.tgz", "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.8.0.tgz",
"integrity": "sha512-IfTM9OE8HtCKjOJwyudbAVtAHQKOJK8mu2qrXXbKyj4lqgXF+2lYW4rSZXCV6SLQRWZ+DVGkomCmFzq5orD/ZA==", "integrity": "sha512-s/HL8WNwy1ggHR244+tAhjhyKMJnZLt1HKJ6Gn7nQgVjB/ybDF+46Uui0qI2J7AjPNJzlUmTncdC/jg/kKkn0A==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"jszip": "^3.10.0", "jszip": "^3.10.0",
"tmp": "^0.2.1", "tmp": "^0.2.1",
"ws": ">=8.7.0" "ws": ">=8.11.0"
}, },
"engines": { "engines": {
"node": ">= 14.20.0" "node": ">= 14.20.0"
@@ -1448,9 +1448,9 @@
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
}, },
"axios": { "axios": {
"version": "1.1.3", "version": "1.3.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.1.3.tgz", "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.2.tgz",
"integrity": "sha512-00tXVRwKx/FZr/IDVFt4C+f9FYairX517WoGCL6dpOntqLkZofjhu43F/Xl44UOpqa+9sLFDrG/XAnFsUYgkDA==", "integrity": "sha512-1M3O703bYqYuPhbHeya5bnhpYVsDDRyQSabNja04mZtboLNSuZ4YrltestrLXfHgmzua4TpUqRiVKbiQuo2epw==",
"requires": { "requires": {
"follow-redirects": "^1.15.0", "follow-redirects": "^1.15.0",
"form-data": "^4.0.0", "form-data": "^4.0.0",
@@ -1543,12 +1543,12 @@
} }
}, },
"chromedriver": { "chromedriver": {
"version": "108.0.0", "version": "110.0.0",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-108.0.0.tgz", "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-110.0.0.tgz",
"integrity": "sha512-/kb0rb0dlC4RfXh2BOT7RV87K6d+It3VV5YXebLzO5a8t2knNffiTE23XPJQCH+l1xmgoW8/sOX/NB9irskvOQ==", "integrity": "sha512-Le6q8xrA/3fAt+g8qiN0YjsYxINIhQMC6wj9X3W5L77uN4NspEzklDrqYNwBcEVn7PcAEJ73nLlS7mTyZRspHA==",
"requires": { "requires": {
"@testim/chrome-version": "^1.1.3", "@testim/chrome-version": "^1.1.3",
"axios": "^1.1.3", "axios": "^1.2.1",
"compare-versions": "^5.0.1", "compare-versions": "^5.0.1",
"extract-zip": "^2.0.1", "extract-zip": "^2.0.1",
"https-proxy-agent": "^5.0.1", "https-proxy-agent": "^5.0.1",
@@ -2176,14 +2176,14 @@
"dev": true "dev": true
}, },
"selenium-webdriver": { "selenium-webdriver": {
"version": "4.7.1", "version": "4.8.0",
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.7.1.tgz", "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.8.0.tgz",
"integrity": "sha512-IfTM9OE8HtCKjOJwyudbAVtAHQKOJK8mu2qrXXbKyj4lqgXF+2lYW4rSZXCV6SLQRWZ+DVGkomCmFzq5orD/ZA==", "integrity": "sha512-s/HL8WNwy1ggHR244+tAhjhyKMJnZLt1HKJ6Gn7nQgVjB/ybDF+46Uui0qI2J7AjPNJzlUmTncdC/jg/kKkn0A==",
"dev": true, "dev": true,
"requires": { "requires": {
"jszip": "^3.10.0", "jszip": "^3.10.0",
"tmp": "^0.2.1", "tmp": "^0.2.1",
"ws": ">=8.7.0" "ws": ">=8.11.0"
} }
}, },
"serialize-javascript": { "serialize-javascript": {

View File

@@ -11,9 +11,9 @@
"devDependencies": { "devDependencies": {
"expect.js": "^0.3.1", "expect.js": "^0.3.1",
"mocha": "^10.2.0", "mocha": "^10.2.0",
"selenium-webdriver": "^4.7.1" "selenium-webdriver": "^4.8.0"
}, },
"dependencies": { "dependencies": {
"chromedriver": "^108.0.0" "chromedriver": "^110.0.0"
} }
} }

View File

@@ -55,7 +55,7 @@ describe('Application life cycle test', function () {
if (mode === 'none') { if (mode === 'none') {
await browser.get('https://' + app.fqdn); await browser.get('https://' + app.fqdn);
await browser.sleep(2000); await browser.sleep(2000);
await browser.findElement(By.xpath('//button/span[contains(text(), "Create account")]')).click(); await browser.findElement(By.xpath('//div[@class="sign-in-banner"]/descendant::button/span[contains(text(), "Create account")]')).click();
await visible(By.xpath('//span[contains(text()[2], "is currently not possible")]')); await visible(By.xpath('//span[contains(text()[2], "is currently not possible")]'));
} else if (mode === 'open') { } else if (mode === 'open') {
await browser.get('https://' + app.fqdn + '/auth/sign_up'); await browser.get('https://' + app.fqdn + '/auth/sign_up');