Package: release.debian.org Severity: normal Tags: patch X-Debbugs-CC: Tobias Frost <[email protected]> User: [email protected] Usertags: pu
I misunderstood a bit in #1130115 (trixie-pu: package freecad) and thought a suggestion from Adrian Bunk was actually from the release team and uploaded an update for the change approvided in #1130115 to avoid a race issue with the uploaded build. The issue is alredy addressed in unstable and testing, and the patch was fetched from the unstable edition. This is the complete patch for my proposed update (also available in the salsa git repo as branch pere/debian/trixie. Note the 1040-fix-cmake-race.patch file is identical to the one already applied in unstable. I've tested the change on trixie, and the script work as it should there. diff --git a/debian/changelog b/debian/changelog index 38c2dd519..85a42bdc7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +freecad (1.0.0+dfsg-8+deb13u2) trixie; urgency=medium + + * Maintaner approvided upload. + * Backport patch 1040-fix-cmake-race.patch to fix FTBFS on arm64. + + -- Petter Reinholdtsen <[email protected]> Sat, 27 Jun 2026 09:50:13 +0200 + freecad (1.0.0+dfsg-8+deb13u1) trixie; urgency=medium * Maintaner approvided upload. diff --git a/debian/patches/1040-fix-cmake-race.patch b/debian/patches/1040-fix-cmake-race.patch new file mode 100644 index 000000000..ce90765d1 --- /dev/null +++ b/debian/patches/1040-fix-cmake-race.patch @@ -0,0 +1,30 @@ +Description: FTBFS on arm64 - race condition in CMakeLists.txt for Mod/Assembly + Avoid race in Assembly file copying by removing overlap and enforcing target + order. Ensure AssemblyScripts runs before AssemblyTests to guarantee + directories exist. Fixes intermittent FTBFS on arm64. +Author: Tobias Frost <[email protected]> +Forwarded: https://github.com/FreeCAD/FreeCAD/pull/29576 +Applied-Upstream: https://github.com/FreeCAD/FreeCAD/commit/1462b5c038bf674170ddcc6e51e31af0df3433ac +Last-Update: 2026-04-23 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/src/Mod/Assembly/CMakeLists.txt ++++ b/src/Mod/Assembly/CMakeLists.txt +@@ -79,8 +79,16 @@ + SOURCES ${test_files} + ) + ++# Target AssemblyScripts handles copying AssemblyTests_SRCS and AssemblyScripts_SRCS + fc_copy_sources(AssemblyScripts "${CMAKE_BINARY_DIR}/Mod/Assembly" ${all_files}) +-fc_copy_sources(AssemblyTests "${CMAKE_BINARY_DIR}/Mod/Assembly" ${test_files}) ++ ++# Target AssemblyTests should only handle copying the remaining Assembly_Scripts ++# to avoid racing with AssemblyScripts over the same files. ++fc_copy_sources(AssemblyTests "${CMAKE_BINARY_DIR}/Mod/Assembly" ${Assembly_Scripts}) ++ ++# Ensure AssemblyScripts finishes its directory creation and copying before ++# AssemblyTests begins. ++add_dependencies(AssemblyTests AssemblyScripts) + + INSTALL( + FILES diff --git a/debian/patches/series b/debian/patches/series index 0db094fce..1020dae2f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -5,6 +5,7 @@ 2040-ftbfs-macappbundle.patch 2060-fix-linking.patch 2070-use-nlohmann-json3-dev.patch +1040-fix-cmake-race.patch 1080-fix-FTBFS-due-dfsg-repacking-p1.patch 1081-fix-FTBFS-due-dfsg-repacking-p2.patch 1090-freecad-spelling-allow-one.patch -- Happy hacking Petter Reinholdtsen

