Bug 612313

Summary: Bash source RPM not installable by unprivileged user
Product: [Fedora] Fedora Reporter: Rick Stevens <rps2>
Component: bashAssignee: Roman Rakus <rrakus>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: rrakus, tsmetana
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: 2010-07-26 17:28:23 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 Rick Stevens 2010-07-07 20:26:38 UTC
Description of problem:
Bash source RPM can not be installed by normal user

Version-Release number of selected component (if applicable):
bash-4.1.7-1.fc13

How reproducible:
Always

Steps to Reproduce:
1. Download bash-4.1.7-1.fc13.src.rpm as regular user
2. As regular user, try to install via "rpm -ivh bash-4.1.7-1.fc13.src.rpm"
3. rpm reports a permission denied error on "~/rpmbuild/SOURCES/bash-2.02-security.patch;4c34da9c
  
Actual results:
Failure on installation

Expected results:
Source RPM installed in user's "~/rpmbuild" directory.

Additional info:
The source RPM _may_ be installed as root, just not as a normal, unprivileged user.

Transcript of failed attempt as normal user:

[rick@bigdog Download]$ rpm -ivh bash-4.1.7-1.fc13.src.rpm
   1:bash                   warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
########################################### [100%]
error: unpacking of archive failed on file /home/rick/rpmbuild/SOURCES/bash-2.02-security.patch;4c34da9c: cpio: open failed - Permission denied
error: bash-4.1.7-1.fc13.src.rpm cannot be installed

Comment 1 Roman Rakus 2010-07-22 13:20:26 UTC
Sorry, I can't reproduce it. What version of rpm are you using? I have following:
[rrakus@dhcp-lab-170 tmp]$ rpm -q rpm
rpm-4.8.1-2.fc13.x86_64

Comment 2 Rick Stevens 2010-07-22 16:39:09 UTC
RPM itself returns:
    [rick@bigdog Download]$ rpm --version
    RPM version 4.8.1

The package details:
    [rick@bigdog Download]$ rpm -q rpm
    rpm-4.8.1-2.fc13.x86_64

Just tried it again:
    [rick@bigdog Download]$ rpm -ivh bash-4.1.7-1.fc13.src.rpm
       1:bash                   warning: user mockbuild does not exist - using root
    warning: group mockbuild does not exist - using root
    ########################################### [100%]
    error: unpacking of archive failed on file /home/rick/rpmbuild/SOURCES/bash-2.02-security.patch;4c4872ab: cpio: open failed - Permission denied
    error: bash-4.1.7-1.fc13.src.rpm cannot be installed

Comment 3 Rick Stevens 2010-07-22 16:40:22 UTC
Oh, perhaps you have a user "mockbuild".  I do not.

Comment 4 Roman Rakus 2010-07-23 11:59:35 UTC
No, I don't have user mockbuild. I will bet that you have corrupted file `bash-4.1.7-1.fc13.src.rpm'.
Here is my output:

[rrakus@dhcp-lab-170 tmp]$ yumdownloader --source bash
Loaded plugins: refresh-packagekit
distro1                                                  | 3.7 kB     00:00     
rpmfusion-free-updates                                   | 2.8 kB     00:00     
rpmfusion-free-updates/primary_db                        | 205 kB     00:00     
rpmfusion-nonfree-updates                                | 2.8 kB     00:00     
updates/metalink                                         |  11 kB     00:00     
updates                                                  | 4.5 kB     00:00     
updates/primary_db                                       | 3.5 MB     00:00     
Enabling updates-source repository
updates-source/metalink                                  | 9.9 kB     00:00     
updates-source                                           | 2.6 kB     00:00     
http://download.englab.brq.redhat.com/pub/fedora/linux/updates/13/SRPMS/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for updates-source
Trying other mirror.
updates-source                                           | 3.3 kB     00:00     
updates-source/primary_db                                | 565 kB     00:01     
Enabling rpmfusion-nonfree-updates-source repository
rpmfusion-nonfree-updates-source                         | 2.3 kB     00:00     
Enabling rpmfusion-nonfree-source repository
Enabling rpmfusion-free-updates-source repository
rpmfusion-free-updates-source                            | 2.3 kB     00:00     
rpmfusion-free-updates-source/primary_db                 |  38 kB     00:00     
Enabling fedora-source repository
Enabling rpmfusion-free-source repository
bash-4.1.7-1.fc13.src.rpm                                | 6.4 MB     00:19     
[rrakus@dhcp-lab-170 tmp]$ rpm -ivh bash-4.1.7-1.fc13.src.rpm 
   1:bash                   warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
########################################### [100%]
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
[rrakus@dhcp-lab-170 tmp]$ 

So everything is fine.

Comment 5 Rick Stevens 2010-07-26 16:28:20 UTC
Yes, I can now confirm it was a problem with my system.  After digging around,
I found my unprivileged user's ~/rpmbuild/SOURCES directory was owned by root, not by the user.

I am sorry for disturbing you with this.  I can't imagine why I didn't look for such an obvious screwup earlier.  Guess I had too much going on.  I will double check for such things in the future.

Thanks for the prompt responses.  You can close this bug as "NOTABUG--COCKPIT-ERROR-BY-USER"