Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] biber: add patch to fix biber on perl 5.36
@ 2022-10-03 21:18 PoroCYon
  2022-10-03 21:21 ` [PR PATCH] [Updated] " PoroCYon
  2022-10-03 21:37 ` [PR PATCH] [Merged]: " leahneukirchen
  0 siblings, 2 replies; 3+ messages in thread
From: PoroCYon @ 2022-10-03 21:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1544 bytes --]

There is a new pull request by PoroCYon against master on the void-packages repository

https://github.com/PoroCYon/void-packages biber-fix-perl5.36
https://github.com/void-linux/void-packages/pull/39682

biber: add patch to fix biber on perl 5.36
With perl 5.36, biber now fails with a syntax error:

This patch was taken directly from biber upstream: https://github.com/plk/biber/commit/d9e961710074d266ad6bdf395c98868d91952088 . A clean fix would be updating biber, but as biber is released in lockstep with biblatex (and has strict version requirements going both ways), updating the TeXLive packages isn't really something I'm able to do.

Without this patch, invoking biber at all results in the following crash:

```
$ biber --help
Can't modify undef operator in scalar assignment at /usr/share/perl5/vendor_perl/Biber/Section.pm line 373, near "undef;"
Compilation failed in require at /usr/share/perl5/vendor_perl/Biber.pm line 24.
BEGIN failed--compilation aborted at /usr/share/perl5/vendor_perl/Biber.pm line 24.
Compilation failed in require at /bin/biber line 17.
BEGIN failed--compilation aborted at /bin/biber line 17.
```

#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- [x] I built this PR locally for my native architecture, x86_64-glib
- I did **not** build this PR locally for other architectures, as biber is written in perl and the change is relatively minor.


A patch file from https://github.com/void-linux/void-packages/pull/39682.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-biber-fix-perl5.36-39682.patch --]
[-- Type: text/x-diff, Size: 2579 bytes --]

From 69e0a9b8cf1494457ee646d9e943f5884489e6ca Mon Sep 17 00:00:00 2001
From: PoroCYon <p@pcy.be>
Date: Mon, 3 Oct 2022 23:12:54 +0200
Subject: [PATCH] biber: add patch to fix biber on perl 5.36

---
 .../patches/0001-Adapt_to_Perl_5.36.patch     | 40 +++++++++++++++++++
 srcpkgs/biber/template                        |  2 +-
 2 files changed, 41 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/biber/patches/0001-Adapt_to_Perl_5.36.patch

diff --git a/srcpkgs/biber/patches/0001-Adapt_to_Perl_5.36.patch b/srcpkgs/biber/patches/0001-Adapt_to_Perl_5.36.patch
new file mode 100644
index 0000000000000..895813c1f29cd
--- /dev/null
+++ b/srcpkgs/biber/patches/0001-Adapt_to_Perl_5.36.patch
@@ -0,0 +1,40 @@
+From d9e961710074d266ad6bdf395c98868d91952088 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
+Date: Wed, 25 May 2022 12:41:59 +0200
+Subject: [PATCH] Adapt to Perl 5.36
+
+A developmental release of Perl 5.36.0 fails to run tests with:
+
+    $ perl -Ilib t/basic-misc.t
+    1..72
+    Can't modify undef operator in scalar assignment at lib/Biber/Section.pm line 433, near "undef;"
+    Compilation failed in require at lib/Biber.pm line 24.
+    BEGIN failed--compilation aborted at lib/Biber.pm line 24.
+    Compilation failed in require at t/basic-misc.t line 11.
+    BEGIN failed--compilation aborted at t/basic-misc.t line 11.
+    # Looks like your test exited with 255 before it could output anything.
+
+This is because of a missing semicolon between commands in
+del_everykeys(). The new perl is more strict and raises a compile-time
+error:
+
+    $ perl -e '$a = undef $b = undef;'
+    Can't modify undef operator in scalar assignment at -e line 1, near "undef;"
+    Execution of -e aborted due to compilation errors.
+---
+ lib/Biber/Section.pm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/Biber/Section.pm b/lib/Biber/Section.pm
+index 03ed69a51..a78942f57 100644
+--- a/lib/Biber/Section.pm
++++ b/lib/Biber/Section.pm
+@@ -429,7 +429,7 @@ sub add_everykey {
+ 
+ sub del_everykeys {
+   my $self = shift;
+-  $self->{everykey} = undef
++  $self->{everykey} = undef;
+   $self->{everykey_lc} = undef;
+   return;
+ }
diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index cb5a3a076c2f5..ad3fc5b42d05f 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,7 +1,7 @@
 # Template file for 'biber'
 pkgname=biber
 version=2.16
-revision=1
+revision=2
 wrksrc="${pkgname}-${version}"
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"

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

* Re: [PR PATCH] [Updated] biber: add patch to fix biber on perl 5.36
  2022-10-03 21:18 [PR PATCH] biber: add patch to fix biber on perl 5.36 PoroCYon
@ 2022-10-03 21:21 ` PoroCYon
  2022-10-03 21:37 ` [PR PATCH] [Merged]: " leahneukirchen
  1 sibling, 0 replies; 3+ messages in thread
From: PoroCYon @ 2022-10-03 21:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1549 bytes --]

