From fe647b872bdb7754ad27c875c26eb7a3447e49d3 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Sat, 27 Jul 2024 00:09:09 -0400 Subject: [PATCH] qubes-usb-proxy: fix usb import --- qubes-usb-proxy/APKBUILD | 10 +++++++--- qubes-usb-proxy/usb-import-alpine-udevadm.patch | 13 +++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 qubes-usb-proxy/usb-import-alpine-udevadm.patch diff --git a/qubes-usb-proxy/APKBUILD b/qubes-usb-proxy/APKBUILD index 7e9cffe..3ea129e 100644 --- a/qubes-usb-proxy/APKBUILD +++ b/qubes-usb-proxy/APKBUILD @@ -3,7 +3,7 @@ pkgname=qubes-usb-proxy pkgver=1.2.2 _gittag="v$pkgver" -pkgrel=2 +pkgrel=3 pkgdesc="The Qubes service for proxying USB devices" arch="noarch" url="https://github.com/QubesOS/qubes-app-linux-usb-proxy" @@ -18,7 +18,10 @@ makedepends=" make pkgconf " -source="$pkgname-$_gittag.tar.gz::https://github.com/QubesOS/qubes-app-linux-usb-proxy/archive/refs/tags/$_gittag.tar.gz" +source=" + $pkgname-$_gittag.tar.gz::https://github.com/QubesOS/qubes-app-linux-usb-proxy/archive/refs/tags/$_gittag.tar.gz + usb-import-alpine-udevadm.patch + " builddir="$srcdir"/qubes-app-linux-usb-proxy-${_gittag/v} package() { @@ -26,10 +29,11 @@ package() { # replace all shebangs with /bin/sh as qubes expects bash # shellcheck disable=SC2013 - for i in $(grep '/bin/sh' -Rl .); do + for i in $(grep '/bin/sh' -Rl "$pkgdir"); do sed -i 's|/bin/sh|/bin/bash|' "$i" done } sha512sums=" 8083b49c913020e5f44b3b7f051773af0e98f3d4687186358b4f273dd3c8c62cb8eac31af2a6ffe4b9088e18ba92a94d89f5980997bad283026e654466202490 qubes-usb-proxy-v1.2.2.tar.gz +d0eb969122a41be8fa9647ca824aabf3cb3d39324b156b3e05872099e7c4b600dbc8060ab2a63186d84f60364c28c5db9da4d06e37ad36877a2222bdc2cdbd74 usb-import-alpine-udevadm.patch " diff --git a/qubes-usb-proxy/usb-import-alpine-udevadm.patch b/qubes-usb-proxy/usb-import-alpine-udevadm.patch new file mode 100644 index 0000000..adb4ccb --- /dev/null +++ b/qubes-usb-proxy/usb-import-alpine-udevadm.patch @@ -0,0 +1,13 @@ +diff --git a/src/usb-import.orig b/src/usb-import +index 7b17799..e718795 100755 +--- a/src/usb-import.orig ++++ b/src/usb-import +@@ -95,7 +95,7 @@ wait_for_attached() { + ERROR "Attach timeout, check kernel log for details." + fi + done +- [ -f "/usr/bin/udevadm" ] && udevadm settle ++ [ -f "/bin/udevadm" ] && udevadm settle + } + + wait_for_detached() { -- 2.45.2