Bug 573941

Summary: [abrt] crash in fedora-packager-0.4.1-1.fc12: fedora-packager-setup:114:main:NameError: global name 'certificate_expired' is not defined
Product: [Fedora] Fedora Reporter: Stefan Schulze Frielinghaus <fedoraproject>
Component: fedora-packagerAssignee: Dennis Gilmore <dennis>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: alejandro.perez.torres, christoph.wickert, dennis, gui1ty, jhrozek, kylev, mads, ndbecker2, quentin, randyn3lrx, sochotni, srinivasa
Target Milestone: ---   
Target Release: ---   
Hardware: ppc   
OS: Linux   
Whiteboard: abrt_hash:ea1231f6
Fixed In Version: fedora-packager-0.4.2-1.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-09 04:26:15 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:
Attachments:
Description Flags
File: backtrace none

Description Stefan Schulze Frielinghaus 2010-03-16 09:24:11 UTC
abrt 1.0.8 detected a crash.

architecture: ppc
cmdline: /usr/bin/python /usr/bin/fedora-packager-setup --help
component: fedora-packager
executable: /usr/bin/fedora-packager-setup
kernel: 2.6.32.9-70.fc12.ppc
package: fedora-packager-0.4.1-1.fc12
reason: fedora-packager-setup:114:main:NameError: global name 'certificate_expired' is not defined
release: Fedora release 12 (Constantine)
How to reproduce: 1. Simply run "fedora-packager-setup", then it dies at the very beginning.

backtrace
-----
fedora-packager-setup:114:main:NameError: global name 'certificate_expired' is not defined

Traceback (most recent call last):
  File "/usr/bin/fedora-packager-setup", line 140, in <module>
    main()
  File "/usr/bin/fedora-packager-setup", line 114, in main
    if certificate_expired():
NameError: global name 'certificate_expired' is not defined

Local variables in innermost frame:
user_home: '/home/bob'
server_ca_cert: '/home/bob/.fedora-server-ca.cert'
upload_ca_cert: '/home/bob/.fedora-upload-ca.cert'
user_cert: '/home/bob/.fedora.cert'

Comment 1 Stefan Schulze Frielinghaus 2010-03-16 09:24:14 UTC
Created attachment 400409 [details]
File: backtrace

Comment 2 Dennis Gilmore 2010-03-16 22:54:09 UTC
just commited the fix to git.  will have an update out very soon

Comment 3 Dennis Gilmore 2010-03-18 20:33:10 UTC
*** Bug 574150 has been marked as a duplicate of this bug. ***

Comment 4 Christoph Wickert 2010-03-21 22:22:18 UTC

How to reproduce
-----
1. just run it

Comment
-----
fedora-packager-setup crashes when trying to run it

Comment 5 Jakub Hrozek 2010-03-23 14:29:26 UTC

How to reproduce
-----
1. Remove old certificates, if any
2. Generate new user certificate in the account system
3. Attempt to run fedora-packager-setup

Comment 6 Fedora Update System 2010-03-23 19:15:43 UTC
fedora-packager-0.4.2-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/fedora-packager-0.4.2-1.fc13

Comment 7 Fedora Update System 2010-03-23 19:17:05 UTC
fedora-packager-0.4.2-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/fedora-packager-0.4.2-1.fc12

Comment 8 Fedora Update System 2010-03-23 19:18:44 UTC
fedora-packager-0.4.2-1.el5 has been submitted as an update for Fedora EPEL 5.
http://admin.fedoraproject.org/updates/fedora-packager-0.4.2-1.el5

Comment 9 Fedora Update System 2010-03-24 00:43:09 UTC
fedora-packager-0.4.2-1.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update fedora-packager'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/fedora-packager-0.4.2-1.fc13

Comment 10 Dennis Gilmore 2010-03-24 03:22:09 UTC
*** Bug 575646 has been marked as a duplicate of this bug. ***

Comment 11 Fedora Update System 2010-03-24 18:00:59 UTC
fedora-packager-0.4.2-1.el5 has been pushed to the Fedora EPEL 5 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update fedora-packager'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/fedora-packager-0.4.2-1.el5

Comment 12 Fedora Update System 2010-03-24 23:38:35 UTC
fedora-packager-0.4.2-1.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update fedora-packager'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/fedora-packager-0.4.2-1.fc12

Comment 13 Sandro 2010-03-25 19:59:55 UTC
I am seeing a different traceback after updating to 0.4.2-1:

