how to fix unversioned Obsoletes
I was going to update python-colander (https://build.opensuse.org/package/show/home:jacraig:branches:devel:language...), but RPM has this to say: [ 123s] RPM build errors: [ 123s] line 37: It's not recommended to have unversioned Obsoletes: Obsoletes: python2-colander-doc [ 123s] line 38: It's not recommended to have unversioned Obsoletes: Obsoletes: python2-colander-lang [ 123s] line 39: It's not recommended to have unversioned Obsoletes: Obsoletes: python3-colander-doc [ 123s] line 40: It's not recommended to have unversioned Obsoletes: Obsoletes: python3-colander-lang etc. It merely says it's not recommended yet refuses to build (I guess we can quibble about what recommended means). At any rate, how do I fix this? The Obsoletes were apparently added when the -doc and -lang packages were dropped. Would I replace the Obsoletes with e.g. Obsoletes: python2-colander-doc < 1.8.3 (etc.) where 1.8.3 is the new version that I would update to? Or use some other version? Or is the syntax different than that? The RPM documentation's short blurb about Obsoletes literally does not show any syntax nor does it mention anything about versions. Am I the only one who finds the documentation on rpm.org obtuse and less than helpful pretty much every time I look at it? thanks, -- Jason Craig
Hi Jason! Please resolve patch error and don't care about obsoletes. аў, 20 ліп 2021, 03:23 карыстальнік Jason Craig <os-dev@jacraig.com> напісаў:
I was going to update python-colander ( https://build.opensuse.org/package/show/home:jacraig:branches:devel:language...),
but RPM has this to say:
[ 123s] RPM build errors: [ 123s] line 37: It's not recommended to have unversioned Obsoletes: Obsoletes: python2-colander-doc [ 123s] line 38: It's not recommended to have unversioned Obsoletes: Obsoletes: python2-colander-lang [ 123s] line 39: It's not recommended to have unversioned Obsoletes: Obsoletes: python3-colander-doc [ 123s] line 40: It's not recommended to have unversioned Obsoletes: Obsoletes: python3-colander-lang
etc. It merely says it's not recommended yet refuses to build (I guess we can quibble about what recommended means). At any rate, how do I fix this? The Obsoletes were apparently added when the -doc and -lang packages were dropped. Would I replace the Obsoletes with e.g.
Obsoletes: python2-colander-doc < 1.8.3
(etc.) where 1.8.3 is the new version that I would update to? Or use some other version? Or is the syntax different than that? The RPM documentation's short blurb about Obsoletes literally does not show any syntax nor does it mention anything about versions. Am I the only one who finds the documentation on rpm.org obtuse and less than helpful pretty much every time I look at it?
thanks, -- Jason Craig
On Mon, 2021-07-19 at 18:22 -0600, Jason Craig wrote:
I was going to update python-colander (https://build.opensuse.org/package/show/home:jacraig:branches:devel:language...), but RPM has this to say:
[ 123s] RPM build errors: [ 123s] line 37: It's not recommended to have unversioned Obsoletes: Obsoletes: python2-colander-doc [ 123s] line 38: It's not recommended to have unversioned Obsoletes: Obsoletes: python2-colander-lang [ 123s] line 39: It's not recommended to have unversioned Obsoletes: Obsoletes: python3-colander-doc [ 123s] line 40: It's not recommended to have unversioned Obsoletes: Obsoletes: python3-colander-lang
etc. It merely says it's not recommended yet refuses to build (I guess we can quibble about what recommended means). At any rate, how do I fix this? The Obsoletes were apparently added when the -doc and -lang packages were dropped. Would I replace the Obsoletes with e.g.
Obsoletes: python2-colander-doc < 1.8.3
(etc.) where 1.8.3 is the new version that I would update to? Or use some other version? Or is the syntax different than that? The RPM documentation's short blurb about Obsoletes literally does not show any syntax nor does it mention anything about versions. Am I the only one who finds the documentation on rpm.org obtuse and less than helpful pretty much every time I look at it?
The error in your build is actuially [ 68s] + /usr/bin/cat /home/abuild/rpmbuild/SOURCES/fix-tests.patch [ 68s] The text leading up to this was: [ 68s] -------------------------- [ 68s] |--- a/colander/tests/test_colander.py [ 68s] |+++ b/colander/tests/test_colander.py [ 68s] -------------------------- [ 68s] File to patch: [ 68s] Skip this patch? [y] [ 68s] 5 out of 5 hunks ignored [ 68s] error: Bad exit status from /var/tmp/rpm-tmp.UU9ihb (%prep) The rpmlint obsoletes not recommended is just that - not recommended; it does not fail the build (on its own) Cheers Dominique
On 7/20/2021 0:50, Dominique Leuenberger / DimStar wrote:
The error in your build is actuially
[ 68s] + /usr/bin/cat /home/abuild/rpmbuild/SOURCES/fix-tests.patch [ 68s] The text leading up to this was: [ 68s] -------------------------- [ 68s] |--- a/colander/tests/test_colander.py [ 68s] |+++ b/colander/tests/test_colander.py [ 68s] -------------------------- [ 68s] File to patch: [ 68s] Skip this patch? [y] [ 68s] 5 out of 5 hunks ignored [ 68s] error: Bad exit status from /var/tmp/rpm-tmp.UU9ihb (%prep)
The rpmlint obsoletes not recommended is just that - not recommended; it does not fail the build (on its own)
Thanks for the two pointing out what I missed. Here's another question: how do I do a conditional BuildRequires? The Python Packaging wiki page says "For projects inheriting their project configuration from openSUSE:Factory or devel:languages:python:backports, you can reference the Python version of the expanded flavor itself by using the pseudo %python macro (don't define %python anywhere else): BuildRequires: %{python_module aiocontextvars >= 0.2.2 if %python-base < 3.7}" But this doesn't appear to be working in the Leap 15.3 build (I'm guessing the project config doesn't inherit from openSUSE:Factory or devel:languages:python:backports?). I'm trying to include enum34 for any Python before 3.4. thanks, -- Jason Craig
On 7/20/21 9:01 PM, Jason Craig wrote:
Here's another question: how do I do a conditional BuildRequires? The Python Packaging wiki page says
"For projects inheriting their project configuration from openSUSE:Factory or devel:languages:python:backports, you can reference the Python version of the expanded flavor itself by using the pseudo %python macro (don't define %python anywhere else):
BuildRequires: %{python_module aiocontextvars >= 0.2.2 if %python-base < 3.7}"
But this doesn't appear to be working in the Leap 15.3 build
I ran into this issue myself and Ben was so kind to explain it in detail (see end of his message on the python pkg. list): https://lists.opensuse.org/archives/list/python@lists.opensuse.org/message/D... Ciao, Michael.
Am 20.07.21 um 21:01 schrieb Jason Craig:
But this doesn't appear to be working in the Leap 15.3 build (I'm guessing the project config doesn't inherit from openSUSE:Factory or devel:languages:python:backports?). I'm trying to include enum34 for any Python before 3.4.
Leap 15.3 has Python 2.7 and 3.6, so you use the standard stanza from the wiki, which even uses enum34 as example: https://en.opensuse.org/openSUSE:Packaging_Python#BuildRequires openSUSE Tumbleweed has removed the majority of python2 packages and does not include Python2 into the buildset anymore. It defines the equivalent of|osc build --without python2|by default. So if you still need to support building python2 packages for older distributions, you can exclude the requirements for Tumbleweed by %bcond_without python2 %if %{with python2} BuildRequires: python2-enum34 %endif https://en.opensuse.org/openSUSE:Packaging_Python#Requirements_specific_for_... %if "%{python_flavor}" == "python2" Requires: python2-enum34 %endif If you REALLY need to include a package for a hypothetical Python 3.3: %if %whatever_condition_specifies_your_distro # python3 is Python 3.3 %bcond_without mydistrohaspy33 %else %bcond_with mydistrohaspy33 %endif %if %{with mydistrohaspy33} BuildRequires: python3-enum34 %endif %if %python_version_nodots < 34 Requires: python-enum34 %endif Ben
participants (5)
-
Ben Greiner
-
Dmitriy Perlow
-
Dominique Leuenberger / DimStar
-
Jason Craig
-
Michael Ströder