From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6662603229503684608 X-Received: by 2002:a7b:c3d8:: with SMTP id t24mr160424wmj.6.1551258198714; Wed, 27 Feb 2019 01:03:18 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:f107:: with SMTP id p7ls83067wmh.6.canary-gmail; Wed, 27 Feb 2019 01:03:18 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia18U6qHUS+B+bIXiB4XoH2G3vPs6h4P4eMDmLupit0kP04aNXWr2Jd8VMLhE/PXQqKCO7E X-Received: by 2002:a1c:6c15:: with SMTP id h21mr157782wmc.10.1551258198307; Wed, 27 Feb 2019 01:03:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551258198; cv=none; d=google.com; s=arc-20160816; b=gSb8BNOPMF+33ybUZyHeSFvBAjMe+eYVn8kajBF4eG3NgcaFzM16LycQfTR6CLBetK 5yKBZ2NQifbcJX9gc3SzE2MbXa/GYk3J8LGtKa2T4CgfirYLy7xhMEGIK4PrVFIAEtG0 p7jFNX7+ocFevCSPjLtgeE/mLqDFfpDr6AG6DzImpJL/ZdeV/fbN/LAqyxZdQJ6KyRHW ewaPDvP30WeeXj1iAUunHXJKsoOMJQ5MbAlkhsqSLnH/z85kHqUJed1pR8lksoGTfj31 00MpH2qNeXnaM7uYci8P0sJyKodX6f7QDlKVdJj7Ftp0p1PrdHvhuC1yFa6qVy7r3Jz1 3zBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:subject:cc:to:from; bh=mYg8ZHGwjXGtsvBUfeer+EN8YzQiKNneD7fFGiqC5b4=; b=NMVqoC2+zQ+M4wEtWco63tDyikXOF4yR2Br63Tzx2NwYz8iwFi8KpCdI144TlxI3p/ zOKryY6HQs3teTVF2vgYV0NJw5hfezhRikwTR27CAT1eRlhxM6QQrBbLMzdWeAiuR1vp 5TUyvOdhImgphkF10QcpoOpcK5T7/Qqo6K5sstlGP4himClY/AT86wBlPTrCjH6pL+xq 8zA1zYAGiITcjVjjz68hCH0SSuwD11NmKxbd+TkNRlKsxQNZ/tj/N96WCadoCKxViGOg 3nfnY3qBOZR7Z8DmxuynYvNDKBx2Ox02+NPK6BdYonqG+TCAxQKVo4A2tEYJ2aoCfm6P BrQg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 192.94.38.131 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com Return-Path: Received: from relay1.mentorg.com (relay1.mentorg.com. [192.94.38.131]) by gmr-mx.google.com with ESMTPS id q192si55627wme.3.2019.02.27.01.03.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Feb 2019 01:03:18 -0800 (PST) Received-SPF: pass (google.com: domain of cedric_hombourger@mentor.com designates 192.94.38.131 as permitted sender) client-ip=192.94.38.131; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 192.94.38.131 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-02.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1gyv7U-0003pa-Uw from Cedric_Hombourger@mentor.com for isar-users@googlegroups.com; Wed, 27 Feb 2019 01:03:16 -0800 Received: from FRG-W10-HOMBOUR.world.mentorg.com (137.202.0.90) by svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Wed, 27 Feb 2019 09:03:12 +0000 From: Cedric Hombourger To: CC: Cedric Hombourger Subject: [PATCH] dpkg-raw: use date of the most recent file instead of "now" Date: Wed, 27 Feb 2019 10:03:01 +0100 Message-ID: <1551258181-263-1-git-send-email-Cedric_Hombourger@mentor.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) X-TUID: lrZYuAZdc+7a The changelog generated by Isar would use the current date/time causing each build to be different. Use the date/time of the most recent file to achieve reproducible builds (assuming files contained in the payload have the same contents and timestamps). In the event where the dpkg-raw package is not shipping any files, Isar will default to the current date/time. Disposition: Submit upstream Signed-off-by: Cedric Hombourger --- meta/classes/debianize.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass index 510aebd..90edcdc 100644 --- a/meta/classes/debianize.bbclass +++ b/meta/classes/debianize.bbclass @@ -6,7 +6,12 @@ CHANGELOG_V ?= "${PV}" deb_add_changelog() { - date=$( LANG=C date -R ) + timestamp=$(find ${D}/ -type f -printf "%T@ %p\n"|grep -v ${D}/debian/|sort -n|awk '{print $1 }'|tail -n 1) + if [ -n "${timestamp}" ]; then + date=$(LANG=C date -R -d @${timestamp}) + else + date=$(LANG=C date -R) + fi cat < ${S}/debian/changelog ${PN} (${CHANGELOG_V}) UNRELEASED; urgency=low -- 2.11.0