[opensuse-packaging] very weird packaging problem on Leap 15.0
Hi, I'm having a really strange packaging issue on Leap 15.0: the %files se4ction of my spec file fails! here's the part of the spec file in question: %files %defattr(-,root,root,0755) %doc $RPM_BUILD_DIR/%{_srcname}/build-linux-%{_arch}/newview/packaged/*.txt %{prefix} /usr/share/applications/* /usr/share/pixmaps/* /usr/games/* %config /etc/permissions.d/%{name} and here is the log output: %files 2685s] Processing files: phoenix-firestorm-lgpl-5.1.9.56359-lp150.7.1.x86_64 [ 2685s] Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.ZJ8qDk [ 2685s] + umask 022 [ 2685s] + cd /home/abuild/rpmbuild/BUILD [ 2685s] + cd phoenix-firestorm-lgpl [ 2685s] + DOCDIR=/home/abuild/rpmbuild/BUILDROOT/phoenix-firestorm- lgpl-5.1.9.56359-lp150.7.1.x86_64/usr/share/doc/packages/phoenix-firestorm- lgpl [ 2685s] + export LC_ALL=C [ 2685s] + LC_ALL=C [ 2685s] + export DOCDIR [ 2685s] + /usr/bin/mkdir -p /home/abuild/rpmbuild/BUILDROOT/phoenix- firestorm-lgpl-5.1.9.56359-lp150.7.1.x86_64/usr/share/doc/packages/phoenix- firestorm-lgpl [ 2685s] + cp -pr /home/abuild/rpmbuild/BUILD/phoenix-firestorm-lgpl/build- linux-x86_64/newview/packaged/FIRESTORM_DESKTOPINSTALL.txt /home/abuild/ rpmbuild/BUILD/phoenix-firestorm-lgpl/build-linux-x86_64/newview/packaged/ README-linux-joystick.txt /home/abuild/rpmbuild/BUILD/phoenix-firestorm-lgpl/ build-linux-x86_64/newview/packaged/README-linux-voice.txt /home/abuild/ rpmbuild/BUILD/phoenix-firestorm-lgpl/build-linux-x86_64/newview/packaged/ README-linux.txt /home/abuild/rpmbuild/BUILD/phoenix-firestorm-lgpl/build- linux-x86_64/newview/packaged/VivoxAUP.txt /home/abuild/rpmbuild/BUILD/ phoenix-firestorm-lgpl/build-linux-x86_64/newview/packaged/ featuretable_linux.txt /home/abuild/rpmbuild/BUILD/phoenix-firestorm-lgpl/ build-linux-x86_64/newview/packaged/licenses.txt /home/abuild/rpmbuild/ BUILDROOT/phoenix-firestorm-lgpl-5.1.9.56359-lp150.7.1.x86_64/usr/share/doc/ packages/phoenix-firestorm-lgpl [ 2685s] + exit 0 [ 2685s] error: File not found by glob: /home/abuild/rpmbuild/BUILD/phoenix- firestorm-lgpl/$RPM_BUILD_DIR/phoenix-firestorm-lgpl/build-linux-x86_64/ newview/packaged/*.txt [ 2685s] [ 2685s] [ 2685s] RPM build errors: [ 2685s] File not found by glob: /home/abuild/rpmbuild/BUILD/phoenix- firestorm-lgpl/$RPM_BUILD_DIR/phoenix-firestorm-lgpl/build-linux-x86_64/ newview/packaged/*.txt [ 2685s] [ 2685s] lamb78 failed "build phoenix-firestorm-lgpl.spec" at Sun Sep 23 05:42:03 UTC 2018. On every suse version until now this had worked just fine, but on 15.0 it almost looks as if $RPM_BUILD_DIR is not defined anymore, or as if variables are not expanded anymore at that point. Any ideas? -- Mathias Homann Senior Systems Engineer, IT Consultant. IT Trainer Mathias.Homann@openSUSE.org http://www.tuxonline.tech gpg key fingerprint: 8029 2240 F4DD 7776 E7D2 C042 6B8E 029E 13F2 C102
Hi Mathias, Am Sonntag, 23. September 2018, 10:29:41 CEST schrieb Mathias Homann:
I'm having a really strange packaging issue on Leap 15.0:
the %files se4ction of my spec file fails! here's the part of the spec file in question: %files
%defattr(-,root,root,0755) %doc $RPM_BUILD_DIR/%{_srcname}/build-linux-%{_arch}/newview/packaged/*.txt
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ IMHO this looks wrong. If you need to include documentation into your package, use relative paths. Depending on the structure of your archive, it could mean you use: %doc newview/packaged/*.txt Probably your archive contains more files that the above. Maybe it contains README files, Changelog, NEWS etc.? Depending on what you consider meaningful, you should add them to your %doc section too: %doc README* CHANGELOG ...
/usr/share/applications/* /usr/share/pixmaps/* /usr/games/*
For all three lines you should use the %_datadir macro instead of /usr/share: %_datadir/applications/* %_datadir/pixmaps/* %_datadir/games/* Although it means the same, you should avoid hard-coded paths.
[...] On every suse version until now this had worked just fine, but on 15.0 it almost looks as if $RPM_BUILD_DIR is not defined anymore, or as if variables are not expanded anymore at that point.
I vaguely remember that $RPM_BUILD_DIR should be replaced(?) in favor of the %buildroot macro, but I may be wrong. However, regardless of this issue, you should neither use $RPM_BUILD_DIR nor the %{buildroot} macro inside %doc. I never saw absolute paths in %doc (although it could work, as you proofed it with your previous versions). In 99% you should use the above lines. :) Hope that helps. :) -- Gruß/Regards, Thomas Schraitle ---------------------------------------------------------------------- SUSE LINUX Products GmbH (o< Maxfeldstrasse 5 /\\ Documentation Specialist 90409 Nuernberg, Germany _\_v http://www.suse.com | HRB 21284 SUSE LINUX GmbH, GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Sun, Sep 23, 2018 at 8:46 AM Thomas Schraitle <toms@suse.de> wrote:
Hi Mathias,
Am Sonntag, 23. September 2018, 10:29:41 CEST schrieb Mathias Homann:
I'm having a really strange packaging issue on Leap 15.0:
the %files se4ction of my spec file fails! here's the part of the spec file in question: %files
%defattr(-,root,root,0755) %doc $RPM_BUILD_DIR/%{_srcname}/build-linux-%{_arch}/newview/packaged/*.txt
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IMHO this looks wrong.
If you need to include documentation into your package, use relative paths. Depending on the structure of your archive, it could mean you use:
%doc newview/packaged/*.txt
Probably your archive contains more files that the above. Maybe it contains README files, Changelog, NEWS etc.? Depending on what you consider meaningful, you should add them to your %doc section too:
%doc README* CHANGELOG ...
/usr/share/applications/* /usr/share/pixmaps/* /usr/games/*
For all three lines you should use the %_datadir macro instead of /usr/share:
%_datadir/applications/* %_datadir/pixmaps/* %_datadir/games/*
Although it means the same, you should avoid hard-coded paths.
[...] On every suse version until now this had worked just fine, but on 15.0 it almost looks as if $RPM_BUILD_DIR is not defined anymore, or as if variables are not expanded anymore at that point.
I vaguely remember that $RPM_BUILD_DIR should be replaced(?) in favor of the %buildroot macro, but I may be wrong.
However, regardless of this issue, you should neither use $RPM_BUILD_DIR nor the %{buildroot} macro inside %doc. I never saw absolute paths in %doc (although it could work, as you proofed it with your previous versions). In 99% you should use the above lines. :)
The %doc and %license macros have two different behaviors. If passed an absolute path, that path is relative to %buildroot. If passed a relative path, that path is relative to the working directory set up by %(auto)setup. You should not be able to pass paths that exist outside of this that function. -- 真実はいつも一つ!/ Always, there's only one truth! -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Sunday 2018-09-23 14:46, Thomas Schraitle wrote:
Hi Mathias,
Am Sonntag, 23. September 2018, 10:29:41 CEST schrieb Mathias Homann:
I'm having a really strange packaging issue on Leap 15.0:
the %files se4ction of my spec file fails! here's the part of the spec file in question: %files
%defattr(-,root,root,0755) %doc $RPM_BUILD_DIR/%{_srcname}/build-linux-%{_arch}/newview/packaged/*.txt
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IMHO this looks wrong.
Yeah because someone's (also) trying to use shell vars in a non-shell context. Please, just use macros in general ($RPM_BUILD_DIR -> %_builddir) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
I'm having a really strange packaging issue on Leap 15.0:
the %files se4ction of my spec file fails! here's the part of the spec file in question: %files
%defattr(-,root,root,0755) %doc $RPM_BUILD_DIR/%{_srcname}/build-linux-%{_arch}/newview/packaged/*.txt ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IMHO this looks wrong. Yeah because someone's (also) trying to use shell vars in a non-shell context. Please, just use macros in general ($RPM_BUILD_DIR -> %_builddir)
The interesting bit is that on Leap 42.3 this worked just fine. It just broke when I started building for Leap 15... Cheers MH -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (4)
-
Jan Engelhardt
-
Mathias Homann
-
Neal Gompa
-
Thomas Schraitle