Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora Build System (http://www.linux-archive.org/fedora-build-system/)
-   -   Problems using import --link (http://www.linux-archive.org/fedora-build-system/130425-problems-using-import-link.html)

Naveen Gavini 07-23-2008 08:33 PM

Problems using import --link
 
Hello all,

We are trying to bootstrap our new koji setup and when we attempt to
import using --link we get the error below.
The packages that we are attempting to import are on the hub and have
been places in /mnt/koji/import (same volume).
The ownership on the packages is daemon (same as /mnt/koji/) - not sure
if this matters.



sudo koji import --link /mnt/koji/alsa-lib-1.0.14-1.rc4.el5.src.rpm

Linking rpm to:
/mnt/koji/work/cli-import/1216842099.8955669.PLyYLFZS/alsa-lib-1.0.14-1.rc4.el5.src.rpm

importing alsa-lib-1.0.14-1.rc4.el5.src.rpm... Fault: <Fault 1:
'Traceback (most recent call last):
File
"/usr/share/koji-hub/kojixmlrpc.py", line 86, in _marshaled_dispatch

response = self._dispatch(method, params)
File
"/usr/share/koji-hub/kojixmlrpc.py", line 156, in _dispatch
ret =
func(*params,**opts)
File "/usr/share/koji-hub/kojihub.py", line 4110,
in importRPM
import_rpm_file(fn,rpminfo['build'],rpminfo)
File
"/usr/share/koji-hub/kojihub.py", line 2991, in import_rpm_file

os.rename(fn,final_path)
OSError: [Errno 13] Permission denied
Locals
by frame, innermost last
Frame HandlerDispatch in
/usr/lib64/python2.4/site-packages/mod_python/importer.py at line 1537

req = <mp_request object at 0x2b3497cbd410>
parent = None
config =
{'PythonAutoReload': '0', 'PythonDebug': '1'}
self =
<mod_python.apache.CallBack instance at 0x2b3497cb3710>
cache = <ERROR
WHILE PRINTING VALUE>
default_handler = handler
phase =
PythonHandler
handler = kojixmlrpc
hlist =
{'handler':'kojixmlrpc','directory':'/usr/share/koji-hub/','silent':0}

aborted = False
directory = /usr/share/koji-hub/
root =
/usr/share/koji-hub/
options = {'KojiTraceback': 'extended',
'KojiDebug': 'On', 'EmailDomain': '192.168.226.61',
'KojiWebURL': 'http://192.168.226.61/koji
<http://192.168.226.61/koji%5C>', 'LoginCreatesUser': 'Off',
'ProxyDNs': '/C=US/ST=New Jersey/O=Open System
Solutions/CN=192.168.226.61', 'DNUsernameComponent': 'CN',
'KojiDir': '/mnt/koji', 'DBHost': 'localhost', 'DBUser':
'koji', 'DBName': 'koji'}
result = 500
Frame _process_target in
/usr/lib64/python2.4/site-packages/mod_python/importer.py at line 1229

req = <mp_request object at 0x2b3497cbd410>
silent = 0
default =
handler
handler = kojixmlrpc
object = <function handler at
0x2b34997152a8>
module = <module
'_mp_df1c13776110deb1e020020636703560' from
'/usr/share/koji-hub/kojixmlrpc.py'>
directory =
/usr/share/koji-hub/
parts = ['kojixmlrpc']
result = -1

object_str = handler
expected = [-1, 0]
module_name = kojixmlrpc

path = ['/usr/share/koji-hub/']
config = {'PythonAutoReload':
'0', 'PythonDebug': '1'}
arg = <mp_request object at
0x2b3497cbd410>
Frame _execute_target in
/usr/lib64/python2.4/site-packages/mod_python/importer.py at line 1128

one_process = False
object = <function handler at 0x2b34997152a8>

req = <mp_request object at 0x2b3497cbd410>
pdb_debug = 0
arg =
<mp_request object at 0x2b3497cbd410>
config = {'PythonAutoReload':
'0', 'PythonDebug': '1'}
Frame handler in
/usr/share/koji-hub/kojixmlrpc.py at line 291
functions =
<_mp_4e76479ee7b716cdbf29397025ee2356.RootExport s object at
0x2b349c6f08d0>
profiling = False
h =
<_mp_df1c13776110deb1e020020636703560.ModXMLRPCReq uestHandler object at
0x2b349c6f0d10>
req = <mp_request object at 0x2b3497cbd410>

hostFunctions = <_mp_4e76479ee7b716cdbf29397025ee2356.HostExport s object
at 0x2b349c6f0d90>
opts = {'KojiTraceback': 'extended',
'KojiDebug': 'On', 'EmailDomain': '192.168.226.61',
'KojiWebURL': 'http://192.168.226.61/koji
<http://192.168.226.61/koji%5C>', 'LoginCreatesUser': 'Off',
'ProxyDNs': '/C=US/ST=New Jersey/O=Open System
Solutions/CN=192.168.226.61', 'DNUsernameComponent': 'CN',
'KojiDir': '/mnt/koji', 'DBHost': 'localhost', 'DBUser':
'koji', 'DBName': 'koji'}
Frame handle_request in
/usr/share/koji-hub/kojixmlrpc.py at line 242
self =
<_mp_df1c13776110deb1e020020636703560.ModXMLRPCReq uestHandler object at
0x2b349c6f0d10>
req = <mp_request object at 0x2b3497cbd410>
Frame
_marshaled_dispatch in /usr/share/koji-hub/kojixmlrpc.py at line 112
e
= [Errno 13] Permission denied
self =
<_mp_df1c13776110deb1e020020636703560.ModXMLRPCReq uestHandler object at
0x2b349c6f0d10>
e_class = exceptions.OSError
start = 1216842100.35

faultCode = 1
params = <ERROR WHILE PRINTING VALUE>
tb_str =
Traceback (most recent call last):
File
"/usr/share/koji-hub/kojixmlrpc.py", line 86, in _marshaled_dispatch

response = self._dispatch(method, params)
File
"/usr/share/koji-hub/kojixmlrpc.py", line 156, in _dispatch
ret =
func(*params,**opts)
File "/usr/share/koji-hub/kojihub.py", line 4110,
in importRPM
import_rpm_file(fn,rpminfo['build'],rpminfo)
File
"/usr/share/koji-hub/kojihub.py", line 2991, in import_rpm_file

os.rename(fn,final_path)
OSError: [Errno 13] Permission denied


tb_type = extended
data = <?xml
version='1.0'?>
<methodCall>
<methodName>importRPM</methodName>
<params>
<param>
<value><string>cli-import/1216842099.8955669.PLyYLFZS</string></value>
</param>
<param>
<value><string>alsa-lib-1.0.14-1.rc4.el5.src.rpm</string></value>
</param>
</params>
</methodCall>


method = importRPM
Frame _dispatch in /usr/share/koji-hub/kojixmlrpc.py
at line 156
self =
<_mp_df1c13776110deb1e020020636703560.ModXMLRPCReq uestHandler object at
0x2b349c6f0d10>
start = 1216842100.38
params = <ERROR WHILE PRINTING
VALUE>
func = <bound method RootExports.importRPM of
<_mp_4e76479ee7b716cdbf29397025ee2356.RootExport s object at
0x2b349c6f08d0>>
method = importRPM
opts = {}
Frame importRPM in
/usr/share/koji-hub/kojihub.py at line 4110
uploadpath =
/mnt/koji/work
basename = alsa-lib-1.0.14-1.rc4.el5.src.rpm
rpminfo
= {'build_id': 20L, 'brootid': None, 'sourcepackage': 1, 'name':
'alsa-lib', 'buildtime': 1194704966, 'id': 28L, 'epoch': None,
'version': '1.0.14', 'build': {'sourcepackage': 1, 'name':
'alsa-lib', 'buildtime': 1194704966, 'epoch': None, 'version':
'1.0.14', 'release': '1.rc4.el5', 'sourcerpm': [], 'arch':
'src', 'id': 20L}, 'release': '1.rc4.el5', 'sourcerpm': [],
'arch': 'src', 'payloadhash':
'8fa4adb63144d52fc1ceb29f6022b7cb', 'size': 796510}
path =
cli-import/1216842099.8955669.PLyYLFZS
self =
<_mp_4e76479ee7b716cdbf29397025ee2356.RootExport s object at
0x2b349c6f08d0>
fn =
/mnt/koji/work/cli-import/1216842099.8955669.PLyYLFZS/alsa-lib-1.0.14-1.rc4.el5.src.rpm
Frame
import_rpm_file in /usr/share/koji-hub/kojihub.py at line 2991

final_path =
/mnt/koji/packages/alsa-lib/1.0.14/1.rc4.el5/src/alsa-lib-1.0.14-1.rc4.el5.src.rpm

rpminfo = {'build_id': 20L, 'brootid': None, 'sourcepackage': 1,
'name': 'alsa-lib', 'buildtime': 1194704966, 'id': 28L,
'epoch': None, 'version': '1.0.14', 'build': {'sourcepackage':
1, 'name': 'alsa-lib', 'buildtime': 1194704966, 'epoch': None,
'version': '1.0.14', 'release': '1.rc4.el5', 'sourcerpm': [],
'arch': 'src', 'id': 20L}, 'release': '1.rc4.el5',
'sourcerpm': [], 'arch': 'src', 'payloadhash':
'8fa4adb63144d52fc1ceb29f6022b7cb', 'size': 796510}
buildinfo =
{'sourcepackage': 1, 'name': 'alsa-lib', 'buildtime':
1194704966, 'epoch': None, 'version': '1.0.14', 'release':
'1.rc4.el5', 'sourcerpm': [], 'arch': 'src', 'id': 20L}
fn =
/mnt/koji/work/cli-import/1216842099.8955669.PLyYLFZS/alsa-lib-1.0.14-1.rc4.el5.src.rpm
'>




Any ideas?

Thanks.

--
Naveen Gavini
Student Systems Programmer
OSS/CSS - OIT Rutgers
ngavini@jla.rutgers.edu

--
Fedora-buildsys-list mailing list
Fedora-buildsys-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-buildsys-list

Mike Bonnet 07-23-2008 08:46 PM

Problems using import --link
 
On Wed, 2008-07-23 at 16:33 -0400, Naveen Gavini wrote:
> Hello all,
>
> We are trying to bootstrap our new koji setup and when we attempt to
> import using --link we get the error below.
> The packages that we are attempting to import are on the hub and have
> been places in /mnt/koji/import (same volume).
> The ownership on the packages is daemon (same as /mnt/koji/) - not sure
> if this matters.
>
>
> sudo koji import --link /mnt/koji/alsa-lib-1.0.14-1.rc4.el5.src.rpm
>
> Linking rpm to:
> /mnt/koji/work/cli-import/1216842099.8955669.PLyYLFZS/alsa-lib-1.0.14-1.rc4.el5.src.rpm
>
> importing alsa-lib-1.0.14-1.rc4.el5.src.rpm... Fault: <Fault 1:
> 'Traceback (most recent call last):
File
> "/usr/share/koji-hub/kojixmlrpc.py", line 86, in _marshaled_dispatch

> response = self._dispatch(method, params)
File
> "/usr/share/koji-hub/kojixmlrpc.py", line 156, in _dispatch
ret =
> func(*params,**opts)
File "/usr/share/koji-hub/kojihub.py", line 4110,
> in importRPM
import_rpm_file(fn,rpminfo['build'],rpminfo)
File
> "/usr/share/koji-hub/kojihub.py", line 2991, in import_rpm_file

> os.rename(fn,final_path)
OSError: [Errno 13] Permission denied
Locals
> by frame, innermost last
Frame HandlerDispatch in
> /usr/lib64/python2.4/site-packages/mod_python/importer.py at line 1537

> req = <mp_request object at 0x2b3497cbd410>
parent = None
config =
> {'PythonAutoReload': '0', 'PythonDebug': '1'}
self =
> <mod_python.apache.CallBack instance at 0x2b3497cb3710>
cache = <ERROR
> WHILE PRINTING VALUE>
default_handler = handler
phase =
> PythonHandler
handler = kojixmlrpc
hlist =
> {'handler':'kojixmlrpc','directory':'/usr/share/koji-hub/','silent':0}

> aborted = False
directory = /usr/share/koji-hub/
root =
> /usr/share/koji-hub/
options = {'KojiTraceback': 'extended',
> 'KojiDebug': 'On', 'EmailDomain': '192.168.226.61',
> 'KojiWebURL': 'http://192.168.226.61/koji
> <http://192.168.226.61/koji%5C>', 'LoginCreatesUser': 'Off',
> 'ProxyDNs': '/C=US/ST=New Jersey/O=Open System
> Solutions/CN=192.168.226.61', 'DNUsernameComponent': 'CN',
> 'KojiDir': '/mnt/koji', 'DBHost': 'localhost', 'DBUser':
> 'koji', 'DBName': 'koji'}
result = 500
Frame _process_target in
> /usr/lib64/python2.4/site-packages/mod_python/importer.py at line 1229

> req = <mp_request object at 0x2b3497cbd410>
silent = 0
default =
> handler
handler = kojixmlrpc
object = <function handler at
> 0x2b34997152a8>
module = <module
> '_mp_df1c13776110deb1e020020636703560' from
> '/usr/share/koji-hub/kojixmlrpc.py'>
directory =
> /usr/share/koji-hub/
parts = ['kojixmlrpc']
result = -1

> object_str = handler
expected = [-1, 0]
module_name = kojixmlrpc

> path = ['/usr/share/koji-hub/']
config = {'PythonAutoReload':
> '0', 'PythonDebug': '1'}
arg = <mp_request object at
> 0x2b3497cbd410>
Frame _execute_target in
> /usr/lib64/python2.4/site-packages/mod_python/importer.py at line 1128

> one_process = False
object = <function handler at 0x2b34997152a8>

> req = <mp_request object at 0x2b3497cbd410>
pdb_debug = 0
arg =
> <mp_request object at 0x2b3497cbd410>
config = {'PythonAutoReload':
> '0', 'PythonDebug': '1'}
Frame handler in
> /usr/share/koji-hub/kojixmlrpc.py at line 291
functions =
> <_mp_4e76479ee7b716cdbf29397025ee2356.RootExport s object at
> 0x2b349c6f08d0>
profiling = False
h =
> <_mp_df1c13776110deb1e020020636703560.ModXMLRPCReq uestHandler object at
> 0x2b349c6f0d10>
req = <mp_request object at 0x2b3497cbd410>

> hostFunctions = <_mp_4e76479ee7b716cdbf29397025ee2356.HostExport s object
> at 0x2b349c6f0d90>
opts = {'KojiTraceback': 'extended',
> 'KojiDebug': 'On', 'EmailDomain': '192.168.226.61',
> 'KojiWebURL': 'http://192.168.226.61/koji
> <http://192.168.226.61/koji%5C>', 'LoginCreatesUser': 'Off',
> 'ProxyDNs': '/C=US/ST=New Jersey/O=Open System
> Solutions/CN=192.168.226.61', 'DNUsernameComponent': 'CN',
> 'KojiDir': '/mnt/koji', 'DBHost': 'localhost', 'DBUser':
> 'koji', 'DBName': 'koji'}
Frame handle_request in
> /usr/share/koji-hub/kojixmlrpc.py at line 242
self =
> <_mp_df1c13776110deb1e020020636703560.ModXMLRPCReq uestHandler object at
> 0x2b349c6f0d10>
req = <mp_request object at 0x2b3497cbd410>
Frame
> _marshaled_dispatch in /usr/share/koji-hub/kojixmlrpc.py at line 112
e
> = [Errno 13] Permission denied
self =
> <_mp_df1c13776110deb1e020020636703560.ModXMLRPCReq uestHandler object at
> 0x2b349c6f0d10>
e_class = exceptions.OSError
start = 1216842100.35

> faultCode = 1
params = <ERROR WHILE PRINTING VALUE>
tb_str =
> Traceback (most recent call last):
File
> "/usr/share/koji-hub/kojixmlrpc.py", line 86, in _marshaled_dispatch

> response = self._dispatch(method, params)
File
> "/usr/share/koji-hub/kojixmlrpc.py", line 156, in _dispatch
ret =
> func(*params,**opts)
File "/usr/share/koji-hub/kojihub.py", line 4110,
> in importRPM
import_rpm_file(fn,rpminfo['build'],rpminfo)
File
> "/usr/share/koji-hub/kojihub.py", line 2991, in import_rpm_file

> os.rename(fn,final_path)
OSError: [Errno 13] Permission denied


> tb_type = extended
data = <?xml
> version='1.0'?>
<methodCall>
<methodName>importRPM</methodName>
<params>
<param>
<value><string>cli-import/1216842099.8955669.PLyYLFZS</string></value>
</param>
<param>
<value><string>alsa-lib-1.0.14-1.rc4.el5.src.rpm</string></value>
</param>
</params>
</methodCall>


> method = importRPM
Frame _dispatch in /usr/share/koji-hub/kojixmlrpc.py
> at line 156
self =
> <_mp_df1c13776110deb1e020020636703560.ModXMLRPCReq uestHandler object at
> 0x2b349c6f0d10>
start = 1216842100.38
params = <ERROR WHILE PRINTING
> VALUE>
func = <bound method RootExports.importRPM of
> <_mp_4e76479ee7b716cdbf29397025ee2356.RootExport s object at
> 0x2b349c6f08d0>>
method = importRPM
opts = {}
Frame importRPM in
> /usr/share/koji-hub/kojihub.py at line 4110
uploadpath =
> /mnt/koji/work
basename = alsa-lib-1.0.14-1.rc4.el5.src.rpm
rpminfo
> = {'build_id': 20L, 'brootid': None, 'sourcepackage': 1, 'name':
> 'alsa-lib', 'buildtime': 1194704966, 'id': 28L, 'epoch': None,
> 'version': '1.0.14', 'build': {'sourcepackage': 1, 'name':
> 'alsa-lib', 'buildtime': 1194704966, 'epoch': None, 'version':
> '1.0.14', 'release': '1.rc4.el5', 'sourcerpm': [], 'arch':
> 'src', 'id': 20L}, 'release': '1.rc4.el5', 'sourcerpm': [],
> 'arch': 'src', 'payloadhash':
> '8fa4adb63144d52fc1ceb29f6022b7cb', 'size': 796510}
path =
> cli-import/1216842099.8955669.PLyYLFZS
self =
> <_mp_4e76479ee7b716cdbf29397025ee2356.RootExport s object at
> 0x2b349c6f08d0>
fn =
> /mnt/koji/work/cli-import/1216842099.8955669.PLyYLFZS/alsa-lib-1.0.14-1.rc4.el5.src.rpm
Frame
> import_rpm_file in /usr/share/koji-hub/kojihub.py at line 2991

> final_path =
> /mnt/koji/packages/alsa-lib/1.0.14/1.rc4.el5/src/alsa-lib-1.0.14-1.rc4.el5.src.rpm

> rpminfo = {'build_id': 20L, 'brootid': None, 'sourcepackage': 1,
> 'name': 'alsa-lib', 'buildtime': 1194704966, 'id': 28L,
> 'epoch': None, 'version': '1.0.14', 'build': {'sourcepackage':
> 1, 'name': 'alsa-lib', 'buildtime': 1194704966, 'epoch': None,
> 'version': '1.0.14', 'release': '1.rc4.el5', 'sourcerpm': [],
> 'arch': 'src', 'id': 20L}, 'release': '1.rc4.el5',
> 'sourcerpm': [], 'arch': 'src', 'payloadhash':
> '8fa4adb63144d52fc1ceb29f6022b7cb', 'size': 796510}
buildinfo =
> {'sourcepackage': 1, 'name': 'alsa-lib', 'buildtime':
> 1194704966, 'epoch': None, 'version': '1.0.14', 'release':
> '1.rc4.el5', 'sourcerpm': [], 'arch': 'src', 'id': 20L}
fn =
> /mnt/koji/work/cli-import/1216842099.8955669.PLyYLFZS/alsa-lib-1.0.14-1.rc4.el5.src.rpm
'>

Embedded in that horribly mangled stack trace was the root of the
problem:

File "/usr/share/koji-hub/kojihub.py", line 2991, in import_rpm_file
os.rename(fn,final_path)
OSError: [Errno 13] Permission denied

The problem is that "koji import --link", while very useful, is kind of
a hack. In order for it to work, is assumes your httpd is running as
uid 48 (the "apache" user on Fedora) and chown's the directory
under /mnt/koji/work/cli-import to uid 48 so httpd can rename() the file
from that dir to it's final location under /mnt/koji/packages
successfully. In your case, httpd is running under a different uid, so
that rename fails.

To fix this, I would do 2 things:

1. In /usr/bin/koji, change the last 2 numbers in the line

os.chown(os.path.dirname(dst), 48, 48) #XXX - hack

to the uid of the "daemon" user (whatever user httpd runs as).

2. Make sure all packages under /mnt/koji/import are owned by the daemon
user before starting the import.

Give that a try, and let me know if you're still running in to errors.


--
Fedora-buildsys-list mailing list
Fedora-buildsys-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-buildsys-list

Doug Ledford 07-23-2008 08:47 PM

Problems using import --link
 
On Wed, 2008-07-23 at 16:33 -0400, Naveen Gavini wrote:
> Hello all,
>
> We are trying to bootstrap our new koji setup and when we attempt to
> import using --link we get the error below.
> The packages that we are attempting to import are on the hub and have
> been places in /mnt/koji/import (same volume).
> The ownership on the packages is daemon (same as /mnt/koji/) - not sure
> if this matters.
>
>
> sudo koji import --link /mnt/koji/alsa-lib-1.0.14-1.rc4.el5.src.rpm
>
> Linking rpm to:
> /mnt/koji/work/cli-import/1216842099.8955669.PLyYLFZS/alsa-lib-1.0.14-1.rc4.el5.src.rpm
>

> os.rename(fn,final_path)
OSError: [Errno 13] Permission denied

Did you make sure that the entire tree under /mnt/koji is owned by user
apache and group apache (or whatever user/group your web server runs
as)? The xmlrpc code runs as the web user, so it needs permissions on
this tree.

--
Doug Ledford <dledford@redhat.com>
GPG KeyID: CFBFF194
http://people.redhat.com/dledford

Infiniband specific RPMs available at
http://people.redhat.com/dledford/Infiniband

--
Fedora-buildsys-list mailing list
Fedora-buildsys-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-buildsys-list


All times are GMT. The time now is 07:07 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.