Bug 1011222 - img_dir not taken into account when locating icon.svg
img_dir not taken into account when locating icon.svg
Status: CLOSED CURRENTRELEASE
Product: Publican
Classification: Community
Component: publican (Show other bugs)
3.1
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jeff Fearn
tools-bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-23 16:18 EDT by Stephen Gordon
Modified: 2013-12-18 21:46 EST (History)
2 users (show)

See Also:
Fixed In Version: 4.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-18 21:46:50 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stephen Gordon 2013-09-23 16:18:11 EDT
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 18:37:33 EDT
HSS-QE has reviewed and declined this request. QE for this bug will be handled by IED.
Comment 3 Jeff Fearn 2013-09-23 19:20:00 EDT
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-10 23:38:06 EDT
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.