Traceback (most recent call last):
  File "/usr/bin/fedora-packager-setup", line 140, in <module>
    main()
  File "/usr/bin/fedora-packager-setup", line 114, in main
    if fedora_cert.certificate_expired():
  File "/usr/lib/python2.6/site-packages/fedora_cert/__init__.py", line 66, in certificate_expired
    my_cert = _open_cert()
  File "/usr/lib/python2.6/site-packages/fedora_cert/__init__.py", line 36, in _open_cert
    my_cert = crypto.load_certificate(crypto.FILETYPE_PEM, raw_cert)
OpenSSL.crypto.Error: [('PEM routines', 'PEM_read_bio', 'no start line')]

On my laptop fedora-packager-setup runs without problems after updating.

Comment 14 Sandro 2010-03-25 20:06:41 UTC
Nevermind, ~/.fedora.cert contained garbage from a failed download using wget. I replaced ~/.fedora.cert with the actual certificate and everything is working as expected. Sorry for the fuzz.

Comment 15 Jakub Hrozek 2010-03-25 20:12:27 UTC
(In reply to comment #14)
> Nevermind, ~/.fedora.cert contained garbage from a failed download using wget.
> I replaced ~/.fedora.cert with the actual certificate and everything is working
> as expected. Sorry for the fuzz.    

Can you please file a new bug about this? The tool should never traceback, even on encountering an invalid input.

Comment 16 Sandro 2010-03-25 21:20:22 UTC
(In reply to comment #15)
> (In reply to comment #14)
> > Nevermind, ~/.fedora.cert contained garbage from a failed download using wget.
> > I replaced ~/.fedora.cert with the actual certificate and everything is working
> > as expected. Sorry for the fuzz.    
> 
> Can you please file a new bug about this? The tool should never traceback, even
> on encountering an invalid input.    

Done --> bug 577021

Comment 17 Srinivasa Sha S R 2010-03-26 08:38:36 UTC

How to reproduce
-----
1.Just typed fedora-packager-setup in treminal
2.
3.

Comment 18 Alejandro_Perez 2010-03-28 05:54:21 UTC

How to reproduce
-----
1.try to executed 
2.also exceuted fedora-cert that works but still same error 
3. variable user_cert: exist that file other do not exist


Comment
-----
run command fedora-packager-setup

Comment 19 Dennis Gilmore 2010-03-28 15:43:42 UTC
Please ensure that you install the version in updates-testing and use that

Comment 20 Neal Becker 2010-03-28 18:37:49 UTC

How to reproduce
-----
1. D/L client cert
2. Run fedora-packager-setup
3.

Comment 21 Dennis Gilmore 2010-03-28 19:21:09 UTC
(In reply to comment #20)
> 
> How to reproduce
> -----
> 1. D/L client cert
> 2. Run fedora-packager-setup
> 3.    

rpm -q fedora-packager

Comment 22 Neal Becker 2010-03-28 19:29:05 UTC
fedora-packager-0.4.1-1.fc12.noarch

Note that I had mistakenly d/l my client certificate and renamed it to .fedora-cert instead of .fedora.cert.

Comment 23 Dennis Gilmore 2010-03-28 20:05:49 UTC
please follow the instructions in comment 12 to update to the version in updates-testing that fixes the bug you are seeing.

Comment 24 Dennis Gilmore 2010-03-28 20:06:33 UTC
you can use fedora-cert to download a cert or the new version in 0.4.2 will do it for you.

Comment 25 Kyle VanderBeek 2010-04-06 05:18:16 UTC

How to reproduce
-----
1.  Run fedora-packger-setup with no ~/.fedora.cert

Comment 26 Stanislav Ochotnicky 2010-04-06 11:48:30 UTC

How to reproduce
-----
1. Run fedora-packager-setup without file $HOME/.fedora.cert existing



Comment
-----
Problem is that the function exists in fedora_cert namespace. Changing to fedora_cert.certificate_expired() fixes things

Comment 27 Dennis Gilmore 2010-04-06 13:47:23 UTC
Please read the bug before posting.  you need to  update to 0.4.2 that is in updates-testing.

Comment 28 Christoph Wickert 2010-04-06 14:18:48 UTC
Dennis, these comments were submitted throught ABRT, so people cannot look at the bug before posting. Time to file a feature request on ABRT I think.

Comment 29 Mads Kiilerich 2010-04-06 14:26:15 UTC
See bug 575396 "please check for duplicates before prompting for user input"

Comment 30 Fedora Update System 2010-04-09 04:25:58 UTC
fedora-packager-0.4.2-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 31 Dennis Gilmore 2010-04-09 12:49:54 UTC
*** Bug 580850 has been marked as a duplicate of this bug. ***

Comment 32 Fedora Update System 2010-04-09 22:55:52 UTC
fedora-packager-0.4.2-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 33 Fedora Update System 2010-04-10 10:27:37 UTC
fedora-packager-0.4.2-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.