Bug 1695953 - cloud-init-17.1-8.fc31 FTBFS (not only) with Python 3.8
Summary: cloud-init-17.1-8.fc31 FTBFS (not only) with Python 3.8
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: cloud-init
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Garrett Holmstrom
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F31FTBFS 1675080 PYTHON38 1732841
TreeView+ depends on / blocked
 
Reported: 2019-04-03 23:35 UTC by Miro Hrončok
Modified: 2019-07-31 22:40 UTC (History)
10 users (show)

Fixed In Version: cloud-init-17.1-10.fc31 cloud-init-17.1-9.fc30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-23 19:27:52 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2019-04-03 23:35:33 UTC
There are several stages of FTBFS with cloud-init-17.1-8.fc31

If I do a Fedora Koji scratchbuild:

 $ fedpkg --release master build --scratch

I get:

BUILDSTDERR: error: This macro requires some arguments
BUILDSTDERR: error: line 124: %systemd_postun


In my Copr with Python 3.8, built from SRPM I get the actual Python 3.8 problem:

+ /usr/bin/python3 setup.py install -O1 --skip-build --root /builddir/build/BUILDROOT/cloud-init-17.1-8.fc31.x86_64 --init-system=systemd
Traceback (most recent call last):
  File "setup.py", line 125, in <module>
    'systemd': [render_tmpl(f)
  File "setup.py", line 125, in <listcomp>
    'systemd': [render_tmpl(f)
  File "setup.py", line 114, in render_tmpl
    tiny_p([sys.executable, './tools/render-cloudcfg', template, fpath])
  File "setup.py", line 44, in tiny_p
    raise RuntimeError("Failed running %s [rc=%s] (%s, %s)" %
RuntimeError: Failed running ['/usr/bin/python3', './tools/render-cloudcfg', 'systemd/cloud-init.service.tmpl', 'tmph0v9h1_q/cloud-init.service'] [rc=1] (, Traceback (most recent call last):
  File "./tools/render-cloudcfg", line 44, in <module>
    main()
  File "./tools/render-cloudcfg", line 19, in main
    platform = util.system_info()
  File "/builddir/build/BUILD/cloud-init-17.1/cloudinit/util.py", line 589, in system_info
    'dist': platform.dist(),  # pylint: disable=W1505
AttributeError: module 'platform' has no attribute 'dist'


That is indeed removed from Python 3.8

$ python3.7
>>> import platform
>>> platform.dist()
__main__:1: DeprecationWarning: dist() and linux_distribution() functions are deprecated in Python 3.5
('fedora', '29', 'Twenty Nine')


$ python3.8
>>> import platform
>>> platform.dist()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'platform' has no attribute 'dist'

Comment 1 Miro Hrončok 2019-04-03 23:40:14 UTC
CC'ing zbyszek about the %systemd_postun failure.

My Copr still has systemd 241-4.gitcbf14c9.fc31, Koji has 242~rc2-1.fc31.

Comment 2 Miro Hrončok 2019-04-03 23:45:15 UTC
And according to koschei, the tests are failing anyway since mid February

https://apps.fedoraproject.org/koschei/package/cloud-init
https://apps.fedoraproject.org/koschei/build/6037690
looks like bash update problem to me

So this now has 3 levels of FTBFS:

level 1) systemd macro problem with systemd 242
level 2) setup.py install platfrom.dist() problem with Python 3.8
level 3) %check failure anywhere caused by something that happened in February, maybe BASH 5

Comment 3 Miro Hrončok 2019-04-03 23:48:33 UTC
Seems like Bash 5 added EPOCHREALTIME env varibale and that's causing the tests to fail.

https://lists.gnu.org/archive/html/bug-bash/2018-05/msg00068.html

Comment 4 Zbigniew Jędrzejewski-Szmek 2019-04-04 16:03:38 UTC
It's not a bug, it's a feature!

$ fedpkg srpm && mock -n $(ls -t1r *.src.rpm|tail -n1)
Downloading cloud-init-17.1.tar.gz
######################################################################## 100.0%
error: This macro requires some arguments
error: line 124: %systemd_postun

As it says, this macro requires some arguments, most likely the same ones that are used for %systemd_post and %systemd_preun in the lines right above.

Comment 5 Miro Hrončok 2019-04-15 15:52:30 UTC
Could you please try to fix this? Or should this be brought upstream?

Comment 6 Miro Hrončok 2019-04-23 13:24:48 UTC
Please respond.

Comment 8 Björn 'besser82' Esser 2019-04-23 19:09:24 UTC
I'm not the maintainer of the package, but as a proven packager I have fixed the three issues mentioned in comment #2 since the maintainer was not replying.  The package now builds fine on F30 and Rawhide (even with Python 3.8) again.

Comment 9 Björn 'besser82' Esser 2019-04-23 19:14:34 UTC
I forgot to mention:  To fix that issue with platform.dist, I needed to add (Build)Requires: python3-distro.

Comment 11 Fedora Update System 2019-04-23 19:26:43 UTC
cloud-init-17.1-9.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-67d7987a7b

Comment 12 Fedora Update System 2019-04-24 20:27:53 UTC
cloud-init-17.1-9.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-67d7987a7b

Comment 13 Fedora Update System 2019-04-29 01:41:39 UTC
cloud-init-17.1-9.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.


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