Description of problem: publican will build an rpm successfully however upon attempting to install the package is invalid. Believe the issue is caused by apostrophes being used in the abstract. Version-Release number of selected component (if applicable): How reproducible: very. Steps to Reproduce: 1. go to any Book_Info.xml in a book 2. within the <abstract> tags write anything that uses an apostrophe. Eg "I've been told this is bad" 3. build rpm in Publican. 4. install rpm and note errors. Actual results: Updating: Product-BookName-1 8/1 7Can't find string terminator '"' anywhere before EOF at -e line 1, <DATA> line 1662. error: %post(Product-BookName-1-web-en-US-1-12.el5.noarch) scriptlet failed, exit status 9 Expected results: Publican to detect apostrophe use. Additional info:
Changes spec file to enable special string handling in bash, escaped ' in abstract text for use in %post. Fixed in build: 2.2-0%{?dist}.t16
(In reply to comment #1) > Changes spec file to enable special string handling in bash, escaped ' in > abstract text for use in %post. > > Fixed in build: 2.2-0%{?dist}.t16 Tested with latest publican build from trunk. Building now escapes ' in abstract text in the %post section: %post -n Red_Hat_Enterprise_Linux-Installation_Guide-6-web-it-IT [...] relativi all\'installazione.} }); } $ws->regen_all_toc();' [...] Therefore, installation of RPM and subsequent run of %post scripts doesn't choke any more: [root@fedsec noarch]# yum --nogpg localinstall Red_Hat_Enterprise_Linux-Installation_Guide-6-web-it-IT-1.0-1.fc13.noarch.rpm [...] Running Transaction Installing : Red_Hat_Enterprise_Linux-Installation_Guide-6-web-it-I 1/1 Installed: Red_Hat_Enterprise_Linux-Installation_Guide-6-web-it-IT.noarch 0:1.0-1.fc13 Complete!
Just ran into this issue again this morning on publican-2.2-0.fc13.t31.noarch With an apostrophe in the <subtitle> in the book_info.xml, i am getting the following error when trying to install the RPM: """ /var/tmp/rpm-tmp.VEEuQE: line 1: `/usr/bin/perl -e $'use Publican::WebSite; my @formats = qw(html pdf html-single epub); my $ws = Publican::WebSite->new(); foreach my $format (@formats) { $ws->update_or_add_entry( { language => "en-US", product => "Documentation", version => "0.1", name => "RPMTest", format => "$format", product_label => "", version_label => "", name_label => "", subtitle => q{short desc'ription}, abstract => q{A short over\'view and summary of the book\'s subject and purpose, traditionally no more than one paragraph long. Note: the abstract will appear in the front matter of your book and will also be placed in the description field of the book\'s RPM spec file.} }); } $ws->regen_all_toc();'' warning: %post(Documentation-RPMTest-0.1-web-en-US-0-0.el5.noarch) scriptlet failed, exit status 2 """
escaped subtitle for use in post script. Fixed in build: 2.2-0%{?dist}.t35
(In reply to comment #4) > escaped subtitle for use in post script. > > Fixed in build: 2.2-0%{?dist}.t35 'found another one... tested with publican-2.2-0.fc13.t35.noarch. Installation Guide in fr-FR uses Guide d'installation as Name, resulting in an apostrophe in the name_label field in the %post section of the spec-file: name_label => "Guide_d'installation" This again causes a scriplet failed error: Installing : Red_Hat_Enterprise_Linux-Installation_Guide-6-web-fr-F 1/1 Non-fatal POSTIN scriptlet failure in rpm package Red_Hat_Enterprise_Linux-Installation_Guide-6-web-fr-FR-1.0-1.fc13.noarch /var/tmp/rpm-tmp.Av4LeS: line 1: unexpected EOF while looking for matching `"' /var/tmp/rpm-tmp.Av4LeS: line 4: syntax error: unexpected end of file warning: %post(Red_Hat_Enterprise_Linux-Installation_Guide-6-web-fr-FR-1.0-1.fc13.noarch) scriptlet failed, exit status 2 -> seems \' in name_label is needed as well...
Ensured all 3 web labels have apostrophes escaped for packaging. Fixed in build: 2.2-0%{?dist}.t40
Thanks Jeff Fix verified in 2.2-0%{?dist}.t40 The following test cases were performed: = Test Case 1 = 1. publican create --name "Test_Case_642088" 2. cd Test_Case_642088/ 3. Add ' to the contents of both the <subtitle> and <abstract> tags in en-US/Book_Info.xml 4. publican package --binary --lang en-US 5. rpm -Uvh tmp/rpm/noarch/Documentation-Test_Case_642088-0.1-web-en-US-0-0.el5.noarch.rpm Results: PASSED, no errors were returned when the RPM was installed. --------------------------------------------------------------- = Test Case 2 = 1. publican create --name "Test_Case_642088" 2. cd Test_Case_642088/ 3. publican update_pot 4. publican update_po --langs=fr-FR 5. update the translated strings for the title, subtitle and para entries, and add a ' to each one 6. publican package --binary --lang fr-FR 7. rpm -Uvh tmp/rpm/noarch/Documentation-Test_Case_642088-0.1-web-fr-FR-0-0.el5.noarch.rpm Results: PASSED, no errors were returned when the RPM was installed.
publican-2.3-0.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/publican-2.3-0.fc13
publican-2.3-0.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.