Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] blender: fixes broken assets
@ 2025-01-04  7:31 CaioFrancisco
  2025-01-04  7:53 ` sgn
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: CaioFrancisco @ 2025-01-04  7:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2148 bytes --]

There is a new pull request by CaioFrancisco against master on the void-packages repository

https://github.com/CaioFrancisco/void-packages blender_assets_fix
https://github.com/void-linux/void-packages/pull/53833

blender: fixes broken assets
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
<!--
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

#### What? Huh? Why?

Fixes #53648.

it's 4:30AM, i'm probably gonna type something close to what i typed in the comments.

The Blender repository recently shuffled a few features around internally, and put the new brushes (and possibly more tools) in a submodule pointing to the `blender-assets` repository. Unfortunately, this repository also has heavy usage of the Git LFS system, and because of https://github.com/go-gitea/gitea/issues/4773, we can no longer just download the archive of the repository and extract it into the proper place in this particular scenario. The solution I implemented was just git cloning the `blender-assets` repository into the right place, settings up LFS and then pulling the LFS files. Luckily enough, `blender-assets` tags mirror Blender's own version releases, so we can just use Blender's version to find the right `blender-assets` tag.

A patch file from https://github.com/void-linux/void-packages/pull/53833.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-blender_assets_fix-53833.patch --]
[-- Type: text/x-diff, Size: 2605 bytes --]

From cec46426eb22430dee34798e5aa9254c99471d24 Mon Sep 17 00:00:00 2001
From: CaioFrancisco <caiooofranc (at) proton (dot) me>
Date: Sat, 4 Jan 2025 04:16:43 -0300
Subject: [PATCH 1/2] Fixes broken Blender assets.

---
 srcpkgs/blender/template | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/blender/template b/srcpkgs/blender/template
index 8aec56d4083906..970316afaa0f99 100644
--- a/srcpkgs/blender/template
+++ b/srcpkgs/blender/template
@@ -14,7 +14,7 @@ configure_args="-DWITH_INSTALL_PORTABLE=OFF -DWITH_PYTHON_INSTALL=OFF
  -DWITH_BUILDINFO=OFF -DPYTHON_VERSION=${py3_ver} -DPYTHON_LIBPATH=/usr/lib
  -DPYTHON_LIBRARY=python${py3_ver}${py3_abiver} -DPYTHON_INCLUDE_DIRS=/${py3_inc}
  -DWITH_SYSTEM_LZO=ON -DWITH_SYSTEM_EIGEN3=ON -DWITH_SYSTEM_FREETYPE=ON"
-hostmakedepends="pkg-config"
+hostmakedepends="pkg-config git git-lfs"
 makedepends="libgomp-devel libpng-devel tiff-devel python3-devel glu-devel
  glew-devel freetype-devel jack-devel libopenal-devel libsndfile-devel
  libsamplerate-devel ffmpeg6-devel fftw-devel boost-devel pcre-devel llvm
@@ -51,3 +51,12 @@ x86_64*)
 	configure_args+=" -DWITH_OPENIMAGEDENOISE=ON"
 	;;
 esac
+
+# The Blender repository has a submodule that stores important assets, which uses the `blender/blender-assets` repository at `projects.blender.org`. Unfortunately, this repository is mostly composed of Git LFS files, and due a bug in gitea, the git hosting software that the website uses, the repository's tag archives (both .zip and .tar.gz) only contain LFS pointer files, which cannot be used at all.
+# The safest workaround to this bug is to clone the repository and resolving the LFS pointers manually.
+post_extract() {
+    git clone -b "v${version}" "https://projects.blender.org/blender/blender-assets.git" release/datafiles/assets/
+    git -C release/datafiles/assets/ lfs install
+    git -C release/datafiles/assets/ lfs pull
+}
+

From 62079741d2fcecbb50a5f87a7387f5648db8ec71 Mon Sep 17 00:00:00 2001
From: CaioFrancisco <caiooofranc (at) proton (dot) me>
Date: Sat, 4 Jan 2025 04:29:26 -0300
Subject: [PATCH 2/2] revisionnumberguhhhhhh

---
 srcpkgs/blender/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/blender/template b/srcpkgs/blender/template
index 970316afaa0f99..3eca2c30ff6f4c 100644
--- a/srcpkgs/blender/template
+++ b/srcpkgs/blender/template
@@ -1,7 +1,7 @@
 # Template file for 'blender'
 pkgname=blender
 version=4.3.1
-revision=1
+revision=2
 archs="x86_64* ppc64*"
 build_style="cmake"
 pycompile_dirs="usr/share/blender/${version%.*}/scripts"

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: blender: fixes broken assets
  2025-01-04  7:31 [PR PATCH] blender: fixes broken assets CaioFrancisco
@ 2025-01-04  7:53 ` sgn
  2025-01-04 18:37 ` CaioFrancisco
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: sgn @ 2025-01-04  7:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2222 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/53833#issuecomment-2570604965

Comment:
Can you try our blender with assets from their prebuilt binaries?

https://download.blender.org/release/Blender4.3/

They provides:

```
blender-4.3.2-linux-x64/4.3/python/lib/python3.11/site-packages/charset_normalizer/assets/
blender-4.3.2-linux-x64/4.3/python/lib/python3.11/site-packages/charset_normalizer/assets/__pycache__/
blender-4.3.2-linux-x64/4.3/python/lib/python3.11/site-packages/charset_normalizer/assets/__pycache__/__init__.cpython-311.pyc
blender-4.3.2-linux-x64/4.3/python/lib/python3.11/site-packages/charset_normalizer/assets/__init__.py
blender-4.3.2-linux-x64/4.3/scripts/startup/bl_operators/assets.py
blender-4.3.2-linux-x64/4.3/scripts/startup/bl_operators/__pycache__/assets.cpython-311.pyc
blender-4.3.2-linux-x64/4.3/datafiles/assets/
blender-4.3.2-linux-x64/4.3/datafiles/assets/LICENSE
blender-4.3.2-linux-x64/4.3/datafiles/assets/geometry_nodes/
blender-4.3.2-linux-x64/4.3/datafiles/assets/geometry_nodes/procedural_hair_node_assets.blend
blender-4.3.2-linux-x64/4.3/datafiles/assets/geometry_nodes/smooth_by_angle.blend
blender-4.3.2-linux-x64/4.3/datafiles/assets/brushes/
blender-4.3.2-linux-x64/4.3/datafiles/assets/brushes/essentials_brushes-gp_vertex.blend
blender-4.3.2-linux-x64/4.3/datafiles/assets/brushes/essentials_brushes-curve_sculpt.blend
blender-4.3.2-linux-x64/4.3/datafiles/assets/brushes/essentials_brushes-gp_sculpt.blend
blender-4.3.2-linux-x64/4.3/datafiles/assets/brushes/essentials_brushes-mesh_weight.blend
blender-4.3.2-linux-x64/4.3/datafiles/assets/brushes/essentials_brushes-mesh_texture.blend
blender-4.3.2-linux-x64/4.3/datafiles/assets/brushes/essentials_brushes-mesh_vertex.blend
blender-4.3.2-linux-x64/4.3/datafiles/assets/brushes/essentials_brushes-gp_weight.blend
blender-4.3.2-linux-x64/4.3/datafiles/assets/brushes/essentials_brushes-gp_draw.blend
blender-4.3.2-linux-x64/4.3/datafiles/assets/brushes/essentials_brushes-mesh_sculpt.blend
blender-4.3.2-linux-x64/4.3/datafiles/assets/blender_assets.cats.txt
```

If that works, it would be better than fetching with git and git-lfs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: blender: fixes broken assets
  2025-01-04  7:31 [PR PATCH] blender: fixes broken assets CaioFrancisco
  2025-01-04  7:53 ` sgn
