Bug 325311 - build of tetex fails with: Found '/var/tmp/tetex-root' in installed files; aborting
Summary: build of tetex fails with: Found '/var/tmp/tetex-root' in installed files; ab...
Alias: None
Product: Fedora
Classification: Fedora
Component: tetex   
(Show other bugs)
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: fedora-ia64
TreeView+ depends on / blocked
Reported: 2007-10-09 18:09 UTC by Doug Chapman
Modified: 2013-07-02 23:23 UTC (History)
2 users (show)

Fixed In Version: 3.0-40.5.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-02-16 02:06:57 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
output of rpmbuild -bb tetex.spec (924.16 KB, text/plain)
2007-10-09 18:09 UTC, Doug Chapman
no flags Details

Description Doug Chapman 2007-10-09 18:09:24 UTC
Description of problem:
I am working on the build of F8T3 for ia64.  Until we get the ia64 build systems
up and running at the Fedora COLO I am doing this manually.  I am running into
the following problem when building tetex.  I hit this both when I try building
under mock as well as just doing a simple rpmbuild.

I will attach the full build output as an attachment but the failure is:

Found '/var/tmp/tetex-root' in installed files; aborting

error: Bad exit status from /var/tmp/rpm-tmp.36896 (%install)

It is quite likely I have something set up wrong on my system or perhaps need a
specific version of one of the dependencies which isn't explicitly called out in
the spec file.  I welcome any debug help as I am by no means an rpm specfile expert.

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

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:

Comment 1 Doug Chapman 2007-10-09 18:09:24 UTC
Created attachment 221601 [details]
output of rpmbuild -bb tetex.spec

Comment 2 Doug Chapman 2007-10-09 21:42:37 UTC
I found that I am able to compile this on a RHEL5.1 ia64 system with no problem,
so for now I do have a workaround.  However, I would still like to figure out
what the reason for this failure when I compile under Fedora is.  I am going to
install F8 Test3 on one of my x86_64 systems to see if I hit the same issue
there when I get a chance (in a couple of days likely).

Comment 3 Zhan, Yi 2007-11-13 12:51:23 UTC
Is there any good news for this issue? I ran into the same problem when trying
to build the tetex package (cvs NOV. 13) both under Fedora IA-64 and x86_64. I
looked into this for quite a while and probably figured out the cause of the
issue but still have no idea what is the right way to fix it.

The %prep, %build and %install stages worked fine. And the build failed when
running the '/usr/lib/rpm/check-buildroot' at the 'post %install' stage. The
script is designed to make sure the installed files do not contain any
information related to the temporary build root, which means that we should not
find the string ‘/var/tmp/tetex-root’ in any installed file. But actually the
string lies in both
'/var/tmp/tetex-root/usr/share/texmf-var/fonts/map/pdftex/updmap/*.map' and
'/var/tmp/tetex-root/usr/share/texmf-var/web2c/*.fmt'. The causes of this are as

1. Two variables are exported in the tetex.spec (about line 491) in the %install
section, before calling 'make install' command:
    export TEXMFSYSVAR=${RPM_BUILD_ROOT}%{_datadir}/texmf-var
    export TEXMFSYSCONFIG=${RPM_BUILD_ROOT}%{_datadir}/texmf-config
   Now TEXMFSYSVAR is "/var/tmp/tetex-root/usr/share/texmf-var/" and
TEXMFSYSCONFIG is "/var/tmp/tetex-root/usr/share/texmf-config/"

2. Then 'make install' is called, and 'updmap-sys' and 'fmtutil-sys' are
executed (about line 70 and 78 in the Makefile). The two scripts, located at
'tetex-src-3.0/texk/tetex/', both use the variables TEXMFSYSVAR and
TEXMFSYSCONFIG to generate information. Take 'updmap-sys' for an instance, it
set the variable TEXMFVAR as TEXMFSYSVAR and then execute the updmap script.
Then the 'updmap' write the strings, beginning with '/var/tmp/tetex-root', to
the *.map files by executing the following lines:
    vartexmf=`kpsewhich -var-value=TEXMFVAR` (about line 805)
    dvipsoutputdir=$vartexmf/fonts/map/dvips/updmap (about line 809)
    outputFiles="$dvipsoutputdir/download35.map <some other file names>" (about
line 1104)
    allOutput="$outputFiles $outputLinks" (about line 1118)

    for file in $allOutput; do            (about line 1165)
      rm -f "$file"
      cat > "$file" <<-eof
	  % $file: maintained by the script updmap.    (This line actually writes the
	  %   Don't change this file directly. Edit texmf/web2c/$cnfFileShort
	  %   and run updmap to recreate this file.
    Now we can see that the first line of every *.map generated by the updmap
has the format
"/var/tmp/tetex-root/usr/share/texmf-var/fonts/map/*/updmap/*.map: maintained by
the script updmap.". And this makes the check-buildroot failed. 

As I don't have a RHEL installed, I can't tell why the build under RHEL can
avoid this issue. And I examined the content of
'/usr/share/texmf-var/fonts/*/updmap/*.map' in the 'prebuilt' rpm, the strings
all start just with /usr/share/, without the "/var/tmp/tetex-root" prefix. May
be I should install a RHEL to see the different.  

Comment 4 Jindrich Novy 2007-11-15 15:48:37 UTC
I removed the direct paths to buildroot from the *.map files by simply sed'ding
them out, because the path is noted only in the comment, so it's safe. The
problem is what to do with the buildroot paths encoded in the fmt files since
they are binary...

Comment 5 Jindrich Novy 2007-11-20 12:19:49 UTC
I defined __arch_install_post to %{nil} in spec so that check-buildroot won't be
run after build so that tetex build passes. I found no clean way how to force
mktexfmt to not to create buildroot links in the binary fmts so that disabling
check-buildroot seems to be the least painful solution. The links in the fmt
files doesn't seem to be used anyway so that all should work fine.

Comment 6 Fedora Update System 2008-01-24 22:01:53 UTC
tetex-3.0-40.5.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update tetex'

Comment 7 Fedora Update System 2008-02-16 02:06:49 UTC
tetex-3.0-40.5.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

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