Bug 235032 - yum update of tetex package messes up file contexts
yum update of tetex package messes up file contexts
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: tetex (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jindrich Novy
David Lawrence
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-03 10:29 EDT by Steve Grubb
Modified: 2013-07-02 19:20 EDT (History)
2 users (show)

See Also:
Fixed In Version: 3.0-40.1.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-12-09 08:51:01 EST
Type: ---
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 Steve Grubb 2007-04-03 10:29:41 EDT
Description of problem:
After doing yum update of the tetex set of packages, several of the file
contexts are wrong:

/sbin/restorecon reset /usr/share/texmf-var/web2c/aleph.fmt context
root:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/amstex.fmt context
root:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/bamstex.fmt context
root:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/bplain.fmt context
root:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/cont-en.fmt context
root:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/etex.fmt context
root:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/lambda.fmt context
root:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/lamed.fmt context
root:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/metafun.mem context
root:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/mf.base context
root:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/mpost.mem context
root:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/mptopdf.fmt context
root:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/omega.fmt context
root:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/pdfetex.fmt context
root:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/pdftex.fmt context
root:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/tex.fmt context
root:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/latex.fmt context
root:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/pdflatex.fmt context
root:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0

Version-Release number of selected component (if applicable):
tetex-3.0-37.fc7.x86_64

Additional info:
Whatever the fix is, this should be done for RHEL5, too.
Comment 1 Jindrich Novy 2007-06-05 08:16:39 EDT
Dan, any clues?
Comment 2 Steve Grubb 2007-06-05 08:43:04 EDT
If you look at the line:
%post
[ -x %{_bindir}/texhash ] && /usr/bin/env - %{_bindir}/texhash 2> /dev/null

and run that command:

[sgrubb ~]$ env - /usr/bin/texhash
lstat(./kpsewhich) failed ...
./kpsewhich: No such file or directory
texhash: /.texmf-var: directory not writable. Skipping...

You see  ^^^ it would have wrote there as root. I suspect the script texhash
needs to be patched to do a restorecon or a mv/install changed to a cp.
Comment 3 Daniel Walsh 2007-06-05 09:10:37 EDT
jidrich, you are creating all of the files in a post install script in /tmp. 
Which causes them to be labeled rpm_script_tmp_t.  Then you move them to
/usr/share/texmf-var/web2c/
and the mv command maintains their file context.  If you used cp instead the
files would adopt the file context of the destingation directory which would fix
the problem.  And I guess you would then need to rm the files in tmp.
Comment 4 Jindrich Novy 2007-06-05 10:12:22 EDT
Fixed, thanks for the quick reply!
Comment 5 Fedora Update System 2007-08-10 18:24:04 EDT
tetex-3.0-40.1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 6 Steve Grubb 2007-08-10 20:17:04 EDT
The problem still seems to be there:

/sbin/restorecon reset /usr/share/texmf-var/web2c/aleph.fmt context
user_u:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/amstex.fmt context
user_u:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/bamstex.fmt context
user_u:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/bplain.fmt context
user_u:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/cont-en.fmt context
user_u:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/etex.fmt context
user_u:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/lambda.fmt context
user_u:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/lamed.fmt context
user_u:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/metafun.mem context
user_u:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/mf.base context
user_u:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/mpost.mem context
user_u:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/mptopdf.fmt context
user_u:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/omega.fmt context
user_u:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/pdfetex.fmt context
user_u:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/pdftex.fmt context
user_u:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/tex.fmt context
user_u:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/latex.fmt context
user_u:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
/sbin/restorecon reset /usr/share/texmf-var/web2c/pdflatex.fmt context
user_u:object_r:rpm_script_tmp_t:s0->system_u:object_r:usr_t:s0
Comment 7 Jindrich Novy 2007-12-09 08:51:01 EST
teTeX is now obsoleted by TeXLive in rawhide and removed. If you are sure the
problem still applies also for TeXLive, please file a bug against following
rawhide components:

texlive       - if you found bug in binary TeXLive utilities
texlive-texmf - if find anything related to fonts/styles, noarch part
texlive-texmf-errata - if you need to update font/style set.

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