[opensuse-packaging] Build different package versions for different openSUSE release
Hi all, Now I'm trying to update Sugar [1] packages. Because latest version of Sugar depends on GTK 3.0, I would like to remain old versions there for SLE_11, 11.4 and 12.1, and only update packages for 12.2 and Factory. I have thought out several options to achieve this: 1. check suse_version in spec files 2. create a separate project specifically for 12.2 3. create another package, with different package name but will build same rpm, and then only enable it for 12.2 I'm not sure which one is the best practice, could someone figure me out? Thanks, [1] https://build.opensuse.org/project/show?project=X11%3ASugar -- Xin Wang (http://dram.me/) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
在 2012-08-18六的 08:38 +0800,Xin Wang写道:
Hi all,
Now I'm trying to update Sugar [1] packages. Because latest version of Sugar depends on GTK 3.0, I would like to remain old versions there for SLE_11, 11.4 and 12.1, and only update packages for 12.2 and Factory. I have thought out several options to achieve this:
1. check suse_version in spec files 2. create a separate project specifically for 12.2 3. create another package, with different package name but will build same rpm, and then only enable it for 12.2
I'm not sure which one is the best practice, could someone figure me out?
Thanks,
[1] https://build.opensuse.org/project/show?project=X11%3ASugar
-- Xin Wang (http://dram.me/)
You can add : ----------------------------- %if %{defined suse_version} %if %{undefined suse_version} ----------------------------- Such as: ------------------------------ %if 0%{?suse_version} <suse stuff here> %else <other distros> %endif ------------------------------ or: ------------------------------ %if 0%{?suse_version} >= 1220 <suse version >= 12.2 stuff here> %else <other version> %endif ------------------------------ Please see more at http://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto or http://zh.opensuse.org/openSUSE:Build_Service_cross_distribution_howto (Chinese) These is a full example : https://build.opensuse.org/package/files?package=fcitx&project=home% 3Ahillwood -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
2012/8/18 hillwood <hillwoodroc@gmail.com>:
在 2012-08-18六的 08:38 +0800,Xin Wang写道:
Hi all,
Now I'm trying to update Sugar [1] packages. Because latest version of Sugar depends on GTK 3.0, I would like to remain old versions there for SLE_11, 11.4 and 12.1, and only update packages for 12.2 and Factory. I have thought out several options to achieve this:
1. check suse_version in spec files 2. create a separate project specifically for 12.2 3. create another package, with different package name but will build same rpm, and then only enable it for 12.2
I'm not sure which one is the best practice, could someone figure me out?
Thanks,
[1] https://build.opensuse.org/project/show?project=X11%3ASugar
-- Xin Wang (http://dram.me/)
You can add : ----------------------------- %if %{defined suse_version} %if %{undefined suse_version} -----------------------------
Such as: ------------------------------ %if 0%{?suse_version} <suse stuff here> %else <other distros> %endif ------------------------------
or: ------------------------------ %if 0%{?suse_version} >= 1220 <suse version >= 12.2 stuff here> %else <other version> %endif ------------------------------
Please see more at http://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto or http://zh.opensuse.org/openSUSE:Build_Service_cross_distribution_howto (Chinese)
These is a full example : https://build.opensuse.org/package/files?package=fcitx&project=home% 3Ahillwood
Thanks. Spreading 'if-else' in spec file will make it a bit ugly and hard to maintain. Well, if it is the best choice, I'll have a try.
-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
-- Xin Wang (http://dram.me/) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Xin Wang wrote:
Hi all,
Now I'm trying to update Sugar [1] packages. Because latest version of Sugar depends on GTK 3.0, I would like to remain old versions there for SLE_11, 11.4 and 12.1, and only update packages for 12.2 and Factory. I have thought out several options to achieve this:
1. check suse_version in spec files 2. create a separate project specifically for 12.2 3. create another package, with different package name but will build same rpm, and then only enable it for 12.2
I'm not sure which one is the best practice, could someone figure me out?
As for me, I use 3-rd option to build kernel drivers for CODE10 and CODE11 separately. CODE10 and CODE11 are some kind of nicknames for SLES10 and SLES11 and different openSUSE versions. The essense is that I have to have different spec-files for CODE10 and CODE11. In your case you have to have different spec- and different sources, as far as I understand you. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
2012/8/18 Matwey V. Kornilov <matwey.kornilov@gmail.com>:
Xin Wang wrote:
Hi all,
Now I'm trying to update Sugar [1] packages. Because latest version of Sugar depends on GTK 3.0, I would like to remain old versions there for SLE_11, 11.4 and 12.1, and only update packages for 12.2 and Factory. I have thought out several options to achieve this:
1. check suse_version in spec files 2. create a separate project specifically for 12.2 3. create another package, with different package name but will build same rpm, and then only enable it for 12.2
I'm not sure which one is the best practice, could someone figure me out?
As for me, I use 3-rd option to build kernel drivers for CODE10 and CODE11 separately. CODE10 and CODE11 are some kind of nicknames for SLES10 and SLES11 and different openSUSE versions. The essense is that I have to have different spec-files for CODE10 and CODE11.
In your case you have to have different spec- and different sources, as far as I understand you.
Yes, different specfile and source is needed if I go to maintain both versions. Now I choose another way. Because I will not package update for old opensuse versions, I disable build of all packages for those repos, but previously built packages will still be published.
-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
-- Xin Wang (http://dram.me/) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (3)
-
hillwood
-
Matwey V. Kornilov
-
Xin Wang