Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seems update to po4a to 0.70 breaks builds of apt #475

Closed
sergiomb2 opened this issue Feb 21, 2024 · 14 comments
Closed

seems update to po4a to 0.70 breaks builds of apt #475

sergiomb2 opened this issue Feb 21, 2024 · 14 comments

Comments

@sergiomb2
Copy link

sergiomb2 commented Feb 21, 2024

I don't have many information I was doing the usual updates , on Fedora rawhide after update po4a to 0.70 which debian didn't yet https://tracker.debian.org/pkg/po4a , a new update of apt ( 2.7.12 ) stops on po4a . is just a coincidence ?

I don't have much info the https://kojipkgs.fedoraproject.org//work/tasks/186/113820186/build.log test build of apt is here https://koji.fedoraproject.org/koji/taskinfo?taskID=113820186

Let me know , how I can debug this or help in someway

FAILED: doc/de/apt.ent.po4a-stamp /builddir/build/BUILD/apt-2.7.12/redhat-linux-build/doc/de/apt.ent.po4a-stamp 
cd /builddir/build/BUILD/apt-2.7.12/redhat-linux-build/doc && /usr/bin/cmake -E make_directory /builddir/build/BUILD/apt-2.7.12/redhat-linux-build/doc/de && po4a --previous --no-backups --package-name='apt-doc' --package-version='2.7.12' --msgid-bugs-address='APT\ Development\ Team\ <deity@lists.debian.org>' --translate-only de/apt.ent --srcdir /builddir/build/BUILD/apt-2.7.12/doc --destdir /builddir/build/BUILD/apt-2.7.12/redhat-linux-build/doc /builddir/build/BUILD/apt-2.7.12/doc/po4a.conf && /usr/bin/cmake -E touch /builddir/build/BUILD/apt-2.7.12/redhat-linux-build/doc/de/apt.ent.po4a-stamp
@Fat-Zer
Copy link
Contributor

Fat-Zer commented Feb 21, 2024

For reference:

The po4a error message:

Simple quote (') matched with double quote (") in docbook opt:" -o untranslated='<term><option> <refname> <refentrytitle> <date> <refentryinfo> <phrase> <variablelist> <term><command>' -o break='<term><option> <term><command>' -o nodefault='<option> <refname> <refentrytitle> <date> <refentryinfo> <phrase> <variablelist> <command>' -o inline='<para><option> <refentrytitle> <para><command> <programlisting><command> <refentrytitle><command> <refpurpose><command>' -o translated='<para><command> <programlisting><command> <refentrytitle><command> <refpurpose><command>'" at /usr/bin/po4a line 882, <CONFIG> line 11.

Relevant po4a.conf lines:

[po4a_alias:manpage] docbook opt:"\
	-o untranslated='<term><option> <refname> <refentrytitle> <date> <refentryinfo> <phrase> <variablelist> <term><command>' \
	-o break='<term><option> <term><command>' \
	-o nodefault='<option> <refname> <refentrytitle> <date> <refentryinfo> <phrase> <variablelist> <command>' \
	-o inline='<para><option> <refentrytitle> <para><command> <programlisting><command> <refentrytitle><command> <refpurpose><command>' \
	-o translated='<para><command> <programlisting><command> <refentrytitle><command> <refpurpose><command>'"

@gemmaro
Copy link
Contributor

gemmaro commented Feb 22, 2024

It would be possible to work around this by using backslash-escaped quotation marks.

diff --git a/doc/po4a.conf b/doc/po4a.conf
index 0798eac68..1adc26b7e 100644
--- a/doc/po4a.conf
+++ b/doc/po4a.conf
@@ -4,11 +4,11 @@
 # Entities need to be present, even if not translated
 [po4a_alias:entity] text opt:"-k 0"
 [po4a_alias:manpage] docbook opt:"\
-       -o untranslated='<term><option> <refname> <refentrytitle> <date> <refentryinfo> <phrase> <variablelist> <term><command>' \
-       -o break='<term><option> <term><command>' \
-       -o nodefault='<option> <refname> <refentrytitle> <date> <refentryinfo> <phrase> <variablelist> <command>' \
-       -o inline='<para><option> <refentrytitle> <para><command> <programlisting><command> <refentrytitle><command> <refpurpose><command>' \
-       -o translated='<para><command> <programlisting><command> <refentrytitle><command> <refpurpose><command>'"
+       -o untranslated=\"<term><option> <refname> <refentrytitle> <date> <refentryinfo> <phrase> <variablelist> <term><command>\" \
+       -o break=\"<term><option> <term><command>\" \
+       -o nodefault=\"<option> <refname> <refentrytitle> <date> <refentryinfo> <phrase> <variablelist> <command>\" \
+       -o inline=\"<para><option> <refentrytitle> <para><command> <programlisting><command> <refentrytitle><command> <refpurpose><command>\" \
+       -o translated=\"<para><command> <programlisting><command> <refentrytitle><command> <refpurpose><command>\""
 
 # define source file and translated file (one file per line)
 [type: entity]  apt.ent $lang:$lang/apt.ent

chenrui333 added a commit to Homebrew/formula-patches that referenced this issue Feb 23, 2024
relates to mquinson/po4a#475 (comment)

Signed-off-by: Rui Chen <rui@chenrui.dev>
@mquinson
Copy link
Owner

Cool, thanks for the report, the patch and the test that it works at least in Homebrew, you really rock.

Could someone also open a bug against apt in Debian so that this patch gets merged upstream, please? You can tell the apt maintainer that po4a 0.70 is coming to Debian. It will happen at some point :)

Thanks again for being such a wonderful community :)

@sergiomb2
Copy link
Author

Thanks for the compliments, it's an honor 😉

if is an apt issue should I send a merge request to https://salsa.debian.org/apt-team/apt ?

Thank you

@Fat-Zer
Copy link
Contributor

Fat-Zer commented Feb 23, 2024

I do understand it's hard to parse quotes with all the corner cases like "'"'", but the current syntax in the config looks better than the proposed workaround.

Maybe it would be better to fix it in po4a and do a quick bugfix release?

@chenrui333
Copy link

Yeah, I feel like it should be fixed in po4a if it is a simple fix, but if it takes long, we should at least patch on the apt side as well.

@mquinson
Copy link
Owner

I think I got this working. At least it works on my synthetic tests, and I would appreciate if someone could test whether it helps for the apt config file too, please.

@sergiomb2
Copy link
Author

it fixes apt build thank you

@mquinson
Copy link
Owner

This confirms the idea of having a release in 2 days, then. Thanks for the testing.

@sergiomb2
Copy link
Author

huch , I just received another bug report
Summary: debhelper-13.11.6-3.fc41 FTBFS: UTF-8 "\xF3" does not map to Unicode at /usr/share/perl5/vendor_perl/Locale/Po4a/TransTractor.pm line 583
This failure is probably triggered by upgrading po4a from 0.69-5.fc40 to 0.70-2.fc41 ( 0.70-2 the release 2 means that have the fix here already)

https://bugzilla.redhat.com/show_bug.cgi?id=2266008

@sergiomb2
Copy link
Author

sergiomb2 commented Feb 26, 2024

I'm going to open a new issue

@sergiomb2
Copy link
Author

Hi, I just discovered another bug, when I build apt, I will open a new issue once I got enough data to report

@mquinson
Copy link
Owner

hihi, that's a bit repetitive, but that's still a funny game. Thanks for the testing, @sergiomb2.

@mquinson
Copy link
Owner

Ok, closing this bug since you opened another one (as you should).
Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants