-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
discourse: update 3.1.0.beta4 -> 3.1.0 #250735
Conversation
Also @Ma27 and @kira-bruneau patched this expression lately... pinging you two here. |
I have no idea why the variable is not visible later after a |
This is because of #240000 🫠 |
We should probably bump discourse from |
Oh yep, the change I made was to account for building dart-sass-embedded from source.
🫠 I like that general approach, but not really sure why it'd break discourse. It also looks like dart-sass-embedded isn't needed anymore either (now that the embedded part was merged into dart-sass). We should probably deprecate it once discourse is updated. |
Alright, I'm fairly new to this process but will gladly help out! Should I close this and instead try to update discourse? @emilylange |
@TheNeikos would be awesome if you could give updating discourse a try! (It's rather difficult, but I am here if you need any help) Feel free to either re-use this PR or create a new one :) |
Are you still interested @TheNeikos? |
Yes! I did not see that you replied two weeks ago... Lemme get to it |
PHEW Okay, this was a wild ride. The I followed the |
ed86dcf
to
d9f86d4
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.
Wow, thank you a lot!
Just a few things:
I believe you can drop the whole dart-sass
section now
diff --git a/pkgs/servers/web-apps/discourse/default.nix b/pkgs/servers/web-apps/discourse/default.nix
index 23f09f897a6f..b5064cd078ac 100644
--- a/pkgs/servers/web-apps/discourse/default.nix
+++ b/pkgs/servers/web-apps/discourse/default.nix
@@ -38,7 +38,6 @@
, fixup_yarn_lock
, nodePackages
, nodejs_16
-, dart-sass-embedded
, jq
, moreutils
@@ -189,20 +188,6 @@ let
cp $(readlink -f ${libpsl}/lib/libpsl.so) vendor/libpsl.x86_64.so
'';
};
- sass-embedded = gems.sass-embedded // {
- dontBuild = false;
- # `sass-embedded` depends on `dart-sass-embedded` and tries to
- # fetch that as `.tar.gz` from GitHub releases. That `.tar.gz`
- # can also be specified via `SASS_EMBEDDED`. But instead of
- # compressing our `dart-sass-embedded` just to decompress it
- # again, we simply patch the Rakefile to symlink that path.
- patches = [
- ./rubyEnv/sass-embedded-static.patch
- ];
- preBuild = ''
- export DART_SASS=${dart-sass-embedded}/bin
- '';
- };
};
groups = [
diff --git a/pkgs/servers/web-apps/discourse/rubyEnv/sass-embedded-static.patch b/pkgs/servers/web-apps/discourse/rubyEnv/sass-embedded-static.patch
deleted file mode 100644
index 86c343e30fd1..000000000000
--- a/pkgs/servers/web-apps/discourse/rubyEnv/sass-embedded-static.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/ext/sass/Rakefile b/ext/sass/Rakefile
-index 4ca11d4f82ea..c0450ad6f8f3 100644
---- a/ext/sass/Rakefile
-+++ b/ext/sass/Rakefile
-@@ -18,15 +18,7 @@ file 'protoc.exe' do |t|
- end
-
- file 'dart-sass' do |t|
-- raise if ENV.key?('DART_SASS')
--
-- gem_install 'sass-embedded', SassConfig.gem_version, SassConfig.gem_platform do |dir|
-- cp_r File.absolute_path("ext/sass/#{t.name}", dir), t.name
-- end
--rescue StandardError
-- archive = fetch(ENV.fetch('DART_SASS') { SassConfig.default_dart_sass })
-- unarchive archive
-- rm archive
-+ symlink(ENV.fetch('DART_SASS'), t.name)
- end
-
- file 'cli.rb' => %w[dart-sass] do |t|
and drop your original commit titled discourse: fix missing SASS_EMBEDDED during build
(fb267fcbe98823470653a3b62e261628cdbbb1c0).
Commit titles (current
-> suggestion
):
discourse: Run update script and fix patch for it
->
discourse: 3.1.0.beta4 -> 3.1.0
discourse: Do not use deprecated field in discourse test
->
nixosTests.discourse: do not use deprecated field
(ornixos/tests/discourse: do not use deprecated field
)discourse: Update discourse plugins
->
discourseAllPlugins: update all
discourse: Update ABI patch for discourse-prometheus
->
discourseAllPlugins.plugins.discourse-prometheus: update ABI patch
(or just keep it, I dunno -- no strong feelings. my suggestion feels a bit ridiculous, but this would be the proper attr name but oh well /shrug)
@emilylange I don’t mind removing the patch, but given the comment it still feels applicable? Symlinking seems better than copying and unpacking something from the store. I’ll fix the commit messages, thanks! |
That patch is redundant since #240000. |
The update.py script would error out if the spec had a trailing new line. The split that follows it would try to split it into two, and error out as it can't.
d9f86d4
to
674a38b
Compare
@emilylange Alright, here we go I think that's all your requests |
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.
Thanks!
Result of nixpkgs-review pr 250735
run on x86_64-linux 1
2 packages built:
- discourse
- discourseAllPlugins
pkgs/servers/web-apps/discourse/rubyEnv/sass-embedded-static.patch
Outdated
Show resolved
Hide resolved
This was fixed globally in NixOS#240000 and thus is not needed here anymore.
674a38b
to
8e8a6ed
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.
Thanks a lot for working on upgrading discourse!
nodejs-16.20.2
is marked as insecure, so it needs to be updated to nodejs_18
to work without permittedInsecurePackages = ...
. The tests don't pass on ofborg because of this.
This works for me:
diff --git a/pkgs/servers/web-apps/discourse/default.nix b/pkgs/servers/web-apps/discourse/default.nix
index c86725f1e49b..ed67a36d52fa 100644
--- a/pkgs/servers/web-apps/discourse/default.nix
+++ b/pkgs/servers/web-apps/discourse/default.nix
@@ -37,7 +37,7 @@
, yarn
, fixup_yarn_lock
, nodePackages
-, nodejs_16
+, nodejs_18
, dart-sass-embedded
, jq
, moreutils
@@ -162,9 +162,9 @@ let
cd ../..
mkdir -p vendor/v8/${stdenv.hostPlatform.system}/libv8/obj/
- ln -s "${nodejs_16.libv8}/lib/libv8.a" vendor/v8/${stdenv.hostPlatform.system}/libv8/obj/libv8_monolith.a
+ ln -s "${nodejs_18.libv8}/lib/libv8.a" vendor/v8/${stdenv.hostPlatform.system}/libv8/obj/libv8_monolith.a
- ln -s ${nodejs_16.libv8}/include vendor/v8/include
+ ln -s ${nodejs_18.libv8}/include vendor/v8/include
mkdir -p ext/libv8-node
echo '--- !ruby/object:Libv8::Node::Location::Vendor {}' >ext/libv8-node/.location.yml
@@ -212,7 +212,7 @@ let
nodePackages.terser
nodePackages.patch-package
yarn
- nodejs_16
+ nodejs_18
jq
moreutils
];
We usually update to the latest beta release, and 3.2.0.beta1
was just released. That's probably more work than just running the updater, though, so let's do that in a separate PR.
Suggested-by: talyz <[email protected]>
@talyz Alrighty! Updated |
I'm looking forward for this update! |
Will this be backported into 23.05 or only available for 23.11 in the future? (not sure what the criteria is for updates like this) |
Backport failed for Please cherry-pick the changes locally. git fetch origin release-23.05
git worktree add -d .worktree/backport-250735-to-release-23.05 origin/release-23.05
cd .worktree/backport-250735-to-release-23.05
git checkout -b backport-250735-to-release-23.05
ancref=$(git merge-base 0987c80f48b63cfa0e9a12aafd99474079495ae5 bbdccb8eb9a4964f43c12e6eff8e35c714190f47)
git cherry-pick -x $ancref..bbdccb8eb9a4964f43c12e6eff8e35c714190f47 |
Added the backport label. IMO this does clearly qualify for a backport, as it updates from a beta release to a stable release.
|
This is fine but the backport needs to be done manually :( |
Fixes #249901: "discourse Build failure"
I've also built
discourseAllPlugins
without issuesDescription of changes
The
SASS_EMBEDDED
env variable was not visible later in the build. This patch moves it to the preBuild phase, so that it is visible when needed.Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)