Bug 235032 - yum update of tetex package messes up file contexts
Summary: yum update of tetex package messes up file contexts
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: tetex   
(Show other bugs)
Version: rawhide
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords: Reopened
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-04-03 14:29 UTC by Steve Grubb
Modified: 2013-07-02 23:20 UTC (History)
2 users (show)

Fixed In Version: 3.0-40.1.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-12-09 13:51:01 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Steve Grubb 2007-04-03 14:29:41 UTC
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 12:16:39 UTC
Dan, any clues?

Comment 2 Steve Grubb 2007-06-05 12:43:04 UTC
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 13:10:37 UTC
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 14:12:22 UTC
Fixed, thanks for the quick reply!

Comment 5 Fedora Update System 2007-08-10 22:24:04 UTC
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-11 00:17:04 UTC
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 13:51:01 UTC
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.