From 6f8d076d4b93719df6671c3e6608bd3bbe3238ba Mon Sep 17 00:00:00 2001 From: robojerk Date: Sun, 7 Sep 2025 16:38:23 -0700 Subject: [PATCH] Simplify Docker approach: run build commands directly in container - Remove separate script file creation that was causing file sharing issues - Execute all build commands directly in Docker container using bash -c - Eliminate host/container file sharing complexity - Fix 'No such file or directory' error from run #7 This approach avoids the script file sharing issues by running everything directly in the container without intermediate files. --- .forgejo/workflows/ci.yml | 38 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index e1fe860..c1d13b7 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -41,20 +41,22 @@ jobs: - name: Build libfuse in Debian container run: | - # Create workspace directory if it doesn't exist - mkdir -p /workspace/particle-os/libfuse - - # Create a script to run inside the container - cat > /workspace/particle-os/libfuse/build_libfuse.sh << 'EOF' + # Run the build directly in Debian container + docker run --rm \ + --add-host=host.docker.internal:host-gateway \ + -v /workspace/particle-os/libfuse:/workspace \ + -w /workspace \ + debian:trixie \ + bash -c ' set -e # Configure apt to use cacher if available if curl -s http://host.docker.internal:3143/acng-report.html > /dev/null 2>&1; then echo "Configuring apt to use cacher" - echo 'Acquire::http::Proxy "http://host.docker.internal:3143";' > /etc/apt/apt.conf.d/01proxy - echo 'Acquire::https::Proxy "http://host.docker.internal:3143";' >> /etc/apt/apt.conf.d/01proxy - echo 'Acquire::http::Proxy::security.debian.org "DIRECT";' >> /etc/apt/apt.conf.d/01proxy - echo 'Acquire::http::Proxy::deb.debian.org "DIRECT";' >> /etc/apt/apt.conf.d/01proxy + echo "Acquire::http::Proxy \"http://host.docker.internal:3143\";" > /etc/apt/apt.conf.d/01proxy + echo "Acquire::https::Proxy \"http://host.docker.internal:3143\";" >> /etc/apt/apt.conf.d/01proxy + echo "Acquire::http::Proxy::security.debian.org \"DIRECT\";" >> /etc/apt/apt.conf.d/01proxy + echo "Acquire::http::Proxy::deb.debian.org \"DIRECT\";" >> /etc/apt/apt.conf.d/01proxy else echo "Apt-cacher-ng not available, using direct connection" fi @@ -116,7 +118,7 @@ jobs: cp /usr/lib/pkgconfig/fuse3.pc libfuse3-3_3.10.0-1_amd64/usr/lib/pkgconfig/ # Create control file - cat > libfuse3-3_3.10.0-1_amd64/DEBIAN/control << 'CONTROL_EOF' + cat > libfuse3-3_3.10.0-1_amd64/DEBIAN/control << "CONTROL_EOF" Package: libfuse3-3 Version: 3.10.0-1 Section: libs @@ -142,21 +144,7 @@ jobs: # Verify the library is available ldconfig -p | grep libfuse3 pkg-config --exists fuse3 && echo "fuse3.pc found" || echo "fuse3.pc not found" - EOF - - # Make the script executable - chmod +x /workspace/particle-os/libfuse/build_libfuse.sh - - # Verify the script exists and is executable - ls -la /workspace/particle-os/libfuse/build_libfuse.sh - - # Run the build script in Debian container - docker run --rm \ - --add-host=host.docker.internal:host-gateway \ - -v /workspace/particle-os/libfuse:/workspace \ - -w /workspace \ - debian:trixie \ - bash build_libfuse.sh + ' - name: Prepare artifacts run: |