pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/www/syncstorage-rs



Module Name:    pkgsrc
Committed By:   wiz
Date:           Tue Dec  2 22:28:59 UTC 2025

Modified Files:
        pkgsrc/www/syncstorage-rs: Makefile distinfo
Added Files:
        pkgsrc/www/syncstorage-rs/patches: patch-Cargo.toml
            patch-syncstorage-mysql_src_diesel__ext.rs
            patch-syncstorage-mysql_src_models.rs

Log Message:
syncstorage-rs: add two patches

Improve mariadb compat.
Support logging in release.

Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 pkgsrc/www/syncstorage-rs/Makefile
cvs rdiff -u -r1.11 -r1.12 pkgsrc/www/syncstorage-rs/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/www/syncstorage-rs/patches/patch-Cargo.toml \
    pkgsrc/www/syncstorage-rs/patches/patch-syncstorage-mysql_src_diesel__ext.rs \
    pkgsrc/www/syncstorage-rs/patches/patch-syncstorage-mysql_src_models.rs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/www/syncstorage-rs/Makefile
diff -u pkgsrc/www/syncstorage-rs/Makefile:1.22 pkgsrc/www/syncstorage-rs/Makefile:1.23
--- pkgsrc/www/syncstorage-rs/Makefile:1.22     Thu Oct  9 21:51:48 2025
+++ pkgsrc/www/syncstorage-rs/Makefile  Tue Dec  2 22:28:59 2025
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.22 2025/10/09 21:51:48 wiz Exp $
+# $NetBSD: Makefile,v 1.23 2025/12/02 22:28:59 wiz Exp $
 
 DISTNAME=      syncstorage-rs-0.21.1
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    www
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=mozilla-services/}
 

Index: pkgsrc/www/syncstorage-rs/distinfo
diff -u pkgsrc/www/syncstorage-rs/distinfo:1.11 pkgsrc/www/syncstorage-rs/distinfo:1.12
--- pkgsrc/www/syncstorage-rs/distinfo:1.11     Sat Sep 27 15:12:57 2025
+++ pkgsrc/www/syncstorage-rs/distinfo  Tue Dec  2 22:28:59 2025
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.11 2025/09/27 15:12:57 wiz Exp $
+$NetBSD: distinfo,v 1.12 2025/12/02 22:28:59 wiz Exp $
 
 BLAKE2s (actix-codec-0.5.2.crate) = dd059989f99593b1f5b01a1b433630ed2121ad1a30854b6de98ef0bca3e9af11
 SHA512 (actix-codec-0.5.2.crate) = 9fc455a3ae36b93b3b9358b1f0915934f7e52ea1486d4d1a943c47759ff7cb6b7733e3c423378725a3da456669dcca02150cf44033707affff756579d5adba15
@@ -1284,3 +1284,6 @@ Size (zstd-safe-7.2.4.crate) = 29350 byt
 BLAKE2s (zstd-sys-2.0.15+zstd.1.5.7.crate) = ab7e4cb65c8b12350a87e0a2a325068c047c8b279d233fa0733951dbda370122
 SHA512 (zstd-sys-2.0.15+zstd.1.5.7.crate) = c684e3d966746dfac12947174d7786f528f2e26ed2802e24b457a751616a9b6e6a274d77f70f7e75a111caefdc4357257ed4c2e2137cd2f051206f56e9cd19cf
 Size (zstd-sys-2.0.15+zstd.1.5.7.crate) = 774847 bytes
+SHA1 (patch-Cargo.toml) = ac04261494bedd4ea1b58efe248d1a701b21bfc6
+SHA1 (patch-syncstorage-mysql_src_diesel__ext.rs) = fdcef6eb4f7bec05b74468df2600ce08bd2b75b4
+SHA1 (patch-syncstorage-mysql_src_models.rs) = 10594aa9ee21a76b1c8c6422487e242139ab2ebc

Added files:

