Hi Andreas,

On Sat, May 09, 2026 at 11:09:30PM +0200, Andreas Tille wrote:
I tried hard to get the new version of python-cramjam build successfully.

   https://salsa.debian.org/python-team/packages/python-cramjam

It seems it needs a Rust package build from

   https://github.com/cramjam/libcramjam

to build successfully.  I have no idea about Rust packaging and need some
advise how to proceed from here.

So I started looking into this, and then got a bit carried away..

I'm not sure about patch
debian/patches/restrict_to_python_module.patch, since it adds a new
workspace member "libcramjam" that does not exist; adjusted to drop
that but keep removal of the js crate.

libcramjam appears to be an externally hosted Rust package
(https://github.com/cramjam/libcramjam), so needed to
be packaged separately. I've done so in the debcargo-conf repository
(https://salsa.debian.org/rust-team/debcargo-conf/-/commit/08ad74dcce333bd4aa740f04359039a340a19943).

libcramjam depended on rust-libdeflate-sys, which is not in Debian but
behind an optional feature so for the moment I've just disabled
gzip/zlib support in libcramjam, but that can be re-enabled once
rust-libdeflate-sys is packaged (this is non-trivial since it needs to
be build against a different version of libdeflate than currently
packaged in Debian). Same for blosc2-rs and isal-rs. Not sure if this
is okay for what you need cramjam for (and I haven't looked at what
older versions provide), but we can also package those
dependencies if needed.

cramjam was using an old version of pyo3, so I had to port it to 0.28
(patched). Submitted upstream here: 
https://github.com/milesgranger/cramjam/pull/240

I've dropped the -static features since we don't support those in
most Debian crates.

For non-rust-team packages, "debcargo update-dependencies" is
convenient for updating debian/control, so running that after applying
patches:

caledvlwch% QUILT_PATCHES=debian/patches/ quilt push -a
...
caledvlwch% /usr/bin/debcargo update-dependencies --drop-unreferenced
...
Updating debian/control...
...
Done!

See 
https://salsa.debian.org/python-team/packages/python-cramjam/-/merge_requests/1
for the merge request with the above changes.

This builds for me and the testsuite passes for me, with the exception
of one unrelated failure in click.

Cheers,

Jelmer

Reply via email to