-
-
Notifications
You must be signed in to change notification settings - Fork 13.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mastodon: 4.2.13 -> 4.3.0 #337545
base: master
Are you sure you want to change the base?
mastodon: 4.2.13 -> 4.3.0 #337545
Conversation
3ac888c
to
b227da2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far. The first commit is missing a link to the changelog (please put that also in the PR description) and the two commits would need to be squashed, as it wouldn't make sense to apply/revert them individually, afait.
b227da2
to
1e1b0e9
Compare
Will close #277697 |
bin/rails db:encryption:init | grep --only-matching "ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=[^ ]\+" | sed 's/^ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=//' > /var/lib/mastodon/secrets/active-record-encryption-deterministic-key | ||
fi | ||
|
||
if ! test -f /var/lib/mastodon/secrets/active-record-encryption-key-derivation-salt; then | ||
mkdir -p /var/lib/mastodon/secrets | ||
bin/rails db:encryption:init | grep --only-matching "ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=[^ ]\+" | sed 's/^ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=//' > /var/lib/mastodon/secrets/active-record-encryption-key-derivation-salt | ||
fi | ||
|
||
if ! test -f /var/lib/mastodon/secrets/active-record-encryption-primary-key; then | ||
mkdir -p /var/lib/mastodon/secrets | ||
bin/rails db:encryption:init | grep --only-matching "ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=[^ ]\+" | sed 's/^ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=//' > /var/lib/mastodon/secrets/active-record-encryption-deterministic-key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it safe to run this as three separate invocations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the keys are independent of each other.
I haven't finished this piece of code yet.
The precompiled bootsnap code requires write access, me need to do it differently:
|
How about we set |
Moved to |
ccf4b4e
to
240d739
Compare
Everything seems to be working :) |
240d739
to
1ecbd26
Compare
b852c65
to
237b0f8
Compare
Update to 4.3.0-rc.1. |
237b0f8
to
17e2ccb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably a bigger topic for another PR but can't we put all the secrets into one file read by EnviromentFile?
hash = yarnHash; | ||
}; | ||
|
||
nativeBuildInputs = [ fixup-yarn-lock nodejs-slim yarn mastodonGems mastodonGems.wrappedRuby brotli ]; | ||
nativeBuildInputs = [ nodejs-slim yarn-berry mastodonGems mastodonGems.wrappedRuby brotli python3 ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need such an old python version? Maybe distutils? Can we add it in an env instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If use the latest versions of Pythons a build error occurs:
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info it worked if it ends with ok
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info using node-gyp@10.0.1
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info using node@20.17.0 | linux | x64
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info find Python using Python version 3.12.5 found at "/nix/store/h3i0acpmr8mrjx07519xxmidv8mpax4y-python3-3.12.5/bin/python3"
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn /nix/store/h3i0acpmr8mrjx07519xxmidv8mpax4y-python3-3.12.5/bin/python3
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args [
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args '/build/source/node_modules/node-gyp/gyp/gyp_main.py',
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args 'binding.gyp',
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args '-f',
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args 'make',
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args '-I',
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args '/build/source/node_modules/utf-8-validate/build/config.gypi',
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args '-I',
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args '/build/source/node_modules/node-gyp/addon.gypi',
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args '-I',
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args '/nix/store/a3rj28n8mblqs26nrn7wzl4m8hda8rkk-nodejs-slim-22.8.0/include/node/common.gypi',
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args '-Dlibrary=shared_library',
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args '-Dvisibility=default',
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args '-Dnode_root_dir=/nix/store/a3rj28n8mblqs26nrn7wzl4m8hda8rkk-nodejs-slim-22.8.0',
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args '-Dnode_gyp_dir=/build/source/node_modules/node-gyp',
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args '-Dnode_lib_file=/nix/store/a3rj28n8mblqs26nrn7wzl4m8hda8rkk-nodejs-slim-22.8.0/$(Configuration)/node.lib',
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args '-Dmodule_root_dir=/build/source/node_modules/utf-8-validate',
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args '-Dnode_engine=v8',
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args '--depth=.',
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args '--no-parallel',
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args '--generator-output',
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args 'build',
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args '-Goutput_dir=.'
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args ]
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR <string>:17: SyntaxWarning: invalid escape sequence '\.'
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn make
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDOUT make: Entering directory '/build/source/node_modules/utf-8-validate/build'
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDOUT CXX(target) Release/obj.target/validation/src/validation.o
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDOUT CXX(target) Release/obj.target/validation/deps/is_utf8/src/is_utf8.o
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDOUT SOLINK_MODULE(target) Release/obj.target/validation.node
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDOUT COPY Release/validation.node
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDOUT make: Leaving directory '/build/source/node_modules/utf-8-validate/build'
➤ YN0000: │ utf-8-validate@npm:6.0.4 STDERR gyp info ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see an error in the logs and locally it build also fine. Am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be seen with the additional parameter --inline-builds
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try adding setuptools. That often fixed issues with pre-gyp and the like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The setuptools
package does not resolve the error.
I think the current option is easier to handle with scripts. |
269b1a5
to
05f12f0
Compare
This comment was marked as resolved.
This comment was marked as resolved.
hash, | ||
}: | ||
stdenvNoCC.mkDerivation { | ||
name = "yarn-deps"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name = "yarn-deps"; | |
pname = "yarn-deps"; | |
inherit version; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error:
… while calling the 'derivationStrict' builtin
at <nix/derivation-internal.nix>:34:12:
33|
34| strict = derivationStrict drvAttrs;
| ^
35|
… while evaluating derivation 'mastodon-4.3.0'
whose name attribute is located at /home/lafiel/works/src-nix/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:336:7
… while evaluating attribute 'mastodonModules' of derivation 'mastodon-4.3.0'
at /home/user/works/src-nix/nixpkgs/pkgs/servers/mastodon/default.nix:26:3:
25|
26| mastodonModules = stdenv.mkDerivation {
| ^
27| pname = "${pname}-modules";
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: undefined variable 'version'
at /home/user/works/src-nix/nixpkgs/pkgs/servers/mastodon/yarn.nix:10:11:
9| pname = "yarn-deps";
10| inherit version;
| ^
11| nativeBuildInputs = [
This comment was marked as off-topic.
This comment was marked as off-topic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise I deployed this to my instance without any problems other than the yarn-berry issue mentioned above.
79a85f3
to
a61d406
Compare
Description of changes
Updata package to version 4.3.0.
Changelog: https://github.com/mastodon/mastodon/releases/tag/v4.3.0-beta.1
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.