Compiling gambas2 in Opensuse Build Server

View: New views
8 Messages — Rating Filter:   Alert me  

Compiling gambas2 in Opensuse Build Server

by Guillermo Ballester Valor :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

As some of you know, I build gambas2 rpms using Opensuse Build Server (OBS).
Since a few days ago, the rpms for latest 'opensuse 11.0' and 'opensuse
factory' cannot be built because a extrange problem.

After the rpm package is built in OBS, a program called 'rpmlint' inspect
carefully a lot of things in the recent built rpm. If the 'badness' is over a
threshold then the rpms are rejected.  

The problem here is that there is a lot of files in the examples tree
directories (all in '.gambas' subdirectories) which references to the
complete path of files at compile time, and of course wrong path when
installed. And rpmlint says this is a bad thing,  and add 10000 points of
badness every time it find these files.  As a result the rpms are over
threshold and failed. :(

Any hint to avoid this?. Are necessary all these files under '.gambas'
directory?

Thanks in advance

Guillermo

--
Guillermo Ballester Valor
gbv@...
http://www.oxixares.com/~gbv
Ogijares, Granada - SPAIN

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gambas-devel mailing list
Gambas-devel@...
https://lists.sourceforge.net/lists/listinfo/gambas-devel

Re: Compiling gambas2 in Opensuse Build Server

by Benoit Minisini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On samedi 14 juin 2008, Guillermo Ballester Valor wrote:

> Hello,
>
> As some of you know, I build gambas2 rpms using Opensuse Build Server
> (OBS). Since a few days ago, the rpms for latest 'opensuse 11.0' and
> 'opensuse factory' cannot be built because a extrange problem.
>
> After the rpm package is built in OBS, a program called 'rpmlint' inspect
> carefully a lot of things in the recent built rpm. If the 'badness' is over
> a threshold then the rpms are rejected.
>
> The problem here is that there is a lot of files in the examples tree
> directories (all in '.gambas' subdirectories) which references to the
> complete path of files at compile time, and of course wrong path when
> installed. And rpmlint says this is a bad thing,  and add 10000 points of
> badness every time it find these files.  As a result the rpms are over
> threshold and failed. :(
>
> Any hint to avoid this?. Are necessary all these files under '.gambas'
> directory?
>
> Thanks in advance
>
> Guillermo

The .gambas directory is the result of the compilation of the project. The
contents is a list of bytecode files, one for each class file.

How can these binary files reference anything? Or I didn't understand what you
wrote.

--
Benoit Minisini

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gambas-devel mailing list
Gambas-devel@...
https://lists.sourceforge.net/lists/listinfo/gambas-devel

Re: Compiling gambas2 in Opensuse Build Server

by Guillermo Ballester Valor :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

El Saturday 14 June 2008 21:42:51 Benoit Minisini escribió:

> On samedi 14 juin 2008, Guillermo Ballester Valor wrote:
> > Hello,
> >
> > As some of you know, I build gambas2 rpms using Opensuse Build Server
> > (OBS). Since a few days ago, the rpms for latest 'opensuse 11.0' and
> > 'opensuse factory' cannot be built because a extrange problem.
> >
> > After the rpm package is built in OBS, a program called 'rpmlint' inspect
> > carefully a lot of things in the recent built rpm. If the 'badness' is
> > over a threshold then the rpms are rejected.
> >
> > The problem here is that there is a lot of files in the examples tree
> > directories (all in '.gambas' subdirectories) which references to the
> > complete path of files at compile time, and of course wrong path when
> > installed. And rpmlint says this is a bad thing,  and add 10000 points of
> > badness every time it find these files.  As a result the rpms are over
> > threshold and failed. :(
> >
> > Any hint to avoid this?. Are necessary all these files under '.gambas'
> > directory?
> >
> > Thanks in advance
> >
> > Guillermo
>
> The .gambas directory is the result of the compilation of the project. The
> contents is a list of bytecode files, one for each class file.
>
> How can these binary files reference anything? Or I didn't understand what
> you wrote.

Yes, some of these files have strings with complete path of files at compile
time. And rpmlint doesn't like it.

Well, see some lines of rpmlint complain:

gambas2-runtime.i586: E: file-contains-buildroot (Badness:
10000) /usr/share/gambas2/examples/Networking/HTTPPost/.gambas/F
gambas2-runtime.i586: E: file-contains-buildroot (Badness:
10000) /usr/share/gambas2/examples/Drawing/Gravity/.gambas/FABOUT

Lets see the latest file 'FABOUT' with hexdump. I show only the interesting
lines

#hexdump -C FABOUT
...
00000500  3c 00 42 00 46 00 46 00  4b 00 4d 00 55 00 59 00  |<.B.F.F.K.M.U.Y.|
00000510  59 00 5e 00 60 00 68 00  6c 00 6c 00 71 00 73 00  |Y.^.`.h.l.l.q.s.|
00000520  7b 00 7f 00 7f 00 84 00  86 00 8e 00 92 00 92 00  |{...............|
00000530  97 00 99 00 a1 00 a7 00  ab 00 b1 00 b1 00 b1 00  |................|
00000540  b1 00 b2 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000550  00 00 00 00 54 00 00 00  2f 76 61 72 2f 74 6d 70  |....T.../var/tmp|
00000560  2f 67 61 6d 62 61 73 32  2d 32 2e 37 2e 30 2d 62  |/gambas2-2.7.0-b|
00000570  75 69 6c 64 2f 75 73 72  2f 73 68 61 72 65 2f 67  |uild/usr/share/g|
00000580  61 6d 62 61 73 32 2f 65  78 61 6d 70 6c 65 73 2f  |ambas2/examples/|
00000590  44 72 61 77 69 6e 67 2f  47 72 61 76 69 74 79 2f  |Drawing/Gravity/|
000005a0  46 41 62 6f 75 74 2e 63  6c 61 73 73 54 01 00 00  |FAbout.classT...|
000005b0  46 41 62 6f 75 74 00 24  6c 6f 61 64 00 42 75 74  |FAbout.$load.But|
000005c0  74 6f 6e 31 5f 43 6c 69  63 6b 00 41 62 6f 75 74  |ton1_Click.About|
.....

Can you see the string '/var/tmp/gambas2-2.7.0-build/'  ?. This is what
rpmlint dislike, because is the buildroot directory at rpm construction time.  

One have to admit that if this complete string points to a needed file, it
will not be found at run time, because that root directory does not exist.
But actually I've just run this gravity example ant it works.

Any light?.

Guillermo


--
Guillermo Ballester Valor
gbv@...
http://www.oxixares.com/~gbv
Ogijares, Granada - SPAIN

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gambas-devel mailing list
Gambas-devel@...
https://lists.sourceforge.net/lists/listinfo/gambas-devel

Re: Compiling gambas2 in Opensuse Build Server

by Guillermo Ballester Valor :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello again,

As a workaround, and I will create the subpackage 'examples' . I think all
examples in a package is a nice thing and it also permit to avoid these
blocking problems not building it in some cases, as 'opensuse 11.0'
and 'opensuse factory'.

Guillermo

--
Guillermo Ballester Valor
gbv@...
http://www.oxixares.com/~gbv
Ogijares, Granada - SPAIN

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gambas-devel mailing list
Gambas-devel@...
https://lists.sourceforge.net/lists/listinfo/gambas-devel

Re: Compiling gambas2 in Opensuse Build Server

by Patrik Karlsson-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

May I suggest to place (for all distro packages) the examples in a
directory where the user can write too. When loading an example, there
is an alert about permits.
--
Patrik Karlsson

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gambas-devel mailing list
Gambas-devel@...
https://lists.sourceforge.net/lists/listinfo/gambas-devel

Re: Compiling gambas2 in Opensuse Build Server

by Benoit Minisini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On dimanche 15 juin 2008, Guillermo Ballester Valor wrote:
> Hello again,
>
> As a workaround, and I will create the subpackage 'examples' . I think all
> examples in a package is a nice thing and it also permit to avoid these
> blocking problems not building it in some cases, as 'opensuse 11.0'
> and 'opensuse factory'.
>
> Guillermo

These paths are the path of class at compile time, and are not used at all by
the interpreter. So I think they could be safely ignored. I will remove them
in the future.

--
Benoit Minisini

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gambas-devel mailing list
Gambas-devel@...
https://lists.sourceforge.net/lists/listinfo/gambas-devel

Re: Compiling gambas2 in Opensuse Build Server

by Benoit Minisini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On dimanche 15 juin 2008, Patrik Karlsson wrote:
> May I suggest to place (for all distro packages) the examples in a
> directory where the user can write too. When loading an example, there
> is an alert about permits.

The examples are installed globally, so it is logical that only root can write
them. If you need to modify an example, you can easily make a copy of them in
your home directory by using the "save as" menu in the IDE.

Regards,

--
Benoit Minisini

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gambas-devel mailing list
Gambas-devel@...
https://lists.sourceforge.net/lists/listinfo/gambas-devel

Re: Compiling gambas2 in Opensuse Build Server

by Guillermo Ballester Valor :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

El Sunday 15 June 2008 17:50:47 Benoit Minisini escribió:

> On dimanche 15 juin 2008, Guillermo Ballester Valor wrote:
> > Hello again,
> >
> > As a workaround, and I will create the subpackage 'examples' . I think
> > all examples in a package is a nice thing and it also permit to avoid
> > these blocking problems not building it in some cases, as 'opensuse 11.0'
> > and 'opensuse factory'.
> >
> > Guillermo
>
> These paths are the path of class at compile time, and are not used at all
> by the interpreter. So I think they could be safely ignored. I will remove
> them in the future.

OK,
 
I've already built the 'examples' packages in all but opensuse 11.0  and
factory. This trick works and now there are 2.7.0 packages for all opensuse
distros.

I'm thinking about  to compress the 'examples' tree directory after install
stage when building rpm, and then to uncompress the tar.bz2 file in
postinstall stage.

I don't know whether it can work and whether rpmlint will be clever enough to
detect the trick.  I think I must try

Guillermo

--
Guillermo Ballester Valor
gbv@...
http://www.oxixares.com/~gbv
Ogijares, Granada - SPAIN

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gambas-devel mailing list
Gambas-devel@...
https://lists.sourceforge.net/lists/listinfo/gambas-devel
LightInTheBox - Buy quality products at wholesale price