Mailinglist Archive: opensuse-buildservice (327 mails)

< Previous Next >
Re: [opensuse-buildservice] Feature request: redefine __DATE__ and __TIME__ macros
El 05/04/11 04:25, Michal Vyskocil escribió:
Hi,

during a build of openjdk I got the following error

java-1_6_0-openjdk.x86_64: W: file-contains-date-and-time
/usr/lib64/jvm/java-1.6.0-openjdk-1.6.0/jre/lib/amd64/server/libjvm.so
Your file uses __DATE and __TIME__ this causes the package to rebuild
when
not needed

I assume the correct fix would be redefine them by the actual commit
date and time. Maybe Build Service should define __commit_date
and __commit_time macros, which would be used in CFLAGS. And in ideal
case both can be redefined in default %optflags, like this

'%{?__commit_date:-D__DATE__=%__commit_date}' \
'%{?__commit_time:-D__TIME__=%__commit_time}'

What do you think?

Well, yeah, that is one of the fronts to attack, in some bug report that
I can't find now, I proposed other alternatives to workaround the issue...

Still there are other sources of unneded rebuilds/republish, more precisely

- there is software that include the output of "uname -a" in binaries,
every build hosts returns different information.
My suggestion is to push a fake uname(1) into the buildroots,that always
return the same information, though with the appropiate arch.

- Other software includes the current username and host where the build
was made, the "hostname" part of course depends on what host is being
used by the OBS

--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
References