From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 068993858C78 for ; 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 To: gcc-patches@gcc.gnu.org Cc: Sam James 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 List-Id: 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 --- 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(+) 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 -- 2.42.0