[opensuse-buildservice] Conventions for game packages
Hello, I have been advised to use these conventions when packaging games: http://en.opensuse.org/Packaging/Games and have the following questions about the package splitting between base and game data: 1) Is it necessary to always put the data in a separate package ? Is there a maximum size (ex: < 10MB) for which it is okay to keep it as one single package ? Because if many small games have data packages, it will easily "spam" the package list. This info should be added on that wiki page (I can do that if someone can confirm). 2) How to handle the mentionned "bugfixes" updates ? If the upstream tar archive has changed, OBS will anyway rebuild both the base and data packages, if there is only one spec file. So after this it all depends on how the user chooses to do the update. But for the user it might also not be clear whether the data package needs to be updated as well. I guess this could be enforced using version numbers in the Require tag. What do you think ? 3) How is the Requires dependency applied ? I guess the base package requires the data package. Is it possible to make the data package require the base one at the same time ? (double-dependency) Thanks, Vincent -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Vincent Petry wrote:
Hello,
I have been advised to use these conventions when packaging games: http://en.opensuse.org/Packaging/Games
and have the following questions about the package splitting between base and game data: 1) Is it necessary to always put the data in a separate package ? Is there a maximum size (ex: < 10MB) for which it is okay to keep it as one single package ? Because if many small games have data packages, it will easily "spam" the package list. This info should be added on that wiki page (I can do that if someone can confirm).
There is no maximum size chosen yet, but use your common sense. We could pick some particular value, but there still would be some exceptions.
2) How to handle the mentionned "bugfixes" updates ? If the upstream tar archive has changed, OBS will anyway rebuild both the base and data packages, if there is only one spec file. So after this it all depends on how the user chooses to do the update. But for the user it might also not be clear whether the data package needs to be updated as well. I guess this could be enforced using version numbers in the Require tag. What do you think ?
You should use versions in Require tags. If you know that game with version 1.3.3 works with data of a version 1.2 or later , you could use the following scheme: game.spec Version: 1.3.3 Requires: game-data >= 1.2 game-data.spec Version: 1.2 Requires: game >= 1.2
3) How is the Requires dependency applied ? I guess the base package requires the data package. Is it possible to make the data package require the base one at the same time ? (double-dependency)
It is possible to make double-dependency and you should use it (see the example above). -- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o openSUSE Community Multiplier Team Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9, CR prusnak[at]suse.cz http://www.suse.cz -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hi, Other related questions to game packaging: 1) Currently I'm packaging a game (let's call it "thegame") that only has one thegame.tar.gz archive, containing the source files and data files. I've written a shell script that splits that file into two separate thegame.tar.bz2 files and thegame-data.tar.bz2. I included the shell script in the package sources for convenience. I assume that it's a common practice. Can you confirm this ? 2) When splitting the package, should I create one single package in OBS containing both spec files (thegame.spec and thegame-data.spec), or rather use two separate OBS packages "thegame" and "thegame-data", each one with a single spec file ? 3) If there are two spec files for one single OBS package "thegame", will the rebuilding of a package depended upon (ex: libSDL) affect/trigger only the one spec file "thegame" or both "thegame" and "thegame-data", given that only "thegame" depends on "libSDL" ? 4) In the spec file for the data packages, the name is like "thegame-data", but the target directory is still "/usr/share/thegame". I can't use the %{name} macro in the "thegame-data" spec file since its value is "thegame-data", so I tried to add a macro at the beginning of the spec file with "%define basename thegame", and specify the target directory as "/usr/share/%{basename}. But it doesn't work, the value of %{basename} is always empty. I tried to define it at the top of the spec file, and also in the %prep part, but it doesn't work. Same thing if I use "%global basename thegame". What did I do wrong ? Thanks, Vincent Pavol Rusnak a écrit :
Vincent Petry wrote:
Hello,
I have been advised to use these conventions when packaging games: http://en.opensuse.org/Packaging/Games
and have the following questions about the package splitting between base and game data: 1) Is it necessary to always put the data in a separate package ? Is there a maximum size (ex: < 10MB) for which it is okay to keep it as one single package ? Because if many small games have data packages, it will easily "spam" the package list. This info should be added on that wiki page (I can do that if someone can confirm).
There is no maximum size chosen yet, but use your common sense. We could pick some particular value, but there still would be some exceptions.
2) How to handle the mentionned "bugfixes" updates ? If the upstream tar archive has changed, OBS will anyway rebuild both the base and data packages, if there is only one spec file. So after this it all depends on how the user chooses to do the update. But for the user it might also not be clear whether the data package needs to be updated as well. I guess this could be enforced using version numbers in the Require tag. What do you think ?
You should use versions in Require tags. If you know that game with version 1.3.3 works with data of a version 1.2 or later , you could use the following scheme:
game.spec
Version: 1.3.3 Requires: game-data >= 1.2
game-data.spec
Version: 1.2 Requires: game >= 1.2
3) How is the Requires dependency applied ? I guess the base package requires the data package. Is it possible to make the data package require the base one at the same time ? (double-dependency)
It is possible to make double-dependency and you should use it (see the example above).
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hi Vincent, Am Sonntag 26 Juli 2009 14:16:56 wrote Vincent Petry:
Hi,
Other related questions to game packaging: 1) Currently I'm packaging a game (let's call it "thegame") that only has one thegame.tar.gz archive, containing the source files and data files. I've written a shell script that splits that file into two separate thegame.tar.bz2 files and thegame-data.tar.bz2. I included the shell script in the package sources for convenience. I assume that it's a common practice. Can you confirm this ?
2) When splitting the package, should I create one single package in OBS containing both spec files (thegame.spec and thegame-data.spec), or rather use two separate OBS packages "thegame" and "thegame-data", each one with a single spec file ? You don't must split the tar.bz2 into 2 or more different tars. You can use one Source and can split the Package into different Packages. As Example i've attached an Spec.
HTH Sascha -- Sincerely yours Sascha Manns openSUSE Ambassador openSUSE Marketing Team openSUSE Build Service Web: http://saschamanns.gulli.to Project-Blog: http://lizards.opensuse.org/author/saigkill Private-Blog: http://saschasbacktrace.blogspot.com
Am Sonntag 26 Juli 2009 16:55:21 wrote Sascha 'saigkill' Manns:
Hi Vincent,
Am Sonntag 26 Juli 2009 14:16:56 wrote Vincent Petry:
Hi,
Other related questions to game packaging: 1) Currently I'm packaging a game (let's call it "thegame") that only has one thegame.tar.gz archive, containing the source files and data files. I've written a shell script that splits that file into two separate thegame.tar.bz2 files and thegame-data.tar.bz2. I included the shell script in the package sources for convenience. I assume that it's a common practice. Can you confirm this ?
2) When splitting the package, should I create one single package in OBS containing both spec files (thegame.spec and thegame-data.spec), or rather use two separate OBS packages "thegame" and "thegame-data", each one with a single spec file ?
You don't must split the tar.bz2 into 2 or more different tars. You can use one Source and can split the Package into different Packages. As Example i've attached an Spec.
HTH Sascha Excuse me i have it misunderstood. As the Conventionsite says, it is better to make two tarballs ... -- Sincerely yours
Sascha Manns openSUSE Ambassador openSUSE Marketing Team openSUSE Build Service Web: http://saschamanns.gulli.to Project-Blog: http://lizards.opensuse.org/author/saigkill Private-Blog: http://saschasbacktrace.blogspot.com
Sascha 'saigkill' Manns wrote:
Excuse me i have it misunderstood. As the Conventionsite says, it is better to make two tarballs ...
I can't find it in the conventions. Could you please point to the specific article ? -- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o openSUSE Community Multiplier Team Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9, CR prusnak[at]suse.cz http://www.suse.cz -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Am Montag 03 August 2009 11:59:08 wrote Pavol Rusnak:
Sascha 'saigkill' Manns wrote:
Excuse me i have it misunderstood. As the Conventionsite says, it is better to make two tarballs ...
I can't find it in the conventions. Could you please point to the specific article ? http://en.opensuse.org/Packaging/Games. Point "Package game files and data files separately, if possible, to reduce size of bugfix updates. This must be done if upstream packages game data in separate tarballs. "
-- Sincerely yours Sascha Manns openSUSE Ambassador openSUSE Marketing Team openSUSE Build Service Web: http://saschamanns.gulli.to Project-Blog: http://lizards.opensuse.org/author/saigkill Private-Blog: http://saschasbacktrace.blogspot.com
Sascha 'saigkill' Manns wrote:
Am Montag 03 August 2009 11:59:08 wrote Pavol Rusnak:
Sascha 'saigkill' Manns wrote:
Excuse me i have it misunderstood. As the Conventionsite says, it is better to make two tarballs ... I can't find it in the conventions. Could you please point to the specific article ? http://en.opensuse.org/Packaging/Games. Point "Package game files and data files separately, if possible, to reduce size of bugfix updates. This must be done if upstream packages game data in separate tarballs. "
This does not say anything about splitting upstream tarballs. -- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o openSUSE Community Multiplier Team Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9, CR prusnak[at]suse.cz http://www.suse.cz -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Vincent Petry wrote:
Hi,
Other related questions to game packaging: 1) Currently I'm packaging a game (let's call it "thegame") that only has one thegame.tar.gz archive, containing the source files and data files. I've written a shell script that splits that file into two separate thegame.tar.bz2 files and thegame-data.tar.bz2. I included the shell script in the package sources for convenience. I assume that it's a common practice. Can you confirm this ?
Well, not really. You don't have to split the upstream tarball into game and game-data. It is only important to create two packages (one for the game and one for the data).
2) When splitting the package, should I create one single package in OBS containing both spec files (thegame.spec and thegame-data.spec), or rather use two separate OBS packages "thegame" and "thegame-data", each one with a single spec file ?
Your choice. If you use one package with two specs, you'd still need to create game-data package and create a link to the first package. (OBS discovers only packagename.spec file while building).
3) If there are two spec files for one single OBS package "thegame", will the rebuilding of a package depended upon (ex: libSDL) affect/trigger only the one spec file "thegame" or both "thegame" and "thegame-data", given that only "thegame" depends on "libSDL" ?
See the point above. You still need to create a link package if you use two specs in one package.
4) In the spec file for the data packages, the name is like "thegame-data", but the target directory is still "/usr/share/thegame". I can't use the %{name} macro in the "thegame-data" spec file since its value is "thegame-data", so I tried to add a macro at the beginning of the spec file with "%define basename thegame", and specify the target directory as "/usr/share/%{basename}. But it doesn't work, the value of %{basename} is always empty. I tried to define it at the top of the spec file, and also in the %prep part, but it doesn't work. Same thing if I use "%global basename thegame". What did I do wrong ?
Defining the macro somewhere at the beginning of the file should work. (%define basename thegame). I'm not sure what is causing the problem. Maybe the basename macro is reserved for something else. Try using another name for the macro (e.g. gamename). If it still fails, please send me a spec file (or link to OBS). Thanks! -- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o openSUSE Community Multiplier Team Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9, CR prusnak[at]suse.cz http://www.suse.cz -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Pavol, After trying it out I figured out the things you mentionned: that only one spec file is considered by OBS. So I finally decided to split the package in two OBS packages, each one containing a separate tarball and spec files. I think it will also make it easier when uploading the upstream tarball if for example only the code has changed, and not the data. For the %define, it looks like it doesn't allow to define macro names that don't start with an underscore. I replaced it with %define _basename and it worked. Thanks anyway for your answers. Vincent Petry Pavol Rusnak a écrit :
Vincent Petry wrote:
Hi,
Other related questions to game packaging: 1) Currently I'm packaging a game (let's call it "thegame") that only has one thegame.tar.gz archive, containing the source files and data files. I've written a shell script that splits that file into two separate thegame.tar.bz2 files and thegame-data.tar.bz2. I included the shell script in the package sources for convenience. I assume that it's a common practice. Can you confirm this ?
Well, not really. You don't have to split the upstream tarball into game and game-data. It is only important to create two packages (one for the game and one for the data).
2) When splitting the package, should I create one single package in OBS containing both spec files (thegame.spec and thegame-data.spec), or rather use two separate OBS packages "thegame" and "thegame-data", each one with a single spec file ?
Your choice. If you use one package with two specs, you'd still need to create game-data package and create a link to the first package. (OBS discovers only packagename.spec file while building).
3) If there are two spec files for one single OBS package "thegame", will the rebuilding of a package depended upon (ex: libSDL) affect/trigger only the one spec file "thegame" or both "thegame" and "thegame-data", given that only "thegame" depends on "libSDL" ?
See the point above. You still need to create a link package if you use two specs in one package.
4) In the spec file for the data packages, the name is like "thegame-data", but the target directory is still "/usr/share/thegame". I can't use the %{name} macro in the "thegame-data" spec file since its value is "thegame-data", so I tried to add a macro at the beginning of the spec file with "%define basename thegame", and specify the target directory as "/usr/share/%{basename}. But it doesn't work, the value of %{basename} is always empty. I tried to define it at the top of the spec file, and also in the %prep part, but it doesn't work. Same thing if I use "%global basename thegame". What did I do wrong ?
Defining the macro somewhere at the beginning of the file should work. (%define basename thegame). I'm not sure what is causing the problem. Maybe the basename macro is reserved for something else. Try using another name for the macro (e.g. gamename). If it still fails, please send me a spec file (or link to OBS).
Thanks!
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkp28xsACgkQSSdxpfEEQEyOmQCgiufnVY1gvgSWSp/YrHys0mWp w/MAoJgrboA8LnombtrfYNLL2q6iCA9j =k9bC -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (3)
-
Pavol Rusnak
-
Sascha 'saigkill' Manns
-
Vincent Petry