[opensuse-packaging] Force specific Lua version as build requirement
Hello, how do I force a specific Lua version as build requirement independently of the used openSUSE version? In Tumbleweed, 13.2, etc. the Lua package contains version 5.2. In Factory the Lua package provides version 5.3. However, the programm I want to package needs version 5.2. Using ------ BuildRequires: lua BuildRequires: lua-devel ------ works for Tumbleweed, 13.2, etc. but not for Factory. In contrast ------ BuildRequires: lua52 BuildRequires: lua52-devel ------ works only with Factory because these package are not available in the other openSUSE versions. I first tried to distinguish between Factory and Tumbleweed but that seems to be impossible. Is that correct? I also tried to query the Lua version but since subshell expansions don't work in OBS for BuildRequires (see https://en.opensuse.org/openSUSE:Specfile_guidelines#OBS_Caveat) I was not successful. My solution is now to use lua52 and lua52-devel as build requirements and to include the repository devel:languages:lua to Tumbleweed, 13.2, etc. to have packages with that name. This seems to work (see https://build.opensuse.org/package/show/home:greenbasilisk:branches:graphics...) but I don't know if that is an appropriate solution. Heinz -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hi, lua 5.3 arrives in TW 20150723, so you can cat /etc/os-release to distinguish when you have lua-devel = 5.3.1 and lua52-devel and when you have lua-devel = 5.2.4 %define lua53_ready %(cat /etc/os-release | grep XXX | sed 's/XXX/YYY/') %if %{?suse_version} > 1320 %if %{?lua53_ready} >= 20150723 BuildRequires: lua52-devel %else BuildRequires: lua-devel %endif Something like that. Marguerite 发自我的 iPhone
在 2015年7月26日,16:05,Green Basilisk <hzhr+os@mailbox.org> 写道:
Hello,
how do I force a specific Lua version as build requirement independently of the used openSUSE version?
In Tumbleweed, 13.2, etc. the Lua package contains version 5.2. In Factory the Lua package provides version 5.3. However, the programm I want to package needs version 5.2. Using ------ BuildRequires: lua BuildRequires: lua-devel ------ works for Tumbleweed, 13.2, etc. but not for Factory. In contrast ------ BuildRequires: lua52 BuildRequires: lua52-devel ------ works only with Factory because these package are not available in the other openSUSE versions.
I first tried to distinguish between Factory and Tumbleweed but that seems to be impossible. Is that correct? I also tried to query the Lua version but since subshell expansions don't work in OBS for BuildRequires (see https://en.opensuse.org/openSUSE:Specfile_guidelines#OBS_Caveat) I was not successful. My solution is now to use lua52 and lua52-devel as build requirements and to include the repository devel:languages:lua to Tumbleweed, 13.2, etc. to have packages with that name. This seems to work (see https://build.opensuse.org/package/show/home:greenbasilisk:branches:graphics...) but I don't know if that is an appropriate solution.
Heinz -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
marguerite <i@marguerite.su> writes:
%define lua53_ready %(cat /etc/os-release | grep XXX | sed 's/XXX/YYY/') It seems that /etc/os-release does not exist. I chrooted with osc chroot openSUSE_Tumbleweed x86_64 and didn't find the file.
%if %{?suse_version} > 1320 %if %{?lua53_ready} >= 20150723 BuildRequires: lua52-devel %else BuildRequires: lua-devel %endif I tried something similar: %define luaversion %(lua -e 'print(_VERSION)' | cut -d ' ' -f 2) but the problems seems to be the limited expansion of macros in OBS in case of build requirements. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Am 26.07.2015 um 10:48 schrieb marguerite:
%define lua53_ready %(cat /etc/os-release | grep XXX | sed 's/XXX/YYY/')
This looks wrong, is that the way to distinguish betwen 13.2 and TW? IMO if a package (or capability) appeared in TW after 13.2 then "if suse_version > 1320" is the way to check for that. Simply because there is no way to go back to a state between now and 13.2. Olaf -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hello Heinz, Am Sonntag, 26. Juli 2015, 10:05:26 schrieb Green Basilisk:
how do I force a specific Lua version as build requirement independently of the used openSUSE version?
In Tumbleweed, 13.2, etc. the Lua package contains version 5.2. In Factory the Lua package provides version 5.3. However, the programm I want to package needs version 5.2. Using ------ BuildRequires: lua BuildRequires: lua-devel ------
I think BuildRequires: lua <=5.2 and similar should work You may need to distinguish by Version, e.g.: %if 0%{?suse_version} > 1320 # what happens here? %endif HTH Axel -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Sorry for messing up that thread but I didn't reply to all. Axel Braun <axel.braun@gmx.de> writes:
Am Sonntag, 26. Juli 2015, 11:50:38 schrieben Sie:
Axel Braun <axel.braun@gmx.de> writes:
I think BuildRequires: lua <=5.2 and similar should work
This was also my first approach. It fails because in Factory the lua package is only available in version 5.3.
Valid reason :-) Did you try to branch lua 5.2 into your project? The build should pick this up then. Probably not the most advanced solution, but should work Isn't that the same/similar as calling osc meta -e prj and adding such lines as <path project="devel:languages:lua" repository="openSUSE_13.2"/> ?
You may need to distinguish by Version, e.g.: %if 0%{?suse_version} > 1320 # what happens here? %endif
I have also to distinguish between Tumbleweed and Factory. I found no suse_version for them.
I dont know thenm by head either :-) Does echo {?suse_version} or similar work? echo %{?suse_version} works but Tumbleweed and Factory have version 1321.
-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hello, I think the problem vanished because now Tumbleweed and Factory are aligned in terms of Lua versions. :) However, doesn't it make sense to add provides: lua53 to the Lua package to avoid this hassle in future? Heinz -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Mon, Jul 27, 2015 at 5:42 PM, Green Basilisk <hzhr+os@mailbox.org> wrote:
Hello,
I think the problem vanished because now Tumbleweed and Factory are aligned in terms of Lua versions. :)
That happens all the time actually. It's mostly packagers' job to either adapt to the newer dependencies or find a way to use the older ones.
However, doesn't it make sense to add provides: lua53 to the Lua package to avoid this hassle in future?
Maybe: Provides: Lua(API) = 5.3 Conflicts: Lua(API) < 5.3 Provides: Lua(devel) = 5.3 Conflicts: Lua(devel) < 5.3 and using update-alternatives to provide /usr/bin/lua might work. Marguerite -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Sun, 26 Jul 2015 10:05:26 +0200 Green Basilisk <hzhr+os@mailbox.org> wrote:
Hello,
how do I force a specific Lua version as build requirement independently of the used openSUSE version?
In Tumbleweed, 13.2, etc. the Lua package contains version 5.2. In Factory the Lua package provides version 5.3. However, the programm I want to package needs version 5.2. Using ------ BuildRequires: lua BuildRequires: lua-devel ------ works for Tumbleweed, 13.2, etc. but not for Factory. In contrast ------ BuildRequires: lua52 BuildRequires: lua52-devel ------ works only with Factory because these package are not available in the other openSUSE versions.
I first tried to distinguish between Factory and Tumbleweed but that seems to be impossible. Is that correct? I also tried to query the Lua version but since subshell expansions don't work in OBS for BuildRequires (see https://en.opensuse.org/openSUSE:Specfile_guidelines#OBS_Caveat) I was not successful. My solution is now to use lua52 and lua52-devel as build requirements and to include the repository devel:languages:lua to Tumbleweed, 13.2, etc. to have packages with that name. This seems to work (see https://build.opensuse.org/package/show/home:greenbasilisk:branches:graphics...) but I don't know if that is an appropriate solution.
%if 0%{?suse_version} && (0%{?suse_version} > 1210 && 0%{?suse_version} < 1321) BuildRequires: lua-devel %else BuildRequires: lua52-devel %endif Is what I prepared for my darktables update. darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Marcus Rückert <darix@opensu.se> writes:
%if 0%{?suse_version} && (0%{?suse_version} > 1210 && 0%{?suse_version} < 1321) BuildRequires: lua-devel %else BuildRequires: lua52-devel %endif
Thank you! I use that snippet now. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Tue 28 Jul 2015 08:39:04 PM CDT, Green Basilisk wrote:
Marcus Rückert <darix@opensu.se> writes:
%if 0%{?suse_version} && (0%{?suse_version} > 1210 && 0%{?suse_version} < 1321) BuildRequires: lua-devel %else BuildRequires: lua52-devel %endif
Thank you! I use that snippet now.
Hi I would think using a BuildRequires on pkconfig(lua) >= 5.2 would be a better option and can remove you conditions or use other permutations of == < etc... -- Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890) SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel 3.12.43-52.6-default up 1:08, 3 users, load average: 0.55, 0.48, 0.45 CPU AMD A4-5150M APU @ 3.3GHz | GPU Richland Radeon HD 8350G -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (7)
-
Axel Braun
-
Green Basilisk
-
Malcolm
-
Marcus Rückert
-
marguerite
-
Marguerite Su
-
Olaf Hering