Bug 1043865 - packagedb-cli doesnt read fas user names from a users .fedora.cert like it should
Summary: packagedb-cli doesnt read fas user names from a users .fedora.cert like it sh...
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: packagedb-cli
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Pierre-YvesChibon
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-17 11:38 UTC by Marcela Mašláňová
Modified: 2014-08-25 10:00 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-25 10:00:23 UTC
Type: Bug


Attachments (Terms of Use)

Description Marcela Mašláňová 2013-12-17 11:38:58 UTC
Description of problem:
[marca@localhost cpan-upload]$ fedpkg retire 'cpan-upload seems to be dead. Same functionality is provided by perl-CPAN-Uploader.'
rm '.gitignore'
rm 'cpan-upload.spec'
rm 'sources'
[master 65b0ca5] cpan-upload seems to be dead. Same functionality is provided by perl-CPAN-Uploader.
 4 files changed, 1 insertion(+), 125 deletions(-)
 delete mode 100644 .gitignore
 delete mode 100644 cpan-upload.spec
 create mode 100644 dead.package
 delete mode 100644 sources
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 395 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: Emitting a message to the fedmsg bus.
To ssh://mmaslano.org/cpan-upload
   3a760d7..65b0ca5  master -> master
FAS password: 
Error: Unable to log into server.  Invalid authentication tokens.  Send new username and password
ERROR:root:Generic error catched:
Traceback (most recent call last):
  File "/usr/bin/pkgdb-cli", line 1252, in <module>
    main()
  File "/usr/bin/pkgdb-cli", line 1247, in main
    arg.func(arg)
  File "/usr/bin/pkgdb-cli", line 1191, in do_orphan
    args.username, args.password)
  File "/usr/bin/pkgdb-cli", line 866, in orphan_package
    username=username, password=password)
  File "/usr/bin/pkgdb-cli", line 321, in _update_owner_one_package
    'collectn_list': branch})
  File "/usr/lib/python2.7/site-packages/fedora/client/baseclient.py", line 344, in send_request
    auth_params=auth_params, retries=retries)
  File "/usr/lib/python2.7/site-packages/fedora/client/proxyclient.py", line 362, in send_request
    raise AuthError(b_('Unable to log into server.  Invalid'
AuthError: Unable to log into server.  Invalid authentication tokens.  Send new username and password
Could not retire package: Command '['pkgdb-cli', 'orphan', '--retire', 'cpan-upload', 'devel']' returned non-zero exit status 5
[marca@localhost cpan-upload]$ fedpkg retire 'cpan-upload seems to be dead. Same functionality is provided by perl-CPAN-Uploader.'
dead.package found, package probably already retired - will not remove files from git or overwrite existing dead.package file

Version-Release number of selected component (if applicable):
fedpkg-1.14-1.fc19.noarch

How reproducible:
I guess fedpkg didn't like I don't have same username in FAS and on my laptop. I did manually git push, which seems to fix it.

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Sam Kottler 2014-02-08 15:02:48 UTC
Did you have a $HOME/.fedora.cert in place? If so, what's the output of this:

python -c "import fedpkg; print fedpkg.fedora_cert.read_user_cert()"

Comment 2 Marcela Mašláňová 2014-02-10 12:25:25 UTC
Sure, I have. Output is:
mmaslano

fedpkg behaves strangely. All commands work only sometimes with my FAS, usually after second try.

Comment 3 Dennis Gilmore 2014-02-13 16:17:47 UTC
this will be a bug in packagedb-cli. it shouldn't use local user but should be reading it from a users fedora certificate

Comment 4 Pierre-YvesChibon 2014-02-13 16:33:38 UTC
It actually does:

line #94
if username is None:
  try:
    username = fedora_cert.read_user_cert()
  except:
    log.debug('Could not read Fedora cert, using login name')
    username = raw_input('FAS username: ')

Could it be that fedpkg is passing a --user argument?

Comment 5 Dennis Gilmore 2014-02-13 16:41:27 UTC
 cmd = ['pkgdb-cli',
                   'orphan',
                   '--retire',
                   module_name,
                   branch]

no --user argument is used.

Comment 6 Pierre-YvesChibon 2014-06-10 06:51:16 UTC
Has this been reproducible with the new version of pkgdb-cli? (versions 2.x that were released to work with pkgdb2)

Comment 7 Pierre-YvesChibon 2014-08-25 10:00:23 UTC
I'm going to close this now. I have no news if the problem still occurred with the version 2+ and it is an odd bug since it should be checking the fedora certificate for the FAS username from the beginning.


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