Exact revision numbers in bugreports (was Re: pre-releases of rc1)

Lubos Lunak l.lunak at suse.cz
Mon Jun 29 20:05:55 BST 2009


On Monday 29 of June 2009, Thiago Macieira wrote:
> Em Segunda-feira 29 Junho 2009, às 16:52:59, Lubos Lunak escreveu:
> > On Monday 29 of June 2009, Pierre Schmitz wrote:
> > > If there would be a way to have drkonqi sent the build date or even
> > > better the svn revision number this "problem" would be solved.
> >
> >  Piece of cake :). Copy e.g. your libkdecore.so.5.3.0 somewhere and do:
> >
> > $ echo -n 'r1234567' >r.txt
> > $ objcopy libkdecore.so.5.3.0
> > libkdecore.so.5.3.0.tmp --add-section .note.kde=r.txt
> > $ mv libkdecore.so.5.3.0.tmp libkdecore.so.5.3.0
> >
> >  Now the binary has the given revision number recorded in it as a
> > separate section. To print it, 'objdump -s -j .note.kde
> > libkdecore.so.5.3.0', and cut out only the relevant part.
>
> It can also be done by writing the revision number to a .h.cmake header,
> then having:
>
> static const char kderevision[] __attribute__((section(".note.kde"))) =
> 	KDE_REVISION;
>
> This works on non-ELF systems, but it requires GCC.

 But how do you easily make sure it ends up in every binary (meaning libraries 
and modules too)?

-- 
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o.   e-mail: l.lunak at suse.cz , l.lunak at kde.org
Lihovarska 1060/12   tel: +420 284 028 972
190 00 Prague 9      fax: +420 284 028 951
Czech Republic       http://www.suse.cz




More information about the kde-core-devel mailing list