Index: pkgsrc/www/syncstorage-rs/patches/patch-Cargo.toml
diff -u /dev/null pkgsrc/www/syncstorage-rs/patches/patch-Cargo.toml:1.1
--- /dev/null   Tue Dec  2 22:28:59 2025
+++ pkgsrc/www/syncstorage-rs/patches/patch-Cargo.toml  Tue Dec  2 22:28:59 2025
@@ -0,0 +1,16 @@
+$NetBSD: patch-Cargo.toml,v 1.1 2025/12/02 22:28:59 wiz Exp $
+
+Allow trace log level in release
+https://github.com/felfert/syncstorage-rs-rpm/blob/main/syncstorage-rs-allow-trace.patch
+
+--- Cargo.toml.orig    2025-09-23 20:12:34.000000000 +0000
++++ Cargo.toml
+@@ -78,7 +78,7 @@ serde_json = { version = "1.0", features
+ sha2 = "0.10"
+ slog = { version = "2.5", features = [
+   "max_level_trace",
+-  "release_max_level_info",
++  "release_max_level_trace",
+   "dynamic-keys",
+ ] }
+ slog-async = "2.5"
Index: pkgsrc/www/syncstorage-rs/patches/patch-syncstorage-mysql_src_diesel__ext.rs
diff -u /dev/null pkgsrc/www/syncstorage-rs/patches/patch-syncstorage-mysql_src_diesel__ext.rs:1.1
--- /dev/null   Tue Dec  2 22:28:59 2025
+++ pkgsrc/www/syncstorage-rs/patches/patch-syncstorage-mysql_src_diesel__ext.rs        Tue Dec  2 22:28:59 2025
@@ -0,0 +1,51 @@
+$NetBSD: patch-syncstorage-mysql_src_diesel__ext.rs,v 1.1 2025/12/02 22:28:59 wiz Exp $
+
+Improve mariadb compatibility
+https://github.com/felfert/syncstorage-rs-rpm/commit/c9311a47b89cb02c4a248e36d608571fe3097f9e
+
+--- syncstorage-mysql/src/diesel_ext.rs.orig   2025-09-23 20:12:34.000000000 +0000
++++ syncstorage-mysql/src/diesel_ext.rs
+@@ -3,11 +3,43 @@ use std::{fmt::Debug, marker::PhantomDat
+ use diesel::{
+     backend::Backend,
+     insertable::CanInsertInSingleQuery,
++    mysql::Mysql,
+     query_builder::{AstPass, InsertStatement, QueryFragment, QueryId},
++    query_dsl::methods::LockingDsl,
+     result::QueryResult,
+     Expression, QuerySource, RunQueryDsl,
+ };
+ 
++/// Emit MySQL <= 5.7's `LOCK IN SHARE MODE`
++///
++/// MySQL 8 supports `FOR SHARE` as an alias (which diesel natively supports)
++pub trait LockInShareModeDsl {
++    type Output;
++
++    fn lock_in_share_mode(self) -> Self::Output;
++}
++
++impl<T> LockInShareModeDsl for T
++where
++    T: LockingDsl<LockInShareMode>,
++{
++    type Output = <T as LockingDsl<LockInShareMode>>::Output;
++
++    fn lock_in_share_mode(self) -> Self::Output {
++        self.with_lock(LockInShareMode)
++    }
++}
++
++#[derive(Debug, Clone, Copy, QueryId)]
++pub struct LockInShareMode;
++
++impl QueryFragment<Mysql> for LockInShareMode {
++    fn walk_ast<'b>(&'b self, mut out: AstPass<'_, 'b, Mysql>) -> QueryResult<()> {
++        out.push_sql(" LOCK IN SHARE MODE");
++        Ok(())
++    }
++}
++
+ #[allow(dead_code)] // Not really dead, Rust can't see it.
+ #[derive(Debug, Clone)]
+ pub struct OnDuplicateKeyUpdate<T, U, Op, Ret, DB, X>(
Index: pkgsrc/www/syncstorage-rs/patches/patch-syncstorage-mysql_src_models.rs
diff -u /dev/null pkgsrc/www/syncstorage-rs/patches/patch-syncstorage-mysql_src_models.rs:1.1
--- /dev/null   Tue Dec  2 22:28:59 2025
+++ pkgsrc/www/syncstorage-rs/patches/patch-syncstorage-mysql_src_models.rs     Tue Dec  2 22:28:59 2025
@@ -0,0 +1,24 @@
+$NetBSD: patch-syncstorage-mysql_src_models.rs,v 1.1 2025/12/02 22:28:59 wiz Exp $
+
+Improve mariadb compatibility
+https://github.com/felfert/syncstorage-rs-rpm/commit/c9311a47b89cb02c4a248e36d608571fe3097f9e
+
+--- syncstorage-mysql/src/models.rs.orig       2025-09-23 20:12:34.000000000 +0000
++++ syncstorage-mysql/src/models.rs
+@@ -24,6 +24,7 @@ use syncstorage_db_common::{
+ use syncstorage_settings::{Quota, DEFAULT_MAX_TOTAL_RECORDS};
+ 
+ use super::{
++    diesel_ext::LockInShareModeDsl,
+     batch,
+     error::DbError,
+     pool::CollectionCache,
+@@ -178,7 +179,7 @@ impl MysqlDb {
+             .select(user_collections::modified)
+             .filter(user_collections::user_id.eq(user_id))
+             .filter(user_collections::collection_id.eq(collection_id))
+-            .for_share()
++            .lock_in_share_mode()
+             .first(&mut *self.conn.write()?)
+             .optional()?;
+         if let Some(modified) = modified {



Home | Main Index | Thread Index | Old Index