diff --git a/.github/workflows/binaries.yml b/.github/workflows/binaries.yml index 2cae77b..0f7ae44 100644 --- a/.github/workflows/binaries.yml +++ b/.github/workflows/binaries.yml @@ -14,9 +14,9 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ubuntu-22.04, windows-latest, macos-latest] include: - - os: ubuntu-latest + - os: ubuntu-22.04 artifact_name: voxvera-linux - os: windows-latest artifact_name: voxvera-windows.exe @@ -57,7 +57,7 @@ jobs: voxvera/cli.py - name: Build .deb (Linux) - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu-22.04' run: | mkdir -p voxvera/resources/bin cp dist/${{ matrix.artifact_name }} voxvera/resources/bin/voxvera-linux-x86_64 @@ -65,7 +65,7 @@ jobs: ./packaging/build_deb.sh dist/${{ matrix.artifact_name }} - name: Build AppImage (Linux) - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu-22.04' run: | mkdir -p voxvera/resources/bin cp dist/${{ matrix.artifact_name }} voxvera/resources/bin/voxvera-linux-x86_64 @@ -73,7 +73,7 @@ jobs: ./packaging/build_appimage.sh dist/${{ matrix.artifact_name }} - name: Build Flatpak (Linux) - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu-22.04' run: | mkdir -p voxvera/resources/bin cp dist/${{ matrix.artifact_name }} voxvera/resources/bin/voxvera-linux-x86_64 diff --git a/ci/test-e2e.sh b/ci/test-e2e.sh index 9a13b12..9d06821 100755 --- a/ci/test-e2e.sh +++ b/ci/test-e2e.sh @@ -102,8 +102,9 @@ if [ "${VOXVERA_E2E_OFFLINE:-}" != "1" ]; then echo "Waiting for OnionShare to generate URL (up to 120s)..." URL="" for i in {1..120}; do - if grep -Eo 'http[^ ]+\.onion' "$LOG_DIR/onionshare.log" | head -n1 >"$LOG_DIR/url.txt"; then - URL=$(cat "$LOG_DIR/url.txt") + # Use -a to process as text even if there are binary chars (ANSI codes) + if grep -aEo 'http[s]?://[a-z2-7]{56}\.onion' "$LOG_DIR/onionshare.log" | head -n1 >"$LOG_DIR/url.txt"; then + URL=$(cat "$LOG_DIR/url.txt" | tr -d '\r\n ') if [ -n "$URL" ]; then echo "Successfully generated Onion URL: $URL" break diff --git a/voxvera/cli.py b/voxvera/cli.py index 40d37de..512d131 100644 --- a/voxvera/cli.py +++ b/voxvera/cli.py @@ -619,6 +619,8 @@ def _internal_onionshare(): bundled_tor = tor_dir / ("tor.exe" if "windows" in system else "tor") if bundled_tor.exists() and bundled_tor.stat().st_size > 100: os.environ["PATH"] = str(tor_dir) + os.pathsep + os.environ.get("PATH", "") + # Robustness: explicitly tell OnionShare where Tor is + os.environ["TOR_BINARY"] = str(bundled_tor) try: from onionshare_cli import main