There is an updated pull request by PoroCYon against master on the void-packages repository

https://github.com/PoroCYon/void-packages biber-fix-perl5.36
https://github.com/void-linux/void-packages/pull/39682

biber: add patch to fix biber on perl 5.36
With perl 5.36, biber now fails with a syntax error:

This patch was taken directly from biber upstream: https://github.com/plk/biber/commit/d9e961710074d266ad6bdf395c98868d91952088 . A clean fix would be updating biber, but as biber is released in lockstep with biblatex (and has strict version requirements going both ways), updating the TeXLive packages isn't really something I'm able to do.

Without this patch, invoking biber at all results in the following crash:

```
$ biber --help
Can't modify undef operator in scalar assignment at /usr/share/perl5/vendor_perl/Biber/Section.pm line 373, near "undef;"
Compilation failed in require at /usr/share/perl5/vendor_perl/Biber.pm line 24.
BEGIN failed--compilation aborted at /usr/share/perl5/vendor_perl/Biber.pm line 24.
Compilation failed in require at /bin/biber line 17.
BEGIN failed--compilation aborted at /bin/biber line 17.
```

#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- [x] I built this PR locally for my native architecture, x86_64-glib
- I did **not** build this PR locally for other architectures, as biber is written in perl and the change is relatively minor.


A patch file from https://github.com/void-linux/void-packages/pull/39682.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-biber-fix-perl5.36-39682.patch --]
[-- Type: text/x-diff, Size: 3005 bytes --]

From 8e8814d2f2fea57118377b08cf816b3cac19bbad Mon Sep 17 00:00:00 2001
From: PoroCYon <p@pcy.be>
Date: Mon, 3 Oct 2022 23:12:54 +0200
Subject: [PATCH] biber: add patch to fix biber on perl 5.36

---
 .../patches/0001-Adapt_to_Perl_5.36.patch     | 40 +++++++++++++++++++
 srcpkgs/biber/template                        |  7 ++--
 2 files changed, 43 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/biber/patches/0001-Adapt_to_Perl_5.36.patch

