Bug 1412260 - [abrt] fedora-packager: __init__.py:83:certificate_expired:AttributeError: 'NoneType' object has no attribute 'has_expired'
Summary: [abrt] fedora-packager: __init__.py:83:certificate_expired:AttributeError: 'N...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-packager
Version: 28
Hardware: x86_64
OS: Unspecified
unspecified
urgent
Target Milestone: ---
Assignee: Dennis Gilmore
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:a3fca7ddc3daeeee4fb301eced6...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-11 16:02 UTC by Sergio Basto
Modified: 2019-05-28 21:48 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-28 21:48:45 UTC
Type: ---


Attachments (Terms of Use)
File: backtrace (556 bytes, text/plain)
2017-01-11 16:02 UTC, Sergio Basto
no flags Details
File: environ (4.74 KB, text/plain)
2017-01-11 16:02 UTC, Sergio Basto
no flags Details

Description Sergio Basto 2017-01-11 16:02:43 UTC
Description of problem:
just need to run fedora-packager-setup -w in Fedora 24 Updated 

Version-Release number of selected component:
fedora-packager-0.6.0.1-1.fc24

Additional info:
reporter:       libreport-2.7.2
cmdline:        /usr/bin/python /usr/bin/fedora-packager-setup -w
dso_list:       fedora-cert-0.6.0.1-1.fc24.noarch
executable:     /usr/bin/fedora-packager-setup
kernel:         4.8.15-200.fc24.x86_64
pkg_fingerprint: 73BD E983 81B4 6521
pkg_vendor:     Fedora Project
runlevel:       N 5
type:           Python
uid:            500

Truncated backtrace:
__init__.py:83:certificate_expired:AttributeError: 'NoneType' object has no attribute 'has_expired'

Traceback (most recent call last):
  File "/usr/bin/fedora-packager-setup", line 123, in <module>
    main()
  File "/usr/bin/fedora-packager-setup", line 103, in main
    if fedora_cert.certificate_expired():
  File "/usr/lib/python2.7/site-packages/fedora_cert/__init__.py", line 83, in certificate_expired
    if my_cert.has_expired():
AttributeError: 'NoneType' object has no attribute 'has_expired'

Local variables in innermost frame:
my_cert: None

Comment 1 Sergio Basto 2017-01-11 16:02:49 UTC
Created attachment 1239517 [details]
File: backtrace

Comment 2 Sergio Basto 2017-01-11 16:02:51 UTC
Created attachment 1239518 [details]
File: environ

Comment 3 Sergio Basto 2017-01-11 16:03:58 UTC
Similar problem has been detected:

just need to run fedora-cert -v in Fedora24 updated 

reporter:       libreport-2.7.2
cmdline:        /usr/bin/python /usr/bin/fedora-cert -v
event_log:      2017-01-11-16:02:58> ('report_uReport' completed successfully)
executable:     /usr/bin/fedora-cert
kernel:         4.8.15-200.fc24.x86_64
package:        fedora-cert-0.6.0.1-1.fc24
pkg_fingerprint: 73BD E983 81B4 6521
pkg_vendor:     Fedora Project
reason:         __init__.py:83:certificate_expired:AttributeError: 'NoneType' object has no attribute 'has_expired'
runlevel:       N 5
type:           Python
uid:            500

Comment 4 Sergio Basto 2017-01-11 16:05:07 UTC
also happens when we run: fedora-cert -v (on Fedora 24 updated)

Comment 5 Fedora End Of Life 2017-07-26 00:10:54 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 6 Fedora End Of Life 2017-11-16 14:19:18 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 7 Sergio Basto 2017-11-16 14:34:06 UTC
tested on F26 

fedora-cert -v 
Traceback (most recent call last):
  File "/usr/bin/fedora-cert", line 85, in <module>
    main(opts)
  File "/usr/bin/fedora-cert", line 52, in main
    if fedora_cert.certificate_expired():
  File "/usr/lib/python2.7/site-packages/fedora_cert/__init__.py", line 83, in certificate_expired
    if my_cert.has_expired():                                                                                                 
AttributeError: 'NoneType' object has no attribute 'has_expired'

Comment 8 Pravin Satpute 2017-11-21 05:24:13 UTC
Any chance to get this fixed?

Comment 9 Sergio Basto 2018-02-03 11:01:59 UTC
I catch one thing if we delete ~/.fedora.upn , read correctly the certificate

Comment 10 Sergio Basto 2018-02-04 16:04:07 UTC
I fixed it here [1] , as root if you edit /usr/lib/python2.7/site-packages/fedora_cert/__init__.py and delete those lines it will work . 


[1] https://pagure.io/fedora-packager/pull-request/155

Comment 11 Sandro Bonazzola 2018-03-19 07:53:30 UTC
Seen on Fedora 27 too

Comment 12 Michal Ambroz 2018-03-26 00:48:05 UTC
+1 on Fedora 27:

[rebus@host] 2018-03-26 02:42:55 +0200
$ fedora-cert -v
Traceback (most recent call last):
  File "/usr/bin/fedora-cert", line 85, in <module>
    main(opts)
  File "/usr/bin/fedora-cert", line 52, in main
    if fedora_cert.certificate_expired():
  File "/usr/lib/python2.7/site-packages/fedora_cert/__init__.py", line 83, in certificate_expired
    if my_cert.has_expired():
AttributeError: 'NoneType' object has no attribute 'has_expired'

$ fedora-packager-setup 
Setting up Fedora packager environment
Traceback (most recent call last):
  File "/usr/bin/fedora-packager-setup", line 123, in <module>
    main()
  File "/usr/bin/fedora-packager-setup", line 103, in main
    if fedora_cert.certificate_expired():
  File "/usr/lib/python2.7/site-packages/fedora_cert/__init__.py", line 83, in certificate_expired
    if my_cert.has_expired():
AttributeError: 'NoneType' object has no attribute 'has_expired'


$ rpm -qf /usr/lib/python2.7/site-packages/fedora_cert/__init__.py
fedora-cert-0.6.0.1-3.fc27.noarch

Comment 13 Michal Ambroz 2018-03-26 00:54:27 UTC
Workaround: 
1) remove .fedora-server-ca.cert .fedora-upload-ca.cert .fedora.cert .fedora.pfx .fedora.upn 
2) re-run the fedora-packager-setup

Comment 14 Tim Jackson 2018-05-11 09:24:16 UTC
Seeing this myself on F-28.

Comment 15 Todd Zullinger 2018-05-11 20:32:01 UTC
Is there any need for fedora-packager-setup and fedora-cert?  I don't believe they have an use (outside of a few folks on the releng team who may still use certs for reasons not applicable to packagers).

Perhaps a new fedora-packager update should be cut which includes the change to fedora-cert to make this more clear?  (A similar change should likely be made to fedora-packager-setup, or the command could be dropped entirely.)

If there is documentation still referencing these tools it should be updated.

Comment 16 Mateusz Mielczarek 2018-07-10 07:20:03 UTC
(In reply to Michal Ambroz from comment #13)
> Workaround: 
> 1) remove .fedora-server-ca.cert .fedora-upload-ca.cert .fedora.cert
> .fedora.pfx .fedora.upn 
> 2) re-run the fedora-packager-setup

this workaround is working. But still there's no patch for this. Using Fedora 28.

Comment 17 Ben Cotton 2019-05-02 21:20:29 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 18 Ben Cotton 2019-05-28 21:48:45 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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