Guido Berhoerster wrote:
* Ludwig Nussel <ludwig.nussel@suse.de> [2011-05-23 09:08]:
Should we assign some badness value to this warning ie make it an error? There are currently 118 packages in Factory with file-contains-date-and-time.
No, not in its current state which produces false positives. I use a hack to replace __DATE__ and __TIME__ with the date and time extracted from the .changes file:
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")" DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\"" TIME="\"$(date -d "${modified}" "+%%R")\"" find . -name '*.[ch]' -print0 |\ xargs -0 sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g"
This has the advantage that the application will still have some halfway useful date and time information where it expects it. Unfortunately rpmlint still complains at least for the first build because it checks for the current date in the binary.
Avoiding false positives about the time could probably be fixed by providing the time stamp of the build start to rpmlint. Fixing the warning about the date isn't easily possible though unless we build packages always only the day after the last change :-) cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org