Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 796980

Summary: dev-util/buildbot-pkg-3.2.0 setuptools warnings detected
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED FIXED    
Severity: normal CC: dolsen, mgorny, zmedico
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log

Description Agostino Sarubbo gentoo-dev 2021-06-20 16:48:11 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-util/buildbot-pkg-3.2.0 setuptools warnings detected.
Discovered on: amd64 (internal ref: ci)

NOTE:
This machine uses GCC-11: https://gcc.gnu.org/gcc-11/porting_to.html
https://archives.gentoo.org/gentoo-dev/message/81e472e95b181da6e017a85acf329981.
Comment 1 Agostino Sarubbo gentoo-dev 2021-06-20 16:48:13 UTC
Created attachment 717231 [details]
build.log

build log and emerge --info
Comment 2 Brian Dolbec (RETIRED) gentoo-dev 2021-06-21 21:27:56 UTC
The upstream sources and the tarball DO NOT contain these dates anywhere in any files.


From the log output, it looks to be an eclass bug.


Copying buildbot_pkg.egg-info to /var/tmp/portage/dev-util/buildbot-pkg-3.2.0/image/_python3.8/usr/lib/python3.8/site-packages/buildbot_pkg-2021.6.20-py3.8.egg-info
running install_scripts
/usr/lib/python3.8/site-packages/setuptools/dist.py:484: UserWarning: Normalizing '2021.06.20' to '2021.6.20'
  warnings.warn(tmpl.format(**locals()))


and 

running build_py
copying buildbot_pkg.py -> /var/tmp/portage/dev-util/buildbot-pkg-3.2.0/work/buildbot-pkg-3.2.0-python3_8/lib
/usr/lib/python3.8/site-packages/setuptools/dist.py:484: UserWarning: Normalizing '2021.06.17' to '2021.6.17'
  warnings.warn(tmpl.format(**locals()))
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-06-22 04:41:32 UTC
(In reply to Brian Dolbec from comment #2)
> Copying buildbot_pkg.egg-info to
> /var/tmp/portage/dev-util/buildbot-pkg-3.2.0/image/_python3.8/usr/lib/
> python3.8/site-packages/buildbot_pkg-2021.6.20-py3.8.egg-info

Yet this is precisely the version found in installed file.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-06-22 04:43:27 UTC
Also quite obviously, the warning comes from setuptools, not eclass.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-06-22 04:52:30 UTC
See buildbot_pkg.py, getVersion().  It falls back to the current date because you didn't provide the version via BUILDBOT_VERSION.
Comment 6 Brian Dolbec (RETIRED) gentoo-dev 2021-06-25 01:12:53 UTC
Damn, so why is this the first time this has occurred????

That code is a minimum of 4 years old, much of it 7 years old...
The ebuild did not change either.


Or is this due to recent setuptools changes???


Thanks Micheal for the deep dive.

I'm inquiring upstream if there were release packaging changes that might have triggered this.
Comment 7 Brian Dolbec (RETIRED) gentoo-dev 2021-06-25 01:36:40 UTC
Well, exporting the version doesn't solve it either.


Copying buildbot_pkg.egg-info to /var/tmp/portage/dev-util/buildbot-pkg-3.2.0/image/_python3.8/usr/lib/python3.8/site-packages/buildbot_pkg-buildbot_pkg_3.2.0-py3.8.egg-info
running install_scripts
/usr/lib/python3.8/site-packages/setuptools/dist.py:477: UserWarning: The version specified ('buildbot-pkg-3.2.0') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.
  warnings.warn(
 * python3_9: running distutils-r1_run_phase distutils-r1_python_install
python3.9 setup.py install --skip-build --root=/var/tmp/portage/dev-util/buildbot-pkg-3.2.0/image/_python3.9
/usr/lib/python3.9/site-packages/setuptools/dist.py:477: UserWarning: The version specified ('buildbot-pkg-3.2.0') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.
  warnings.warn(



going to check older versions of buildbot-pkg.  Is looking more like setuptools has become a little bitchy...
Comment 8 Brian Dolbec (RETIRED) gentoo-dev 2021-06-25 01:57:55 UTC
Damn typo, it got P instead of PV.  That silenced it.

Older versions of buildbot-pkg/setuptools were also spitting out the warning.  It was just never caught before.
Comment 9 Larry the Git Cow gentoo-dev 2021-06-25 02:04:56 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d7f4d192aefd74749b34e8c9cf04a29a55d2e9a

commit 9d7f4d192aefd74749b34e8c9cf04a29a55d2e9a
Author:     Brian Dolbec <dolsen@gentoo.org>
AuthorDate: 2021-06-25 02:02:26 +0000
Commit:     Brian Dolbec <dolsen@gentoo.org>
CommitDate: 2021-06-25 02:04:46 +0000

    dev-util/buildbot-pkg: Fix setuptools warning
    
    Export BUILDBOT_VERSION in src_install to avoid the
    setuptools bitch about the backup date version.
    
    Closes: https://bugs.gentoo.org/796980
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Brian Dolbec <dolsen@gentoo.org>

 dev-util/buildbot-pkg/buildbot-pkg-3.2.0.ebuild | 5 +++++
 1 file changed, 5 insertions(+)
Comment 10 Brian Dolbec (RETIRED) gentoo-dev 2021-06-28 04:46:22 UTC
*** Bug 798495 has been marked as a duplicate of this bug. ***
Comment 11 Brian Dolbec (RETIRED) gentoo-dev 2021-06-28 04:53:10 UTC
bah, still didn't get all of them...
Comment 12 Brian Dolbec (RETIRED) gentoo-dev 2021-06-28 05:03:52 UTC
Zac, is emerge stripping the exported BUILDBOT_VERSION at some point causing it to revert back to file mtime as the version?  

Exporting fixed one instance of the setuptools QA warning, but not both.

Is this a regression or suppose to happen this way?
Comment 13 Larry the Git Cow gentoo-dev 2021-07-11 13:00:20 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b568c8d501962bf748ee1ff04f05e5a16b716b0f

commit b568c8d501962bf748ee1ff04f05e5a16b716b0f
Author:     Brian Dolbec <dolsen@gentoo.org>
AuthorDate: 2021-07-11 12:36:47 +0000
Commit:     Brian Dolbec <dolsen@gentoo.org>
CommitDate: 2021-07-11 12:37:48 +0000

    dev-util/buildbot-pkg: Fix version setting
    
    Closes: https://bugs.gentoo.org/796980
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Brian Dolbec <dolsen@gentoo.org>

 dev-util/buildbot-pkg/buildbot-pkg-3.2.0.ebuild | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)