The program doesn't start. When I try to launch it from the terminal I get this error:
--: line 1: /home/ziltoid/.local/share/grayjay/Grayjay: No such file or directory
| Git Clone URL: | https://aur.archlinux.org/grayjay-bin.git (read-only, click to copy) |
|---|---|
| Package Base: | grayjay-bin |
| Description: | Grayjay Desktop - follow creators, not platforms (privacy- and freedom-respecting client for YouTube, Rumble, Twitch, Spotify etc) |
| Upstream URL: | https://grayjay.app/desktop/ |
| Licenses: | Source First License 1.1 |
| Conflicts: | grayjay, grayjay-git |
| Provides: | grayjay |
| Submitter: | nathanchere |
| Maintainer: | nathanchere |
| Last Packager: | nathanchere |
| Votes: | 24 |
| Popularity: | 2.30 |
| First Submitted: | 2024-12-25 16:27 (UTC) |
| Last Updated: | 2026-03-18 21:47 (UTC) |
The program doesn't start. When I try to launch it from the terminal I get this error:
--: line 1: /home/ziltoid/.local/share/grayjay/Grayjay: No such file or directory
curl: (22) The requested URL returned error: 404
==> ERROR: Failure while downloading https://updater.grayjay.app/Apps/Grayjay.Desktop/18/Grayjay.Desktop-linux-x64-v18.zip
Aborting...
error: failed to download sources for 'grayjay-bin-17-1':
error: packages failed to build: grayjay-bin-17-1
I got the error curl: (22) The requested URL returned error: 404.
Changing the version from 18 to 17 fixed the issue.
Putting this here if anyone is interested:
I changed my pkgbuild to download zip archive directly from "latest branch" (link on their website). It's similar to how git- releases are meant to work, but without having to wait for it to compile. Zip gets extracted automatically by pacman with bsdtar and a pkgver() function finds version of this release and updates it. From there on everything works the same.
Advantage of this approach is that when you want to update, you just come back into grayjay directory and run makepkg -si without editing PKGBUILD manually.
# Maintainer: Nathan Chere <git@nathanchere.com.au>
pkgname=grayjay-bin
pkgver=12
pkgrel=1
pkgdesc="Grayjay Desktop - follow creators, not platforms (privacy- and freedom-respecting client for YouTube, Rumble, Twitch, Spotify etc)"
arch=('x86_64')
url="https://grayjay.app/desktop/"
license=('Source First License 1.1')
depends=('gtk3' 'unzip' 'libnotify' 'nss' 'libxss' 'libxtst' 'xdg-utils' 'at-spi2-core' 'libsecret' 'libappindicator-gtk3' 'jq')
provides=('grayjay')
conflicts=('grayjay-git' 'grayjay')
options=(!strip)
_dl_filename="Grayjay.Desktop-linux-x64"
_filename="Grayjay.Desktop-linux-x64-v${pkgver}"
source=("${_dl_filename}.zip::https://updater.grayjay.app/Apps/Grayjay.Desktop/${_dl_filename}.zip")
sha256sums=('ba008a153255fff7adba5612c3d27b42509f7910043f4daf7f3c88c7f1c01a54')
pkgver() {
VERSION="$(
find -type f -name AppVersion.json \
-exec jq -r '.Version' {} + |
grep -v null |
sort -n |
tail -1
)"
printf "%s" $VERSION
}
package() {
cd "${_filename}"
# Create necessary directories
install -dm755 "${pkgdir}/usr/share/grayjay"
install -dm755 "${pkgdir}/usr/bin"
install -dm755 "${pkgdir}/usr/share/applications"
install -dm755 "${pkgdir}/usr/share/icons/hicolor/512x512/apps"
# Create launcher script that copies app to user directory on first run
cat >"${pkgdir}/usr/bin/grayjay" <<'EOF'
#!/bin/sh
APP_DIR="$HOME/.local/share/grayjay"
USER_VERSION="$(jq '.Version' $APP_DIR/AppVersion.json)"
SYSTEM_VERSION="$(pacman -Qi grayjay-bin | grep Version | awk '{print $3}' | cut -d'-' -f1)"
install_grayjay(){
mkdir -p "$APP_DIR"
cp -r /usr/share/grayjay/* "$APP_DIR/"
chmod u+w -R "$APP_DIR"
}
# Check if app is already installed in user directory
if [ ! -d "$APP_DIR" ] && echo "First run - installing Grayjay to $APP_DIR" || \
[ "$USER_VERSION" -ne "$SYSTEM_VERSION" ] && echo "Version mismatch - installing system Grayjay to $APP_DIR"
then
install_grayjay
fi
exec sh -c "cd '$APP_DIR' && exec ./Grayjay \"\$@\"" -- "$@"
EOF
chmod 755 "${pkgdir}/usr/bin/grayjay"
# Copy application files to system directory (will be copied to user dir on first run)
cp -r ./* "${pkgdir}/usr/share/grayjay/"
# Create desktop entry
cat >"${pkgdir}/usr/share/applications/grayjay.desktop" <<EOF
[Desktop Entry]
Name=Grayjay
Comment=Privacy-respecting client for YouTube, Rumble, Twitch, Spotify etc
Exec=/usr/bin/grayjay
Icon=grayjay
Terminal=false
Type=Application
Categories=Network;Video;AudioVideo;
EOF
# Install icon
install -Dm644 "grayjay.png" \
"${pkgdir}/usr/share/icons/hicolor/512x512/apps/grayjay.png"
}
@nathanchere I noticed you manually extract downloaded zip in prepare() with unzip. Make sure to add noextract=("${_filename}") into the PKGBUILD (below sha256sums) to prevent duplicate extracts. Pacman by default automatically extracts downloaded archives with bsdtar.
@nathanchere I don't think that the URL pattern is broken for 12-1, the download worked just fine for me.
what doesn't work is the checksum verification, since the latest patch seems to only change the version number and not the shasum.
Additionally please remember to regenerate the .SRCINFO file when changing the PLGBUILD
Url pattern appears to be broken for bin release v12. If you "need" latest, grayjay (as opposed to grayjay-bin) is already at version 12.
@centaro you are welcome to adopt the issue of DDoS attacks on Arch infrastructure. Solve that and you will get 'speedier with updates' :P
@timrosu thank you, adding this check to /usr/bin/grayjay worked!
I made some changes to launch script and it now compares versions instead of only checking directory's existence.
# Create launcher script that copies app to user directory on first run
cat > "${pkgdir}/usr/bin/grayjay" << 'EOF'
#!/bin/sh
APP_DIR="$HOME/.local/share/grayjay"
USER_VERSION="$(jq '.Version' $APP_DIR/AppVersion.json)"
SYSTEM_VERSION="$(pacman -Qi grayjay-bin | grep Version | awk '{print $3}' | cut -d'-' -f1)"
# Check if app is already installed in user directory
if [ ! -d "$APP_DIR" ] && echo "First run - installing Grayjay to $APP_DIR" || \
[ "$USER_VERSION" -ne "$SYSTEM_VERSION" ] && echo "Version mismatch - installing system Grayjay to $APP_DIR"
then
mkdir -p "$APP_DIR"
cp -r /usr/share/grayjay/* "$APP_DIR/"
chmod u+w -R "$APP_DIR"
fi
exec sh -c "cd '$APP_DIR' && exec ./Grayjay \"\$@\"" -- "$@"
EOF
It would be better to implement it directly in post_install() in PKGBUILD, but this is fine for now.
Pinned Comments
nathanchere commented on 2025-01-30 06:30 (UTC)
Sorry for the unreliable builds recently. I've spoken with Futo about the generic latestversion.zip downloads and have been advised about versioned links which they don't officially publish. Hopefully that should finally resolve the issue of this package breaking when a new release is published to the same download URL breaking checksums.