From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id kBpyOGD0OmMtzQQAWB0awg (envelope-from ) for ; Mon, 03 Oct 2022 10:40:32 -0400 Received: by simark.ca (Postfix, from userid 112) id E3D361E112; Mon, 3 Oct 2022 10:40:32 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=wIMvydqR; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 9572A1E0D5 for ; Mon, 3 Oct 2022 10:40:32 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 362B3385C416 for ; Mon, 3 Oct 2022 14:40:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 362B3385C416 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1664808032; bh=jvPIekLpcLFasvr189MnzDIExsiENt58VPpOMTsK+fY=; h=Date:To:References:Subject:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=wIMvydqRfTmSWv8I0lUAQnS8CIuRxhSnozceagrXWkX9hhH/elPiy42i6syhznuhn zyi3U/MUe/qqPaZnhtzrB0q2ImXaHZs/wqJdGWBXuF4D0Ta/3Xorw9OSMXrriUICDs K8YOtwrhFkKdz+rQH2MIgMZG+m8eoCfqFmKwR958= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id DFEAA385701C for ; Mon, 3 Oct 2022 14:40:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DFEAA385701C Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-260-ycOVj0qfO8y5XbC8v7t1QQ-1; Mon, 03 Oct 2022 10:40:10 -0400 X-MC-Unique: ycOVj0qfO8y5XbC8v7t1QQ-1 Received: by mail-qk1-f199.google.com with SMTP id n13-20020a05620a294d00b006cf933c40feso9346533qkp.20 for ; Mon, 03 Oct 2022 07:40:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=jvPIekLpcLFasvr189MnzDIExsiENt58VPpOMTsK+fY=; b=IFTYULB0rnPXYVozghvjkt/7IMwtqOsKlfVmSpMAHHYo52XpRz9fqfYsIlQPLYsN98 4AYqydnQinM7BBYWVjZdQVQNeE6aFmmt1N03RKlxmf/iS2wMvpl4nRsNtsIU6IUfaB1B fTiUZn3F7QGj9jyjyweS4D/qBIGMXM5/ZgR5Ty489USFVP3QtkoV+h5BScCoK3wGKyyQ BwrP2m2ngpxgwRJh0riwlUIEXOU1KdIqGF7gnkxX44/uCzKSlRF4fkIVO4QyjAzfeXTI QNRm8+N8bzk4t1IJXdLbl1ViorBzQ8Z4rpjSFriqM5XTHcyfNyRX7G6068UgXjvi4LjI AXfA== X-Gm-Message-State: ACrzQf2Bap2s2sU65I5L4NuSfwPKS2d0c6bn9cOWs/jMZ79IR2l9jyUn gTEiUCisZ+7eW6T6tzGEBZ56bfIfMt0jiUJxEpVaCUcpI+mqwOfq6f+vDnh0j7hsYUeAwcc9lEs tmkmGR9UkuAhqETpXqgprTQ== X-Received: by 2002:a05:622a:1aa1:b0:35b:d970:c0a7 with SMTP id s33-20020a05622a1aa100b0035bd970c0a7mr16328984qtc.401.1664808010089; Mon, 03 Oct 2022 07:40:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4kscFAndIee1PbCvYEyLBjTOLTJuyD/vljxtoubFbeYC4a8o+J51r8qcPc1LJsntNCKHXekg== X-Received: by 2002:a05:622a:1aa1:b0:35b:d970:c0a7 with SMTP id s33-20020a05622a1aa100b0035bd970c0a7mr16328967qtc.401.1664808009868; Mon, 03 Oct 2022 07:40:09 -0700 (PDT) Received: from [192.168.1.18] ([79.123.82.157]) by smtp.gmail.com with ESMTPSA id s22-20020a05620a29d600b006b8e63dfffbsm7829114qkp.58.2022.10.03.07.40.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Oct 2022 07:40:09 -0700 (PDT) Message-ID: <1e772307-1f10-6e1c-5ffb-8513a41db5ab@redhat.com> Date: Mon, 3 Oct 2022 15:40:03 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 To: Jan Beulich , Sam James References: <07a1ca21-5569-e67b-d0c7-6069974b1068@redhat.com> <3EC98FFD-FD7A-4A17-9FE0-EF5DAFB36B3C@gentoo.org> Subject: Re: RFC: Sort tarballs created by the src-release.sh script In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-GB Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Nick Clifton via Gdb-patches Reply-To: Nick Clifton Cc: Andreas Schwab , Binutils , Nick Clifton via Gdb-patches , Tzvetelin Katchov Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi Guys, [This appears to be getting slightly out of hand...] > Not sure what "creation date" might mean here. Assuming the script is > (typically) run from a git tree, perhaps the commit date of the top> level commit on the branch would be best to use? Except that a commit to the branch that does not affect something that would go into the tarball would then result in a changed date. We could use the src-release.sh file itself, like this: diff --git a/src-release.sh b/src-release.sh index 079b545ae7c..de1f98a70bb 100755 --- a/src-release.sh +++ b/src-release.sh @@ -184,9 +184,15 @@ do_tar() ver=$2 echo "==> Making $package-$ver.tar" rm -f $package-$ver.tar + # The sort command and --mtime, --group and --owner options are + # used in order to create consistent, reproducible tarballs. + # BUILD_DATE is set to SOURCE_DATE_EPOCH if defined, or the + # modification date of this file otherwise. cf: + # https://reproducible-builds.org/docs/source-date-epoch/ + BUILD_DATE="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date -r src-release.sh +%s)}" +%Y-%m-%d)" find $package-$ver -follow \( $CVS_NAMES \) -prune \ - -o -type f -print \ - | tar cTfh - $package-$ver.tar + -o -type f -print | LC_ALL=C sort \ + | tar cTfh - $package-$ver.tar --mtime=$BUILD_DATE --group=0 --owner=0 } # Compress the output with bzip2 Would that work ? Cheers Nick