Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix ubuntu release

Louis Beaumont3bf4a434601a
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index e58d9ad92..56505eca4 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,13 +1,13 @@
# testing locally with act cli
# ubuntu:
-# act --container-architecture linux/amd64 -W .github/workflows/release.yml --env ACTIONS_RUNTIME_URL=http://host.docker.internal:8080/ --env ACTIONS_RUNTIME_TOKEN=foo --env ACTIONS_CACHE_URL=http://host.docker.internal:8080/ --artifact-server-path out -j build-ubuntu -P ubuntu-latest=-self-hosted --env-file .env --secret-file .secrets
+# act --privileged --container-architecture linux/amd64 -W .github/workflows/release.yml --env ACTIONS_RUNTIME_URL=http://host.docker.internal:8080/ --env ACTIONS_RUNTIME_TOKEN=foo --env ACTIONS_CACHE_URL=http://host.docker.internal:8080/ --artifact-server-path out -j build-ubuntu -P ubuntu-latest=-self-hosted --env-file .env --secret-file .secrets
# for mac target
-# act --container-architecture linux/amd64 -W .github/workflows/release.yml --env ACTIONS_RUNTIME_URL=http://host.docker.internal:8080/ --env ACTIONS_RUNTIME_TOKEN=foo --env ACTIONS_CACHE_URL=http://host.docker.internal:8080/ --artifact-server-path out -j build-macos -P macos-latest=-self-hosted --env-file .env --secret-file .secrets
+# act --privileged --container-architecture linux/amd64 -W .github/workflows/release.yml --env ACTIONS_RUNTIME_URL=http://host.docker.internal:8080/ --env ACTIONS_RUNTIME_TOKEN=foo --env ACTIONS_CACHE_URL=http://host.docker.internal:8080/ --artifact-server-path out -j build-macos -P macos-latest=-self-hosted --env-file .env --secret-file .secrets
# run the whole thing
-# act --container-architecture linux/amd64 -W .github/workflows/release.yml --env ACTIONS_RUNTIME_URL=http://host.docker.internal:8080/ --env ACTIONS_RUNTIME_TOKEN=foo --env ACTIONS_CACHE_URL=http://host.docker.internal:8080/ --artifact-server-path out -P ubuntu-latest=-self-hosted --env-file .env --secret-file .secrets
+# act --privileged --container-architecture linux/amd64 -W .github/workflows/release.yml --env ACTIONS_RUNTIME_URL=http://host.docker.internal:8080/ --env ACTIONS_RUNTIME_TOKEN=foo --env ACTIONS_CACHE_URL=http://host.docker.internal:8080/ --artifact-server-path out -P ubuntu-latest=-self-hosted --env-file .env --secret-file .secrets
name: Release
@@ -28,7 +28,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
- sudo apt-get install -y libavformat-dev libavfilter-dev libavdevice-dev ffmpeg libasound2-dev
+ sudo apt-get install -y libavformat-dev libavfilter-dev libavdevice-dev ffmpeg libasound2-dev chrpath
- name: Set up Rust
uses: actions-rs/toolchain@v1
@@ -38,132 +38,149 @@ jobs:
override: true
- name: Build
- run: cargo build --release
-
- - name: Upload Artifact
- id: upload
- uses: actions/upload-artifact@v2
- with:
- name: screenpipe-ubuntu
- path: target/release/pipe
-
- build-macos:
- runs-on: macos-latest
- outputs:
- asset_path: ${{ steps.upload.outputs.asset_path }}
- steps:
- - name: Checkout code
- uses: actions/checkout@v2
-
- - name: Build with dynamic FFmpeg
run: |
- export PKG_CONFIG_PATH="/usr/local/opt/ffmpeg/lib/pkgconfig:$PKG_CONFIG_PATH"
- export LIBRARY_PATH="$LIBRARY_PATH:/opt/homebrew/lib"
- export RUSTFLAGS="-C link-arg=-Wl,-rpath,@executable_path/../Frameworks"
+ export PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig:$PKG_CONFIG_PATH"
cargo build --release
- - name: Create app bundle
+ - name: Copy FFmpeg libraries
run: |
- mkdir -p Screenpipe.app/Contents/MacOS
- mkdir -p Screenpipe.app/Contents/Frameworks
-
- # find the actual binary name
- BINARY_NAME=$(find target/release -type f -perm +111 -print | head -n 1)
- echo "Binary found: $BINARY_NAME"
-
- # copy the binary
- cp "$BINARY_NAME" Screenpipe.app/Contents/MacOS/screenpipe
-
- # copy ffmpeg dylibs
- cp /opt/homebrew/opt/ffmpeg/lib/libavcodec.dylib Screenpipe.app/Contents/Frameworks/
- cp /opt/homebrew/opt/ffmpeg/lib/libavformat.dylib Screenpipe.app/Contents/Frameworks/
- cp /opt/homebrew/opt/ffmpeg/lib/libavutil.dylib Screenpipe.app/Contents/Frameworks/
- cp /opt/homebrew/opt/ffmpeg/lib/libswresample.dylib Screenpipe.app/Contents/Frameworks/
- cp /opt/homebrew/opt/ffmpeg/lib/libswscale.dylib Screenpipe.app/Contents/Frameworks/
-
- # update rpath
- install_name_tool -change /opt/homebrew/opt/ffmpeg/lib/libavcodec.dylib @executable_path/../Frameworks/libavcodec.dylib Screenpipe.app/Contents/MacOS/screenpipe
- install_name_tool -change /opt/homebrew/opt/ffmpeg/lib/libavformat.dylib @executable_path/../Frameworks/libavformat.dylib Screenpipe.app/Contents/MacOS/screenpipe
- install_name_tool -change /opt/homebrew/opt/ffmpeg/lib/libavutil.dylib @executable_path/../Frameworks/libavutil.dylib Screenpipe.app/Contents/MacOS/screenpipe
- install_name_tool -change /opt/homebrew/opt/ffmpeg/lib/libswresample.dylib @executable_path/../Frameworks/libswresample.dylib Screenpipe.app/Contents/MacOS/screenpipe
- install_name_tool -change /opt/homebrew/opt/ffmpeg/lib/libswscale.dylib @executable_path/../Frameworks/libswscale.dylib Screenpipe.app/Contents/MacOS/screenpipe
-
- # list contents for debugging
- echo "Contents of Screenpipe.app/Contents/MacOS:"
- ls -l Screenpipe.app/Contents/MacOS
- echo "Contents of Screenpipe.app/Contents/Frameworks:"
- ls -l Screenpipe.app/Contents/Frameworks
-
- - name: Import Code Signing Certificates
- env:
- MACOS_SIGNING_KEY: ${{ secrets.MACOS_SIGNING_KEY }}
- MACOS_SIGNING_KEY_PASSWORD: ${{ secrets.MACOS_SIGNING_KEY_PASSWORD }}
+ mkdir -p target/release/lib
+ cp /usr/lib/x86_64-linux-gnu/libavcodec.so* target/release/lib/
+ cp /usr/lib/x86_64-linux-gnu/libavformat.so* target/release/lib/
+ cp /usr/lib/x86_64-linux-gnu/libavutil.so* target/release/lib/
+ cp /usr/lib/x86_64-linux-gnu/libswresample.so* target/release/lib/
+ cp /usr/lib/x86_64-linux-gnu/libswscale.so* target/release/lib/
+
+ - name: Set RPATH
run: |
- # create variables
- CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
- KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
-
- # import certificate from secrets
- echo -n "$MACOS_SIGNING_KEY" | base64 --decode --output $CERTIFICATE_PATH
-
- echo "Certificate file size: $(wc -c < $CERTIFICATE_PATH)"
-
- # create temporary keychain
- security create-keychain -p "temp_password" $KEYCHAIN_PATH
- security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
- security unlock-keychain -p "temp_password" $KEYCHAIN_PATH
-
- # import certificate to keychain
- security import $CERTIFICATE_PATH -P "$MACOS_SIGNING_KEY_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
- security import $CERTIFICATE_PATH -P "$MACOS_SIGNING_KEY_PASSWORD" -A -t priv -f pkcs12 -k $KEYCHAIN_PATH
-
- # add keychain to search list
- security list-keychain -d user -s $KEYCHAIN_PATH
-
- # set key partition list
- security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "temp_password" $KEYCHAIN_PATH
-
- echo "Keychain contents:"
- security dump-keychain $KEYCHAIN_PATH
-
- echo "Codesigning identities:"
- security find-identity -v -p codesigning $KEYCHAIN_PATH
-
- - name: Sign app bundle
- env:
- MACOS_SIGNING_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }}
- run: |
- echo "Available codesigning identities:"
- security find-identity -v -p codesigning
-
- echo "Attempting to sign with identity: $MACOS_SIGNING_IDENTITY"
- codesign --force --options runtime --deep --verbose --timestamp --sign "$MACOS_SIGNING_IDENTITY" Screenpipe.app
-
- - name: Copy icon
- run: cp assets/Assets.xcassets/AppIcon.appiconset/1024-mac.png ./AppIcon.png
-
- - name: Create DMG
- run: create-dmg --volname "Screenpipe" --window-pos 200 120 --window-size 600 300 --icon-size 100 --icon "Screenpipe.app" 175 120 --hide-extension "Screenpipe.app" --app-drop-link 425 120 --volicon "AppIcon.png" "Screenpipe.dmg" "Screenpipe.app"
-
- - name: Notarize DMG
- env:
- APPLE_ID: ${{ secrets.APPLE_ID }}
- APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
- TEAM_ID: ${{ secrets.TEAM_ID }}
- run: |
- xcrun notarytool submit Screenpipe.dmg --apple-id "$APPLE_ID" --password "$APPLE_ID_PASSWORD" --team-id "$TEAM_ID" --wait
- xcrun stapler staple Screenpipe.dmg
+ chrpath -r '$ORIGIN/lib' target/release/pipe
- name: Upload Artifact
id: upload
uses: actions/upload-artifact@v2
with:
- name: screenpipe-macos
- path: Screenpipe.dmg
+ name: screenpipe-ubuntu
+ path: |
+ target/release/pipe
+ target/release/lib
+
+ # build-macos:
+ # runs-on: macos-latest
+ # outputs:
+ # asset_path: ${{ steps.upload.outputs.asset_path }}
+ # steps:
+ # - name: Checkout code
+ # uses: actions/checkout@v2
+
+ # - name: Build with dynamic FFmpeg
+ # run: |
+ # export PKG_CONFIG_PATH="/usr/local/opt/ffmpeg/lib/pkgconfig:$PKG_CONFIG_PATH"
+ # export LIBRARY_PATH="$LIBRARY_PATH:/opt/homebrew/lib"
+ # export RUSTFLAGS="-C link-arg=-Wl,-rpath,@executable_path/../Frameworks"
+ # cargo build --release
+
+ # - name: Create app bundle
+ # run: |
+ # mkdir -p Screenpipe.app/Contents/MacOS
+ # mkdir -p Screenpipe.app/Contents/Frameworks
+
+ # # find the actual binary name
+ # BINARY_NAME=$(find target/release -type f -perm +111 -print | head -n 1)
+ # echo "Binary found: $BINARY_NAME"
+
+ # # copy the binary
+ # cp "$BINARY_NAME" Screenpipe.app/Contents/MacOS/screenpipe
+
+ # # copy ffmpeg dylibs
+ # cp /opt/homebrew/opt/ffmpeg/lib/libavcodec.dylib Screenpipe.app/Contents/Frameworks/
+ # cp /opt/homebrew/opt/ffmpeg/lib/libavformat.dylib Screenpipe.app/Contents/Frameworks/
+ # cp /opt/homebrew/opt/ffmpeg/lib/libavutil.dylib Screenpipe.app/Contents/Frameworks/
+ # cp /opt/homebrew/opt/ffmpeg/lib/libswresample.dylib Screenpipe.app/Contents/Frameworks/
+ # cp /opt/homebrew/opt/ffmpeg/lib/libswscale.dylib Screenpipe.app/Contents/Frameworks/
+
+ # # update rpath
+ # install_name_tool -change /opt/homebrew/opt/ffmpeg/lib/libavcodec.dylib @executable_path/../Frameworks/libavcodec.dylib Screenpipe.app/Contents/MacOS/screenpipe
+ # install_name_tool -change /opt/homebrew/opt/ffmpeg/lib/libavformat.dylib @executable_path/../Frameworks/libavformat.dylib Screenpipe.app/Contents/MacOS/screenpipe
+ # install_name_tool -change /opt/homebrew/opt/ffmpeg/lib/libavutil.dylib @executable_path/../Frameworks/libavutil.dylib Screenpipe.app/Contents/MacOS/screenpipe
+ # install_name_tool -change /opt/homebrew/opt/ffmpeg/lib/libswresample.dylib @executable_path/../Frameworks/libswresample.dylib Screenpipe.app/Contents/MacOS/screenpipe
+ # install_name_tool -change /opt/homebrew/opt/ffmpeg/lib/libswscale.dylib @executable_path/../Frameworks/libswscale.dylib Screenpipe.app/Contents/MacOS/screenpipe
+
+ # # list contents for debugging
+ # echo "Contents of Screenpipe.app/Contents/MacOS:"
+ # ls -l Screenpipe.app/Contents/MacOS
+ # echo "Contents of Screenpipe.app/Contents/Frameworks:"
+ # ls -l Screenpipe.app/Contents/Frameworks
+
+ # - name: Import Code Signing Certificates
+ # env:
+ # MACOS_SIGNING_KEY: ${{ secrets.MACOS_SIGNING_KEY }}
+ # MACOS_SIGNING_KEY_PASSWORD: ${{ secrets.MACOS_SIGNING_KEY_PASSWORD }}
+ # run: |
+ # # create variables
+ # CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
+ # KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
+
+ # # import certificate from secrets
+ # echo -n "$MACOS_SIGNING_KEY" | base64 --decode --output $CERTIFICATE_PATH
+
+ # echo "Certificate file size: $(wc -c < $CERTIFICATE_PATH)"
+
+ # # create temporary keychain
+ # security create-keychain -p "temp_password" $KEYCHAIN_PATH
+ # security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
+ # security unlock-keychain -p "temp_password" $KEYCHAIN_PATH
+
+ # # import certificate to keychain
+ # security import $CERTIFICATE_PATH -P "$MACOS_SIGNING_KEY_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
+ # security import $CERTIFICATE_PATH -P "$MACOS_SIGNING_KEY_PASSWORD" -A -t priv -f pkcs12 -k $KEYCHAIN_PATH
+
+ # # add keychain to search list
+ # security list-keychain -d user -s $KEYCHAIN_PATH
+
+ # # set key partition list
+ # security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "temp_password" $KEYCHAIN_PATH
+
+ # echo "Keychain contents:"
+ # security dump-keychain $KEYCHAIN_PATH
+
+ # echo "Codesigning identities:"
+ # security find-identity -v -p codesigning $KEYCHAIN_PATH
+
+ # - name: Sign app bundle
+ # env:
+ # MACOS_SIGNING_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }}
+ # run: |
+ # echo "Available codesigning identities:"
+ # security find-identity -v -p codesigning
+
+ # echo "Attempting to sign with identity: $MACOS_SIGNING_IDENTITY"
+ # codesign --force --options runtime --deep --verbose --timestamp --sign "$MACOS_SIGNING_IDENTITY" Screenpipe.app
+
+ # - name: Copy icon
+ # run: cp assets/Assets.xcassets/AppIcon.appiconset/1024-mac.png ./AppIcon.png
+
+ # - name: Create DMG
+ # run: create-dmg --volname "Screenpipe" --window-pos 200 120 --window-size 600 300 --icon-size 100 --icon "Screenpipe.app" 175 120 --hide-extension "Screenpipe.app" --app-drop-link 425 120 --volicon "AppIcon.png" "Screenpipe.dmg" "Screenpipe.app"
+
+ # - name: Notarize DMG
+ # env:
+ # APPLE_ID: ${{ secrets.APPLE_ID }}
+ # APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
+ # TEAM_ID: ${{ secrets.TEAM_ID }}
+ # run: |
+ # xcrun notarytool submit Screenpipe.dmg --apple-id "$APPLE_ID" --password "$APPLE_ID_PASSWORD" --team-id "$TEAM_ID" --wait
+ # xcrun stapler staple Screenpipe.dmg
+
+ # - name: Upload Artifact
+ # id: upload
+ # uses: actions/upload-artifact@v2
+ # with:
+ # name: screenpipe-macos
+ # path: Screenpipe.dmg
release:
runs-on: ubuntu-latest
- needs: [build-ubuntu, build-macos] # todo windows
+ needs: [build-ubuntu] #, build-macos] # todo windows
steps:
- name: Checkout code
uses: actions/checkout@v2
@@ -174,11 +191,11 @@ jobs:
name: screenpipe-ubuntu
path: ./artifacts/ubuntu
- - name: Download Artifacts
- uses: actions/download-artifact@v2
- with:
- name: screenpipe-macos
- path: ./artifacts/macos
+ # - name: Download Artifacts
+ # uses: actions/download-artifact@v2
+ # with:
+ # name: screenpipe-macos
+ # path: ./artifacts/macos
- name: Set Version
shell: bash
@@ -191,6 +208,8 @@ jobs:
GH_TOKEN: ${{ secrets.PAT }}
run: |
gh release create ${{ env.RELEASE_VERSION }} --title ${{ env.RELEASE_VERSION }} --generate-notes
- mv ./artifacts/ubuntu/screenpipe ./artifacts/ubuntu/screenpipe-ubuntu
- mv ./artifacts/macos/screenpipe ./artifacts/macos/screenpipe-macos
- gh release upload ${{ env.RELEASE_VERSION }} ./artifacts/ubuntu/* ./artifacts/macos/*
+ mv ./artifacts/ubuntu/pipe ./artifacts/ubuntu/screenpipe-ubuntu
+ tar -czvf ./artifacts/ubuntu/screenpipe-ubuntu-with-libs.tar.gz -C ./artifacts/ubuntu screenpipe-ubuntu lib
+ # mv ./artifacts/macos/screenpipe ./artifacts/macos/screenpipe-macos
+ # gh release upload ${{ env.RELEASE_VERSION }} ./artifacts/ubuntu/* ./artifacts/macos/*
+ gh release upload ${{ env.RELEASE_VERSION }} ./artifacts/ubuntu/screenpipe-ubuntu-with-libs.tar.gz
diff --git a/screenpipe-server/src/video.rs b/screenpipe-server/src/video.rs
index a9cf3597d..412bcd344 100644
--- a/screenpipe-server/src/video.rs
+++ b/screenpipe-server/src/video.rs
@@ -328,9 +328,6 @@ fn get_ffmpeg_path() -> PathBuf {
let ffmpeg_path = resources_path.join("ffmpeg");
// if not present, add a warning to the user
if !ffmpeg_path.exists() {
- warn!(
- "FFmpeg not found in resources, defaulting to ffmpeg you probably installed with `brew install ffmpeg`. In production you should use statically linked ffmpeg."
- );
// and just use ffmpeg from path
PathBuf::from("ffmpeg")
} else {