From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 3F67C385742F for ; Mon, 3 Oct 2022 14:40:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3F67C385742F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664808011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jvPIekLpcLFasvr189MnzDIExsiENt58VPpOMTsK+fY=; b=HQG/Om4XQm3tvzf6POlG73u5/8ulhqNkJmRWfogmB0k6MdbG/9aAICoW9Y7Om3Iran+GKX F/APXBDo1mehXQf4od7RJt5+NA2E96HJdaUV11rGP6Km+/aS4SvKYhZeVxBgjlqX++Ao/h 0QPCwZjbTPSge1t/xsA1iTvw4vh1arw= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-141-6Y_WWWFJOwS_jpznvrJtlw-1; Mon, 03 Oct 2022 10:40:10 -0400 X-MC-Unique: 6Y_WWWFJOwS_jpznvrJtlw-1 Received: by mail-qk1-f200.google.com with SMTP id u20-20020a05620a455400b006ce5151968dso9180819qkp.11 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=rzGulUHRPU3euMoZDv+DzKC3Ic7gT8IdLHVC/OwboMLJOwAXro57zzlJX1vY1dAWXE egonqblkPf9Psh2u5Ew6zvojmmnnKD6PnKU+Ur+fVjfKSmmI8SMewbLwX8gHUFEpTE5T V8KLtVNy1o5DYKrIgpRfyekiwyUWE3MJzunb5bGniJotXkeESPE+Jd5Myb0BDPmRF8F7 hmF4cUWT9kEibmCP49kmb8qaBNNc0ldM6hi913cPUtfqd60moH02pxlkW0R7G1hIcUhs 7uNHByzoooCfFv96ycCDRxtRiW3kh5E6bxnH+hmUL8Ed1PELlU73oMDHuSudJiIHZ703 ox+A== X-Gm-Message-State: ACrzQf1Sg0C1Is7J1R4FGohyQdbz7EiGbcdRQn/UfP9aeT2xU9Nf7z8t PxYIkOh4xKQm3mRTGO6O3QMLQ8BRdHqui+u5Rbdae5vKpsxGQDFABFYsmpsVxQxIz0NsBgrbVKb HCRYRRVBtz0QUhZTFIg== X-Received: by 2002:a05:622a:1aa1:b0:35b:d970:c0a7 with SMTP id s33-20020a05622a1aa100b0035bd970c0a7mr16328983qtc.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 Cc: Andreas Schwab , Binutils , Nick Clifton via Gdb-patches , Tzvetelin Katchov References: <07a1ca21-5569-e67b-d0c7-6069974b1068@redhat.com> <3EC98FFD-FD7A-4A17-9FE0-EF5DAFB36B3C@gentoo.org> From: Nick Clifton 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-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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