Message ID | 20231102084058.1142941-2-sam@gentoo.org |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp207053vqu; Thu, 2 Nov 2023 01:41:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE5zkeWwoeYCGYP23Rzp543pjOtepHeZuYJ3JGieeqqkhBEq7ANaG40Jgm3WSZxQKu7LHxw X-Received: by 2002:a05:622a:1a8d:b0:41c:c3ad:922d with SMTP id s13-20020a05622a1a8d00b0041cc3ad922dmr20182376qtc.52.1698914514295; Thu, 02 Nov 2023 01:41:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698914514; cv=pass; d=google.com; s=arc-20160816; b=ktchGN1kHsaiKZ4FpdJ+KsVWHBcNiw7WL31iaQGDwHACi/p4LYFVvEtTuBLmIR5+iW bav0aFSk1bYypFwb7QNSc37pRkXDWaS4ZgNO8qT667gPogrZpWwCYZg8/bd1MSxyYPLg cVf2gC6BGbFCOTHXBX6vYb+9IoPB8dugvIJDczuhBvLFliDKVmPtvwA0+CuA80maPazv zW5LG8f92JAiSZLdDGVrOgaDdGsxafd1HaCn9kKgbhwh+a0g7v+eErT7QNLK6MgZ9ta5 XtV/MqB5UE6DYOSCxS7xUCm34jqtUA5x1MY6+1kfCw4whAphrzZbfUjfh+6kfte9oeAF y01w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:arc-filter:dmarc-filter:delivered-to; bh=KObQkUljf9a6sjZftKmNgbpAWe9SOWsNW0V1GLzATyw=; fh=lhAG8ssliBigPOPTNpUmgPeKTFWUg1eGxz7YimpjSKA=; b=DiuDEt+rBYIiLTMyC3uRfj4E3U9Yb/ppYQJLaTFx6kESXacpqZ8GeiGeCgnyh6UsGm uCHh4rJGERnK3U7g//HYDqSUA25E0MVyGNOBmQHekdroEdI68ABNXh/g/PyHn62Uaa5p Dp45kacjGMEFXyulqZR3cD+AdBfBiZvzGTfBW/lilTi034bJxYn8q0Yx0HR+I6jCKtq0 /h4RS7XgOca3pyQ8OOlITfZSL4GV3LTDcngmGwwD1Bnpm9RmAZDz0/VRKiWGpd9JrK8Y vAZyCXfQq3YU5/dO8cUPece2yq0WExfXdrUpRZVJhHJMJTluR7OsoueCVAS52DFipV0K 7jGA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gentoo.org Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id c14-20020ac87d8e000000b00417bb47e1fesi4278390qtd.170.2023.11.02.01.41.54 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 01:41:54 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gentoo.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8AF0B3857012 for <ouuuleilei@gmail.com>; Thu, 2 Nov 2023 08:41:53 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 068993858C78 for <gcc-patches@gcc.gnu.org>; Thu, 2 Nov 2023 08:41:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 068993858C78 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 068993858C78 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.211.166.183 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698914487; cv=none; b=e5mfIaFVE+35WMCx3WMXvLfwWUM7xXwZ1TUcHEKyQDnEwdK2TZTidAAPil16Vj1YGLkzftCU3fpmfcmkNHDbHY3UxTwhPqzIXrXpm172QMaVxd8/DakpQ0hysMpK+wLOBZlxMg82G0CzuJlBiFqWJnCIKxKSIvjyRL/rM5YCYc8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698914487; c=relaxed/simple; bh=paC7pOknscbjjo/QFpgS3X5/UUfgSo72HK5UX+NHHxc=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=KWV8xx8xTvUO4jURGmA9Uhp6baLVyKGbrAXpGMu1u6aVbG/90XTI3QKN7LngPTaNMB+cYZHFKMlxQgB1/DH5Ik6XcYK5GDZS8JQJIuxNdcAjehYrAyygGC+poTtVBe3bZkj4Y3nTOSBbq7caeVzEiYINYrXVDu/0iFsNEb2wnJk= ARC-Authentication-Results: i=1; server2.sourceware.org From: Sam James <sam@gentoo.org> To: gcc-patches@gcc.gnu.org Cc: Sam James <sam@gentoo.org> Subject: [PATCH 2/4] maintainer-scripts/gcc_release: create index between snapshots <-> commits Date: Thu, 2 Nov 2023 08:39:06 +0000 Message-ID: <20231102084058.1142941-2-sam@gentoo.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231102084058.1142941-1-sam@gentoo.org> References: <20231102084058.1142941-1-sam@gentoo.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781440985714437862 X-GMAIL-MSGID: 1781440985714437862 |
Series |
[1/4] contrib: add generate_snapshot_index.py
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Sam James
Nov. 2, 2023, 8:39 a.m. UTC
Create and maintain a known_snapshots.txt index with space-separated format
BRANCH-DATE COMMIT.
For example:
8-20210107 5114ee0676e432493ada968e34071f02fb08114f
8-20210114 f9267925c648f2ccd9e4680b699e581003125bcf
...
This is helpful for bisects and quickly looking up the information from bug
reports.
maintainer-scripts/
* gcc_release: Create known_snapshots.txt as an index between snapshots
and commits.
Signed-off-by: Sam James <sam@gentoo.org>
---
Note that there's a few different approaches we can take here. I've gone
for the simpler one of having it still fetch from the remote site and parse
because it's obviously hard for me to test a part which runs on the remote
machine.
We can skip this patch for now if desired. I have mixed feelings about complicating
the contrib/generate_snapshot_index.py script to take an URL / path as I'd ideally
like it to still be easily usable locally.
We could have it be generated locally and then uploaded as well, as another option.
maintainer-scripts/gcc_release | 7 +++++++
1 file changed, 7 insertions(+)
Comments
On 02/11/23 08:39 +0000, Sam James wrote: >Create and maintain a known_snapshots.txt index with space-separated format >BRANCH-DATE COMMIT. > >For example: >8-20210107 5114ee0676e432493ada968e34071f02fb08114f >8-20210114 f9267925c648f2ccd9e4680b699e581003125bcf >... > >This is helpful for bisects and quickly looking up the information from bug >reports. Is there any reason we don't just use git tags for this? We could run a one-off job to create all the historical tags (setting GIT_COMMITTER_DATE and GIT_AUTHOR_DATE so the tags are backdated), and add a tagging step to the snapshot creation. Git tags are cheap, but I can imagine a concern about hundreds of new tags "littering" the output of 'git tag -l'. I don't _think_ you can put tags under an alternative ref that isn't fetched by default (as we do with refs/users and refs/vendor). I think tags have to go under refs/tags. But grep -v could be used to filter out snapshot tags easily. We could use https://git-scm.com/docs/gitnamespaces for this though, so that git --namespace=snapshots tag -l would show the snapshot tags.
On Nov 02 2023, Jonathan Wakely wrote: > Git tags are cheap, but I can imagine a concern about hundreds of new > tags "littering" the output of 'git tag -l'. I don't _think_ you can > put tags under an alternative ref that isn't fetched by default (as we > do with refs/users and refs/vendor). I think tags have to go under > refs/tags. But grep -v could be used to filter out snapshot tags > easily. There is no inherent limitation on publishing tags outside of refs/tags, to make them invisible by git tag. There are already existing examples of tags residing under various refs/users and refs/vendors namespaces.
On Thu, 2 Nov 2023 at 10:23, Andreas Schwab wrote: > > On Nov 02 2023, Jonathan Wakely wrote: > > > Git tags are cheap, but I can imagine a concern about hundreds of new > > tags "littering" the output of 'git tag -l'. I don't _think_ you can > > put tags under an alternative ref that isn't fetched by default (as we > > do with refs/users and refs/vendor). I think tags have to go under > > refs/tags. But grep -v could be used to filter out snapshot tags > > easily. > > There is no inherent limitation on publishing tags outside of refs/tags, > to make them invisible by git tag. There are already existing examples > of tags residing under various refs/users and refs/vendors namespaces. Ah, good to know, thanks. So then there's no reason that snapshots would have to clutter up the list of default tags for anybody who isn't interested in them.
On 2 November 2023 11:25:47 CET, Jonathan Wakely <jwakely@redhat.com> wrote: >On Thu, 2 Nov 2023 at 10:23, Andreas Schwab wrote: >> >> On Nov 02 2023, Jonathan Wakely wrote: >> >> > Git tags are cheap, but I can imagine a concern about hundreds of new >> > tags "littering" the output of 'git tag -l'. I don't _think_ you can >> > put tags under an alternative ref that isn't fetched by default (as we >> > do with refs/users and refs/vendor). I think tags have to go under >> > refs/tags. But grep -v could be used to filter out snapshot tags >> > easily. >> >> There is no inherent limitation on publishing tags outside of refs/tags, >> to make them invisible by git tag. There are already existing examples >> of tags residing under various refs/users and refs/vendors namespaces. > > >Ah, good to know, thanks. > >So then there's no reason that snapshots would have to clutter up the >list of default tags for anybody who isn't interested in them. > Thanks Andreas. Exactly. So, just to emphasise the obvious: Let's please use refs/snapshot ?
diff --git a/maintainer-scripts/gcc_release b/maintainer-scripts/gcc_release index 962b8efe99a7..4cd1fa799660 100755 --- a/maintainer-scripts/gcc_release +++ b/maintainer-scripts/gcc_release @@ -448,6 +448,9 @@ announce_snapshot() { SNAPSHOT_INDEX=${RELEASE}/index.html changedir "${SNAPSHOTS_DIR}" + # Create an index if it doesn't already exist and populate it before we add + # the new snapshot. + ${PYTHON} ${SOURCE_DIRECTORY}/contrib/generate_snapshot_index.py || error "Failed to generate snapshot index" echo \ "Snapshot gcc-"${RELEASE}" is now available on https://gcc.gnu.org/pub/gcc/snapshots/"${RELEASE}"/ @@ -514,6 +517,9 @@ Last modified "${TEXT_DATE}" rm -f LATEST-${BRANCH} ln -s ${RELEASE} LATEST-${BRANCH} + # Add the snapshot we just made to the index + printf "${RELEASE} ${GITREV}\n" >> known_snapshots.txt + inform "Sending mail" export QMAILHOST=gcc.gnu.org @@ -617,6 +623,7 @@ GZIP="${GZIP:-gzip --best}" SCP="${SCP:-scp -p}" SSH="${SSH:-ssh}" TAR="${TAR:-tar}" +PYTHON="${PYTHON:-python3}" ######################################################################## # Command Line Processing