Bug 461781 - repopatch will fail if /tmp/kusu does not exist
Summary: repopatch will fail if /tmp/kusu does not exist
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat HPC Solution
Classification: Red Hat
Component: kusu-repoman
Version: 5.1
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: OCS Support
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-10 15:21 UTC by Daniel Riek
Modified: 2008-09-29 19:12 UTC (History)
2 users (show)

Fixed In Version: ocs-5.1-5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-09-29 19:12:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Daniel Riek 2008-09-10 15:21:55 UTC
Description of problem:

repopatch will fail to upgrade the repositories if the directory /tmp/kusu does nto exist. The program should check for the existence and recreate if the dir was e.g. deleted during a cleanup script.

Details:
[root@installer ~]# repopatch -r rhel5_x86_64
Getting updates for rhel-5-x86_64. This may take a while...
New kernel(s) found:
        kernel-2.6.18-92.1.10.el5.x86_64.rpm
        kernel-debug-2.6.18-92.1.10.el5.x86_64.rpm
        kernel-debug-devel-2.6.18-92.1.10.el5.x86_64.rpm
        kernel-devel-2.6.18-92.1.10.el5.x86_64.rpm
        kernel-doc-2.6.18-92.1.10.el5.noarch.rpm
        kernel-headers-2.6.18-92.1.10.el5.x86_64.rpm
        kernel-xen-2.6.18-92.1.10.el5.x86_64.rpm
        kernel-xen-devel-2.6.18-92.1.10.el5.x86_64.rpm
Do you wish to include them? (Yes or No): yes
Making new update kit.
Unable to add update kit. Reason: [Errno 2] No such file or directory: '/tmp/kusu/repopatch_buildkit2L1Lad'
[root@installer ~]#

Comment 1 Nils Philippsen 2008-09-11 09:51:40 UTC
The mere existence/use of a hard-coded path in /tmp sounds very ominous to me from a security standpoint. Has this already been reviewed? NB: I don't know how many packages are affected by this (if this is a problem).

Comment 2 Daniel Riek 2008-09-11 17:04:38 UTC
If I understand right, the 3rd level directory (in this case repopatch_buildkit2L1Lad) is created with a unique name for each run. It is just the higher level directory that needs to exist. For /tmp that can not be assumed as cleanup-scripts often delete such directories.

Comment 3 Nils Philippsen 2008-09-12 08:02:21 UTC
I don't know if the second level directory being random makes much difference. The first could be a symlink to somewhere else and that needs reviewing IMO.

Comment 4 Daniel Riek 2008-09-12 18:44:44 UTC
Good point. Perhaps it would be easy to just remove the second level directory: it does not add any real value, does it?

Comment 5 OCS Support 2008-09-18 15:52:36 UTC
The solution has two parts:
1. Update the kusu-core package.  It needs to be 5.1-9.  Prior to that it was using /tmp/kusu for the KUSU_TMP.  Updating this package has been verified to work.

2. The second part of the solution will be in kusu-repoman 5.1-7  and this changes the value used when KUSU_TMP is undefined.  A new srpm will be provided shortly.

Comment 6 OCS Support 2008-09-29 13:33:29 UTC
Fix passes QA


Note You need to log in before you can comment on or make changes to this bug.