Store build_date in .tizen.build-id section to avoid unnecessary rebuilds sandbox/jh0822kim/avoid_rebuilds
authorJunghyun Kim <jh0822.kim@samsung.com>
Tue, 30 Aug 2016 10:36:17 +0000 (19:36 +0900)
committerJunghyun Kim <jh0822.kim@samsung.com>
Tue, 30 Aug 2016 10:36:17 +0000 (19:36 +0900)
- PROBLEM
We use OBS to build packages in Tizen.
There is a mechanism not to rebuild if the result binary is the same.
For example, there is a dependency graph: A->B->C.
If A is modified, B would be built.
If the result RPM of B is not changed, OBS does not trigger a build of C.
To effectively use this mechanism, each packages make sure that
the result binary should be the same if the input source is the same.

This package uses @BUILD_TIMESTAMP@ in Makefile.
This makes the result binary is different everytime it is built.
To efficiently utilize OBS build mechanism and to modify the package
as little as possible, I propose to store this macro in .tizen.build-id
section. OBS build-compare tool does not check *.build-id section
in the binary.

Change-Id: I07a160e6e3c342ab9bdc6594d82b1df0cce5a71f
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
src/sysutils.c

index 0eb5d1c..4c0a639 100644 (file)
@@ -42,6 +42,7 @@
 const char *
 _assuan_sysutils_blurb (void)
 {
+  __attribute__((__section__(".tizen.build-id")))
   static const char blurb[] =
     "\n\n"
     "This is Libassuan " PACKAGE_VERSION " - The GnuPG IPC Library\n"