diff --git a/srcpkgs/biber/patches/0001-Adapt_to_Perl_5.36.patch b/srcpkgs/biber/patches/0001-Adapt_to_Perl_5.36.patch
new file mode 100644
index 000000000000..895813c1f29c
--- /dev/null
+++ b/srcpkgs/biber/patches/0001-Adapt_to_Perl_5.36.patch
@@ -0,0 +1,40 @@
+From d9e961710074d266ad6bdf395c98868d91952088 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
+Date: Wed, 25 May 2022 12:41:59 +0200
+Subject: [PATCH] Adapt to Perl 5.36
+
+A developmental release of Perl 5.36.0 fails to run tests with:
+
+    $ perl -Ilib t/basic-misc.t
+    1..72
+    Can't modify undef operator in scalar assignment at lib/Biber/Section.pm line 433, near "undef;"
+    Compilation failed in require at lib/Biber.pm line 24.
+    BEGIN failed--compilation aborted at lib/Biber.pm line 24.
+    Compilation failed in require at t/basic-misc.t line 11.
+    BEGIN failed--compilation aborted at t/basic-misc.t line 11.
+    # Looks like your test exited with 255 before it could output anything.
+
+This is because of a missing semicolon between commands in
+del_everykeys(). The new perl is more strict and raises a compile-time
+error:
+
+    $ perl -e '$a = undef $b = undef;'
+    Can't modify undef operator in scalar assignment at -e line 1, near "undef;"
+    Execution of -e aborted due to compilation errors.
+---
+ lib/Biber/Section.pm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/Biber/Section.pm b/lib/Biber/Section.pm
+index 03ed69a51..a78942f57 100644
+--- a/lib/Biber/Section.pm
++++ b/lib/Biber/Section.pm
+@@ -429,7 +429,7 @@ sub add_everykey {
+ 
+ sub del_everykeys {
+   my $self = shift;
+-  $self->{everykey} = undef
++  $self->{everykey} = undef;
+   $self->{everykey_lc} = undef;
+   return;
+ }
diff --git a/srcpkgs/biber/template b/srcpkgs/biber/template
index cb5a3a076c2f..a0f35b1b7d8e 100644
--- a/srcpkgs/biber/template
+++ b/srcpkgs/biber/template
@@ -1,8 +1,7 @@
 # Template file for 'biber'
 pkgname=biber
 version=2.16
-revision=1
-wrksrc="${pkgname}-${version}"
+revision=2
 build_style=perl-ModuleBuild
 hostmakedepends="perl-Module-Build"
 makedepends="perl-ExtUtils-LibBuilder"
@@ -20,13 +19,13 @@ depends="perl-autovivification
 	perl-Encode-EUCJPASCII
 	perl-Encode-HanExtra
 	perl-Encode-JIS2K
- 	perl-ExtUtils-LibBuilder
+	perl-ExtUtils-LibBuilder
 	perl-File-Slurper
 	perl-IO-String
 	perl-IPC-Run3
 	perl-Lingua-Translit
 	perl-List-AllUtils
- 	perl-List-MoreUtils
+	perl-List-MoreUtils
 	perl-List-MoreUtils-XS
 	perl-Log-Log4perl
 	perl-LWP-Protocol-https

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

* Re: [PR PATCH] [Merged]: biber: add patch to fix biber on perl 5.36
  2022-10-03 21:18 [PR PATCH] biber: add patch to fix biber on perl 5.36 PoroCYon
  2022-10-03 21:21 ` [PR PATCH] [Updated] " PoroCYon
@ 2022-10-03 21:37 ` leahneukirchen
  1 sibling, 0 replies; 3+ messages in thread
From: leahneukirchen @ 2022-10-03 21:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1380 bytes --]

There's a merged pull request on the void-packages repository

biber: add patch to fix biber on perl 5.36
https://github.com/void-linux/void-packages/pull/39682

Description:
With perl 5.36, biber now fails with a syntax error:

This patch was taken directly from biber upstream: https://github.com/plk/biber/commit/d9e961710074d266ad6bdf395c98868d91952088 . A clean fix would be updating biber, but as biber is released in lockstep with biblatex (and has strict version requirements going both ways), updating the TeXLive packages isn't really something I'm able to do.

Without this patch, invoking biber at all results in the following crash:

```
$ biber --help
Can't modify undef operator in scalar assignment at /usr/share/perl5/vendor_perl/Biber/Section.pm line 373, near "undef;"
Compilation failed in require at /usr/share/perl5/vendor_perl/Biber.pm line 24.
BEGIN failed--compilation aborted at /usr/share/perl5/vendor_perl/Biber.pm line 24.
Compilation failed in require at /bin/biber line 17.
BEGIN failed--compilation aborted at /bin/biber line 17.
```

#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- [x] I built this PR locally for my native architecture, x86_64-glib
- I did **not** build this PR locally for other architectures, as biber is written in perl and the change is relatively minor.


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

end of thread, other threads:[~2022-10-03 21:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-03 21:18 [PR PATCH] biber: add patch to fix biber on perl 5.36 PoroCYon
2022-10-03 21:21 ` [PR PATCH] [Updated] " PoroCYon
2022-10-03 21:37 ` [PR PATCH] [Merged]: " leahneukirchen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).