Bug 173756

Summary: docs and examples do not get template processing applied
Product: [Fedora] Fedora Reporter: Jon Burgess <jburgess777>
Component: perl-Template-ToolkitAssignee: Tom "spot" Callaway <tcallawa>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: extras-qa, scop
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-04-07 18:12:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jon Burgess 2005-11-20 17:48:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8) Gecko/20051118 Fedora/1.5-0.5.0.rc3 Firefox/1.5

Description of problem:
AFAICT the "make install" process of the template toolkit is meant to run the examples and docs through the templating process. This step of the RPM build process fails because it doesm't take into account the build root.

The RPM should contain HTML files under /usr/share/doc/perl-Template-Toolkit-2.14/docs/html but there are none.

Version-Release number of selected component (if applicable):
perl-Template-Toolkit-2.14-5

How reproducible:
Always

Steps to Reproduce:
1. Downloaded fecora extras-devel CVS tree
2. make compile
3. make install-short




Actual Results:  From the install-short log:
...
ttree 2.78 (Template Toolkit version 2.14)

      Source: /usr/share/tt2/docs/src
 Destination: /usr/share/tt2/docs/html
Include Path: [ /usr/share/tt2/docs/style/splash, /usr/share/tt2/docs/lib, /usr/share/tt2/templates ]
      Ignore: [  ]
        Copy: [  ]
      Accept: [  ]
      Suffix: [  ]

/usr/share/tt2/docs/src: No such file or directory
...


Expected Results:  It needs to run the template process on the files under the build root.

Additional info:

Looks like the problem occurs with the following Makefile rules:

tt2_html_docs ::
	@$(PERL) -I$(INST_LIB) -I$(INST_ARCHLIB) bin/ttree -v -f "$(TT_PREFIX)/docs/ttree.cfg"

tt2_examples ::
	@$(PERL) -I$(INST_LIB) -I$(INST_ARCHLIB) bin/ttree -v -f 
"$(TT_PREFIX)/examples/ttree.cfg"

These get run with TT_PREFIX = /usr/share/tt2

Comment 1 Tom "spot" Callaway 2006-04-07 14:48:03 UTC
Easy enough to fix, resolved in 2.14-7.

Comment 2 Ville Skyttä 2006-04-07 17:00:38 UTC
I'm afraid the fix in CVS has side effects as it causes buildroots embedded into
distributed files.  With fedora-rpmdevtools installed and check-buildroot stuff
configured:

+ /usr/lib/rpm/check-buildroot
/var/tmp/perl-Template-Toolkit-2.14-7-buildroot-scop/usr/share/tt2/examples/ttree.cfg:src
 = /var/tmp/perl-Template-Toolkit-2.14-7-buildroot-scop/usr/share/tt2/examples/src
/var/tmp/perl-Template-Toolkit-2.14-7-buildroot-scop/usr/share/tt2/examples/ttree.cfg:dest
= /var/tmp/perl-Template-Toolkit-2.14-7-buildroot-scop/usr/share/tt2/examples/html
/var/tmp/perl-Template-Toolkit-2.14-7-buildroot-scop/usr/share/tt2/examples/ttree.cfg:lib
 = /var/tmp/perl-Template-Toolkit-2.14-7-buildroot-scop/usr/share/tt2/examples/lib
/var/tmp/perl-Template-Toolkit-2.14-7-buildroot-scop/usr/share/tt2/examples/ttree.cfg:lib
 = /var/tmp/perl-Template-Toolkit-2.14-7-buildroot-scop/usr/share/tt2/templates
/var/tmp/perl-Template-Toolkit-2.14-7-buildroot-scop/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/Template/Config.pm:$INSTDIR
 = '/var/tmp/perl-Template-Toolkit-2.14-7-buildroot-scop/usr/share/tt2';
Found '/var/tmp/perl-Template-Toolkit-2.14-7-buildroot-scop' in installed files;
aborting


In particular, the $INSTDIR one should be reviewed because it affects a value
returned by a documented, public API method (Template::Config->instdir()).

Comment 3 Tom "spot" Callaway 2006-04-07 18:12:56 UTC
Hrm. I thought I had check-buildroot configured.

%__arch_install_post   /usr/lib/rpm/check-rpaths   /usr/lib/rpm/check-buildroot

(Is that insufficient?)

Anyway, fixed it in 2.14-8.

Comment 4 Ville Skyttä 2006-04-07 20:03:05 UTC
I have check-buildroot configured seemingly the same way in ~/.rpmmacros, works
for me...