@ 2025-01-04 18:37 ` CaioFrancisco
  2025-01-05  6:27 ` CaioFrancisco
  2025-01-05  6:27 ` CaioFrancisco
  3 siblings, 0 replies; 5+ messages in thread
From: CaioFrancisco @ 2025-01-04 18:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 260 bytes --]

New comment by CaioFrancisco on void-packages repository

https://github.com/void-linux/void-packages/pull/53833#issuecomment-2571378958

Comment:
it feels hackier to extract them from the binaries themselves just so we can build the binaries again, but sure.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: blender: fixes broken assets
  2025-01-04  7:31 [PR PATCH] blender: fixes broken assets CaioFrancisco
  2025-01-04  7:53 ` sgn
  2025-01-04 18:37 ` CaioFrancisco
@ 2025-01-05  6:27 ` CaioFrancisco
  2025-01-05  6:27 ` CaioFrancisco
  3 siblings, 0 replies; 5+ messages in thread
From: CaioFrancisco @ 2025-01-05  6:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 665 bytes --]

New comment by CaioFrancisco on void-packages repository

https://github.com/void-linux/void-packages/pull/53833#issuecomment-2571518871

Comment:
@sgn i wasn't able to get nor `xrscextract` nor `xrsccopy` to behave (even after your latest commit), so i'm giving up on implementing your suggestion, sorry.

also, quoting myself from the issue,
> oreo mentioned in the IRC that he contacted with Blender's very own Sebastian Parborg and Sebastian said this is gonna get fixed in the next release
so this might not even be necessary at all. you may close this PR if you don't think it's worth it to keep my git workaround up until what could be just a few weeks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: blender: fixes broken assets
  2025-01-04  7:31 [PR PATCH] blender: fixes broken assets CaioFrancisco
                   ` (2 preceding siblings ...)
  2025-01-05  6:27 ` CaioFrancisco
@ 2025-01-05  6:27 ` CaioFrancisco
  3 siblings, 0 replies; 5+ messages in thread
From: CaioFrancisco @ 2025-01-05  6:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 667 bytes --]

New comment by CaioFrancisco on void-packages repository

https://github.com/void-linux/void-packages/pull/53833#issuecomment-2571518871

Comment:
@sgn i wasn't able to get nor `xrscextract` nor `xrsccopy` to behave (even after your latest commit), so i'm giving up on implementing your suggestion, sorry.

also, quoting myself from the issue,
> oreo mentioned in the IRC that he contacted with Blender's very own Sebastian Parborg and Sebastian said this is gonna get fixed in the next release

so this might not even be necessary at all. you may close this PR if you don't think it's worth it to keep my git workaround up until what could be just a few weeks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-01-05  6:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-04  7:31 [PR PATCH] blender: fixes broken assets CaioFrancisco
2025-01-04  7:53 ` sgn
2025-01-04 18:37 ` CaioFrancisco
2025-01-05  6:27 ` CaioFrancisco
2025-01-05  6:27 ` CaioFrancisco

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).