Package Details: synapse-compress-state 0.1.4-1

Git Clone URL: https://aur.archlinux.org/synapse-compress-state.git (read-only, click to copy)
Package Base: synapse-compress-state
Description: A tool to compress some state in a Synapse instance's database
Upstream URL: https://github.com/matrix-org/rust-synapse-compress-state
Licenses: Apache
Submitter: BrainDamage
Maintainer: BrainDamage
Last Packager: BrainDamage
Votes: 2
Popularity: 0.000002
First Submitted: 2020-12-30 00:00 (UTC)
Last Updated: 2024-04-18 15:08 (UTC)

Dependencies (2)

Required by (0)

Sources (1)

Latest Comments

xiretza commented on 2022-04-25 12:20 (UTC)

There are a couple problems with this package, see the Rust Package Guidelines: https://wiki.archlinux.org/title/Rust_package_guidelines

Here's a patch which also installs the new synapse_auto_compressor binary in 0.1.2:

diff --git a/PKGBUILD b/PKGBUILD
index 663ece2..7150e03 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,23 +1,41 @@
 # Maintainer: BrainDamage

 pkgname=synapse-compress-state
-pkgver=0.1.0
-pkgrel=2
+pkgver=0.1.2
+pkgrel=1
 pkgdesc="A tool to compress some state in a Synapse instance's database "
 arch=('x86_64' 'armv6h' 'armv7h' 'aarch64')
 url="https://github.com/matrix-org/rust-synapse-compress-state"
-makedepends=('rust')
+makedepends=('rust' 'python')
+depends=('gcc-libs' 'openssl')
 license=('Apache')
 source=("${pkgname}-${pkgver}::https://github.com/matrix-org/rust-synapse-compress-state/archive/v${pkgver}.tar.gz")
-sha256sums=('ac57d264a99157174cfb6564cb12ef9453229ec5771e57cd990f3eb78efdb1b1')
+sha256sums=('e8cd1933545fc4d97e5f68d7da242fba53ab642869937e4fb65f4ba39ddc8fab')
+
+prepare() {
+       cd "${srcdir}/rust-${pkgname}-${pkgver}"
+
+       cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+}

 build() {
        cd "${srcdir}/rust-${pkgname}-${pkgver}"
-       cargo build --release --locked
+
+       export RUSTUP_TOOLCHAIN=stable
+       export CARGO_TARGET_DIR=target
+       cargo build --workspace --frozen --release --all-features
+}
+
+check() {
+       cd "${srcdir}/rust-${pkgname}-${pkgver}"
+
+       export RUSTUP_TOOLCHAIN=stable
+       cargo test --workspace --exclude compressor_integration_tests --frozen --all-features
 }

 package() {
-  cargo install --locked --path "${srcdir}/rust-${pkgname}-${pkgver}" --root "${pkgdir}/usr"
-  # delete the leftover crates file
-  rm -f "${pkgdir}/usr/.crates.toml" "${pkgdir}/usr/.crates2.toml"
+       cd "${srcdir}/rust-${pkgname}-${pkgver}"
+
+       install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/synapse_compress_state"
+       install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/synapse_auto_compressor"
 }

BrainDamage commented on 2022-04-23 11:28 (UTC)

I don't have much insight to offer, especially since here it works (tested right now with an empty cache).

Perhaps try deleting the ~/.cargo cache and let it recreate.

luntik2012 commented on 2022-04-23 08:11 (UTC)

  ar: `u' modifier ignored since `D' is the default (see `U')
  ar: unable to copy file 'lib/libjemalloc_pic.a'; reason: Success
  make: *** [Makefile:395: lib/libjemalloc_pic.a] Error 1
  make: *** Waiting for unfinished jobs....
  thread 'main' panicked at 'command did not execute successfully: "make" "srcroot=../jemalloc/" "-j" "2"
  expected success, got: exit status: 2', /home/nikita/.cargo/registry/src/github.com-1ecc6299db9ec823/jemalloc-sys-0.3.2/build.rs:392:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
==> ERROR: A failure occurred in build().