[PATCH] gnu: rust-libz-sys-1: Do not remove zlib-ng sources.

  • Done
  • quality assurance status badge
Details
2 participants
  • Maxime Devos
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Ricardo Wurmus
Severity
normal
R
R
Ricardo Wurmus wrote on 21 Sep 2022 11:35
(address . guix-patches@gnu.org)(name . Ricardo Wurmus)(address . rekado@elephly.net)
20220921093527.4907-1-rekado@elephly.net
* gnu/packages/crates-io.scm (rust-libz-sys-1)[source]: Only delete bundled
zlib sources.
---
gnu/packages/crates-io.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (19 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 42a44a2930..f7703f9295 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -32568,9 +32568,9 @@ (define-public rust-libz-sys-1
"1q25cb8vs113si7q2p0innhi8jk0wpq37hqi2wcc219hcmw43cr3"))
(modules '((guix build utils)))
(snippet
- '(begin (delete-file-recursively "src/zlib")
- (delete-file-recursively "src/zlib-ng")
- #t))))
+ ;; Do not delete zlib-ng, because we have no native library
+ ;; for it.
+ '(delete-file-recursively "src/zlib"))))
(build-system cargo-build-system)
(arguments
`(#:cargo-inputs
--
2.36.1
M
M
Maxime Devos wrote on 21 Sep 2022 12:15
360297ef-a62f-96e3-d2a6-05908cce15e3@telenet.be
On 21-09-2022 11:35, Ricardo Wurmus wrote:
Toggle quote (20 lines)
> * gnu/packages/crates-io.scm (rust-libz-sys-1)[source]: Only delete bundled
> zlib sources.
> ---
> gnu/packages/crates-io.scm | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
> index 42a44a2930..f7703f9295 100644
> --- a/gnu/packages/crates-io.scm
> +++ b/gnu/packages/crates-io.scm
> @@ -32568,9 +32568,9 @@ (define-public rust-libz-sys-1
> "1q25cb8vs113si7q2p0innhi8jk0wpq37hqi2wcc219hcmw43cr3"))
> (modules '((guix build utils)))
> (snippet
> - '(begin (delete-file-recursively "src/zlib")
> - (delete-file-recursively "src/zlib-ng")
> - #t))))
> + ;; Do not delete zlib-ng, because we have no native library
> + ;; for it.
> + '(delete-file-recursively "src/zlib"))))
According to the README, zlib and zlib-ng are supposed to be compatible,
so zlib-ng should be removable (as long as dependents don't enable
zlib-ng, but that can be patched out).
Additionally, using zlib-ng can cause problems if the application also
links to the regular zlib:
README.md ‘and as long as you don't also dynamically pull in a copy of
stock zlib (which will produce conflicting symbols)’
Proposal: keep removing zlib-ng, and modify the enabled features in
whatever crate or Rust application asks for zlib-ng.
Greetings,
Maxime.
Attachment: OpenPGP_signature
R
R
Ricardo Wurmus wrote on 21 Sep 2022 12:27
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 57975@debbugs.gnu.org)
87o7v9yqc6.fsf@elephly.net
Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (3 lines)
> Proposal: keep removing zlib-ng, and modify the enabled features in
> whatever crate or Rust application asks for zlib-ng.

Thanks, I’ll give that a try by patching the target application.

--
Ricardo
R
R
Ricardo Wurmus wrote on 22 Sep 2022 00:10
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 57975-done@debbugs.gnu.org)
87y1ucxtsl.fsf@elephly.net
Ricardo Wurmus <rekado@elephly.net> writes:

Toggle quote (7 lines)
> Maxime Devos <maximedevos@telenet.be> writes:
>
>> Proposal: keep removing zlib-ng, and modify the enabled features in
>> whatever crate or Rust application asks for zlib-ng.
>
> Thanks, I’ll give that a try by patching the target application.

Patching the package to not request the zlib-ng feature works, so I
retract this patch. Thanks again for the hint!

--
Ricardo
Closed
?