debug files can not be packaged for unicorn
Hello together, I hope you all had a nice Christmas! I have received a request[0] by the Linux Distributions Working Group regarding problems with the package unicorn (only with s390x). Therefore, I wanted to update it also for openSUSE in my home repo as a first step: https://build.opensuse.org/package/show/home:AdaLovelace:branches:Virtualiza... Anyways, I can not add the required debug files. I have added a debug package after the hint for not packaged debug files. The files are referenced on this way at the moment: %files -n %{name}-debuginfo debugfiles.list %{python3_sitelib}/%{name}/lib/libunicorn.so.2.debug I am receiving these rpm warnings/errors: [ 381s] RPM build warnings: [ 381s] line 157: multiple %files for package 'unicorn-debuginfo' [ 381s] [ 381s] RPM build errors: [ 381s] Installed (but unpackaged) file(s) found: [ 381s] /usr/lib/debug/usr/lib/python3.11/site-packages/unicorn/lib/libunicorn.so.2.debug What do I do wrong? Thank you for your feedback! Best regards, Sarah [0] https://lists.openmainframeproject.org/g/wg-linux-distros/message/157
Am 28.12.23 um 17:30 schrieb Sarah Julia Kriesch:
Hello together,
I hope you all had a nice Christmas!
I have received a request[0] by the Linux Distributions Working Group regarding problems with the package unicorn (only with s390x). Therefore, I wanted to update it also for openSUSE in my home repo as a first step: https://build.opensuse.org/package/show/home:AdaLovelace:branches:Virtualiza... Anyways, I can not add the required debug files. I have added a debug package after the hint for not packaged debug files.
The files are referenced on this way at the moment: %files -n %{name}-debuginfo debugfiles.list %{python3_sitelib}/%{name}/lib/libunicorn.so.2.debug
I am receiving these rpm warnings/errors: [ 381s] RPM build warnings: [ 381s] line 157: multiple %files for package 'unicorn-debuginfo' [ 381s] [ 381s] RPM build errors: [ 381s] Installed (but unpackaged) file(s) found: [ 381s] /usr/lib/debug/usr/lib/python3.11/site-packages/unicorn/lib/libunicorn.so.2.debug
What do I do wrong? Thank you for your feedback!
Best regards, Sarah
[0] https://lists.openmainframeproject.org/g/wg-linux-distros/message/157
The buildservice takes care of the debug packages on its own when the debuginfo flags are set in the projconf. Which is the case for your project. Don't specify them in the specfile.
Gesendet: Donnerstag, 28. Dezember 2023 um 18:47 Uhr Von: "Ben Greiner" <code@bnavigator.de> An: packaging@lists.opensuse.org Betreff: Re: debug files can not be packaged for unicorn
Am 28.12.23 um 17:30 schrieb Sarah Julia Kriesch:
Hello together,
I hope you all had a nice Christmas!
I have received a request[0] by the Linux Distributions Working Group regarding problems with the package unicorn (only with s390x). Therefore, I wanted to update it also for openSUSE in my home repo as a first step: https://build.opensuse.org/package/show/home:AdaLovelace:branches:Virtualiza... Anyways, I can not add the required debug files. I have added a debug package after the hint for not packaged debug files.
The files are referenced on this way at the moment: %files -n %{name}-debuginfo debugfiles.list %{python3_sitelib}/%{name}/lib/libunicorn.so.2.debug
I am receiving these rpm warnings/errors: [ 381s] RPM build warnings: [ 381s] line 157: multiple %files for package 'unicorn-debuginfo' [ 381s] [ 381s] RPM build errors: [ 381s] Installed (but unpackaged) file(s) found: [ 381s] /usr/lib/debug/usr/lib/python3.11/site-packages/unicorn/lib/libunicorn.so.2.debug
What do I do wrong? Thank you for your feedback!
Best regards, Sarah
[0] https://lists.openmainframeproject.org/g/wg-linux-distros/message/157
The buildservice takes care of the debug packages on its own when the debuginfo flags are set in the projconf. Which is the case for your project. Don't specify them in the specfile.
The reason is, that I have received the same error message for (unpackaged) debug files without adding the debuginfo package.
On Thursday 2023-12-28 17:30, Sarah Julia Kriesch wrote:
I hope you all had a nice Christmas!
I have received a request[0] by the Linux Distributions Working Group regarding problems with the package unicorn (only with s390x). Therefore, I wanted to update it also for openSUSE in my home repo as a first step: https://build.opensuse.org/package/show/home:AdaLovelace:branches:Virtualiza... Anyways, I can not add the required debug files. I have added a debug package after the hint for not packaged debug files.
The files are referenced on this way at the moment: %files -n %{name}-debuginfo debugfiles.list %{python3_sitelib}/%{name}/lib/libunicorn.so.2.debug
Questions to be answered before we're even talking about debuginfo: Why are they duplicating /usr/lib64/libunicorn.so.2 and %{python3_sitelib}/%{name}/lib/libunicorn.so.2 libunicorn.so.2 is arch-dependent, so ought to be in %python3_sitearch not %python3_sitelib. Also problem: %files -n %{name}-debuginfo debuginfo.list that should be %files -n debuginfo -f debuginfo.list, or more specifially, drop the entire thing because debuginfo is all autogenerated.
Am 28.12.23 um 18:51 schrieb Jan Engelhardt:
On Thursday 2023-12-28 17:30, Sarah Julia Kriesch wrote:
I hope you all had a nice Christmas!
I have received a request[0] by the Linux Distributions Working Group regarding problems with the package unicorn (only with s390x). Therefore, I wanted to update it also for openSUSE in my home repo as a first step: https://build.opensuse.org/package/show/home:AdaLovelace:branches:Virtualiza... Anyways, I can not add the required debug files. I have added a debug package after the hint for not packaged debug files.
The files are referenced on this way at the moment: %files -n %{name}-debuginfo debugfiles.list %{python3_sitelib}/%{name}/lib/libunicorn.so.2.debug Questions to be answered before we're even talking about debuginfo:
Why are they duplicating /usr/lib64/libunicorn.so.2 and %{python3_sitelib}/%{name}/lib/libunicorn.so.2
libunicorn.so.2 is arch-dependent, so ought to be in %python3_sitearch not %python3_sitelib.
Actually the bindings themselves seem to be pure python, they just have a very quirky way of shipping the shared library within the wheel and loading it via ctypes from the sitelib. https://github.com/unicorn-engine/unicorn/blob/master/bindings/python/unicor... This must be patched out for a proper rpm package. - Ben
Am 28.12.23 um 19:11 schrieb Ben Greiner:
Am 28.12.23 um 18:51 schrieb Jan Engelhardt:
On Thursday 2023-12-28 17:30, Sarah Julia Kriesch wrote:
I hope you all had a nice Christmas!
I have received a request[0] by the Linux Distributions Working Group regarding problems with the package unicorn (only with s390x). Therefore, I wanted to update it also for openSUSE in my home repo as a first step: https://build.opensuse.org/package/show/home:AdaLovelace:branches:Virtualiza... Anyways, I can not add the required debug files. I have added a debug package after the hint for not packaged debug files.
The files are referenced on this way at the moment: %files -n %{name}-debuginfo debugfiles.list %{python3_sitelib}/%{name}/lib/libunicorn.so.2.debug Questions to be answered before we're even talking about debuginfo:
Why are they duplicating /usr/lib64/libunicorn.so.2 and %{python3_sitelib}/%{name}/lib/libunicorn.so.2
libunicorn.so.2 is arch-dependent, so ought to be in %python3_sitearch not %python3_sitelib.
Actually the bindings themselves seem to be pure python, they just have a very quirky way of shipping the shared library within the wheel and loading it via ctypes from the sitelib. https://github.com/unicorn-engine/unicorn/blob/master/bindings/python/unicor...
This must be patched out for a proper rpm package.
- Ben
It's actually super easy, we just need to define LIBUNICORN_PATH during the build and the library is not goint to be built twice. The python code will then look for the library in the system path: https://github.com/unicorn-engine/unicorn/blob/master/bindings/python/unicor... https://build.opensuse.org/request/show/1135534
Gesendet: Donnerstag, 28. Dezember 2023 um 19:11 Uhr Von: "Ben Greiner" <code@bnavigator.de> An: packaging@lists.opensuse.org Betreff: Re: debug files can not be packaged for unicorn Am 28.12.23 um 18:51 schrieb Jan Engelhardt: On Thursday 2023-12-28 17:30, Sarah Julia Kriesch wrote: I hope you all had a nice Christmas! I have received a request[0] by the Linux Distributions Working Group regarding problems with the package unicorn (only with s390x). Therefore, I wanted to update it also for openSUSE in my home repo as a first step:https://build.opensuse.org/package/show/home:AdaLovelace:branches:Virtualiza... Anyways, I can not add the required debug files. I have added a debug package after the hint for not packaged debug files. The files are referenced on this way at the moment: %files -n %{name}-debuginfo debugfiles.list %{python3_sitelib}/%{name}/lib/libunicorn.so.2.debug Questions to be answered before we're even talking about debuginfo: Why are they duplicating /usr/lib64/libunicorn.so.2 and %{python3_sitelib}/%{name}/lib/libunicorn.so.2 libunicorn.so.2 is arch-dependent, so ought to be in %python3_sitearch not %python3_sitelib. Actually the bindings themselves seem to be pure python, they just have a very quirky way of shipping the shared library within the wheel and loading it via ctypes from the sitelib. https://github.com/unicorn-engine/unicorn/blob/master/bindings/python/unicorn/unicorn.py[https://github.com/unicorn-engine/unicorn/blob/master/bindings/python/unicorn/unicorn.py] This must be patched out for a proper rpm package. - Ben Thanks for your support regarding the fix! Sarah
Gesendet: Donnerstag, 28. Dezember 2023 um 18:51 Uhr Von: "Jan Engelhardt" <jengelh@inai.de> An: "Sarah Julia Kriesch" <ada.lovelace@gmx.de> Cc: packaging@lists.opensuse.org Betreff: Re: debug files can not be packaged for unicorn
On Thursday 2023-12-28 17:30, Sarah Julia Kriesch wrote:
I hope you all had a nice Christmas!
I have received a request[0] by the Linux Distributions Working Group regarding problems with the package unicorn (only with s390x). Therefore, I wanted to update it also for openSUSE in my home repo as a first step: https://build.opensuse.org/package/show/home:AdaLovelace:branches:Virtualiza... Anyways, I can not add the required debug files. I have added a debug package after the hint for not packaged debug files.
The files are referenced on this way at the moment: %files -n %{name}-debuginfo debugfiles.list %{python3_sitelib}/%{name}/lib/libunicorn.so.2.debug
Questions to be answered before we're even talking about debuginfo:
Why are they duplicating /usr/lib64/libunicorn.so.2 and %{python3_sitelib}/%{name}/lib/libunicorn.so.2
libunicorn.so.2 is arch-dependent, so ought to be in %python3_sitearch not %python3_sitelib.
Also problem:
%files -n %{name}-debuginfo debuginfo.list
that should be %files -n debuginfo -f debuginfo.list, or more specifially, drop the entire thing because debuginfo is all autogenerated.
I have dropped the list now. %{python3_sitearch}/%{name}/lib/libunicorn.so.2.debug seems also not to be the correct path for /usr/lib/debug/usr/lib/python3.11/site-packages/unicorn/lib/libunicorn.so.2.debug. Another question regarding the "debuginfo should be integrated automatically": How can you add this libunicorn.so.2.debug file into the debuginfo package without adding this package into the spec file? Thanks! Best regards, Sarah
Am 28.12.23 um 20:00 schrieb Sarah Julia Kriesch:
Gesendet: Donnerstag, 28. Dezember 2023 um 18:51 Uhr Von: "Jan Engelhardt" <jengelh@inai.de> An: "Sarah Julia Kriesch" <ada.lovelace@gmx.de> Cc: packaging@lists.opensuse.org Betreff: Re: debug files can not be packaged for unicorn
On Thursday 2023-12-28 17:30, Sarah Julia Kriesch wrote:
I hope you all had a nice Christmas!
I have received a request[0] by the Linux Distributions Working Group regarding problems with the package unicorn (only with s390x). Therefore, I wanted to update it also for openSUSE in my home repo as a first step: https://build.opensuse.org/package/show/home:AdaLovelace:branches:Virtualiza... Anyways, I can not add the required debug files. I have added a debug package after the hint for not packaged debug files.
The files are referenced on this way at the moment: %files -n %{name}-debuginfo debugfiles.list %{python3_sitelib}/%{name}/lib/libunicorn.so.2.debug Questions to be answered before we're even talking about debuginfo:
Why are they duplicating /usr/lib64/libunicorn.so.2 and %{python3_sitelib}/%{name}/lib/libunicorn.so.2
libunicorn.so.2 is arch-dependent, so ought to be in %python3_sitearch not %python3_sitelib.
Also problem:
%files -n %{name}-debuginfo debuginfo.list
that should be %files -n debuginfo -f debuginfo.list, or more specifially, drop the entire thing because debuginfo is all autogenerated.
I have dropped the list now. %{python3_sitearch}/%{name}/lib/libunicorn.so.2.debug seems also not to be the correct path for /usr/lib/debug/usr/lib/python3.11/site-packages/unicorn/lib/libunicorn.so.2.debug.
/usr/lib/debug would be correct even for 64bit libraries in /usr/lib64. But we leave it out of the pure python package alltogether, see the other responses in this thread.
Another question regarding the "debuginfo should be integrated automatically": How can you add this libunicorn.so.2.debug file into the debuginfo package without adding this package into the spec file?
Don't do it manually. If it would not be `BuildArch: noarch`, i.e. it's installed into python_sitearch instead of sitelib, then there will automatically be a python3XX-foo-debuginfo package. - Ben
participants (3)
-
Ben Greiner
-
Jan Engelhardt
-
Sarah Julia Kriesch