Store build_date in .tizen.build-id section to avoid unnecessary rebuilds 88/86088/1 accepted/tizen_3.0.m2_mobile accepted/tizen_3.0.m2_tv accepted/tizen_3.0.m2_wearable accepted/tizen_3.0_common accepted/tizen_3.0_ivi accepted/tizen_3.0_mobile accepted/tizen_3.0_tv accepted/tizen_3.0_wearable accepted/tizen_4.0_unified accepted/tizen_5.0_unified accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix accepted/tizen_common accepted/tizen_ivi accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable tizen_3.0 tizen_3.0.m2 tizen_3.0_tv tizen_4.0 tizen_4.0_tv tizen_5.0 tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix accepted/tizen/3.0.m2/mobile/20170105.025146 accepted/tizen/3.0.m2/tv/20170105.025254 accepted/tizen/3.0.m2/wearable/20170105.025350 accepted/tizen/3.0/common/20161114.111626 accepted/tizen/3.0/ivi/20161011.062305 accepted/tizen/3.0/mobile/20161015.034125 accepted/tizen/3.0/tv/20161016.005712 accepted/tizen/3.0/wearable/20161015.084019 accepted/tizen/4.0/unified/20170816.013612 accepted/tizen/4.0/unified/20170828.221740 accepted/tizen/5.0/unified/20181102.025850 accepted/tizen/5.5/unified/20191031.013631 accepted/tizen/5.5/unified/mobile/hotfix/20201027.072523 accepted/tizen/5.5/unified/wearable/hotfix/20201027.105055 accepted/tizen/common/20160913.170437 accepted/tizen/ivi/20160921.232927 accepted/tizen/mobile/20160921.232913 accepted/tizen/tv/20160921.232921 accepted/tizen/unified/20170309.040430 accepted/tizen/wearable/20160921.232907 submit/tizen/20160913.071022 submit/tizen/20160921.004331 submit/tizen/20161012.094125 submit/tizen/20161012.112025 submit/tizen_3.0.m2/20170104.093754 submit/tizen_3.0_common/20161104.104000 submit/tizen_3.0_ivi/20161010.000006 submit/tizen_3.0_mobile/20161015.000006 submit/tizen_3.0_tv/20161015.000005 submit/tizen_3.0_wearable/20161015.000005 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170828.100007 submit/tizen_5.0/20181101.000008 submit/tizen_5.5/20191031.000008 submit/tizen_5.5_mobile_hotfix/20201026.185108 submit/tizen_5.5_wearable_hotfix/20201026.184308 submit/tizen_unified/20170308.100416 tizen_4.0.IoT.p1_release tizen_4.0.IoT.p2_release tizen_4.0.m1_release tizen_4.0.m2_release tizen_5.5.m2_release
authorJunghyun Kim <jh0822.kim@samsung.com>
Tue, 30 Aug 2016 12:04:36 +0000 (21:04 +0900)
committerJunghyun Kim <jh0822.kim@samsung.com>
Tue, 30 Aug 2016 12:04:36 +0000 (21:04 +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 __DATE__ and __TIME__ which make 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: Iae3d7ecff33b3a85f9052193335cbb73a802a295
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
src/pycurl.c

index a17a23b..1bcd503 100644 (file)
@@ -3410,6 +3410,8 @@ insint_m(PyObject *d, char *name, long value)
     insobj2(d, curlmultiobject_constants, name, v);
 }
 
+__attribute__((__section__(".tizen.build-id")))
+static const char COMPILE_DATE[] = __DATE__ " " __TIME__;
 
 /* Initialization function for the module */
 #if defined(PyMODINIT_FUNC)
@@ -3450,7 +3452,7 @@ initpycurl(void)
 
     /* Add version strings to the module */
     insstr(d, "version", curl_version());
-    insstr(d, "COMPILE_DATE", __DATE__ " " __TIME__);
+    insstr(d, "COMPILE_DATE", COMPILE_DATE);
     insint(d, "COMPILE_PY_VERSION_HEX", PY_VERSION_HEX);
     insint(d, "COMPILE_LIBCURL_VERSION_NUM", LIBCURL_VERSION_NUM);