Skip to content
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

Backport all flutter & flutter package changes to 23.05 #257166

Merged
merged 31 commits into from
Sep 25, 2023

Conversation

mkg20001
Copy link
Member

@mkg20001 mkg20001 commented Sep 25, 2023

Description of changes

This PR upgrades fluffychat and flutter to migtate CVE-2023-4863

Note that this requires pulling in all flutter upgrades and subsequently all package updates, since they depend on those.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

gilice and others added 5 commits September 25, 2023 02:30
(cherry picked from commit b591475)
Among other things, this way the version
is displayed correctly in package search

(cherry picked from commit 55a4d6b)
(cherry picked from commit e12ae52)
(cherry picked from commit 2a550d8)
@mkg20001 mkg20001 changed the title Upgrade fluffychat & everything flutter Upgrade fluffychat & everything flutter in release-23.05 Sep 25, 2023
FlafyDev and others added 3 commits September 25, 2023 03:04
(cherry picked from commit dcf789f)
flutter-unwrapped will now not come with engine artifacts in its cache directory(`$out/bin/cache`).

To specify a different cache directory, set FLUTTER_CACHE_DIR.

Flutter's wrapper now sets FLUTTER_CACHE_DIR to set engine artifacts.

The sh file `$out/bin/internal/shared.sh` runs when launching Flutter and calls `"$FLUTTER_ROOT/bin/cache/` instead of our environment variable `FLUTTER_CACHE_DIR`.
I decided not to patch it since the script doesn't require engine artifacts(which are the only thing not added by the unwrapped derivation), so it shouldn't fail, and patching it will just be harder to maintain.

(cherry picked from commit 570f3ef)
@ofborg ofborg bot requested a review from gilice September 25, 2023 01:04
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Sep 25, 2023
devholic and others added 17 commits September 25, 2023 03:05
Signed-off-by: Sunghoon Kang <[email protected]>
(cherry picked from commit 7770274)
Signed-off-by: Sunghoon Kang <[email protected]>
(cherry picked from commit 8cb8349)
Signed-off-by: Sunghoon Kang <[email protected]>
(cherry picked from commit 77618bd)
Signed-off-by: Sunghoon Kang <[email protected]>
(cherry picked from commit 37a10c3)
The flutter team has also started doing this, but only for new
artifacts. This way, we also do it for older artifacts.

(cherry picked from commit c34385b)
…0a6fd5db59314

Using fetchurl like this means that, if you build the `flutter`
derivation first, you will get a file named "LICENSE" in your store with
the correct hash. `flutter37` will then build because this file is
already in your store, even though the LICENSE to which _it_ refers is
different. This is dangerous in this case - but an intentional design
decision in the way fetchurl works to allow artifacts which are the same
to be fetched from arbitrary sources, or even pre-populated into the
store.

To avoid this, explicitly tag the fetchurl with a name and the commit
hash we're fetching from. This means we _must_ fetch these separately
for each flutter version and avoids the problem of accidentally reusing
artifacts for a different build.

(cherry picked from commit 19cd58a)
flutter: Update remaining engine artifact hashes for v3.13.0

Co-Authored-By: hacker1024 <[email protected]>
(cherry picked from commit 40e8205)
(cherry picked from commit c511f60)
(cherry picked from commit 64b86c1)
Flutter's Linux desktop embedding uses GTK. wrapGAppsHook should be used.

(cherry picked from commit 84347c2)
(cherry picked from commit 3a034cb)
lukegb and others added 4 commits September 25, 2023 03:16
The shader in question no longer contains references to the SDK, and the derivation's debug output has valid references.

(cherry picked from commit 0606fd6)
@mkg20001 mkg20001 changed the title Upgrade fluffychat & everything flutter in release-23.05 Backport all flutter & flutter package changes to 23.05 Sep 25, 2023
@mkg20001
Copy link
Member Author

Result of nixpkgs-review pr 257166 run on x86_64-linux 1

16 packages built:
  • firmware-updater
  • firmware-updater.debug
  • fluffychat
  • fluffychat.debug
  • flutter
  • flutter-unwrapped
  • flutter-unwrapped.cache
  • flutter2
  • flutter2-unwrapped
  • flutter2-unwrapped.cache
  • flutter37
  • flutter37-unwrapped
  • flutter37-unwrapped.cache
  • hover
  • yubioath-flutter
  • yubioath-flutter.debug

@mkg20001 mkg20001 marked this pull request as ready for review September 25, 2023 01:51
@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Sep 25, 2023
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 10.rebuild-linux: 11-100 and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Sep 25, 2023
@gilice
Copy link
Member

gilice commented Sep 25, 2023

Don't we have to mark old flutters as insecure anyways (or try to patch them?)

@mkg20001
Copy link
Member Author

Propably. I'd go for just marking them insecure.

@gilice
Copy link
Member

gilice commented Sep 25, 2023

We should still check if the patch is easy to apply (it should probably still be marked as insecure until)

@mkg20001
Copy link
Member Author

I don't know if it's worth the effort, considering there might be other security issues aswell.

@mkg20001 mkg20001 merged commit f805930 into NixOS:release-23.05 Sep 25, 2023
@mkg20001 mkg20001 deleted the flutterupgrade branch September 25, 2023 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-linux: 11-100 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants