Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v4 RESEND 1/3] package/python-cramjam: new package
@ 2026-10-02 10:31 Flaviu Nistor
  2026-10-11  7:53 ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Flaviu Nistor @ 2026-10-02 10:31 UTC (permalink / raw)
  To: buildroot; +Cc: Flaviu Nistor, James Hilliard, Julien Olivain

Add cramjam, a python bindings to de/compression algorithms.
It is needed by python-snappy package in order to bump the version.

Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com>
---
Changes in v4:
- Update also DEVELOPERS file as suggested by Fiona Klute.
- Link to v3: https://lore.kernel.org/all/20260724065004.217411-1-flaviu.nistor@gmail.com/

 DEVELOPERS                                 |  3 +++
 package/Config.in                          |  1 +
 package/python-cramjam/Config.in           |  9 +++++++++
 package/python-cramjam/python-cramjam.hash |  4 ++++
 package/python-cramjam/python-cramjam.mk   | 14 ++++++++++++++
 5 files changed, 31 insertions(+)
 create mode 100644 package/python-cramjam/Config.in
 create mode 100644 package/python-cramjam/python-cramjam.hash
 create mode 100644 package/python-cramjam/python-cramjam.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index f2713c7239..93519574c9 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1134,6 +1134,9 @@ F:	support/testing/tests/package/test_nftables.py
 F:	support/testing/tests/package/test_python_networkmanager_goi.py
 F:	support/testing/tests/package/test_python_pyroute2.py
 
+N:	Flaviu Nistor <flaviu.nistor@gmail.com>
+F:	package/python-cramjam/
+
 N:	Flávio Tapajós <flavio.tapajos@newtesc.com.br>
 F:	configs/asus_tinker-s_rk3288_defconfig
 F:	board/asus/tinker-s/
diff --git a/package/Config.in b/package/Config.in
index fc1e57d30d..d4e3c2fe58 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1061,6 +1061,7 @@ menu "External python modules"
 	source "package/python-construct/Config.in"
 	source "package/python-contourpy/Config.in"
 	source "package/python-couchdb/Config.in"
+	source "package/python-cramjam/Config.in"
 	source "package/python-crayons/Config.in"
 	source "package/python-crc/Config.in"
 	source "package/python-crc16/Config.in"
diff --git a/package/python-cramjam/Config.in b/package/python-cramjam/Config.in
new file mode 100644
index 0000000000..84119ca968
--- /dev/null
+++ b/package/python-cramjam/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_PYTHON_CRAMJAM
+	bool "python-cramjam"
+	depends on !BR2_ARM_CPU_ARMV5
+	help
+	  Python bindings to de/compression algorithms in Rust.
+	  Allows for using algorithms such as Snappy, without any
+	  system or other python dependencies.
+
+	  https://pypi.org/project/cramjam
diff --git a/package/python-cramjam/python-cramjam.hash b/package/python-cramjam/python-cramjam.hash
new file mode 100644
index 0000000000..2042bb6281
--- /dev/null
+++ b/package/python-cramjam/python-cramjam.hash
@@ -0,0 +1,4 @@
+# Locally computed sha256 checksums
+sha256  542ea349a7528d88935856d3eb562cd17bff713d7a41eab8d6812d78a3cb00ba  cramjam-2.11.0.tar.gz
+sha256  10892f279948fe9a2dd5f2c559ef78aae1ebf4b5d5825e1eaf68b03787fde402  python-cramjam-2.11.0-cargo6.tar.gz
+sha256  b4f882bfc80d27a3732789bd883a8c1d342e8ffea7f622a71b3dfded834205ff  LICENSE
diff --git a/package/python-cramjam/python-cramjam.mk b/package/python-cramjam/python-cramjam.mk
new file mode 100644
index 0000000000..e1e060bfba
--- /dev/null
+++ b/package/python-cramjam/python-cramjam.mk
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-cramjam
+#
+################################################################################
+
+PYTHON_CRAMJAM_VERSION = 2.11.0
+PYTHON_CRAMJAM_SITE = $(call github,milesgranger,cramjam,v$(PYTHON_CRAMJAM_VERSION))
+PYTHON_CRAMJAM_SETUP_TYPE = maturin
+PYTHON_CRAMJAM_LICENSE = MIT
+PYTHON_CRAMJAM_LICENSE_FILES = LICENSE
+
+$(eval $(python-package))
+$(eval $(host-python-package))
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Buildroot] [PATCH v4 RESEND 1/3] package/python-cramjam: new package
  2026-10-02 10:31 Flaviu Nistor
@ 2026-10-11  7:53 ` Peter Korsgaard
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2026-10-11  7:53 UTC (permalink / raw)
  To: Flaviu Nistor; +Cc: buildroot, James Hilliard, Julien Olivain

>>>>> "Flaviu" == Flaviu Nistor <flaviu.nistor@gmail.com> writes:

Hi,

 > Add cramjam, a python bindings to de/compression algorithms.
 > It is needed by python-snappy package in order to bump the version.

 > Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com>
 > ---
 > Changes in v4:
 > - Update also DEVELOPERS file as suggested by Fiona Klute.
 > - Link to v3: https://lore.kernel.org/all/20260724065004.217411-1-flaviu.nistor@gmail.com/

 >  DEVELOPERS                                 |  3 +++
 >  package/Config.in                          |  1 +
 >  package/python-cramjam/Config.in           |  9 +++++++++
 >  package/python-cramjam/python-cramjam.hash |  4 ++++
 >  package/python-cramjam/python-cramjam.mk   | 14 ++++++++++++++
 >  5 files changed, 31 insertions(+)
 >  create mode 100644 package/python-cramjam/Config.in
 >  create mode 100644 package/python-cramjam/python-cramjam.hash
 >  create mode 100644 package/python-cramjam/python-cramjam.mk

 > diff --git a/DEVELOPERS b/DEVELOPERS
 > index f2713c7239..93519574c9 100644
 > --- a/DEVELOPERS
 > +++ b/DEVELOPERS
 > @@ -1134,6 +1134,9 @@ F:	support/testing/tests/package/test_nftables.py
 >  F:	support/testing/tests/package/test_python_networkmanager_goi.py
 >  F:	support/testing/tests/package/test_python_pyroute2.py
 
 > +N:	Flaviu Nistor <flaviu.nistor@gmail.com>
 > +F:	package/python-cramjam/
 > +
 >  N:	Flávio Tapajós <flavio.tapajos@newtesc.com.br>
 >  F:	configs/asus_tinker-s_rk3288_defconfig
 >  F:	board/asus/tinker-s/
 > diff --git a/package/Config.in b/package/Config.in
 > index fc1e57d30d..d4e3c2fe58 100644
 > --- a/package/Config.in
 > +++ b/package/Config.in
 > @@ -1061,6 +1061,7 @@ menu "External python modules"
 >  	source "package/python-construct/Config.in"
 >  	source "package/python-contourpy/Config.in"
 >  	source "package/python-couchdb/Config.in"
 > +	source "package/python-cramjam/Config.in"
 >  	source "package/python-crayons/Config.in"
 >  	source "package/python-crc/Config.in"
 >  	source "package/python-crc16/Config.in"
 > diff --git a/package/python-cramjam/Config.in b/package/python-cramjam/Config.in
 > new file mode 100644
 > index 0000000000..84119ca968
 > --- /dev/null
 > +++ b/package/python-cramjam/Config.in
 > @@ -0,0 +1,9 @@
 > +config BR2_PACKAGE_PYTHON_CRAMJAM
 > +	bool "python-cramjam"
 > +	depends on !BR2_ARM_CPU_ARMV5

Why? Perhaps you mean BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS?


> +	help
 > +	  Python bindings to de/compression algorithms in Rust.
 > +	  Allows for using algorithms such as Snappy, without any
 > +	  system or other python dependencies.
 > +
 > +	  https://pypi.org/project/cramjam
 > diff --git a/package/python-cramjam/python-cramjam.hash b/package/python-cramjam/python-cramjam.hash
 > new file mode 100644
 > index 0000000000..2042bb6281
 > --- /dev/null
 > +++ b/package/python-cramjam/python-cramjam.hash
 > @@ -0,0 +1,4 @@
 > +# Locally computed sha256 checksums
 > +sha256  542ea349a7528d88935856d3eb562cd17bff713d7a41eab8d6812d78a3cb00ba  cramjam-2.11.0.tar.gz

You only need the vendored tarball here, E.G. see python-cryptography.

Committed with those changes, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] [PATCH v4 RESEND 1/3] package/python-cramjam: new package
       [not found] <87cxtgh7kp.fsf@dell.be.48ers.dk>
@ 2026-10-13 18:45 ` Flaviu Nistor
  2026-10-14 16:42   ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Flaviu Nistor @ 2026-10-13 18:45 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: Flaviu Nistor, James Hilliard, Julien Olivain, buildroot

On Sun, Oct 11, 2026 at 1:09 PM, Peter Korsgaard wrote:
>Hi,
>
> >> +++ b/package/python-cramjam/Config.in
> >> @@ -0,0 +1,9 @@
> >> +config BR2_PACKAGE_PYTHON_CRAMJAM
> >> +	bool "python-cramjam"
> >> +	depends on !BR2_ARM_CPU_ARMV5
> 
>> Why? Perhaps you mean BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS?
>
>I saw that you were explicitly not testing with our default armv5
>kernel, so I gave it a try and the code indeed seems to be buggy:
>
>Reading symbols from python3...
>(gdb) run -c 'import cramjam'
>Starting program: /usr/bin/python3 -c 'import cramjam'
>[Thread debugging using libthread_db enabled]
>Using host libthread_db library "/lib/libthread_db.so.1".
>random: python3: uninitialized urandom read (24 bytes read)
>
>Program received signal SIGSEGV, Segmentation fault.
>0xb68e42dc in strcmp () from /lib/libc.so.6
>(gdb) bt
>#0  0xb68e42dc in strcmp () from /lib/libc.so.6
>#1  0xb6ca6584 in _PyImport_ResolveNameWithPackageContext (name=0x0)
>    at Python/import.c:846
>#2  0xb6b7385c in _PyModule_CreateInitialized (module=0xb6701808,
>    module_api_version=<optimized out>) at Objects/moduleobject.c:233
>#3  0xb6348018 in ?? ()
>   from /usr/lib/python3.14/site-packages/cramjam/cramjam.cpython-314-arm-linux-gnueabi.so
>Backtrace stopped: previous frame identical to this frame (corrupt stack?)
>(gdb) random: crng init done
>info registers
>r0             0x0                 0
>r1             0xb670b3d4          3060839380
>r2             0x0                 0
>r3             0x0                 0
>r4             0x0                 0
>r5             0xb670b3cc          3060839372
>r6             0xb6848508          3062138120
>r7             0x8                 8
>r8             0xb6701808          3060799496
>r9             0xbebaa064          3199901796
>r10            0xb6f0d538          3069236536
>r11            0xb6767f48          3061219144
>r12            0xb6ec4a40          3068938816
>sp             0xbeba9e50          0xbeba9e50
>lr             0xb6ca6584          3066717572
>pc             0xb68e42dc          0xb68e42dc <strcmp+84>
>cpsr           0x60000010          1610612752
>
>So presumably something is not initialized to cause this null pointer
>exception. The fact that PyImport_ResolveNameWithPackageContext gets
>called with a null pointer is already odd.
>
>Care to report it upstream? I see that there is in the mean time a 2.13
>release.

I saw a related issue reported with a similar topic that it can't be tested
on 32-bit architectures. This is way I specified depends on !BR2_ARM_CPU_ARMV5,
since at that time I found no other solution. I have tested today and version
2.14.0 (released today) does not have this issue any more, so it runs on armv5.
James Hilliard just send a bump for 2.14.0, so for v5 I will not include this.
Here is the link to the bump:
https://lore.kernel.org/all/20261013164254.1476592-6-james.hilliard1@gmail.com/

Thanks for support,
Flaviu

>
>-- 
>Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] [PATCH v4 RESEND 1/3] package/python-cramjam: new package
  2026-10-13 18:45 ` [Buildroot] [PATCH v4 RESEND 1/3] package/python-cramjam: new package Flaviu Nistor
@ 2026-10-14 16:42   ` Peter Korsgaard
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2026-10-14 16:42 UTC (permalink / raw)
  To: Flaviu Nistor; +Cc: James Hilliard, Julien Olivain, buildroot

>>>>> "Flaviu" == Flaviu Nistor <flaviu.nistor@gmail.com> writes:

Hi,

 >> So presumably something is not initialized to cause this null pointer
 >> exception. The fact that PyImport_ResolveNameWithPackageContext gets
 >> called with a null pointer is already odd.
 >> 
 >> Care to report it upstream? I see that there is in the mean time a 2.13
 >> release.

 > I saw a related issue reported with a similar topic that it can't be tested
 > on 32-bit architectures. This is way I specified depends on !BR2_ARM_CPU_ARMV5,

OK, but then it should presumably have been blocked on all 32bit
architectures and not just ARMv5. This is really the kind of nonobvious
stuff that should go into the commit message.

 > since at that time I found no other solution. I have tested today and version
 > 2.14.0 (released today) does not have this issue any more, so it runs on armv5.
 > James Hilliard just send a bump for 2.14.0, so for v5 I will not include this.
 > Here is the link to the bump:
 > https://lore.kernel.org/all/20261013164254.1476592-6-james.hilliard1@gmail.com/

OK, good.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-14 16:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87cxtgh7kp.fsf@dell.be.48ers.dk>
2026-10-13 18:45 ` [Buildroot] [PATCH v4 RESEND 1/3] package/python-cramjam: new package Flaviu Nistor
2026-10-14 16:42   ` Peter Korsgaard
2026-10-02 10:31 Flaviu Nistor
2026-10-11  7:53 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox