Bug 481250

Summary: tps-rpmtest failed on rhel4 hosts
Product: [Retired] Red Hat Hardware Certification Program Reporter: Yan Tian <tyan>
Component: Test Suite (harness)Assignee: Greg Nichols <gnichols>
Status: CLOSED WONTFIX QA Contact: Lawrence Lim <llim>
Severity: medium Docs Contact:
Priority: low    
Version: 5.3CC: lockhart, rlandry, tools-bugs
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: 2009-06-12 03:05:53 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 Yan Tian 2009-01-23 03:13:50 UTC
Description of problem:
hts-5.3-14 tps-rpmtest failed on rhel4 hosts, the log as below:

=== VerifyTest =====================
result: verify test: FAIL:
hts.noarch: /var/hts/images ........C  [tps:B]
hts.noarch: /var/hts/images/logo_rh_home.png ........C  [tps:B]
hts.noarch: /var/hts/index.html ........C  [tps:B]
hts.noarch: /var/hts/images/favicon.ico ........C  [tps:B]
hts.noarch: /var/hts/css/results.css ........C  [tps:B]
hts.noarch: /var/hts/css/hts.css ........C  [tps:B]
hts.noarch: /var/hts/cgi/htsweb.py ........C  [tps:B]
hts.noarch: /var/hts/docs ........C  [tps:B]
hts.noarch: /var/hts/cgi ........C  [tps:B]
hts.noarch: /var/hts/docs/index.html ........C  [tps:B]
hts.noarch: /var/hts/css ........C  [tps:B]
hts.noarch: /var/hts ........C  [tps:B]

TPS verify test analysis tags:
  tps:a -- verify errors on both arches
  tps:b -- verify error on file not present in alternative arch
  tps:c -- verify error on preferred binary/ELF file
  tps:d -- significant type of verify error


TPSRESULT: VerifyTest Returning: FAIL

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

How reproducible:
always

Steps to Reproduce:
1. .qa.[root@ppcp-4as-v1 tps]# tps-rpmtest
2. .qa.[root@ppcp-4as-v1 tps]# rpm -q hts
hts-5.2-20.el4.noarch
3. .qa.[root@ppcp-4as-v1 tps]# rpm -V hts
4. .qa.[root@ppcp-4as-v1 tps]# tps-upgrade 
Upgrading 2009:0047 using command:
 rpm  -Uvh  $(cat new-files-4AS-ppc.list)
 
Preparing...                ########################################### [100%]
   1:hts                    ########################################### [100%]
5. .qa.[root@ppcp-4as-v1 tps]# rpm -q hts
hts-5.3-14.el4.noarch
6. .qa.[root@ppcp-4as-v1 tps]# rpm -V hts
........C   /var/hts
........C   /var/hts/cgi
........C   /var/hts/cgi/htsweb.py
........C   /var/hts/css
........C   /var/hts/css/hts.css
........C   /var/hts/css/results.css
........C   /var/hts/docs
........C   /var/hts/docs/index.html
........C   /var/hts/images
........C   /var/hts/images/favicon.ico
........C   /var/hts/images/logo_rh_home.png
........C   /var/hts/index.html
  
Actual results:
tps-rpmtest failed on rhel4 hosts

Expected results:
tps-rpmtest passed on rhel4 hosts

Additional info:

Comment 1 Yan Tian 2009-01-23 03:19:07 UTC
.qa.[root@ppcp-4as-v1 tps]# ls -laZ /var/hts/css/hts.css 
-rw-r--r--  root     root     system_u:object_r:httpd_sys_content_t
/var/hts/css/hts.css

.qa.[root@ppcp-4as-v1 tps]# restorecon /var/hts/css/hts.css

.qa.[root@ppcp-4as-v1 tps]# ls -laZ /var/hts/css/hts.css 
-rw-r--r--  root     root     system_u:object_r:var_t         
/var/hts/css/hts.css

.qa.[root@ppcp-4as-v1 tps]# rpm -V hts
........C   /var/hts
........C   /var/hts/cgi
........C   /var/hts/cgi/htsweb.py
........C   /var/hts/css
........C   /var/hts/css/results.css
........C   /var/hts/docs
........C   /var/hts/docs/index.html
........C   /var/hts/images
........C   /var/hts/images/favicon.ico
........C   /var/hts/images/logo_rh_home.png
........C   /var/hts/index.html

Comment 2 Yan Tian 2009-03-21 07:58:22 UTC
Reproduced this bug with hts-5.3-16.el4.

Comment 3 John W. Lockhart 2009-03-25 05:46:02 UTC
How is this a bug in TPS?

rpm --verify fails.  TPS reports this.

What did 'rpm -V' say before and after the restorecon operation?

The above report says to me that the old package had no verify errors, but upgrading to the new package causes verify errors.  This is a common bug in packages which TPS is designed to catch.

It is unclear to me in Comment 1 which of the two contexts is the correct one (if either one _is_ correct).

With the old packages installed:
  rpm -V hts
  # If the above reports no errors:
  ls -lZd /var/hts /var/hts/css/results.css
  tps-upgrade
  rpm -V hts
  ls -lZd /var/hts /var/hts/css/results.css
  restorecon /var/hts /var/hts/css/results.css
  # ^ with any additional options required
  ls -lZd /var/hts /var/hts/css/results.css
  # and finally, if the above reports different
  # info from before the restorecon command:
  rpm -V hts

Note that the above has nothing* to do with TPS.  (*tps-upgrade
just calls rpm, and tells you how it's calling rpm.)

Any bugs observed are therefore in the package, in rpm, or
in selinux.

Comment 4 John W. Lockhart 2009-03-25 05:49:09 UTC
Eeek, apologies!  My mail sorted this bug into my TPS Bugs folder, and I didn't read the Component above before replying, believing it to be filed against TPS.

The above debugging procedure should still be helpful, but please imagine a GREAT BIG "SORRY!" wrapped around it for my silly error.

Comment 5 Greg Nichols 2009-06-12 03:05:53 UTC
See 505477 -  New v7 RPM should depricate hts rpm