Page 1 of 1

FreedroidRPG and other packages.

PostPosted: Sep 19th, '11, 13:31
by athenian200
I had an interesting experience trying to get this to work on Mageia, because it's not an included package.

A friend of mine first told me that the best way to go about this, was to attempt to recompile SRPMs from Mandriva, but I ran into all kinds of problems, including missing glib-devel and gtk+-devel, which I attempted to compile as well. I started out by trying to compile glib, and I even had to remove mdk-version checks which (for obvious reasons) didn't work. But in the end, the script exited with this error:

+ echo 'Patch #8 (glib_divert.patch):'
Patch #8 (glib_divert.patch):
+ /usr/bin/patch -U -s -p1 -b --suffix .divert --fuzz=0 -i /root/rpmbuild/SOURCES/glib_divert.patch
+ aclocal-1.4
aclocal: macro `_LT_DECL_SED' required but not defined
aclocal: macro `_LT_FUNC_STRIPNAME_CNF' required but not defined
error: Bad exit status from /var/tmp/rpm-tmp.fu667d (%prep)

So, my friend finally broke down and told me how to configure Mageia's urpmi to use Mandriva 10.2 binary RPM repositories instead. I did so, and it worked. I was then instructed to disable them immediately afterwards. However, I'm not sure that this was the right way to go about things. After all, mixing and matching files from different versions of Linux could cause problems.

How bad of an idea is what I was told to do, and what is the right way to go about dealing with packages like this on Mageia in the future? Installing raw source tarballs? Recompiling SRPMs? Something else entirely? My friend seemed to think that installing raw source tarballs was a worse idea than using RPMs from another distribution. I wanted to get some more opinions to be sure.

I'm not sure this counts as a technical question, because I've already got the package working, but I'm wondering in general what is considered best practice.

Re: FreedroidRPG and other packages.

PostPosted: Sep 19th, '11, 14:01
by doktor5000
athenian200 wrote:So, my friend finally broke down and told me how to configure Mageia's urpmi to use Mandriva 10.2 binary RPM repositories instead. I did so, and it worked. I was then instructed to disable them immediately afterwards. However, I'm not sure that this was the right way to go about things. After all, mixing and matching files from different versions of Linux could cause problems.

How bad of an idea is what I was told to do, and what is the right way to go about dealing with packages like this on Mageia in the future? Installing raw source tarballs? Recompiling SRPMs? Something else entirely? My friend seemed to think that installing raw source tarballs was a worse idea than using RPMs from another distribution. I wanted to get some more opinions to be sure.

I'm not sure this counts as a technical question, because I've already got the package working, but I'm wondering in general what is considered best practice.


You got the idea really well, in general it's no good idea to play mix'n'match with packages from different distributions,
even if they are really similar, like Mandriva. This is only a game, so maybe itself doesn't cause much breakage,
but perhaps it needs additional dependencies like system libraries or stuff, which also got installed?

The right way to deal with packages not already included in Mageia is to file a package request:
https://bugs.mageia.org/enter_bug.cgi?p ... mat=guided and choose "New RPM package request" as Component.

Or you could sign up for a mentorship as Mageia packager apprentice. Learning packaging is much fun ;)
http://www.mageia.org/wiki/doku.php?id= ... _mentoring

Re: FreedroidRPG and other packages.

PostPosted: Sep 19th, '11, 16:49
by Akien
I would advise to recompile from scratch instead of using a Mandriva package when it concerns a software with many dependencies.

Of course, compiling software is not an easy task but if you're accustomed to it, it should be way safer for your system.

Re: FreedroidRPG and other packages.

PostPosted: Sep 19th, '11, 19:00
by doktor5000
I'd just urpmi --buildrequires somesoftware.src.rpm and then rpmbuild --rebuild somesoftware.src.rpm
if somesoftware.src.rpm is a Mandriva package. Saves you lots of time and nerves. ;)

Re: FreedroidRPG and other packages.

PostPosted: Sep 21st, '11, 15:51
by athenian200
doktor5000 wrote:I'd just urpmi --buildrequires somesoftware.src.rpm and then rpmbuild --rebuild somesoftware.src.rpm
if somesoftware.src.rpm is a Mandriva package. Saves you lots of time and nerves. ;)


That is exactly what my friend told me to do originally, but it didn't work.

Anyway, I'm responding to let you know that I took a different approach to this problem after all. I uninstalled my old version of FreedroidRPG, and downloaded the sources from the official site. I tried building them, and it worked. Apparently it didn't need a different version of GTK+ or Glib, it was just confused by package name changes. However, instead of just installing them from source, I decided to see if I could make an RPM, so as to facilitate uninstalling or updating it later on. I really didn't want to go outside of the package system.

I started researching it, and found that the main thing I needed to turn a normal tarball package into an RPM was something called a SPEC file. Since I still had the Mandriva SRPM, I extracted the contents and messed with that SPEC file until it worked. I also went ahead and let it use the PNG icon files from the Mandriva package, so it could install to my menu. I had to try and figure out the new names of various dependencies, etc.

The result was an unofficial set of RPMs that install and run on my system. It probably isn't professional enough to be used by you guys, but it would probably work on any other x86_64 computer that doesn't rely on Mesa for OpenGL rendering. Not bad, considering I've never done this before. xD

I may just have to learn how to do this stuff better one day.

Re: FreedroidRPG and other packages.

PostPosted: Sep 21st, '11, 18:23
by Akien
Well, if you're interested in learning packaging, you could join Mageia's packagers team and ask for a mentor: she would help you and review your works until you are approved as a full-fledged packager.
I guess you could even submit FreedroidRPG as your first padawan package :)