From patchwork Fri Jul 12 23:12:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Brobecker X-Patchwork-Id: 1131531 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-505039-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="mYpish4L"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45lpct31h7z9sBF for ; Sat, 13 Jul 2019 09:13:10 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; q=dns; s=default; b=kZQlXvrhSCZd 2Q5vkBftqZ/gdTnfSn51SihCkWbTYei2HHIo4P57a6zgh5CuHOdk6wt9mM7Jitw1 TmS2neMYYAen9wwym3Dvjwd8hJMnaUg2NchhmKPsoAXFe7UFApP5E3rgGHVk6QHE ZMR6cDG25a7854jI00GEGrO2wndlKEY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; s=default; bh=MpQMTmYtcKorkmehPm T4jmV/KOY=; b=mYpish4L569F3jGkb65giU1RjE4EXRQ5Z8mmwrNRY25no4q7ZN X9wGftiN2pCjovUK9ShSZA4jGu4praXIDRcZ8VhM/JFuPHQw1MqMwphEl7zXo/5C WAHaS2tLa0mW7ZuBVz7UUgf5fuQeUWsT4y92uXP67nN6jGY6C9uDurLLI= Received: (qmail 23478 invoked by alias); 12 Jul 2019 23:13:03 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 23469 invoked by uid 89); 12 Jul 2019 23:13:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 12 Jul 2019 23:13:01 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 44FFB5616A; Fri, 12 Jul 2019 19:13:00 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id MYXqwcYUVf2m; Fri, 12 Jul 2019 19:13:00 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 0F35E56091; Fri, 12 Jul 2019 19:13:00 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 300A6858F1; Fri, 12 Jul 2019 16:12:58 -0700 (PDT) From: Joel Brobecker To: gcc-patches@gcc.gnu.org Cc: gdb-patches@sourceware.org, Sergio Durigan Junior , Tom Tromey Subject: [RFA] adjust src-release following the renaming of gdb/common/ to gdb/gdbsupport/ Date: Fri, 12 Jul 2019 16:12:56 -0700 Message-Id: <20190712231256.21418-1-brobecker@adacore.com> Hello, A recent change renamed the common/ directory into gdbsupport/ in gdb. This causes problems in the getver function in the src-release script which doesn't find the create-version.sh script anymore. As a result, it falls back on using the version.in file verbatim, meaning that the "DATE" placeholder doesn't get replaced with the snapshot date, and the "-git" suffix doesn't get stripped. More precisely, we get snapshots called "gdb-8.3.50-DATE-git.tar" instead of (e.g.) "gdb-8.3-20190712.tar". For those who have been getting snapshots from sourceware, this is also why recent snapshots are missing. This commit fixes the issue by adding support for this situation. I left the support for $tool/common/create-version.sh, because the sim still uses that directory structure. ChangeLog: * src-release (getver): If $tool/gdbsupport/create-version.sh exists, use that to determine the version number. Tested on x86_64-linux, by running the src-release script with "gdb" as the argument, and verifying that the name of the tarball is now correct. OK to push? Thanks! diff --git a/src-release.sh b/src-release.sh index 1654656146f..90d556896c9 100755 --- a/src-release.sh +++ b/src-release.sh @@ -61,6 +61,10 @@ getver() $tool/common/create-version.sh $tool 'dummy-host' 'dummy-target' VER.tmp cat VER.tmp | grep 'version\[\]' | sed 's/.*"\([^"]*\)".*/\1/' | sed 's/-git$//' rm -f VER.tmp + elif test -f $tool/gdbsupport/create-version.sh; then + $tool/gdbsupport/create-version.sh $tool 'dummy-host' 'dummy-target' VER.tmp + cat VER.tmp | grep 'version\[\]' | sed 's/.*"\([^"]*\)".*/\1/' | sed 's/-git$//' + rm -f VER.tmp elif test -f $tool/version.in; then head -1 $tool/version.in else