Package Details: wormhole-rs 0.7.6-0

Git Clone URL: https://aur.archlinux.org/wormhole-rs.git (read-only, click to copy)
Package Base: wormhole-rs
Description: Rust implementation of Magic Wormhole, with new features and enhancements
Upstream URL: https://github.com/magic-wormhole/magic-wormhole.rs
Licenses: custom:EUPL-1.2+
Submitter: Max1Truc
Maintainer: Max1Truc
Last Packager: Max1Truc
Votes: 8
Popularity: 0.46
First Submitted: 2022-03-21 11:18 (UTC)
Last Updated: 2025-04-06 16:13 (UTC)

Latest Comments

« First ‹ Previous 1 2

Max1Truc commented on 2022-05-19 13:43 (UTC)

Thanks for the patch, it is really good and I am merging it right now.

I only fixed some weird indentation with 3 spaces and regenerated the .SRCINFO with makepkg --printsrcinfo.

Let me know if it seems ok to you, now.

alerque commented on 2022-05-19 09:33 (UTC)

Here is a patch you could apply with git am < file.patch:

From cea4f2ec882987abd756685b1e695e2b9dc2de16 Mon Sep 17 00:00:00 2001
From: Caleb Maclennan <caleb@alerque.com>
Date: Thu, 19 May 2022 12:29:55 +0300
Subject: [PATCH] Patch cargo dependency and overhaul PKGBUILD

Signed-off-by: Caleb Maclennan <caleb@alerque.com>
---
 .SRCINFO | 11 +++++++----
 PKGBUILD | 45 ++++++++++++++++++++++++---------------------
 2 files changed, 31 insertions(+), 25 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO
index 7223b48..cb28b6a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,16 @@
 pkgbase = wormhole-rs
    pkgdesc = Rust implementation of Magic Wormhole, with new features and enhancements
    pkgver = 0.4.0
-   pkgrel = 3
+   pkgrel = 4
    url = https://github.com/magic-wormhole/magic-wormhole.rs
    arch = x86_64
-   license = EUPL-1.2+
+   license = custom:EUPL-1.2+
    makedepends = cargo
+   makedepends = git
    depends = libxcb
-   source = wormhole-rs-0.4.0-3.tar.gz::https://github.com/magic-wormhole/magic-wormhole.rs/archive/0.4.0.tar.gz
-   sha512sums = 25a20904fd222479988ceef8ce51aa850291ee9c9047de7a26017b53bede9c3636acc6d7e5c66bdc01f379adbc2a95e3b05e50d5903be68a3d8506183cf1af8c
+   source = https://github.com/magic-wormhole/magic-wormhole.rs/archive/0.4.0/magic-wormhole.rs-0.4.0.tar.gz
+   source = wormhole-rs-cli-clipboard-dep.patch::https://github.com/magic-wormhole/magic-wormhole.rs/commit/1606112.patch
+   sha256sums = 4773a5f179d1f26b61eed8a95b586b30cc45b205255d1427ba735e6df5804061
+   sha256sums = 0c0d6afe4ecc8869ef5a8f4afed9d15a423c462c99e9af22984f0085802fae7d

 pkgname = wormhole-rs
diff --git a/PKGBUILD b/PKGBUILD
index 29fa643..371278f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,34 +1,37 @@
 # Maintainer: Max1Truc <max1truc @ disroot dot org>
-_pkgname="magic-wormhole.rs"
-pkgname="wormhole-rs"
-pkgver="0.4.0"
-pkgrel="3"
-pkgdesc="Rust implementation of Magic Wormhole, with new features and enhancements"
-arch=('x86_64')
-url="https://github.com/magic-wormhole/$_pkgname"
-license=('EUPL-1.2+')
-depends=('libxcb')
-makedepends=('cargo')
-# optdepends=('bash-completion: Bash completion')
-source=("$pkgname-$pkgver-$pkgrel.tar.gz::$url/archive/$pkgver.tar.gz")
-sha512sums=('25a20904fd222479988ceef8ce51aa850291ee9c9047de7a26017b53bede9c3636acc6d7e5c66bdc01f379adbc2a95e3b05e50d5903be68a3d8506183cf1af8c')
+# Contributor: Caleb Maclennan <caleb@alerque.com>

-_sourcedirectory="$_pkgname-$pkgver"
+_pkgname=magic-wormhole.rs
+pkgname=wormhole-rs
+pkgver=0.4.0
+pkgrel=4
+pkgdesc='Rust implementation of Magic Wormhole, with new features and enhancements'
+arch=(x86_64)
+url="https://github.com/magic-wormhole/$_pkgname"
+license=('custom:EUPL-1.2+')
+depends=(libxcb)
+makedepends=(cargo git)
+_archive="$_pkgname-$pkgver"
+source=("$url/archive/$pkgver/$_archive.tar.gz"
+        "$pkgname-cli-clipboard-dep.patch::$url/commit/1606112.patch")
+sha256sums=('4773a5f179d1f26b61eed8a95b586b30cc45b205255d1427ba735e6df5804061'
+            '0c0d6afe4ecc8869ef5a8f4afed9d15a423c462c99e9af22984f0085802fae7d')

 prepare() {
-   cd "$_pkgname-$pkgver"
-    cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+   cd "$_archive"
+   patch -p1 < ../${source[1]%::*}
+   cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
 }

 build() {
-   cd "$_pkgname-$pkgver"
-    export RUSTUP_TOOLCHAIN=stable
-    export CARGO_TARGET_DIR=target
-    cargo build --frozen --release --all-features
+   cd "$_archive"
+   export RUSTUP_TOOLCHAIN=stable
+   export CARGO_TARGET_DIR=target
+   cargo build --frozen --release --all-features
 }

 package() {
-   cd "$_pkgname-$pkgver"
+   cd "$_archive"
    install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
    install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/LICENSE-EUPL-1.2" LICENSE
 }
-- 
2.36.1

Most of these are functional changes and stuff required to follow Arch package guidelines. A few bits (not quoting the package names in dep array, checksum format) are style preferences, but many of the syntax changes (like quoting the pkgver) are not just style preferences, they are Arch guidelines. Happy to answer questions about why these changes are made.

alerque commented on 2022-05-19 09:24 (UTC)

The issue goes deeper than that. First there is an upstream issue (mentioned here). Second there are more issues with this PKGBUILD (numbers as strings, setting vars you don't use, etc.) I'll send a patch that fixes things up for now until the next release.

alerque commented on 2022-05-19 08:50 (UTC)

The issue in my previous comment is in this packaging. You need to add:

makedepends=(git)

The Cargo dependencies download most crates from the registry, but one is hard coded to use a Git path. It needs the tooling to download that at build time.

alerque commented on 2022-05-19 08:44 (UTC)

I am unable to build this package, at least not with makechrootpkg:

error: failed to get `cli-clipboard` as a dependency of package `wormhole-rs v0.4.0 (/build/wormhole-rs/src/magic-wormhole.rs-0.4.0/cli)`

Is this an issue with the package dependencies or an upstream issue?