Hi 

I am using ISAR build system can you help me how to create a recipe for Bluez5
 in ISAR build system

Thanks & Regrads

On Mon, Nov 7, 2022 at 1:55 PM <venkata.pyla@toshiba-tsip.com> wrote:
From: venkata pyla <venkata.pyla@toshiba-tsip.com>

As part of reproducible-build work, one of the problem chosen to solve
is the file time stamps inside rootfs and initramfs are not identical
between two builds.

With the help of reproducible-builds.org and their suggestions, the
above problem can be fixed using 'SOURCE_DATE_EPOCH' variable [2].

In case of rootfs file time-stamps, set all the files and folders that
are newer than 'SOURCE_DATE_EPOCH' and set it to same.
In case of initramfs, regenerate the initramfs image with
'SOURCE_DATE_EPOCH' variable set as the mkinitramfs script is already
taken care of creating reproducible initramfs image when the
variable is set in the environment[3].

The SOURCE_DATE_EPOCH variable should be set to the last modification of
the git repository as explained in the documentation[2].

e.g:
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)

To know more about the reproducible builds and its goals please refer [1].

[1] https://reproducible-builds.org/
[2] https://reproducible-builds.org/docs/source-date-epoch/
[3] https://manpages.debian.org/bullseye/initramfs-tools-core/mkinitramfs.8.en.html#ENVIRONMENT

Signed-off-by: venkata pyla <venkata.pyla@toshiba-tsip.com>
---
 meta/classes/image.bbclass | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index ccff810..c1bb4fd 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -431,6 +431,21 @@ do_rootfs_finalize() {
             "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list"

         rm -f "${ROOTFSDIR}/etc/apt/sources-list"
+
+        # Recreate initramfs inorder to set timestamps to SOURCE_DATE_EPOCH
+        # inorder to make reproducible initramfs
+        test ! -z "${SOURCE_DATE_EPOCH}" && \
+           SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH} chroot "${ROOTFSDIR}" \
+                  update-initramfs -u -v
+
+       # Set timestamp to files inside the rootfs image inorder to make
+       # reproducible rootfs
+       test ! -z "${SOURCE_DATE_EPOCH}" && \
+           find ${ROOTFSDIR} -newermt \
+               "$(date -d@${SOURCE_DATE_EPOCH} '+%Y-%m-%d %H:%M:%S')" \
+               -printf "%y %p\n" \
+               -exec touch '{}' -h -d@${SOURCE_DATE_EPOCH} ';'
+
 EOSUDO
 }
 addtask rootfs_finalize before do_rootfs after do_rootfs_postprocess
--
2.20.1


--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/20221107082503.14774-1-venkata.pyla%40toshiba-tsip.com.


--
Balasubramanian Sundaram 
Firmware Engineer |  Sanmina Tech services |  India, Chennai  |  Desk: +91 044 61309865

CONFIDENTIALITY
This e-mail message and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail message, you are hereby notified that any dissemination, distribution or copying of this e-mail message, and any attachments thereto, is strictly prohibited. If you have received this e-mail message in error, please immediately notify the sender and permanently delete the original and any copies of this email and any prints thereof.
ABSENT AN EXPRESS STATEMENT TO THE CONTRARY HEREINABOVE, THIS E-MAIL IS NOT INTENDED AS A SUBSTITUTE FOR A WRITING. Notwithstanding the Uniform Electronic Transactions Act or the applicability of any other law of similar substance and effect, absent an express statement to the contrary hereinabove, this e-mail message its contents, and any attachments hereto are not intended to represent an offer or acceptance to enter into a contract and are not otherwise intended to bind the sender, Sanmina Corporation (or any of its subsidiaries), or any other person or entity.