From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6662603229503684608 X-Received: by 2002:a2e:9d93:: with SMTP id c19mr1323273ljj.25.1552163217324; Sat, 09 Mar 2019 12:26:57 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac2:51b4:: with SMTP id f20ls1152987lfk.3.gmail; Sat, 09 Mar 2019 12:26:56 -0800 (PST) X-Google-Smtp-Source: APXvYqxL4rvqKCfbQ8NT1A5lz/txMJfarNDWc4wCBy4K0zuB9OMJWLdYRkFwa3WB0tpEgywnb21V X-Received: by 2002:a19:760a:: with SMTP id c10mr479594lff.9.1552163216762; Sat, 09 Mar 2019 12:26:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552163216; cv=none; d=google.com; s=arc-20160816; b=WIzKvvBO2jBgIwboydIR0PPi96Sx4efTbT16tZlnPt8nP9SMlk8iurzNX8/0KBbM0D 5yo8xC1UlLVWRX1vQ+CXBSe4d7S+4VtGOl7u3Ja9c7tbXMsckmQ0RrtVLQHGy7T9ERxg HBmhTnhTAr95SDzxfW6qGe90PRojtO+oI118Bxw4FM/BXZHz7ItkvlhKnZ7TGf0x2N9b yRzQxd2TtHC+5dKD8Dddp8WVk/qEbftCfWWY6bbFDw8l4QLXSQns06OBEKJ226jIBg2k 8Fp/UF98uazSn1muMVbokg7r7zr3rYmQcT9Nxf85OSN3KNM4jLgE6IPSMGhJF0hSUoSY LGVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=heDHkQEyvp8Vu/X2x3xCR29Wj3BgD6BbcwpTcEglt1I=; b=g9K0KPZ8LKNDwHRAwfoFwzIMhcMsYmJ2KY5cpHR19hiXTT+nN8uvL6ZE2tewzxgKUr fLLlXLzqvwQZORpm9eRT3gBDRzESmEVzejuKdBhziy80GYz1f0wycyJ2O2gRcnTUv4Ai OLvnZ9ET9w0ubUpu3kUdw8dqas5tCZhOZnBFX+oJpps1h6apN6Qb1UCW0abkZSq2yMpS ebeJ3NOT32TVpQkRY6k4MOo0B8FLinqOLgncabAJAtk8zlkDO8lgYtVfV5qXfYc4A0x1 BiezFGoxJxlua1vTyDgPDXOqSsvAsSb9cazH2UYw+ZQ15TpgF/26Lz9QxC2CR1zHIzAJ naWw== 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 x12si53057ljb.2.2019.03.09.12.26.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Mar 2019 12:26:56 -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 1h2iYY-0000uE-TT from Cedric_Hombourger@mentor.com for isar-users@googlegroups.com; Sat, 09 Mar 2019 12:26:54 -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; Sat, 9 Mar 2019 20:26:50 +0000 From: Cedric Hombourger To: CC: Cedric Hombourger Subject: [PATCH v2] debianize: use date of the most recent file instead of "now" Date: Sat, 9 Mar 2019 21:26:42 +0100 Message-ID: <1552163202-1450-1-git-send-email-Cedric_Hombourger@mentor.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <20190227110017.36737bde@md1za8fc.ad001.siemens.net> References: <20190227110017.36737bde@md1za8fc.ad001.siemens.net> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) To svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) X-TUID: B/6MQvZdcagq 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 package is not shipping any files, Isar will default to the current date/time. 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..ad3a98e 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 ${S}/ -type f -not -path "${S}/debian/*" -printf "%T@\n"|sort -n -r|head -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