Bug 873893

Summary: Building RPM via "publican package" fails
Product: [Fedora] Fedora Reporter: Adam D. <adam820>
Component: publicanAssignee: Ruediger Landmann <rlandman>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 18CC: mmcallis, rlandman, sbaird
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-06 04:46:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
modified web-spec.xsl none

Description Adam D. 2012-11-06 22:25:26 UTC
Description of problem:
On both a document we're working on and a vanilla new document (publican create --type="book" --name="Test"), building an RPM fails with the follwing:

error: line 44: Too many names: %description  -n Documentation-Test-0.1-en-USA short overview and summary of the book's subject and purpose,
/usr/bin/rpmbuild exited with value 1
 at /usr/bin/publican line 856.

Version-Release number of selected component (if applicable):
publican-2.8-4.fc18.noarch

How reproducible:
Every time.

Steps to Reproduce:
1. Create new book: publican create --type="book" --name="Test"
2. Package command: publican package --binary --lang en-US
3. Exit with failure
  
Actual results:
rpmbuild exits with value 1

Expected results:
RPM packages built under /tmp/rpm/noarch

Additional info:

* When run on Fedora 17/publican-2.8-2.fc17.noarch, the same new book builds fine.
* Building individual formats works fine.

Comment 1 Simon Baird 2013-02-27 04:10:38 UTC
I am experiencing this also on F18.

http://pastebin.com/raw.php?i=UmW1gRyt

Comment 2 Simon Baird 2013-02-27 04:44:51 UTC
There's a workaround described here:
https://www.redhat.com/archives/publican-list/2013-January/msg00013.html

I edited my /usr/share/publican/xsl/web-spec.xsl and added

<xsl:text> 
</xsl:text>

on line 67 right above the abstract which fixed the issue.

Comment 3 Ruediger Landmann 2013-02-27 04:45:10 UTC
Created attachment 703267 [details]
modified web-spec.xsl

Comment 4 Simon Baird 2013-02-27 06:50:49 UTC
I discovered I needed another

<xsl:text> 
</xsl:text>

right before this line (line 35):

<xsl:if test="$brand != 'publican-common'">BuildRequires: <xsl:value-of select="$brand"/></xsl:if>

otherwise the spec file came out like this:

Requires:      publican >= 3.0BuildRequires: publican-redhat-engservices

ie, with a line break missing.