Bug 835649

Summary: luci uninstall will leave /var/lib/luci/var/pts and /usr/lib*/luci/zope/var/pts behind
Product: Red Hat Enterprise Linux 5 Reporter: Jan Pokorný [poki] <jpokorny>
Component: congaAssignee: Jan Pokorný [poki] <jpokorny>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: low Docs Contact:
Priority: low    
Version: 5.9CC: cluster-maint, djansa, rmccabe, rsteiger
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: luci-0.12.2-57.el5 Doc Type: Bug Fix
Doc Text:
Cause: Unneeded files and directories were left behind at /var/lib/luci/var/pts and /usr/lib{,64}/luci/zope/var/pts when the luci package was uninstalled. Consequence: Files and directories that were not needed remained on the filesystem after the package was installed. Fix: These files and directories are now removed when the luci package is uninstalled. Result: No unneeded files and directories are left behind when the luci package is uninstalled.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-08 05:10:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Pokorný [poki] 2012-06-26 17:34:31 UTC
I've run into this in connection with bug 786372 (c12, c13).

1. install luci
2. start luci
3. remove luci

Now, you can see that paths from summary have been omitted.
Each seems to have the same files (ca. 540, 7 MiB) that
are probably translation strings cached as Python bytecode.

Suggestion:
Run rm -rf -- /var/lib/luci/var/pts /usr/lib*/luci/zope/var/pts
in "%preun -n luci" section.
The files are not present after prepare/build so they cannot be
captured naturally and enumerating them as %ghost does not seem to
be a good idea (unless the whole "pts" dir can be marked like this
with inheritance towards nested files).

Comment 1 RHEL Program Management 2012-06-26 17:48:16 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 3 Jan Pokorný [poki] 2012-07-25 17:09:16 UTC
Test sequence I used to check the fix:

# # machine should be clean, ideally no luci ever installed
# ls -ld  /var/lib/luci/var/pts /usr/lib*/luci/zope/var/pts
ls: /var/lib/luci/var/pts: No such file or directory
ls: /usr/lib*/luci/zope/var/pts: No such file or directory

# # install package
# B='http://download.devel.redhat.com/brewroot/packages/'
# N=conga
# V=0.12.2
# R=57
# D=el5
# A=x86_64
# P=luci
# rpm -Uvh "${B}${N}/${V}/${R}.${D}/${A}/${P:=$N}-${V}-${R}.${D}.${A}.rpm"

# # start luci and see created *.mo files (message catalog cache)
# luci_admin init
# service luci start
# ls -l  /var/lib/luci/var/pts /usr/lib*/luci/zope/var/pts | less
# # ... plenty of files

# # remove luci and look again
# yum remove luci
# ls -l  /var/lib/luci/var/pts /usr/lib*/luci/zope/var/pts
ls: /var/lib/luci/var/pts: No such file or directory
ls: /usr/lib*/luci/zope/var/pts: No such file or directory
# # before, the files would stay as before uninstall process

This can be repeated in such a way that luci is not initialized/started,
hence the *.mo files at specified locations are not created at all.


Note: paths to remove are implemented using RPM macros that (as per
      errata's Rpmdiff) evaluate like this (nb. "lib*" above):
      - 386 ia64 ppc s390
          /var/lib/luci/var/pts
	  /usr/lib/luci/zope/var/pts
      - x86_64 ppc64 s390x:
          /var/lib/luci/var/pts
	  /usr/lib64/luci/zope/var/pts

Comment 8 errata-xmlrpc 2013-01-08 05:10:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0128.html