Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 163581

Summary: rpm -qp --list -verbose joins owner and group when owner has 8 or more chars
Product: Red Hat Enterprise Linux 4 Reporter: Tomas Honzak <tomas.t.honzak>
Component: rpmAssignee: Paul Nasrat <pnasrat>
Status: CLOSED UPSTREAM QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: n3npq
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-26 01:30:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Description Flags
Patch File: query.c Status: Locally Modified Working revision: 2.173 Repository revision: 2.173 /cvs/devel/rpm/lib/query.c,v none

Description Tomas Honzak 2005-07-19 07:05:12 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

Description of problem:
When file owner has 8 or more chars, rpm -qp -l -v writes owner and group together. 

Version-Release number of selected component (if applicable):
rpm-4.2.1-4.4, CVS HEAD

How reproducible:

Steps to Reproduce:
1. take any package that has file owner's name with 8 or more chars
2. rpm -qp -l -v package.rpm
I have checked different releases of rpm v4 on different platforms and also the current version in CVS and the problem persists. A patch that solves the issue (done against latest revision in CVS) is below.

Actual Results:  drwxrwxr-x    2 gbgadmingbg                 0 Feb 25 17:50 /opt/gbg-1/bin
-r-xr-xr-x    1 gbgadmingbg             26728 Feb 25 17:50 /opt/gbg-1/bin/encode_keychange
-r-xr-xr-x    1 gbgadmingbg             15478 Feb 25 17:50 /opt/gbg-1/bin/fixproc

Expected Results:  drwxrwxr-x    2 gbgadmin gbg                 0 Feb 25 17:50 /opt/gbg-1/bin
-r-xr-xr-x    1 gbgadmin gbg             26728 Feb 25 17:50 /opt/gbg-1/bin/encode_keychange
-r-xr-xr-x    1 gbgadmin gbg             15478 Feb 25 17:50 /opt/gbg-1/bin/fixproc

Additional info:

Patch follows:

diff -Naur rpm.orig/lib/query.c rpm/lib/query.c
--- rpm.orig/lib/query.c        2005-07-18 15:47:53.000000000 +0200
+++ rpm/lib/query.c     2005-07-18 16:10:03.000000000 +0200
@@ -103,7 +103,7 @@
        (void)strftime(timefield, sizeof(timefield) - 1, fmt, tm);
-    sprintf(te, "%s %4d %-8s%-8s %10s %s %s", perms,
+    sprintf(te, "%s %4d %-8s %-8s %10s %s %s", perms,
        (int)nlink, ownerfield, groupfield, sizefield, timefield, namefield);
     perms = _free(perms);

Comment 1 Tomas Honzak 2005-07-20 11:56:57 UTC
Created attachment 116972 [details]
File: query.c           Status: Locally Modified

   Working revision:    2.173
   Repository revision: 2.173   /cvs/devel/rpm/lib/query.c,v

Comment 2 Paul Nasrat 2005-07-20 12:04:12 UTC
Jeff - seems obvious to me, shall I commit on HEAD / 4.4.x?

Comment 3 Jeff Johnson 2005-10-26 01:30:02 UTC
Fixed in rpm-4.4.3-0.24 when built.