Bug 1011222 - img_dir not taken into account when locating icon.svg
Summary: img_dir not taken into account when locating icon.svg
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Publican
Classification: Community
Component: publican
Version: 3.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jeff Fearn 🐞
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-23 20:18 UTC by Stephen Gordon
Modified: 2013-12-19 02:46 UTC (History)
2 users (show)

Fixed In Version: 4.0.0
Clone Of:
Environment:
Last Closed: 2013-12-19 02:46:50 UTC
Embargoed:


Attachments (Terms of Use)

Description Stephen Gordon 2013-09-23 20:18:11 UTC
Description of problem:

I used publican package to generate an SRPM for a book that has "img_dir: figures" in the publican.cfg file. When rebuilding the resultant SRPM using `rpmbuild -ba` I received this error:

cp: cannot stat 'en-US/images/icon.svg': No such file or directory
error: Bad exit status from /home/sgordon/rpmbuild/tmp/rpm-tmp.gMz4U3 (%install)

Looking in the tar file inside the SRPM I can see that icon.svg was packaged correctly (in the figures directory):

$ tar -tf Red_Hat_Enterprise_Linux_OpenStack_Platform-Configuration_Reference_Guide-4-web-en-US-4-1.tgz | grep icon.svg
Red_Hat_Enterprise_Linux_OpenStack_Platform-Configuration_Reference_Guide-4-web-en-US-4/en-US/figures/icon.svg

Line 77 of the spec file however is hard coded to expect the file to be located at en-US/images/icon.svg:

cp en-US/images/icon.svg  $RPM_BUILD_ROOT/usr/share/icons/hicolor/scalable/apps/Red_Hat_Enterprise_Linux_OpenStack_Platform-Configuration_Reference_Guide-4-en-US.svg;

Version-Release number of selected component (if applicable):

publican-3.2.1

How reproducible:

Reproducer attached.

Steps to Reproduce:
1. publican create --name "Test Book"
2. cd Test_Book
3. mv en-US/images en-US/figures
4. echo "img_dir: figures" >> publican.cfg
5. publican package --lang=en-US
6. rpmbuild --rebuild /tmp/Image_Test/tmp/rpm/Documentation-Test_Book-0.1-web-en-US-0.0-0.fc18.src.rpm

Actual results:

+ cp en-US/images/icon.svg /home/sgordon/rpmbuild/BUILDROOT/Documentation-Image_Test-0.1-web-en-US-0.0-0.fc18.x86_64/usr/share/icons/hicolor/scalable/apps/Documentation-Image_Test-0.1-en-US.svg
cp: cannot stat 'en-US/images/icon.svg': No such file or directory
error: Bad exit status from /home/sgordon/rpmbuild/tmp/rpm-tmp.OKiyeG (%install)


RPM build errors:
    Bad exit status from /home/sgordon/rpmbuild/tmp/rpm-tmp.OKiyeG (%install)

Expected results:

Spec file correctly updated to use img_dir.

Comment 2 HSS Product Manager 2013-09-23 22:37:33 UTC
HSS-QE has reviewed and declined this request. QE for this bug will be handled by IED.

Comment 3 Jeff Fearn 🐞 2013-09-23 23:20:00 UTC
Update path in rpm_templates/spec.tmpl

To ssh://git.fedorahosted.org/git/publican.git
   87804ea..6347b27  HEAD -> devel

Comment 4 Ruediger Landmann 2013-10-11 03:38:06 UTC
Verified with publican-3.9.9-0.fc19.t4.noarch


Note You need to log in before you can comment on or make changes to this bug.