Bug#871357: packaging-tutorial: FTBFS: Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\\end{ <-- HERE document}/ at /usr/share/perl5/Locale/Po4a/TransTractor.pm line 6
On 08/08/17 at 16:13 -0400, gregor herrmann wrote: > Control: tag -1 + patch > > On Mon, 07 Aug 2017 11:58:29 -0400, Lucas Nussbaum wrote: > > > > Unescaped left brace in regex is illegal here in regex; marked by <-- > > > HERE in m/\\end{ <-- HERE document}/ at > > > /usr/share/perl5/Locale/Po4a/TransTractor.pm line 643. > > > debian/rules:13: recipe for target 'override_dh_auto_build' failed > > > make[1]: *** [override_dh_auto_build] Error 255 > > That's an interesting bug. > > The error is in /usr/share/perl5/Locale/Po4a/TransTractor.pm:643 > which is > my $found = scalar grep { /$position/ } @{$self->{TT}{doc_out}}; > and $position (comes from addendum_parse() in the same file and) > contains '\\end{document}' at that point. > > And this '\\end{document}' itself comes from files in the > packaging-tutorial po4a directory. > > So I don't know if po4a needs a generic fix, or packaging-tutorial > needs to change how it uses it. > > I'm attaching a patch for the second option. Thanks, patch applied and package uploaded! Lucas
Bug#871357: packaging-tutorial: FTBFS: Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\\end{ <-- HERE document}/ at /usr/share/perl5/Locale/Po4a/TransTractor.pm line 6
On Mon, 14 Aug 2017 01:04:36 +0200, Martin Quinson wrote: > On Sun, Aug 13, 2017 at 12:25:54PM -0400, gregor herrmann wrote: > > What po4a could maybe do is to mention in the documentation that the > > string in "position=something" in addendums will be interpreted as a > > Perl regexp later. > It's already the case: > > position (mandatory) > a Perl regexp. The addendum will be placed near the line matching > this regexp. Note that we're speaking about the translated > document here, not the original. If more than a line match this > expression (or none), the addition will fail. It is indeed better > to report an error than inserting the addendum at the wrong > location. Excellent, thanks, and sorry for not checking beforehand. > (I just added "Perl" in the first sentence, but the doc is otherwise > unchanged) If it's not explicit enough, please tell me how I could > improve it. I think it's fine this way. Cheers, gregor -- .''`. https://info.comodo.priv.at/ - Debian Developer https://www.debian.org : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06 `. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe `- NP: Fleetwood Mac: Don't Stop signature.asc Description: Digital Signature
Bug#871357: packaging-tutorial: FTBFS: Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\\end{ <-- HERE document}/ at /usr/share/perl5/Locale/Po4a/TransTractor.pm line 6
On Sun, Aug 13, 2017 at 12:25:54PM -0400, gregor herrmann wrote: > What po4a could maybe do is to mention in the documentation that the > string in "position=something" in addendums will be interpreted as a > Perl regexp later. It's already the case: position (mandatory) a Perl regexp. The addendum will be placed near the line matching this regexp. Note that we're speaking about the translated document here, not the original. If more than a line match this expression (or none), the addition will fail. It is indeed better to report an error than inserting the addendum at the wrong location. (I just added "Perl" in the first sentence, but the doc is otherwise unchanged) If it's not explicit enough, please tell me how I could improve it. Thanks, Mt. -- If Java had true garbage collection, most programs would delete themselves upon execution. -- Robert Sewell signature.asc Description: PGP signature
Bug#871357: packaging-tutorial: FTBFS: Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\\end{ <-- HERE document}/ at /usr/share/perl5/Locale/Po4a/TransTractor.pm line 6
On Tue, 08 Aug 2017 23:55:26 +0200, Martin Quinson wrote: > Thanks for investigating this bug. Thanks for looking into this issue. > > The error is in /usr/share/perl5/Locale/Po4a/TransTractor.pm:643 > > which is > > my $found = scalar grep { /$position/ } @{$self->{TT}{doc_out}}; > > and $position (comes from addendum_parse() in the same file and) > > contains '\\end{document}' at that point. > > > > And this '\\end{document}' itself comes from files in the > > packaging-tutorial po4a directory. > > > > So I don't know if po4a needs a generic fix, or packaging-tutorial > > needs to change how it uses it. > > I would be unable to generate a patch for the first option. My perl is > rather rotten nowadays. I also think it would be difficult; all tha po4a sees at this point is a string, and it's probably impossible to preprocess it into a regexp. What po4a could maybe do is to mention in the documentation that the string in "position=something" in addendums will be interpreted as a Perl regexp later. > I think that the second option is sensible: > packaging-tutorial is providing some code that is interpreted by po4a, > so it should ensure that it provides correct code. I tend to agree. (And it aleady escapes the backslash.) Lucas, what do you think? Cheers, gregor -- .''`. https://info.comodo.priv.at/ - Debian Developer https://www.debian.org : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06 `. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe `- signature.asc Description: Digital Signature
Bug#871357: packaging-tutorial: FTBFS: Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\\end{ <-- HERE document}/ at /usr/share/perl5/Locale/Po4a/TransTractor.pm line 6
Hello, Thanks for investigating this bug. On Tue, Aug 08, 2017 at 04:13:47PM -0400, gregor herrmann wrote: > Control: tag -1 + patch > > On Mon, 07 Aug 2017 11:58:29 -0400, Lucas Nussbaum wrote: > > > > Unescaped left brace in regex is illegal here in regex; marked by <-- > > > HERE in m/\\end{ <-- HERE document}/ at > > > /usr/share/perl5/Locale/Po4a/TransTractor.pm line 643. > > > debian/rules:13: recipe for target 'override_dh_auto_build' failed > > > make[1]: *** [override_dh_auto_build] Error 255 > > That's an interesting bug. > > The error is in /usr/share/perl5/Locale/Po4a/TransTractor.pm:643 > which is > my $found = scalar grep { /$position/ } @{$self->{TT}{doc_out}}; > and $position (comes from addendum_parse() in the same file and) > contains '\\end{document}' at that point. > > And this '\\end{document}' itself comes from files in the > packaging-tutorial po4a directory. > > So I don't know if po4a needs a generic fix, or packaging-tutorial > needs to change how it uses it. I would be unable to generate a patch for the first option. My perl is rather rotten nowadays. I think that the second option is sensible: packaging-tutorial is providing some code that is interpreted by po4a, so it should ensure that it provides correct code. > I'm attaching a patch for the second option. Many thanks for that. It looks great to me. Bye, Mt. -- The most exciting phrase to hear in science, the one that heralds new discoveries, is not "Eureka!" (I found it!) but "That's funny ..." --- Isaac Asimov signature.asc Description: PGP signature
Bug#871357: packaging-tutorial: FTBFS: Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\\end{ <-- HERE document}/ at /usr/share/perl5/Locale/Po4a/TransTractor.pm line 6
Control: tag -1 + patch On Mon, 07 Aug 2017 11:58:29 -0400, Lucas Nussbaum wrote: > > Unescaped left brace in regex is illegal here in regex; marked by <-- HERE > > in m/\\end{ <-- HERE document}/ at > > /usr/share/perl5/Locale/Po4a/TransTractor.pm line 643. > > debian/rules:13: recipe for target 'override_dh_auto_build' failed > > make[1]: *** [override_dh_auto_build] Error 255 That's an interesting bug. The error is in /usr/share/perl5/Locale/Po4a/TransTractor.pm:643 which is my $found = scalar grep { /$position/ } @{$self->{TT}{doc_out}}; and $position (comes from addendum_parse() in the same file and) contains '\\end{document}' at that point. And this '\\end{document}' itself comes from files in the packaging-tutorial po4a directory. So I don't know if po4a needs a generic fix, or packaging-tutorial needs to change how it uses it. I'm attaching a patch for the second option. Cheers, gregor -- .''`. https://info.comodo.priv.at/ - Debian Developer https://www.debian.org : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06 `. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe `- diff -Nru packaging-tutorial-0.20/debian/changelog packaging-tutorial-0.20+nmu1/debian/changelog --- packaging-tutorial-0.20/debian/changelog 2017-07-06 17:12:36.0 -0400 +++ packaging-tutorial-0.20+nmu1/debian/changelog 2017-08-08 16:04:04.0 -0400 @@ -1,3 +1,12 @@ +packaging-tutorial (0.20+nmu1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fixes "FTBFS: Unescaped left brace in regex is illegal here in regex": +escape braces in addendums. +(Closes: #871357) + + -- gregor herrmannTue, 08 Aug 2017 16:04:04 -0400 + packaging-tutorial (0.20) unstable; urgency=medium * Depend on texlive-latex-recommended instead of latex-beamer. Closes: #867098 diff -Nru packaging-tutorial-0.20/packaging-tutorial.tex packaging-tutorial-0.20+nmu1/packaging-tutorial.tex --- packaging-tutorial-0.20/packaging-tutorial.tex 2017-07-06 17:12:08.0 -0400 +++ packaging-tutorial-0.20+nmu1/packaging-tutorial.tex 2017-08-08 16:04:04.0 -0400 @@ -16,7 +16,7 @@ %leave \\version unchanged: this will a variable containing the actual version %To translate the date, use \\today or a string containing \\year, \\month, \\day %(numeric values). -\date{\footnotesize version 0.20 -- 2017-07-06} % DATE - use debian/rules update-version-date +\date{\footnotesize version 0.20+nmu1 -- 2017-08-08} % DATE - use debian/rules update-version-date \begin{document} diff -Nru packaging-tutorial-0.20/po4a/add_es/es.add packaging-tutorial-0.20+nmu1/po4a/add_es/es.add --- packaging-tutorial-0.20/po4a/add_es/es.add 2011-12-20 14:59:10.0 -0500 +++ packaging-tutorial-0.20+nmu1/po4a/add_es/es.add 2017-08-08 16:04:04.0 -0400 @@ -1,4 +1,4 @@ -PO4A-HEADER:mode=before;position=\\end{document};beginboundary=NoT_In_ThE_DocUMEnt +PO4A-HEADER:mode=before;position=\\end\{document};beginboundary=NoT_In_ThE_DocUMEnt \section*{Traducción} \begin{frame}{Traducción} diff -Nru packaging-tutorial-0.20/po4a/add_fr/fr.add packaging-tutorial-0.20+nmu1/po4a/add_fr/fr.add --- packaging-tutorial-0.20/po4a/add_fr/fr.add 2011-10-18 12:53:16.0 -0400 +++ packaging-tutorial-0.20+nmu1/po4a/add_fr/fr.add 2017-08-08 16:04:04.0 -0400 @@ -1,4 +1,4 @@ -PO4A-HEADER:mode=before;position=\\end{document};beginboundary=NoT_In_ThE_DocUMEnt +PO4A-HEADER:mode=before;position=\\end\{document};beginboundary=NoT_In_ThE_DocUMEnt \section*{Traduction} \begin{frame}{Traduction} diff -Nru packaging-tutorial-0.20/po4a/add_ja/ja.add packaging-tutorial-0.20+nmu1/po4a/add_ja/ja.add --- packaging-tutorial-0.20/po4a/add_ja/ja.add 2013-10-31 04:16:51.0 -0400 +++ packaging-tutorial-0.20+nmu1/po4a/add_ja/ja.add 2017-08-08 16:04:04.0 -0400 @@ -1,4 +1,4 @@ -PO4A-HEADER:mode=before;position=\\end{document};beginboundary=NoT_In_ThE_DocUMEnt +PO4A-HEADER:mode=before;position=\\end\{document};beginboundary=NoT_In_ThE_DocUMEnt \section*{翻訳} \begin{frame}{翻訳} diff -Nru packaging-tutorial-0.20/po4a/add_pt/pt.add packaging-tutorial-0.20+nmu1/po4a/add_pt/pt.add --- packaging-tutorial-0.20/po4a/add_pt/pt.add 2013-10-29 08:58:14.0 -0400 +++ packaging-tutorial-0.20+nmu1/po4a/add_pt/pt.add 2017-08-08 16:04:04.0 -0400 @@ -1,4 +1,4 @@ -PO4A-HEADER:mode=before;position=\\end{document};beginboundary=NoT_In_ThE_DocUMEnt +PO4A-HEADER:mode=before;position=\\end\{document};beginboundary=NoT_In_ThE_DocUMEnt \section*{Tradução} \begin{frame}{Tradução} diff -Nru packaging-tutorial-0.20/po4a/add_zh_TW/zh_TW.add packaging-tutorial-0.20+nmu1/po4a/add_zh_TW/zh_TW.add --- packaging-tutorial-0.20/po4a/add_zh_TW/zh_TW.add 2016-04-30 11:56:15.0 -0400 +++ packaging-tutorial-0.20+nmu1/po4a/add_zh_TW/zh_TW.add 2017-08-08 16:04:04.0 -0400 @@ -1,4 +1,4 @@
Bug#871357: packaging-tutorial: FTBFS: Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\\end{ <-- HERE document}/ at /usr/share/perl5/Locale/Po4a/TransTractor.pm line 6
Source: packaging-tutorial Version: 0.20 Severity: serious Tags: buster sid User: debian...@lists.debian.org Usertags: qa-ftbfs-20170807 qa-ftbfs Justification: FTBFS on amd64 Hi, During a rebuild of all packages in sid, your package failed to build on amd64. Relevant part (hopefully): > make[1]: Entering directory '/<>' > # version check > if [ 0.20 != 0.20 ]; then echo "Wrong version in .tex: 0.20 != 0.20"; exit 1; > fi > #translate source files before building pdf > po4a po4a/po4a.cfg --verbose --keep 50 > Updating po4a/po//packaging-tutorial.pot: > (628 entries) > Updating po4a/po//de.po: > > done. > po4a/po//de.po: 628 translated messages. > Updating po4a/po//es.po: > . > done. > po4a/po//es.po: 453 translated messages, 112 fuzzy translations, 63 > untranslated messages. > Updating po4a/po//fr.po: > .. > done. > po4a/po//fr.po: 628 translated messages. > Updating po4a/po//ja.po: > .. > done. > po4a/po//ja.po: 540 translated messages, 66 fuzzy translations, 22 > untranslated messages. > Updating po4a/po//pt.po: > . > done. > po4a/po//pt.po: 628 translated messages. > Updating po4a/po//ru.po: > ... > done. > po4a/po//ru.po: 628 translated messages. > Updating po4a/po//zh_TW.po: > ... > done. > po4a/po//zh_TW.po: 628 translated messages. > packaging-tutorial.de.tex is 100% translated (731 strings). > debiantutorial.de.sty is 100% translated (1 strings). > Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in > m/\\end{ <-- HERE document}/ at /usr/share/perl5/Locale/Po4a/TransTractor.pm > line 643. > debian/rules:13: recipe for target 'override_dh_auto_build' failed > make[1]: *** [override_dh_auto_build] Error 255 The full build log is available from: http://aws-logs.debian.net/2017/08/07/packaging-tutorial_0.20_unstable.log A list of current common problems and possible solutions is available at http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute! About the archive rebuild: The rebuild was done on EC2 VM instances from Amazon Web Services, using a clean, minimal and up-to-date chroot. Every failed build was retried once to eliminate random failures.